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AAA41T,EAAA,GAAS51T,GACvC,OAAOA,EAET,IAAIuU,EAAUvU,EAAQ,GACtB,MAAkB,KAAVuU,GAAkB,EAAIvU,IAdjB,IAcwC,KAAOuU,GCe9D,EALA,SAAay5E,EAAQxK,EAAMrlB,GACzB,IAAI5pD,EAAmB,MAAVy5E,OAAiB9/E,ECjBhC,SAAiB8/E,EAAQxK,GAMvB,IAHA,IAAI/8E,EAAQ,EACRrC,GAHJo/E,EAAO,EAASA,EAAMwK,IAGJ5pF,OAED,MAAV4pF,GAAkBvnF,EAAQrC,GAC/B4pF,EAASA,EAAO,EAAMxK,EAAK/8E,OAE7B,OAAQA,GAASA,GAASrC,EAAU4pF,OAAS9/E,EDQH,CAAQ8/E,EAAQxK,GAC1D,YAAkBt1E,IAAXqG,EAAuB4pD,EAAe5pD,mCEC/C,IALA,SAAkBvU,GAChB,IAAIsH,SAActH,EAClB,OAAgB,MAATA,IAA0B,UAARsH,GAA4B,YAARA,qFCC/C,EALA,SAAkBtH,GAChB,MAAuB,iBAATA,GCAhB,SAAsBA,GACpB,OAAgB,MAATA,GAAiC,iBAATA,EDA5B,CAAaA,IArBF,oBAqBY,OAAWA","sources":["webpack:///../node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///../node_modules/@date-io/dayjs/build/index.esm.js","webpack:///../node_modules/stylis/src/Utility.js","webpack:///../node_modules/stylis/src/Tokenizer.js","webpack:///../node_modules/stylis/src/Enum.js","webpack:///../node_modules/stylis/src/Serializer.js","webpack:///../node_modules/stylis/src/Prefixer.js","webpack:///../node_modules/stylis/src/Parser.js","webpack:///../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack:///../node_modules/stylis/src/Middleware.js","webpack:///../node_modules/@emotion/memoize/dist/emotion-memoize.browser.esm.js","webpack:///../node_modules/@emotion/react/dist/emotion-element-99289b21.browser.esm.js","webpack:///../node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack:///../node_modules/@emotion/hash/dist/hash.browser.esm.js","webpack:///../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack:///../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","webpack:///../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","webpack:///../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack:///../node_modules/@mui/core/Portal/Portal.js","webpack:///../node_modules/@mui/core/Unstable_TrapFocus/Unstable_TrapFocus.js","webpack:///../node_modules/@mui/core/composeClasses/composeClasses.js","webpack:///../node_modules/@mui/core/generateUtilityClass/generateUtilityClass.js","webpack:///../node_modules/@mui/core/generateUtilityClasses/generateUtilityClasses.js","webpack:///../node_modules/@mui/core/utils/isHostComponent.js","webpack:///../node_modules/@mui/icons-material/Check.js","webpack:///../node_modules/@mui/icons-material/Close.js","webpack:///../node_modules/@mui/icons-material/CloudUpload.js","webpack:///../node_modules/@mui/icons-material/SaveOutlined.js","webpack:///../node_modules/@mui/icons-material/utils/createSvgIcon.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/useUtils.js","webpack:///../node_modules/@mui/lab/DatePicker/shared.js","webpack:///../node_modules/@mui/lab/internal/pickers/PickersToolbar.js","webpack:///../node_modules/@mui/lab/internal/svg-icons/Pen.js","webpack:///../node_modules/@mui/lab/internal/svg-icons/Calendar.js","webpack:///../node_modules/@mui/lab/internal/svg-icons/Clock.js","webpack:///../node_modules/@mui/lab/DatePicker/DatePickerToolbar.js","webpack:///../node_modules/@mui/lab/internal/pickers/wrappers/WrapperVariantContext.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///../node_modules/@popperjs/core/lib/enums.js","webpack:///../node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///../node_modules/@popperjs/core/lib/createPopper.js","webpack:///../node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///../node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///../node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///../node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///../node_modules/@popperjs/core/lib/utils/math.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///../node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///../node_modules/@popperjs/core/lib/utils/within.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///../node_modules/@popperjs/core/lib/popper.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///../node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///../node_modules/@mui/material/Popper/Popper.js","webpack:///../node_modules/@mui/lab/internal/pickers/PickersPopper.js","webpack:///../node_modules/@mui/lab/internal/pickers/wrappers/DesktopWrapper.js","webpack:///../node_modules/@mui/lab/internal/pickers/utils.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/useViews.js","webpack:///../node_modules/@mui/lab/ClockPicker/shared.js","webpack:///../node_modules/@mui/lab/ClockPicker/ClockPointer.js","webpack:///../node_modules/@mui/lab/ClockPicker/Clock.js","webpack:///../node_modules/@mui/lab/ClockPicker/ClockNumber.js","webpack:///../node_modules/@mui/lab/ClockPicker/ClockNumbers.js","webpack:///../node_modules/@mui/lab/internal/svg-icons/ArrowLeft.js","webpack:///../node_modules/@mui/lab/internal/svg-icons/ArrowRight.js","webpack:///../node_modules/@mui/lab/internal/pickers/PickersArrowSwitcher.js","webpack:///../node_modules/@mui/lab/internal/pickers/time-utils.js","webpack:///../node_modules/@mui/lab/ClockPicker/ClockPicker.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/date-helpers-hooks.js","webpack:///../node_modules/@mui/lab/MonthPicker/PickersMonth.js","webpack:///../node_modules/@mui/lab/MonthPicker/MonthPicker.js","webpack:///../node_modules/@mui/lab/internal/pickers/date-utils.js","webpack:///../node_modules/@mui/lab/CalendarPicker/PickersFadeTransitionGroup.js","webpack:///../node_modules/@mui/lab/internal/pickers/constants/dimensions.js","webpack:///../node_modules/@mui/lab/PickersDay/PickersDay.js","webpack:///../node_modules/dom-helpers/esm/removeClass.js","webpack:///../node_modules/react-transition-group/esm/CSSTransition.js","webpack:///../node_modules/dom-helpers/esm/addClass.js","webpack:///../node_modules/dom-helpers/esm/hasClass.js","webpack:///../node_modules/@mui/lab/CalendarPicker/PickersSlideTransition.js","webpack:///../node_modules/@mui/lab/CalendarPicker/PickersCalendar.js","webpack:///../node_modules/@mui/lab/internal/svg-icons/ArrowDropDown.js","webpack:///../node_modules/@mui/lab/CalendarPicker/PickersCalendarHeader.js","webpack:///../node_modules/@mui/lab/YearPicker/PickersYear.js","webpack:///../node_modules/@mui/lab/YearPicker/yearPickerClasses.js","webpack:///../node_modules/@mui/lab/YearPicker/YearPicker.js","webpack:///../node_modules/@mui/lab/CalendarPicker/CalendarPicker.js","webpack:///../node_modules/@mui/lab/internal/pickers/Picker/PickerView.js","webpack:///../node_modules/@mui/lab/CalendarPicker/useCalendarState.js","webpack:///../node_modules/@mui/material/InputAdornment/inputAdornmentClasses.js","webpack:///../node_modules/@mui/material/InputAdornment/InputAdornment.js","webpack:///../node_modules/@mui/lab/internal/pickers/text-field-helper.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/useMaskedInput.js","webpack:///../node_modules/rifm/dist/rifm.esm.js","webpack:///../node_modules/@mui/lab/internal/pickers/KeyboardDateInput.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/useIsLandscape.js","webpack:///../node_modules/@mui/lab/internal/pickers/Picker/Picker.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/useValidation.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/usePickerState.js","webpack:///../node_modules/@mui/lab/internal/pickers/hooks/useOpenState.js","webpack:///../node_modules/@mui/lab/DesktopDatePicker/DesktopDatePicker.js","webpack:///../node_modules/@mui/material/DialogActions/dialogActionsClasses.js","webpack:///../node_modules/@mui/material/DialogActions/DialogActions.js","webpack:///../node_modules/@mui/material/DialogContent/dialogContentClasses.js","webpack:///../node_modules/@mui/material/DialogContent/DialogContent.js","webpack:///../node_modules/@mui/material/Dialog/dialogClasses.js","webpack:///../node_modules/@mui/material/Dialog/DialogContext.js","webpack:///../node_modules/@mui/material/Dialog/Dialog.js","webpack:///../node_modules/@mui/lab/internal/pickers/PickersModalDialog.js","webpack:///../node_modules/@mui/lab/internal/pickers/wrappers/MobileWrapper.js","webpack:///../node_modules/@mui/lab/internal/pickers/PureDateInput.js","webpack:///../node_modules/@mui/lab/MobileDatePicker/MobileDatePicker.js","webpack:///../node_modules/@mui/lab/DatePicker/DatePicker.js","webpack:///../node_modules/@mui/lab/LoadingButton/loadingButtonClasses.js","webpack:///../node_modules/@mui/lab/LoadingButton/LoadingButton.js","webpack:///../node_modules/@mui/lab/LocalizationProvider/LocalizationProvider.js","webpack:///../node_modules/@mui/lab/node_modules/@mui/core/composeClasses/composeClasses.js","webpack:///../node_modules/@mui/lab/node_modules/@mui/core/generateUtilityClass/generateUtilityClass.js","webpack:///../node_modules/@mui/lab/node_modules/@mui/core/generateUtilityClasses/generateUtilityClasses.js","webpack:///../node_modules/@mui/material/AlertTitle/alertTitleClasses.js","webpack:///../node_modules/@mui/material/AlertTitle/AlertTitle.js","webpack:///../node_modules/@mui/material/Alert/alertClasses.js","webpack:///../node_modules/@mui/material/Alert/Alert.js","webpack:///../node_modules/@mui/material/internal/svg-icons/SuccessOutlined.js","webpack:///../node_modules/@mui/material/internal/svg-icons/ReportProblemOutlined.js","webpack:///../node_modules/@mui/material/internal/svg-icons/ErrorOutline.js","webpack:///../node_modules/@mui/material/internal/svg-icons/InfoOutlined.js","webpack:///../node_modules/@mui/material/internal/svg-icons/Close.js","webpack:///../node_modules/@mui/material/AppBar/appBarClasses.js","webpack:///../node_modules/@mui/material/AppBar/AppBar.js","webpack:///../node_modules/@mui/material/internal/svg-icons/Person.js","webpack:///../node_modules/@mui/material/Avatar/avatarClasses.js","webpack:///../node_modules/@mui/material/Avatar/Avatar.js","webpack:///../node_modules/@mui/core/BackdropUnstyled/backdropUnstyledClasses.js","webpack:///../node_modules/@mui/core/BackdropUnstyled/BackdropUnstyled.js","webpack:///../node_modules/@mui/material/Backdrop/Backdrop.js","webpack:///../node_modules/@mui/system/esm/createBox.js","webpack:///../node_modules/@mui/material/Box/Box.js","webpack:///../node_modules/@mui/material/ButtonBase/touchRippleClasses.js","webpack:///../node_modules/@mui/material/ButtonBase/TouchRipple.js","webpack:///../node_modules/@mui/material/ButtonBase/Ripple.js","webpack:///../node_modules/@mui/material/ButtonBase/buttonBaseClasses.js","webpack:///../node_modules/@mui/material/ButtonBase/ButtonBase.js","webpack:///../node_modules/@mui/material/Button/buttonClasses.js","webpack:///../node_modules/@mui/material/Button/Button.js","webpack:///../node_modules/@mui/material/CardContent/cardContentClasses.js","webpack:///../node_modules/@mui/material/CardContent/CardContent.js","webpack:///../node_modules/@mui/material/Card/cardClasses.js","webpack:///../node_modules/@mui/material/Card/Card.js","webpack:///../node_modules/@mui/material/internal/svg-icons/CheckBoxOutlineBlank.js","webpack:///../node_modules/@mui/material/internal/svg-icons/CheckBox.js","webpack:///../node_modules/@mui/material/internal/svg-icons/IndeterminateCheckBox.js","webpack:///../node_modules/@mui/material/Checkbox/checkboxClasses.js","webpack:///../node_modules/@mui/material/Checkbox/Checkbox.js","webpack:///../node_modules/@mui/material/CircularProgress/circularProgressClasses.js","webpack:///../node_modules/@mui/material/CircularProgress/CircularProgress.js","webpack:///../node_modules/@mui/material/Divider/dividerClasses.js","webpack:///../node_modules/@mui/material/Divider/Divider.js","webpack:///../node_modules/@mui/material/Fade/Fade.js","webpack:///../node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js","webpack:///../node_modules/@mui/material/FormControlLabel/FormControlLabel.js","webpack:///../node_modules/@mui/material/FormControl/formControlClasses.js","webpack:///../node_modules/@mui/material/FormControl/FormControl.js","webpack:///../node_modules/@mui/material/FormControl/FormControlContext.js","webpack:///../node_modules/@mui/material/FormControl/formControlState.js","webpack:///../node_modules/@mui/material/FormControl/useFormControl.js","webpack:///../node_modules/@mui/material/FormGroup/formGroupClasses.js","webpack:///../node_modules/@mui/material/FormGroup/FormGroup.js","webpack:///../node_modules/@mui/material/Grid/GridContext.js","webpack:///../node_modules/@mui/material/Grid/gridClasses.js","webpack:///../node_modules/@mui/material/Grid/Grid.js","webpack:///../node_modules/@mui/material/Grow/Grow.js","webpack:///../node_modules/@mui/material/IconButton/iconButtonClasses.js","webpack:///../node_modules/@mui/material/IconButton/IconButton.js","webpack:///../node_modules/@mui/material/TextareaAutosize/TextareaAutosize.js","webpack:///../node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js","webpack:///../node_modules/@mui/material/GlobalStyles/GlobalStyles.js","webpack:///../node_modules/@mui/material/InputBase/inputBaseClasses.js","webpack:///../node_modules/@mui/material/InputBase/InputBase.js","webpack:///../node_modules/@mui/material/InputBase/utils.js","webpack:///../node_modules/@mui/material/FormLabel/formLabelClasses.js","webpack:///../node_modules/@mui/material/FormLabel/FormLabel.js","webpack:///../node_modules/@mui/material/InputLabel/inputLabelClasses.js","webpack:///../node_modules/@mui/material/InputLabel/InputLabel.js","webpack:///../node_modules/@mui/material/Input/inputClasses.js","webpack:///../node_modules/@mui/material/Input/Input.js","webpack:///../node_modules/@mui/core/ModalUnstyled/ModalManager.js","webpack:///../node_modules/@mui/core/ModalUnstyled/modalUnstyledClasses.js","webpack:///../node_modules/@mui/core/ModalUnstyled/ModalUnstyled.js","webpack:///../node_modules/@mui/material/Modal/Modal.js","webpack:///../node_modules/@mui/material/NativeSelect/NativeSelect.js","webpack:///../node_modules/@mui/material/NativeSelect/NativeSelectInput.js","webpack:///../node_modules/@mui/material/NativeSelect/nativeSelectClasses.js","webpack:///../node_modules/@mui/material/Paper/paperClasses.js","webpack:///../node_modules/@mui/material/Paper/Paper.js","webpack:///../node_modules/@mui/material/RadioGroup/RadioGroup.js","webpack:///../node_modules/@mui/material/RadioGroup/RadioGroupContext.js","webpack:///../node_modules/@mui/material/internal/svg-icons/RadioButtonUnchecked.js","webpack:///../node_modules/@mui/material/internal/svg-icons/RadioButtonChecked.js","webpack:///../node_modules/@mui/material/Radio/RadioButtonIcon.js","webpack:///../node_modules/@mui/material/Radio/radioClasses.js","webpack:///../node_modules/@mui/material/Radio/Radio.js","webpack:///../node_modules/@mui/material/RadioGroup/useRadioGroup.js","webpack:///../node_modules/@mui/material/Stack/Stack.js","webpack:///../node_modules/@mui/material/Switch/switchClasses.js","webpack:///../node_modules/@mui/material/Switch/Switch.js","webpack:///../node_modules/@mui/material/Tab/tabClasses.js","webpack:///../node_modules/@mui/material/Tab/Tab.js","webpack:///../node_modules/@mui/utils/esm/scrollLeft.js","webpack:///../node_modules/@mui/material/internal/animate.js","webpack:///../node_modules/@mui/material/Tabs/ScrollbarSize.js","webpack:///../node_modules/@mui/material/internal/svg-icons/KeyboardArrowLeft.js","webpack:///../node_modules/@mui/material/internal/svg-icons/KeyboardArrowRight.js","webpack:///../node_modules/@mui/material/TabScrollButton/tabScrollButtonClasses.js","webpack:///../node_modules/@mui/material/TabScrollButton/TabScrollButton.js","webpack:///../node_modules/@mui/material/Tabs/tabsClasses.js","webpack:///../node_modules/@mui/material/Tabs/Tabs.js","webpack:///../node_modules/@mui/material/FilledInput/filledInputClasses.js","webpack:///../node_modules/@mui/material/FilledInput/FilledInput.js","webpack:///../node_modules/@mui/material/OutlinedInput/NotchedOutline.js","webpack:///../node_modules/@mui/material/OutlinedInput/outlinedInputClasses.js","webpack:///../node_modules/@mui/material/OutlinedInput/OutlinedInput.js","webpack:///../node_modules/@mui/material/FormHelperText/formHelperTextClasses.js","webpack:///../node_modules/@mui/material/FormHelperText/FormHelperText.js","webpack:///../node_modules/@mui/material/List/ListContext.js","webpack:///../node_modules/@mui/material/List/listClasses.js","webpack:///../node_modules/@mui/material/List/List.js","webpack:///../node_modules/@mui/material/utils/getScrollbarSize.js","webpack:///../node_modules/@mui/material/MenuList/MenuList.js","webpack:///../node_modules/@mui/material/Popover/popoverClasses.js","webpack:///../node_modules/@mui/material/Popover/Popover.js","webpack:///../node_modules/@mui/material/Menu/menuClasses.js","webpack:///../node_modules/@mui/material/Menu/Menu.js","webpack:///../node_modules/@mui/material/Select/selectClasses.js","webpack:///../node_modules/@mui/material/Select/SelectInput.js","webpack:///../node_modules/@mui/material/Select/Select.js","webpack:///../node_modules/@mui/material/TextField/textFieldClasses.js","webpack:///../node_modules/@mui/material/TextField/TextField.js","webpack:///../node_modules/@mui/material/Toolbar/toolbarClasses.js","webpack:///../node_modules/@mui/material/Toolbar/Toolbar.js","webpack:///../node_modules/@mui/material/Typography/typographyClasses.js","webpack:///../node_modules/@mui/material/Typography/Typography.js","webpack:///../node_modules/@mui/material/colors/blue.js","webpack:///../node_modules/@mui/material/colors/common.js","webpack:///../node_modules/@mui/material/colors/green.js","webpack:///../node_modules/@mui/material/colors/grey.js","webpack:///../node_modules/@mui/material/colors/pink.js","webpack:///../node_modules/@mui/material/colors/deepPurple.js","webpack:///../node_modules/@mui/material/colors/indigo.js","webpack:///../node_modules/@mui/material/colors/cyan.js","webpack:///../node_modules/@mui/material/colors/teal.js","webpack:///../node_modules/@mui/material/colors/lightGreen.js","webpack:///../node_modules/@mui/material/colors/lime.js","webpack:///../node_modules/@mui/material/colors/yellow.js","webpack:///../node_modules/@mui/material/colors/amber.js","webpack:///../node_modules/@mui/material/colors/deepOrange.js","webpack:///../node_modules/@mui/material/colors/brown.js","webpack:///../node_modules/@mui/material/colors/blueGrey.js","webpack:///../node_modules/@mui/material/colors/lightBlue.js","webpack:///../node_modules/@mui/material/colors/orange.js","webpack:///../node_modules/@mui/material/colors/purple.js","webpack:///../node_modules/@mui/material/colors/red.js","webpack:///../node_modules/@mui/material/internal/switchBaseClasses.js","webpack:///../node_modules/@mui/material/internal/SwitchBase.js","webpack:///../node_modules/@mui/material/internal/svg-icons/ArrowDropDown.js","webpack:///../node_modules/@mui/material/styles/createPalette.js","webpack:///../node_modules/@mui/material/styles/createTypography.js","webpack:///../node_modules/@mui/material/styles/shadows.js","webpack:///../node_modules/@mui/material/styles/zIndex.js","webpack:///../node_modules/@mui/material/styles/createTheme.js","webpack:///../node_modules/@mui/material/styles/createMixins.js","webpack:///../node_modules/@mui/material/styles/createTransitions.js","webpack:///../node_modules/@mui/material/styles/defaultTheme.js","webpack:///../node_modules/@mui/system/esm/propsToClassKey.js","webpack:///../node_modules/@mui/system/esm/createStyled.js","webpack:///../node_modules/@mui/material/styles/styled.js","webpack:///../node_modules/@mui/material/styles/useTheme.js","webpack:///../node_modules/@mui/material/styles/useThemeProps.js","webpack:///../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","webpack:///../node_modules/@mui/material/transitions/utils.js","webpack:///../node_modules/@mui/material/useMediaQuery/useMediaQuery.js","webpack:///../node_modules/@mui/material/utils/capitalize.js","webpack:///../node_modules/@mui/material/utils/createChainedFunction.js","webpack:///../node_modules/@mui/material/SvgIcon/svgIconClasses.js","webpack:///../node_modules/@mui/material/SvgIcon/SvgIcon.js","webpack:///../node_modules/@mui/material/utils/createSvgIcon.js","webpack:///../node_modules/@mui/material/utils/debounce.js","webpack:///../node_modules/@mui/utils/esm/debounce.js","webpack:///../node_modules/@mui/material/utils/deprecatedPropType.js","webpack:///../node_modules/@mui/utils/esm/deprecatedPropType.js","webpack:///../node_modules/@mui/material/utils/requirePropFactory.js","webpack:///../node_modules/@mui/utils/esm/requirePropFactory.js","webpack:///../node_modules/@mui/material/utils/setRef.js","webpack:///../node_modules/@mui/material/utils/unsupportedProp.js","webpack:///../node_modules/@mui/utils/esm/unsupportedProp.js","webpack:///../node_modules/@mui/material/utils/isMuiElement.js","webpack:///../node_modules/@mui/utils/esm/isMuiElement.js","webpack:///../node_modules/@mui/material/utils/ownerDocument.js","webpack:///../node_modules/@mui/material/utils/ownerWindow.js","webpack:///../node_modules/@mui/material/utils/useControlled.js","webpack:///../node_modules/@mui/utils/esm/useControlled.js","webpack:///../node_modules/@mui/material/utils/useEnhancedEffect.js","webpack:///../node_modules/@mui/material/utils/useEventCallback.js","webpack:///../node_modules/@mui/material/utils/useForkRef.js","webpack:///../node_modules/@mui/material/utils/useId.js","webpack:///../node_modules/@mui/utils/esm/useIsFocusVisible.js","webpack:///../node_modules/@mui/material/utils/useIsFocusVisible.js","webpack:///../node_modules/@mui/private-theming/useTheme/ThemeContext.js","webpack:///../node_modules/@mui/private-theming/useTheme/useTheme.js","webpack:///../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.browser.esm.js","webpack:///../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","webpack:///../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","webpack:///../node_modules/@mui/styled-engine/index.js","webpack:///../node_modules/@mui/private-theming/ThemeProvider/nested.js","webpack:///../node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js","webpack:///../node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js","webpack:///../node_modules/@mui/system/esm/breakpoints.js","webpack:///../node_modules/@mui/system/esm/colorManipulator.js","webpack:///../node_modules/@mui/system/esm/createTheme/createBreakpoints.js","webpack:///../node_modules/@mui/system/esm/createTheme/shape.js","webpack:///../node_modules/@mui/system/esm/createTheme/createTheme.js","webpack:///../node_modules/@mui/system/esm/createTheme/createSpacing.js","webpack:///../node_modules/@mui/system/esm/compose.js","webpack:///../node_modules/@mui/system/esm/borders.js","webpack:///../node_modules/@mui/system/esm/display.js","webpack:///../node_modules/@mui/system/esm/flexbox.js","webpack:///../node_modules/@mui/system/esm/grid.js","webpack:///../node_modules/@mui/system/esm/positions.js","webpack:///../node_modules/@mui/system/esm/palette.js","webpack:///../node_modules/@mui/system/esm/shadows.js","webpack:///../node_modules/@mui/system/esm/sizing.js","webpack:///../node_modules/@mui/system/esm/typography.js","webpack:///../node_modules/@mui/system/esm/getThemeValue.js","webpack:///../node_modules/@mui/system/esm/merge.js","webpack:///../node_modules/@mui/system/esm/spacing.js","webpack:///../node_modules/@mui/system/esm/memoize.js","webpack:///../node_modules/@mui/system/esm/style.js","webpack:///../node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js","webpack:///../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","webpack:///../node_modules/@mui/system/esm/useTheme.js","webpack:///../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","webpack:///../node_modules/@mui/system/esm/useThemeWithoutDefault.js","webpack:///../node_modules/@mui/utils/esm/capitalize.js","webpack:///../node_modules/@mui/utils/esm/createChainedFunction.js","webpack:///../node_modules/@mui/utils/esm/deepmerge.js","webpack:///../node_modules/@mui/utils/esm/formatMuiErrorMessage.js","webpack:///../node_modules/@mui/utils/esm/getScrollbarSize.js","webpack:///../node_modules/@mui/utils/esm/ownerDocument.js","webpack:///../node_modules/@mui/utils/esm/ownerWindow.js","webpack:///../node_modules/@mui/utils/esm/setRef.js","webpack:///../node_modules/@mui/utils/esm/useEnhancedEffect.js","webpack:///../node_modules/@mui/utils/esm/useEventCallback.js","webpack:///../node_modules/@mui/utils/esm/useForkRef.js","webpack:///../node_modules/@mui/utils/esm/useId.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/common.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/coreservices.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/glob.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/hof.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/predicates.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/queue.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/safeConsole.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/strings.js","webpack:///../node_modules/@uirouter/core/lib-esm/common/trace.js","webpack:///../node_modules/@uirouter/core/lib-esm/globals.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js","webpack:///../node_modules/@uirouter/core/lib-esm/params/param.js","webpack:///../node_modules/@uirouter/core/lib-esm/params/paramType.js","webpack:///../node_modules/@uirouter/core/lib-esm/params/paramTypes.js","webpack:///../node_modules/@uirouter/core/lib-esm/params/stateParams.js","webpack:///../node_modules/@uirouter/core/lib-esm/path/pathNode.js","webpack:///../node_modules/@uirouter/core/lib-esm/path/pathUtils.js","webpack:///../node_modules/@uirouter/core/lib-esm/resolve/interface.js","webpack:///../node_modules/@uirouter/core/lib-esm/resolve/resolvable.js","webpack:///../node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js","webpack:///../node_modules/@uirouter/core/lib-esm/router.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/stateBuilder.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/stateMatcher.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/stateObject.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/stateRegistry.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/stateService.js","webpack:///../node_modules/@uirouter/core/lib-esm/state/targetState.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/interface.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/transition.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/transitionHook.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/resolve.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/views.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/url.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js","webpack:///../node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js","webpack:///../node_modules/@uirouter/core/lib-esm/transition/transitionService.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlConfig.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlMatcher.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlRouter.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlRule.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlRules.js","webpack:///../node_modules/@uirouter/core/lib-esm/url/urlService.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/utils.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/plugins.js","webpack:///../node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js","webpack:///../node_modules/@uirouter/core/lib-esm/view/view.js","webpack:///../node_modules/angular-animate/angular-animate.js","webpack:///../node_modules/angular-animate/index.js","webpack:///../node_modules/angular-aria/angular-aria.js","webpack:///../node_modules/angular-aria/index.js","webpack:///../node_modules/angular-material/angular-material.js","webpack:///../node_modules/angular-material/index.js","webpack:///../node_modules/angular-messages/angular-messages.js","webpack:///../node_modules/angular-messages/index.js","webpack:///../node_modules/angular-sanitize/angular-sanitize.js","webpack:///../node_modules/angular-sanitize/index.js","webpack:///../node_modules/angular-ui-router/lib-esm/angular.js","webpack:///../node_modules/angular-ui-router/lib-esm/statebuilders/views.js","webpack:///../node_modules/angular-ui-router/lib-esm/templateFactory.js","webpack:///../node_modules/angular-ui-router/lib-esm/stateProvider.js","webpack:///../node_modules/angular-ui-router/lib-esm/statebuilders/onEnterExitRetain.js","webpack:///../node_modules/angular-ui-router/lib-esm/locationServices.js","webpack:///../node_modules/angular-ui-router/lib-esm/urlRouterProvider.js","webpack:///../node_modules/angular-ui-router/lib-esm/services.js","webpack:///../node_modules/angular-ui-router/lib-esm/directives/stateDirectives.js","webpack:///../node_modules/angular-ui-router/lib-esm/directives/viewDirective.js","webpack:///../node_modules/angular-ui-router/lib-esm/stateFilters.js","webpack:///../node_modules/angular-ui-router/lib-esm/viewScroll.js","webpack:///../node_modules/angular/angular.js","webpack:///../node_modules/angular/index.js","webpack:///../node_modules/axios/index.js","webpack:///../node_modules/axios/lib/adapters/xhr.js","webpack:///../node_modules/axios/lib/axios.js","webpack:///../node_modules/axios/lib/cancel/Cancel.js","webpack:///../node_modules/axios/lib/cancel/CancelToken.js","webpack:///../node_modules/axios/lib/cancel/isCancel.js","webpack:///../node_modules/axios/lib/core/Axios.js","webpack:///../node_modules/axios/lib/core/InterceptorManager.js","webpack:///../node_modules/axios/lib/core/buildFullPath.js","webpack:///../node_modules/axios/lib/core/createError.js","webpack:///../node_modules/axios/lib/core/dispatchRequest.js","webpack:///../node_modules/axios/lib/core/enhanceError.js","webpack:///../node_modules/axios/lib/core/mergeConfig.js","webpack:///../node_modules/axios/lib/core/settle.js","webpack:///../node_modules/axios/lib/core/transformData.js","webpack:///../node_modules/axios/lib/defaults.js","webpack:///../node_modules/axios/lib/env/data.js","webpack:///../node_modules/axios/lib/helpers/bind.js","webpack:///../node_modules/axios/lib/helpers/buildURL.js","webpack:///../node_modules/axios/lib/helpers/combineURLs.js","webpack:///../node_modules/axios/lib/helpers/cookies.js","webpack:///../node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack:///../node_modules/axios/lib/helpers/isAxiosError.js","webpack:///../node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack:///../node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack:///../node_modules/axios/lib/helpers/parseHeaders.js","webpack:///../node_modules/axios/lib/helpers/spread.js","webpack:///../node_modules/axios/lib/helpers/validator.js","webpack:///../node_modules/axios/lib/utils.js","webpack:///../node_modules/clsx/dist/clsx.m.js","webpack:///../node_modules/core-js/internals/a-callable.js","webpack:///../node_modules/core-js/internals/a-constructor.js","webpack:///../node_modules/core-js/internals/a-possible-prototype.js","webpack:///../node_modules/core-js/internals/add-to-unscopables.js","webpack:///../node_modules/core-js/internals/advance-string-index.js","webpack:///../node_modules/core-js/internals/an-instance.js","webpack:///../node_modules/core-js/internals/an-object.js","webpack:///../node_modules/core-js/internals/array-for-each.js","webpack:///../node_modules/core-js/internals/array-from.js","webpack:///../node_modules/core-js/internals/array-includes.js","webpack:///../node_modules/core-js/internals/array-iteration.js","webpack:///../node_modules/core-js/internals/array-method-has-species-support.js","webpack:///../node_modules/core-js/internals/array-method-is-strict.js","webpack:///../node_modules/core-js/internals/array-reduce.js","webpack:///../node_modules/core-js/internals/array-sort.js","webpack:///../node_modules/core-js/internals/array-species-constructor.js","webpack:///../node_modules/core-js/internals/array-species-create.js","webpack:///../node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack:///../node_modules/core-js/internals/check-correctness-of-iteration.js","webpack:///../node_modules/core-js/internals/classof-raw.js","webpack:///../node_modules/core-js/internals/classof.js","webpack:///../node_modules/core-js/internals/copy-constructor-properties.js","webpack:///../node_modules/core-js/internals/correct-prototype-getter.js","webpack:///../node_modules/core-js/internals/create-iterator-constructor.js","webpack:///../node_modules/core-js/internals/create-non-enumerable-property.js","webpack:///../node_modules/core-js/internals/create-property-descriptor.js","webpack:///../node_modules/core-js/internals/create-property.js","webpack:///../node_modules/core-js/internals/define-iterator.js","webpack:///../node_modules/core-js/internals/define-well-known-symbol.js","webpack:///../node_modules/core-js/internals/descriptors.js","webpack:///../node_modules/core-js/internals/document-create-element.js","webpack:///../node_modules/core-js/internals/dom-iterables.js","webpack:///../node_modules/core-js/internals/dom-token-list-prototype.js","webpack:///../node_modules/core-js/internals/engine-ff-version.js","webpack:///../node_modules/core-js/internals/engine-is-browser.js","webpack:///../node_modules/core-js/internals/engine-is-ie-or-edge.js","webpack:///../node_modules/core-js/internals/engine-is-ios-pebble.js","webpack:///../node_modules/core-js/internals/engine-is-ios.js","webpack:///../node_modules/core-js/internals/engine-is-node.js","webpack:///../node_modules/core-js/internals/engine-is-webos-webkit.js","webpack:///../node_modules/core-js/internals/engine-user-agent.js","webpack:///../node_modules/core-js/internals/engine-v8-version.js","webpack:///../node_modules/core-js/internals/engine-webkit-version.js","webpack:///../node_modules/core-js/internals/enum-bug-keys.js","webpack:///../node_modules/core-js/internals/export.js","webpack:///../node_modules/core-js/internals/fails.js","webpack:///../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","webpack:///../node_modules/core-js/internals/flatten-into-array.js","webpack:///../node_modules/core-js/internals/function-bind-context.js","webpack:///../node_modules/core-js/internals/function-name.js","webpack:///../node_modules/core-js/internals/get-built-in.js","webpack:///../node_modules/core-js/internals/get-iterator-method.js","webpack:///../node_modules/core-js/internals/get-iterator.js","webpack:///../node_modules/core-js/internals/get-method.js","webpack:///../node_modules/core-js/internals/get-substitution.js","webpack:///../node_modules/core-js/internals/global.js","webpack:///../node_modules/core-js/internals/has-own-property.js","webpack:///../node_modules/core-js/internals/hidden-keys.js","webpack:///../node_modules/core-js/internals/host-report-errors.js","webpack:///../node_modules/core-js/internals/html.js","webpack:///../node_modules/core-js/internals/ie8-dom-define.js","webpack:///../node_modules/core-js/internals/indexed-object.js","webpack:///../node_modules/core-js/internals/inspect-source.js","webpack:///../node_modules/core-js/internals/internal-state.js","webpack:///../node_modules/core-js/internals/is-array-iterator-method.js","webpack:///../node_modules/core-js/internals/is-array.js","webpack:///../node_modules/core-js/internals/is-callable.js","webpack:///../node_modules/core-js/internals/is-constructor.js","webpack:///../node_modules/core-js/internals/is-forced.js","webpack:///../node_modules/core-js/internals/is-object.js","webpack:///../node_modules/core-js/internals/is-pure.js","webpack:///../node_modules/core-js/internals/is-regexp.js","webpack:///../node_modules/core-js/internals/is-symbol.js","webpack:///../node_modules/core-js/internals/iterate.js","webpack:///../node_modules/core-js/internals/iterator-close.js","webpack:///../node_modules/core-js/internals/iterators-core.js","webpack:///../node_modules/core-js/internals/iterators.js","webpack:///../node_modules/core-js/internals/length-of-array-like.js","webpack:///../node_modules/core-js/internals/microtask.js","webpack:///../node_modules/core-js/internals/native-promise-constructor.js","webpack:///../node_modules/core-js/internals/native-symbol.js","webpack:///../node_modules/core-js/internals/native-weak-map.js","webpack:///../node_modules/core-js/internals/new-promise-capability.js","webpack:///../node_modules/core-js/internals/number-parse-int.js","webpack:///../node_modules/core-js/internals/object-assign.js","webpack:///../node_modules/core-js/internals/object-create.js","webpack:///../node_modules/core-js/internals/object-define-properties.js","webpack:///../node_modules/core-js/internals/object-define-property.js","webpack:///../node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:///../node_modules/core-js/internals/object-get-own-property-names-external.js","webpack:///../node_modules/core-js/internals/object-get-own-property-names.js","webpack:///../node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:///../node_modules/core-js/internals/object-get-prototype-of.js","webpack:///../node_modules/core-js/internals/object-keys-internal.js","webpack:///../node_modules/core-js/internals/object-keys.js","webpack:///../node_modules/core-js/internals/object-property-is-enumerable.js","webpack:///../node_modules/core-js/internals/object-set-prototype-of.js","webpack:///../node_modules/core-js/internals/object-to-string.js","webpack:///../node_modules/core-js/internals/ordinary-to-primitive.js","webpack:///../node_modules/core-js/internals/own-keys.js","webpack:///../node_modules/core-js/internals/path.js","webpack:///../node_modules/core-js/internals/perform.js","webpack:///../node_modules/core-js/internals/promise-resolve.js","webpack:///../node_modules/core-js/internals/redefine-all.js","webpack:///../node_modules/core-js/internals/redefine.js","webpack:///../node_modules/core-js/internals/regexp-exec-abstract.js","webpack:///../node_modules/core-js/internals/regexp-exec.js","webpack:///../node_modules/core-js/internals/regexp-flags.js","webpack:///../node_modules/core-js/internals/regexp-sticky-helpers.js","webpack:///../node_modules/core-js/internals/regexp-unsupported-dot-all.js","webpack:///../node_modules/core-js/internals/regexp-unsupported-ncg.js","webpack:///../node_modules/core-js/internals/require-object-coercible.js","webpack:///../node_modules/core-js/internals/set-global.js","webpack:///../node_modules/core-js/internals/set-species.js","webpack:///../node_modules/core-js/internals/set-to-string-tag.js","webpack:///../node_modules/core-js/internals/shared-key.js","webpack:///../node_modules/core-js/internals/shared-store.js","webpack:///../node_modules/core-js/internals/shared.js","webpack:///../node_modules/core-js/internals/species-constructor.js","webpack:///../node_modules/core-js/internals/string-multibyte.js","webpack:///../node_modules/core-js/internals/string-pad-webkit-bug.js","webpack:///../node_modules/core-js/internals/string-pad.js","webpack:///../node_modules/core-js/internals/string-repeat.js","webpack:///../node_modules/core-js/internals/string-trim-forced.js","webpack:///../node_modules/core-js/internals/string-trim.js","webpack:///../node_modules/core-js/internals/task.js","webpack:///../node_modules/core-js/internals/to-absolute-index.js","webpack:///../node_modules/core-js/internals/to-indexed-object.js","webpack:///../node_modules/core-js/internals/to-integer-or-infinity.js","webpack:///../node_modules/core-js/internals/to-length.js","webpack:///../node_modules/core-js/internals/to-object.js","webpack:///../node_modules/core-js/internals/to-primitive.js","webpack:///../node_modules/core-js/internals/to-property-key.js","webpack:///../node_modules/core-js/internals/to-string-tag-support.js","webpack:///../node_modules/core-js/internals/to-string.js","webpack:///../node_modules/core-js/internals/try-to-string.js","webpack:///../node_modules/core-js/internals/uid.js","webpack:///../node_modules/core-js/internals/use-symbol-as-uid.js","webpack:///../node_modules/core-js/internals/well-known-symbol-wrapped.js","webpack:///../node_modules/core-js/internals/well-known-symbol.js","webpack:///../node_modules/core-js/internals/whitespaces.js","webpack:///../node_modules/core-js/modules/es.array.concat.js","webpack:///../node_modules/core-js/modules/es.array.filter.js","webpack:///../node_modules/core-js/modules/es.array.find-index.js","webpack:///../node_modules/core-js/modules/es.array.find.js","webpack:///../node_modules/core-js/modules/es.array.flat-map.js","webpack:///../node_modules/core-js/modules/es.array.from.js","webpack:///../node_modules/core-js/modules/es.array.index-of.js","webpack:///../node_modules/core-js/modules/es.array.iterator.js","webpack:///../node_modules/core-js/modules/es.array.join.js","webpack:///../node_modules/core-js/modules/es.array.map.js","webpack:///../node_modules/core-js/modules/es.array.reduce.js","webpack:///../node_modules/core-js/modules/es.array.slice.js","webpack:///../node_modules/core-js/modules/es.array.sort.js","webpack:///../node_modules/core-js/modules/es.array.splice.js","webpack:///../node_modules/core-js/modules/es.array.unscopables.flat-map.js","webpack:///../node_modules/core-js/modules/es.function.name.js","webpack:///../node_modules/core-js/modules/es.object.assign.js","webpack:///../node_modules/core-js/modules/es.object.get-own-property-descriptor.js","webpack:///../node_modules/core-js/modules/es.object.get-own-property-descriptors.js","webpack:///../node_modules/core-js/modules/es.object.keys.js","webpack:///../node_modules/core-js/modules/es.object.to-string.js","webpack:///../node_modules/core-js/modules/es.parse-int.js","webpack:///../node_modules/core-js/modules/es.promise.finally.js","webpack:///../node_modules/core-js/modules/es.promise.js","webpack:///../node_modules/core-js/modules/es.regexp.exec.js","webpack:///../node_modules/core-js/modules/es.regexp.to-string.js","webpack:///../node_modules/core-js/modules/es.string.iterator.js","webpack:///../node_modules/core-js/modules/es.string.pad-start.js","webpack:///../node_modules/core-js/modules/es.string.replace.js","webpack:///../node_modules/core-js/modules/es.string.split.js","webpack:///../node_modules/core-js/modules/es.string.trim.js","webpack:///../node_modules/core-js/modules/es.symbol.description.js","webpack:///../node_modules/core-js/modules/es.symbol.iterator.js","webpack:///../node_modules/core-js/modules/es.symbol.js","webpack:///../node_modules/core-js/modules/web.dom-collections.for-each.js","webpack:///../node_modules/core-js/modules/web.dom-collections.iterator.js","webpack:///../node_modules/dayjs/dayjs.min.js","webpack:///../node_modules/dayjs/locale/en-gb.js","webpack:///../node_modules/dayjs/plugin/customParseFormat.js","webpack:///../node_modules/dayjs/plugin/isBetween.js","webpack:///../node_modules/dayjs/plugin/localizedFormat.js","webpack:///../node_modules/dayjs/plugin/timezone.js","webpack:///../node_modules/dayjs/plugin/utc.js","webpack:///../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","webpack:///../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","webpack:///../node_modules/html-loader/dist/runtime/getUrl.js","webpack:///../node_modules/jwt-decode/build/jwt-decode.esm.js","webpack:///../node_modules/object-assign/index.js","webpack:///../node_modules/prop-types/factoryWithThrowingShims.js","webpack:///../node_modules/prop-types/index.js","webpack:///../node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///../node_modules/pusher-angular/lib/pusher-angular.js","webpack:///../node_modules/pusher-js/dist/web/pusher.js","webpack:///../node_modules/react-dom/cjs/react-dom.production.min.js","webpack:///../node_modules/react-dom/index.js","webpack:///../node_modules/react-hook-form/dist/index.esm.js","webpack:///../node_modules/react-is/cjs/react-is.production.min.js","webpack:///../node_modules/react-is/index.js","webpack:///../node_modules/react-query/es/core/focusManager.js","webpack:///../node_modules/react-query/es/core/logger.js","webpack:///../node_modules/react-query/es/core/mutation.js","webpack:///../node_modules/react-query/es/core/notifyManager.js","webpack:///../node_modules/react-query/es/core/onlineManager.js","webpack:///../node_modules/react-query/es/core/query.js","webpack:///../node_modules/react-query/es/core/queryCache.js","webpack:///../node_modules/react-query/es/core/mutationCache.js","webpack:///../node_modules/react-query/es/core/infiniteQueryBehavior.js","webpack:///../node_modules/react-query/es/core/queryClient.js","webpack:///../node_modules/react-query/es/core/retryer.js","webpack:///../node_modules/react-query/es/core/subscribable.js","webpack:///../node_modules/react-query/es/core/utils.js","webpack:///../node_modules/react-query/es/react/reactBatchedUpdates.js","webpack:///../node_modules/react-query/es/react/setBatchUpdatesFn.js","webpack:///../node_modules/react-query/es/react/logger.js","webpack:///../node_modules/react-query/es/react/setLogger.js","webpack:///../node_modules/react-query/es/react/QueryClientProvider.js","webpack:///../node_modules/react-query/es/core/mutationObserver.js","webpack:///../node_modules/react-query/es/react/utils.js","webpack:///../node_modules/react-query/es/react/useMutation.js","webpack:///../node_modules/react-query/es/core/queryObserver.js","webpack:///../node_modules/react-query/es/react/QueryErrorResetBoundary.js","webpack:///../node_modules/react-query/es/react/useQuery.js","webpack:///../node_modules/react-query/es/react/useBaseQuery.js","webpack:///../node_modules/react-transition-group/esm/Transition.js","webpack:///../node_modules/react-transition-group/esm/utils/ChildMapping.js","webpack:///../node_modules/react-transition-group/esm/TransitionGroup.js","webpack:///../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///../node_modules/react-transition-group/esm/TransitionGroupContext.js","webpack:///../node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack:///../node_modules/react/cjs/react.production.min.js","webpack:///../node_modules/react/index.js","webpack:///../node_modules/react/jsx-runtime.js","webpack:///../node_modules/regenerator-runtime/runtime.js","webpack:///../node_modules/scheduler/cjs/scheduler.production.min.js","webpack:///../node_modules/scheduler/index.js","webpack:///../node_modules/immer/dist/immer.esm.js","webpack:///../node_modules/use-immer/dist/use-immer.module.js","webpack:///../node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///../node_modules/lodash-es/_Symbol.js","webpack:///../node_modules/lodash-es/_getRawTag.js","webpack:///../node_modules/lodash-es/_objectToString.js","webpack:///../node_modules/lodash-es/_baseGetTag.js","webpack:///../node_modules/lodash-es/_freeGlobal.js","webpack:///../node_modules/lodash-es/_root.js","webpack:///../node_modules/lodash-es/now.js","webpack:///../node_modules/lodash-es/_trimmedEndIndex.js","webpack:///../node_modules/lodash-es/_baseTrim.js","webpack:///../node_modules/lodash-es/toNumber.js","webpack:///../node_modules/lodash-es/debounce.js","webpack:///../node_modules/lodash-es/isArray.js","webpack:///../node_modules/lodash-es/_isMasked.js","webpack:///../node_modules/lodash-es/_isKey.js","webpack:///../node_modules/lodash-es/_coreJsData.js","webpack:///../node_modules/lodash-es/_toSource.js","webpack:///../node_modules/lodash-es/_baseIsNative.js","webpack:///../node_modules/lodash-es/isFunction.js","webpack:///../node_modules/lodash-es/_getNative.js","webpack:///../node_modules/lodash-es/_getValue.js","webpack:///../node_modules/lodash-es/_nativeCreate.js","webpack:///../node_modules/lodash-es/_hashGet.js","webpack:///../node_modules/lodash-es/_hashHas.js","webpack:///../node_modules/lodash-es/_Hash.js","webpack:///../node_modules/lodash-es/_hashClear.js","webpack:///../node_modules/lodash-es/_hashDelete.js","webpack:///../node_modules/lodash-es/_hashSet.js","webpack:///../node_modules/lodash-es/_assocIndexOf.js","webpack:///../node_modules/lodash-es/eq.js","webpack:///../node_modules/lodash-es/_listCacheDelete.js","webpack:///../node_modules/lodash-es/_ListCache.js","webpack:///../node_modules/lodash-es/_listCacheClear.js","webpack:///../node_modules/lodash-es/_listCacheGet.js","webpack:///../node_modules/lodash-es/_listCacheHas.js","webpack:///../node_modules/lodash-es/_listCacheSet.js","webpack:///../node_modules/lodash-es/_Map.js","webpack:///../node_modules/lodash-es/_getMapData.js","webpack:///../node_modules/lodash-es/_isKeyable.js","webpack:///../node_modules/lodash-es/_MapCache.js","webpack:///../node_modules/lodash-es/_mapCacheClear.js","webpack:///../node_modules/lodash-es/_mapCacheDelete.js","webpack:///../node_modules/lodash-es/_mapCacheGet.js","webpack:///../node_modules/lodash-es/_mapCacheHas.js","webpack:///../node_modules/lodash-es/_mapCacheSet.js","webpack:///../node_modules/lodash-es/memoize.js","webpack:///../node_modules/lodash-es/_memoizeCapped.js","webpack:///../node_modules/lodash-es/_stringToPath.js","webpack:///../node_modules/lodash-es/_baseToString.js","webpack:///../node_modules/lodash-es/_arrayMap.js","webpack:///../node_modules/lodash-es/_castPath.js","webpack:///../node_modules/lodash-es/toString.js","webpack:///../node_modules/lodash-es/_toKey.js","webpack:///../node_modules/lodash-es/get.js","webpack:///../node_modules/lodash-es/_baseGet.js","webpack:///../node_modules/lodash-es/isObject.js","webpack:///../node_modules/lodash-es/isSymbol.js","webpack:///../node_modules/lodash-es/isObjectLike.js"],"sourcesContent":["function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import defaultDayjs from 'dayjs';\nimport customParseFormatPlugin from 'dayjs/plugin/customParseFormat';\nimport localizedFormatPlugin from 'dayjs/plugin/localizedFormat';\nimport isBetweenPlugin from 'dayjs/plugin/isBetween';\n\ndefaultDayjs.extend(customParseFormatPlugin);\ndefaultDayjs.extend(localizedFormatPlugin);\ndefaultDayjs.extend(isBetweenPlugin);\nvar withLocale = function (dayjs, locale) { return (!locale ? dayjs : function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return dayjs.apply(void 0, args).locale(locale);\n}); };\nvar defaultFormats = {\n normalDateWithWeekday: \"ddd, MMM D\",\n normalDate: \"D MMMM\",\n shortDate: \"MMM D\",\n monthAndDate: \"MMMM D\",\n dayOfMonth: \"D\",\n year: \"YYYY\",\n month: \"MMMM\",\n monthShort: \"MMM\",\n monthAndYear: \"MMMM YYYY\",\n weekday: \"dddd\",\n weekdayShort: \"ddd\",\n minutes: \"mm\",\n hours12h: \"hh\",\n hours24h: \"HH\",\n seconds: \"ss\",\n fullTime: \"LT\",\n fullTime12h: \"hh:mm A\",\n fullTime24h: \"HH:mm\",\n fullDate: \"ll\",\n fullDateWithWeekday: \"dddd, LL\",\n fullDateTime: \"lll\",\n fullDateTime12h: \"ll hh:mm A\",\n fullDateTime24h: \"ll HH:mm\",\n keyboardDate: \"L\",\n keyboardDateTime: \"L LT\",\n keyboardDateTime12h: \"L hh:mm A\",\n keyboardDateTime24h: \"L HH:mm\",\n};\nvar DayjsUtils = /** @class */ (function () {\n function DayjsUtils(_a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, locale = _b.locale, formats = _b.formats, instance = _b.instance;\n this.lib = \"dayjs\";\n this.is12HourCycleInCurrentLocale = function () {\n var _a, _b;\n /* istanbul ignore next */\n return /A|a/.test((_b = (_a = _this.rawDayJsInstance.Ls[_this.locale || \"en\"]) === null || _a === void 0 ? void 0 : _a.formats) === null || _b === void 0 ? void 0 : _b.LT);\n };\n this.getCurrentLocaleCode = function () {\n return _this.locale || \"en\";\n };\n this.getFormatHelperText = function (format) {\n // @see https://github.com/iamkun/dayjs/blob/dev/src/plugin/localizedFormat/index.js\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?)|./g;\n return format\n .match(localFormattingTokens)\n .map(function (token) {\n var _a, _b;\n var firstCharacter = token[0];\n if (firstCharacter === \"L\") {\n /* istanbul ignore next */\n return (_b = (_a = _this.rawDayJsInstance.Ls[_this.locale || \"en\"]) === null || _a === void 0 ? void 0 : _a.formats[token]) !== null && _b !== void 0 ? _b : token;\n }\n return token;\n })\n .join(\"\")\n .replace(/a/gi, \"(a|p)m\")\n .toLocaleLowerCase();\n };\n this.parseISO = function (isoString) {\n return _this.dayjs(isoString);\n };\n this.toISO = function (value) {\n return value.toISOString();\n };\n this.parse = function (value, format) {\n if (value === \"\") {\n return null;\n }\n return _this.dayjs(value, format, _this.locale);\n };\n this.date = function (value) {\n if (value === null) {\n return null;\n }\n return _this.dayjs(value);\n };\n this.toJsDate = function (value) {\n return value.toDate();\n };\n this.isValid = function (value) {\n return _this.dayjs(value).isValid();\n };\n this.isNull = function (date) {\n return date === null;\n };\n this.getDiff = function (date, comparing, units) {\n return date.diff(comparing, units);\n };\n this.isAfter = function (date, value) {\n return date.isAfter(value);\n };\n this.isBefore = function (date, value) {\n return date.isBefore(value);\n };\n this.isAfterDay = function (date, value) {\n return date.isAfter(value, \"day\");\n };\n this.isBeforeDay = function (date, value) {\n return date.isBefore(value, \"day\");\n };\n this.isBeforeYear = function (date, value) {\n return date.isBefore(value, \"year\");\n };\n this.isAfterYear = function (date, value) {\n return date.isAfter(value, \"year\");\n };\n this.startOfDay = function (date) {\n return date.clone().startOf(\"day\");\n };\n this.endOfDay = function (date) {\n return date.clone().endOf(\"day\");\n };\n this.format = function (date, formatKey) {\n return _this.formatByString(date, _this.formats[formatKey]);\n };\n this.formatByString = function (date, formatString) {\n return _this.dayjs(date).format(formatString);\n };\n this.formatNumber = function (numberToFormat) {\n return numberToFormat;\n };\n this.getHours = function (date) {\n return date.hour();\n };\n this.addSeconds = function (date, count) {\n return count < 0\n ? date.subtract(Math.abs(count), \"second\")\n : date.add(count, \"second\");\n };\n this.addMinutes = function (date, count) {\n return count < 0\n ? date.subtract(Math.abs(count), \"minute\")\n : date.add(count, \"minute\");\n };\n this.addHours = function (date, count) {\n return count < 0\n ? date.subtract(Math.abs(count), \"hour\")\n : date.add(count, \"hour\");\n };\n this.addDays = function (date, count) {\n return count < 0\n ? date.subtract(Math.abs(count), \"day\")\n : date.add(count, \"day\");\n };\n this.addWeeks = function (date, count) {\n return count < 0\n ? date.subtract(Math.abs(count), \"week\")\n : date.add(count, \"week\");\n };\n this.addMonths = function (date, count) {\n return count < 0\n ? date.subtract(Math.abs(count), \"month\")\n : date.add(count, \"month\");\n };\n this.setMonth = function (date, count) {\n return date.set(\"month\", count);\n };\n this.setHours = function (date, count) {\n return date.set(\"hour\", count);\n };\n this.getMinutes = function (date) {\n return date.minute();\n };\n this.setMinutes = function (date, count) {\n return date.clone().set(\"minute\", count);\n };\n this.getSeconds = function (date) {\n return date.second();\n };\n this.setSeconds = function (date, count) {\n return date.clone().set(\"second\", count);\n };\n this.getMonth = function (date) {\n return date.month();\n };\n this.getDaysInMonth = function (date) {\n return date.daysInMonth();\n };\n this.isSameDay = function (date, comparing) {\n return date.isSame(comparing, \"day\");\n };\n this.isSameMonth = function (date, comparing) {\n return date.isSame(comparing, \"month\");\n };\n this.isSameYear = function (date, comparing) {\n return date.isSame(comparing, \"year\");\n };\n this.isSameHour = function (date, comparing) {\n return date.isSame(comparing, \"hour\");\n };\n this.getMeridiemText = function (ampm) {\n return ampm === \"am\" ? \"AM\" : \"PM\";\n };\n this.startOfMonth = function (date) {\n return date.clone().startOf(\"month\");\n };\n this.endOfMonth = function (date) {\n return date.clone().endOf(\"month\");\n };\n this.startOfWeek = function (date) {\n return date.clone().startOf(\"week\");\n };\n this.endOfWeek = function (date) {\n return date.clone().endOf(\"week\");\n };\n this.getNextMonth = function (date) {\n return date.clone().add(1, \"month\");\n };\n this.getPreviousMonth = function (date) {\n return date.clone().subtract(1, \"month\");\n };\n this.getMonthArray = function (date) {\n var firstMonth = date.clone().startOf(\"year\");\n var monthArray = [firstMonth];\n while (monthArray.length < 12) {\n var prevMonth = monthArray[monthArray.length - 1];\n monthArray.push(_this.getNextMonth(prevMonth));\n }\n return monthArray;\n };\n this.getYear = function (date) {\n return date.year();\n };\n this.setYear = function (date, year) {\n return date.clone().set(\"year\", year);\n };\n this.mergeDateAndTime = function (date, time) {\n return date.hour(time.hour()).minute(time.minute()).second(time.second());\n };\n this.getWeekdays = function () {\n var start = _this.dayjs().startOf(\"week\");\n return [0, 1, 2, 3, 4, 5, 6].map(function (diff) {\n return _this.formatByString(start.add(diff, \"day\"), \"dd\");\n });\n };\n this.isEqual = function (value, comparing) {\n if (value === null && comparing === null) {\n return true;\n }\n return _this.dayjs(value).isSame(comparing);\n };\n this.getWeekArray = function (date) {\n var start = _this.dayjs(date).clone().startOf(\"month\").startOf(\"week\");\n var end = _this.dayjs(date).clone().endOf(\"month\").endOf(\"week\");\n var count = 0;\n var current = start;\n var nestedWeeks = [];\n while (current.isBefore(end)) {\n var weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = current.clone().add(1, \"day\");\n count += 1;\n }\n return nestedWeeks;\n };\n this.getYearRange = function (start, end) {\n var startDate = _this.dayjs(start).startOf(\"year\");\n var endDate = _this.dayjs(end).endOf(\"year\");\n var years = [];\n var current = startDate;\n while (current.isBefore(endDate)) {\n years.push(current);\n current = current.clone().add(1, \"year\");\n }\n return years;\n };\n this.isWithinRange = function (date, _a) {\n var start = _a[0], end = _a[1];\n return date.isBetween(start, end, null, \"[]\");\n };\n this.rawDayJsInstance = instance || defaultDayjs;\n this.dayjs = withLocale(this.rawDayJsInstance, locale);\n this.locale = locale;\n this.formats = Object.assign({}, defaultFormats, formats);\n }\n return DayjsUtils;\n}());\n\nexport default DayjsUtils;\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3)\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} value\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string} type\n * @param {string[]} props\n * @param {object[]} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {string} type\n */\nexport function copy (value, root, type) {\n\treturn node(value, root.root, root.parent, type, root.props, root.children, 0)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\treturn delimiter(type === 34 || type === 39 ? type : character)\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\n","import {IMPORT, COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {string}\n */\nexport function prefix (value, length) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// flex, flex-direction\n\t\tcase 6828: case 4268:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// (s)ticky?\n\t\t\tif (charat(value, length + 1) !== 115)\n\t\t\t\tbreak\n\t\t// display: (flex|inline-flex)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n\t\t\t\t// stic(k)y\n\t\t\t\tcase 107:\n\t\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\t\t// (inline-)?fl(e)x\n\t\t\t\tcase 101:\n\t\t\t\t\treturn replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t}\n\t\t\tbreak\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t}\n\n\t\t\treturn WEBKIT + value + MS + value + value\n\t}\n\n\treturn value\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, trim, from, sizeof, strlen, substr, append, replace} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// \" ' [ (\n\t\t\tcase 34: case 39: case 91: case 40:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset:\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule) {\n\t\t\t\t\t\t\t\t\t// d m s\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, length, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, identifier, position, stringify, COMMENT, rulesheet, middleware, prefixer, serialize, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar last = function last(arr) {\n return arr.length ? arr[arr.length - 1] : null;\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifier(position - 1);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // .length indicates if this rule contains pseudo or not\n !element.length) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return !!element && element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule') return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses && cache.compat !== true) {\n var prevElement = index > 0 ? children[index - 1] : null;\n\n if (prevElement && isIgnoringComment(last(prevElement.children))) {\n return;\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if ( key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {}; // $FlowFixMe\n\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport default createCache;\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (!element.return)\n\t\tswitch (element.type) {\n\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length)\n\t\t\t\tbreak\n\t\t\tcase KEYFRAMES:\n\t\t\t\treturn serialize([copy(replace(element.value, '@', '@' + WEBKIT), element, '')], callback)\n\t\t\tcase RULESET:\n\t\t\t\tif (element.length)\n\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\treturn serialize([copy(replace(value, /:(read-\\w+)/, ':' + MOZ + '$1'), element, '')], callback)\n\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\tcopy(replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1'), element, ''),\n\t\t\t\t\t\t\t\t\tcopy(replace(value, /:(plac\\w+)/, ':' + MOZ + '$1'), element, ''),\n\t\t\t\t\t\t\t\t\tcopy(replace(value, /:(plac\\w+)/, MS + 'input-$1'), element, '')\n\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn ''\n\t\t\t\t\t})\n\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import { createContext, useContext, forwardRef, createElement } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = useContext(ThemeContext);\n return /*#__PURE__*/createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n\n return ele;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, useTheme as u, withEmotionCache as w };\n","import { createElement, useContext, useRef, useLayoutEffect } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-99289b21.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-99289b21.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport 'hoist-non-react-statics';\nimport '../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.4.1\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.cjs.js\": \"./dist/emotion-react.browser.cjs.js\",\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"isolated-hoist-non-react-statics-do-not-use-this-in-your-code\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.js\",\n\t\t\"macro.d.ts\",\n\t\t\"macro.js.flow\"\n\t],\n\tsideEffects: false,\n\tauthor: \"mitchellhamilton <mitchell@mitchellhamilton.me>\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.13.10\",\n\t\t\"@emotion/cache\": \"^11.4.0\",\n\t\t\"@emotion/serialize\": \"^1.0.2\",\n\t\t\"@emotion/sheet\": \"^1.0.2\",\n\t\t\"@emotion/utils\": \"^1.0.0\",\n\t\t\"@emotion/weak-memoize\": \"^0.2.5\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\t\"@babel/core\": \"^7.0.0\",\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@babel/core\": {\n\t\t\toptional: true\n\t\t},\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@babel/core\": \"^7.13.10\",\n\t\t\"@emotion/css\": \"11.1.3\",\n\t\t\"@emotion/css-prettifier\": \"1.0.0\",\n\t\t\"@emotion/server\": \"11.4.0\",\n\t\t\"@emotion/styled\": \"11.3.0\",\n\t\t\"@types/react\": \"^16.9.11\",\n\t\tdtslint: \"^0.3.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./isolated-hoist-non-react-statics-do-not-use-this-in-your-code.js\"\n\t\t],\n\t\tumdName: \"emotionReact\"\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = useRef();\n useLayoutEffect(function () {\n var key = cache.key + \"-global\";\n var sheet = new StyleSheet({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useLayoutEffect(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n\n {\n insertStyles(cache, serialized, false);\n }\n\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n\n return ele;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock\n\n var isJest = typeof jest !== 'undefined';\n\n if (isBrowser && !isJest) {\n var globalContext = isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","/*\n\nBased off glamor's StyleSheet, thanks Sunil â¤ï¸\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n before = _this.prepend ? _this.container.firstChild : _this.before;\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n var maybeStyles = cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles };\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';\n\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n */\n\n\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, ref) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, ref);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(ref, mountNode);\n return () => {\n setRef(ref, null);\n };\n }\n\n return undefined;\n }, [ref, mountNode, disablePortal]);\n\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n return /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef\n });\n }\n\n return children;\n }\n\n return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\n\nexport default Portal;","/* eslint-disable @typescript-eslint/naming-convention, consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils'; // Inspired by https://github.com/focus-trap/tabbable\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\n\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);\n\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n } // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n\n\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n\n return node.tabIndex;\n}\n\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n\n if (!node.name) {\n return false;\n }\n\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n\n return roving !== node;\n}\n\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n\n return true;\n}\n\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\n\nfunction defaultIsEnabled() {\n return true;\n}\n/**\n * Utility component that locks focus inside the component.\n */\n\n\nfunction Unstable_TrapFocus(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef();\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null); // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n const handleRef = useForkRef(children.ref, rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n\n const doc = ownerDocument(rootRef.current);\n\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n }; // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open TrapFocus\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n\n const doc = ownerDocument(rootRef.current);\n\n const contain = nativeEvent => {\n const {\n current: rootElement\n } = rootRef; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (!rootElement.contains(doc.activeElement)) {\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (nativeEvent && reactFocusEventTarget.current !== nativeEvent.target || doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n\n if (!activated.current) {\n return;\n }\n\n let tabbable = [];\n\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n if (tabbable.length > 0) {\n var _lastKeydown$current, _lastKeydown$current2;\n\n const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n } else {\n rootElement.focus();\n }\n }\n };\n\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n } // Make sure the next tab starts from the right place.\n // doc.activeElement referes to the origin.\n\n\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n sentinelEnd.current.focus();\n }\n };\n\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n const interval = setInterval(() => {\n if (doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n\n activated.current = true;\n };\n\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: 0,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: 0,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n })]\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Unstable_TrapFocus.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n\n /**\n * If `true`, the trap focus will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any trap focus children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the trap focus less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n\n /**\n * If `true`, the trap focus will not prevent focus from leaving the trap focus while open.\n *\n * Generally this should never be set to `true` as it makes the trap focus less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n\n /**\n * If `true`, the trap focus will not restore focus to previously focused element once\n * trap focus is hidden.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple trap focus mounted at the same time.\n * @default function defaultIsEnabled() {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Unstable_TrapFocus['propTypes' + ''] = exactProp(Unstable_TrapFocus.propTypes);\n}\n\nexport default Unstable_TrapFocus;","export default function composeClasses(slots, getUtilityClass, classes) {\n const output = {};\n Object.keys(slots).forEach( // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n\n acc.push(getUtilityClass(key));\n }\n\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const globalStateClassesMapping = {\n active: 'Mui-active',\n checked: 'Mui-checked',\n completed: 'Mui-completed',\n disabled: 'Mui-disabled',\n error: 'Mui-error',\n expanded: 'Mui-expanded',\n focused: 'Mui-focused',\n focusVisible: 'Mui-focusVisible',\n required: 'Mui-required',\n selected: 'Mui-selected'\n};\nexport default function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClassesMapping[slot];\n return globalStateClass || `${componentName}-${slot}`;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\n\nexport default isHostComponent;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z\"\n}), 'CloudUpload');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm2 16H5V5h11.17L19 7.83V19zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zM6 6h9v4H6z\"\n}), 'SaveOutlined');\n\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\n\nvar _utils = require(\"@mui/material/utils\");","import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nimport * as React from 'react';\nimport { MuiPickersAdapterContext } from '../../../LocalizationProvider'; // Required for babel https://github.com/vercel/next.js/issues/7882. Replace with `export type` in future\n\nfunction useLocalizationContext() {\n const localization = React.useContext(MuiPickersAdapterContext);\n\n if (localization === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.` : _formatMuiErrorMessage(13));\n }\n\n return localization;\n}\n\nexport function useUtils() {\n return useLocalizationContext().utils;\n}\nexport function useDefaultDates() {\n return useLocalizationContext().defaultDates;\n}\nexport function useNow() {\n const utils = useUtils();\n const now = React.useRef(utils.date());\n return now.current;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"openTo\", \"views\", \"minDate\", \"maxDate\"];\nimport { useThemeProps } from '@mui/material/styles';\nimport { useDefaultDates, useUtils } from '../internal/pickers/hooks/useUtils';\nexport const isYearOnlyView = views => views.length === 1 && views[0] === 'year';\nexport const isYearAndMonthViews = views => views.length === 2 && views.indexOf('month') !== -1 && views.indexOf('year') !== -1;\n\nconst getFormatAndMaskByViews = (views, utils) => {\n if (isYearOnlyView(views)) {\n return {\n mask: '____',\n inputFormat: utils.formats.year\n };\n }\n\n if (isYearAndMonthViews(views)) {\n return {\n disableMaskedInput: true,\n inputFormat: utils.formats.monthAndYear\n };\n }\n\n return {\n mask: '__/__/____',\n inputFormat: utils.formats.keyboardDate\n };\n};\n\nexport function useDatePickerDefaultizedProps(_ref, name) {\n let {\n openTo = 'day',\n views = ['year', 'day'],\n minDate: minDateProp,\n maxDate: maxDateProp\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const minDate = minDateProp != null ? minDateProp : defaultDates.minDate;\n const maxDate = maxDateProp != null ? maxDateProp : defaultDates.maxDate; // This is technically unsound if the type parameters appear in optional props.\n // Optional props can be filled by `useThemeProps` with types that don't match the type parameters.\n\n return useThemeProps({\n props: _extends({\n views,\n openTo,\n minDate,\n maxDate\n }, getFormatAndMaskByViews(views, utils), other),\n name\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _ClockIcon, _CalendarIcon, _PenIcon;\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport IconButton from '@mui/material/IconButton';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/core';\nimport PenIcon from '../svg-icons/Pen';\nimport CalendarIcon from '../svg-icons/Calendar';\nimport ClockIcon from '../svg-icons/Clock';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst classes = generateUtilityClasses('PrivatePickersToolbar', ['root', 'dateTitleContainer']);\nconst PickersToolbarRoot = styled('div', {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n padding: theme.spacing(2, 3)\n}, ownerState.isLandscape && {\n height: 'auto',\n maxWidth: 160,\n padding: 16,\n justifyContent: 'flex-start',\n flexWrap: 'wrap'\n}));\nconst PickersToolbarGrid = styled(Grid, {\n skipSx: true\n})({\n flex: 1\n});\n\nconst getViewTypeIcon = viewType => viewType === 'clock' ? _ClockIcon || (_ClockIcon = /*#__PURE__*/_jsx(ClockIcon, {\n color: \"inherit\"\n})) : _CalendarIcon || (_CalendarIcon = /*#__PURE__*/_jsx(CalendarIcon, {\n color: \"inherit\"\n}));\n\nfunction defaultGetKeyboardInputSwitchingButtonText(isKeyboardInputOpen, viewType) {\n return isKeyboardInputOpen ? `text input view is open, go to ${viewType} view` : `${viewType} view is open, go to text input view`;\n}\n\nconst PickersToolbar = /*#__PURE__*/React.forwardRef(function PickersToolbar(props, ref) {\n const {\n children,\n className,\n getMobileKeyboardInputViewButtonText = defaultGetKeyboardInputSwitchingButtonText,\n isLandscape,\n isMobileKeyboardViewOpen,\n landscapeDirection = 'column',\n penIconClassName,\n toggleMobileKeyboardView,\n toolbarTitle,\n viewType = 'calendar'\n } = props;\n const ownerState = props;\n return /*#__PURE__*/_jsxs(PickersToolbarRoot, {\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(Typography, {\n color: \"text.secondary\",\n variant: \"overline\",\n children: toolbarTitle\n }), /*#__PURE__*/_jsxs(PickersToolbarGrid, {\n container: true,\n justifyContent: \"space-between\",\n className: classes.dateTitleContainer,\n direction: isLandscape ? landscapeDirection : 'row',\n alignItems: isLandscape ? 'flex-start' : 'flex-end',\n children: [children, /*#__PURE__*/_jsx(IconButton, {\n onClick: toggleMobileKeyboardView,\n className: penIconClassName,\n color: \"inherit\",\n \"aria-label\": getMobileKeyboardInputViewButtonText(isMobileKeyboardViewOpen, viewType),\n children: isMobileKeyboardViewOpen ? getViewTypeIcon(viewType) : _PenIcon || (_PenIcon = /*#__PURE__*/_jsx(PenIcon, {\n color: \"inherit\"\n }))\n })]\n })]\n });\n});\nexport default PickersToolbar;","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"\n}), 'Pen');","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z\"\n}), 'Calendar');","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Clock');","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"date\", \"isLandscape\", \"isMobileKeyboardViewOpen\", \"onChange\", \"toggleMobileKeyboardView\", \"toolbarFormat\", \"toolbarPlaceholder\", \"toolbarTitle\", \"views\"];\nimport * as React from 'react';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/core';\nimport PickersToolbar from '../internal/pickers/PickersToolbar';\nimport { useUtils } from '../internal/pickers/hooks/useUtils';\nimport { isYearAndMonthViews, isYearOnlyView } from './shared';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst classes = generateUtilityClasses('PrivateDatePickerToolbar', ['penIcon']);\nconst DatePickerToolbarRoot = styled(PickersToolbar, {\n skipSx: true\n})({\n [`& .${classes.penIcon}`]: {\n position: 'relative',\n top: 4\n }\n});\nconst DatePickerToolbarTitle = styled(Typography, {\n skipSx: true\n})(({\n ownerState\n}) => _extends({}, ownerState.isLandscape && {\n margin: 'auto 16px auto auto'\n}));\n/**\n * @ignore - internal component.\n */\n\nconst DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(props, ref) {\n const {\n date,\n isLandscape,\n isMobileKeyboardViewOpen,\n toggleMobileKeyboardView,\n toolbarFormat,\n toolbarPlaceholder = '––',\n toolbarTitle = 'Select date',\n views\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const utils = useUtils();\n const dateText = React.useMemo(() => {\n if (!date) {\n return toolbarPlaceholder;\n }\n\n if (toolbarFormat) {\n return utils.formatByString(date, toolbarFormat);\n }\n\n if (isYearOnlyView(views)) {\n return utils.format(date, 'year');\n }\n\n if (isYearAndMonthViews(views)) {\n return utils.format(date, 'month');\n } // Little localization hack (Google is doing the same for android native pickers):\n // For english localization it is convenient to include weekday into the date \"Mon, Jun 1\".\n // For other locales using strings like \"June 1\", without weekday.\n\n\n return /en/.test(utils.getCurrentLocaleCode()) ? utils.format(date, 'normalDateWithWeekday') : utils.format(date, 'normalDate');\n }, [date, toolbarFormat, toolbarPlaceholder, utils, views]);\n const ownerState = props;\n return /*#__PURE__*/_jsx(DatePickerToolbarRoot, _extends({\n ref: ref,\n toolbarTitle: toolbarTitle,\n isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,\n toggleMobileKeyboardView: toggleMobileKeyboardView,\n isLandscape: isLandscape,\n penIconClassName: classes.penIcon,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(DatePickerToolbarTitle, {\n variant: \"h4\",\n align: isLandscape ? 'left' : 'center',\n ownerState: ownerState,\n children: dateText\n })\n }));\n});\nexport default DatePickerToolbar;","import * as React from 'react';\n\n/**\n * TODO consider getting rid from wrapper variant\n * @ignore - internal component.\n */\nexport const WrapperVariantContext = /*#__PURE__*/React.createContext(null);\n/**\n * @ignore - internal component.\n */\n\nexport const IsStaticVariantContext = /*#__PURE__*/React.createContext(false);","// import { isHTMLElement } from './instanceOf';\nexport default function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars\nincludeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1; // FIXME:\n // `offsetWidth` returns an integer while `getBoundingClientRect`\n // returns a float. This results in `scaleX` or `scaleY` being\n // non-1 when it should be for elements that aren't a full pixel in\n // width or height.\n // if (isHTMLElement(element) && includeScale) {\n // const offsetHeight = element.offsetHeight;\n // const offsetWidth = element.offsetWidth;\n // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // // Fallback to 1 in case both values are `0`\n // if (offsetWidth > 0) {\n // scaleX = rect.width / offsetWidth || 1;\n // }\n // if (offsetHeight > 0) {\n // scaleY = rect.height / offsetHeight || 1;\n // }\n // }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = rect.width / element.offsetWidth || 1;\n var scaleY = rect.height / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport default function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { max as mathMax, min as mathMin } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"children\", \"disablePortal\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"TransitionProps\"],\n _excluded2 = [\"anchorEl\", \"children\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"style\", \"transition\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { createPopper } from '@popperjs/core';\nimport { chainPropTypes, refType, HTMLElementType } from '@mui/utils';\nimport { useThemeWithoutDefault as useTheme } from '@mui/system';\nimport Portal from '../Portal';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction flipPlacement(placement, theme) {\n const direction = theme && theme.direction || 'ltr';\n\n if (direction === 'ltr') {\n return placement;\n }\n\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n\n case 'bottom-start':\n return 'bottom-end';\n\n case 'top-end':\n return 'top-start';\n\n case 'top-start':\n return 'top-end';\n\n default:\n return placement;\n }\n}\n\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nconst defaultPopperOptions = {};\n/* eslint-disable react/prop-types */\n\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, ref) {\n const {\n anchorEl,\n children,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n TransitionProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, ref);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const theme = useTheme();\n const rtlPlacement = flipPlacement(initialPlacement, theme);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n\n const [placement, setPlacement] = React.useState(rtlPlacement);\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n useEnhancedEffect(() => {\n if (!anchorEl || !open) {\n return undefined;\n }\n\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n\n const popper = createPopper(resolveAnchorEl(anchorEl), tooltipRef.current, _extends({\n placement: rtlPlacement\n }, popperOptions, {\n modifiers: popperModifiers\n }));\n handlePopperRefRef.current(popper);\n return () => {\n popper.destroy();\n handlePopperRefRef.current(null);\n };\n }, [anchorEl, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement\n };\n\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: ownRef,\n role: \"tooltip\"\n }, other, {\n children: typeof children === 'function' ? children(childProps) : children\n }));\n});\n/* eslint-enable react/prop-types */\n\n/**\n * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v2/) for positioning.\n */\n\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, ref) {\n const {\n anchorEl,\n children,\n container: containerProp,\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n\n const [exited, setExited] = React.useState(true);\n\n const handleEnter = () => {\n setExited(false);\n };\n\n const handleExited = () => {\n setExited(true);\n };\n\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n } // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n\n\n const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, _extends({\n anchorEl: anchorEl,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: ref,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef\n }, other, {\n style: _extends({\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display: !open && keepMounted && !transition ? 'none' : null\n }, style),\n TransitionProps: transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : null,\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n\n return null;\n }),\n\n /**\n * Popper render function or node.\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any.isRequired,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"onClick\", \"onTouchStart\"];\nimport * as React from 'react';\nimport Grow from '@mui/material/Grow';\nimport Paper from '@mui/material/Paper';\nimport Popper from '@mui/material/Popper';\nimport TrapFocus from '@mui/material/Unstable_TrapFocus';\nimport { useForkRef, useEventCallback, ownerDocument } from '@mui/material/utils';\nimport { styled } from '@mui/material/styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PickersPopperRoot = styled(Popper, {\n skipSx: true\n})(({\n theme\n}) => ({\n zIndex: theme.zIndex.modal\n}));\nconst PickersPopperPaper = styled(Paper, {\n skipSx: true\n})(({\n ownerState\n}) => _extends({\n transformOrigin: 'top center',\n outline: 0\n}, ownerState.placement === 'top' && {\n transformOrigin: 'bottom center'\n}));\n\nfunction clickedRootScrollbar(event, doc) {\n return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;\n}\n/**\n * Based on @mui/material/ClickAwayListener without the customization.\n * We can probably strip away even more since children won't be portaled.\n * @param onClickAway\n * @param onClick\n * @param onTouchStart\n */\n\n\nfunction useClickAwayListener(active, onClickAway) {\n const movedRef = React.useRef(false);\n const syntheticEventRef = React.useRef(false);\n const nodeRef = React.useRef(null);\n const activatedRef = React.useRef(false);\n React.useEffect(() => {\n if (!active) {\n return undefined;\n } // Ensure that this hook is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n\n\n function armClickAwayListener() {\n activatedRef.current = true;\n }\n\n document.addEventListener('mousedown', armClickAwayListener, true);\n document.addEventListener('touchstart', armClickAwayListener, true);\n return () => {\n document.removeEventListener('mousedown', armClickAwayListener, true);\n document.removeEventListener('touchstart', armClickAwayListener, true);\n activatedRef.current = false;\n };\n }, [active]); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n const handleClickAway = useEventCallback(event => {\n if (!activatedRef.current) {\n return;\n } // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n\n\n const insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false;\n const doc = ownerDocument(nodeRef.current); // 1. IE11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!nodeRef.current || // is a TouchEvent?\n 'clientX' in event && clickedRootScrollbar(event, doc)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n let insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && !insideReactTree) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n const handleSynthetic = () => {\n syntheticEventRef.current = true;\n };\n\n React.useEffect(() => {\n if (active) {\n const doc = ownerDocument(nodeRef.current);\n\n const handleTouchMove = () => {\n movedRef.current = true;\n };\n\n doc.addEventListener('touchstart', handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return () => {\n doc.removeEventListener('touchstart', handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [active, handleClickAway]);\n React.useEffect(() => {\n // TODO This behavior is not tested automatically\n // It's unclear whether this is due to different update semantics in test (batched in act() vs discrete on click).\n // Or if this is a timing related issues due to different Transition components\n // Once we get rid of all the manual scheduling (e.g. setTimeout(update, 0)) we can revisit this code+test.\n if (active) {\n const doc = ownerDocument(nodeRef.current);\n doc.addEventListener('click', handleClickAway);\n return () => {\n doc.removeEventListener('click', handleClickAway); // cleanup `handleClickAway`\n\n syntheticEventRef.current = false;\n };\n }\n\n return undefined;\n }, [active, handleClickAway]);\n return [nodeRef, handleSynthetic, handleSynthetic];\n}\n\nconst PickersPopper = props => {\n const {\n anchorEl,\n children,\n containerRef = null,\n onClose,\n open,\n PopperProps,\n role,\n TransitionComponent = Grow,\n TrapFocusProps,\n PaperProps = {}\n } = props;\n React.useEffect(() => {\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n onClose();\n }\n }\n\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [onClose]);\n const lastFocusedElementRef = React.useRef(null);\n React.useEffect(() => {\n if (role === 'tooltip') {\n return;\n }\n\n if (open) {\n lastFocusedElementRef.current = document.activeElement;\n } else if (lastFocusedElementRef.current && lastFocusedElementRef.current instanceof HTMLElement) {\n lastFocusedElementRef.current.focus();\n }\n }, [open, role]);\n const [clickAwayRef, onPaperClick, onPaperTouchStart] = useClickAwayListener(open, onClose);\n const paperRef = React.useRef(null);\n const handleRef = useForkRef(paperRef, containerRef);\n const handlePaperRef = useForkRef(handleRef, clickAwayRef);\n const ownerState = props;\n\n const {\n onClick: onPaperClickProp,\n onTouchStart: onPaperTouchStartProp\n } = PaperProps,\n otherPaperProps = _objectWithoutPropertiesLoose(PaperProps, _excluded);\n\n return /*#__PURE__*/_jsx(PickersPopperRoot, _extends({\n transition: true,\n role: role,\n open: open,\n anchorEl: anchorEl,\n ownerState: ownerState\n }, PopperProps, {\n children: ({\n TransitionProps,\n placement\n }) => /*#__PURE__*/_jsx(TrapFocus, _extends({\n open: open,\n disableAutoFocus: true,\n disableEnforceFocus: role === 'tooltip',\n isEnabled: () => true\n }, TrapFocusProps, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({}, TransitionProps, {\n children: /*#__PURE__*/_jsx(PickersPopperPaper, _extends({\n tabIndex: -1,\n elevation: 8,\n ref: handlePaperRef,\n onClick: event => {\n onPaperClick(event);\n\n if (onPaperClickProp) {\n onPaperClickProp(event);\n }\n },\n onTouchStart: event => {\n onPaperTouchStart(event);\n\n if (onPaperTouchStartProp) {\n onPaperTouchStartProp(event);\n }\n },\n ownerState: _extends({}, ownerState, {\n placement\n })\n }, otherPaperProps, {\n children: children\n }))\n }))\n }))\n }));\n};\n\nexport default PickersPopper;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useForkRef } from '@mui/material/utils';\nimport { WrapperVariantContext } from './WrapperVariantContext';\nimport PickersPopper from '../PickersPopper';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction DesktopWrapper(props) {\n const {\n children,\n DateInputProps,\n KeyboardDateInputComponent,\n onDismiss,\n open,\n PopperProps,\n PaperProps,\n TransitionComponent\n } = props;\n const ownInputRef = React.useRef(null);\n const inputRef = useForkRef(DateInputProps.inputRef, ownInputRef);\n return /*#__PURE__*/_jsxs(WrapperVariantContext.Provider, {\n value: \"desktop\",\n children: [/*#__PURE__*/_jsx(KeyboardDateInputComponent, _extends({}, DateInputProps, {\n inputRef: inputRef\n })), /*#__PURE__*/_jsx(PickersPopper, {\n role: \"dialog\",\n open: open,\n anchorEl: ownInputRef.current,\n TransitionComponent: TransitionComponent,\n PopperProps: PopperProps,\n PaperProps: PaperProps,\n onClose: onDismiss,\n children: children\n })]\n });\n}\n\nexport default DesktopWrapper;","/* Use it instead of .includes method for IE support */\nexport function arrayIncludes(array, itemOrItems) {\n if (Array.isArray(itemOrItems)) {\n return itemOrItems.every(item => array.indexOf(item) !== -1);\n }\n\n return array.indexOf(itemOrItems) !== -1;\n}\nexport const onSpaceOrEnter = (innerFn, onFocus) => event => {\n if (event.key === 'Enter' || event.key === ' ') {\n innerFn(); // prevent any side effects\n\n event.preventDefault();\n event.stopPropagation();\n }\n\n if (onFocus) {\n onFocus(event);\n }\n};\n/* Quick untyped helper to improve function composition readability */\n\nexport const pipe = (...fns) => fns.reduceRight((prevFn, nextFn) => (...args) => nextFn(prevFn(...args)), value => value);\nexport const executeInTheNextEventLoopTick = fn => {\n setTimeout(fn, 0);\n};\nexport function createDelegatedEventHandler(fn, onEvent) {\n return event => {\n fn(event);\n\n if (onEvent) {\n onEvent(event);\n }\n };\n}\nexport const doNothing = () => {};","import * as React from 'react';\nimport { useControlled } from '@mui/material/utils';\nimport { arrayIncludes } from '../utils';\nexport function useViews({\n onChange,\n onViewChange,\n openTo,\n view,\n views\n}) {\n var _views, _views2;\n\n const [openView, setOpenView] = useControlled({\n name: 'Picker',\n state: 'view',\n controlled: view,\n default: openTo && arrayIncludes(views, openTo) ? openTo : views[0]\n });\n const previousView = (_views = views[views.indexOf(openView) - 1]) != null ? _views : null;\n const nextView = (_views2 = views[views.indexOf(openView) + 1]) != null ? _views2 : null;\n const changeView = React.useCallback(newView => {\n setOpenView(newView);\n\n if (onViewChange) {\n onViewChange(newView);\n }\n }, [setOpenView, onViewChange]);\n const openNext = React.useCallback(() => {\n if (nextView) {\n changeView(nextView);\n }\n }, [nextView, changeView]);\n const handleChangeAndOpenNext = React.useCallback((date, currentViewSelectionState) => {\n const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';\n const globalSelectionState = isSelectionFinishedOnCurrentView && Boolean(nextView) ? 'partial' : currentViewSelectionState;\n onChange(date, globalSelectionState);\n\n if (isSelectionFinishedOnCurrentView) {\n openNext();\n }\n }, [nextView, onChange, openNext]);\n return {\n handleChangeAndOpenNext,\n nextView,\n previousView,\n openNext,\n openView,\n setOpenView: changeView\n };\n}","export const CLOCK_WIDTH = 220;\nexport const CLOCK_HOUR_WIDTH = 36;\nconst clockCenter = {\n x: CLOCK_WIDTH / 2,\n y: CLOCK_WIDTH / 2\n};\nconst baseClockPoint = {\n x: clockCenter.x,\n y: 0\n};\nconst cx = baseClockPoint.x - clockCenter.x;\nconst cy = baseClockPoint.y - clockCenter.y;\n\nconst rad2deg = rad => rad * (180 / Math.PI);\n\nconst getAngleValue = (step, offsetX, offsetY) => {\n const x = offsetX - clockCenter.x;\n const y = offsetY - clockCenter.y;\n const atan = Math.atan2(cx, cy) - Math.atan2(x, y);\n let deg = rad2deg(atan);\n deg = Math.round(deg / step) * step;\n deg %= 360;\n const value = Math.floor(deg / step) || 0;\n const delta = x ** 2 + y ** 2;\n const distance = Math.sqrt(delta);\n return {\n value,\n distance\n };\n};\n\nexport const getMinutes = (offsetX, offsetY, step = 1) => {\n const angleStep = step * 6;\n let {\n value\n } = getAngleValue(angleStep, offsetX, offsetY);\n value = value * step % 60;\n return value;\n};\nexport const getHours = (offsetX, offsetY, ampm) => {\n const {\n value,\n distance\n } = getAngleValue(30, offsetX, offsetY);\n let hour = value || 12;\n\n if (!ampm) {\n if (distance < CLOCK_WIDTH / 2 - CLOCK_HOUR_WIDTH) {\n hour += 12;\n hour %= 24;\n }\n } else {\n hour %= 12;\n }\n\n return hour;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"hasSelected\", \"isInner\", \"type\", \"value\"];\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst ClockPointerRoot = styled('div', {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n width: 2,\n backgroundColor: theme.palette.primary.main,\n position: 'absolute',\n left: 'calc(50% - 1px)',\n bottom: '50%',\n transformOrigin: 'center bottom 0px'\n}, ownerState.toAnimateTransform && {\n transition: theme.transitions.create(['transform', 'height'])\n}));\nconst ClockPointerThumb = styled('div', {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n width: 4,\n height: 4,\n backgroundColor: theme.palette.primary.contrastText,\n borderRadius: '50%',\n position: 'absolute',\n top: -21,\n left: `calc(50% - ${CLOCK_HOUR_WIDTH / 2}px)`,\n border: `${(CLOCK_HOUR_WIDTH - 4) / 2}px solid ${theme.palette.primary.main}`,\n boxSizing: 'content-box'\n}, ownerState.hasSelected && {\n backgroundColor: theme.palette.primary.main\n}));\n/**\n * @ignore - internal component.\n */\n\nclass ClockPointer extends React.Component {\n constructor(...args) {\n super(...args);\n this.state = {\n toAnimateTransform: false,\n previousType: undefined\n };\n }\n\n render() {\n const _this$props = this.props,\n {\n className,\n isInner,\n type,\n value\n } = _this$props,\n other = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n const ownerState = _extends({}, this.props, this.state);\n\n const getAngleStyle = () => {\n const max = type === 'hours' ? 12 : 60;\n let angle = 360 / max * value;\n\n if (type === 'hours' && value > 12) {\n angle -= 360; // round up angle to max 360 degrees\n }\n\n return {\n height: Math.round((isInner ? 0.26 : 0.4) * CLOCK_WIDTH),\n transform: `rotateZ(${angle}deg)`\n };\n };\n\n return /*#__PURE__*/_jsx(ClockPointerRoot, _extends({\n style: getAngleStyle(),\n className: className,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(ClockPointerThumb, {\n ownerState: ownerState\n })\n }));\n }\n\n}\n\nClockPointer.getDerivedStateFromProps = (nextProps, state) => {\n if (nextProps.type !== state.previousType) {\n return {\n toAnimateTransform: true,\n previousType: nextProps.type\n };\n }\n\n return {\n toAnimateTransform: false,\n previousType: nextProps.type\n };\n};\n\nexport default ClockPointer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _ClockPin, _Typography, _Typography2;\n\nimport * as React from 'react';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport ClockPointer from './ClockPointer';\nimport { useUtils } from '../internal/pickers/hooks/useUtils';\nimport { WrapperVariantContext } from '../internal/pickers/wrappers/WrapperVariantContext';\nimport { getHours, getMinutes } from './shared';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst ClockRoot = styled('div', {\n skipSx: true\n})(({\n theme\n}) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: theme.spacing(2)\n}));\nconst ClockClock = styled('div', {\n skipSx: true\n})({\n backgroundColor: 'rgba(0,0,0,.07)',\n borderRadius: '50%',\n height: 220,\n width: 220,\n flexShrink: 0,\n position: 'relative',\n pointerEvents: 'none'\n});\nconst ClockSquareMask = styled('div', {\n skipSx: true\n})({\n width: '100%',\n height: '100%',\n position: 'absolute',\n pointerEvents: 'auto',\n outline: 0,\n // Disable scroll capabilities.\n touchAction: 'none',\n userSelect: 'none',\n '@media (pointer: fine)': {\n cursor: 'pointer',\n borderRadius: '50%'\n },\n '&:active': {\n cursor: 'move'\n }\n});\nconst ClockPin = styled('div', {\n skipSx: true\n})(({\n theme\n}) => ({\n width: 6,\n height: 6,\n borderRadius: '50%',\n backgroundColor: theme.palette.primary.main,\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)'\n}));\nconst ClockAmButton = styled(IconButton, {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n zIndex: 1,\n position: 'absolute',\n bottom: ownerState.ampmInClock ? 64 : 8,\n left: 8\n}, ownerState.meridiemMode === 'am' && {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n '&:hover': {\n backgroundColor: theme.palette.primary.light\n }\n}));\nconst ClockPmButton = styled(IconButton, {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n zIndex: 1,\n position: 'absolute',\n bottom: ownerState.ampmInClock ? 64 : 8,\n right: 8\n}, ownerState.meridiemMode === 'pm' && {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n '&:hover': {\n backgroundColor: theme.palette.primary.light\n }\n}));\n/**\n * @ignore - internal component.\n */\n\nfunction Clock(props) {\n const {\n ampm,\n ampmInClock,\n autoFocus,\n children,\n date,\n getClockLabelText,\n handleMeridiemChange,\n isTimeDisabled,\n meridiemMode,\n minutesStep = 1,\n onChange,\n selectedId,\n type,\n value\n } = props;\n const ownerState = props;\n const utils = useUtils();\n const wrapperVariant = React.useContext(WrapperVariantContext);\n const isMoving = React.useRef(false);\n const isSelectedTimeDisabled = isTimeDisabled(value, type);\n const isPointerInner = !ampm && type === 'hours' && (value < 1 || value > 12);\n\n const handleValueChange = (newValue, isFinish) => {\n if (isTimeDisabled(newValue, type)) {\n return;\n }\n\n onChange(newValue, isFinish);\n };\n\n const setTime = (event, isFinish) => {\n let {\n offsetX,\n offsetY\n } = event;\n\n if (offsetX === undefined) {\n const rect = event.target.getBoundingClientRect();\n offsetX = event.changedTouches[0].clientX - rect.left;\n offsetY = event.changedTouches[0].clientY - rect.top;\n }\n\n const newSelectedValue = type === 'seconds' || type === 'minutes' ? getMinutes(offsetX, offsetY, minutesStep) : getHours(offsetX, offsetY, Boolean(ampm));\n handleValueChange(newSelectedValue, isFinish);\n };\n\n const handleTouchMove = event => {\n isMoving.current = true;\n setTime(event, 'shallow');\n };\n\n const handleTouchEnd = event => {\n if (isMoving.current) {\n setTime(event, 'finish');\n isMoving.current = false;\n }\n };\n\n const handleMouseMove = event => {\n // event.buttons & PRIMARY_MOUSE_BUTTON\n if (event.buttons > 0) {\n setTime(event.nativeEvent, 'shallow');\n }\n };\n\n const handleMouseUp = event => {\n if (isMoving.current) {\n isMoving.current = false;\n }\n\n setTime(event.nativeEvent, 'finish');\n };\n\n const hasSelected = React.useMemo(() => {\n if (type === 'hours') {\n return true;\n }\n\n return value % 5 === 0;\n }, [type, value]);\n const keyboardControlStep = type === 'minutes' ? minutesStep : 1;\n const listboxRef = React.useRef(null); // Since this is rendered when a Popper is opened we can't use passive effects.\n // Focusing in passive effects in Popper causes scroll jump.\n\n useEnhancedEffect(() => {\n if (autoFocus) {\n // The ref not being resolved would be a bug in MUI.\n listboxRef.current.focus();\n }\n }, [autoFocus]);\n\n const handleKeyDown = event => {\n // TODO: Why this early exit?\n if (isMoving.current) {\n return;\n }\n\n switch (event.key) {\n case 'Home':\n // annulate both hours and minutes\n handleValueChange(0, 'partial');\n event.preventDefault();\n break;\n\n case 'End':\n handleValueChange(type === 'minutes' ? 59 : 23, 'partial');\n event.preventDefault();\n break;\n\n case 'ArrowUp':\n handleValueChange(value + keyboardControlStep, 'partial');\n event.preventDefault();\n break;\n\n case 'ArrowDown':\n handleValueChange(value - keyboardControlStep, 'partial');\n event.preventDefault();\n break;\n\n default: // do nothing\n\n }\n };\n\n return /*#__PURE__*/_jsxs(ClockRoot, {\n children: [/*#__PURE__*/_jsxs(ClockClock, {\n children: [/*#__PURE__*/_jsx(ClockSquareMask, {\n onTouchMove: handleTouchMove,\n onTouchEnd: handleTouchEnd,\n onMouseUp: handleMouseUp,\n onMouseMove: handleMouseMove\n }), !isSelectedTimeDisabled && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [_ClockPin || (_ClockPin = /*#__PURE__*/_jsx(ClockPin, {})), date && /*#__PURE__*/_jsx(ClockPointer, {\n type: type,\n value: value,\n isInner: isPointerInner,\n hasSelected: hasSelected\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n \"aria-activedescendant\": selectedId,\n \"aria-label\": getClockLabelText(type, date, utils),\n ref: listboxRef,\n role: \"listbox\",\n onKeyDown: handleKeyDown,\n tabIndex: 0,\n children: children\n })]\n }), ampm && (wrapperVariant === 'desktop' || ampmInClock) && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ClockAmButton, {\n onClick: () => handleMeridiemChange('am'),\n disabled: meridiemMode === null,\n ownerState: ownerState,\n children: _Typography || (_Typography = /*#__PURE__*/_jsx(Typography, {\n variant: \"caption\",\n children: \"AM\"\n }))\n }), /*#__PURE__*/_jsx(ClockPmButton, {\n disabled: meridiemMode === null,\n onClick: () => handleMeridiemChange('pm'),\n ownerState: ownerState,\n children: _Typography2 || (_Typography2 = /*#__PURE__*/_jsx(Typography, {\n variant: \"caption\",\n children: \"PM\"\n }))\n })]\n })]\n });\n}\n\nexport default Clock;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disabled\", \"index\", \"inner\", \"label\", \"selected\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/core';\nimport { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const classes = generateUtilityClasses('PrivateClockNumber', ['selected', 'disabled']);\nconst ClockNumberRoot = styled('span', {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n height: CLOCK_HOUR_WIDTH,\n width: CLOCK_HOUR_WIDTH,\n position: 'absolute',\n left: `calc((100% - ${CLOCK_HOUR_WIDTH}px) / 2)`,\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n color: theme.palette.text.primary,\n '&:focused': {\n backgroundColor: theme.palette.background.paper\n },\n [`&.${classes.selected}`]: {\n color: theme.palette.primary.contrastText\n },\n [`&.${classes.disabled}`]: {\n pointerEvents: 'none',\n color: theme.palette.text.disabled\n }\n}, ownerState.inner && _extends({}, theme.typography.body2, {\n color: theme.palette.text.secondary\n})));\n/**\n * @ignore - internal component.\n */\n\nfunction ClockNumber(props) {\n const {\n className,\n disabled,\n index,\n inner,\n label,\n selected\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = props;\n const angle = index % 12 / 12 * Math.PI * 2 - Math.PI / 2;\n const length = (CLOCK_WIDTH - CLOCK_HOUR_WIDTH - 2) / 2 * (inner ? 0.65 : 1);\n const x = Math.round(Math.cos(angle) * length);\n const y = Math.round(Math.sin(angle) * length);\n return /*#__PURE__*/_jsx(ClockNumberRoot, _extends({\n className: clsx(className, selected && classes.selected, disabled && classes.disabled),\n \"aria-disabled\": disabled ? true : undefined,\n \"aria-selected\": selected ? true : undefined,\n role: \"option\",\n style: {\n transform: `translate(${x}px, ${y + (CLOCK_WIDTH - CLOCK_HOUR_WIDTH) / 2}px`\n },\n ownerState: ownerState\n }, other, {\n children: label\n }));\n}\n\nexport default ClockNumber;","import * as React from 'react';\nimport ClockNumber from './ClockNumber';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n * @ignore - internal component.\n */\nexport const getHourNumbers = ({\n ampm,\n date,\n getClockNumberText,\n isDisabled,\n selectedId,\n utils\n}) => {\n const currentHours = date ? utils.getHours(date) : null;\n const hourNumbers = [];\n const startHour = ampm ? 1 : 0;\n const endHour = ampm ? 12 : 23;\n\n const isSelected = hour => {\n if (currentHours === null) {\n return false;\n }\n\n if (ampm) {\n if (hour === 12) {\n return currentHours === 12 || currentHours === 0;\n }\n\n return currentHours === hour || currentHours - 12 === hour;\n }\n\n return currentHours === hour;\n };\n\n for (let hour = startHour; hour <= endHour; hour += 1) {\n let label = hour.toString();\n\n if (hour === 0) {\n label = '00';\n }\n\n const inner = !ampm && (hour === 0 || hour > 12);\n label = utils.formatNumber(label);\n const selected = isSelected(hour);\n hourNumbers.push( /*#__PURE__*/_jsx(ClockNumber, {\n id: selected ? selectedId : undefined,\n index: hour,\n inner: inner,\n selected: selected,\n disabled: isDisabled(hour),\n label: label,\n \"aria-label\": getClockNumberText(label)\n }, hour));\n }\n\n return hourNumbers;\n};\nexport const getMinutesNumbers = ({\n utils,\n value,\n isDisabled,\n getClockNumberText,\n selectedId\n}) => {\n const f = utils.formatNumber;\n return [[5, f('05')], [10, f('10')], [15, f('15')], [20, f('20')], [25, f('25')], [30, f('30')], [35, f('35')], [40, f('40')], [45, f('45')], [50, f('50')], [55, f('55')], [0, f('00')]].map(([numberValue, label], index) => {\n const selected = numberValue === value;\n return /*#__PURE__*/_jsx(ClockNumber, {\n label: label,\n id: selected ? selectedId : undefined,\n index: index + 1,\n inner: false,\n disabled: isDisabled(numberValue),\n selected: selected,\n \"aria-label\": getClockNumberText(label)\n }, numberValue);\n });\n};","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z\"\n}), 'ArrowLeft');","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n}), 'ArrowRight');","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"components\", \"componentsProps\", \"isLeftDisabled\", \"isLeftHidden\", \"isRightDisabled\", \"isRightHidden\", \"leftArrowButtonText\", \"onLeftClick\", \"onRightClick\", \"rightArrowButtonText\"];\nimport * as React from 'react';\nimport Typography from '@mui/material/Typography';\nimport { useTheme, styled } from '@mui/material/styles';\nimport IconButton from '@mui/material/IconButton';\nimport ArrowLeftIcon from '../svg-icons/ArrowLeft';\nimport ArrowRightIcon from '../svg-icons/ArrowRight';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersArrowSwitcherRoot = styled('div', {\n skipSx: true\n})({\n display: 'flex'\n});\nconst PickersArrowSwitcherSpacer = styled('div', {\n skipSx: true\n})(({\n theme\n}) => ({\n width: theme.spacing(3)\n}));\nconst PickersArrowSwitcherButton = styled(IconButton, {\n skipSx: true\n})(({\n ownerState\n}) => _extends({}, ownerState.hidden && {\n visibility: 'hidden'\n}));\nconst PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function PickersArrowSwitcher(props, ref) {\n const {\n children,\n className,\n components = {},\n componentsProps = {},\n isLeftDisabled,\n isLeftHidden,\n isRightDisabled,\n isRightHidden,\n leftArrowButtonText,\n onLeftClick,\n onRightClick,\n rightArrowButtonText\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const leftArrowButtonProps = componentsProps.leftArrowButton || {};\n const LeftArrowIcon = components.LeftArrowIcon || ArrowLeftIcon;\n const rightArrowButtonProps = componentsProps.rightArrowButton || {};\n const RightArrowIcon = components.RightArrowIcon || ArrowRightIcon;\n const ownerState = props;\n return /*#__PURE__*/_jsxs(PickersArrowSwitcherRoot, _extends({\n ref: ref,\n className: className,\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(PickersArrowSwitcherButton, _extends({\n as: components.LeftArrowButton,\n size: \"small\",\n \"aria-label\": leftArrowButtonText,\n title: leftArrowButtonText,\n disabled: isLeftDisabled,\n edge: \"end\",\n onClick: onLeftClick\n }, leftArrowButtonProps, {\n className: leftArrowButtonProps.className,\n ownerState: _extends({}, ownerState, leftArrowButtonProps, {\n hidden: isLeftHidden\n }),\n children: isRtl ? /*#__PURE__*/_jsx(RightArrowIcon, {}) : /*#__PURE__*/_jsx(LeftArrowIcon, {})\n })), children ? /*#__PURE__*/_jsx(Typography, {\n variant: \"subtitle1\",\n component: \"span\",\n children: children\n }) : /*#__PURE__*/_jsx(PickersArrowSwitcherSpacer, {\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(PickersArrowSwitcherButton, _extends({\n as: components.RightArrowButton,\n size: \"small\",\n \"aria-label\": rightArrowButtonText,\n title: rightArrowButtonText,\n edge: \"start\",\n disabled: isRightDisabled,\n onClick: onRightClick\n }, rightArrowButtonProps, {\n className: rightArrowButtonProps.className,\n ownerState: _extends({}, ownerState, rightArrowButtonProps, {\n hidden: isRightHidden\n }),\n children: isRtl ? /*#__PURE__*/_jsx(LeftArrowIcon, {}) : /*#__PURE__*/_jsx(RightArrowIcon, {})\n }))]\n }));\n});\nexport default PickersArrowSwitcher;","export const getMeridiem = (date, utils) => {\n if (!date) {\n return null;\n }\n\n return utils.getHours(date) >= 12 ? 'pm' : 'am';\n};\nexport const convertValueToMeridiem = (value, meridiem, ampm) => {\n if (ampm) {\n const currentMeridiem = value >= 12 ? 'pm' : 'am';\n\n if (currentMeridiem !== meridiem) {\n return meridiem === 'am' ? value - 12 : value + 12;\n }\n }\n\n return value;\n};\nexport const convertToMeridiem = (time, meridiem, ampm, utils) => {\n const newHoursAmount = convertValueToMeridiem(utils.getHours(time), meridiem, ampm);\n return utils.setHours(time, newHoursAmount);\n};\nexport function getSecondsInDay(date, utils) {\n return utils.getHours(date) * 3600 + utils.getMinutes(date) * 60 + utils.getSeconds(date);\n}\nexport const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, utils) => (dateLeft, dateRight) => {\n if (disableIgnoringDatePartForTimeValidation) {\n return utils.isAfter(dateLeft, dateRight);\n }\n\n return getSecondsInDay(dateLeft, utils) > getSecondsInDay(dateRight, utils);\n};\nexport const validateTime = (utils, value, {\n minTime,\n maxTime,\n shouldDisableTime,\n disableIgnoringDatePartForTimeValidation\n}) => {\n const date = utils.date(value);\n const isAfterComparingFn = createIsAfterIgnoreDatePart(Boolean(disableIgnoringDatePartForTimeValidation), utils);\n\n if (value === null) {\n return null;\n }\n\n switch (true) {\n case !utils.isValid(value):\n return 'invalidDate';\n\n case Boolean(minTime && isAfterComparingFn(minTime, date)):\n return 'minTime';\n\n case Boolean(maxTime && isAfterComparingFn(date, maxTime)):\n return 'maxTime';\n\n case Boolean(shouldDisableTime && shouldDisableTime(utils.getHours(date), 'hours')):\n return 'shouldDisableTime-hours';\n\n case Boolean(shouldDisableTime && shouldDisableTime(utils.getMinutes(date), 'minutes')):\n return 'shouldDisableTime-minutes';\n\n case Boolean(shouldDisableTime && shouldDisableTime(utils.getSeconds(date), 'seconds')):\n return 'shouldDisableTime-seconds';\n\n default:\n return null;\n }\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/core';\nimport Clock from './Clock';\nimport { pipe } from '../internal/pickers/utils';\nimport { useUtils, useNow } from '../internal/pickers/hooks/useUtils';\nimport { getHourNumbers, getMinutesNumbers } from './ClockNumbers';\nimport PickersArrowSwitcher from '../internal/pickers/PickersArrowSwitcher';\nimport { convertValueToMeridiem, createIsAfterIgnoreDatePart } from '../internal/pickers/time-utils';\nimport { useMeridiemMode } from '../internal/pickers/hooks/date-helpers-hooks';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function getClockPickerUtilityClass(slot) {\n return generateUtilityClass('MuiClockPicker', slot);\n}\nexport const clockPickerClasses = generateUtilityClasses('MuiClockPicker', ['arrowSwitcher']);\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n arrowSwitcher: ['arrowSwitcher']\n };\n return composeClasses(slots, getClockPickerUtilityClass, classes);\n};\n\nconst ClockPickerArrowSwitcher = styled(PickersArrowSwitcher, {\n name: 'MuiClockPicker',\n slot: 'ArrowSwticher',\n overridesResolver: (props, styles) => styles.arrowSwitcher\n})({\n position: 'absolute',\n right: 12,\n top: 15\n});\n\nconst defaultGetClockLabelText = (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`;\n\nconst defaultGetMinutesClockNumberText = minutes => `${minutes} minutes`;\n\nconst defaultGetHoursClockNumberText = hours => `${hours} hours`;\n\nconst defaultGetSecondsClockNumberText = seconds => `${seconds} seconds`;\n/**\n *\n * API:\n *\n * - [ClockPicker API](https://mui.com/api/clock-picker/)\n */\n\n\nfunction ClockPicker(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClockPicker'\n });\n const {\n ampm = false,\n ampmInClock = false,\n autoFocus,\n components,\n componentsProps,\n date,\n disableIgnoringDatePartForTimeValidation = false,\n getClockLabelText = defaultGetClockLabelText,\n getHoursClockNumberText = defaultGetHoursClockNumberText,\n getMinutesClockNumberText = defaultGetMinutesClockNumberText,\n getSecondsClockNumberText = defaultGetSecondsClockNumberText,\n leftArrowButtonText = 'open previous view',\n maxTime,\n minTime,\n minutesStep = 1,\n nextViewAvailable,\n onChange,\n openNextView,\n openPreviousView,\n previousViewAvailable,\n rightArrowButtonText = 'open next view',\n shouldDisableTime,\n showViewSwitcher,\n view\n } = props;\n const now = useNow();\n const utils = useUtils();\n const midnight = utils.setSeconds(utils.setMinutes(utils.setHours(now, 0), 0), 0);\n const dateOrMidnight = date || midnight;\n const {\n meridiemMode,\n handleMeridiemChange\n } = useMeridiemMode(dateOrMidnight, ampm, onChange);\n const isTimeDisabled = React.useCallback((rawValue, viewType) => {\n if (date === null) {\n return false;\n }\n\n const validateTimeValue = getRequestedTimePoint => {\n const isAfterComparingFn = createIsAfterIgnoreDatePart(disableIgnoringDatePartForTimeValidation, utils);\n return Boolean(minTime && isAfterComparingFn(minTime, getRequestedTimePoint('end')) || maxTime && isAfterComparingFn(getRequestedTimePoint('start'), maxTime) || shouldDisableTime && shouldDisableTime(rawValue, viewType));\n };\n\n switch (viewType) {\n case 'hours':\n {\n const hoursWithMeridiem = convertValueToMeridiem(rawValue, meridiemMode, ampm);\n return validateTimeValue(when => pipe(currentDate => utils.setHours(currentDate, hoursWithMeridiem), dateWithHours => utils.setMinutes(dateWithHours, when === 'start' ? 0 : 59), dateWithMinutes => utils.setSeconds(dateWithMinutes, when === 'start' ? 0 : 59))(date));\n }\n\n case 'minutes':\n return validateTimeValue(when => pipe(currentDate => utils.setMinutes(currentDate, rawValue), dateWithMinutes => utils.setSeconds(dateWithMinutes, when === 'start' ? 0 : 59))(date));\n\n case 'seconds':\n return validateTimeValue(() => utils.setSeconds(date, rawValue));\n\n default:\n throw new Error('not supported');\n }\n }, [ampm, date, disableIgnoringDatePartForTimeValidation, maxTime, meridiemMode, minTime, shouldDisableTime, utils]);\n const selectedId = useId();\n const viewProps = React.useMemo(() => {\n switch (view) {\n case 'hours':\n {\n const handleHoursChange = (value, isFinish) => {\n const valueWithMeridiem = convertValueToMeridiem(value, meridiemMode, ampm);\n onChange(utils.setHours(dateOrMidnight, valueWithMeridiem), isFinish);\n };\n\n return {\n onChange: handleHoursChange,\n value: utils.getHours(dateOrMidnight),\n children: getHourNumbers({\n date,\n utils,\n ampm,\n onChange: handleHoursChange,\n getClockNumberText: getHoursClockNumberText,\n isDisabled: value => isTimeDisabled(value, 'hours'),\n selectedId\n })\n };\n }\n\n case 'minutes':\n {\n const minutesValue = utils.getMinutes(dateOrMidnight);\n\n const handleMinutesChange = (value, isFinish) => {\n onChange(utils.setMinutes(dateOrMidnight, value), isFinish);\n };\n\n return {\n value: minutesValue,\n onChange: handleMinutesChange,\n children: getMinutesNumbers({\n utils,\n value: minutesValue,\n onChange: handleMinutesChange,\n getClockNumberText: getMinutesClockNumberText,\n isDisabled: value => isTimeDisabled(value, 'minutes'),\n selectedId\n })\n };\n }\n\n case 'seconds':\n {\n const secondsValue = utils.getSeconds(dateOrMidnight);\n\n const handleSecondsChange = (value, isFinish) => {\n onChange(utils.setSeconds(dateOrMidnight, value), isFinish);\n };\n\n return {\n value: secondsValue,\n onChange: handleSecondsChange,\n children: getMinutesNumbers({\n utils,\n value: secondsValue,\n onChange: handleSecondsChange,\n getClockNumberText: getSecondsClockNumberText,\n isDisabled: value => isTimeDisabled(value, 'seconds'),\n selectedId\n })\n };\n }\n\n default:\n throw new Error('You must provide the type for ClockView');\n }\n }, [view, utils, date, ampm, getHoursClockNumberText, getMinutesClockNumberText, getSecondsClockNumberText, meridiemMode, onChange, dateOrMidnight, isTimeDisabled, selectedId]);\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [showViewSwitcher && /*#__PURE__*/_jsx(ClockPickerArrowSwitcher, {\n className: classes.arrowSwitcher,\n leftArrowButtonText: leftArrowButtonText,\n rightArrowButtonText: rightArrowButtonText,\n components: components,\n componentsProps: componentsProps,\n onLeftClick: openPreviousView,\n onRightClick: openNextView,\n isLeftDisabled: previousViewAvailable,\n isRightDisabled: nextViewAvailable,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(Clock, _extends({\n autoFocus: autoFocus,\n date: date,\n ampmInClock: ampmInClock,\n type: view,\n ampm: ampm,\n getClockLabelText: getClockLabelText,\n minutesStep: minutesStep,\n isTimeDisabled: isTimeDisabled,\n meridiemMode: meridiemMode,\n handleMeridiemChange: handleMeridiemChange,\n selectedId: selectedId\n }, viewProps))]\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ClockPicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * 12h/24h view for hour selection clock.\n * @default false\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n\n /**\n * Set to `true` if focus should be moved to clock picker.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The components used for each slot.\n * Either a string to use a HTML element or a component.\n */\n components: PropTypes.shape({\n LeftArrowButton: PropTypes.elementType,\n LeftArrowIcon: PropTypes.elementType,\n RightArrowButton: PropTypes.elementType,\n RightArrowIcon: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside.\n */\n componentsProps: PropTypes.object,\n\n /**\n * Selected date @DateIOType.\n */\n date: PropTypes.any,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get clock number aria-text for hours.\n * @default (hours: string) => `${hours} hours`\n */\n getHoursClockNumberText: PropTypes.func,\n\n /**\n * Get clock number aria-text for minutes.\n * @default (minutes: string) => `${minutes} minutes`\n */\n getMinutesClockNumberText: PropTypes.func,\n\n /**\n * Get clock number aria-text for seconds.\n * @default (seconds: string) => `${seconds} seconds`\n */\n getSecondsClockNumberText: PropTypes.func,\n\n /**\n * Left arrow icon aria-label text.\n * @default 'open previous view'\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * @ignore\n */\n nextViewAvailable: PropTypes.bool.isRequired,\n\n /**\n * On change callback @DateIOType.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n openNextView: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n openPreviousView: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n previousViewAvailable: PropTypes.bool.isRequired,\n\n /**\n * Right arrow icon aria-label text.\n * @default 'open next view'\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * @ignore\n */\n showViewSwitcher: PropTypes.bool,\n\n /**\n * @ignore\n */\n view: PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired\n} : void 0;\n/**\n *\n * Demos:\n *\n * - [Time Picker](https://mui.com/components/time-picker/)\n *\n * API:\n *\n * - [ClockPicker API](https://mui.com/api/clock-picker/)\n */\n\nexport default ClockPicker;","import * as React from 'react';\nimport { useUtils } from './useUtils';\nimport { getMeridiem, convertToMeridiem } from '../time-utils';\nexport function useNextMonthDisabled(month, {\n disableFuture,\n maxDate\n}) {\n const utils = useUtils();\n return React.useMemo(() => {\n const now = utils.date();\n const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);\n return !utils.isAfter(lastEnabledMonth, month);\n }, [disableFuture, maxDate, month, utils]);\n}\nexport function usePreviousMonthDisabled(month, {\n disablePast,\n minDate\n}) {\n const utils = useUtils();\n return React.useMemo(() => {\n const now = utils.date();\n const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);\n return !utils.isBefore(firstEnabledMonth, month);\n }, [disablePast, minDate, month, utils]);\n}\nexport function useMeridiemMode(date, ampm, onChange) {\n const utils = useUtils();\n const meridiemMode = getMeridiem(date, utils);\n const handleMeridiemChange = React.useCallback(mode => {\n const timeWithMeridiem = convertToMeridiem(date, mode, Boolean(ampm), utils);\n onChange(timeWithMeridiem, 'partial');\n }, [ampm, date, onChange, utils]);\n return {\n meridiemMode,\n handleMeridiemChange\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"disabled\", \"onSelect\", \"selected\", \"value\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/core';\nimport { onSpaceOrEnter } from '../internal/pickers/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst classes = generateUtilityClasses('PrivatePickersMonth', ['root', 'selected']);\nconst PickersMonthRoot = styled(Typography, {\n skipSx: true\n})(({\n theme\n}) => ({\n flex: '1 0 33.33%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer',\n height: 64,\n outline: 0,\n transition: theme.transitions.create('font-size', {\n duration: '100ms'\n }),\n '&:focus': {\n color: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium\n },\n '&:disabled': {\n pointerEvents: 'none',\n color: theme.palette.text.secondary\n },\n [`&.${classes.selected}`]: {\n color: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium\n }\n}));\n/**\n * @ignore - do not document.\n */\n\nconst PickersMonth = props => {\n const {\n disabled,\n onSelect,\n selected,\n value\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const handleSelection = () => {\n onSelect(value);\n };\n\n return /*#__PURE__*/_jsx(PickersMonthRoot, _extends({\n component: \"button\",\n className: clsx(classes.root, selected && classes.selected),\n tabIndex: disabled ? -1 : 0,\n onClick: handleSelection,\n onKeyDown: onSpaceOrEnter(handleSelection),\n color: selected ? 'primary' : undefined,\n variant: selected ? 'h5' : 'subtitle1',\n disabled: disabled\n }, other));\n};\n\nexport default PickersMonth;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"date\", \"disableFuture\", \"disablePast\", \"maxDate\", \"minDate\", \"onChange\", \"onMonthChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/core';\nimport PickersMonth from './PickersMonth';\nimport { useUtils, useNow } from '../internal/pickers/hooks/useUtils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getMonthPickerUtilityClass(slot) {\n return generateUtilityClass('MuiMonthPicker', slot);\n}\nexport const monthPickerClasses = generateUtilityClasses('MuiMonthPicker', ['root']);\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getMonthPickerUtilityClass, classes);\n};\n\nconst MonthPickerRoot = styled('div', {\n name: 'MuiMonthPicker',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n width: 310,\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'stretch'\n});\nconst MonthPicker = /*#__PURE__*/React.forwardRef(function MonthPicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMonthPicker'\n });\n\n const {\n className,\n date,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onChange,\n onMonthChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const utils = useUtils();\n const now = useNow();\n const currentMonth = utils.getMonth(date || now);\n\n const shouldDisableMonth = month => {\n const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);\n const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);\n const isBeforeFirstEnabled = utils.isBefore(month, firstEnabledMonth);\n const isAfterLastEnabled = utils.isAfter(month, lastEnabledMonth);\n return isBeforeFirstEnabled || isAfterLastEnabled;\n };\n\n const onMonthSelect = month => {\n const newDate = utils.setMonth(date || now, month);\n onChange(newDate, 'finish');\n\n if (onMonthChange) {\n onMonthChange(newDate);\n }\n };\n\n return /*#__PURE__*/_jsx(MonthPickerRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: utils.getMonthArray(date || now).map(month => {\n const monthNumber = utils.getMonth(month);\n const monthText = utils.format(month, 'monthShort');\n return /*#__PURE__*/_jsx(PickersMonth, {\n value: monthNumber,\n selected: monthNumber === currentMonth,\n onSelect: onMonthSelect,\n disabled: shouldDisableMonth(month),\n children: monthText\n }, monthText);\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MonthPicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * className applied to the root element.\n */\n className: PropTypes.string,\n\n /**\n * Date value for the MonthPicker\n */\n date: PropTypes.any,\n\n /**\n * If `true` future days are disabled.\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n */\n disablePast: PropTypes.bool,\n\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any.isRequired,\n\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any.isRequired,\n\n /**\n * Callback fired on date change.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n onMonthChange: PropTypes.func,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n *\n * API:\n *\n * - [MonthPicker API](https://mui.com/api/month-picker/)\n */\n\nexport default MonthPicker;","export const findClosestEnabledDate = ({\n date,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n shouldDisableDate,\n utils\n}) => {\n const today = utils.startOfDay(utils.date());\n\n if (disablePast && utils.isBefore(minDate, today)) {\n minDate = today;\n }\n\n if (disableFuture && utils.isAfter(maxDate, today)) {\n maxDate = today;\n }\n\n let forward = date;\n let backward = date;\n\n if (utils.isBefore(date, minDate)) {\n forward = utils.date(minDate);\n backward = null;\n }\n\n if (utils.isAfter(date, maxDate)) {\n if (backward) {\n backward = utils.date(maxDate);\n }\n\n forward = null;\n }\n\n while (forward || backward) {\n if (forward && utils.isAfter(forward, maxDate)) {\n forward = null;\n }\n\n if (backward && utils.isBefore(backward, minDate)) {\n backward = null;\n }\n\n if (forward) {\n if (!shouldDisableDate(forward)) {\n return forward;\n }\n\n forward = utils.addDays(forward, 1);\n }\n\n if (backward) {\n if (!shouldDisableDate(backward)) {\n return backward;\n }\n\n backward = utils.addDays(backward, -1);\n }\n }\n\n return today;\n};\nexport function parsePickerInputValue(utils, value) {\n const parsedValue = utils.date(value);\n return utils.isValid(parsedValue) ? parsedValue : null;\n}\nexport function parseRangeInputValue(utils, value = [null, null]) {\n return value.map(date => !utils.isValid(date) || date === null ? null : utils.startOfDay(utils.date(date)));\n}\nexport const isRangeValid = (utils, range) => {\n return Boolean(range && range[0] && range[1] && !utils.isBefore(range[1], range[0]));\n};\nexport const isWithinRange = (utils, day, range) => {\n return isRangeValid(utils, range) && utils.isWithinRange(day, range);\n};\nexport const isStartOfRange = (utils, day, range) => {\n return isRangeValid(utils, range) && utils.isSameDay(day, range[0]);\n};\nexport const isEndOfRange = (utils, day, range) => {\n return isRangeValid(utils, range) && utils.isSameDay(day, range[1]);\n};\nexport const validateDate = (utils, value, {\n disablePast,\n disableFuture,\n minDate,\n maxDate,\n shouldDisableDate\n}) => {\n const now = utils.date();\n const date = utils.date(value);\n\n if (date === null) {\n return null;\n }\n\n switch (true) {\n case !utils.isValid(value):\n return 'invalidDate';\n\n case Boolean(shouldDisableDate && shouldDisableDate(date)):\n return 'shouldDisableDate';\n\n case Boolean(disableFuture && utils.isAfterDay(date, now)):\n return 'disableFuture';\n\n case Boolean(disablePast && utils.isBeforeDay(date, now)):\n return 'disablePast';\n\n case Boolean(minDate && utils.isBeforeDay(date, minDate)):\n return 'minDate';\n\n case Boolean(maxDate && utils.isAfterDay(date, maxDate)):\n return 'maxDate';\n\n default:\n return null;\n }\n};\nexport const validateDateRange = (utils, value, dateValidationProps) => {\n const [start, end] = value; // for partial input\n\n if (start === null || end === null) {\n return [null, null];\n }\n\n const dateValidations = [validateDate(utils, start, dateValidationProps), validateDate(utils, end, dateValidationProps)];\n\n if (dateValidations[0] || dateValidations[1]) {\n return dateValidations;\n }\n\n if (!isRangeValid(utils, [utils.date(start), utils.date(end)])) {\n return ['invalidRange', 'invalidRange'];\n }\n\n return [null, null];\n};","import * as React from 'react';\nimport clsx from 'clsx';\nimport Fade from '@mui/material/Fade';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/core';\nimport { TransitionGroup } from 'react-transition-group';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst classes = generateUtilityClasses('PrivatePickersFadeTransitionGroup', ['root']);\nconst animationDuration = 500;\nconst PickersFadeTransitionGroupRoot = styled(TransitionGroup, {\n skipSx: true\n})(() => ({\n display: 'block',\n position: 'relative'\n}));\n/**\n * @ignore - do not document.\n */\n\nconst PickersFadeTransitionGroup = ({\n children,\n className,\n reduceAnimations,\n transKey\n}) => {\n if (reduceAnimations) {\n return children;\n }\n\n return /*#__PURE__*/_jsx(PickersFadeTransitionGroupRoot, {\n className: clsx(classes.root, className),\n children: /*#__PURE__*/_jsx(Fade, {\n appear: false,\n mountOnEnter: true,\n unmountOnExit: true,\n timeout: {\n appear: animationDuration,\n enter: animationDuration / 2,\n exit: 0\n },\n children: children\n }, transKey)\n });\n};\n\nexport default PickersFadeTransitionGroup;","export const DAY_SIZE = 36;\nexport const DAY_MARGIN = 2;\nexport const DIALOG_WIDTH = 320;\nexport const VIEW_HEIGHT = 358;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"allowSameDateSelection\", \"autoFocus\", \"className\", \"day\", \"disabled\", \"disableHighlightToday\", \"disableMargin\", \"hidden\", \"isAnimating\", \"onClick\", \"onDayFocus\", \"onDaySelect\", \"onFocus\", \"onKeyDown\", \"outsideCurrentMonth\", \"selected\", \"showDaysOutsideCurrentMonth\", \"children\", \"today\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '@mui/material/ButtonBase';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/core';\nimport { useTheme, alpha, styled, useThemeProps } from '@mui/material/styles';\nimport { useForkRef } from '@mui/material/utils';\nimport { useUtils } from '../internal/pickers/hooks/useUtils';\nimport { DAY_SIZE, DAY_MARGIN } from '../internal/pickers/constants/dimensions';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getPickersDayUtilityClass(slot) {\n return generateUtilityClass('MuiPickersDay', slot);\n}\nexport const pickersDayClasses = generateUtilityClasses('MuiPickersDay', ['root', 'dayWithMargin', 'dayOutsideMonth', 'hiddenDaySpacingFiller', 'today', 'selected', 'disabled']);\n\nconst useUtilityClasses = ownerState => {\n const {\n selected,\n disableMargin,\n disableHighlightToday,\n today,\n outsideCurrentMonth,\n showDaysOutsideCurrentMonth,\n classes\n } = ownerState;\n const slots = {\n root: ['root', selected && 'selected', !disableMargin && 'dayWithMargin', !disableHighlightToday && today && 'today', outsideCurrentMonth && showDaysOutsideCurrentMonth && 'dayOutsideMonth'],\n hiddenDaySpacingFiller: ['hiddenDaySpacingFiller']\n };\n return composeClasses(slots, getPickersDayUtilityClass, classes);\n};\n\nconst styleArg = ({\n theme,\n ownerState\n}) => _extends({}, theme.typography.caption, {\n width: DAY_SIZE,\n height: DAY_SIZE,\n borderRadius: '50%',\n padding: 0,\n // background required here to prevent collides with the other days when animating with transition group\n backgroundColor: theme.palette.background.paper,\n color: theme.palette.text.primary,\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:focus': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n [`&.${pickersDayClasses.selected}`]: {\n willChange: 'background-color',\n backgroundColor: theme.palette.primary.dark\n }\n },\n [`&.${pickersDayClasses.selected}`]: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n willChange: 'background-color',\n backgroundColor: theme.palette.primary.dark\n }\n },\n [`&.${pickersDayClasses.disabled}`]: {\n color: theme.palette.text.disabled\n }\n}, !ownerState.disableMargin && {\n margin: `0 ${DAY_MARGIN}px`\n}, ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && {\n color: theme.palette.text.secondary\n}, !ownerState.disableHighlightToday && ownerState.today && {\n [`&:not(.${pickersDayClasses.selected})`]: {\n border: `1px solid ${theme.palette.text.secondary}`\n }\n});\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableMargin && styles.dayWithMargin, !ownerState.disableHighlightToday && ownerState.today && styles.today, !ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && styles.dayOutsideMonth, ownerState.outsideCurrentMonth && !ownerState.showDaysOutsideCurrentMonth && styles.hiddenDaySpacingFiller];\n};\n\nconst PickersDayRoot = styled(ButtonBase, {\n name: 'MuiPickersDay',\n slot: 'Root',\n overridesResolver\n})(styleArg);\nconst PickersDayFiller = styled('div', {\n name: 'MuiPickersDay',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({}, styleArg({\n theme,\n ownerState\n}), {\n visibility: 'hidden'\n}));\n\nconst noop = () => {};\n\nconst PickersDay = /*#__PURE__*/React.forwardRef(function PickersDay(inProps, forwardedRef) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersDay'\n });\n\n const {\n allowSameDateSelection = false,\n autoFocus = false,\n className,\n day,\n disabled = false,\n disableHighlightToday = false,\n disableMargin = false,\n isAnimating,\n onClick,\n onDayFocus = noop,\n onDaySelect,\n onFocus,\n onKeyDown,\n outsideCurrentMonth,\n selected = false,\n showDaysOutsideCurrentMonth = false,\n children,\n today: isToday = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n allowSameDateSelection,\n autoFocus,\n disabled,\n disableHighlightToday,\n disableMargin,\n selected,\n showDaysOutsideCurrentMonth,\n today: isToday\n });\n\n const classes = useUtilityClasses(ownerState);\n const utils = useUtils();\n const ref = React.useRef(null);\n const handleRef = useForkRef(ref, forwardedRef); // Since this is rendered when a Popper is opened we can't use passive effects.\n // Focusing in passive effects in Popper causes scroll jump.\n\n useEnhancedEffect(() => {\n if (autoFocus && !disabled && !isAnimating && !outsideCurrentMonth) {\n // ref.current being null would be a bug in MUI\n ref.current.focus();\n }\n }, [autoFocus, disabled, isAnimating, outsideCurrentMonth]);\n\n const handleFocus = event => {\n if (onDayFocus) {\n onDayFocus(day);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleClick = event => {\n if (!allowSameDateSelection && selected) {\n return;\n }\n\n if (!disabled) {\n onDaySelect(day, 'finish');\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n const theme = useTheme();\n\n function handleKeyDown(event) {\n if (onKeyDown !== undefined) {\n onKeyDown(event);\n }\n\n switch (event.key) {\n case 'ArrowUp':\n onDayFocus(utils.addDays(day, -7));\n event.preventDefault();\n break;\n\n case 'ArrowDown':\n onDayFocus(utils.addDays(day, 7));\n event.preventDefault();\n break;\n\n case 'ArrowLeft':\n onDayFocus(utils.addDays(day, theme.direction === 'ltr' ? -1 : 1));\n event.preventDefault();\n break;\n\n case 'ArrowRight':\n onDayFocus(utils.addDays(day, theme.direction === 'ltr' ? 1 : -1));\n event.preventDefault();\n break;\n\n case 'Home':\n onDayFocus(utils.startOfWeek(day));\n event.preventDefault();\n break;\n\n case 'End':\n onDayFocus(utils.endOfWeek(day));\n event.preventDefault();\n break;\n\n case 'PageUp':\n onDayFocus(utils.getNextMonth(day));\n event.preventDefault();\n break;\n\n case 'PageDown':\n onDayFocus(utils.getPreviousMonth(day));\n event.preventDefault();\n break;\n\n default:\n break;\n }\n }\n\n if (outsideCurrentMonth && !showDaysOutsideCurrentMonth) {\n return /*#__PURE__*/_jsx(PickersDayFiller, {\n className: clsx(classes.root, classes.hiddenDaySpacingFiller, className),\n ownerState: ownerState\n });\n }\n\n return /*#__PURE__*/_jsx(PickersDayRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: handleRef,\n centerRipple: true,\n disabled: disabled,\n \"aria-label\": !children ? utils.format(day, 'fullDate') : undefined,\n tabIndex: selected ? 0 : -1,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onClick: handleClick\n }, other, {\n children: !children ? utils.format(day, 'dayOfMonth') : children\n }));\n});\nexport const areDayPropsEqual = (prevProps, nextProps) => {\n return prevProps.autoFocus === nextProps.autoFocus && prevProps.isAnimating === nextProps.isAnimating && prevProps.today === nextProps.today && prevProps.disabled === nextProps.disabled && prevProps.selected === nextProps.selected && prevProps.disableMargin === nextProps.disableMargin && prevProps.showDaysOutsideCurrentMonth === nextProps.showDaysOutsideCurrentMonth && prevProps.disableHighlightToday === nextProps.disableHighlightToday && prevProps.className === nextProps.className && prevProps.outsideCurrentMonth === nextProps.outsideCurrentMonth && prevProps.onDayFocus === nextProps.onDayFocus && prevProps.onDaySelect === nextProps.onDaySelect;\n};\nprocess.env.NODE_ENV !== \"production\" ? PickersDay.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, `onChange` is fired on click even if the same date is selected.\n * @default false\n */\n allowSameDateSelection: PropTypes.bool,\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The date to show.\n */\n day: PropTypes.any.isRequired,\n\n /**\n * If `true`, renders as disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, todays date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * If `true`, days are rendering without margin. Useful for displaying linked range of days.\n * @default false\n */\n disableMargin: PropTypes.bool,\n\n /**\n * @ignore\n */\n hidden: PropTypes.bool,\n\n /**\n * @ignore\n */\n isAnimating: PropTypes.bool,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onDayFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onDaySelect: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * If `true`, day is outside of month and will be hidden.\n */\n outsideCurrentMonth: PropTypes.bool.isRequired,\n\n /**\n * If `true`, renders as selected.\n * @default false\n */\n selected: PropTypes.bool,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * If `true`, renders as today date.\n * @default false\n */\n today: PropTypes.bool\n} : void 0;\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n *\n * API:\n *\n * - [PickersDay API](https://mui.com/api/pickers-day/)\n */\n\nexport default /*#__PURE__*/React.memo(PickersDay, areDayPropsEqual);","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"reduceAnimations\", \"slideDirection\", \"transKey\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/core';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst classes = generateUtilityClasses('PrivatePickersSlideTransition', ['root', 'slideEnter-left', 'slideEnter-right', 'slideEnterActive', 'slideEnterActive', 'slideExit', 'slideExitActiveLeft-left', 'slideExitActiveLeft-right']);\nexport const slideAnimationDuration = 350;\nconst PickersSlideTransitionRoot = styled(TransitionGroup, {\n skipSx: true\n})(({\n theme\n}) => {\n const slideTransition = theme.transitions.create('transform', {\n duration: slideAnimationDuration,\n easing: 'cubic-bezier(0.35, 0.8, 0.4, 1)'\n });\n return {\n display: 'block',\n position: 'relative',\n overflowX: 'hidden',\n '& > *': {\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0\n },\n [`& .${classes['slideEnter-left']}`]: {\n willChange: 'transform',\n transform: 'translate(100%)',\n zIndex: 1\n },\n [`& .${classes['slideEnter-right']}`]: {\n willChange: 'transform',\n transform: 'translate(-100%)',\n zIndex: 1\n },\n [`& .${classes.slideEnterActive}`]: {\n transform: 'translate(0%)',\n transition: slideTransition\n },\n [`& .${classes.slideExit}`]: {\n transform: 'translate(0%)'\n },\n [`& .${classes['slideExitActiveLeft-left']}`]: {\n willChange: 'transform',\n transform: 'translate(-100%)',\n transition: slideTransition,\n zIndex: 0\n },\n [`& .${classes['slideExitActiveLeft-right']}`]: {\n willChange: 'transform',\n transform: 'translate(100%)',\n transition: slideTransition,\n zIndex: 0\n }\n };\n});\n/**\n * @ignore - do not document.\n */\n\nconst PickersSlideTransition = _ref => {\n let {\n children,\n className,\n reduceAnimations,\n slideDirection,\n transKey\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n if (reduceAnimations) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx(classes.root, className),\n children: children\n });\n }\n\n const transitionClasses = {\n exit: classes.slideExit,\n enterActive: classes.slideEnterActive,\n enter: classes[`slideEnter-${slideDirection}`],\n exitActive: classes[`slideExitActiveLeft-${slideDirection}`]\n };\n return /*#__PURE__*/_jsx(PickersSlideTransitionRoot, {\n className: clsx(classes.root, className),\n childFactory: element => /*#__PURE__*/React.cloneElement(element, {\n classNames: transitionClasses\n }),\n children: /*#__PURE__*/_jsx(CSSTransition, _extends({\n mountOnEnter: true,\n unmountOnExit: true,\n timeout: slideAnimationDuration,\n classNames: transitionClasses\n }, other, {\n children: children\n }), transKey)\n });\n};\n\nexport default PickersSlideTransition;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _span;\n\nimport * as React from 'react';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport PickersDay from '../PickersDay/PickersDay';\nimport { useUtils, useNow } from '../internal/pickers/hooks/useUtils';\nimport { DAY_SIZE, DAY_MARGIN } from '../internal/pickers/constants/dimensions';\nimport SlideTransition from './PickersSlideTransition';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst weeksContainerHeight = (DAY_SIZE + DAY_MARGIN * 4) * 6;\nconst PickersCalendarDayHeader = styled('div', {\n skipSx: true\n})({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n});\nconst PickersCalendarWeekDayLabel = styled(Typography, {\n skipSx: true\n})(({\n theme\n}) => ({\n width: 36,\n height: 40,\n margin: '0 2px',\n textAlign: 'center',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: theme.palette.text.secondary\n}));\nconst PickersCalendarLoadingContainer = styled('div', {\n skipSx: true\n})({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: weeksContainerHeight\n});\nconst PickersCalendarSlideTransition = styled(SlideTransition, {\n skipSx: true\n})({\n minHeight: weeksContainerHeight\n});\nconst PickersCalendarWeekContainer = styled('div', {\n skipSx: true\n})({\n overflow: 'hidden'\n});\nconst PickersCalendarWeek = styled('div', {\n skipSx: true\n})({\n margin: `${DAY_MARGIN}px 0`,\n display: 'flex',\n justifyContent: 'center'\n});\n/**\n * @ignore - do not document.\n */\n\nfunction PickersCalendar(props) {\n const {\n allowSameDateSelection,\n autoFocus,\n onFocusedDayChange: changeFocusedDay,\n className,\n currentMonth,\n date,\n disableHighlightToday,\n focusedDay,\n isDateDisabled,\n isMonthSwitchingAnimating,\n loading,\n onChange,\n onMonthSwitchingAnimationEnd,\n reduceAnimations,\n renderDay,\n renderLoading = () => _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n children: \"...\"\n })),\n showDaysOutsideCurrentMonth,\n slideDirection,\n TransitionProps\n } = props;\n const now = useNow();\n const utils = useUtils();\n const handleDaySelect = React.useCallback((day, isFinish = 'finish') => {\n // TODO possibly buggy line figure out and add tests\n const finalDate = Array.isArray(date) ? day : utils.mergeDateAndTime(day, date || now);\n onChange(finalDate, isFinish);\n }, [date, now, onChange, utils]);\n const currentMonthNumber = utils.getMonth(currentMonth);\n const selectedDates = (Array.isArray(date) ? date : [date]).filter(Boolean).map(selectedDateItem => selectedDateItem && utils.startOfDay(selectedDateItem)); // need a new ref whenever the `key` of the transition changes: https://reactcommunity.org/react-transition-group/transition#Transition-prop-nodeRef.\n\n const transitionKey = currentMonthNumber; // eslint-disable-next-line react-hooks/exhaustive-deps\n\n const slideNodeRef = React.useMemo(() => /*#__PURE__*/React.createRef(), [transitionKey]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(PickersCalendarDayHeader, {\n children: utils.getWeekdays().map((day, i) => /*#__PURE__*/_jsx(PickersCalendarWeekDayLabel, {\n \"aria-hidden\": true,\n variant: \"caption\",\n children: day.charAt(0).toUpperCase()\n }, day + i.toString()))\n }), loading ? /*#__PURE__*/_jsx(PickersCalendarLoadingContainer, {\n children: renderLoading()\n }) : /*#__PURE__*/_jsx(PickersCalendarSlideTransition, _extends({\n transKey: transitionKey,\n onExited: onMonthSwitchingAnimationEnd,\n reduceAnimations: reduceAnimations,\n slideDirection: slideDirection,\n className: className\n }, TransitionProps, {\n nodeRef: slideNodeRef,\n children: /*#__PURE__*/_jsx(PickersCalendarWeekContainer, {\n ref: slideNodeRef,\n role: \"grid\",\n children: utils.getWeekArray(currentMonth).map(week => /*#__PURE__*/_jsx(PickersCalendarWeek, {\n role: \"row\",\n children: week.map(day => {\n const pickersDayProps = {\n key: day == null ? void 0 : day.toString(),\n day,\n isAnimating: isMonthSwitchingAnimating,\n disabled: isDateDisabled(day),\n allowSameDateSelection,\n autoFocus: autoFocus && focusedDay !== null && utils.isSameDay(day, focusedDay),\n today: utils.isSameDay(day, now),\n outsideCurrentMonth: utils.getMonth(day) !== currentMonthNumber,\n selected: selectedDates.some(selectedDate => selectedDate && utils.isSameDay(selectedDate, day)),\n disableHighlightToday,\n showDaysOutsideCurrentMonth,\n onDayFocus: changeFocusedDay,\n onDaySelect: handleDaySelect\n };\n return renderDay ? renderDay(day, selectedDates, pickersDayProps) : /*#__PURE__*/_jsx(\"div\", {\n role: \"cell\",\n children: /*#__PURE__*/_jsx(PickersDay, _extends({}, pickersDayProps))\n }, pickersDayProps.key);\n })\n }, `week-${week[0]}`))\n })\n }))]\n });\n}\n\nexport default PickersCalendar;","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Fade from '@mui/material/Fade';\nimport { styled } from '@mui/material/styles';\nimport IconButton from '@mui/material/IconButton';\nimport { useUtils } from '../internal/pickers/hooks/useUtils';\nimport FadeTransitionGroup from './PickersFadeTransitionGroup';\n// tslint:disable-next-line no-relative-import-in-test\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport PickersArrowSwitcher from '../internal/pickers/PickersArrowSwitcher';\nimport { usePreviousMonthDisabled, useNextMonthDisabled } from '../internal/pickers/hooks/date-helpers-hooks';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersCalendarHeaderRoot = styled('div', {\n skipSx: true\n})({\n display: 'flex',\n alignItems: 'center',\n marginTop: 16,\n marginBottom: 8,\n paddingLeft: 24,\n paddingRight: 12,\n // prevent jumping in safari\n maxHeight: 30,\n minHeight: 30\n});\nconst PickersCalendarHeaderLabel = styled('div', {\n skipSx: true\n})(({\n theme\n}) => _extends({\n display: 'flex',\n maxHeight: 30,\n overflow: 'hidden',\n alignItems: 'center',\n cursor: 'pointer',\n marginRight: 'auto'\n}, theme.typography.body1, {\n fontWeight: theme.typography.fontWeightMedium\n}));\nconst PickersCalendarHeaderLabelItem = styled('div', {\n skipSx: true\n})({\n marginRight: 6\n});\nconst PickersCalendarHeaderSwitchViewButton = styled(IconButton, {\n skipSx: true\n})({\n marginRight: 'auto'\n});\nconst PickersCalendarHeaderSwitchView = styled(ArrowDropDownIcon, {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n willChange: 'transform',\n transition: theme.transitions.create('transform'),\n transform: 'rotate(0deg)'\n}, ownerState.openView === 'year' && {\n transform: 'rotate(180deg)'\n}));\n\nfunction getSwitchingViewAriaText(view) {\n return view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view';\n}\n/**\n * @ignore - do not document.\n */\n\n\nfunction PickersCalendarHeader(props) {\n const {\n components = {},\n componentsProps = {},\n currentMonth: month,\n disableFuture,\n disablePast,\n getViewSwitchingButtonText = getSwitchingViewAriaText,\n leftArrowButtonText = 'Previous month',\n maxDate,\n minDate,\n onMonthChange,\n onViewChange,\n openView: currentView,\n reduceAnimations,\n rightArrowButtonText = 'Next month',\n views\n } = props;\n const utils = useUtils();\n const switchViewButtonProps = componentsProps.switchViewButton || {};\n\n const selectNextMonth = () => onMonthChange(utils.getNextMonth(month), 'left');\n\n const selectPreviousMonth = () => onMonthChange(utils.getPreviousMonth(month), 'right');\n\n const isNextMonthDisabled = useNextMonthDisabled(month, {\n disableFuture,\n maxDate\n });\n const isPreviousMonthDisabled = usePreviousMonthDisabled(month, {\n disablePast,\n minDate\n });\n\n const handleToggleView = () => {\n if (views.length === 1 || !onViewChange) {\n return;\n }\n\n if (views.length === 2) {\n onViewChange(views.find(view => view !== currentView) || views[0]);\n } else {\n // switching only between first 2\n const nextIndexToOpen = views.indexOf(currentView) !== 0 ? 0 : 1;\n onViewChange(views[nextIndexToOpen]);\n }\n }; // No need to display more information\n\n\n if (views.length === 1 && views[0] === 'year') {\n return null;\n }\n\n const ownerState = props;\n return /*#__PURE__*/_jsxs(PickersCalendarHeaderRoot, {\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsxs(PickersCalendarHeaderLabel, {\n role: \"presentation\",\n onClick: handleToggleView,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(FadeTransitionGroup, {\n reduceAnimations: reduceAnimations,\n transKey: utils.format(month, 'month'),\n children: /*#__PURE__*/_jsx(PickersCalendarHeaderLabelItem, {\n \"aria-live\": \"polite\",\n ownerState: ownerState,\n children: utils.format(month, 'month')\n })\n }), /*#__PURE__*/_jsx(FadeTransitionGroup, {\n reduceAnimations: reduceAnimations,\n transKey: utils.format(month, 'year'),\n children: /*#__PURE__*/_jsx(PickersCalendarHeaderLabelItem, {\n \"aria-live\": \"polite\",\n ownerState: ownerState,\n children: utils.format(month, 'year')\n })\n }), views.length > 1 && /*#__PURE__*/_jsx(PickersCalendarHeaderSwitchViewButton, _extends({\n size: \"small\",\n as: components.SwitchViewButton,\n \"aria-label\": getViewSwitchingButtonText(currentView)\n }, switchViewButtonProps, {\n children: /*#__PURE__*/_jsx(PickersCalendarHeaderSwitchView, {\n as: components.SwitchViewIcon,\n ownerState: ownerState\n })\n }))]\n }), /*#__PURE__*/_jsx(Fade, {\n in: currentView === 'day',\n children: /*#__PURE__*/_jsx(PickersArrowSwitcher, {\n leftArrowButtonText: leftArrowButtonText,\n rightArrowButtonText: rightArrowButtonText,\n components: components,\n componentsProps: componentsProps,\n onLeftClick: selectPreviousMonth,\n onRightClick: selectNextMonth,\n isLeftDisabled: isPreviousMonthDisabled,\n isRightDisabled: isNextMonthDisabled\n })\n })]\n });\n}\n\nexport default PickersCalendarHeader;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { useForkRef, capitalize } from '@mui/material/utils';\nimport { alpha, styled } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/core';\nimport { WrapperVariantContext } from '../internal/pickers/wrappers/WrapperVariantContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getPickersYearUtilityClass(slot) {\n return generateUtilityClass('PrivatePickersYear', slot);\n}\nexport const pickersYearClasses = generateUtilityClasses('PrivatePickersYear', ['root', 'modeMobile', 'modeDesktop', 'yearButton', 'disabled', 'selected']);\n\nconst useUtilityClasses = ownerState => {\n const {\n wrapperVariant,\n disabled,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', wrapperVariant && `mode${capitalize(wrapperVariant)}`],\n yearButton: ['yearButton', disabled && 'disabled', selected && 'selected']\n };\n return composeClasses(slots, getPickersYearUtilityClass, classes);\n};\n\nconst PickersYearRoot = styled('div', {\n skipSx: true\n})(({\n ownerState\n}) => _extends({\n flexBasis: '33.3%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n}, (ownerState == null ? void 0 : ownerState.wrapperVariant) === 'desktop' && {\n flexBasis: '25%'\n}));\nconst PickersYearButton = styled('button', {\n skipSx: true\n})(({\n theme\n}) => _extends({\n color: 'unset',\n backgroundColor: 'transparent',\n border: 0,\n outline: 0\n}, theme.typography.subtitle1, {\n margin: '8px 0',\n height: 36,\n width: 72,\n borderRadius: 16,\n cursor: 'pointer',\n '&:focus, &:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n [`&.${pickersYearClasses.disabled}`]: {\n color: theme.palette.text.secondary\n },\n [`&.${pickersYearClasses.selected}`]: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:focus, &:hover': {\n backgroundColor: theme.palette.primary.dark\n }\n }\n}));\n/**\n * @ignore - internal component.\n */\n\nconst PickersYear = /*#__PURE__*/React.forwardRef(function PickersYear(props, forwardedRef) {\n const {\n autoFocus,\n className,\n children,\n disabled,\n onClick,\n onKeyDown,\n selected,\n value\n } = props;\n const ref = React.useRef(null);\n const refHandle = useForkRef(ref, forwardedRef);\n const wrapperVariant = React.useContext(WrapperVariantContext);\n\n const ownerState = _extends({}, props, {\n wrapperVariant\n });\n\n const classes = useUtilityClasses(ownerState); // TODO: Can we just forward this to the button?\n\n React.useEffect(() => {\n if (autoFocus) {\n // `ref.current` being `null` would be a bug in MUIu\n ref.current.focus();\n }\n }, [autoFocus]);\n return /*#__PURE__*/_jsx(PickersYearRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(PickersYearButton, {\n ref: refHandle,\n disabled: disabled,\n type: \"button\",\n tabIndex: selected ? 0 : -1,\n onClick: event => onClick(event, value),\n onKeyDown: event => onKeyDown(event, value),\n className: classes.yearButton,\n ownerState: ownerState,\n children: children\n })\n });\n});\nexport default PickersYear;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getYearPickerUtilityClass(slot) {\n return generateUtilityClass('MuiYearPicker', slot);\n}\nconst yearPickerClasses = generateUtilityClasses('MuiYearPicker', ['root']);\nexport default yearPickerClasses;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTheme, styled, useThemeProps as useThemProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport clsx from 'clsx';\nimport PickersYear from './PickersYear';\nimport { useUtils, useNow } from '../internal/pickers/hooks/useUtils';\nimport { findClosestEnabledDate } from '../internal/pickers/date-utils';\nimport { WrapperVariantContext } from '../internal/pickers/wrappers/WrapperVariantContext';\nimport { getYearPickerUtilityClass } from './yearPickerClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getYearPickerUtilityClass, classes);\n};\n\nconst YearPickerRoot = styled('div', {\n name: 'MuiYearPicker',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n overflowY: 'auto',\n height: '100%',\n margin: '0 4px'\n});\nconst YearPicker = /*#__PURE__*/React.forwardRef(function YearPicker(inProps, ref) {\n const props = useThemProps({\n props: inProps,\n name: 'MuiYearPicker'\n });\n const {\n autoFocus,\n className,\n date,\n disableFuture,\n disablePast,\n isDateDisabled,\n maxDate,\n minDate,\n onChange,\n onFocusedDayChange,\n onYearChange,\n shouldDisableYear\n } = props;\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const now = useNow();\n const theme = useTheme();\n const utils = useUtils();\n const selectedDate = date || now;\n const currentYear = utils.getYear(selectedDate);\n const wrapperVariant = React.useContext(WrapperVariantContext);\n const selectedYearRef = React.useRef(null);\n const [focusedYear, setFocusedYear] = React.useState(currentYear);\n\n const handleYearSelection = (event, year, isFinish = 'finish') => {\n const submitDate = newDate => {\n onChange(newDate, isFinish);\n\n if (onFocusedDayChange) {\n onFocusedDayChange(newDate || now);\n }\n\n if (onYearChange) {\n onYearChange(newDate);\n }\n };\n\n const newDate = utils.setYear(selectedDate, year);\n\n if (isDateDisabled(newDate)) {\n const closestEnabledDate = findClosestEnabledDate({\n utils,\n date: newDate,\n minDate,\n maxDate,\n disablePast: Boolean(disablePast),\n disableFuture: Boolean(disableFuture),\n shouldDisableDate: isDateDisabled\n });\n submitDate(closestEnabledDate || now);\n } else {\n submitDate(newDate);\n }\n };\n\n const focusYear = React.useCallback(year => {\n if (!isDateDisabled(utils.setYear(selectedDate, year))) {\n setFocusedYear(year);\n }\n }, [selectedDate, isDateDisabled, utils]);\n const yearsInRow = wrapperVariant === 'desktop' ? 4 : 3;\n\n const handleKeyDown = (event, year) => {\n switch (event.key) {\n case 'ArrowUp':\n focusYear(year - yearsInRow);\n event.preventDefault();\n break;\n\n case 'ArrowDown':\n focusYear(year + yearsInRow);\n event.preventDefault();\n break;\n\n case 'ArrowLeft':\n focusYear(year + (theme.direction === 'ltr' ? -1 : 1));\n event.preventDefault();\n break;\n\n case 'ArrowRight':\n focusYear(year + (theme.direction === 'ltr' ? 1 : -1));\n event.preventDefault();\n break;\n\n default:\n break;\n }\n };\n\n return /*#__PURE__*/_jsx(YearPickerRoot, {\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n children: utils.getYearRange(minDate, maxDate).map(year => {\n const yearNumber = utils.getYear(year);\n const selected = yearNumber === currentYear;\n return /*#__PURE__*/_jsx(PickersYear, {\n selected: selected,\n value: yearNumber,\n onClick: handleYearSelection,\n onKeyDown: handleKeyDown,\n autoFocus: autoFocus && yearNumber === focusedYear,\n ref: selected ? selectedYearRef : undefined,\n disabled: disablePast && utils.isBeforeYear(year, now) || disableFuture && utils.isAfterYear(year, now) || shouldDisableYear && shouldDisableYear(year),\n children: utils.format(year, 'year')\n }, utils.format(year, 'year'));\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? YearPicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * @ignore\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n date: PropTypes.any,\n\n /**\n * @ignore\n */\n disableFuture: PropTypes.bool,\n\n /**\n * @ignore\n */\n disablePast: PropTypes.bool,\n\n /**\n * @ignore\n */\n isDateDisabled: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n maxDate: PropTypes.any.isRequired,\n\n /**\n * @ignore\n */\n minDate: PropTypes.any.isRequired,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * @ignore\n */\n onFocusedDayChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n */\n shouldDisableYear: PropTypes.func\n} : void 0;\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n *\n * API:\n *\n * - [YearPicker API](https://mui.com/api/year-picker/)\n */\n\nexport default YearPicker;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nvar _span;\n\nconst _excluded = [\"autoFocus\", \"onViewChange\", \"date\", \"disableFuture\", \"disablePast\", \"defaultCalendarMonth\", \"loading\", \"maxDate\", \"minDate\", \"onChange\", \"onMonthChange\", \"reduceAnimations\", \"renderLoading\", \"shouldDisableDate\", \"shouldDisableYear\", \"view\", \"views\", \"openTo\", \"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/core';\nimport MonthPicker from '../MonthPicker/MonthPicker';\nimport { useCalendarState } from './useCalendarState';\nimport { useDefaultDates, useUtils } from '../internal/pickers/hooks/useUtils';\nimport FadeTransitionGroup from './PickersFadeTransitionGroup';\nimport PickersCalendar from './PickersCalendar';\nimport { useViews } from '../internal/pickers/hooks/useViews';\nimport PickersCalendarHeader from './PickersCalendarHeader';\nimport YearPicker from '../YearPicker/YearPicker';\nimport { findClosestEnabledDate } from '../internal/pickers/date-utils';\nimport PickerView from '../internal/pickers/Picker/PickerView';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function getCalendarPickerUtilityClass(slot) {\n return generateUtilityClass('MuiCalendarPicker', slot);\n}\nexport const calendarPickerClasses = generateUtilityClasses('MuiCalendarPicker', ['root', 'viewTransitionContainer']);\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n viewTransitionContainer: ['viewTransitionContainer']\n };\n return composeClasses(slots, getCalendarPickerUtilityClass, classes);\n};\n\nconst CalendarPickerRoot = styled(PickerView, {\n name: 'MuiCalendarPicker',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'column'\n});\nconst CalendarPickerViewTransitionContainer = styled(FadeTransitionGroup, {\n name: 'MuiCalendarPicker',\n slot: 'ViewTransitionContainer',\n overridesResolver: (props, styles) => styles.viewTransitionContainer\n})({\n overflowY: 'auto'\n});\nexport const defaultReduceAnimations = typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent);\nconst CalendarPicker = /*#__PURE__*/React.forwardRef(function CalendarPicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCalendarPicker'\n });\n\n const {\n autoFocus,\n onViewChange,\n date,\n disableFuture = false,\n disablePast = false,\n defaultCalendarMonth,\n loading = false,\n maxDate: maxDateProp,\n minDate: minDateProp,\n onChange,\n onMonthChange,\n reduceAnimations = defaultReduceAnimations,\n renderLoading = () => _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n children: \"...\"\n })),\n shouldDisableDate,\n shouldDisableYear,\n view,\n views = ['year', 'day'],\n openTo = 'day',\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const minDate = minDateProp != null ? minDateProp : defaultDates.minDate;\n const maxDate = maxDateProp != null ? maxDateProp : defaultDates.maxDate;\n const {\n openView,\n setOpenView\n } = useViews({\n view,\n views,\n openTo,\n onChange,\n onViewChange\n });\n const {\n calendarState,\n changeFocusedDay,\n changeMonth,\n isDateDisabled,\n handleChangeMonth,\n onMonthSwitchingAnimationEnd\n } = useCalendarState({\n date,\n defaultCalendarMonth,\n reduceAnimations,\n onMonthChange,\n minDate,\n maxDate,\n shouldDisableDate,\n disablePast,\n disableFuture\n });\n React.useEffect(() => {\n if (date && isDateDisabled(date)) {\n const closestEnabledDate = findClosestEnabledDate({\n utils,\n date,\n minDate,\n maxDate,\n disablePast,\n disableFuture,\n shouldDisableDate: isDateDisabled\n });\n onChange(closestEnabledDate, 'partial');\n } // This call is too expensive to run it on each prop change.\n // So just ensure that we are not rendering disabled as selected on mount.\n\n }, []); // eslint-disable-line\n\n React.useEffect(() => {\n if (date) {\n changeMonth(date);\n }\n }, [date]); // eslint-disable-line\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(CalendarPickerRoot, {\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(PickersCalendarHeader, _extends({}, other, {\n views: views,\n openView: openView,\n currentMonth: calendarState.currentMonth,\n onViewChange: setOpenView,\n onMonthChange: (newMonth, direction) => handleChangeMonth({\n newMonth,\n direction\n }),\n minDate: minDate,\n maxDate: maxDate,\n disablePast: disablePast,\n disableFuture: disableFuture,\n reduceAnimations: reduceAnimations\n })), /*#__PURE__*/_jsx(CalendarPickerViewTransitionContainer, {\n reduceAnimations: reduceAnimations,\n className: classes.viewTransitionContainer,\n transKey: openView,\n ownerState: ownerState,\n children: /*#__PURE__*/_jsxs(\"div\", {\n children: [openView === 'year' && /*#__PURE__*/_jsx(YearPicker, _extends({}, other, {\n autoFocus: autoFocus,\n date: date,\n onChange: onChange,\n minDate: minDate,\n maxDate: maxDate,\n disableFuture: disableFuture,\n disablePast: disablePast,\n isDateDisabled: isDateDisabled,\n shouldDisableYear: shouldDisableYear,\n onFocusedDayChange: changeFocusedDay\n })), openView === 'month' && /*#__PURE__*/_jsx(MonthPicker, _extends({}, other, {\n date: date,\n onChange: onChange,\n minDate: minDate,\n maxDate: maxDate,\n onMonthChange: onMonthChange\n })), openView === 'day' && /*#__PURE__*/_jsx(PickersCalendar, _extends({}, other, calendarState, {\n autoFocus: autoFocus,\n onMonthSwitchingAnimationEnd: onMonthSwitchingAnimationEnd,\n onFocusedDayChange: changeFocusedDay,\n reduceAnimations: reduceAnimations,\n date: date,\n onChange: onChange,\n isDateDisabled: isDateDisabled,\n loading: loading,\n renderLoading: renderLoading\n }))]\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? CalendarPicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * @ignore\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n date: PropTypes.any,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Max selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Min selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Callback fired on date change\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback firing on month change. @DateIOType\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired on view change.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Initially open view.\n * @default 'day'\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Component displaying when passed `loading` true.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Disable specific date. @DateIOType\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * Controlled open view.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Views for calendar picker.\n * @default ['year', 'day']\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)\n} : void 0;\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n *\n * API:\n *\n * - [CalendarPicker API](https://mui.com/api/calendar-picker/)\n */\n\nexport default CalendarPicker;","import { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH, VIEW_HEIGHT } from '../constants/dimensions';\nconst PickerView = styled('div')({\n overflowX: 'hidden',\n width: DIALOG_WIDTH,\n maxHeight: VIEW_HEIGHT,\n display: 'flex',\n flexDirection: 'column',\n margin: '0 auto'\n});\nexport default PickerView;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { validateDate } from '../internal/pickers/date-utils';\nimport { useUtils, useNow } from '../internal/pickers/hooks/useUtils';\nexport const createCalendarStateReducer = (reduceAnimations, disableSwitchToMonthOnDayFocus, utils) => (state, action) => {\n switch (action.type) {\n case 'changeMonth':\n return _extends({}, state, {\n slideDirection: action.direction,\n currentMonth: action.newMonth,\n isMonthSwitchingAnimating: !reduceAnimations\n });\n\n case 'finishMonthSwitchingAnimation':\n return _extends({}, state, {\n isMonthSwitchingAnimating: false\n });\n\n case 'changeFocusedDay':\n {\n if (state.focusedDay !== null && utils.isSameDay(action.focusedDay, state.focusedDay)) {\n return state;\n }\n\n const needMonthSwitch = Boolean(action.focusedDay) && !disableSwitchToMonthOnDayFocus && !utils.isSameMonth(state.currentMonth, action.focusedDay);\n return _extends({}, state, {\n focusedDay: action.focusedDay,\n isMonthSwitchingAnimating: needMonthSwitch && !reduceAnimations,\n currentMonth: needMonthSwitch ? utils.startOfMonth(action.focusedDay) : state.currentMonth,\n slideDirection: utils.isAfterDay(action.focusedDay, state.currentMonth) ? 'left' : 'right'\n });\n }\n\n default:\n throw new Error('missing support');\n }\n};\nexport function useCalendarState({\n date,\n defaultCalendarMonth,\n disableFuture,\n disablePast,\n disableSwitchToMonthOnDayFocus = false,\n maxDate,\n minDate,\n onMonthChange,\n reduceAnimations,\n shouldDisableDate\n}) {\n var _ref;\n\n const now = useNow();\n const utils = useUtils();\n const reducerFn = React.useRef(createCalendarStateReducer(Boolean(reduceAnimations), disableSwitchToMonthOnDayFocus, utils)).current;\n const [calendarState, dispatch] = React.useReducer(reducerFn, {\n isMonthSwitchingAnimating: false,\n focusedDay: date || now,\n currentMonth: utils.startOfMonth((_ref = date != null ? date : defaultCalendarMonth) != null ? _ref : now),\n slideDirection: 'left'\n });\n const handleChangeMonth = React.useCallback(payload => {\n dispatch(_extends({\n type: 'changeMonth'\n }, payload));\n\n if (onMonthChange) {\n onMonthChange(payload.newMonth);\n }\n }, [onMonthChange]);\n const changeMonth = React.useCallback(newDate => {\n const newDateRequested = newDate != null ? newDate : now;\n\n if (utils.isSameMonth(newDateRequested, calendarState.currentMonth)) {\n return;\n }\n\n handleChangeMonth({\n newMonth: utils.startOfMonth(newDateRequested),\n direction: utils.isAfterDay(newDateRequested, calendarState.currentMonth) ? 'left' : 'right'\n });\n }, [calendarState.currentMonth, handleChangeMonth, now, utils]);\n const isDateDisabled = React.useCallback(day => validateDate(utils, day, {\n disablePast,\n disableFuture,\n minDate,\n maxDate,\n shouldDisableDate\n }) !== null, [disableFuture, disablePast, maxDate, minDate, shouldDisableDate, utils]);\n const onMonthSwitchingAnimationEnd = React.useCallback(() => {\n dispatch({\n type: 'finishMonthSwitchingAnimation'\n });\n }, []);\n const changeFocusedDay = React.useCallback(newFocusedDate => {\n if (!isDateDisabled(newFocusedDate)) {\n dispatch({\n type: 'changeFocusedDay',\n focusedDay: newFocusedDate\n });\n }\n }, [isDateDisabled]);\n return {\n calendarState,\n changeMonth,\n changeFocusedDay,\n isDateDisabled,\n onMonthSwitchingAnimationEnd,\n handleChangeMonth\n };\n}","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getInputAdornmentUtilityClass(slot) {\n return generateUtilityClass('MuiInputAdornment', slot);\n}\nconst inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);\nexport default inputAdornmentClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"disablePointerEvents\", \"disableTypography\", \"position\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport capitalize from '../utils/capitalize';\nimport Typography from '../Typography';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport useFormControl from '../FormControl/useFormControl';\nimport styled from '../styles/styled';\nimport inputAdornmentClasses, { getInputAdornmentUtilityClass } from './inputAdornmentClasses';\nimport useThemeProps from '../styles/useThemeProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], ownerState.disablePointerEvents === true && styles.disablePointerEvents, styles[ownerState.variant]];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePointerEvents,\n hiddenLabel,\n position,\n size,\n variant\n } = ownerState;\n const slots = {\n root: ['root', disablePointerEvents && 'disablePointerEvents', position && `position${capitalize(position)}`, variant, hiddenLabel && 'hiddenLabel', size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getInputAdornmentUtilityClass, classes);\n};\n\nconst InputAdornmentRoot = styled('div', {\n name: 'MuiInputAdornment',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'flex',\n height: '0.01em',\n // Fix IE11 flexbox alignment. To remove at some point.\n maxHeight: '2em',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: theme.palette.action.active\n}, ownerState.variant === 'filled' && {\n // Styles applied to the root element if `variant=\"filled\"`.\n [`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {\n marginTop: 16\n }\n}, ownerState.position === 'start' && {\n // Styles applied to the root element if `position=\"start\"`.\n marginRight: 8\n}, ownerState.position === 'end' && {\n // Styles applied to the root element if `position=\"end\"`.\n marginLeft: 8\n}, ownerState.disablePointerEvents === true && {\n // Styles applied to the root element if `disablePointerEvents={true}`.\n pointerEvents: 'none'\n}));\nconst InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiInputAdornment'\n });\n\n const {\n children,\n className,\n component = 'div',\n disablePointerEvents = false,\n disableTypography = false,\n position,\n variant: variantProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl() || {};\n let variant = variantProp;\n\n if (variantProp && muiFormControl.variant) {\n if (process.env.NODE_ENV !== 'production') {\n if (variantProp === muiFormControl.variant) {\n console.error('MUI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');\n }\n }\n }\n\n if (muiFormControl && !variant) {\n variant = muiFormControl.variant;\n }\n\n const ownerState = _extends({}, props, {\n hiddenLabel: muiFormControl.hiddenLabel,\n size: muiFormControl.size,\n disablePointerEvents,\n position,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(InputAdornmentRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/_jsx(Typography, {\n color: \"text.secondary\",\n children: children\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [position === 'start' ?\n /*#__PURE__*/\n\n /* notranslate needed while Google Translate will not fix zero-width space issue */\n\n /* eslint-disable-next-line react/no-danger */\n _jsx(\"span\", {\n className: \"notranslate\",\n dangerouslySetInnerHTML: {\n __html: '​'\n }\n }) : null, children]\n })\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputAdornment.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Disable pointer events on the root.\n * This allows for the content of the adornment to focus the `input` on click.\n * @default false\n */\n disablePointerEvents: PropTypes.bool,\n\n /**\n * If children is a string then disable wrapping in a Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The position this adornment should appear relative to the `Input`.\n */\n position: PropTypes.oneOf(['end', 'start']).isRequired,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n * Note: If you are using the `TextField` component or the `FormControl` component\n * you do not have to set this manually.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputAdornment;","export function getTextFieldAriaText(rawValue, utils) {\n // TODO: should `isValid` narrow `TDate | null` to `NonNullable<TDate>`?\n // Either we allow `TDate | null` to be valid and guard against calling `formatByString` with `null`.\n // Or we ensure `formatByString` is callable with `null`.\n return rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Choose date';\n}\nexport const getDisplayDate = (utils, value, inputFormat) => {\n const date = utils.date(value);\n const isEmpty = value === null;\n\n if (isEmpty) {\n return '';\n }\n\n return utils.isValid(date) ? utils.formatByString( // TODO: should `isValid` narrow `TDate | null` to `NonNullable<TDate>`?\n // Either we allow `TDate | null` to be valid and guard against calling `formatByString` with `null`.\n // Or we ensure `formatByString` is callable with `null`.\n date, inputFormat) : '';\n};\nexport function pick12hOr24hFormat(userFormat, ampm, formats) {\n if (userFormat) {\n return userFormat;\n }\n\n if (typeof ampm === 'undefined') {\n return formats.localized;\n }\n\n return ampm ? formats['12h'] : formats['24h'];\n}\nconst MASK_USER_INPUT_SYMBOL = '_';\nconst staticDateWith2DigitTokens = '2019-11-21T22:30:00.000';\nconst staticDateWith1DigitTokens = '2019-01-01T09:00:00.000';\nexport function checkMaskIsValidForCurrentFormat(mask, format, acceptRegex, utils) {\n const formattedDateWith1Digit = utils.formatByString(utils.date(staticDateWith1DigitTokens), format);\n const inferredFormatPatternWith1Digits = formattedDateWith1Digit.replace(acceptRegex, MASK_USER_INPUT_SYMBOL);\n const inferredFormatPatternWith2Digits = utils.formatByString(utils.date(staticDateWith2DigitTokens), format).replace(acceptRegex, '_');\n const isMaskValid = inferredFormatPatternWith2Digits === mask && inferredFormatPatternWith1Digits === mask;\n\n if (!isMaskValid && utils.lib !== 'luxon' && process.env.NODE_ENV !== 'production') {\n console.warn(`The mask \"${mask}\" you passed is not valid for the format used ${format}. Falling down to uncontrolled not-masked input.`);\n }\n\n return isMaskValid;\n}\nexport const maskedDateFormatter = (mask, acceptRegexp) => value => {\n return value.split('').map((char, i) => {\n acceptRegexp.lastIndex = 0;\n\n if (i > mask.length - 1) {\n return '';\n }\n\n const maskChar = mask[i];\n const nextMaskChar = mask[i + 1];\n const acceptedChar = acceptRegexp.test(char) ? char : '';\n const formattedChar = maskChar === MASK_USER_INPUT_SYMBOL ? acceptedChar : maskChar + acceptedChar;\n\n if (i === value.length - 1 && nextMaskChar && nextMaskChar !== MASK_USER_INPUT_SYMBOL) {\n // when cursor at the end of mask part (e.g. month) prerender next symbol \"21\" -> \"21/\"\n return formattedChar ? formattedChar + nextMaskChar : '';\n }\n\n return formattedChar;\n }).join('');\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useRifm } from 'rifm';\nimport { useUtils } from './useUtils';\nimport { createDelegatedEventHandler } from '../utils';\nimport { maskedDateFormatter, getDisplayDate, checkMaskIsValidForCurrentFormat } from '../text-field-helper';\nexport function useMaskedInput({\n acceptRegex = /[\\d]/gi,\n disabled,\n disableMaskedInput,\n ignoreInvalidInputs,\n inputFormat,\n inputProps,\n label,\n mask,\n onChange,\n rawValue,\n readOnly,\n rifmFormatter,\n TextFieldProps,\n validationError\n}) {\n const utils = useUtils();\n const [isFocused, setIsFocused] = React.useState(false);\n const formatHelperText = utils.getFormatHelperText(inputFormat);\n const shouldUseMaskedInput = React.useMemo(() => {\n // formatting of dates is a quite slow thing, so do not make useless .format calls\n if (!mask || disableMaskedInput) {\n return false;\n }\n\n return checkMaskIsValidForCurrentFormat(mask, inputFormat, acceptRegex, utils);\n }, [acceptRegex, disableMaskedInput, inputFormat, mask, utils]);\n const formatter = React.useMemo(() => shouldUseMaskedInput && mask ? maskedDateFormatter(mask, acceptRegex) : st => st, [acceptRegex, mask, shouldUseMaskedInput]); // TODO: Implement with controlled vs unctrolled `rawValue`\n\n const currentInputValue = getDisplayDate(utils, rawValue, inputFormat);\n const [innerInputValue, setInnerInputValue] = React.useState(currentInputValue);\n const previousInputValueRef = React.useRef(currentInputValue);\n React.useEffect(() => {\n previousInputValueRef.current = currentInputValue;\n }, [currentInputValue]);\n const notTyping = !isFocused;\n const valueChanged = previousInputValueRef.current !== currentInputValue; // Update the input value only if the value changed outside of typing\n\n if (notTyping && valueChanged && (rawValue === null || utils.isValid(rawValue))) {\n if (currentInputValue !== innerInputValue) {\n setInnerInputValue(currentInputValue);\n }\n }\n\n const handleChange = text => {\n const finalString = text === '' || text === mask ? '' : text;\n setInnerInputValue(finalString);\n const date = finalString === null ? null : utils.parse(finalString, inputFormat);\n\n if (ignoreInvalidInputs && !utils.isValid(date)) {\n return;\n }\n\n onChange(date, finalString || undefined);\n };\n\n const rifmProps = useRifm({\n value: innerInputValue,\n onChange: handleChange,\n format: rifmFormatter || formatter\n });\n const inputStateArgs = shouldUseMaskedInput ? rifmProps : {\n value: innerInputValue,\n onChange: event => {\n handleChange(event.currentTarget.value);\n }\n };\n return _extends({\n label,\n disabled,\n error: validationError,\n inputProps: _extends({}, inputStateArgs, {\n disabled,\n placeholder: formatHelperText,\n readOnly,\n type: shouldUseMaskedInput ? 'tel' : 'text'\n }, inputProps, {\n onFocus: createDelegatedEventHandler(() => {\n setIsFocused(true);\n }, inputProps == null ? void 0 : inputProps.onFocus),\n onBlur: createDelegatedEventHandler(() => {\n setIsFocused(false);\n }, inputProps == null ? void 0 : inputProps.onBlur)\n })\n }, TextFieldProps);\n}\nexport default useMaskedInput;","import { useReducer, useRef, useLayoutEffect, useEffect } from 'react';\n\nconst useRifm = props => {\n const [, refresh] = useReducer(c => c + 1, 0);\n const valueRef = useRef(null);\n const {\n replace,\n append\n } = props;\n const userValue = replace ? replace(props.format(props.value)) : props.format(props.value); // state of delete button see comments below about inputType support\n\n const isDeleleteButtonDownRef = useRef(false);\n\n const onChange = evt => {\n if (process.env.NODE_ENV !== 'production') {\n if (evt.target.type === 'number') {\n console.error('Rifm does not support input type=number, use type=tel instead.');\n return;\n }\n\n if (evt.target.type === 'date') {\n console.error('Rifm does not support input type=date.');\n return;\n }\n }\n\n const eventValue = evt.target.value;\n valueRef.current = [eventValue, // eventValue\n evt.target, // input\n eventValue.length > userValue.length, // isSizeIncreaseOperation\n isDeleleteButtonDownRef.current, // isDeleleteButtonDown\n userValue === props.format(eventValue) // isNoOperation\n ];\n\n if (process.env.NODE_ENV !== 'production') {\n const formattedEventValue = props.format(eventValue);\n\n if (eventValue !== formattedEventValue && eventValue.toLowerCase() === formattedEventValue.toLowerCase()) {\n console.warn('Case enforcement does not work with format. Please use replace={value => value.toLowerCase()} instead');\n }\n } // The main trick is to update underlying input with non formatted value (= eventValue)\n // that allows us to calculate right cursor position after formatting (see getCursorPosition)\n // then we format new value and call props.onChange with masked/formatted value\n // and finally we are able to set cursor position into right place\n\n\n refresh();\n }; // React prints warn on server in non production mode about useLayoutEffect usage\n // in both cases it's noop\n\n\n if (process.env.NODE_ENV === 'production' || typeof window !== 'undefined') {\n useLayoutEffect(() => {\n if (valueRef.current == null) return;\n let [eventValue, input, isSizeIncreaseOperation, isDeleleteButtonDown, // No operation means that value itself hasn't been changed, BTW cursor, selection etc can be changed\n isNoOperation] = valueRef.current;\n valueRef.current = null; // this usually occurs on deleting special symbols like ' here 123'123.00\n // in case of isDeleleteButtonDown cursor should move differently vs backspace\n\n const deleteWasNoOp = isDeleleteButtonDown && isNoOperation;\n const valueAfterSelectionStart = eventValue.slice(input.selectionStart);\n const acceptedCharIndexAfterDelete = valueAfterSelectionStart.search(props.accept || /\\d/g);\n const charsToSkipAfterDelete = acceptedCharIndexAfterDelete !== -1 ? acceptedCharIndexAfterDelete : 0; // Create string from only accepted symbols\n\n const clean = str => (str.match(props.accept || /\\d/g) || []).join('');\n\n const valueBeforeSelectionStart = clean(eventValue.substr(0, input.selectionStart)); // trying to find cursor position in formatted value having knowledge about valueBeforeSelectionStart\n // This works because we assume that format doesn't change the order of accepted symbols.\n // Imagine we have formatter which adds ' symbol between numbers, and by default we refuse all non numeric symbols\n // for example we had input = 1'2|'4 (| means cursor position) then user entered '3' symbol\n // inputValue = 1'23'|4 so valueBeforeSelectionStart = 123 and formatted value = 1'2'3'4\n // calling getCursorPosition(\"1'2'3'4\") will give us position after 3, 1'2'3|'4\n // so for formatting just this function to determine cursor position after formatting is enough\n // with masking we need to do some additional checks see `mask` below\n\n const getCursorPosition = val => {\n let start = 0;\n let cleanPos = 0;\n\n for (let i = 0; i !== valueBeforeSelectionStart.length; ++i) {\n let newPos = val.indexOf(valueBeforeSelectionStart[i], start) + 1;\n let newCleanPos = clean(val).indexOf(valueBeforeSelectionStart[i], cleanPos) + 1; // this skips position change if accepted symbols order was broken\n // For example fixes edge case with fixed point numbers:\n // You have '0|.00', then press 1, it becomes 01|.00 and after format 1.00, this breaks our assumption\n // that order of accepted symbols is not changed after format,\n // so here we don't update start position if other accepted symbols was inbetween current and new position\n\n if (newCleanPos - cleanPos > 1) {\n newPos = start;\n newCleanPos = cleanPos;\n }\n\n cleanPos = Math.max(newCleanPos, cleanPos);\n start = Math.max(start, newPos);\n }\n\n return start;\n }; // Masking part, for masks if size of mask is above some value\n // we need to replace symbols instead of do nothing as like in format\n\n\n if (props.mask === true && isSizeIncreaseOperation && !isNoOperation) {\n let start = getCursorPosition(eventValue);\n const c = clean(eventValue.substr(start))[0];\n start = eventValue.indexOf(c, start);\n eventValue = `${eventValue.substr(0, start)}${eventValue.substr(start + 1)}`;\n }\n\n let formattedValue = props.format(eventValue);\n\n if (append != null && // cursor at the end\n input.selectionStart === eventValue.length && !isNoOperation) {\n if (isSizeIncreaseOperation) {\n formattedValue = append(formattedValue);\n } else {\n // If after delete last char is special character and we use append\n // delete it too\n // was: \"12-3|\" backspace pressed, then should be \"12|\"\n if (clean(formattedValue.slice(-1)) === '') {\n formattedValue = formattedValue.slice(0, -1);\n }\n }\n }\n\n const replacedValue = replace ? replace(formattedValue) : formattedValue;\n\n if (userValue === replacedValue) {\n // if nothing changed for formatted value, just refresh so userValue will be used at render\n refresh();\n } else {\n props.onChange(replacedValue);\n }\n\n return () => {\n let start = getCursorPosition(formattedValue); // Visually improves working with masked values,\n // like cursor jumping over refused symbols\n // as an example date mask: was \"5|1-24-3\" then user pressed \"6\"\n // it becomes \"56-|12-43\" with this code, and \"56|-12-43\" without\n\n if (props.mask != null && (isSizeIncreaseOperation || isDeleleteButtonDown && !deleteWasNoOp)) {\n while (formattedValue[start] && clean(formattedValue[start]) === '') {\n start += 1;\n }\n }\n\n input.selectionStart = input.selectionEnd = start + (deleteWasNoOp ? 1 + charsToSkipAfterDelete : 0);\n };\n });\n }\n\n useEffect(() => {\n // until https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/inputType will be supported\n // by all major browsers (now supported by: +chrome, +safari, ?edge, !firefox)\n // there is no way I found to distinguish in onChange\n // backspace or delete was called in some situations\n // firefox track https://bugzilla.mozilla.org/show_bug.cgi?id=1447239\n const handleKeyDown = evt => {\n if (evt.code === 'Delete') {\n isDeleleteButtonDownRef.current = true;\n }\n };\n\n const handleKeyUp = evt => {\n if (evt.code === 'Delete') {\n isDeleleteButtonDownRef.current = false;\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('keyup', handleKeyUp);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n document.removeEventListener('keyup', handleKeyUp);\n };\n }, []);\n return {\n value: valueRef.current != null ? valueRef.current[0] : userValue,\n onChange\n };\n};\nconst Rifm = props => {\n const renderProps = useRifm(props);\n return props.children(renderProps);\n};\n\nexport { Rifm, useRifm };\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"components\", \"disableOpenPicker\", \"getOpenDialogAriaText\", \"InputAdornmentProps\", \"InputProps\", \"inputRef\", \"openPicker\", \"OpenPickerButtonProps\", \"renderInput\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport { useUtils } from './hooks/useUtils';\nimport CalendarIcon from '../svg-icons/Calendar';\nimport { useMaskedInput } from './hooks/useMaskedInput';\nimport { getTextFieldAriaText } from './text-field-helper';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const KeyboardDateInput = /*#__PURE__*/React.forwardRef(function KeyboardDateInput(props, ref) {\n const {\n components = {},\n disableOpenPicker,\n getOpenDialogAriaText = getTextFieldAriaText,\n InputAdornmentProps,\n InputProps,\n inputRef,\n openPicker,\n OpenPickerButtonProps,\n renderInput\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const utils = useUtils();\n const textFieldProps = useMaskedInput(other);\n const adornmentPosition = (InputAdornmentProps == null ? void 0 : InputAdornmentProps.position) || 'end';\n const OpenPickerIcon = components.OpenPickerIcon || CalendarIcon;\n return renderInput(_extends({\n ref,\n inputRef\n }, textFieldProps, {\n InputProps: _extends({}, InputProps, {\n [`${adornmentPosition}Adornment`]: disableOpenPicker ? undefined : /*#__PURE__*/_jsx(InputAdornment, _extends({\n position: adornmentPosition\n }, InputAdornmentProps, {\n children: /*#__PURE__*/_jsx(IconButton, _extends({\n edge: adornmentPosition,\n disabled: other.disabled || other.readOnly,\n \"aria-label\": getOpenDialogAriaText(other.rawValue, utils)\n }, OpenPickerButtonProps, {\n onClick: openPicker,\n children: /*#__PURE__*/_jsx(OpenPickerIcon, {})\n }))\n }))\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? KeyboardDateInput.propTypes = {\n acceptRegex: PropTypes.instanceOf(RegExp),\n getOpenDialogAriaText: PropTypes.func,\n mask: PropTypes.string,\n OpenPickerButtonProps: PropTypes.object,\n renderInput: PropTypes.func.isRequired,\n rifmFormatter: PropTypes.func\n} : void 0;\nexport default KeyboardDateInput;","import * as React from 'react';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { arrayIncludes } from '../utils';\n\nfunction getOrientation() {\n if (typeof window === 'undefined') {\n return 'portrait';\n }\n\n if (window.screen && window.screen.orientation && window.screen.orientation.angle) {\n return Math.abs(window.screen.orientation.angle) === 90 ? 'landscape' : 'portrait';\n } // Support IOS safari\n\n\n if (window.orientation) {\n return Math.abs(Number(window.orientation)) === 90 ? 'landscape' : 'portrait';\n }\n\n return 'portrait';\n}\n\nexport function useIsLandscape(views, customOrientation) {\n const [orientation, setOrientation] = React.useState(getOrientation);\n useEnhancedEffect(() => {\n const eventHandler = () => {\n setOrientation(getOrientation());\n };\n\n window.addEventListener('orientationchange', eventHandler);\n return () => {\n window.removeEventListener('orientationchange', eventHandler);\n };\n }, []);\n\n if (arrayIncludes(views, ['hours', 'minutes', 'seconds'])) {\n // could not display 13:34:44 in landscape mode\n return false;\n }\n\n const orientationToUse = customOrientation || orientation;\n return orientationToUse === 'landscape';\n}\nexport default useIsLandscape;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"date\", \"DateInputProps\", \"isMobileKeyboardViewOpen\", \"onDateChange\", \"onViewChange\", \"openTo\", \"orientation\", \"showToolbar\", \"toggleMobileKeyboardView\", \"ToolbarComponent\", \"toolbarFormat\", \"toolbarPlaceholder\", \"toolbarTitle\", \"views\"];\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { useViews } from '../hooks/useViews';\nimport ClockPicker from '../../../ClockPicker/ClockPicker';\nimport CalendarPicker from '../../../CalendarPicker';\nimport { KeyboardDateInput } from '../KeyboardDateInput';\nimport { useIsLandscape } from '../hooks/useIsLandscape';\nimport { WrapperVariantContext } from '../wrappers/WrapperVariantContext';\nimport PickerView from './PickerView';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MobileKeyboardInputView = styled('div')({\n padding: '16px 24px'\n});\nconst PickerRoot = styled('div', {\n skipSx: true\n})(({\n ownerState\n}) => _extends({\n display: 'flex',\n flexDirection: 'column'\n}, ownerState.isLandscape && {\n flexDirection: 'row'\n}));\nconst MobileKeyboardTextFieldProps = {\n fullWidth: true\n};\n\nconst isDatePickerView = view => view === 'year' || view === 'month' || view === 'day';\n\nconst isTimePickerView = view => view === 'hours' || view === 'minutes' || view === 'seconds';\n\nfunction Picker(props) {\n const {\n autoFocus,\n date,\n DateInputProps,\n isMobileKeyboardViewOpen,\n onDateChange,\n onViewChange,\n openTo,\n orientation,\n showToolbar,\n toggleMobileKeyboardView,\n ToolbarComponent = () => null,\n toolbarFormat,\n toolbarPlaceholder,\n toolbarTitle,\n views\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const isLandscape = useIsLandscape(views, orientation);\n const wrapperVariant = React.useContext(WrapperVariantContext);\n const toShowToolbar = typeof showToolbar === 'undefined' ? wrapperVariant !== 'desktop' : showToolbar;\n const handleDateChange = React.useCallback((newDate, selectionState) => {\n onDateChange(newDate, wrapperVariant, selectionState);\n }, [onDateChange, wrapperVariant]);\n const handleViewChange = React.useCallback(newView => {\n if (isMobileKeyboardViewOpen) {\n toggleMobileKeyboardView();\n }\n\n if (onViewChange) {\n onViewChange(newView);\n }\n }, [isMobileKeyboardViewOpen, onViewChange, toggleMobileKeyboardView]);\n const {\n openView,\n nextView,\n previousView,\n setOpenView,\n handleChangeAndOpenNext\n } = useViews({\n view: undefined,\n views,\n openTo,\n onChange: handleDateChange,\n onViewChange: handleViewChange\n });\n return /*#__PURE__*/_jsxs(PickerRoot, {\n ownerState: {\n isLandscape\n },\n children: [toShowToolbar && /*#__PURE__*/_jsx(ToolbarComponent, _extends({}, other, {\n views: views,\n isLandscape: isLandscape,\n date: date,\n onChange: handleDateChange,\n setOpenView: setOpenView,\n openView: openView,\n toolbarTitle: toolbarTitle,\n toolbarFormat: toolbarFormat,\n toolbarPlaceholder: toolbarPlaceholder,\n isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,\n toggleMobileKeyboardView: toggleMobileKeyboardView\n })), /*#__PURE__*/_jsx(PickerView, {\n children: isMobileKeyboardViewOpen ? /*#__PURE__*/_jsx(MobileKeyboardInputView, {\n children: /*#__PURE__*/_jsx(KeyboardDateInput, _extends({}, DateInputProps, {\n ignoreInvalidInputs: true,\n disableOpenPicker: true,\n TextFieldProps: MobileKeyboardTextFieldProps\n }))\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [isDatePickerView(openView) && /*#__PURE__*/_jsx(CalendarPicker, _extends({\n autoFocus: autoFocus,\n date: date,\n onViewChange: setOpenView,\n onChange: handleChangeAndOpenNext,\n view: openView // Unclear why the predicate `isDatePickerView` does not imply the casted type\n ,\n views: views.filter(isDatePickerView)\n }, other)), isTimePickerView(openView) && /*#__PURE__*/_jsx(ClockPicker, _extends({}, other, {\n autoFocus: autoFocus,\n date: date,\n view: openView,\n onChange: handleChangeAndOpenNext,\n openNextView: () => setOpenView(nextView),\n openPreviousView: () => setOpenView(previousView),\n nextViewAvailable: !nextView,\n previousViewAvailable: !previousView || isDatePickerView(previousView),\n showViewSwitcher: wrapperVariant === 'desktop'\n }))]\n })\n })]\n });\n}\n\nexport default Picker;","import * as React from 'react';\nimport { useUtils } from './useUtils';\nimport { validateDate, validateDateRange } from '../date-utils';\nimport { validateDateTime } from '../date-time-utils';\nimport { validateTime } from '../time-utils';\n\nfunction isSameDateOrTimeError(a, b) {\n return a === b;\n}\n\nfunction isSameDateRangeError(a, b) {\n return b !== null && a[1] === b[1] && a[0] === b[0];\n}\n\nfunction useValidation(props, validate, isSameError = isSameDateOrTimeError) {\n const {\n value,\n onError\n } = props;\n const utils = useUtils();\n const previousValidationErrorRef = React.useRef(null);\n const validationError = validate(utils, value, props);\n React.useEffect(() => {\n if (onError && !isSameError(validationError, previousValidationErrorRef.current)) {\n onError(validationError, value);\n }\n\n previousValidationErrorRef.current = validationError;\n }, [isSameError, onError, previousValidationErrorRef, validationError, value]);\n return validationError;\n}\n\nexport function useTimeValidation(props) {\n return useValidation(props, validateTime, isSameDateOrTimeError);\n}\nexport function useDateValidation(props) {\n return useValidation(props, validateDate, isSameDateOrTimeError);\n}\nexport function useDateTimeValidation(props) {\n return useValidation(props, validateDateTime, isSameDateOrTimeError);\n}\nexport function useDateRangeValidation(props) {\n return useValidation(props, validateDateRange, isSameDateRangeError);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useOpenState } from './useOpenState';\nimport { useUtils } from './useUtils';\nexport function usePickerState(props, valueManager) {\n const {\n disableCloseOnSelect,\n onAccept,\n onChange,\n value\n } = props;\n const utils = useUtils();\n const {\n isOpen,\n setIsOpen\n } = useOpenState(props);\n\n function initDraftableDate(date) {\n return {\n committed: date,\n draft: date\n };\n }\n\n const parsedDateValue = valueManager.parseInput(utils, value);\n const [draftState, dispatch] = React.useReducer((state, action) => {\n switch (action.type) {\n case 'reset':\n return initDraftableDate(action.payload);\n\n case 'update':\n return _extends({}, state, {\n draft: action.payload\n });\n\n default:\n return state;\n }\n }, parsedDateValue, initDraftableDate);\n\n if (!valueManager.areValuesEqual(utils, draftState.committed, parsedDateValue)) {\n dispatch({\n type: 'reset',\n payload: parsedDateValue\n });\n } // Mobile keyboard view is a special case.\n // When it's open picker should work like closed, cause we are just showing text field\n\n\n const [isMobileKeyboardViewOpen, setMobileKeyboardViewOpen] = React.useState(false);\n const acceptDate = React.useCallback((acceptedDate, needClosePicker) => {\n onChange(acceptedDate);\n\n if (needClosePicker) {\n setIsOpen(false);\n\n if (onAccept) {\n onAccept(acceptedDate);\n }\n }\n }, [onAccept, onChange, setIsOpen]);\n const wrapperProps = React.useMemo(() => ({\n open: isOpen,\n onClear: () => acceptDate(valueManager.emptyValue, true),\n onAccept: () => acceptDate(draftState.draft, true),\n onDismiss: () => setIsOpen(false),\n onSetToday: () => {\n const now = utils.date();\n dispatch({\n type: 'update',\n payload: now\n });\n acceptDate(now, !disableCloseOnSelect);\n }\n }), [acceptDate, disableCloseOnSelect, isOpen, utils, draftState.draft, setIsOpen, valueManager.emptyValue]);\n const pickerProps = React.useMemo(() => ({\n date: draftState.draft,\n isMobileKeyboardViewOpen,\n toggleMobileKeyboardView: () => setMobileKeyboardViewOpen(!isMobileKeyboardViewOpen),\n onDateChange: (newDate, wrapperVariant, selectionState = 'partial') => {\n dispatch({\n type: 'update',\n payload: newDate\n });\n\n if (selectionState === 'partial') {\n acceptDate(newDate, false);\n }\n\n if (selectionState === 'finish') {\n const shouldCloseOnSelect = !(disableCloseOnSelect != null ? disableCloseOnSelect : wrapperVariant === 'mobile');\n acceptDate(newDate, shouldCloseOnSelect);\n } // if selectionState === \"shallow\" do nothing (we already update the draft state)\n\n }\n }), [acceptDate, disableCloseOnSelect, isMobileKeyboardViewOpen, draftState.draft]);\n const inputProps = React.useMemo(() => ({\n onChange,\n open: isOpen,\n rawValue: value,\n openPicker: () => setIsOpen(true)\n }), [onChange, isOpen, value, setIsOpen]);\n const pickerState = {\n pickerProps,\n inputProps,\n wrapperProps\n };\n React.useDebugValue(pickerState, () => ({\n MuiPickerState: {\n pickerDraft: draftState,\n other: pickerState\n }\n }));\n return pickerState;\n}","import * as React from 'react';\nexport function useOpenState({\n open,\n onOpen,\n onClose\n}) {\n const isControllingOpenProp = React.useRef(typeof open === 'boolean').current;\n const [openState, setIsOpenState] = React.useState(false); // It is required to update inner state in useEffect in order to avoid situation when\n // Our component is not mounted yet, but `open` state is set to `true` (e.g. initially opened)\n\n React.useEffect(() => {\n if (isControllingOpenProp) {\n if (typeof open !== 'boolean') {\n throw new Error('You must not mix controlling and uncontrolled mode for `open` prop');\n }\n\n setIsOpenState(open);\n }\n }, [isControllingOpenProp, open]);\n const setIsOpen = React.useCallback(newIsOpen => {\n if (!isControllingOpenProp) {\n setIsOpenState(newIsOpen);\n }\n\n if (newIsOpen && onOpen) {\n onOpen();\n }\n\n if (!newIsOpen && onClose) {\n onClose();\n }\n }, [isControllingOpenProp, onOpen, onClose]);\n return {\n isOpen: openState,\n setIsOpen\n };\n}\nexport default useOpenState;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\", \"PopperProps\", \"PaperProps\", \"ToolbarComponent\", \"TransitionComponent\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDatePickerDefaultizedProps } from '../DatePicker/shared';\nimport DatePickerToolbar from '../DatePicker/DatePickerToolbar';\nimport DesktopWrapper from '../internal/pickers/wrappers/DesktopWrapper';\nimport Picker from '../internal/pickers/Picker/Picker';\nimport { useDateValidation } from '../internal/pickers/hooks/useValidation';\nimport { parsePickerInputValue } from '../internal/pickers/date-utils';\nimport { KeyboardDateInput } from '../internal/pickers/KeyboardDateInput';\nimport { usePickerState } from '../internal/pickers/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst valueManager = {\n emptyValue: null,\n parseInput: parsePickerInputValue,\n areValuesEqual: (utils, a, b) => utils.isEqual(a, b)\n};\n\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n *\n * API:\n *\n * - [DesktopDatePicker API](https://mui.com/api/desktop-date-picker/)\n */\nconst DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {\n // TODO: TDate needs to be instantiated at every usage.\n const props = useDatePickerDefaultizedProps(inProps, 'MuiDesktopDatePicker');\n const validationError = useDateValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, valueManager);\n\n const {\n PopperProps,\n PaperProps,\n ToolbarComponent = DatePickerToolbar,\n TransitionComponent\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const AllDateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError\n });\n\n return /*#__PURE__*/_jsx(DesktopWrapper, _extends({}, wrapperProps, {\n DateInputProps: AllDateInputProps,\n KeyboardDateInputComponent: KeyboardDateInput,\n PopperProps: PopperProps,\n PaperProps: PaperProps,\n TransitionComponent: TransitionComponent,\n children: /*#__PURE__*/_jsx(Picker, _extends({}, pickerProps, {\n autoFocus: true,\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: AllDateInputProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DesktopDatePicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * If `true`, `onChange` is fired on click even if the same date is selected.\n * @default false\n */\n allowSameDateSelection: PropTypes.bool,\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * The components used for each slot.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n LeftArrowButton: PropTypes.elementType,\n LeftArrowIcon: PropTypes.elementType,\n OpenPickerIcon: PropTypes.elementType,\n RightArrowButton: PropTypes.elementType,\n RightArrowIcon: PropTypes.elementType,\n SwitchViewButton: PropTypes.elementType,\n SwitchViewIcon: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n disableCloseOnSelect: PropTypes.bool,\n\n /**\n * If `true`, the picker and text field are disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, todays date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @default (value, utils) => `Choose date, selected date is ${utils.format(utils.date(value), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * @ignore\n */\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n\n /**\n * @ignore\n */\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n\n /**\n * @ignore\n */\n key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Max selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Min selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change. @DateIOType\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Paper props passed down to [Paper](https://mui.com/api/paper/) component.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Popper props passed down to [Popper](https://mui.com/api/popper/) component.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Make picker read only.\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DatePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * Custom component for popper [Transition](https://mui.com/components/transitions/#transitioncomponent-prop).\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.oneOfType([PropTypes.any, PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]),\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)\n} : void 0;\nexport default DesktopDatePicker;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getDialogActionsUtilityClass(slot) {\n return generateUtilityClass('MuiDialogActions', slot);\n}\nconst dialogActionsClasses = generateUtilityClasses('MuiDialogActions', ['root', 'spacing']);\nexport default dialogActionsClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disableSpacing\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDialogActionsUtilityClass } from './dialogActionsClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableSpacing\n } = ownerState;\n const slots = {\n root: ['root', !disableSpacing && 'spacing']\n };\n return composeClasses(slots, getDialogActionsUtilityClass, classes);\n};\n\nconst DialogActionsRoot = styled('div', {\n name: 'MuiDialogActions',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableSpacing && styles.spacing];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n}, !ownerState.disableSpacing && {\n '& > :not(:first-of-type)': {\n marginLeft: 8\n }\n}));\nconst DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogActions'\n });\n\n const {\n className,\n disableSpacing = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disableSpacing\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogActionsRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default DialogActions;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getDialogContentUtilityClass(slot) {\n return generateUtilityClass('MuiDialogContent', slot);\n}\nconst dialogContentClasses = generateUtilityClasses('MuiDialogContent', ['root', 'dividers']);\nexport default dialogContentClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"dividers\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDialogContentUtilityClass } from './dialogContentClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n dividers\n } = ownerState;\n const slots = {\n root: ['root', dividers && 'dividers']\n };\n return composeClasses(slots, getDialogContentUtilityClass, classes);\n};\n\nconst DialogContentRoot = styled('div', {\n name: 'MuiDialogContent',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dividers && styles.dividers];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n flex: '1 1 auto',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch',\n overflowY: 'auto',\n padding: '20px 24px'\n}, ownerState.dividers ? {\n padding: '16px 24px',\n borderTop: `1px solid ${theme.palette.divider}`,\n borderBottom: `1px solid ${theme.palette.divider}`\n} : {\n '.MuiDialogTitle-root + &': {\n paddingTop: 0\n }\n}));\nconst DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialogContent'\n });\n\n const {\n className,\n dividers = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n dividers\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogContentRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContent.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display the top and bottom dividers.\n * @default false\n */\n dividers: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default DialogContent;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getDialogUtilityClass(slot) {\n return generateUtilityClass('MuiDialog', slot);\n}\nconst dialogClasses = generateUtilityClasses('MuiDialog', ['root', 'scrollPaper', 'scrollBody', 'container', 'paper', 'paperScrollPaper', 'paperScrollBody', 'paperWidthFalse', 'paperWidthXs', 'paperWidthSm', 'paperWidthMd', 'paperWidthLg', 'paperWidthXl', 'paperFullWidth', 'paperFullScreen']);\nexport default dialogClasses;","import { createContext } from 'react';\nconst DialogContext = /*#__PURE__*/createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n DialogContext.displayName = 'DialogContext';\n}\n\nexport default DialogContext;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"aria-describedby\", \"aria-labelledby\", \"BackdropComponent\", \"BackdropProps\", \"children\", \"className\", \"disableEscapeKeyDown\", \"fullScreen\", \"fullWidth\", \"maxWidth\", \"onBackdropClick\", \"onClose\", \"open\", \"PaperComponent\", \"PaperProps\", \"scroll\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { unstable_useId as useId } from '@mui/utils';\nimport capitalize from '../utils/capitalize';\nimport Modal from '../Modal';\nimport Fade from '../Fade';\nimport { duration } from '../styles/createTransitions';\nimport Paper from '../Paper';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport dialogClasses, { getDialogUtilityClass } from './dialogClasses';\nimport DialogContext from './DialogContext';\nimport Backdrop from '../Backdrop';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DialogBackdrop = styled(Backdrop, {\n name: 'MuiDialog',\n slot: 'Backdrop',\n overrides: (props, styles) => styles.backdrop\n})({\n // Improve scrollable dialog support.\n zIndex: -1\n});\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n scroll,\n maxWidth,\n fullWidth,\n fullScreen\n } = ownerState;\n const slots = {\n root: ['root'],\n container: ['container', `scroll${capitalize(scroll)}`],\n paper: ['paper', `paperScroll${capitalize(scroll)}`, `paperWidth${capitalize(String(maxWidth))}`, fullWidth && 'paperFullWidth', fullScreen && 'paperFullScreen']\n };\n return composeClasses(slots, getDialogUtilityClass, classes);\n};\n\nconst DialogRoot = styled(Modal, {\n name: 'MuiDialog',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n});\nconst DialogContainer = styled('div', {\n name: 'MuiDialog',\n slot: 'Container',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.container, styles[`scroll${capitalize(ownerState.scroll)}`]];\n }\n})(({\n ownerState\n}) => _extends({\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n}, ownerState.scroll === 'paper' && {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n}, ownerState.scroll === 'body' && {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&:after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n}));\nconst DialogPaper = styled(Paper, {\n name: 'MuiDialog',\n slot: 'Paper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.paper, styles[`scrollPaper${capitalize(ownerState.scroll)}`], styles[`paperWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fullWidth && styles.paperFullWidth, ownerState.fullScreen && styles.paperFullScreen];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n margin: 32,\n position: 'relative',\n overflowY: 'auto',\n // Fix IE11 issue, to remove at some point.\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n }\n}, ownerState.scroll === 'paper' && {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n}, ownerState.scroll === 'body' && {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'left' // 'initial' doesn't work on IE11\n\n}, !ownerState.maxWidth && {\n maxWidth: 'calc(100% - 64px)'\n}, ownerState.maxWidth === 'xs' && {\n maxWidth: theme.breakpoints.unit === 'px' ? Math.max(theme.breakpoints.values.xs, 444) : `${theme.breakpoints.values.xs}${theme.breakpoints.unit}`,\n [`&.${dialogClasses.paperScrollBody}`]: {\n [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2)]: {\n maxWidth: 'calc(100% - 64px)'\n }\n }\n}, ownerState.maxWidth !== 'xs' && {\n maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`,\n [`&.${dialogClasses.paperScrollBody}`]: {\n [theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2)]: {\n maxWidth: 'calc(100% - 64px)'\n }\n }\n}, ownerState.fullWidth && {\n width: 'calc(100% - 64px)'\n}, ownerState.fullScreen && {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n [`&.${dialogClasses.paperScrollBody}`]: {\n margin: 0,\n maxWidth: '100%'\n }\n}));\nconst defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\n\nconst Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDialog'\n });\n\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-labelledby': ariaLabelledbyProp,\n BackdropComponent,\n BackdropProps,\n children,\n className,\n disableEscapeKeyDown = false,\n fullScreen = false,\n fullWidth = false,\n maxWidth = 'sm',\n onBackdropClick,\n onClose,\n open,\n PaperComponent = Paper,\n PaperProps = {},\n scroll = 'paper',\n TransitionComponent = Fade,\n transitionDuration = defaultTransitionDuration,\n TransitionProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disableEscapeKeyDown,\n fullScreen,\n fullWidth,\n maxWidth,\n scroll\n });\n\n const classes = useUtilityClasses(ownerState);\n const backdropClick = React.useRef();\n\n const handleMouseDown = event => {\n // We don't want to close the dialog when clicking the dialog content.\n // Make sure the event starts and ends on the same DOM element.\n backdropClick.current = event.target === event.currentTarget;\n };\n\n const handleBackdropClick = event => {\n // Ignore the events not coming from the \"backdrop\".\n if (!backdropClick.current) {\n return;\n }\n\n backdropClick.current = null;\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n const ariaLabelledby = useId(ariaLabelledbyProp);\n const dialogContextValue = React.useMemo(() => {\n return {\n titleId: ariaLabelledby\n };\n }, [ariaLabelledby]);\n return /*#__PURE__*/_jsx(DialogRoot, _extends({\n className: clsx(classes.root, className),\n BackdropProps: _extends({\n transitionDuration,\n as: BackdropComponent\n }, BackdropProps),\n closeAfterTransition: true,\n BackdropComponent: DialogBackdrop,\n disableEscapeKeyDown: disableEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref,\n onClick: handleBackdropClick,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: true,\n in: open,\n timeout: transitionDuration,\n role: \"presentation\"\n }, TransitionProps, {\n children: /*#__PURE__*/_jsx(DialogContainer, {\n className: clsx(classes.container),\n onMouseDown: handleMouseDown,\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(DialogPaper, _extends({\n as: PaperComponent,\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby\n }, PaperProps, {\n className: clsx(classes.paper, PaperProps.className),\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(DialogContext.Provider, {\n value: dialogContextValue,\n children: children\n })\n }))\n })\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Dialog.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * If `true`, the dialog is full-screen.\n * @default false\n */\n fullScreen: PropTypes.bool,\n\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n * @default 'sm'\n */\n maxWidth: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n\n /**\n * Callback fired when the backdrop is clicked.\n */\n onBackdropClick: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The component used to render the body of the dialog.\n * @default Paper\n */\n PaperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n * @default {}\n */\n PaperProps: PropTypes.object,\n\n /**\n * Determine the container for scrolling the dialog.\n * @default 'paper'\n */\n scroll: PropTypes.oneOf(['body', 'paper']),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Fade\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default { enter: duration.enteringScreen, exit: duration.leavingScreen }\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Dialog;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Button from '@mui/material/Button';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport Dialog, { dialogClasses } from '@mui/material/Dialog';\nimport { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH } from './constants/dimensions';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersModalDialogRoot = styled(Dialog, {\n skipSx: true\n})({\n [`& .${dialogClasses.container}`]: {\n outline: 0\n },\n [`& .${dialogClasses.paper}`]: {\n outline: 0,\n minWidth: DIALOG_WIDTH\n }\n});\nconst PickersModalDialogContent = styled(DialogContent, {\n skipSx: true\n})({\n '&:first-of-type': {\n padding: 0\n }\n});\nconst PickersModalDialogActions = styled(DialogActions, {\n skipSx: true\n})(({\n ownerState\n}) => _extends({}, (ownerState.clearable || ownerState.showTodayButton) && {\n // set justifyContent to default value to fix IE11 layout bug\n // see https://github.com/mui-org/material-ui-pickers/pull/267\n justifyContent: 'flex-start',\n '& > *:first-of-type': {\n marginRight: 'auto'\n }\n}));\n\nconst PickersModalDialog = props => {\n const {\n cancelText = 'Cancel',\n children,\n clearable = false,\n clearText = 'Clear',\n DialogProps = {},\n okText = 'OK',\n onAccept,\n onClear,\n onDismiss,\n onSetToday,\n open,\n showTodayButton = false,\n todayText = 'Today'\n } = props;\n const ownerState = props;\n return /*#__PURE__*/_jsxs(PickersModalDialogRoot, _extends({\n open: open,\n onClose: onDismiss\n }, DialogProps, {\n children: [/*#__PURE__*/_jsx(PickersModalDialogContent, {\n children: children\n }), /*#__PURE__*/_jsxs(PickersModalDialogActions, {\n ownerState: ownerState,\n children: [clearable && /*#__PURE__*/_jsx(Button, {\n onClick: onClear,\n children: clearText\n }), showTodayButton && /*#__PURE__*/_jsx(Button, {\n onClick: onSetToday,\n children: todayText\n }), cancelText && /*#__PURE__*/_jsx(Button, {\n onClick: onDismiss,\n children: cancelText\n }), okText && /*#__PURE__*/_jsx(Button, {\n onClick: onAccept,\n children: okText\n })]\n })]\n }));\n};\n\nexport default PickersModalDialog;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"cancelText\", \"children\", \"clearable\", \"clearText\", \"DateInputProps\", \"DialogProps\", \"okText\", \"onAccept\", \"onClear\", \"onDismiss\", \"onSetToday\", \"open\", \"PureDateInputComponent\", \"showTodayButton\", \"todayText\"];\nimport * as React from 'react';\nimport { WrapperVariantContext } from './WrapperVariantContext';\nimport PickersModalDialog from '../PickersModalDialog';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction MobileWrapper(props) {\n const {\n cancelText,\n children,\n clearable,\n clearText,\n DateInputProps,\n DialogProps,\n okText,\n onAccept,\n onClear,\n onDismiss,\n onSetToday,\n open,\n PureDateInputComponent,\n showTodayButton,\n todayText\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n return /*#__PURE__*/_jsxs(WrapperVariantContext.Provider, {\n value: \"mobile\",\n children: [/*#__PURE__*/_jsx(PureDateInputComponent, _extends({}, other, DateInputProps)), /*#__PURE__*/_jsx(PickersModalDialog, {\n cancelText: cancelText,\n clearable: clearable,\n clearText: clearText,\n DialogProps: DialogProps,\n okText: okText,\n onAccept: onAccept,\n onClear: onClear,\n onDismiss: onDismiss,\n onSetToday: onSetToday,\n open: open,\n showTodayButton: showTodayButton,\n todayText: todayText,\n children: children\n })]\n });\n}\n\nexport default MobileWrapper;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { onSpaceOrEnter } from './utils';\nimport { useUtils } from './hooks/useUtils';\nimport { getDisplayDate, getTextFieldAriaText } from './text-field-helper'; // make `variant` optional.\n\n// TODO: why is this called \"Pure*\" when it's not memoized? Does \"Pure\" mean \"readonly\"?\nexport const PureDateInput = /*#__PURE__*/React.forwardRef(function PureDateInput(props, ref) {\n const {\n disabled,\n getOpenDialogAriaText = getTextFieldAriaText,\n inputFormat,\n InputProps,\n inputRef,\n label,\n openPicker: onOpen,\n rawValue,\n renderInput,\n TextFieldProps = {},\n validationError\n } = props;\n const utils = useUtils();\n const PureDateInputProps = React.useMemo(() => _extends({}, InputProps, {\n readOnly: true\n }), [InputProps]);\n const inputValue = getDisplayDate(utils, rawValue, inputFormat);\n return renderInput(_extends({\n label,\n disabled,\n ref,\n inputRef,\n error: validationError,\n InputProps: PureDateInputProps,\n inputProps: {\n disabled,\n readOnly: true,\n 'aria-readonly': true,\n 'aria-label': getOpenDialogAriaText(rawValue, utils),\n value: inputValue,\n onClick: onOpen,\n onKeyDown: onSpaceOrEnter(onOpen)\n }\n }, TextFieldProps));\n});\nPureDateInput.propTypes = {\n getOpenDialogAriaText: PropTypes.func,\n renderInput: PropTypes.func.isRequired\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ToolbarComponent\", \"value\", \"onChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDatePickerDefaultizedProps } from '../DatePicker/shared';\nimport DatePickerToolbar from '../DatePicker/DatePickerToolbar';\nimport MobileWrapper from '../internal/pickers/wrappers/MobileWrapper';\nimport Picker from '../internal/pickers/Picker/Picker';\nimport { useDateValidation } from '../internal/pickers/hooks/useValidation';\nimport { parsePickerInputValue } from '../internal/pickers/date-utils';\nimport { PureDateInput } from '../internal/pickers/PureDateInput';\nimport { usePickerState } from '../internal/pickers/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst valueManager = {\n emptyValue: null,\n parseInput: parsePickerInputValue,\n areValuesEqual: (utils, a, b) => utils.isEqual(a, b)\n};\n\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n *\n * API:\n *\n * - [MobileDatePicker API](https://mui.com/api/mobile-date-picker/)\n */\nconst MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker(inProps, ref) {\n // TODO: TDate needs to be instantiated at every usage.\n const props = useDatePickerDefaultizedProps(inProps, 'MuiMobileDatePicker');\n const validationError = useDateValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, valueManager); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n ToolbarComponent = DatePickerToolbar\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError\n });\n\n return /*#__PURE__*/_jsx(MobileWrapper, _extends({}, other, wrapperProps, {\n DateInputProps: DateInputProps,\n PureDateInputComponent: PureDateInput,\n children: /*#__PURE__*/_jsx(Picker, _extends({}, pickerProps, {\n autoFocus: true,\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileDatePicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * If `true`, `onChange` is fired on click even if the same date is selected.\n * @default false\n */\n allowSameDateSelection: PropTypes.bool,\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Cancel text message.\n * @default 'Cancel'\n */\n cancelText: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true`, it shows the clear action in the picker dialog.\n * @default false\n */\n clearable: PropTypes.bool,\n\n /**\n * Clear text message.\n * @default 'Clear'\n */\n clearText: PropTypes.node,\n\n /**\n * The components used for each slot.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n LeftArrowButton: PropTypes.elementType,\n LeftArrowIcon: PropTypes.elementType,\n OpenPickerIcon: PropTypes.elementType,\n RightArrowButton: PropTypes.elementType,\n RightArrowIcon: PropTypes.elementType,\n SwitchViewButton: PropTypes.elementType,\n SwitchViewIcon: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * Props applied to the [`Dialog`](/api/dialog/) element.\n */\n DialogProps: PropTypes.object,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n disableCloseOnSelect: PropTypes.bool,\n\n /**\n * If `true`, the picker and text field are disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, todays date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @default (value, utils) => `Choose date, selected date is ${utils.format(utils.date(value), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * @ignore\n */\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n\n /**\n * @ignore\n */\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n\n /**\n * @ignore\n */\n key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Max selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Min selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Ok button text.\n * @default 'OK'\n */\n okText: PropTypes.node,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change. @DateIOType\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, the today button is displayed. **Note** that `showClearButton` has a higher priority.\n * @default false\n */\n showTodayButton: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Today text message.\n * @default 'Today'\n */\n todayText: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DatePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.oneOfType([PropTypes.any, PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]),\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)\n} : void 0;\nexport default MobileDatePicker;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"cancelText\", \"clearable\", \"clearText\", \"desktopModeMediaQuery\", \"DialogProps\", \"okText\", \"PopperProps\", \"showTodayButton\", \"todayText\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport { useThemeProps } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport PropTypes from 'prop-types';\nimport DesktopDatePicker from '../DesktopDatePicker';\nimport MobileDatePicker from '../MobileDatePicker';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/components/date-picker/)\n * - [Pickers](https://mui.com/components/pickers/)\n *\n * API:\n *\n * - [DatePicker API](https://mui.com/api/date-picker/)\n */\nconst DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDatePicker'\n });\n\n const {\n cancelText,\n clearable,\n clearText,\n desktopModeMediaQuery = '@media (pointer: fine)',\n DialogProps,\n okText,\n PopperProps,\n showTodayButton,\n todayText,\n TransitionComponent\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const isDesktop = useMediaQuery(desktopModeMediaQuery);\n return isDesktop ? /*#__PURE__*/_jsx(DesktopDatePicker, _extends({\n ref: ref,\n PopperProps: PopperProps,\n TransitionComponent: TransitionComponent\n }, other)) : /*#__PURE__*/_jsx(MobileDatePicker, _extends({\n ref: ref,\n cancelText: cancelText,\n clearable: clearable,\n clearText: clearText,\n DialogProps: DialogProps,\n okText: okText,\n showTodayButton: showTodayButton,\n todayText: todayText\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DatePicker.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * If `true`, `onChange` is fired on click even if the same date is selected.\n * @default false\n */\n allowSameDateSelection: PropTypes.bool,\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Cancel text message.\n * @default 'Cancel'\n */\n cancelText: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true`, it shows the clear action in the picker dialog.\n * @default false\n */\n clearable: PropTypes.bool,\n\n /**\n * Clear text message.\n * @default 'Clear'\n */\n clearText: PropTypes.node,\n\n /**\n * The components used for each slot.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n LeftArrowButton: PropTypes.elementType,\n LeftArrowIcon: PropTypes.elementType,\n OpenPickerIcon: PropTypes.elementType,\n RightArrowButton: PropTypes.elementType,\n RightArrowIcon: PropTypes.elementType,\n SwitchViewButton: PropTypes.elementType,\n SwitchViewIcon: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * CSS media query when `Mobile` mode will be changed to `Desktop`.\n * @default '@media (pointer: fine)'\n * @example '@media (min-width: 720px)' or theme.breakpoints.up(\"sm\")\n */\n desktopModeMediaQuery: PropTypes.string,\n\n /**\n * Props applied to the [`Dialog`](/api/dialog/) element.\n */\n DialogProps: PropTypes.object,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n disableCloseOnSelect: PropTypes.bool,\n\n /**\n * If `true`, the picker and text field are disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, todays date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @default (value, utils) => `Choose date, selected date is ${utils.format(utils.date(value), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * @ignore\n */\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n\n /**\n * @ignore\n */\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n\n /**\n * @ignore\n */\n key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Max selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Min selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Ok button text.\n * @default 'OK'\n */\n okText: PropTypes.node,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change. @DateIOType\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Paper props passed down to [Paper](https://mui.com/api/paper/) component.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Popper props passed down to [Popper](https://mui.com/api/popper/) component.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Make picker read only.\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, the today button is displayed. **Note** that `showClearButton` has a higher priority.\n * @default false\n */\n showTodayButton: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Today text message.\n * @default 'Today'\n */\n todayText: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DatePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * Custom component for popper [Transition](https://mui.com/components/transitions/#transitioncomponent-prop).\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.oneOfType([PropTypes.any, PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]),\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)\n} : void 0;\nexport default DatePicker;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getLoadingButtonUtilityClass(slot) {\n return generateUtilityClass('MuiLoadingButton', slot);\n}\nconst loadingButtonClasses = generateUtilityClasses('MuiLoadingButton', ['root', 'loading', 'loadingIndicator', 'loadingIndicatorCenter', 'loadingIndicatorStart', 'loadingIndicatorEnd', 'endIconLoadingEnd', 'startIconLoadingStart']);\nexport default loadingButtonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"disabled\", \"loading\", \"loadingIndicator\", \"loadingPosition\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@mui/utils';\nimport { capitalize } from '@mui/material/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport loadingButtonClasses, { getLoadingButtonUtilityClass } from './loadingButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n loading,\n loadingPosition,\n classes\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading'],\n startIcon: [loading && `startIconLoading${capitalize(loadingPosition)}`],\n endIcon: [loading && `endIconLoading${capitalize(loadingPosition)}`],\n loadingIndicator: ['loadingIndicator', loading && `loadingIndicator${capitalize(loadingPosition)}`]\n };\n const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n}; // TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core\n\n\nconst rootShouldForwardProp = prop => prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as' && prop !== 'classes';\n\nconst LoadingButtonRoot = styled(Button, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiLoadingButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n return [styles.root, styles.startIconLoadingStart && {\n [`& .${loadingButtonClasses.startIconLoadingStart}`]: styles.startIconLoadingStart\n }, styles.endIconLoadingEnd && {\n [`& .${loadingButtonClasses.endIconLoadingEnd}`]: styles.endIconLoadingEnd\n }];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n}, ownerState.loadingPosition === 'center' && {\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.short\n }),\n [`&.${loadingButtonClasses.loading}`]: {\n color: 'transparent'\n }\n}));\nconst LoadingButtonLoadingIndicator = styled('div', {\n name: 'MuiLoadingButton',\n slot: 'LoadingIndicator',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.loadingIndicator, styles[`loadingIndicator${capitalize(ownerState.loadingPosition)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'absolute',\n visibility: 'visible',\n display: 'flex'\n}, ownerState.loadingPosition === 'start' && {\n left: 14\n}, ownerState.loadingPosition === 'center' && {\n left: '50%',\n transform: 'translate(-50%)',\n color: theme.palette.action.disabled\n}, ownerState.loadingPosition === 'end' && {\n right: 14\n}));\n\nconst LoadingIndicator = /*#__PURE__*/_jsx(CircularProgress, {\n color: \"inherit\",\n size: 16\n});\n\nconst LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiLoadingButton'\n });\n\n const {\n children,\n disabled = false,\n loading = false,\n loadingIndicator = LoadingIndicator,\n loadingPosition = 'center'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disabled,\n loading,\n loadingIndicator,\n loadingPosition\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(LoadingButtonRoot, _extends({\n disabled: disabled || loading,\n ref: ref\n }, other, {\n classes: classes,\n ownerState: ownerState,\n children: [loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n }), children]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LoadingButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the loading indicator is shown.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Element placed before the children if the button is in loading state.\n * @default <CircularProgress color=\"inherit\" size={16} />\n */\n loadingIndicator: PropTypes.node,\n\n /**\n * The loading indicator can be positioned on the start, end, or the center of the button.\n * @default 'center'\n */\n loadingPosition: chainPropTypes(PropTypes.oneOf(['start', 'end', 'center']), props => {\n if (props.loadingPosition === 'start' && !props.startIcon) {\n return new Error(`MUI: The loadingPosition=\"start\" should be used in combination with startIcon.`);\n }\n\n if (props.loadingPosition === 'end' && !props.endIcon) {\n return new Error(`MUI: The loadingPosition=\"end\" should be used in combination with endIcon.`);\n }\n\n return null;\n }),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default LoadingButton;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';\n}\n\n/**\n * @ignore - do not document.\n */\nfunction LocalizationProvider(props) {\n const {\n children,\n dateAdapter: Utils,\n dateFormats,\n dateLibInstance,\n locale\n } = props;\n const utils = React.useMemo(() => new Utils({\n locale,\n formats: dateFormats,\n instance: dateLibInstance\n }), [Utils, locale, dateFormats, dateLibInstance]);\n const defaultDates = React.useMemo(() => {\n return {\n minDate: utils.date('1900-01-01T00:00:00.000'),\n maxDate: utils.date('2099-12-31T00:00:00.000')\n };\n }, [utils]);\n const contextValue = React.useMemo(() => {\n return {\n utils,\n defaultDates\n };\n }, [defaultDates, utils]);\n return /*#__PURE__*/_jsx(MuiPickersAdapterContext.Provider, {\n value: contextValue,\n children: children\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? LocalizationProvider.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * DateIO adapter class function\n */\n dateAdapter: PropTypes.func.isRequired,\n\n /**\n * Formats that are used for any child pickers\n */\n dateFormats: PropTypes.shape({\n dayOfMonth: PropTypes.string,\n fullDate: PropTypes.string,\n fullDateTime: PropTypes.string,\n fullDateTime12h: PropTypes.string,\n fullDateTime24h: PropTypes.string,\n fullDateWithWeekday: PropTypes.string,\n fullTime: PropTypes.string,\n fullTime12h: PropTypes.string,\n fullTime24h: PropTypes.string,\n hours12h: PropTypes.string,\n hours24h: PropTypes.string,\n keyboardDate: PropTypes.string,\n keyboardDateTime: PropTypes.string,\n keyboardDateTime12h: PropTypes.string,\n keyboardDateTime24h: PropTypes.string,\n minutes: PropTypes.string,\n month: PropTypes.string,\n monthAndDate: PropTypes.string,\n monthAndYear: PropTypes.string,\n monthShort: PropTypes.string,\n normalDate: PropTypes.string,\n normalDateWithWeekday: PropTypes.string,\n seconds: PropTypes.string,\n shortDate: PropTypes.string,\n weekday: PropTypes.string,\n weekdayShort: PropTypes.string,\n year: PropTypes.string\n }),\n\n /**\n * Date library instance you are using, if it has some global overrides\n * ```jsx\n * dateLibInstance={momentTimeZone}\n * ```\n */\n dateLibInstance: PropTypes.any,\n\n /**\n * Locale for the date library you are using\n */\n locale: PropTypes.oneOfType([PropTypes.object, PropTypes.string])\n} : void 0;\nexport default LocalizationProvider;","export default function composeClasses(slots, getUtilityClass, classes) {\n const output = {};\n Object.keys(slots).forEach( // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n\n acc.push(getUtilityClass(key));\n }\n\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const globalStateClassesMapping = {\n active: 'Mui-active',\n checked: 'Mui-checked',\n completed: 'Mui-completed',\n disabled: 'Mui-disabled',\n error: 'Mui-error',\n expanded: 'Mui-expanded',\n focused: 'Mui-focused',\n focusVisible: 'Mui-focusVisible',\n required: 'Mui-required',\n selected: 'Mui-selected'\n};\nexport default function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClassesMapping[slot];\n return globalStateClass || `${componentName}-${slot}`;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getAlertTitleUtilityClass(slot) {\n return generateUtilityClass('MuiAlertTitle', slot);\n}\nconst alertTitleClasses = generateUtilityClasses('MuiAlertTitle', ['root']);\nexport default alertTitleClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Typography from '../Typography';\nimport { getAlertTitleUtilityClass } from './alertTitleClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getAlertTitleUtilityClass, classes);\n};\n\nconst AlertTitleRoot = styled(Typography, {\n name: 'MuiAlertTitle',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => {\n return {\n fontWeight: theme.typography.fontWeightMedium,\n marginTop: -2\n };\n});\nconst AlertTitle = /*#__PURE__*/React.forwardRef(function AlertTitle(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAlertTitle'\n });\n\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(AlertTitleRoot, _extends({\n gutterBottom: true,\n component: \"div\",\n ownerState: ownerState,\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AlertTitle.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default AlertTitle;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getAlertUtilityClass(slot) {\n return generateUtilityClass('MuiAlert', slot);\n}\nconst alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);\nexport default alertClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _CloseIcon;\n\nconst _excluded = [\"action\", \"children\", \"className\", \"closeText\", \"color\", \"icon\", \"iconMapping\", \"onClose\", \"role\", \"severity\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { darken, lighten } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport Paper from '../Paper';\nimport alertClasses, { getAlertUtilityClass } from './alertClasses';\nimport IconButton from '../IconButton';\nimport SuccessOutlinedIcon from '../internal/svg-icons/SuccessOutlined';\nimport ReportProblemOutlinedIcon from '../internal/svg-icons/ReportProblemOutlined';\nimport ErrorOutlineIcon from '../internal/svg-icons/ErrorOutline';\nimport InfoOutlinedIcon from '../internal/svg-icons/InfoOutlined';\nimport CloseIcon from '../internal/svg-icons/Close';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n variant,\n color,\n severity,\n classes\n } = ownerState;\n const slots = {\n root: ['root', `${variant}${capitalize(color || severity)}`, `${variant}`],\n icon: ['icon'],\n message: ['message'],\n action: ['action']\n };\n return composeClasses(slots, getAlertUtilityClass, classes);\n};\n\nconst AlertRoot = styled(Paper, {\n name: 'MuiAlert',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color || ownerState.severity)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n const getColor = theme.palette.mode === 'light' ? darken : lighten;\n const getBackgroundColor = theme.palette.mode === 'light' ? lighten : darken;\n const color = ownerState.color || ownerState.severity;\n return _extends({}, theme.typography.body2, {\n borderRadius: theme.shape.borderRadius,\n backgroundColor: 'transparent',\n display: 'flex',\n padding: '6px 16px'\n }, color && ownerState.variant === 'standard' && {\n color: getColor(theme.palette[color].light, 0.6),\n backgroundColor: getBackgroundColor(theme.palette[color].light, 0.9),\n [`& .${alertClasses.icon}`]: {\n color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light\n }\n }, color && ownerState.variant === 'outlined' && {\n color: getColor(theme.palette[color].light, 0.6),\n border: `1px solid ${theme.palette[color].light}`,\n [`& .${alertClasses.icon}`]: {\n color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light\n }\n }, color && ownerState.variant === 'filled' && {\n color: '#fff',\n fontWeight: theme.typography.fontWeightMedium,\n backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main\n });\n});\nconst AlertIcon = styled('div', {\n name: 'MuiAlert',\n slot: 'Icon',\n overridesResolver: (props, styles) => styles.icon\n})({\n marginRight: 12,\n padding: '7px 0',\n display: 'flex',\n fontSize: 22,\n opacity: 0.9\n});\nconst AlertMessage = styled('div', {\n name: 'MuiAlert',\n slot: 'Message',\n overridesResolver: (props, styles) => styles.message\n})({\n padding: '8px 0'\n});\nconst AlertAction = styled('div', {\n name: 'MuiAlert',\n slot: 'Action',\n overridesResolver: (props, styles) => styles.action\n})({\n display: 'flex',\n alignItems: 'flex-start',\n padding: '4px 0 0 16px',\n marginLeft: 'auto',\n marginRight: -8\n});\nconst defaultIconMapping = {\n success: /*#__PURE__*/_jsx(SuccessOutlinedIcon, {\n fontSize: \"inherit\"\n }),\n warning: /*#__PURE__*/_jsx(ReportProblemOutlinedIcon, {\n fontSize: \"inherit\"\n }),\n error: /*#__PURE__*/_jsx(ErrorOutlineIcon, {\n fontSize: \"inherit\"\n }),\n info: /*#__PURE__*/_jsx(InfoOutlinedIcon, {\n fontSize: \"inherit\"\n })\n};\nconst Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAlert'\n });\n\n const {\n action,\n children,\n className,\n closeText = 'Close',\n color,\n icon,\n iconMapping = defaultIconMapping,\n onClose,\n role = 'alert',\n severity = 'success',\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n severity,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(AlertRoot, _extends({\n role: role,\n square: true,\n elevation: 0,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: [icon !== false ? /*#__PURE__*/_jsx(AlertIcon, {\n ownerState: ownerState,\n className: classes.icon,\n children: icon || iconMapping[severity] || defaultIconMapping[severity]\n }) : null, /*#__PURE__*/_jsx(AlertMessage, {\n ownerState: ownerState,\n className: classes.message,\n children: children\n }), action != null ? /*#__PURE__*/_jsx(AlertAction, {\n className: classes.action,\n children: action\n }) : null, action == null && onClose ? /*#__PURE__*/_jsx(AlertAction, {\n ownerState: ownerState,\n className: classes.action,\n children: /*#__PURE__*/_jsx(IconButton, {\n size: \"small\",\n \"aria-label\": closeText,\n title: closeText,\n color: \"inherit\",\n onClick: onClose,\n children: _CloseIcon || (_CloseIcon = /*#__PURE__*/_jsx(CloseIcon, {\n fontSize: \"small\"\n }))\n })\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Alert.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the alert.\n */\n action: PropTypes.node,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Override the default label for the *close popup* icon button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n * @default 'Close'\n */\n closeText: PropTypes.string,\n\n /**\n * The main color for the alert. Unless provided, the value is taken from the `severity` prop.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * Override the icon displayed before the children.\n * Unless provided, the icon is mapped to the value of the `severity` prop.\n * Set to `false` to remove the `icon`.\n */\n icon: PropTypes.node,\n\n /**\n * The component maps the `severity` prop to a range of different icons,\n * for instance success to `<SuccessOutlined>`.\n * If you wish to change this mapping, you can provide your own.\n * Alternatively, you can use the `icon` prop to override the icon displayed.\n */\n iconMapping: PropTypes.shape({\n error: PropTypes.node,\n info: PropTypes.node,\n success: PropTypes.node,\n warning: PropTypes.node\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n * When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * The ARIA role attribute of the element.\n * @default 'alert'\n */\n role: PropTypes.string,\n\n /**\n * The severity of the alert. This defines the color and icon used.\n * @default 'success'\n */\n severity: PropTypes.oneOf(['error', 'info', 'success', 'warning']),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n * @default 'standard'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])\n} : void 0;\nexport default Alert;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z\"\n}), 'SuccessOutlined');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z\"\n}), 'ReportProblemOutlined');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'ErrorOutline');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z\"\n}), 'InfoOutlined');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n *\n * Alias to `Clear`.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getAppBarUtilityClass(slot) {\n return generateUtilityClass('MuiAppBar', slot);\n}\nconst appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent']);\nexport default appBarClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"color\", \"enableColorOnDark\", \"position\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport Paper from '../Paper';\nimport { getAppBarUtilityClass } from './appBarClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n position,\n classes\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, `position${capitalize(position)}`]\n };\n return composeClasses(slots, getAppBarUtilityClass, classes);\n};\n\nconst AppBarRoot = styled(Paper, {\n name: 'MuiAppBar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n const backgroundColorDefault = theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900];\n return _extends({\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n boxSizing: 'border-box',\n // Prevent padding issue with the Modal and fixed positioned AppBar.\n flexShrink: 0\n }, ownerState.position === 'fixed' && {\n position: 'fixed',\n zIndex: theme.zIndex.appBar,\n top: 0,\n left: 'auto',\n right: 0,\n '@media print': {\n // Prevent the app bar to be visible on each printed page.\n position: 'absolute'\n }\n }, ownerState.position === 'absolute' && {\n position: 'absolute',\n zIndex: theme.zIndex.appBar,\n top: 0,\n left: 'auto',\n right: 0\n }, ownerState.position === 'sticky' && {\n // âš ï¸ sticky is not supported by IE11.\n position: 'sticky',\n zIndex: theme.zIndex.appBar,\n top: 0,\n left: 'auto',\n right: 0\n }, ownerState.position === 'static' && {\n position: 'static'\n }, ownerState.position === 'relative' && {\n position: 'relative'\n }, ownerState.color === 'default' && {\n backgroundColor: backgroundColorDefault,\n color: theme.palette.getContrastText(backgroundColorDefault)\n }, ownerState.color && ownerState.color !== 'default' && ownerState.color !== 'inherit' && ownerState.color !== 'transparent' && {\n backgroundColor: theme.palette[ownerState.color].main,\n color: theme.palette[ownerState.color].contrastText\n }, ownerState.color === 'inherit' && {\n color: 'inherit'\n }, theme.palette.mode === 'dark' && !ownerState.enableColorOnDark && {\n backgroundColor: null,\n color: null\n }, ownerState.color === 'transparent' && _extends({\n backgroundColor: 'transparent',\n color: 'inherit'\n }, theme.palette.mode === 'dark' && {\n backgroundImage: 'none'\n }));\n});\nconst AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAppBar'\n });\n\n const {\n className,\n color = 'primary',\n enableColorOnDark = false,\n position = 'fixed'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n position,\n enableColorOnDark\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(AppBarRoot, _extends({\n square: true,\n component: \"header\",\n ownerState: ownerState,\n elevation: 4,\n className: clsx(classes.root, className, position === 'fixed' && 'mui-fixed'),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AppBar.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']), PropTypes.string]),\n\n /**\n * If true, the `color` prop is applied in dark mode.\n * @default false\n */\n enableColorOnDark: PropTypes.bool,\n\n /**\n * The positioning type. The behavior of the different options is described\n * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).\n * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.\n * @default 'fixed'\n */\n position: PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky']),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default AppBar;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getAvatarUtilityClass(slot) {\n return generateUtilityClass('MuiAvatar', slot);\n}\nconst avatarClasses = generateUtilityClasses('MuiAvatar', ['root', 'colorDefault', 'circular', 'rounded', 'square', 'img', 'fallback']);\nexport default avatarClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"alt\", \"children\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Person from '../internal/svg-icons/Person';\nimport { getAvatarUtilityClass } from './avatarClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n colorDefault\n } = ownerState;\n const slots = {\n root: ['root', variant, colorDefault && 'colorDefault'],\n img: ['img'],\n fallback: ['fallback']\n };\n return composeClasses(slots, getAvatarUtilityClass, classes);\n};\n\nconst AvatarRoot = styled('div', {\n name: 'MuiAvatar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.colorDefault && styles.colorDefault];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n}, ownerState.variant === 'rounded' && {\n borderRadius: theme.shape.borderRadius\n}, ownerState.variant === 'square' && {\n borderRadius: 0\n}, ownerState.colorDefault && {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n}));\nconst AvatarImg = styled('img', {\n name: 'MuiAvatar',\n slot: 'Img',\n overridesResolver: (props, styles) => styles.img\n})({\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n});\nconst AvatarFallback = styled(Person, {\n name: 'MuiAvatar',\n slot: 'Fallback',\n overridesResolver: (props, styles) => styles.fallback\n})({\n width: '75%',\n height: '75%'\n});\n\nfunction useLoaded({\n crossOrigin,\n referrerPolicy,\n src,\n srcSet\n}) {\n const [loaded, setLoaded] = React.useState(false);\n React.useEffect(() => {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n let active = true;\n const image = new Image();\n\n image.onload = () => {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = () => {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n image.crossOrigin = crossOrigin;\n image.referrerPolicy = referrerPolicy;\n image.src = src;\n\n if (srcSet) {\n image.srcset = srcSet;\n }\n\n return () => {\n active = false;\n };\n }, [crossOrigin, referrerPolicy, src, srcSet]);\n return loaded;\n}\n\nconst Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAvatar'\n });\n\n const {\n alt,\n children: childrenProp,\n className,\n component = 'div',\n imgProps,\n sizes,\n src,\n srcSet,\n variant = 'circular'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n let children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n const loaded = useLoaded(_extends({}, imgProps, {\n src,\n srcSet\n }));\n const hasImg = src || srcSet;\n const hasImgNotFailing = hasImg && loaded !== 'error';\n\n const ownerState = _extends({}, props, {\n colorDefault: !hasImgNotFailing,\n component,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/_jsx(AvatarImg, _extends({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n ownerState: ownerState,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/_jsx(AvatarFallback, {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/_jsx(AvatarRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The shape of the avatar.\n * @default 'circular'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['circular', 'rounded', 'square']), PropTypes.string])\n} : void 0;\nexport default Avatar;","import generateUtilityClasses from '../generateUtilityClasses';\nimport generateUtilityClass from '../generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropUnstyledClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropUnstyledClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"classes\", \"className\", \"invisible\", \"component\", \"components\", \"componentsProps\", \"theme\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '../composeClasses';\nimport isHostComponent from '../utils/isHostComponent';\nimport { getBackdropUtilityClass } from './backdropUnstyledClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\n\nconst BackdropUnstyled = /*#__PURE__*/React.forwardRef(function BackdropUnstyled(props, ref) {\n const {\n classes: classesProp,\n className,\n invisible = false,\n component = 'div',\n components = {},\n componentsProps = {},\n\n /* eslint-disable react/prop-types */\n theme\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n classes: classesProp,\n invisible\n });\n\n const classes = useUtilityClasses(ownerState);\n const Root = components.Root || component;\n const rootProps = componentsProps.root || {};\n return /*#__PURE__*/_jsx(Root, _extends({\n \"aria-hidden\": true\n }, rootProps, !isHostComponent(Root) && {\n as: component,\n ownerState: _extends({}, ownerState, rootProps.ownerState),\n theme\n }, {\n ref: ref\n }, other, {\n className: clsx(classes.root, rootProps.className, className)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? BackdropUnstyled.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * The components used for each slot inside the Backdrop.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Backdrop.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool\n} : void 0;\nexport default BackdropUnstyled;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"components\", \"componentsProps\", \"className\", \"invisible\", \"open\", \"transitionDuration\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { isHostComponent } from '@mui/core';\nimport BackdropUnstyled, { backdropUnstyledClasses } from '@mui/core/BackdropUnstyled';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Fade from '../Fade';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const backdropClasses = backdropUnstyledClasses;\n\nconst extendUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n return classes;\n};\n\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n}, ownerState.invisible && {\n backgroundColor: 'transparent'\n}));\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n var _componentsProps$root;\n\n const props = useThemeProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n\n const {\n children,\n components = {},\n componentsProps = {},\n className,\n invisible = false,\n open,\n transitionDuration,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Fade\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n invisible\n });\n\n const classes = extendUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other, {\n children: /*#__PURE__*/_jsx(BackdropUnstyled, {\n className: className,\n invisible: invisible,\n components: _extends({\n Root: BackdropRoot\n }, components),\n componentsProps: {\n root: _extends({}, componentsProps.root, (!components.Root || !isHostComponent(components.Root)) && {\n ownerState: _extends({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState)\n })\n },\n classes: classes,\n ref: ref,\n children: children\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The components used for each slot inside the Backdrop.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Backdrop.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"component\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport styled from '@mui/styled-engine';\nimport styleFunctionSx, { extendSxProp } from './styleFunctionSx';\nimport useTheme from './useTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createBox(options = {}) {\n const {\n defaultTheme\n } = options;\n const BoxRoot = styled('div')(styleFunctionSx);\n const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {\n const theme = useTheme(defaultTheme);\n\n const _extendSxProp = extendSxProp(inProps),\n {\n className,\n component = 'div'\n } = _extendSxProp,\n other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded);\n\n return /*#__PURE__*/_jsx(BoxRoot, _extends({\n as: component,\n ref: ref,\n className: clsx(className, 'MuiBox-root'),\n theme: theme\n }, other));\n });\n process.env.NODE_ENV !== \"production\" ? Box.propTypes\n /* remove-proptypes */\n = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * @ignore\n */\n sx: PropTypes.object\n } : void 0;\n return Box;\n}","import { createBox } from '@mui/system';\nimport { createTheme } from '../styles';\nconst defaultTheme = createTheme();\n/**\n * @ignore - do not document.\n */\n\nconst Box = createBox({\n defaultTheme\n});\nexport default Box;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"center\", \"classes\", \"className\"];\n\nlet _ = t => t,\n _t,\n _t2,\n _t3,\n _t4;\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport { keyframes } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Ripple from './Ripple';\nimport touchRippleClasses from './touchRippleClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes(_t || (_t = _`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`));\nconst exitKeyframe = keyframes(_t2 || (_t2 = _`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`));\nconst pulsateKeyframe = keyframes(_t3 || (_t3 = _`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`));\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root',\n skipSx: true\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n}); // This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\n\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})(_t4 || (_t4 = _`\n opacity: 0;\n position: absolute;\n\n &.${0} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${0};\n animation-duration: ${0}ms;\n animation-timing-function: ${0};\n }\n\n &.${0} {\n animation-duration: ${0}ms;\n }\n\n & .${0} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${0} {\n opacity: 0;\n animation-name: ${0};\n animation-duration: ${0}ms;\n animation-timing-function: ${0};\n }\n\n & .${0} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${0};\n animation-duration: 2500ms;\n animation-timing-function: ${0};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`), touchRippleClasses.rippleVisible, enterKeyframe, DURATION, ({\n theme\n}) => theme.transitions.easing.easeInOut, touchRippleClasses.ripplePulsate, ({\n theme\n}) => theme.transitions.duration.shorter, touchRippleClasses.child, touchRippleClasses.childLeaving, exitKeyframe, DURATION, ({\n theme\n}) => theme.transitions.easing.easeInOut, touchRippleClasses.childPulsate, pulsateKeyframe, ({\n theme\n}) => theme.transitions.easing.easeInOut);\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n\n const {\n center: centerProp = false,\n classes = {},\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n const ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n const startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n React.useEffect(() => {\n return () => {\n clearTimeout(startTimer.current);\n };\n }, []);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n\n } = options;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n let rippleX;\n let rippleY;\n let rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3); // For some reason the animation is broken on Mobile Chrome if the size is even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(() => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(() => {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, _extends({\n className: clsx(classes.root, touchRippleClasses.root, className),\n ref: container\n }, other, {\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"action\", \"centerRipple\", \"children\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"LinkComponent\", \"onBlur\", \"onClick\", \"onContextMenu\", \"onDragLeave\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"tabIndex\", \"TouchRippleProps\", \"type\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@mui/utils';\nimport composeClasses from '@mui/core/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from './buttonBaseClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n\n return composedClasses;\n};\n\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native <a /> element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n type\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const buttonRef = React.useRef(null);\n const rippleRef = React.useRef(null);\n const {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n const [focusVisible, setFocusVisible] = React.useState(false);\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {\n return useEventCallback(event => {\n if (eventCallback) {\n eventCallback(event);\n }\n\n const ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n const handleMouseDown = useRippleHandler('start', onMouseDown);\n const handleContextMenu = useRippleHandler('stop', onContextMenu);\n const handleDragLeave = useRippleHandler('stop', onDragLeave);\n const handleMouseUp = useRippleHandler('stop', onMouseUp);\n const handleMouseLeave = useRippleHandler('stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n const handleTouchStart = useRippleHandler('start', onTouchStart);\n const handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n const handleTouchMove = useRippleHandler('stop', onTouchMove);\n const handleBlur = useRippleHandler('stop', event => {\n handleBlurVisible(event);\n\n if (isFocusVisibleRef.current === false) {\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n handleFocusVisible(event);\n\n if (isFocusVisibleRef.current === true) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n const keydownRef = React.useRef(false);\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n rippleRef.current.stop(event, () => {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {\n keydownRef.current = false;\n rippleRef.current.stop(event, () => {\n rippleRef.current.pulsate(event);\n });\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {\n onClick(event);\n }\n });\n let ComponentProp = component;\n\n if (ComponentProp === 'button' && (other.href || other.to)) {\n ComponentProp = LinkComponent;\n }\n\n const buttonProps = {};\n\n if (ComponentProp === 'button') {\n buttonProps.type = type === undefined ? 'button' : type;\n buttonProps.disabled = disabled;\n } else {\n if (!other.href && !other.to) {\n buttonProps.role = 'button';\n }\n\n if (disabled) {\n buttonProps['aria-disabled'] = disabled;\n }\n }\n\n const handleOwnRef = useForkRef(focusVisibleRef, buttonRef);\n const handleRef = useForkRef(ref, handleOwnRef);\n const [mountedState, setMountedState] = React.useState(false);\n React.useEffect(() => {\n setMountedState(true);\n }, []);\n const enableTouchRipple = mountedState && !disableRipple && !disabled;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (enableTouchRipple && !rippleRef.current) {\n console.error(['MUI: The `component` prop provided to ButtonBase is invalid.', 'Please make sure the children prop is rendered in this custom component.'].join('\\n'));\n }\n }, [enableTouchRipple]);\n }\n\n const ownerState = _extends({}, props, {\n centerRipple,\n component,\n disabled,\n disableRipple,\n disableTouchRipple,\n focusRipple,\n tabIndex,\n focusVisible\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(ButtonBaseRoot, _extends({\n as: ComponentProp,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n onBlur: handleBlur,\n onClick: onClick,\n onContextMenu: handleContextMenu,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n onMouseDown: handleMouseDown,\n onMouseLeave: handleMouseLeave,\n onMouseUp: handleMouseUp,\n onDragLeave: handleDragLeave,\n onTouchEnd: handleTouchEnd,\n onTouchMove: handleTouchMove,\n onTouchStart: handleTouchStart,\n ref: handleRef,\n tabIndex: disabled ? -1 : tabIndex,\n type: type\n }, buttonProps, other, {\n children: [children, enableTouchRipple ?\n /*#__PURE__*/\n\n /* TouchRipple is only needed client-side, x2 boost on the server. */\n _jsx(TouchRipple, _extends({\n ref: rippleRef,\n center: centerRipple\n }, TouchRippleProps)) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonBase.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: refType,\n\n /**\n * If `true`, the ripples are centered.\n * They won't start at the cursor interaction position.\n * @default false\n */\n centerRipple: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If `true`, the touch ripple effect is disabled.\n * @default false\n */\n disableTouchRipple: PropTypes.bool,\n\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n * @default false\n */\n focusRipple: PropTypes.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * @ignore\n */\n href: PropTypes\n /* @typescript-to-proptypes-ignore */\n .any,\n\n /**\n * The component used to render a link when the `href` prop is provided.\n * @default 'a'\n */\n LinkComponent: PropTypes.elementType,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onContextMenu: PropTypes.func,\n\n /**\n * @ignore\n */\n onDragLeave: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseUp: PropTypes.func,\n\n /**\n * @ignore\n */\n onTouchEnd: PropTypes.func,\n\n /**\n * @ignore\n */\n onTouchMove: PropTypes.func,\n\n /**\n * @ignore\n */\n onTouchStart: PropTypes.func,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string])\n} : void 0;\nexport default ButtonBase;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getButtonUtilityClass(slot) {\n return generateUtilityClass('MuiButton', slot);\n}\nconst buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);\nexport default buttonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha } from '@mui/system';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport buttonClasses, { getButtonUtilityClass } from './buttonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],\n label: ['label'],\n startIcon: ['startIcon', `iconSize${capitalize(size)}`],\n endIcon: ['endIcon', `iconSize${capitalize(size)}`]\n };\n const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst commonIconStyles = ownerState => _extends({}, ownerState.size === 'small' && {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n}, ownerState.size === 'medium' && {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n}, ownerState.size === 'large' && {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n});\n\nconst ButtonRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];\n }\n})(({\n theme,\n ownerState\n}) => _extends({}, theme.typography.button, {\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': _extends({\n textDecoration: 'none',\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n border: `1px solid ${theme.palette[ownerState.color].main}`,\n backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'contained' && {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n }\n }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n backgroundColor: theme.palette[ownerState.color].dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette[ownerState.color].main\n }\n }),\n '&:active': _extends({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[8]\n }),\n [`&.${buttonClasses.focusVisible}`]: _extends({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[6]\n }),\n [`&.${buttonClasses.disabled}`]: _extends({\n color: theme.palette.action.disabled\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${theme.palette.action.disabledBackground}`\n }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {\n border: `1px solid ${theme.palette.action.disabled}`\n }, ownerState.variant === 'contained' && {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n })\n}, ownerState.variant === 'text' && {\n padding: '6px 8px'\n}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main\n}, ownerState.variant === 'outlined' && {\n padding: '5px 15px',\n border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`\n}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main,\n border: `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`\n}, ownerState.variant === 'contained' && {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2]\n}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].contrastText,\n backgroundColor: theme.palette[ownerState.color].main\n}, ownerState.color === 'inherit' && {\n color: 'inherit',\n borderColor: 'currentColor'\n}, ownerState.size === 'small' && ownerState.variant === 'text' && {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'text' && {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'contained' && {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'contained' && {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.fullWidth && {\n width: '100%'\n}), ({\n ownerState\n}) => ownerState.disableElevation && {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n boxShadow: 'none'\n }\n});\nconst ButtonStartIcon = styled('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4\n}, ownerState.size === 'small' && {\n marginLeft: -2\n}, commonIconStyles(ownerState)));\nconst ButtonEndIcon = styled('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8\n}, ownerState.size === 'small' && {\n marginRight: -2\n}, commonIconStyles(ownerState)));\nconst Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiButton'\n });\n\n const {\n children,\n color = 'primary',\n component = 'button',\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n size,\n type,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const startIcon = startIconProp && /*#__PURE__*/_jsx(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp\n });\n\n const endIcon = endIconProp && /*#__PURE__*/_jsx(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp\n });\n\n return /*#__PURE__*/_jsxs(ButtonRoot, _extends({\n ownerState: ownerState,\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other, {\n classes: classes,\n children: [startIcon, children, endIcon]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])\n} : void 0;\nexport default Button;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getCardContentUtilityClass(slot) {\n return generateUtilityClass('MuiCardContent', slot);\n}\nconst cardContentClasses = generateUtilityClasses('MuiCardContent', ['root']);\nexport default cardContentClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"component\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getCardContentUtilityClass } from './cardContentClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getCardContentUtilityClass, classes);\n};\n\nconst CardContentRoot = styled('div', {\n name: 'MuiCardContent',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(() => {\n return {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n };\n});\nconst CardContent = /*#__PURE__*/React.forwardRef(function CardContent(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCardContent'\n });\n\n const {\n className,\n component = 'div'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n component\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(CardContentRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardContent.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default CardContent;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getCardUtilityClass(slot) {\n return generateUtilityClass('MuiCard', slot);\n}\nconst cardClasses = generateUtilityClasses('MuiCard', ['root']);\nexport default cardClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"raised\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Paper from '../Paper';\nimport { getCardUtilityClass } from './cardClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getCardUtilityClass, classes);\n};\n\nconst CardRoot = styled(Paper, {\n name: 'MuiCard',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(() => {\n return {\n overflow: 'hidden'\n };\n});\nconst Card = /*#__PURE__*/React.forwardRef(function Card(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCard'\n });\n\n const {\n className,\n raised = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n raised\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(CardRoot, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : undefined,\n ref: ref,\n ownerState: ownerState\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Card.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the card will use raised styling.\n * @default false\n */\n raised: chainPropTypes(PropTypes.bool, props => {\n if (props.raised && props.variant === 'outlined') {\n return new Error('MUI: Combining `raised={true}` with `variant=\"outlined\"` has no effect.');\n }\n\n return null;\n }),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default Card;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getCheckboxUtilityClass(slot) {\n return generateUtilityClass('MuiCheckbox', slot);\n}\nconst checkboxClasses = generateUtilityClasses('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary']);\nexport default checkboxClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"checkedIcon\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha } from '@mui/system';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport checkboxClasses, { getCheckboxUtilityClass } from './checkboxClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n indeterminate,\n color\n } = ownerState;\n const slots = {\n root: ['root', indeterminate && 'indeterminate', `color${capitalize(color)}`]\n };\n const composedClasses = composeClasses(slots, getCheckboxUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst CheckboxRoot = styled(SwitchBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiCheckbox',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.indeterminate && styles.indeterminate, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n color: theme.palette.text.secondary\n}, !ownerState.disableRipple && {\n '&:hover': {\n backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.color !== 'default' && {\n [`&.${checkboxClasses.checked}, &.${checkboxClasses.indeterminate}`]: {\n color: theme.palette[ownerState.color].main\n },\n [`&.${checkboxClasses.disabled}`]: {\n color: theme.palette.action.disabled\n }\n}));\n\nconst defaultCheckedIcon = /*#__PURE__*/_jsx(CheckBoxIcon, {});\n\nconst defaultIcon = /*#__PURE__*/_jsx(CheckBoxOutlineBlankIcon, {});\n\nconst defaultIndeterminateIcon = /*#__PURE__*/_jsx(IndeterminateCheckBoxIcon, {});\n\nconst Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {\n var _icon$props$fontSize, _indeterminateIcon$pr;\n\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCheckbox'\n });\n\n const {\n checkedIcon = defaultCheckedIcon,\n color = 'primary',\n icon: iconProp = defaultIcon,\n indeterminate = false,\n indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,\n inputProps,\n size = 'medium'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const icon = indeterminate ? indeterminateIconProp : iconProp;\n const indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n\n const ownerState = _extends({}, props, {\n color,\n indeterminate,\n size\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(CheckboxRoot, _extends({\n type: \"checkbox\",\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: (_icon$props$fontSize = icon.props.fontSize) != null ? _icon$props$fontSize : size\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: (_indeterminateIcon$pr = indeterminateIcon.props.fontSize) != null ? _indeterminateIcon$pr : size\n }),\n ownerState: ownerState,\n ref: ref\n }, other, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n * @default <CheckBoxIcon />\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The default checked state. Use when the component is not controlled.\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n * @default <CheckBoxOutlineBlankIcon />\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the `input`.\n * @default false\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n * @default <IndeterminateCheckBoxIcon />\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense checkbox styling.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default Checkbox;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getCircularProgressUtilityClass(slot) {\n return generateUtilityClass('MuiCircularProgress', slot);\n}\nconst circularProgressClasses = generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);\nexport default circularProgressClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"];\n\nlet _ = t => t,\n _t,\n _t2,\n _t3,\n _t4;\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { keyframes, css } from '@mui/system';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getCircularProgressUtilityClass } from './circularProgressClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst SIZE = 44;\nconst circularRotateKeyframe = keyframes(_t || (_t = _`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`));\nconst circularDashKeyframe = keyframes(_t2 || (_t2 = _`\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n`));\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n color,\n disableShrink\n } = ownerState;\n const slots = {\n root: ['root', variant, `color${capitalize(color)}`],\n svg: ['svg'],\n circle: ['circle', `circle${capitalize(variant)}`, disableShrink && 'circleDisableShrink']\n };\n return composeClasses(slots, getCircularProgressUtilityClass, classes);\n};\n\nconst CircularProgressRoot = styled('span', {\n name: 'MuiCircularProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n display: 'inline-block'\n}, ownerState.variant === 'determinate' && {\n transition: theme.transitions.create('transform')\n}, ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main\n}), ({\n ownerState\n}) => ownerState.variant === 'indeterminate' && css(_t3 || (_t3 = _`\n animation: ${0} 1.4s linear infinite;\n `), circularRotateKeyframe));\nconst CircularProgressSVG = styled('svg', {\n name: 'MuiCircularProgress',\n slot: 'Svg',\n overridesResolver: (props, styles) => styles.svg\n})({\n display: 'block' // Keeps the progress centered\n\n});\nconst CircularProgressCircle = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Circle',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n stroke: 'currentColor'\n}, ownerState.variant === 'determinate' && {\n transition: theme.transitions.create('stroke-dashoffset')\n}, ownerState.variant === 'indeterminate' && {\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug.\n\n}), ({\n ownerState\n}) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink && css(_t4 || (_t4 = _`\n animation: ${0} 1.4s ease-in-out infinite;\n `), circularDashKeyframe));\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nconst CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCircularProgress'\n });\n\n const {\n className,\n color = 'primary',\n disableShrink = false,\n size = 40,\n style,\n thickness = 3.6,\n value = 0,\n variant = 'indeterminate'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n disableShrink,\n size,\n thickness,\n value,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n const circleStyle = {};\n const rootStyle = {};\n const rootProps = {};\n\n if (variant === 'determinate') {\n const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;\n rootStyle.transform = 'rotate(-90deg)';\n }\n\n return /*#__PURE__*/_jsx(CircularProgressRoot, _extends({\n className: clsx(classes.root, className),\n style: _extends({\n width: size,\n height: size\n }, rootStyle, style),\n ownerState: ownerState,\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other, {\n children: /*#__PURE__*/_jsx(CircularProgressSVG, {\n className: classes.svg,\n ownerState: ownerState,\n viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,\n children: /*#__PURE__*/_jsx(CircularProgressCircle, {\n className: classes.circle,\n style: circleStyle,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n * @default false\n */\n disableShrink: chainPropTypes(PropTypes.bool, props => {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the component.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n * @default 40\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The thickness of the circle.\n * @default 3.6\n */\n thickness: PropTypes.number,\n\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n * @default 0\n */\n value: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n * @default 'indeterminate'\n */\n variant: PropTypes.oneOf(['determinate', 'indeterminate'])\n} : void 0;\nexport default CircularProgress;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getDividerUtilityClass(slot) {\n return generateUtilityClass('MuiDivider', slot);\n}\nconst dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);\nexport default dividerClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"absolute\", \"children\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"textAlign\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDividerUtilityClass } from './dividerClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n absolute,\n children,\n classes,\n flexItem,\n light,\n orientation,\n textAlign,\n variant\n } = ownerState;\n const slots = {\n root: ['root', absolute && 'absolute', variant, light && 'light', orientation === 'vertical' && 'vertical', flexItem && 'flexItem', children && 'withChildren', children && orientation === 'vertical' && 'withChildrenVertical', textAlign === 'right' && orientation !== 'vertical' && 'textAlignRight', textAlign === 'left' && orientation !== 'vertical' && 'textAlignLeft'],\n wrapper: ['wrapper', orientation === 'vertical' && 'wrapperVertical']\n };\n return composeClasses(slots, getDividerUtilityClass, classes);\n};\n\nconst DividerRoot = styled('div', {\n name: 'MuiDivider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.absolute && styles.absolute, styles[ownerState.variant], ownerState.light && styles.light, ownerState.orientation === 'vertical' && styles.vertical, ownerState.flexItem && styles.flexItem, ownerState.children && styles.withChildren, ownerState.children && ownerState.orientation === 'vertical' && styles.withChildrenVertical, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && styles.textAlignRight, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && styles.textAlignLeft];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n margin: 0,\n // Reset browser default style.\n flexShrink: 0,\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n borderBottomWidth: 'thin'\n}, ownerState.absolute && {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n}, ownerState.light && {\n borderColor: alpha(theme.palette.divider, 0.08)\n}, ownerState.variant === 'inset' && {\n marginLeft: 72\n}, ownerState.variant === 'middle' && ownerState.orientation === 'horizontal' && {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n}, ownerState.variant === 'middle' && ownerState.orientation === 'vertical' && {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n}, ownerState.orientation === 'vertical' && {\n height: '100%',\n borderBottomWidth: 0,\n borderRightWidth: 'thin'\n}, ownerState.flexItem && {\n alignSelf: 'stretch',\n height: 'auto'\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.children && {\n display: 'flex',\n whiteSpace: 'nowrap',\n textAlign: 'center',\n border: 0,\n '&::before, &::after': {\n position: 'relative',\n width: '100%',\n borderTop: `thin solid ${theme.palette.divider}`,\n top: '50%',\n content: '\"\"',\n transform: 'translateY(50%)'\n }\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.children && ownerState.orientation === 'vertical' && {\n flexDirection: 'column',\n '&::before, &::after': {\n height: '100%',\n top: '0%',\n left: '50%',\n borderTop: 0,\n borderLeft: `thin solid ${theme.palette.divider}`,\n transform: 'translateX(0%)'\n }\n}), ({\n ownerState\n}) => _extends({}, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && {\n '&::before': {\n width: '90%'\n },\n '&::after': {\n width: '10%'\n }\n}, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && {\n '&::before': {\n width: '10%'\n },\n '&::after': {\n width: '90%'\n }\n}));\nconst DividerWrapper = styled('span', {\n name: 'MuiDivider',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'inline-block',\n paddingLeft: theme.spacing(1.2),\n paddingRight: theme.spacing(1.2)\n}, ownerState.orientation === 'vertical' && {\n paddingTop: theme.spacing(1.2),\n paddingBottom: theme.spacing(1.2)\n}));\nconst Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDivider'\n });\n\n const {\n absolute = false,\n children,\n className,\n component = children ? 'div' : 'hr',\n flexItem = false,\n light = false,\n orientation = 'horizontal',\n role = component !== 'hr' ? 'separator' : undefined,\n textAlign = 'center',\n variant = 'fullWidth'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n absolute,\n component,\n flexItem,\n light,\n orientation,\n role,\n textAlign,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DividerRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n role: role,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: children ? /*#__PURE__*/_jsx(DividerWrapper, {\n className: classes.wrapper,\n ownerState: ownerState,\n children: children\n }) : null\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n * @default false\n */\n absolute: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n * @default false\n */\n flexItem: PropTypes.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n * @default false\n */\n light: PropTypes.bool,\n\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: PropTypes\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The text alignment.\n * @default 'center'\n */\n textAlign: PropTypes.oneOf(['center', 'left', 'right']),\n\n /**\n * The variant to use.\n * @default 'fullWidth'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['fullWidth', 'inset', 'middle']), PropTypes.string])\n} : void 0;\nexport default Divider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { elementAcceptingRef } from '@mui/utils';\nimport { duration } from '../styles/createTransitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nconst defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const theme = useTheme();\n const enableStrictModeCompat = true;\n const nodeRef = React.useRef(null);\n const foreignRef = useForkRef(children.ref, ref);\n const handleRef = useForkRef(nodeRef, foreignRef);\n\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n\n const handleAddEndListener = next => {\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: duration.enteringScreen,\n * exit: duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import { generateUtilityClasses, generateUtilityClass } from '@mui/core';\nexport function getFormControlLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControlLabel', slot);\n}\nconst formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label']);\nexport default formControlLabelClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"checked\", \"className\", \"componentsProps\", \"control\", \"disabled\", \"disableTypography\", \"inputRef\", \"label\", \"labelPlacement\", \"name\", \"onChange\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { useFormControl } from '../FormControl';\nimport Typography from '../Typography';\nimport capitalize from '../utils/capitalize';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport formControlLabelClasses, { getFormControlLabelUtilityClasses } from './formControlLabelClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n labelPlacement\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`],\n label: ['label', disabled && 'disabled']\n };\n return composeClasses(slots, getFormControlLabelUtilityClasses, classes);\n};\n\nexport const FormControlLabelRoot = styled('label', {\n name: 'MuiFormControlLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formControlLabelClasses.label}`]: styles.label\n }, styles.root, styles[`labelPlacement${capitalize(ownerState.labelPlacement)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n [`&.${formControlLabelClasses.disabled}`]: {\n cursor: 'default'\n }\n}, ownerState.labelPlacement === 'start' && {\n flexDirection: 'row-reverse',\n marginLeft: 16,\n // used for row presentation of radio/checkbox\n marginRight: -11\n}, ownerState.labelPlacement === 'top' && {\n flexDirection: 'column-reverse',\n marginLeft: 16\n}, ownerState.labelPlacement === 'bottom' && {\n flexDirection: 'column',\n marginLeft: 16\n}, {\n [`& .${formControlLabelClasses.label}`]: {\n [`&.${formControlLabelClasses.disabled}`]: {\n color: theme.palette.text.disabled\n }\n }\n}));\n/**\n * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\n\nconst FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormControlLabel'\n });\n\n const {\n className,\n componentsProps = {},\n control,\n disabled: disabledProp,\n disableTypography,\n label,\n labelPlacement = 'end'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl();\n let disabled = disabledProp;\n\n if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {\n disabled = control.props.disabled;\n }\n\n if (typeof disabled === 'undefined' && muiFormControl) {\n disabled = muiFormControl.disabled;\n }\n\n const controlProps = {\n disabled\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n\n const ownerState = _extends({}, props, {\n disabled,\n label,\n labelPlacement\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(FormControlLabelRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [/*#__PURE__*/React.cloneElement(control, controlProps), label.type === Typography || disableTypography ? label : /*#__PURE__*/_jsx(Typography, _extends({\n component: \"span\",\n className: classes.label\n }, componentsProps.typography, {\n children: label\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The props used for each slot inside.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n\n /**\n * If `true`, the control is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label is rendered as it is passed without an additional typography node.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The text to be used in an enclosing label element.\n */\n label: PropTypes.node,\n\n /**\n * The position of the label.\n * @default 'end'\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n\n /**\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default FormControlLabel;","import { generateUtilityClasses, generateUtilityClass } from '@mui/core';\nexport function getFormControlUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControl', slot);\n}\nconst formControlClasses = generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);\nexport default formControlClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"focused\", \"fullWidth\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nimport { getFormControlUtilityClasses } from './formControlClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n margin,\n fullWidth\n } = ownerState;\n const slots = {\n root: ['root', margin !== 'none' && `margin${capitalize(margin)}`, fullWidth && 'fullWidth']\n };\n return composeClasses(slots, getFormControlUtilityClasses, classes);\n};\n\nconst FormControlRoot = styled('div', {\n name: 'MuiFormControl',\n slot: 'Root',\n overridesResolver: ({\n ownerState\n }, styles) => {\n return _extends({}, styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth);\n }\n})(({\n ownerState\n}) => _extends({\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top'\n}, ownerState.margin === 'normal' && {\n marginTop: 16,\n marginBottom: 8\n}, ownerState.margin === 'dense' && {\n marginTop: 8,\n marginBottom: 4\n}, ownerState.fullWidth && {\n width: '100%'\n}));\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * <FormControl>\n * <InputLabel htmlFor=\"my-input\">Email address</InputLabel>\n * <Input id=\"my-input\" aria-describedby=\"my-helper-text\" />\n * <FormHelperText id=\"my-helper-text\">We'll never share your email.</FormHelperText>\n * </FormControl>\n * ```\n *\n * âš ï¸ Only one `InputBase` can be used within a FormControl because it create visual inconsistencies.\n * For instance, only one input can be focused at the same time, the state shouldn't be shared.\n */\n\nconst FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormControl'\n });\n\n const {\n children,\n className,\n color = 'primary',\n component = 'div',\n disabled = false,\n error = false,\n focused: visuallyFocused,\n fullWidth = false,\n hiddenLabel = false,\n margin = 'none',\n required = false,\n size = 'medium',\n variant = 'outlined'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n component,\n disabled,\n error,\n fullWidth,\n hiddenLabel,\n margin,\n required,\n size,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n const [adornedStart, setAdornedStart] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n const input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n });\n const [filled, setFilled] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n });\n const [focusedState, setFocused] = React.useState(false);\n\n if (disabled && focusedState) {\n setFocused(false);\n }\n\n const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;\n let registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const registeredInput = React.useRef(false);\n\n registerEffect = () => {\n if (registeredInput.current) {\n console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return () => {\n registeredInput.current = false;\n };\n };\n }\n\n const onFilled = React.useCallback(() => {\n setFilled(true);\n }, []);\n const onEmpty = React.useCallback(() => {\n setFilled(false);\n }, []);\n const childContext = {\n adornedStart,\n setAdornedStart,\n color,\n disabled,\n error,\n filled,\n focused,\n fullWidth,\n hiddenLabel,\n size,\n onBlur: () => {\n setFocused(false);\n },\n onEmpty,\n onFilled,\n onFocus: () => {\n setFocused(true);\n },\n registerEffect,\n required,\n variant\n };\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(FormControlRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the `input` is required.\n * @default false\n */\n required: PropTypes.bool,\n\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default FormControl;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nconst FormControlContext = /*#__PURE__*/React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n FormControlContext.displayName = 'FormControlContext';\n}\n\nexport default FormControlContext;","export default function formControlState({\n props,\n states,\n muiFormControl\n}) {\n return states.reduce((acc, state) => {\n acc[state] = props[state];\n\n if (muiFormControl) {\n if (typeof props[state] === 'undefined') {\n acc[state] = muiFormControl[state];\n }\n }\n\n return acc;\n }, {});\n}","import * as React from 'react';\nimport FormControlContext from './FormControlContext';\nexport default function useFormControl() {\n return React.useContext(FormControlContext);\n}","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getFormGroupUtilityClass(slot) {\n return generateUtilityClass('MuiFormGroup', slot);\n}\nconst formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row']);\nexport default formGroupClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"row\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getFormGroupUtilityClass } from './formGroupClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n row\n } = ownerState;\n const slots = {\n root: ['root', row && 'row']\n };\n return composeClasses(slots, getFormGroupUtilityClass, classes);\n};\n\nconst FormGroupRoot = styled('div', {\n name: 'MuiFormGroup',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.row && styles.row];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap'\n}, ownerState.row && {\n flexDirection: 'row'\n}));\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\n\nconst FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormGroup'\n });\n\n const {\n className,\n row = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n row\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormGroupRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormGroup.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display group of elements in a compact row.\n * @default false\n */\n row: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default FormGroup;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nconst GridContext = /*#__PURE__*/React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n GridContext.displayName = 'GridContext';\n}\n\nexport default GridContext;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getGridUtilityClass(slot) {\n return generateUtilityClass('MuiGrid', slot);\n}\nconst SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];\nconst WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];\nconst GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nconst gridClasses = generateUtilityClasses('MuiGrid', ['root', 'container', 'item', 'zeroMinWidth', // spacings\n...SPACINGS.map(spacing => `spacing-xs-${spacing}`), // direction values\n...DIRECTIONS.map(direction => `direction-xs-${direction}`), // wrap values\n...WRAPS.map(wrap => `wrap-xs-${wrap}`), // grid sizes for all breakpoints\n...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);\nexport default gridClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"columns\", \"columnSpacing\", \"component\", \"container\", \"direction\", \"item\", \"lg\", \"md\", \"rowSpacing\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"];\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_extendSxProp as extendSxProp, handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport requirePropFactory from '../utils/requirePropFactory';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport GridContext from './GridContext';\nimport gridClasses, { getGridUtilityClass } from './gridClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction getOffset(val) {\n const parse = parseFloat(val);\n return `${parse}${String(val).replace(String(parse), '') || 'px'}`;\n}\n\nfunction generateGrid(globalStyles, theme, breakpoint, ownerState) {\n const size = ownerState[breakpoint];\n\n if (!size) {\n return;\n }\n\n let styles = {};\n\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = resolveBreakpointValues({\n values: ownerState.columns,\n base: theme.breakpoints.values\n }); // Keep 7 significant numbers.\n\n const width = `${Math.round(size / columnsBreakpointValues[breakpoint] * 10e7) / 10e5}%`;\n let more = {};\n\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n } // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n\n styles = _extends({\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n }, more);\n } // No need for a media query for the first size.\n\n\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction generateDirection({\n theme,\n ownerState\n}) {\n return handleBreakpoints({\n theme\n }, ownerState.direction, propValue => {\n const output = {\n flexDirection: propValue\n };\n\n if (propValue.indexOf('column') === 0) {\n output[`& > .${gridClasses.item}`] = {\n maxWidth: 'none'\n };\n }\n\n return output;\n });\n}\n\nexport function generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n\n if (container && rowSpacing !== 0) {\n styles = handleBreakpoints({\n theme\n }, rowSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n marginTop: `-${getOffset(themeSpacing)}`,\n [`& > .${gridClasses.item}`]: {\n paddingTop: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n}\nexport function generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n\n if (container && columnSpacing !== 0) {\n styles = handleBreakpoints({\n theme\n }, columnSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n width: `calc(100% + ${getOffset(themeSpacing)})`,\n marginLeft: `-${getOffset(themeSpacing)}`,\n [`& > .${gridClasses.item}`]: {\n paddingLeft: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\nconst GridRoot = styled('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = props.ownerState;\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, container && spacing !== 0 && styles[`spacing-xs-${String(spacing)}`], direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], xs !== false && styles[`grid-xs-${String(xs)}`], sm !== false && styles[`grid-sm-${String(sm)}`], md !== false && styles[`grid-md-${String(md)}`], lg !== false && styles[`grid-lg-${String(lg)}`], xl !== false && styles[`grid-xl-${String(xl)}`]];\n }\n})(({\n ownerState\n}) => _extends({\n boxSizing: 'border-box'\n}, ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n}, ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n\n}, ownerState.zeroMinWidth && {\n minWidth: 0\n}, ownerState.wrap === 'nowrap' && {\n flexWrap: 'nowrap'\n}, ownerState.wrap === 'reverse' && {\n flexWrap: 'wrap-reverse'\n}), generateDirection, generateRowGap, generateColumnGap, ({\n theme,\n ownerState\n}) => theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n generateGrid(globalStyles, theme, breakpoint, ownerState);\n return globalStyles;\n}, {}));\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = ownerState;\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', container && spacing !== 0 && `spacing-xs-${String(spacing)}`, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, xs !== false && `grid-xs-${String(xs)}`, sm !== false && `grid-sm-${String(sm)}`, md !== false && `grid-md-${String(md)}`, lg !== false && `grid-lg-${String(lg)}`, xl !== false && `grid-xl-${String(xl)}`]\n };\n return composeClasses(slots, getGridUtilityClass, classes);\n};\n\nconst Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiGrid'\n });\n const props = extendSxProp(themeProps);\n\n const {\n className,\n columns: columnsProp = 12,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n lg = false,\n md = false,\n rowSpacing: rowSpacingProp,\n sm = false,\n spacing = 0,\n wrap = 'wrap',\n xl = false,\n xs = false,\n zeroMinWidth = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columns = React.useContext(GridContext) || columnsProp;\n\n const ownerState = _extends({}, props, {\n columns,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n rowSpacing,\n columnSpacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const wrapChild = element => columns !== 12 ? /*#__PURE__*/_jsx(GridContext.Provider, {\n value: columns,\n children: element\n }) : element;\n\n return wrapChild( /*#__PURE__*/_jsx(GridRoot, _extends({\n ownerState: ownerState,\n className: clsx(classes.root, className),\n as: component,\n ref: ref\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grid.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The number of columns.\n * @default 12\n */\n columns: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),\n\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: PropTypes.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: PropTypes.bool,\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: PropTypes.oneOfType([PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), PropTypes.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: PropTypes.oneOfType([PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), PropTypes.bool]),\n\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: PropTypes.oneOfType([PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), PropTypes.bool]),\n\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n */\n wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n * @default false\n */\n xl: PropTypes.oneOfType([PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), PropTypes.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: PropTypes.oneOfType([PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), PropTypes.bool]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: PropTypes.bool\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n const requireProp = requirePropFactory('Grid', Grid); // eslint-disable-next-line no-useless-concat\n\n Grid['propTypes' + ''] = _extends({}, Grid.propTypes, {\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\nexport default Grid;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef } from '@mui/utils';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\n\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const timer = React.useRef();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const foreignRef = useForkRef(children.ref, ref);\n const handleRef = useForkRef(nodeRef, foreignRef);\n\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getIconButtonUtilityClass(slot) {\n return generateUtilityClass('MuiIconButton', slot);\n}\nconst iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);\nexport default iconButtonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"edge\", \"children\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport iconButtonClasses, { getIconButtonUtilityClass } from './iconButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n color,\n edge,\n size\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`]\n };\n return composeClasses(slots, getIconButtonUtilityClass, classes);\n};\n\nconst IconButtonRoot = styled(ButtonBase, {\n name: 'MuiIconButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 8,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.edge === 'start' && {\n marginLeft: ownerState.size === 'small' ? -3 : -12\n}, ownerState.edge === 'end' && {\n marginRight: ownerState.size === 'small' ? -3 : -12\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.color === 'inherit' && {\n color: 'inherit'\n}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && {\n color: theme.palette[ownerState.color].main,\n '&:hover': {\n backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.size === 'small' && {\n padding: 5,\n fontSize: theme.typography.pxToRem(18)\n}, ownerState.size === 'large' && {\n padding: 12,\n fontSize: theme.typography.pxToRem(28)\n}, {\n [`&.${iconButtonClasses.disabled}`]: {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n}));\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nconst IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiIconButton'\n });\n\n const {\n edge = false,\n children,\n className,\n color = 'default',\n disabled = false,\n disableFocusRipple = false,\n size = 'medium'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n edge,\n color,\n disabled,\n disableFocusRipple,\n size\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(IconButtonRoot, _extends({\n className: clsx(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The icon to display.\n */\n children: chainPropTypes(PropTypes.node, props => {\n const found = React.Children.toArray(props.children).some(child => /*#__PURE__*/React.isValidElement(child) && child.props.onClick);\n\n if (found) {\n return new Error(['MUI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole <button> will be responsive to click events.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'default'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['inherit', 'default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default IconButton;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\", \"maxRows\", \"minRows\", \"style\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport ownerWindow from '../utils/ownerWindow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction getStyleValue(computedStyle, property) {\n return parseInt(computedStyle[property], 10) || 0;\n}\n\nconst styles = {\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: 'hidden',\n // Remove from the content flow\n position: 'absolute',\n // Ignore the scrollbar width\n overflow: 'hidden',\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: 'translateZ(0)'\n }\n};\nconst TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, ref) {\n const {\n onChange,\n maxRows,\n minRows = 1,\n style,\n value\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef(null);\n const handleRef = useForkRef(ref, inputRef);\n const shadowRef = React.useRef(null);\n const renders = React.useRef(0);\n const [state, setState] = React.useState({});\n const syncHeight = React.useCallback(() => {\n const input = inputRef.current;\n const containerWindow = ownerWindow(input);\n const computedStyle = containerWindow.getComputedStyle(input); // If input's width is shrunk and it's not visible, don't sync height.\n\n if (computedStyle.width === '0px') {\n return;\n }\n\n const inputShallow = shadowRef.current;\n inputShallow.style.width = computedStyle.width;\n inputShallow.value = input.value || props.placeholder || 'x';\n\n if (inputShallow.value.slice(-1) === '\\n') {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += ' ';\n }\n\n const boxSizing = computedStyle['box-sizing'];\n const padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top');\n const border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content\n\n const innerHeight = inputShallow.scrollHeight; // Measure height of a textarea with a single row\n\n inputShallow.value = 'x';\n const singleRowHeight = inputShallow.scrollHeight; // The height of the outer content\n\n let outerHeight = innerHeight;\n\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n\n outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style.\n\n const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n const overflow = Math.abs(outerHeight - innerHeight) <= 1;\n setState(prevState => {\n // Need a large enough difference to update the height.\n // This prevents infinite rendering loop.\n if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {\n renders.current += 1;\n return {\n overflow,\n outerHeightStyle\n };\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (renders.current === 20) {\n console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\\n'));\n }\n }\n\n return prevState;\n });\n }, [maxRows, minRows, props.placeholder]);\n React.useEffect(() => {\n const handleResize = debounce(() => {\n renders.current = 0;\n syncHeight();\n });\n const containerWindow = ownerWindow(inputRef.current);\n containerWindow.addEventListener('resize', handleResize);\n let resizeObserver;\n\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(handleResize);\n resizeObserver.observe(inputRef.current);\n }\n\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [syncHeight]);\n useEnhancedEffect(() => {\n syncHeight();\n });\n React.useEffect(() => {\n renders.current = 0;\n }, [value]);\n\n const handleChange = event => {\n renders.current = 0;\n\n if (!isControlled) {\n syncHeight();\n }\n\n if (onChange) {\n onChange(event);\n }\n };\n\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"textarea\", _extends({\n value: value,\n onChange: handleChange,\n ref: handleRef // Apply the rows prop to get a \"correct\" first SSR paint\n ,\n rows: minRows,\n style: _extends({\n height: state.outerHeightStyle,\n // Need a large enough difference to allow scrolling.\n // This prevents infinite rendering loop.\n overflow: state.overflow ? 'hidden' : null\n }, style)\n }, other)), /*#__PURE__*/_jsx(\"textarea\", {\n \"aria-hidden\": true,\n className: props.className,\n readOnly: true,\n ref: shadowRef,\n tabIndex: -1,\n style: _extends({}, styles.shadow, style, {\n padding: 0\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Maximum number of rows to display.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @default 1\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n placeholder: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * @ignore\n */\n value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\n\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as SystemGlobalStyles } from '@mui/system';\nimport defaultTheme from '../styles/defaultTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction GlobalStyles(props) {\n return /*#__PURE__*/_jsx(SystemGlobalStyles, _extends({}, props, {\n defaultTheme: defaultTheme\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The styles you want to apply globally.\n */\n styles: PropTypes.oneOfType([PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({\n __emotion_styles: PropTypes.any.isRequired\n }), PropTypes.string, PropTypes.bool])\n} : void 0;\nexport default GlobalStyles;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getInputBaseUtilityClass(slot) {\n return generateUtilityClass('MuiInputBase', slot);\n}\nconst inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);\nexport default inputBaseClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nconst _excluded = [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"className\", \"color\", \"components\", \"componentsProps\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"maxRows\", \"minRows\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"size\", \"startAdornment\", \"type\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType, elementTypeAcceptingRef } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, isHostComponent } from '@mui/core';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport useFormControl from '../FormControl/useFormControl';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport TextareaAutosize from '../TextareaAutosize';\nimport GlobalStyles from '../GlobalStyles';\nimport { isFilled } from './utils';\nimport inputBaseClasses, { getInputBaseUtilityClass } from './inputBaseClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const rootOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${capitalize(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];\n};\nexport const inputOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disabled,\n error,\n endAdornment,\n focused,\n formControl,\n fullWidth,\n hiddenLabel,\n multiline,\n size,\n startAdornment,\n type\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],\n input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']\n };\n return composeClasses(slots, getInputBaseUtilityClass, classes);\n};\n\nexport const InputBaseRoot = styled('div', {\n name: 'MuiInputBase',\n slot: 'Root',\n overridesResolver: rootOverridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.4375em',\n // 23px\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n [`&.${inputBaseClasses.disabled}`]: {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n}, ownerState.multiline && _extends({\n padding: '4px 0 5px'\n}, ownerState.size === 'small' && {\n paddingTop: 1\n}), ownerState.fullWidth && {\n width: '100%'\n}));\nexport const InputBaseComponent = styled('input', {\n name: 'MuiInputBase',\n slot: 'Input',\n overridesResolver: inputOverridesResolver\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n const placeholderHidden = {\n opacity: '0 !important'\n };\n const placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return _extends({\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: '4px 0 5px',\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.4375em',\n // Reset 23pxthe native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n WebkitAppearance: 'none'\n },\n // Show and hide the placeholder logic\n [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n [`&.${inputBaseClasses.disabled}`]: {\n opacity: 1,\n // Reset iOS opacity\n WebkitTextFillColor: theme.palette.text.disabled // Fix opacity Safari bug\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n }, ownerState.size === 'small' && {\n paddingTop: 1\n }, ownerState.multiline && {\n height: 'auto',\n resize: 'none',\n padding: 0,\n paddingTop: 0\n }, ownerState.type === 'search' && {\n // Improve type search style.\n MozAppearance: 'textfield',\n WebkitAppearance: 'textfield'\n });\n});\n\nconst inputGlobalStyles = /*#__PURE__*/_jsx(GlobalStyles, {\n styles: {\n '@keyframes mui-auto-fill': {\n from: {\n display: 'block'\n }\n },\n '@keyframes mui-auto-fill-cancel': {\n from: {\n display: 'block'\n }\n }\n }\n});\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\n\nconst InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiInputBase'\n });\n\n const {\n 'aria-describedby': ariaDescribedby,\n autoComplete,\n autoFocus,\n className,\n components = {},\n componentsProps = {},\n defaultValue,\n disabled,\n endAdornment,\n fullWidth = false,\n id,\n inputComponent = 'input',\n inputProps: inputPropsProp = {},\n inputRef: inputRefProp,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n renderSuffix,\n rows,\n startAdornment,\n type = 'text',\n value: valueProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const theme = useTheme();\n const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef();\n const handleInputRefWarning = React.useCallback(instance => {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['MUI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n const handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n const handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n const handleInputRef = useForkRef(inputRef, handleInputRefProp);\n const [focused, setFocused] = React.useState(false);\n const muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(() => {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n const onFilled = muiFormControl && muiFormControl.onFilled;\n const onEmpty = muiFormControl && muiFormControl.onEmpty;\n const checkDirty = React.useCallback(obj => {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(() => {\n if (isControlled) {\n checkDirty({\n value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n const handleFocus = event => {\n // Fix a bug with IE11 where the focus/blur events are triggered\n // while the component is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n const handleChange = (event, ...args) => {\n if (!isControlled) {\n const element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Expected valid input target. Did you use a custom \\`inputComponent\\` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.` : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange(event, ...args);\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange(event, ...args);\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(() => {\n checkDirty(inputRef.current); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleClick = event => {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n let InputComponent = inputComponent;\n let inputProps = inputPropsProp;\n\n if (multiline && InputComponent === 'input') {\n if (rows) {\n if (process.env.NODE_ENV !== 'production') {\n if (minRows || maxRows) {\n console.warn('MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');\n }\n }\n\n inputProps = _extends({\n type: undefined,\n minRows: rows,\n maxRows: rows\n }, inputProps);\n } else {\n inputProps = _extends({\n type: undefined,\n maxRows,\n minRows\n }, inputProps);\n }\n\n InputComponent = TextareaAutosize;\n }\n\n const handleAutoFill = event => {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n\n const ownerState = _extends({}, props, {\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n endAdornment,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n startAdornment,\n type\n });\n\n const classes = useUtilityClasses(ownerState);\n const Root = components.Root || InputBaseRoot;\n const rootProps = componentsProps.root || {};\n const Input = components.Input || InputBaseComponent;\n inputProps = _extends({}, inputProps, componentsProps.input);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [inputGlobalStyles, /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, !isHostComponent(Root) && {\n ownerState: _extends({}, ownerState, rootProps.ownerState),\n theme\n }, {\n ref: ref,\n onClick: handleClick\n }, other, {\n className: clsx(classes.root, rootProps.className, className),\n children: [startAdornment, /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(Input, _extends({\n ownerState: ownerState,\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n type: type\n }, inputProps, !isHostComponent(Input) && {\n as: InputComponent,\n ownerState: _extends({}, ownerState, inputProps.ownerState),\n theme\n }, {\n ref: handleInputRef,\n className: clsx(classes.input, inputProps.className, inputPropsProp.className),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))\n }), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment\n })) : null]\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: elementTypeAcceptingRef,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the `input` is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The size of the component.\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default InputBase;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj, SSR = false) {\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getFormLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormLabel', slot);\n}\nconst formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);\nexport default formLabelClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"filled\", \"focused\", \"required\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport formLabelClasses, { getFormLabelUtilityClasses } from './formLabelClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n focused,\n disabled,\n error,\n filled,\n required\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', filled && 'filled', focused && 'focused', required && 'required'],\n asterisk: ['asterisk', error && 'error']\n };\n return composeClasses(slots, getFormLabelUtilityClasses, classes);\n};\n\nexport const FormLabelRoot = styled('label', {\n name: 'MuiFormLabel',\n slot: 'Root',\n overridesResolver: ({\n ownerState\n }, styles) => {\n return _extends({}, styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled);\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n color: theme.palette.text.secondary\n}, theme.typography.body1, {\n lineHeight: '1.4375em',\n padding: 0,\n position: 'relative',\n [`&.${formLabelClasses.focused}`]: {\n color: theme.palette[ownerState.color].main\n },\n [`&.${formLabelClasses.disabled}`]: {\n color: theme.palette.text.disabled\n },\n [`&.${formLabelClasses.error}`]: {\n color: theme.palette.error.main\n }\n}));\nconst AsteriskComponent = styled('span', {\n name: 'MuiFormLabel',\n slot: 'Asterisk',\n overridesResolver: (props, styles) => styles.asterisk\n})(({\n theme\n}) => ({\n [`&.${formLabelClasses.error}`]: {\n color: theme.palette.error.main\n }\n}));\nconst FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormLabel'\n });\n\n const {\n children,\n className,\n component = 'label'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']\n });\n\n const ownerState = _extends({}, props, {\n color: fcs.color || 'primary',\n component,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(FormLabelRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: [children, fcs.required && /*#__PURE__*/_jsxs(AsteriskComponent, {\n ownerState: ownerState,\n \"aria-hidden\": true,\n className: classes.asterisk,\n children: [\"\\u2009\", '*']\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormLabel.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the label should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the label should use filled classes key.\n */\n filled: PropTypes.bool,\n\n /**\n * If `true`, the input of this label is focused (used by `FormGroup` components).\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default FormLabel;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getInputLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiInputLabel', slot);\n}\nconst inputLabelClasses = generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);\nexport default inputLabelClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"disableAnimation\", \"margin\", \"shrink\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport FormLabel, { formLabelClasses } from '../FormLabel';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport { getInputLabelUtilityClasses } from './inputLabelClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n formControl,\n size,\n shrink,\n disableAnimation,\n variant,\n required\n } = ownerState;\n const slots = {\n root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size === 'small' && 'sizeSmall', variant],\n asterisk: [required && 'asterisk']\n };\n const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst InputLabelRoot = styled(FormLabel, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInputLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formLabelClasses.asterisk}`]: styles.asterisk\n }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, styles[ownerState.variant]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'block',\n transformOrigin: 'top left',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%'\n}, ownerState.formControl && {\n position: 'absolute',\n left: 0,\n top: 0,\n // slight alteration to spec spacing to match visual spec result\n transform: 'translate(0, 20px) scale(1)'\n}, ownerState.size === 'small' && {\n // Compensation for the `Input.inputSizeSmall` style.\n transform: 'translate(0, 17px) scale(1)'\n}, ownerState.shrink && {\n transform: 'translate(0, -1.5px) scale(0.75)',\n transformOrigin: 'top left',\n maxWidth: '133%'\n}, !ownerState.disableAnimation && {\n transition: theme.transitions.create(['color', 'transform', 'max-width'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n })\n}, ownerState.variant === 'filled' && _extends({\n // Chrome's autofill feature gives the input field a yellow background.\n // Since the input field is behind the label in the HTML tree,\n // the input field is drawn last and hides the label with an opaque background color.\n // zIndex: 1 will raise the label above opaque background-colors of input.\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(12px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n}, ownerState.size === 'small' && {\n transform: 'translate(12px, 13px) scale(1)'\n}, ownerState.shrink && _extends({\n transform: 'translate(12px, 7px) scale(0.75)',\n maxWidth: 'calc(133% - 24px)'\n}, ownerState.size === 'small' && {\n transform: 'translate(12px, 4px) scale(0.75)'\n})), ownerState.variant === 'outlined' && _extends({\n // see comment above on filled.zIndex\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(14px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n}, ownerState.size === 'small' && {\n transform: 'translate(14px, 9px) scale(1)'\n}, ownerState.shrink && {\n maxWidth: 'calc(133% - 24px)',\n transform: 'translate(14px, -9px) scale(0.75)'\n})));\nconst InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {\n const props = useThemeProps({\n name: 'MuiInputLabel',\n props: inProps\n });\n\n const {\n disableAnimation = false,\n shrink: shrinkProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl();\n let shrink = shrinkProp;\n\n if (typeof shrink === 'undefined' && muiFormControl) {\n shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;\n }\n\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['size', 'variant', 'required']\n });\n\n const ownerState = _extends({}, props, {\n disableAnimation,\n formControl: muiFormControl,\n shrink,\n size: fcs.size,\n variant: fcs.variant,\n required: fcs.required\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(InputLabelRoot, _extends({\n \"data-shrink\": shrink,\n ownerState: ownerState,\n ref: ref\n }, other, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? InputLabel.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n\n /**\n * If `true`, the transition animation is disabled.\n * @default false\n */\n disableAnimation: PropTypes.bool,\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` of this label is focused.\n */\n focused: PropTypes.bool,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n\n /**\n * if `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n\n /**\n * If `true`, the label is shrunk.\n */\n shrink: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputLabel;","import { generateUtilityClasses, generateUtilityClass } from '@mui/core';\nexport function getInputUtilityClass(slot) {\n return generateUtilityClass('MuiInput', slot);\n}\nconst inputClasses = generateUtilityClasses('MuiInput', ['root', 'formControl', 'focused', 'disabled', 'colorSecondary', 'underline', 'error', 'sizeSmall', 'multiline', 'fullWidth', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch']);\nexport default inputClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"disableUnderline\", \"components\", \"componentsProps\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { refType, deepmerge } from '@mui/utils';\nimport InputBase from '../InputBase';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport inputClasses, { getInputUtilityClass } from './inputClasses';\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst InputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return _extends({\n position: 'relative'\n }, ownerState.formControl && {\n 'label + &': {\n marginTop: 16\n }\n }, !ownerState.disableUnderline && {\n '&:after': {\n borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&.${inputClasses.focused}:after`]: {\n transform: 'scaleX(1)'\n },\n [`&.${inputClasses.error}:after`]: {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&:hover:not(.${inputClasses.disabled}):before`]: {\n borderBottom: `2px solid ${theme.palette.text.primary}`,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: `1px solid ${bottomLineColor}`\n }\n },\n [`&.${inputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n });\n});\nconst InputInput = styled(InputBaseInput, {\n name: 'MuiInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})({});\nconst Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiInput'\n });\n\n const {\n disableUnderline,\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n inputComponent = 'input',\n multiline = false,\n type = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(props);\n const ownerState = {\n disableUnderline\n };\n const inputComponentsProps = {\n root: {\n ownerState\n }\n };\n const componentsProps = componentsPropsProp ? deepmerge(componentsPropsProp, inputComponentsProps) : inputComponentsProps;\n return /*#__PURE__*/_jsx(InputBase, _extends({\n components: _extends({\n Root: InputRoot,\n Input: InputInput\n }, components),\n componentsProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the `input` will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default Input;","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n\n return container.scrollHeight > container.clientHeight;\n}\n\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\n\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\n\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude = [], show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n const blacklistTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE'];\n [].forEach.call(container.children, element => {\n if (blacklist.indexOf(element) === -1 && blacklistTagNames.indexOf(element.tagName) === -1) {\n ariaHidden(element, show);\n }\n });\n}\n\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n\n return false;\n });\n return idx;\n}\n\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n }); // Use computed style, here to get the real padding to add our scrollbar width.\n\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`; // .mui-fixed is a global helper.\n\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n } // Improve Gatsby support\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n\n\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n const scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container; // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n\n return restore;\n}\n\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport default class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n\n if (modalIndex !== -1) {\n return modalIndex;\n }\n\n modalIndex = this.modals.length;\n this.modals.push(modal); // If the modal we are adding is already in the DOM.\n\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n\n remove(modal) {\n const modalIndex = this.modals.indexOf(modal);\n\n if (modalIndex === -1) {\n return modalIndex;\n }\n\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1); // If that was the last modal in a container, clean up the container.\n\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, true);\n }\n\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1]; // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n\n return modalIndex;\n }\n\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n\n}","import generateUtilityClasses from '../generateUtilityClasses';\nimport generateUtilityClass from '../generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalUnstyledClasses = generateUtilityClasses('MuiModal', ['root', 'hidden']);\nexport default modalUnstyledClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"BackdropComponent\", \"BackdropProps\", \"children\", \"classes\", \"className\", \"closeAfterTransition\", \"component\", \"components\", \"componentsProps\", \"container\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"manager\", \"onBackdropClick\", \"onClose\", \"onKeyDown\", \"open\", \"theme\", \"onTransitionEnter\", \"onTransitionExited\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, HTMLElementType, unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_createChainedFunction as createChainedFunction, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport composeClasses from '../composeClasses';\nimport isHostComponent from '../utils/isHostComponent';\nimport Portal from '../Portal';\nimport ModalManager, { ariaHidden } from './ModalManager';\nimport TrapFocus from '../Unstable_TrapFocus';\nimport { getModalUtilityClass } from './modalUnstyledClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\n\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\nfunction getHasTransition(props) {\n return props.children ? props.children.props.hasOwnProperty('in') : false;\n} // A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\n\n\nconst defaultManager = new ModalManager();\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/api/dialog/)\n * - [Drawer](/api/drawer/)\n * - [Menu](/api/menu/)\n * - [Popover](/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\n\nconst ModalUnstyled = /*#__PURE__*/React.forwardRef(function ModalUnstyled(props, ref) {\n const {\n BackdropComponent,\n BackdropProps,\n children,\n classes: classesProp,\n className,\n closeAfterTransition = false,\n component = 'div',\n components = {},\n componentsProps = {},\n container,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n // private\n // eslint-disable-next-line react/prop-types\n manager = defaultManager,\n onBackdropClick,\n onClose,\n onKeyDown,\n open,\n\n /* eslint-disable react/prop-types */\n theme,\n onTransitionEnter,\n onTransitionExited\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const [exited, setExited] = React.useState(true);\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, ref);\n const hasTransition = getHasTransition(props);\n\n const getDoc = () => ownerDocument(mountNodeRef.current);\n\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mountNode = mountNodeRef.current;\n return modal.current;\n };\n\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n }); // Fix a bug on Chrome where the scroll isn't initially 0.\n\n modalRef.current.scrollTop = 0;\n };\n\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer); // The element was already mounted.\n\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n\n if (!node) {\n return;\n }\n\n if (open && isTopModal()) {\n handleMounted();\n } else {\n ariaHidden(modalRef.current, true);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal());\n }, [manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n\n const ownerState = _extends({}, props, {\n classes: classesProp,\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n exited,\n hideBackdrop,\n keepMounted\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n\n const handleEnter = () => {\n setExited(false);\n\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n\n const handleExited = () => {\n setExited(true);\n\n if (onTransitionExited) {\n onTransitionExited();\n }\n\n if (closeAfterTransition) {\n handleClose();\n }\n };\n\n const handleBackdropClick = event => {\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n const handleKeyDown = event => {\n if (onKeyDown) {\n onKeyDown(event);\n } // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n\n if (event.key !== 'Escape' || !isTopModal()) {\n return;\n }\n\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n\n const childProps = {};\n\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n } // It's a Transition like component\n\n\n if (hasTransition) {\n childProps.onEnter = createChainedFunction(handleEnter, children.props.onEnter);\n childProps.onExited = createChainedFunction(handleExited, children.props.onExited);\n }\n\n const Root = components.Root || component;\n const rootProps = componentsProps.root || {};\n return /*#__PURE__*/_jsx(Portal, {\n ref: handlePortalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(Root, _extends({\n role: \"presentation\"\n }, rootProps, !isHostComponent(Root) && {\n as: component,\n ownerState: _extends({}, ownerState, rootProps.ownerState),\n theme\n }, other, {\n ref: handleRef,\n onKeyDown: handleKeyDown,\n className: clsx(classes.root, rootProps.className, className),\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, _extends({\n open: open,\n onClick: handleBackdropClick\n }, BackdropProps)) : null, /*#__PURE__*/_jsx(TrapFocus, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ModalUnstyled.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n */\n BackdropComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`BackdropUnstyled`](/api/backdrop-unstyled/) element.\n */\n BackdropProps: PropTypes.object,\n\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n\n /**\n * Callback fired when the backdrop is clicked.\n */\n onBackdropClick: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nexport default ModalUnstyled;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"BackdropComponent\", \"closeAfterTransition\", \"children\", \"components\", \"componentsProps\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { isHostComponent } from '@mui/core';\nimport { elementAcceptingRef, HTMLElementType } from '@mui/utils';\nimport ModalUnstyled, { modalUnstyledClasses } from '@mui/core/ModalUnstyled';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Backdrop from '../Backdrop';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const modalClasses = modalUnstyledClasses;\n\nconst extendUtilityClasses = ownerState => {\n return ownerState.classes;\n};\n\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'fixed',\n zIndex: theme.zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n}, !ownerState.open && ownerState.exited && {\n visibility: 'hidden'\n}));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => {\n return styles.backdrop;\n }\n})({\n zIndex: -1\n});\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/api/dialog/)\n * - [Drawer](/api/drawer/)\n * - [Menu](/api/menu/)\n * - [Popover](/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\n\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n var _componentsProps$root;\n\n const props = useThemeProps({\n name: 'MuiModal',\n props: inProps\n });\n\n const {\n BackdropComponent = ModalBackdrop,\n closeAfterTransition = false,\n children,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const [exited, setExited] = React.useState(true);\n const commonProps = {\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n };\n\n const ownerState = _extends({}, props, commonProps, {\n exited\n });\n\n const classes = extendUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ModalUnstyled, _extends({\n components: _extends({\n Root: ModalRoot\n }, components),\n componentsProps: {\n root: _extends({}, componentsProps.root, (!components.Root || !isHostComponent(components.Root)) && {\n ownerState: _extends({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState)\n })\n },\n BackdropComponent: BackdropComponent,\n onTransitionEnter: () => setExited(false),\n onTransitionExited: () => setExited(true),\n ref: ref\n }, other, {\n classes: classes\n }, commonProps, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Backdrop`](/api/backdrop/) element.\n */\n BackdropProps: PropTypes.object,\n\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\n\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n\n /**\n * Callback fired when the backdrop is clicked.\n */\n onBackdropClick: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default Modal;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"children\", \"classes\", \"IconComponent\", \"input\", \"inputProps\", \"variant\"],\n _excluded2 = [\"root\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport NativeSelectInput from './NativeSelectInput';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getNativeSelectUtilityClasses } from './nativeSelectClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getNativeSelectUtilityClasses, classes);\n};\n\nconst defaultInput = /*#__PURE__*/_jsx(Input, {});\n/**\n * An alternative to `<Select native />` with a much smaller bundle size footprint.\n */\n\n\nconst NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {\n const props = useThemeProps({\n name: 'MuiNativeSelect',\n props: inProps\n });\n\n const {\n className,\n children,\n classes: classesProp = {},\n IconComponent = ArrowDropDownIcon,\n input = defaultInput,\n inputProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant']\n });\n\n const ownerState = _extends({}, props, {\n classes: classesProp\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const otherClasses = _objectWithoutPropertiesLoose(classesProp, _excluded2);\n\n return /*#__PURE__*/React.cloneElement(input, _extends({\n // Most of the logic is implemented in `NativeSelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent: NativeSelectInput,\n inputProps: _extends({\n children,\n classes: otherClasses,\n IconComponent,\n variant: fcs.variant,\n type: undefined\n }, inputProps, input ? input.props.inputProps : {}),\n ref\n }, other, {\n className: clsx(classes.root, input.props.className, className)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelect.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The option elements to populate the select with.\n * Can be some `<option>` elements.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * @default {}\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon that displays the arrow.\n * @default ArrowDropDownIcon\n */\n IconComponent: PropTypes.elementType,\n\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n * @default <Input />\n */\n input: PropTypes.element,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes) applied to the `select` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {React.ChangeEvent<HTMLSelectElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The `input` value. The DOM API casts this to a string.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nNativeSelect.muiName = 'Select';\nexport default NativeSelect;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disabled\", \"IconComponent\", \"inputRef\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport capitalize from '../utils/capitalize';\nimport nativeSelectClasses, { getNativeSelectUtilityClasses } from './nativeSelectClasses';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n open\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']\n };\n return composeClasses(slots, getNativeSelectUtilityClasses, classes);\n};\n\nexport const nativeSelectSelectStyles = ({\n ownerState,\n theme\n}) => _extends({\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n [`&.${nativeSelectClasses.disabled}`]: {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n // Bump specificity to allow extending custom inputs\n '&&&': {\n paddingRight: 24,\n minWidth: 16 // So it doesn't collapse.\n\n }\n}, ownerState.variant === 'filled' && {\n '&&&': {\n paddingRight: 32\n }\n}, ownerState.variant === 'outlined' && {\n borderRadius: theme.shape.borderRadius,\n '&:focus': {\n borderRadius: theme.shape.borderRadius // Reset the reset for Chrome style\n\n },\n '&&&': {\n paddingRight: 32\n }\n});\nconst NativeSelectSelect = styled('select', {\n name: 'MuiNativeSelect',\n slot: 'Select',\n shouldForwardProp: rootShouldForwardProp,\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.select, styles[ownerState.variant]];\n }\n})(nativeSelectSelectStyles);\nexport const nativeSelectIconStyles = ({\n ownerState,\n theme\n}) => _extends({\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - .5em)',\n // Center vertically, height is 1em\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n [`&.${nativeSelectClasses.disabled}`]: {\n color: theme.palette.action.disabled\n }\n}, ownerState.open && {\n transform: 'rotate(180deg)'\n}, ownerState.variant === 'filled' && {\n right: 7\n}, ownerState.variant === 'outlined' && {\n right: 7\n});\nconst NativeSelectIcon = styled('svg', {\n name: 'MuiNativeSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})(nativeSelectIconStyles);\n/**\n * @ignore - internal component.\n */\n\nconst NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInput(props, ref) {\n const {\n className,\n disabled,\n IconComponent,\n inputRef,\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disabled,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(NativeSelectSelect, _extends({\n ownerState: ownerState,\n className: clsx(classes.select, className),\n disabled: disabled,\n ref: inputRef || ref\n }, other)), props.multiple ? null : /*#__PURE__*/_jsx(NativeSelectIcon, {\n as: IconComponent,\n ownerState: ownerState,\n className: classes.icon\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelectInput.propTypes = {\n /**\n * The option elements to populate the select with.\n * Can be some `<option>` elements.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the select is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n\n /**\n * Use that prop to pass a ref to the native select element.\n * @deprecated\n */\n inputRef: refType,\n\n /**\n * @ignore\n */\n multiple: PropTypes.bool,\n\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The input value.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default NativeSelectInput;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getNativeSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiNativeSelect', slot);\n}\nconst nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);\nexport default nativeSelectClasses;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"elevation\", \"square\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes, integerPropType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport { getPaperUtilityClass } from './paperClasses'; // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst getOverlayAlpha = elevation => {\n let alphaValue;\n\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n\n return (alphaValue / 100).toFixed(2);\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\n\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n backgroundColor: theme.palette.background.paper,\n color: theme.palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n}, !ownerState.square && {\n borderRadius: theme.shape.borderRadius\n}, ownerState.variant === 'outlined' && {\n border: `1px solid ${theme.palette.divider}`\n}, ownerState.variant === 'elevation' && _extends({\n boxShadow: theme.shadows[ownerState.elevation]\n}, theme.palette.mode === 'dark' && {\n backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`\n})));\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPaper'\n });\n\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n component,\n elevation,\n square,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const theme = useTheme();\n\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n\n return /*#__PURE__*/_jsx(PaperRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n\n return null;\n }),\n\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"children\", \"defaultValue\", \"name\", \"onChange\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport FormGroup from '../FormGroup';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\nimport RadioGroupContext from './RadioGroupContext';\nimport useId from '../utils/useId';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n children,\n defaultValue,\n name: nameProp,\n onChange,\n value: valueProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const rootRef = React.useRef(null);\n const [value, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'RadioGroup'\n });\n React.useImperativeHandle(actions, () => ({\n focus: () => {\n let input = rootRef.current.querySelector('input:not(:disabled):checked');\n\n if (!input) {\n input = rootRef.current.querySelector('input:not(:disabled)');\n }\n\n if (input) {\n input.focus();\n }\n }\n }), []);\n const handleRef = useForkRef(ref, rootRef);\n\n const handleChange = event => {\n setValueState(event.target.value);\n\n if (onChange) {\n onChange(event, event.target.value);\n }\n };\n\n const name = useId(nameProp);\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: {\n name,\n onChange: handleChange,\n value\n },\n children: /*#__PURE__*/_jsx(FormGroup, _extends({\n role: \"radiogroup\",\n ref: handleRef\n }, other, {\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? RadioGroup.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * The name used to reference the value of the control.\n * If you don't provide this prop, it falls back to a randomly generated name.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when a radio button is selected.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * @param {string} value The value of the selected radio button.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * Value of the selected radio button. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default RadioGroup;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nconst RadioGroupContext = /*#__PURE__*/React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\n\nexport default RadioGroupContext;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';\nimport RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';\nimport styled from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst RadioButtonIconRoot = styled('span')({\n position: 'relative',\n display: 'flex'\n});\nconst RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {\n skipSx: true\n})({\n // Scale applied to prevent dot misalignment in Safari\n transform: 'scale(1)'\n});\nconst RadioButtonIconDot = styled(RadioButtonCheckedIcon, {\n skipSx: true\n})(({\n theme,\n ownerState\n}) => _extends({\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n })\n}, ownerState.checked && {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n}));\n/**\n * @ignore - internal component.\n */\n\nfunction RadioButtonIcon(props) {\n const {\n checked = false,\n classes = {},\n fontSize\n } = props;\n\n const ownerState = _extends({}, props, {\n checked\n });\n\n return /*#__PURE__*/_jsxs(RadioButtonIconRoot, {\n className: classes.root,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(RadioButtonIconBackground, {\n fontSize: fontSize,\n className: classes.background,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(RadioButtonIconDot, {\n fontSize: fontSize,\n className: classes.dot,\n ownerState: ownerState\n })]\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default RadioButtonIcon;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getRadioUtilityClass(slot) {\n return generateUtilityClass('MuiRadio', slot);\n}\nconst radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);\nexport default radioClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"checked\", \"checkedIcon\", \"color\", \"icon\", \"name\", \"onChange\", \"size\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha } from '@mui/system';\nimport SwitchBase from '../internal/SwitchBase';\nimport useThemeProps from '../styles/useThemeProps';\nimport RadioButtonIcon from './RadioButtonIcon';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport useRadioGroup from '../RadioGroup/useRadioGroup';\nimport radioClasses, { getRadioUtilityClass } from './radioClasses';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`]\n };\n return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));\n};\n\nconst RadioRoot = styled(SwitchBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiRadio',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`color${capitalize(ownerState.color)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n color: theme.palette.text.secondary,\n '&:hover': {\n backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.color !== 'default' && {\n [`&.${radioClasses.checked}`]: {\n color: theme.palette[ownerState.color].main\n }\n}, {\n [`&.${radioClasses.disabled}`]: {\n color: theme.palette.action.disabled\n }\n}));\n\nfunction areEqualValues(a, b) {\n if (typeof b === 'object' && b !== null) {\n return a === b;\n } // The value could be a number, the DOM will stringify it anyway.\n\n\n return String(a) === String(b);\n}\n\nconst defaultCheckedIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {\n checked: true\n});\n\nconst defaultIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {});\n\nconst Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {\n var _defaultIcon$props$fo, _defaultCheckedIcon$p;\n\n const props = useThemeProps({\n props: inProps,\n name: 'MuiRadio'\n });\n\n const {\n checked: checkedProp,\n checkedIcon = defaultCheckedIcon,\n color = 'primary',\n icon = defaultIcon,\n name: nameProp,\n onChange: onChangeProp,\n size = 'medium'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n size\n });\n\n const classes = useUtilityClasses(ownerState);\n const radioGroup = useRadioGroup();\n let checked = checkedProp;\n const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n let name = nameProp;\n\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = areEqualValues(radioGroup.value, props.value);\n }\n\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n\n return /*#__PURE__*/_jsx(RadioRoot, _extends({\n type: \"radio\",\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: (_defaultIcon$props$fo = defaultIcon.props.fontSize) != null ? _defaultIcon$props$fo : size\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {\n fontSize: (_defaultCheckedIcon$p = defaultCheckedIcon.props.fontSize) != null ? _defaultCheckedIcon$p : size\n }),\n ownerState: ownerState,\n classes: classes,\n name: name,\n checked: checked,\n onChange: onChange,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n * @default <RadioButtonIcon checked />\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n * @default <RadioButtonIcon />\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense radio styling.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default Radio;","import * as React from 'react';\nimport RadioGroupContext from './RadioGroupContext';\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"component\", \"direction\", \"spacing\", \"divider\", \"children\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { createUnarySpacing, getValue, handleBreakpoints, unstable_extendSxProp as extendSxProp, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';\nimport { deepmerge } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\n/**\n * Return an array with the separator React element interspersed between\n * each React node of the input children.\n *\n * > joinChildren([1,2,3], 0)\n * [1,0,2,0,3]\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction joinChildren(children, separator) {\n const childrenArray = React.Children.toArray(children).filter(Boolean);\n return childrenArray.reduce((output, child, index) => {\n output.push(child);\n\n if (index < childrenArray.length - 1) {\n output.push( /*#__PURE__*/React.cloneElement(separator, {\n key: `separator-${index}`\n }));\n }\n\n return output;\n }, []);\n}\n\nconst getSideFromDirection = direction => {\n return {\n row: 'Left',\n 'row-reverse': 'Right',\n column: 'Top',\n 'column-reverse': 'Bottom'\n }[direction];\n};\n\nexport const style = ({\n ownerState,\n theme\n}) => {\n let styles = _extends({\n display: 'flex'\n }, handleBreakpoints({\n theme\n }, ownerState.direction, propValue => ({\n flexDirection: propValue\n })));\n\n if (ownerState.spacing) {\n const transformer = createUnarySpacing(theme);\n const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {\n if (ownerState.spacing[breakpoint] != null || ownerState.direction[breakpoint] != null) {\n acc[breakpoint] = true;\n }\n\n return acc;\n }, {});\n const directionValues = resolveBreakpointValues({\n values: ownerState.direction,\n base\n });\n const spacingValues = resolveBreakpointValues({\n values: ownerState.spacing,\n base\n });\n\n const styleFromPropValue = (propValue, breakpoint) => {\n return {\n '& > :not(style) + :not(style)': {\n margin: 0,\n [`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: getValue(transformer, propValue)\n }\n };\n };\n\n styles = deepmerge(styles, handleBreakpoints({\n theme\n }, spacingValues, styleFromPropValue));\n }\n\n return styles;\n};\nconst StackRoot = styled('div', {\n name: 'MuiStack',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n return [styles.root];\n }\n})(style);\nconst Stack = /*#__PURE__*/React.forwardRef(function Stack(inProps, ref) {\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiStack'\n });\n const props = extendSxProp(themeProps);\n\n const {\n component = 'div',\n direction = 'column',\n spacing = 0,\n divider,\n children\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = {\n direction,\n spacing\n };\n return /*#__PURE__*/_jsx(StackRoot, _extends({\n as: component,\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: divider ? joinChildren(children, divider) : children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Stack.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'column'\n */\n direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),\n\n /**\n * Add an element between each child.\n */\n divider: PropTypes.node,\n\n /**\n * Defines the space between immediate children.\n * @default 0\n */\n spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n\n /**\n * The system prop, which allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default Stack;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getSwitchUtilityClass(slot) {\n return generateUtilityClass('MuiSwitch', slot);\n}\nconst switchClasses = generateUtilityClasses('MuiSwitch', ['root', 'edgeStart', 'edgeEnd', 'switchBase', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium', 'checked', 'disabled', 'input', 'thumb', 'track']);\nexport default switchClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"color\", \"edge\", \"size\", \"sx\"];\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { alpha, darken, lighten } from '@mui/system';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport switchClasses, { getSwitchUtilityClass } from './switchClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n edge,\n size,\n color,\n checked,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],\n switchBase: ['switchBase', `color${capitalize(color)}`, checked && 'checked', disabled && 'disabled'],\n thumb: ['thumb'],\n track: ['track'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getSwitchUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst SwitchRoot = styled('span', {\n name: 'MuiSwitch',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n}, ownerState.edge === 'start' && {\n marginLeft: -8\n}, ownerState.edge === 'end' && {\n marginRight: -8\n}, ownerState.size === 'small' && {\n width: 40,\n height: 24,\n padding: 7,\n [`& .${switchClasses.thumb}`]: {\n width: 16,\n height: 16\n },\n [`& .${switchClasses.switchBase}`]: {\n padding: 4,\n [`&.${switchClasses.checked}`]: {\n transform: 'translateX(16px)'\n }\n }\n}));\nconst SwitchSwitchBase = styled(SwitchBase, {\n name: 'MuiSwitch',\n slot: 'SwitchBase',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.switchBase, {\n [`& .${switchClasses.input}`]: styles.input\n }, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];\n }\n})(({\n theme\n}) => ({\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n [`&.${switchClasses.checked}`]: {\n transform: 'translateX(20px)'\n },\n [`&.${switchClasses.disabled}`]: {\n color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]\n },\n [`&.${switchClasses.checked} + .${switchClasses.track}`]: {\n opacity: 0.5\n },\n [`&.${switchClasses.disabled} + .${switchClasses.track}`]: {\n opacity: theme.palette.mode === 'light' ? 0.12 : 0.2\n },\n [`& .${switchClasses.input}`]: {\n left: '-100%',\n width: '300%'\n }\n}), ({\n theme,\n ownerState\n}) => _extends({\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.color !== 'default' && {\n [`&.${switchClasses.checked}`]: {\n color: theme.palette[ownerState.color].main,\n '&:hover': {\n backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${switchClasses.disabled}`]: {\n color: theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)\n }\n },\n [`&.${switchClasses.checked} + .${switchClasses.track}`]: {\n backgroundColor: theme.palette[ownerState.color].main\n }\n}));\nconst SwitchTrack = styled('span', {\n name: 'MuiSwitch',\n slot: 'Track',\n overridesResolver: (props, styles) => styles.track\n})(({\n theme\n}) => ({\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.mode === 'light' ? 0.38 : 0.3\n}));\nconst SwitchThumb = styled('span', {\n name: 'MuiSwitch',\n slot: 'Thumb',\n overridesResolver: (props, styles) => styles.thumb\n})(({\n theme\n}) => ({\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n}));\nconst Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSwitch'\n });\n\n const {\n className,\n color = 'primary',\n edge = false,\n size = 'medium',\n sx\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n edge,\n size\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const icon = /*#__PURE__*/_jsx(SwitchThumb, {\n className: classes.thumb,\n ownerState: ownerState\n });\n\n return /*#__PURE__*/_jsxs(SwitchRoot, {\n className: clsx(classes.root, className),\n sx: sx,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(SwitchSwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n ref: ref,\n ownerState: ownerState\n }, other, {\n classes: _extends({}, classes, {\n root: classes.switchBase\n })\n })), /*#__PURE__*/_jsx(SwitchTrack, {\n className: classes.track,\n ownerState: ownerState\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The default checked state. Use when the component is not controlled.\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense switch styling.\n * @default 'medium'\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default Switch;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getTabUtilityClass(slot) {\n return generateUtilityClass('MuiTab', slot);\n}\nconst tabClasses = generateUtilityClasses('MuiTab', ['root', 'labelIcon', 'textColorInherit', 'textColorPrimary', 'textColorSecondary', 'selected', 'disabled', 'fullWidth', 'wrapped']);\nexport default tabClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disabled\", \"disableFocusRipple\", \"fullWidth\", \"icon\", \"indicator\", \"label\", \"onChange\", \"onClick\", \"onFocus\", \"selected\", \"selectionFollowsFocus\", \"textColor\", \"value\", \"wrapped\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport unsupportedProp from '../utils/unsupportedProp';\nimport tabClasses, { getTabUtilityClass } from './tabClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n textColor,\n fullWidth,\n wrapped,\n icon,\n label,\n selected,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', icon && label && 'labelIcon', `textColor${capitalize(textColor)}`, fullWidth && 'fullWidth', wrapped && 'wrapped', selected && 'selected', disabled && 'disabled']\n };\n return composeClasses(slots, getTabUtilityClass, classes);\n};\n\nconst TabRoot = styled(ButtonBase, {\n name: 'MuiTab',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.label && ownerState.icon && styles.labelIcon, styles[`textColor${capitalize(ownerState.textColor)}`], ownerState.fullWidth && styles.fullWidth, ownerState.wrapped && styles.wrapped];\n }\n})(({\n theme,\n ownerState\n}) => _extends({}, theme.typography.button, {\n maxWidth: 360,\n minWidth: 90,\n position: 'relative',\n minHeight: 48,\n flexShrink: 0,\n padding: '12px 16px',\n overflow: 'hidden',\n whiteSpace: 'normal',\n textAlign: 'center',\n flexDirection: 'column',\n lineHeight: 1.25\n}, ownerState.icon && ownerState.label && {\n minHeight: 72,\n paddingTop: 9,\n paddingBottom: 9,\n [`& > *:first-child`]: {\n marginBottom: 6\n }\n}, ownerState.textColor === 'inherit' && {\n color: 'inherit',\n opacity: 0.6,\n // same opacity as theme.palette.text.secondary\n [`&.${tabClasses.selected}`]: {\n opacity: 1\n },\n [`&.${tabClasses.disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.textColor === 'primary' && {\n color: theme.palette.text.secondary,\n [`&.${tabClasses.selected}`]: {\n color: theme.palette.primary.main\n },\n [`&.${tabClasses.disabled}`]: {\n color: theme.palette.text.disabled\n }\n}, ownerState.textColor === 'secondary' && {\n color: theme.palette.text.secondary,\n [`&.${tabClasses.selected}`]: {\n color: theme.palette.secondary.main\n },\n [`&.${tabClasses.disabled}`]: {\n color: theme.palette.text.disabled\n }\n}, ownerState.fullWidth && {\n flexShrink: 1,\n flexGrow: 1,\n flexBasis: 0,\n maxWidth: 'none'\n}, ownerState.wrapped && {\n fontSize: theme.typography.pxToRem(12)\n}));\nconst Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTab'\n });\n\n const {\n className,\n disabled = false,\n disableFocusRipple = false,\n // eslint-disable-next-line react/prop-types\n fullWidth,\n icon,\n // eslint-disable-next-line react/prop-types\n indicator,\n label,\n onChange,\n onClick,\n onFocus,\n // eslint-disable-next-line react/prop-types\n selected,\n // eslint-disable-next-line react/prop-types\n selectionFollowsFocus,\n // eslint-disable-next-line react/prop-types\n textColor = 'inherit',\n value,\n wrapped = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disabled,\n disableFocusRipple,\n selected,\n icon: !!icon,\n label: !!label,\n fullWidth,\n textColor,\n wrapped\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const handleClick = event => {\n if (!selected && onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n const handleFocus = event => {\n if (selectionFollowsFocus && !selected && onChange) {\n onChange(event, value);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/_jsxs(TabRoot, _extends({\n focusRipple: !disableFocusRipple,\n className: clsx(classes.root, className),\n ref: ref,\n role: \"tab\",\n \"aria-selected\": selected,\n disabled: disabled,\n onClick: handleClick,\n onFocus: handleFocus,\n ownerState: ownerState,\n tabIndex: selected ? 0 : -1\n }, other, {\n children: [icon, label, indicator]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tab.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display.\n */\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any,\n\n /**\n * Tab labels appear in a single row.\n * They can use a second line if needed.\n * @default false\n */\n wrapped: PropTypes.bool\n} : void 0;\nexport default Tab;","// Source from https://github.com/alitaheri/normalize-scroll-left\nlet cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n const dummy = document.createElement('div');\n const container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n const scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr behavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n const type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to, options = {}, cb = () => {}) {\n const {\n ease = easeInOutSin,\n duration = 300 // standard\n\n } = options;\n let start = null;\n const from = element[property];\n let cancelled = false;\n\n const cancel = () => {\n cancelled = true;\n };\n\n const step = timestamp => {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n const time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(() => {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nimport { ownerWindow } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n const {\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const scrollbarHeight = React.useRef();\n const nodeRef = React.useRef(null);\n\n const setMeasurements = () => {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(() => {\n const handleResize = debounce(() => {\n const prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n const containerWindow = ownerWindow(nodeRef.current);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(() => {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/_jsx(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z\"\n}), 'KeyboardArrowLeft');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"\n}), 'KeyboardArrowRight');","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getTabScrollButtonUtilityClass(slot) {\n return generateUtilityClass('MuiTabScrollButton', slot);\n}\nconst tabScrollButtonClasses = generateUtilityClasses('MuiTabScrollButton', ['root', 'vertical', 'horizontal', 'disabled']);\nexport default tabScrollButtonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _KeyboardArrowLeft, _KeyboardArrowRight;\n\nconst _excluded = [\"className\", \"direction\", \"orientation\", \"disabled\"];\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport ButtonBase from '../ButtonBase';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport tabScrollButtonClasses, { getTabScrollButtonUtilityClass } from './tabScrollButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n orientation,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', orientation, disabled && 'disabled']\n };\n return composeClasses(slots, getTabScrollButtonUtilityClass, classes);\n};\n\nconst TabScrollButtonRoot = styled(ButtonBase, {\n name: 'MuiTabScrollButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.orientation && styles[ownerState.orientation]];\n }\n})(({\n ownerState\n}) => _extends({\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n [`&.${tabScrollButtonClasses.disabled}`]: {\n opacity: 0\n }\n}, ownerState.orientation === 'vertical' && {\n width: '100%',\n height: 40,\n '& svg': {\n transform: `rotate(${ownerState.isRtl ? -90 : 90}deg)`\n }\n}));\nconst TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTabScrollButton'\n });\n\n const {\n className,\n direction\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n\n const ownerState = _extends({\n isRtl\n }, props);\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(TabScrollButtonRoot, _extends({\n component: \"div\",\n className: clsx(classes.root, className),\n ref: ref,\n role: null,\n ownerState: ownerState,\n tabIndex: null\n }, other, {\n children: direction === 'left' ? _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/_jsx(KeyboardArrowLeft, {\n fontSize: \"small\"\n })) : _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/_jsx(KeyboardArrowRight, {\n fontSize: \"small\"\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The direction the button should indicate.\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The component orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default TabScrollButton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getTabsUtilityClass(slot) {\n return generateUtilityClass('MuiTabs', slot);\n}\nconst tabsClasses = generateUtilityClasses('MuiTabs', ['root', 'vertical', 'flexContainer', 'flexContainerVertical', 'centered', 'scroller', 'fixed', 'scrollableX', 'scrollableY', 'hideScrollbar', 'scrollButtons', 'scrollButtonsHideMobile', 'indicator']);\nexport default tabsClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"className\", \"component\", \"allowScrollButtonsMobile\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\", \"visibleScrollbar\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport debounce from '../utils/debounce';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport tabsClasses, { getTabsUtilityClass } from './tabsClasses';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst nextItem = (list, item) => {\n if (list === item) {\n return list.firstChild;\n }\n\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n\n return list.firstChild;\n};\n\nconst previousItem = (list, item) => {\n if (list === item) {\n return list.lastChild;\n }\n\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n\n return list.lastChild;\n};\n\nconst moveFocus = (list, currentFocus, traversalFunction) => {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus);\n\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return;\n }\n\n wrappedOnce = true;\n } // Same logic as useAutocomplete.js\n\n\n const nextFocusDisabled = nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n\n if (!nextFocus.hasAttribute('tabindex') || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus);\n } else {\n nextFocus.focus();\n return;\n }\n }\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n vertical,\n fixed,\n hideScrollbar,\n scrollableX,\n scrollableY,\n centered,\n scrollButtonsHideMobile,\n classes\n } = ownerState;\n const slots = {\n root: ['root', vertical && 'vertical'],\n scroller: ['scroller', fixed && 'fixed', hideScrollbar && 'hideScrollbar', scrollableX && 'scrollableX', scrollableY && 'scrollableY'],\n flexContainer: ['flexContainer', vertical && 'flexContainerVertical', centered && 'centered'],\n indicator: ['indicator'],\n scrollButtons: ['scrollButtons', scrollButtonsHideMobile && 'scrollButtonsHideMobile'],\n scrollableX: [scrollableX && 'scrollableX'],\n hideScrollbar: [hideScrollbar && 'hideScrollbar']\n };\n return composeClasses(slots, getTabsUtilityClass, classes);\n};\n\nconst TabsRoot = styled('div', {\n name: 'MuiTabs',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${tabsClasses.scrollButtons}`]: styles.scrollButtons\n }, {\n [`& .${tabsClasses.scrollButtons}`]: ownerState.scrollButtonsHideMobile && styles.scrollButtonsHideMobile\n }, styles.root, ownerState.vertical && styles.vertical];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n overflow: 'hidden',\n minHeight: 48,\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch',\n display: 'flex'\n}, ownerState.vertical && {\n flexDirection: 'column'\n}, ownerState.scrollButtonsHideMobile && {\n [`& .${tabsClasses.scrollButtons}`]: {\n [theme.breakpoints.down('sm')]: {\n display: 'none'\n }\n }\n}));\nconst TabsScroller = styled('div', {\n name: 'MuiTabs',\n slot: 'Scroller',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.scroller, ownerState.fixed && styles.fixed, ownerState.hideScrollbar && styles.hideScrollbar, ownerState.scrollableX && styles.scrollableX, ownerState.scrollableY && styles.scrollableY];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n}, ownerState.fixed && {\n overflowX: 'hidden',\n width: '100%'\n}, ownerState.hideScrollbar && {\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n}, ownerState.scrollableX && {\n overflowX: 'auto',\n overflowY: 'hidden'\n}, ownerState.scrollableY && {\n overflowY: 'auto',\n overflowX: 'hidden'\n}));\nconst FlexContainer = styled('div', {\n name: 'MuiTabs',\n slot: 'FlexContainer',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.flexContainer, ownerState.vertical && styles.flexContainerVertical, ownerState.centered && styles.centered];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex'\n}, ownerState.vertical && {\n flexDirection: 'column'\n}, ownerState.centered && {\n justifyContent: 'center'\n}));\nconst TabsIndicator = styled('span', {\n name: 'MuiTabs',\n slot: 'Indicator',\n overridesResolver: (props, styles) => styles.indicator\n})(({\n ownerState,\n theme\n}) => _extends({\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n}, ownerState.indicatorColor === 'primary' && {\n backgroundColor: theme.palette.primary.main\n}, ownerState.indicatorColor === 'secondary' && {\n backgroundColor: theme.palette.secondary.main\n}, ownerState.vertical && {\n height: '100%',\n width: 2,\n right: 0\n}));\nconst TabsScrollbarSize = styled(ScrollbarSize, {\n name: 'MuiTabs',\n slot: 'ScrollbarSize'\n})({\n overflowX: 'auto',\n overflowY: 'hidden',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n});\nconst defaultIndicatorStyle = {};\nlet warnedOnceTabPresent = false;\nconst Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTabs'\n });\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n action,\n centered = false,\n children: childrenProp,\n className,\n component = 'div',\n allowScrollButtonsMobile = false,\n indicatorColor = 'primary',\n onChange,\n orientation = 'horizontal',\n ScrollButtonComponent = TabScrollButton,\n scrollButtons = 'auto',\n selectionFollowsFocus,\n TabIndicatorProps = {},\n TabScrollButtonProps = {},\n textColor = 'primary',\n value,\n variant = 'standard',\n visibleScrollbar = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const scrollable = variant === 'scrollable';\n const vertical = orientation === 'vertical';\n const scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n const start = vertical ? 'top' : 'left';\n const end = vertical ? 'bottom' : 'right';\n const clientSize = vertical ? 'clientHeight' : 'clientWidth';\n const size = vertical ? 'height' : 'width';\n\n const ownerState = _extends({}, props, {\n component,\n allowScrollButtonsMobile,\n indicatorColor,\n orientation,\n vertical,\n scrollButtons,\n textColor,\n variant,\n visibleScrollbar,\n fixed: !scrollable,\n hideScrollbar: scrollable && !visibleScrollbar,\n scrollableX: scrollable && !vertical,\n scrollableY: scrollable && vertical,\n centered: centered && !scrollable,\n scrollButtonsHideMobile: !allowScrollButtonsMobile\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('MUI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n const [mounted, setMounted] = React.useState(false);\n const [indicatorStyle, setIndicatorStyle] = React.useState(defaultIndicatorStyle);\n const [displayScroll, setDisplayScroll] = React.useState({\n start: false,\n end: false\n });\n const [scrollerStyle, setScrollerStyle] = React.useState({\n overflow: 'hidden',\n scrollbarWidth: 0\n });\n const valueToIndex = new Map();\n const tabsRef = React.useRef(null);\n const tabListRef = React.useRef(null);\n\n const getTabsMeta = () => {\n const tabsNode = tabsRef.current;\n let tabsMeta;\n\n if (tabsNode) {\n const rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n let tabMeta;\n\n if (tabsNode && value !== false) {\n const children = tabListRef.current.children;\n\n if (children.length > 0) {\n const tab = children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([`MUI: The \\`value\\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with \"${value}\".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n\n if (process.env.NODE_ENV !== 'production') {\n if (process.env.NODE_ENV !== 'test' && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0) {\n tabsMeta = null;\n console.error(['MUI: The `value` provided to the Tabs component is invalid.', `The Tab with this \\`value\\` (\"${value}\") is not part of the document layout.`, \"Make sure the tab item is present in the document or that it's not `display: none`.\"].join('\\n'));\n warnedOnceTabPresent = true;\n }\n }\n }\n }\n\n return {\n tabsMeta,\n tabMeta\n };\n };\n\n const updateIndicatorState = useEventCallback(() => {\n const {\n tabsMeta,\n tabMeta\n } = getTabsMeta();\n let startValue = 0;\n let startIndicator;\n\n if (vertical) {\n startIndicator = 'top';\n\n if (tabMeta && tabsMeta) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n }\n } else {\n startIndicator = isRtl ? 'right' : 'left';\n\n if (tabMeta && tabsMeta) {\n const correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = (isRtl ? -1 : 1) * (tabMeta[startIndicator] - tabsMeta[startIndicator] + correction);\n }\n }\n\n const newIndicatorStyle = {\n [startIndicator]: startValue,\n // May be wrong until the font is loaded.\n [size]: tabMeta ? tabMeta[size] : 0\n }; // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n\n if (isNaN(indicatorStyle[startIndicator]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n const dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);\n const dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n const scroll = (scrollValue, {\n animation = true\n } = {}) => {\n if (animation) {\n animate(scrollStart, tabsRef.current, scrollValue, {\n duration: theme.transitions.duration.standard\n });\n } else {\n tabsRef.current[scrollStart] = scrollValue;\n }\n };\n\n const moveTabsScroll = delta => {\n let scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n const getScrollSize = () => {\n const containerSize = tabsRef.current[clientSize];\n let totalSize = 0;\n const children = Array.from(tabListRef.current.children);\n\n for (let i = 0; i < children.length; i += 1) {\n const tab = children[i];\n\n if (totalSize + tab[clientSize] > containerSize) {\n break;\n }\n\n totalSize += tab[clientSize];\n }\n\n return totalSize;\n };\n\n const handleStartScrollClick = () => {\n moveTabsScroll(-1 * getScrollSize());\n };\n\n const handleEndScrollClick = () => {\n moveTabsScroll(getScrollSize());\n }; // TODO Remove <ScrollbarSize /> as browser support for hidding the scrollbar\n // with CSS improves.\n\n\n const handleScrollbarSizeChange = React.useCallback(scrollbarWidth => {\n setScrollerStyle({\n overflow: null,\n scrollbarWidth\n });\n }, []);\n\n const getConditionalElements = () => {\n const conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/_jsx(TabsScrollbarSize, {\n onChange: handleScrollbarSizeChange,\n className: clsx(classes.scrollableX, classes.hideScrollbar)\n }) : null;\n const scrollButtonsActive = displayScroll.start || displayScroll.end;\n const showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === true);\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start\n }, TabScrollButtonProps, {\n className: clsx(classes.scrollButtons, TabScrollButtonProps.className)\n })) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end\n }, TabScrollButtonProps, {\n className: clsx(classes.scrollButtons, TabScrollButtonProps.className)\n })) : null;\n return conditionalElements;\n };\n\n const scrollSelectedIntoView = useEventCallback(animation => {\n const {\n tabsMeta,\n tabMeta\n } = getTabsMeta();\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart, {\n animation\n });\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n scroll(nextScrollStart, {\n animation\n });\n }\n });\n const updateScrollButtonState = useEventCallback(() => {\n if (scrollable && scrollButtons !== false) {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollWidth,\n clientWidth\n } = tabsRef.current;\n let showStartScroll;\n let showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n const scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(() => {\n const handleResize = debounce(() => {\n updateIndicatorState();\n updateScrollButtonState();\n });\n const win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n let resizeObserver;\n\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(handleResize);\n Array.from(tabListRef.current.children).forEach(child => {\n resizeObserver.observe(child);\n });\n }\n\n return () => {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n const handleTabsScroll = React.useMemo(() => debounce(() => {\n updateScrollButtonState();\n }), [updateScrollButtonState]);\n React.useEffect(() => {\n return () => {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(() => {\n setMounted(true);\n }, []);\n React.useEffect(() => {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(() => {\n // Don't animate on the first render.\n scrollSelectedIntoView(defaultIndicatorStyle !== indicatorStyle);\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, () => ({\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n }), [updateIndicatorState, updateScrollButtonState]);\n\n const indicator = /*#__PURE__*/_jsx(TabsIndicator, _extends({}, TabIndicatorProps, {\n className: clsx(classes.indicator, TabIndicatorProps.className),\n ownerState: ownerState,\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n\n let childIndex = 0;\n const children = React.Children.map(childrenProp, child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n const childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n const selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, _extends({\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected,\n selectionFollowsFocus,\n onChange,\n textColor,\n value: childValue\n }, childIndex === 1 && value === false && !child.props.tabIndex ? {\n tabIndex: 0\n } : {}));\n });\n\n const handleKeyDown = event => {\n const list = tabListRef.current;\n const currentFocus = ownerDocument(list).activeElement; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n const role = currentFocus.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n let previousItemKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n let nextItemKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation === 'horizontal' && isRtl) {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n event.preventDefault();\n moveFocus(list, currentFocus, previousItem);\n break;\n\n case nextItemKey:\n event.preventDefault();\n moveFocus(list, currentFocus, nextItem);\n break;\n\n case 'Home':\n event.preventDefault();\n moveFocus(list, null, nextItem);\n break;\n\n case 'End':\n event.preventDefault();\n moveFocus(list, null, previousItem);\n break;\n\n default:\n break;\n }\n };\n\n const conditionalElements = getConditionalElements();\n return /*#__PURE__*/_jsxs(TabsRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n as: component\n }, other, {\n children: [conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/_jsxs(TabsScroller, {\n className: classes.scroller,\n ownerState: ownerState,\n style: {\n overflow: scrollerStyle.overflow,\n [vertical ? `margin${isRtl ? 'Left' : 'Right'}` : 'marginBottom']: visibleScrollbar ? undefined : -scrollerStyle.scrollbarWidth\n },\n ref: tabsRef,\n onScroll: handleTabsScroll,\n children: [/*#__PURE__*/_jsx(FlexContainer, {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-orientation\": orientation === 'vertical' ? 'vertical' : null,\n className: classes.flexContainer,\n ownerState: ownerState,\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\",\n children: children\n }), mounted && indicator]\n }), conditionalElements.scrollButtonEnd]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * If `true`, the scroll buttons aren't forced hidden on mobile.\n * By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.\n * @default false\n */\n allowScrollButtonsMobile: PropTypes.bool,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs are centered.\n * This prop is intended for large views.\n * @default false\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Determines the color of the indicator.\n * @default 'primary'\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The component orientation (layout flow direction).\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n * @default TabScrollButton\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `true` will always present them.\n * - `false` will never present them.\n *\n * By default the scroll buttons are hidden on mobile.\n * This behavior can be disabled with `allowScrollButtonsMobile`.\n * @default 'auto'\n */\n scrollButtons: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOf(['auto', false, true]),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Props applied to the tab indicator element.\n * @default {}\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n * @default {}\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n * @default 'primary'\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this prop to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n * @default 'standard'\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard']),\n\n /**\n * If `true`, the scrollbar is visible. It can be useful when displaying\n * a long vertical list of tabs.\n * @default false\n */\n visibleScrollbar: PropTypes.bool\n} : void 0;\nexport default Tabs;","import { generateUtilityClasses, generateUtilityClass } from '@mui/core';\nexport function getFilledInputUtilityClass(slot) {\n return generateUtilityClass('MuiFilledInput', slot);\n}\nconst filledInputClasses = generateUtilityClasses('MuiFilledInput', ['root', 'colorSecondary', 'underline', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputHiddenLabel', 'inputMultiline', 'inputAdornedStart', 'inputAdornedEnd']);\nexport default filledInputClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"disableUnderline\", \"components\", \"componentsProps\", \"fullWidth\", \"hiddenLabel\", \"inputComponent\", \"multiline\", \"type\"];\nimport * as React from 'react';\nimport { refType, deepmerge } from '@mui/utils';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport InputBase from '../InputBase';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport filledInputClasses, { getFilledInputUtilityClass } from './filledInputClasses';\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getFilledInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst FilledInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiFilledInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';\n return _extends({\n position: 'relative',\n backgroundColor,\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor\n }\n },\n [`&.${filledInputClasses.focused}`]: {\n backgroundColor\n },\n [`&.${filledInputClasses.disabled}`]: {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'\n }\n }, !ownerState.disableUnderline && {\n '&:after': {\n borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&.${filledInputClasses.focused}:after`]: {\n transform: 'scaleX(1)'\n },\n [`&.${filledInputClasses.error}:after`]: {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n [`&:hover:not(.${filledInputClasses.disabled}):before`]: {\n borderBottom: `1px solid ${theme.palette.text.primary}`\n },\n [`&.${filledInputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }, ownerState.startAdornment && {\n paddingLeft: 12\n }, ownerState.endAdornment && {\n paddingRight: 12\n }, ownerState.multiline && _extends({\n padding: '25px 12px 8px'\n }, ownerState.size === 'small' && {\n paddingTop: 21,\n paddingBottom: 4\n }, ownerState.hiddenLabel && {\n paddingTop: 16,\n paddingBottom: 17\n }));\n});\nconst FilledInputInput = styled(InputBaseInput, {\n name: 'MuiFilledInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n paddingTop: 25,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n }\n}, ownerState.size === 'small' && {\n paddingTop: 21,\n paddingBottom: 4\n}, ownerState.hiddenLabel && {\n paddingTop: 16,\n paddingBottom: 17\n}, ownerState.multiline && {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0\n}, ownerState.startAdornment && {\n paddingLeft: 0\n}, ownerState.endAdornment && {\n paddingRight: 0\n}, ownerState.hiddenLabel && ownerState.size === 'small' && {\n paddingTop: 8,\n paddingBottom: 9\n}));\nconst FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFilledInput'\n });\n\n const {\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n // declare here to prevent spreading to DOM\n inputComponent = 'input',\n multiline = false,\n type = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n fullWidth,\n inputComponent,\n multiline,\n type\n });\n\n const classes = useUtilityClasses(props);\n const filledInputComponentsProps = {\n root: {\n ownerState\n },\n input: {\n ownerState\n }\n };\n const componentsProps = componentsPropsProp ? deepmerge(componentsPropsProp, filledInputComponentsProps) : filledInputComponentsProps;\n return /*#__PURE__*/_jsx(InputBase, _extends({\n components: _extends({\n Root: FilledInputRoot,\n Input: FilledInputInput\n }, components),\n componentsProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other, {\n classes: classes\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FilledInput.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nFilledInput.muiName = 'Input';\nexport default FilledInput;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"classes\", \"className\", \"label\", \"notched\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from '../styles/styled';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NotchedOutlineRoot = styled('fieldset')({\n textAlign: 'left',\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden',\n minWidth: '0%'\n});\nconst NotchedOutlineLegend = styled('legend', {\n skipSx: true\n})(({\n ownerState,\n theme\n}) => _extends({}, ownerState.label === undefined && {\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n}, ownerState.label !== undefined && _extends({\n display: 'block',\n width: 'auto',\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block'\n }\n}, ownerState.notched && {\n maxWidth: '100%',\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n})));\n/**\n * @ignore - internal component.\n */\n\nexport default function NotchedOutline(props) {\n const {\n className,\n label,\n notched\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n notched,\n label\n });\n\n return /*#__PURE__*/_jsx(NotchedOutlineRoot, _extends({\n \"aria-hidden\": true,\n className: className,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(NotchedOutlineLegend, {\n ownerState: ownerState,\n children: label ? /*#__PURE__*/_jsx(\"span\", {\n children: label\n }) :\n /*#__PURE__*/\n // notranslate needed while Google Translate will not fix zero-width space issue\n // eslint-disable-next-line react/no-danger\n _jsx(\"span\", {\n className: \"notranslate\",\n dangerouslySetInnerHTML: {\n __html: '​'\n }\n })\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? NotchedOutline.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The label.\n */\n label: PropTypes.node,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;","import { generateUtilityClasses, generateUtilityClass } from '@mui/core';\nexport function getOutlinedInputUtilityClass(slot) {\n return generateUtilityClass('MuiOutlinedInput', slot);\n}\nconst outlinedInputClasses = generateUtilityClasses('MuiOutlinedInput', ['root', 'colorSecondary', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'notchedOutline', 'input', 'inputSizeSmall', 'inputMultiline', 'inputAdornedStart', 'inputAdornedEnd']);\nexport default outlinedInputClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"components\", \"fullWidth\", \"inputComponent\", \"label\", \"multiline\", \"notched\", \"type\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport NotchedOutline from './NotchedOutline';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport outlinedInputClasses, { getOutlinedInputUtilityClass } from './outlinedInputClasses';\nimport InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';\nimport useThemeProps from '../styles/useThemeProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n notchedOutline: ['notchedOutline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getOutlinedInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n\nconst OutlinedInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiOutlinedInput',\n slot: 'Root',\n overridesResolver: inputBaseRootOverridesResolver\n})(({\n theme,\n ownerState\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return _extends({\n position: 'relative',\n borderRadius: theme.shape.borderRadius,\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette.text.primary\n },\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor\n }\n },\n [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette[ownerState.color].main,\n borderWidth: 2\n },\n [`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette.error.main\n },\n [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.palette.action.disabled\n }\n }, ownerState.startAdornment && {\n paddingLeft: 14\n }, ownerState.endAdornment && {\n paddingRight: 14\n }, ownerState.multiline && _extends({\n padding: '16.5px 14px'\n }, ownerState.size === 'small' && {\n padding: '8.5px 14px'\n }));\n});\nconst NotchedOutlineRoot = styled(NotchedOutline, {\n name: 'MuiOutlinedInput',\n slot: 'NotchedOutline',\n overridesResolver: (props, styles) => styles.notchedOutline\n})(({\n theme\n}) => ({\n borderColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'\n}));\nconst OutlinedInputInput = styled(InputBaseInput, {\n name: 'MuiOutlinedInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({\n padding: '16.5px 14px',\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderRadius: 'inherit'\n }\n}, ownerState.size === 'small' && {\n padding: '8.5px 14px'\n}, ownerState.multiline && {\n padding: 0\n}, ownerState.startAdornment && {\n paddingLeft: 0\n}, ownerState.endAdornment && {\n paddingRight: 0\n}));\nconst OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiOutlinedInput'\n });\n\n const {\n components = {},\n fullWidth = false,\n inputComponent = 'input',\n label,\n multiline = false,\n notched,\n type = 'text'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(props);\n return /*#__PURE__*/_jsx(InputBase, _extends({\n components: _extends({\n Root: OutlinedInputRoot,\n Input: OutlinedInputInput\n }, components),\n renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {\n className: classes.notchedOutline,\n label: label,\n notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other, {\n classes: _extends({}, classes, {\n notchedOutline: null\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? OutlinedInput.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The label of the `input`. It is only used for layout. The actual labelling\n * is handled by `InputLabel`.\n */\n label: PropTypes.node,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nOutlinedInput.muiName = 'Input';\nexport default OutlinedInput;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getFormHelperTextUtilityClasses(slot) {\n return generateUtilityClass('MuiFormHelperText', slot);\n}\nconst formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', ['root', 'error', 'disabled', 'sizeSmall', 'sizeMedium', 'contained', 'focused', 'filled', 'required']);\nexport default formHelperTextClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"disabled\", \"error\", \"filled\", \"focused\", \"margin\", \"required\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport styled from '../styles/styled';\nimport capitalize from '../utils/capitalize';\nimport formHelperTextClasses, { getFormHelperTextUtilityClasses } from './formHelperTextClasses';\nimport useThemeProps from '../styles/useThemeProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n contained,\n size,\n disabled,\n error,\n filled,\n focused,\n required\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', error && 'error', size && `size${capitalize(size)}`, contained && 'contained', focused && 'focused', filled && 'filled', required && 'required']\n };\n return composeClasses(slots, getFormHelperTextUtilityClasses, classes);\n};\n\nconst FormHelperTextRoot = styled('p', {\n name: 'MuiFormHelperText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.size && styles[`size${capitalize(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n color: theme.palette.text.secondary\n}, theme.typography.caption, {\n textAlign: 'left',\n marginTop: 3,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n [`&.${formHelperTextClasses.disabled}`]: {\n color: theme.palette.text.disabled\n },\n [`&.${formHelperTextClasses.error}`]: {\n color: theme.palette.error.main\n }\n}, ownerState.size === 'small' && {\n marginTop: 4\n}, ownerState.contained && {\n marginLeft: 14,\n marginRight: 14\n}));\nconst FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormHelperText'\n });\n\n const {\n children,\n className,\n component = 'p'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']\n });\n\n const ownerState = _extends({}, props, {\n component,\n contained: fcs.variant === 'filled' || fcs.variant === 'outlined',\n variant: fcs.variant,\n size: fcs.size,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormHelperTextRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: children === ' ' ?\n /*#__PURE__*/\n // notranslate needed while Google Translate will not fix zero-width space issue\n // eslint-disable-next-line react/no-danger\n _jsx(\"span\", {\n className: \"notranslate\",\n dangerouslySetInnerHTML: {\n __html: '​'\n }\n }) : children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormHelperText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n *\n * If `' '` is provided, the component reserves one line height for displaying a future message.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, helper text should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the helper text should use filled classes key.\n */\n filled: PropTypes.bool,\n\n /**\n * If `true`, the helper text should use focused classes key.\n */\n focused: PropTypes.bool,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n\n /**\n * If `true`, the helper text should use required classes key.\n */\n required: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default FormHelperText;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nconst ListContext = /*#__PURE__*/React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\n\nexport default ListContext;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ListContext from './ListContext';\nimport { getListUtilityClass } from './listClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\n\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})(({\n ownerState\n}) => _extends({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n}, !ownerState.disablePadding && {\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.subheader && {\n paddingTop: 0\n}));\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiList'\n });\n\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n\n const ownerState = _extends({}, props, {\n component,\n dense,\n disablePadding\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [subheader, children]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object\n} : void 0;\nexport default List;","import { unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\nexport default getScrollbarSize;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n\n return disableListWrap ? null : list.firstChild;\n}\n\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n\n return disableListWrap ? null : list.lastChild;\n}\n\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n\n let text = nextFocus.innerText;\n\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n\n text = text.trim().toLowerCase();\n\n if (text.length === 0) {\n return false;\n }\n\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\n\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n\n wrappedOnce = true;\n } // Same logic as useAutocomplete.js\n\n\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n\n return false;\n}\n/**\n * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.\n * It's exposed to help customization of the [`Menu`](/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\n\n\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, theme) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n\n return listRef.current;\n }\n }), []);\n\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n\n const currentFocus = ownerDocument(list).activeElement;\n\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n const handleRef = useForkRef(listRef, ref);\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n let activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n\n return child;\n });\n return /*#__PURE__*/_jsx(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other, {\n children: items\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"className\", \"container\", \"elevation\", \"marginThreshold\", \"open\", \"PaperProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { chainPropTypes, integerPropType, elementTypeAcceptingRef, refType, HTMLElementType } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport debounce from '../utils/debounce';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useForkRef from '../utils/useForkRef';\nimport Grow from '../Grow';\nimport Modal from '../Modal';\nimport Paper from '../Paper';\nimport { getPopoverUtilityClass } from './popoverClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n\n return offset;\n}\n\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\n\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\n\nconst PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst PopoverPaper = styled(Paper, {\n name: 'MuiPopover',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopover'\n });\n\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps = {},\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent = Grow,\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps: {\n onEntering\n } = {}\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n\n const paperRef = React.useRef();\n const handlePaperRef = useForkRef(paperRef, PaperProps.ref);\n\n const ownerState = _extends({}, props, {\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n PaperProps,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n });\n\n const classes = useUtilityClasses(ownerState); // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference=\"anchorPosition\" />.');\n }\n }\n\n return anchorPosition;\n }\n\n const resolvedAnchorEl = resolveAnchorEl(anchorEl); // If an anchor element wasn't provided, just use the parent body element of this Popover\n\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n\n return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]); // Returns the base transform origin using the element\n\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n }; // Get the transform origin point on the element itself\n\n const elemTransformOrigin = getTransformOrigin(elemRect);\n\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n } // Get the offset of the anchoring element\n\n\n const anchorOffset = getAnchorOffset(); // Calculate element positioning\n\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width; // Use the parent window of the anchorEl if provided\n\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl)); // Window thresholds taking required margin into account\n\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold; // Check if the vertical axis needs shifting\n\n if (top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n } // Check if the horizontal axis needs shifting\n\n\n if (left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n\n if (!element) {\n return;\n }\n\n const positioning = getPositioningStyle(element);\n\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n\n element.style.transformOrigin = positioning.transformOrigin;\n }, [getPositioningStyle]);\n\n const handleEntering = (element, isAppearing) => {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n\n setPositioningStyles();\n };\n\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(anchorEl);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n } // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n\n\n const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n return /*#__PURE__*/_jsx(PopoverRoot, _extends({\n BackdropProps: {\n invisible: true\n },\n className: clsx(classes.root, className),\n container: container,\n open: open,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEntering: handleEntering,\n timeout: transitionDuration\n }, TransitionProps, {\n children: /*#__PURE__*/_jsx(PopoverPaper, _extends({\n elevation: elevation\n }, PaperProps, {\n ref: handlePaperRef,\n className: clsx(classes.paper, PaperProps.className),\n children: children\n }))\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n\n return null;\n }),\n\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n * @default {}\n */\n PaperProps: PropTypes\n /* @typescript-to-proptypes-ignore */\n .shape({\n component: elementTypeAcceptingRef\n }),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"autoFocus\", \"children\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { HTMLElementType } from '@mui/utils';\nimport MenuList from '../MenuList';\nimport Paper from '../Paper';\nimport Popover from '../Popover';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getMenuUtilityClass } from './menuClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\n\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst MenuPaper = styled(Paper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tapable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMenu'\n });\n\n const {\n autoFocus = true,\n children,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n variant = 'selectedMenu'\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n\n const ownerState = _extends({}, props, {\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n\n let activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n return /*#__PURE__*/_jsx(MenuRoot, _extends({\n classes: PopoverClasses,\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n PaperProps: _extends({\n component: MenuPaper\n }, PaperProps, {\n classes: _extends({}, PaperProps.classes, {\n root: classes.paper\n })\n }),\n className: classes.root,\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(MenuMenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className),\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n\n /**\n * Props applied to the [`MenuList`](/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n\n /**\n * `classes` prop applied to the [`Popover`](/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.\n * @default {}\n */\n TransitionProps: PropTypes.object,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiSelect', slot);\n}\nconst selectClasses = generateUtilityClasses('MuiSelect', ['root', 'select', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);\nexport default selectClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nconst _excluded = [\"aria-describedby\", \"aria-label\", \"autoFocus\", \"autoWidth\", \"children\", \"className\", \"defaultValue\", \"disabled\", \"displayEmpty\", \"IconComponent\", \"inputRef\", \"labelId\", \"MenuProps\", \"multiple\", \"name\", \"onBlur\", \"onChange\", \"onClose\", \"onFocus\", \"onOpen\", \"open\", \"readOnly\", \"renderValue\", \"SelectDisplayProps\", \"tabIndex\", \"type\", \"value\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { refType } from '@mui/utils';\nimport ownerDocument from '../utils/ownerDocument';\nimport capitalize from '../utils/capitalize';\nimport Menu from '../Menu/Menu';\nimport { nativeSelectSelectStyles, nativeSelectIconStyles } from '../NativeSelect/NativeSelectInput';\nimport { isFilled } from '../InputBase/utils';\nimport styled, { slotShouldForwardProp } from '../styles/styled';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\nimport selectClasses, { getSelectUtilityClasses } from './selectClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SelectSelect = styled('div', {\n name: 'MuiSelect',\n slot: 'Select',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [// Win specificity over the input base\n {\n [`&.${selectClasses.select}`]: styles.select\n }, {\n [`&.${selectClasses.select}`]: styles[ownerState.variant]\n }];\n }\n})(nativeSelectSelectStyles, {\n // Win specificity over the input base\n [`&.${selectClasses.select}`]: {\n height: 'auto',\n // Resets for multiple select with chips\n minHeight: '1.4375em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n }\n});\nconst SelectIcon = styled('svg', {\n name: 'MuiSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})(nativeSelectIconStyles);\nconst SelectNativeInput = styled('input', {\n shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'classes',\n name: 'MuiSelect',\n slot: 'NativeInput',\n overridesResolver: (props, styles) => styles.nativeInput\n})({\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%',\n boxSizing: 'border-box'\n});\n\nfunction areEqualValues(a, b) {\n if (typeof b === 'object' && b !== null) {\n return a === b;\n } // The value could be a number, the DOM will stringify it anyway.\n\n\n return String(a) === String(b);\n}\n\nfunction isEmpty(display) {\n return display == null || typeof display === 'string' && !display.trim();\n}\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n open\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled'],\n nativeInput: ['nativeInput']\n };\n return composeClasses(slots, getSelectUtilityClasses, classes);\n};\n/**\n * @ignore - internal component.\n */\n\n\nconst SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n autoFocus,\n autoWidth,\n children,\n className,\n defaultValue,\n disabled,\n displayEmpty,\n IconComponent,\n inputRef: inputRefProp,\n labelId,\n MenuProps = {},\n multiple,\n name,\n onBlur,\n onChange,\n onClose,\n onFocus,\n onOpen,\n open: openProp,\n readOnly,\n renderValue,\n SelectDisplayProps = {},\n tabIndex: tabIndexProp,\n value: valueProp,\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const [value, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Select'\n });\n const inputRef = React.useRef(null);\n const displayRef = React.useRef(null);\n const [displayNode, setDisplayNode] = React.useState(null);\n const {\n current: isOpenControlled\n } = React.useRef(openProp != null);\n const [menuMinWidthState, setMenuMinWidthState] = React.useState();\n const [openState, setOpenState] = React.useState(false);\n const handleRef = useForkRef(ref, inputRefProp);\n const handleDisplayRef = React.useCallback(node => {\n displayRef.current = node;\n\n if (node) {\n setDisplayNode(node);\n }\n }, []);\n React.useImperativeHandle(handleRef, () => ({\n focus: () => {\n displayRef.current.focus();\n },\n node: inputRef.current,\n value\n }), [value]);\n React.useEffect(() => {\n if (autoFocus) {\n displayRef.current.focus();\n }\n }, [autoFocus]);\n React.useEffect(() => {\n const label = ownerDocument(displayRef.current).getElementById(labelId);\n\n if (label) {\n const handler = () => {\n if (getSelection().isCollapsed) {\n displayRef.current.focus();\n }\n };\n\n label.addEventListener('click', handler);\n return () => {\n label.removeEventListener('click', handler);\n };\n }\n\n return undefined;\n }, [labelId]);\n\n const update = (open, event) => {\n if (open) {\n if (onOpen) {\n onOpen(event);\n }\n } else if (onClose) {\n onClose(event);\n }\n\n if (!isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);\n setOpenState(open);\n }\n };\n\n const handleMouseDown = event => {\n // Ignore everything but left-click\n if (event.button !== 0) {\n return;\n } // Hijack the default focus behavior.\n\n\n event.preventDefault();\n displayRef.current.focus();\n update(true, event);\n };\n\n const handleClose = event => {\n update(false, event);\n };\n\n const childrenArray = React.Children.toArray(children); // Support autofill.\n\n const handleChange = event => {\n const index = childrenArray.map(child => child.props.value).indexOf(event.target.value);\n\n if (index === -1) {\n return;\n }\n\n const child = childrenArray[index];\n setValueState(child.props.value);\n\n if (onChange) {\n onChange(event, child);\n }\n };\n\n const handleItemClick = child => event => {\n let newValue; // We use the tabindex attribute to signal the available options.\n\n if (!event.currentTarget.hasAttribute('tabindex')) {\n return;\n }\n\n if (multiple) {\n newValue = Array.isArray(value) ? value.slice() : [];\n const itemIndex = value.indexOf(child.props.value);\n\n if (itemIndex === -1) {\n newValue.push(child.props.value);\n } else {\n newValue.splice(itemIndex, 1);\n }\n } else {\n newValue = child.props.value;\n }\n\n if (child.props.onClick) {\n child.props.onClick(event);\n }\n\n if (value !== newValue) {\n setValueState(newValue);\n\n if (onChange) {\n // Redefine target to allow name and value to be read.\n // This allows seamless integration with the most popular form libraries.\n // https://github.com/mui-org/material-ui/issues/13485#issuecomment-676048492\n // Clone the event to not override `target` of the original event.\n const nativeEvent = event.nativeEvent || event;\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: {\n value: newValue,\n name\n }\n });\n onChange(clonedEvent, child);\n }\n }\n\n if (!multiple) {\n update(false, event);\n }\n };\n\n const handleKeyDown = event => {\n if (!readOnly) {\n const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by\n // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html\n 'Enter'];\n\n if (validKeys.indexOf(event.key) !== -1) {\n event.preventDefault();\n update(true, event);\n }\n }\n };\n\n const open = displayNode !== null && (isOpenControlled ? openProp : openState);\n\n const handleBlur = event => {\n // if open event.stopImmediatePropagation\n if (!open && onBlur) {\n // Preact support, target is read only property on a native event.\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value,\n name\n }\n });\n onBlur(event);\n }\n };\n\n delete other['aria-invalid'];\n let display;\n let displaySingle;\n const displayMultiple = [];\n let computeDisplay = false;\n let foundMatch = false; // No need to display any value if the field is empty.\n\n if (isFilled({\n value\n }) || displayEmpty) {\n if (renderValue) {\n display = renderValue(value);\n } else {\n computeDisplay = true;\n }\n }\n\n const items = childrenArray.map(child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Select component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n let selected;\n\n if (multiple) {\n if (!Array.isArray(value)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`value\\` prop must be an array when using the \\`Select\\` component with \\`multiple\\`.` : _formatMuiErrorMessage(2));\n }\n\n selected = value.some(v => areEqualValues(v, child.props.value));\n\n if (selected && computeDisplay) {\n displayMultiple.push(child.props.children);\n }\n } else {\n selected = areEqualValues(value, child.props.value);\n\n if (selected && computeDisplay) {\n displaySingle = child.props.children;\n }\n }\n\n if (selected) {\n foundMatch = true;\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n 'aria-selected': selected ? 'true' : undefined,\n onClick: handleItemClick(child),\n onKeyUp: event => {\n if (event.key === ' ') {\n // otherwise our MenuItems dispatches a click event\n // it's not behavior of the native <option> and causes\n // the select to close immediately since we open on space keydown\n event.preventDefault();\n }\n\n if (child.props.onKeyUp) {\n child.props.onKeyUp(event);\n }\n },\n role: 'option',\n selected,\n value: undefined,\n // The value is most likely not a valid HTML attribute.\n 'data-value': child.props.value // Instead, we provide it as a data attribute.\n\n });\n });\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!foundMatch && !multiple && value !== '') {\n const values = childrenArray.map(child => child.props.value);\n console.warn([`MUI: You have provided an out-of-range value \\`${value}\\` for the select ${name ? `(name=\"${name}\") ` : ''}component.`, \"Consider providing a value that matches one of the available options or ''.\", `The available values are ${values.filter(x => x != null).map(x => `\\`${x}\\``).join(', ') || '\"\"'}.`].join('\\n'));\n }\n }, [foundMatch, childrenArray, multiple, name, value]);\n }\n\n if (computeDisplay) {\n display = multiple ? displayMultiple.join(', ') : displaySingle;\n } // Avoid performing a layout computation in the render method.\n\n\n let menuMinWidth = menuMinWidthState;\n\n if (!autoWidth && isOpenControlled && displayNode) {\n menuMinWidth = displayNode.clientWidth;\n }\n\n let tabIndex;\n\n if (typeof tabIndexProp !== 'undefined') {\n tabIndex = tabIndexProp;\n } else {\n tabIndex = disabled ? null : 0;\n }\n\n const buttonId = SelectDisplayProps.id || (name ? `mui-component-select-${name}` : undefined);\n\n const ownerState = _extends({}, props, {\n variant,\n value,\n open\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(SelectSelect, _extends({\n ref: handleDisplayRef,\n tabIndex: tabIndex,\n role: \"button\",\n \"aria-disabled\": disabled ? 'true' : undefined,\n \"aria-expanded\": open ? 'true' : 'false',\n \"aria-haspopup\": \"listbox\",\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": [labelId, buttonId].filter(Boolean).join(' ') || undefined,\n \"aria-describedby\": ariaDescribedby,\n onKeyDown: handleKeyDown,\n onMouseDown: disabled || readOnly ? null : handleMouseDown,\n onBlur: handleBlur,\n onFocus: onFocus\n }, SelectDisplayProps, {\n ownerState: ownerState,\n className: clsx(classes.select, className, SelectDisplayProps.className) // The id is required for proper a11y\n ,\n id: buttonId,\n children: isEmpty(display) ?\n /*#__PURE__*/\n // notranslate needed while Google Translate will not fix zero-width space issue\n // eslint-disable-next-line react/no-danger\n _jsx(\"span\", {\n className: \"notranslate\",\n dangerouslySetInnerHTML: {\n __html: '​'\n }\n }) : display\n })), /*#__PURE__*/_jsx(SelectNativeInput, _extends({\n value: Array.isArray(value) ? value.join(',') : value,\n name: name,\n ref: inputRef,\n \"aria-hidden\": true,\n onChange: handleChange,\n tabIndex: -1,\n disabled: disabled,\n className: classes.nativeInput,\n autoFocus: autoFocus,\n ownerState: ownerState\n }, other)), /*#__PURE__*/_jsx(SelectIcon, {\n as: IconComponent,\n className: classes.icon,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(Menu, _extends({\n id: `menu-${name || ''}`,\n anchorEl: displayNode,\n open: open,\n onClose: handleClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'center'\n },\n transformOrigin: {\n vertical: 'top',\n horizontal: 'center'\n }\n }, MenuProps, {\n MenuListProps: _extends({\n 'aria-labelledby': labelId,\n role: 'listbox',\n disableListWrap: true\n }, MenuProps.MenuListProps),\n PaperProps: _extends({}, MenuProps.PaperProps, {\n style: _extends({\n minWidth: menuMinWidth\n }, MenuProps.PaperProps != null ? MenuProps.PaperProps.style : null)\n }),\n children: items\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SelectInput.propTypes = {\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * @ignore\n */\n 'aria-label': PropTypes.string,\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: PropTypes.bool,\n\n /**\n * The option elements to populate the select with.\n * Can be some `<MenuItem>` elements.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the select is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the selected item is displayed even if its value is empty.\n */\n displayEmpty: PropTypes.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n\n /**\n * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`\n * Equivalent to `ref`\n */\n inputRef: refType,\n\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n\n /**\n * Props applied to the [`Menu`](/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: PropTypes.bool,\n\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n\n /**\n * @ignore\n */\n readOnly: PropTypes.bool,\n\n /**\n * Render the selected value.\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n type: PropTypes.any,\n\n /**\n * The input value.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default SelectInput;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nvar _Input, _FilledInput;\n\nconst _excluded = [\"autoWidth\", \"children\", \"classes\", \"className\", \"displayEmpty\", \"IconComponent\", \"id\", \"input\", \"inputProps\", \"label\", \"labelId\", \"MenuProps\", \"multiple\", \"native\", \"onClose\", \"onOpen\", \"open\", \"renderValue\", \"SelectDisplayProps\", \"variant\"],\n _excluded2 = [\"root\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { deepmerge } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport SelectInput from './SelectInput';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nimport NativeSelectInput from '../NativeSelect/NativeSelectInput';\nimport FilledInput from '../FilledInput';\nimport OutlinedInput from '../OutlinedInput';\nimport useThemeProps from '../styles/useThemeProps';\nimport useForkRef from '../utils/useForkRef';\nimport { getSelectUtilityClasses } from './selectClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getSelectUtilityClasses, classes);\n};\n\nconst Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {\n const props = useThemeProps({\n name: 'MuiSelect',\n props: inProps\n });\n\n const {\n autoWidth = false,\n children,\n classes: classesProp = {},\n className,\n displayEmpty = false,\n IconComponent = ArrowDropDownIcon,\n id,\n input,\n inputProps,\n label,\n labelId,\n MenuProps,\n multiple = false,\n native = false,\n onClose,\n onOpen,\n open,\n renderValue,\n SelectDisplayProps,\n variant: variantProps = 'outlined'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const inputComponent = native ? NativeSelectInput : SelectInput;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant']\n });\n const variant = fcs.variant || variantProps;\n const InputComponent = input || {\n standard: _Input || (_Input = /*#__PURE__*/_jsx(Input, {})),\n outlined: /*#__PURE__*/_jsx(OutlinedInput, {\n label: label\n }),\n filled: _FilledInput || (_FilledInput = /*#__PURE__*/_jsx(FilledInput, {}))\n }[variant];\n\n const ownerState = _extends({}, props, {\n classes: classesProp\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const otherClasses = _objectWithoutPropertiesLoose(classesProp, _excluded2);\n\n const inputComponentRef = useForkRef(ref, InputComponent.ref);\n return /*#__PURE__*/React.cloneElement(InputComponent, _extends({\n // Most of the logic is implemented in `SelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent,\n inputProps: _extends({\n children,\n IconComponent,\n variant,\n type: undefined,\n // We render a select. We can ignore the type provided by the `Input`.\n multiple\n }, native ? {\n id\n } : {\n autoWidth,\n displayEmpty,\n labelId,\n MenuProps,\n onClose,\n onOpen,\n open,\n renderValue,\n SelectDisplayProps: _extends({\n id\n }, SelectDisplayProps)\n }, inputProps, {\n classes: inputProps ? deepmerge(otherClasses, inputProps.classes) : otherClasses\n }, input ? input.props.inputProps : {})\n }, multiple && native && variant === 'outlined' ? {\n notched: true\n } : {}, {\n ref: inputComponentRef,\n className: clsx(classes.root, InputComponent.props.className, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Select.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n * @default false\n */\n autoWidth: PropTypes.bool,\n\n /**\n * The option elements to populate the select with.\n * Can be some `MenuItem` when `native` is false and `option` when `native` is true.\n *\n * âš ï¸The `MenuItem` elements **must** be direct descendants when `native` is false.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * @default {}\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, a value is displayed even if no items are selected.\n *\n * In order to display a meaningful value, a function can be passed to the `renderValue` prop which\n * returns the value to be displayed when no items are selected.\n *\n * âš ï¸ When using this prop, make sure the label doesn't overlap with the empty displayed value.\n * The label should either be hidden or forced to a shrunk state.\n * @default false\n */\n displayEmpty: PropTypes.bool,\n\n /**\n * The icon that displays the arrow.\n * @default ArrowDropDownIcon\n */\n IconComponent: PropTypes.elementType,\n\n /**\n * The `id` of the wrapper element or the `select` element when `native`.\n */\n id: PropTypes.string,\n\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: PropTypes.element,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * When `native` is `true`, the attributes are applied on the `select` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * See [OutlinedInput#label](/api/outlined-input/#props)\n */\n label: PropTypes.node,\n\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n\n /**\n * Props applied to the [`Menu`](/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n * @default false\n */\n multiple: PropTypes.bool,\n\n /**\n * If `true`, the component uses a native `select` element.\n * @default false\n */\n native: PropTypes.bool,\n\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {SelectChangeEvent<T>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * **Warning**: This is a generic event not a change event unless the change event is caused by browser autofill.\n * @param {object} [child] The react element that was selected when `native` is `false` (default).\n */\n onChange: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * If `true`, the component is shown.\n * You can only use it when the `native` prop is `false` (default).\n */\n open: PropTypes.bool,\n\n /**\n * Render the selected value.\n * You can only use it when the `native` prop is `false` (default).\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The `input` value. Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n *\n * If the value is an object it must have reference equality with the option in order to be selected.\n * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nSelect.muiName = 'Select';\nexport default Select;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getTextFieldUtilityClass(slot) {\n return generateUtilityClass('MuiTextField', slot);\n}\nconst textFieldClasses = generateUtilityClasses('MuiTextField', ['root']);\nexport default textFieldClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"autoComplete\", \"autoFocus\", \"children\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"error\", \"FormHelperTextProps\", \"fullWidth\", \"helperText\", \"id\", \"InputLabelProps\", \"inputProps\", \"InputProps\", \"inputRef\", \"label\", \"maxRows\", \"minRows\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"placeholder\", \"required\", \"rows\", \"select\", \"SelectProps\", \"type\", \"value\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport { refType } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Input from '../Input';\nimport FilledInput from '../FilledInput';\nimport OutlinedInput from '../OutlinedInput';\nimport InputLabel from '../InputLabel';\nimport FormControl from '../FormControl';\nimport FormHelperText from '../FormHelperText';\nimport Select from '../Select';\nimport { getTextFieldUtilityClass } from './textFieldClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst variantComponent = {\n standard: Input,\n filled: FilledInput,\n outlined: OutlinedInput\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getTextFieldUtilityClass, classes);\n};\n\nconst TextFieldRoot = styled(FormControl, {\n name: 'MuiTextField',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n/**\n * The `TextField` is a convenience wrapper for the most common cases (80%).\n * It cannot be all things to all people, otherwise the API would grow out of control.\n *\n * ## Advanced Configuration\n *\n * It's important to understand that the text field is a simple abstraction\n * on top of the following components:\n *\n * - [FormControl](/api/form-control/)\n * - [InputLabel](/api/input-label/)\n * - [FilledInput](/api/filled-input/)\n * - [OutlinedInput](/api/outlined-input/)\n * - [Input](/api/input/)\n * - [FormHelperText](/api/form-helper-text/)\n *\n * If you wish to alter the props applied to the `input` element, you can do so as follows:\n *\n * ```jsx\n * const inputProps = {\n * step: 300,\n * };\n *\n * return <TextField id=\"time\" type=\"time\" inputProps={inputProps} />;\n * ```\n *\n * For advanced cases, please look at the source of TextField by clicking on the\n * \"Edit this page\" button above. Consider either:\n *\n * - using the upper case props for passing values directly to the components\n * - using the underlying components directly as shown in the demos\n */\n\nconst TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTextField'\n });\n\n const {\n autoComplete,\n autoFocus = false,\n children,\n className,\n color = 'primary',\n defaultValue,\n disabled = false,\n error = false,\n FormHelperTextProps,\n fullWidth = false,\n helperText,\n id,\n InputLabelProps,\n inputProps,\n InputProps,\n inputRef,\n label,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n required = false,\n rows,\n select = false,\n SelectProps,\n type,\n value,\n variant = 'outlined'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n autoFocus,\n color,\n disabled,\n error,\n fullWidth,\n multiline,\n required,\n select,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (process.env.NODE_ENV !== 'production') {\n if (select && !children) {\n console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');\n }\n }\n\n const InputMore = {};\n\n if (variant === 'outlined') {\n if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') {\n InputMore.notched = InputLabelProps.shrink;\n }\n\n if (label) {\n var _InputLabelProps$requ;\n\n const displayRequired = (_InputLabelProps$requ = InputLabelProps == null ? void 0 : InputLabelProps.required) != null ? _InputLabelProps$requ : required;\n InputMore.label = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [label, displayRequired && '\\u00a0*']\n });\n }\n }\n\n if (select) {\n // unset defaults from textbox inputs\n if (!SelectProps || !SelectProps.native) {\n InputMore.id = undefined;\n }\n\n InputMore['aria-describedby'] = undefined;\n }\n\n const helperTextId = helperText && id ? `${id}-helper-text` : undefined;\n const inputLabelId = label && id ? `${id}-label` : undefined;\n const InputComponent = variantComponent[variant];\n\n const InputElement = /*#__PURE__*/_jsx(InputComponent, _extends({\n \"aria-describedby\": helperTextId,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n fullWidth: fullWidth,\n multiline: multiline,\n name: name,\n rows: rows,\n maxRows: maxRows,\n minRows: minRows,\n type: type,\n value: value,\n id: id,\n inputRef: inputRef,\n onBlur: onBlur,\n onChange: onChange,\n onFocus: onFocus,\n placeholder: placeholder,\n inputProps: inputProps\n }, InputMore, InputProps));\n\n return /*#__PURE__*/_jsxs(TextFieldRoot, _extends({\n className: clsx(classes.root, className),\n disabled: disabled,\n error: error,\n fullWidth: fullWidth,\n ref: ref,\n required: required,\n color: color,\n variant: variant,\n ownerState: ownerState\n }, other, {\n children: [label && /*#__PURE__*/_jsx(InputLabel, _extends({\n htmlFor: id,\n id: inputLabelId\n }, InputLabelProps, {\n children: label\n })), select ? /*#__PURE__*/_jsx(Select, _extends({\n \"aria-describedby\": helperTextId,\n id: id,\n labelId: inputLabelId,\n value: value,\n input: InputElement\n }, SelectProps, {\n children: children\n })) : InputElement, helperText && /*#__PURE__*/_jsx(FormHelperText, _extends({\n id: helperTextId\n }, FormHelperTextProps, {\n children: helperText\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TextField.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n * @default false\n */\n autoFocus: PropTypes.bool,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n\n /**\n * Props applied to the [`FormHelperText`](/api/form-helper-text/) element.\n */\n FormHelperTextProps: PropTypes.object,\n\n /**\n * If `true`, the input will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The helper text content.\n */\n helperText: PropTypes.node,\n\n /**\n * The id of the `input` element.\n * Use this prop to make `label` and `helperText` accessible for screen readers.\n */\n id: PropTypes.string,\n\n /**\n * Props applied to the [`InputLabel`](/api/input-label/) element.\n */\n InputLabelProps: PropTypes.object,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](/api/filled-input/),\n * [`OutlinedInput`](/api/outlined-input/) or [`Input`](/api/input/)\n * component depending on the `variant` prop value.\n */\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The label content.\n */\n label: PropTypes.node,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a `textarea` element is rendered instead of an input.\n * @default false\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Render a [`Select`](/api/select/) element while passing the Input element to `Select` as `input` parameter.\n * If this option is set you must pass the options of the select as children.\n * @default false\n */\n select: PropTypes.bool,\n\n /**\n * Props applied to the [`Select`](/api/select/) element.\n */\n SelectProps: PropTypes.object,\n\n /**\n * The size of the component.\n */\n size: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default TextField;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getToolbarUtilityClass(slot) {\n return generateUtilityClass('MuiToolbar', slot);\n}\nconst toolbarClasses = generateUtilityClasses('MuiToolbar', ['root', 'gutters', 'regular', 'dense']);\nexport default toolbarClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"disableGutters\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getToolbarUtilityClass } from './toolbarClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableGutters,\n variant\n } = ownerState;\n const slots = {\n root: ['root', !disableGutters && 'gutters', variant]\n };\n return composeClasses(slots, getToolbarUtilityClass, classes);\n};\n\nconst ToolbarRoot = styled('div', {\n name: 'MuiToolbar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableGutters && styles.gutters, styles[ownerState.variant]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n}, !ownerState.disableGutters && {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }\n}, ownerState.variant === 'dense' && {\n minHeight: 48\n}), ({\n theme,\n ownerState\n}) => ownerState.variant === 'regular' && theme.mixins.toolbar);\nconst Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiToolbar'\n });\n\n const {\n className,\n component = 'div',\n disableGutters = false,\n variant = 'regular'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n component,\n disableGutters,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ToolbarRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n * The Toolbar is a flex container, allowing flex item properites to be used to lay out the children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, disables gutter padding.\n * @default false\n */\n disableGutters: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * The variant to use.\n * @default 'regular'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['dense', 'regular']), PropTypes.string])\n} : void 0;\nexport default Toolbar;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getTypographyUtilityClass(slot) {\n return generateUtilityClass('MuiTypography', slot);\n}\nconst typographyClasses = generateUtilityClasses('MuiTypography', ['root', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'inherit', 'button', 'caption', 'overline', 'alignLeft', 'alignRight', 'alignCenter', 'alignJustify', 'noWrap', 'gutterBottom', 'paragraph']);\nexport default typographyClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"align\", \"className\", \"component\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_extendSxProp as extendSxProp } from '@mui/system';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport { getTypographyUtilityClass } from './typographyClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${capitalize(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return composeClasses(slots, getTypographyUtilityClass, classes);\n};\n\nexport const TypographyRoot = styled('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${capitalize(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n margin: 0\n}, ownerState.variant && theme.typography[ownerState.variant], ownerState.align !== 'inherit' && {\n textAlign: ownerState.align\n}, ownerState.noWrap && {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n}, ownerState.gutterBottom && {\n marginBottom: '0.35em'\n}, ownerState.paragraph && {\n marginBottom: 16\n}));\nconst defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n inherit: 'p'\n}; // TODO v6: deprecate these color values in v5.x and remove the transformation in v6\n\nconst colorTransformations = {\n primary: 'primary.main',\n textPrimary: 'text.primary',\n secondary: 'secondary.main',\n textSecondary: 'text.secondary',\n error: 'error.main'\n};\n\nconst transformDeprecatedColors = color => {\n return colorTransformations[color] || color;\n};\n\nconst Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, ref) {\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiTypography'\n });\n const color = transformDeprecatedColors(themeProps.color);\n const props = extendSxProp(_extends({}, themeProps, {\n color\n }));\n\n const {\n align = 'inherit',\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = 'body1',\n variantMapping = defaultVariantMapping\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n align,\n color,\n className,\n component,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n variantMapping\n });\n\n const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(TypographyRoot, _extends({\n as: Component,\n ref: ref,\n ownerState: ownerState,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Typography.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the component.\n * @default 'inherit'\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, the text will have a bottom margin.\n * @default false\n */\n gutterBottom: PropTypes.bool,\n\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n * @default false\n */\n noWrap: PropTypes.bool,\n\n /**\n * If `true`, the element will be a paragraph element.\n * @default false\n */\n paragraph: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2']), PropTypes.string]),\n\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `<h6>`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n * @default {\n * h1: 'h1',\n * h2: 'h2',\n * h3: 'h3',\n * h4: 'h4',\n * h5: 'h5',\n * h6: 'h6',\n * subtitle1: 'h6',\n * subtitle2: 'h6',\n * body1: 'p',\n * body2: 'p',\n * inherit: 'p',\n * }\n */\n variantMapping: PropTypes\n /* @typescript-to-proptypes-ignore */\n .object\n} : void 0;\nexport default Typography;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","const deepPurple = {\n 50: '#ede7f6',\n 100: '#d1c4e9',\n 200: '#b39ddb',\n 300: '#9575cd',\n 400: '#7e57c2',\n 500: '#673ab7',\n 600: '#5e35b1',\n 700: '#512da8',\n 800: '#4527a0',\n 900: '#311b92',\n A100: '#b388ff',\n A200: '#7c4dff',\n A400: '#651fff',\n A700: '#6200ea'\n};\nexport default deepPurple;","const indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","const cyan = {\n 50: '#e0f7fa',\n 100: '#b2ebf2',\n 200: '#80deea',\n 300: '#4dd0e1',\n 400: '#26c6da',\n 500: '#00bcd4',\n 600: '#00acc1',\n 700: '#0097a7',\n 800: '#00838f',\n 900: '#006064',\n A100: '#84ffff',\n A200: '#18ffff',\n A400: '#00e5ff',\n A700: '#00b8d4'\n};\nexport default cyan;","const teal = {\n 50: '#e0f2f1',\n 100: '#b2dfdb',\n 200: '#80cbc4',\n 300: '#4db6ac',\n 400: '#26a69a',\n 500: '#009688',\n 600: '#00897b',\n 700: '#00796b',\n 800: '#00695c',\n 900: '#004d40',\n A100: '#a7ffeb',\n A200: '#64ffda',\n A400: '#1de9b6',\n A700: '#00bfa5'\n};\nexport default teal;","const lightGreen = {\n 50: '#f1f8e9',\n 100: '#dcedc8',\n 200: '#c5e1a5',\n 300: '#aed581',\n 400: '#9ccc65',\n 500: '#8bc34a',\n 600: '#7cb342',\n 700: '#689f38',\n 800: '#558b2f',\n 900: '#33691e',\n A100: '#ccff90',\n A200: '#b2ff59',\n A400: '#76ff03',\n A700: '#64dd17'\n};\nexport default lightGreen;","const lime = {\n 50: '#f9fbe7',\n 100: '#f0f4c3',\n 200: '#e6ee9c',\n 300: '#dce775',\n 400: '#d4e157',\n 500: '#cddc39',\n 600: '#c0ca33',\n 700: '#afb42b',\n 800: '#9e9d24',\n 900: '#827717',\n A100: '#f4ff81',\n A200: '#eeff41',\n A400: '#c6ff00',\n A700: '#aeea00'\n};\nexport default lime;","const yellow = {\n 50: '#fffde7',\n 100: '#fff9c4',\n 200: '#fff59d',\n 300: '#fff176',\n 400: '#ffee58',\n 500: '#ffeb3b',\n 600: '#fdd835',\n 700: '#fbc02d',\n 800: '#f9a825',\n 900: '#f57f17',\n A100: '#ffff8d',\n A200: '#ffff00',\n A400: '#ffea00',\n A700: '#ffd600'\n};\nexport default yellow;","const amber = {\n 50: '#fff8e1',\n 100: '#ffecb3',\n 200: '#ffe082',\n 300: '#ffd54f',\n 400: '#ffca28',\n 500: '#ffc107',\n 600: '#ffb300',\n 700: '#ffa000',\n 800: '#ff8f00',\n 900: '#ff6f00',\n A100: '#ffe57f',\n A200: '#ffd740',\n A400: '#ffc400',\n A700: '#ffab00'\n};\nexport default amber;","const deepOrange = {\n 50: '#fbe9e7',\n 100: '#ffccbc',\n 200: '#ffab91',\n 300: '#ff8a65',\n 400: '#ff7043',\n 500: '#ff5722',\n 600: '#f4511e',\n 700: '#e64a19',\n 800: '#d84315',\n 900: '#bf360c',\n A100: '#ff9e80',\n A200: '#ff6e40',\n A400: '#ff3d00',\n A700: '#dd2c00'\n};\nexport default deepOrange;","const brown = {\n 50: '#efebe9',\n 100: '#d7ccc8',\n 200: '#bcaaa4',\n 300: '#a1887f',\n 400: '#8d6e63',\n 500: '#795548',\n 600: '#6d4c41',\n 700: '#5d4037',\n 800: '#4e342e',\n 900: '#3e2723',\n A100: '#d7ccc8',\n A200: '#bcaaa4',\n A400: '#8d6e63',\n A700: '#5d4037'\n};\nexport default brown;","const blueGrey = {\n 50: '#eceff1',\n 100: '#cfd8dc',\n 200: '#b0bec5',\n 300: '#90a4ae',\n 400: '#78909c',\n 500: '#607d8b',\n 600: '#546e7a',\n 700: '#455a64',\n 800: '#37474f',\n 900: '#263238',\n A100: '#cfd8dc',\n A200: '#b0bec5',\n A400: '#78909c',\n A700: '#455a64'\n};\nexport default blueGrey;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getSwitchBaseUtilityClass(slot) {\n return generateUtilityClass('PrivateSwitchBase', slot);\n}\nconst switchBaseClasses = generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);\nexport default switchBaseClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"checked\", \"checkedIcon\", \"className\", \"defaultChecked\", \"disabled\", \"disableFocusRipple\", \"edge\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport capitalize from '../utils/capitalize';\nimport styled from '../styles/styled';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport ButtonBase from '../ButtonBase';\nimport { getSwitchBaseUtilityClass } from './switchBaseClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n checked,\n disabled,\n edge\n } = ownerState;\n const slots = {\n root: ['root', checked && 'checked', disabled && 'disabled', edge && `edge${capitalize(edge)}`],\n input: ['input']\n };\n return composeClasses(slots, getSwitchBaseUtilityClass, classes);\n};\n\nconst SwitchBaseRoot = styled(ButtonBase, {\n skipSx: true\n})(({\n ownerState\n}) => _extends({\n padding: 9,\n borderRadius: '50%'\n}, ownerState.edge === 'start' && {\n marginLeft: ownerState.size === 'small' ? -3 : -12\n}, ownerState.edge === 'end' && {\n marginRight: ownerState.size === 'small' ? -3 : -12\n}));\nconst SwitchBaseInput = styled('input', {\n skipSx: true\n})({\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n});\n/**\n * @ignore - internal component.\n */\n\nconst SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n const {\n autoFocus,\n checked: checkedProp,\n checkedIcon,\n className,\n defaultChecked,\n disabled: disabledProp,\n disableFocusRipple = false,\n edge = false,\n icon,\n id,\n inputProps,\n inputRef,\n name,\n onBlur,\n onChange,\n onFocus,\n readOnly,\n required,\n tabIndex,\n type,\n value\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const [checked, setCheckedState] = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n });\n const muiFormControl = useFormControl();\n\n const handleFocus = event => {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n const handleInputChange = event => {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n\n const newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v6: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n let disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n const hasLabelFor = type === 'checkbox' || type === 'radio';\n\n const ownerState = _extends({}, props, {\n checked,\n disabled,\n disableFocusRipple,\n edge\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SwitchBaseRoot, _extends({\n component: \"span\",\n className: clsx(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [/*#__PURE__*/_jsx(SwitchBaseInput, _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n ownerState: ownerState,\n tabIndex: tabIndex,\n type: type\n }, type === 'checkbox' && value === undefined ? {} : {\n value\n }, inputProps)), checked ? checkedIcon : icon]\n }));\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element is required.\n */\n required: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default SwitchBase;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nimport { deepmerge } from '@mui/utils';\nimport { darken, getContrastRatio, lighten } from '@mui/system';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport purple from '../colors/purple';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport lightBlue from '../colors/lightBlue';\nimport green from '../colors/green';\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\n\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\n\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\n\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\n\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\n\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n\n return {\n main: '#ED6C02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\n\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = _objectWithoutPropertiesLoose(palette, _excluded);\n\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n const modes = {\n dark,\n light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n\n const paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common,\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nimport { deepmerge } from '@mui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n\n const coef = fontSize / 14;\n\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nimport { deepmerge } from '@mui/utils';\nimport { generateUtilityClass } from '@mui/core';\nimport { createTheme as systemCreateTheme } from '@mui/system';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport createTransitions from './createTransitions';\nimport zIndex from './zIndex';\n\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, systemTheme.spacing, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: _extends({}, zIndex)\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n\n const traverse = (node, component) => {\n let key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n const child = node[key];\n\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n\n return muiTheme;\n}\n\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme(...args);\n}\nexport default createTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n return _extends({\n toolbar: {\n minHeight: 56,\n [`${breakpoints.up('xs')} and (orientation: landscape)`]: {\n minHeight: 48\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\n\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\n\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n const constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\n\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = _extends({}, easing, inputTransitions.easing);\n\n const mergedDuration = _extends({}, duration, inputTransitions.duration);\n\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string'; // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n\n\n const isNumber = value => !isNaN(parseFloat(value));\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n\n return _extends({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}","import createTheme from './createTheme';\nconst defaultTheme = createTheme();\nexport default defaultTheme;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"variant\"];\nimport { unstable_capitalize as capitalize } from '@mui/utils';\n\nfunction isEmpty(string) {\n return string.length === 0;\n}\n/**\n * Generates string classKey based on the properties provided. It starts with the\n * variant if defined, and then it appends all other properties in alphabetical order.\n * @param {object} props - the properties for which the classKey should be created.\n */\n\n\nexport default function propsToClassKey(props) {\n const {\n variant\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n let classKey = variant || '';\n Object.keys(other).sort().forEach(key => {\n if (key === 'color') {\n classKey += isEmpty(classKey) ? props[key] : capitalize(props[key]);\n } else {\n classKey += `${isEmpty(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;\n }\n });\n return classKey;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"],\n _excluded2 = [\"theme\"],\n _excluded3 = [\"theme\"];\nimport styledEngineStyled from '@mui/styled-engine';\nimport { getDisplayName } from '@mui/utils';\nimport createTheme from './createTheme';\nimport styleFunctionSx from './styleFunctionSx';\nimport propsToClassKey from './propsToClassKey';\n\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\nconst getStyleOverrides = (name, theme) => {\n if (theme.components && theme.components[name] && theme.components[name].styleOverrides) {\n return theme.components[name].styleOverrides;\n }\n\n return null;\n};\n\nconst getVariantStyles = (name, theme) => {\n let variants = [];\n\n if (theme && theme.components && theme.components[name] && theme.components[name].variants) {\n variants = theme.components[name].variants;\n }\n\n const variantsStyles = {};\n variants.forEach(definition => {\n const key = propsToClassKey(definition.props);\n variantsStyles[key] = definition.style;\n });\n return variantsStyles;\n};\n\nconst variantsResolver = (props, styles, theme, name) => {\n var _theme$components, _theme$components$nam;\n\n const {\n ownerState = {}\n } = props;\n const variantsStyles = [];\n const themeVariants = theme == null ? void 0 : (_theme$components = theme.components) == null ? void 0 : (_theme$components$nam = _theme$components[name]) == null ? void 0 : _theme$components$nam.variants;\n\n if (themeVariants) {\n themeVariants.forEach(themeVariant => {\n let isMatch = true;\n Object.keys(themeVariant.props).forEach(key => {\n if (ownerState[key] !== themeVariant.props[key] && props[key] !== themeVariant.props[key]) {\n isMatch = false;\n }\n });\n\n if (isMatch) {\n variantsStyles.push(styles[propsToClassKey(themeVariant.props)]);\n }\n });\n }\n\n return variantsStyles;\n};\n\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport const systemDefaultTheme = createTheme();\n\nconst lowercaseFirstLetter = string => {\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\n\nexport default function createStyled(input = {}) {\n const {\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n return (tag, inputOptions = {}) => {\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n overridesResolver\n } = inputOptions,\n options = _objectWithoutPropertiesLoose(inputOptions, _excluded); // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n\n\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n\n let shouldForwardPropOption = shouldForwardProp;\n\n if (componentSlot === 'Root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n }\n\n const defaultStyledResolver = styledEngineStyled(tag, _extends({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n\n const muiStyledResolver = (styleArg, ...expressions) => {\n const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {\n return typeof stylesArg === 'function' ? _ref => {\n let {\n theme: themeInput\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded2);\n\n return stylesArg(_extends({\n theme: isEmpty(themeInput) ? defaultTheme : themeInput\n }, other));\n } : stylesArg;\n }) : [];\n let transformedStyleArg = styleArg;\n\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = isEmpty(props.theme) ? defaultTheme : props.theme;\n const styleOverrides = getStyleOverrides(componentName, theme);\n\n if (styleOverrides) {\n return overridesResolver(props, styleOverrides);\n }\n\n return null;\n });\n }\n\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = isEmpty(props.theme) ? defaultTheme : props.theme;\n return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);\n });\n }\n\n if (!skipSx) {\n expressionsWithDefaultTheme.push(props => {\n const theme = isEmpty(props.theme) ? defaultTheme : props.theme;\n return styleFunctionSx(_extends({}, props, {\n theme\n }));\n });\n }\n\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill(''); // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n } else if (typeof styleArg === 'function') {\n // If the type is function, we need to define the default theme.\n transformedStyleArg = _ref2 => {\n let {\n theme: themeInput\n } = _ref2,\n other = _objectWithoutPropertiesLoose(_ref2, _excluded3);\n\n return styleArg(_extends({\n theme: isEmpty(themeInput) ? defaultTheme : themeInput\n }, other));\n };\n }\n\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n\n if (componentName) {\n displayName = `${componentName}${componentSlot || ''}`;\n }\n\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n\n Component.displayName = displayName;\n }\n\n return Component;\n };\n\n return muiStyledResolver;\n };\n}","import { createStyled, shouldForwardProp } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nexport const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';\nexport const slotShouldForwardProp = shouldForwardProp;\nconst styled = createStyled({\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","import * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","import { useThemeProps as systemUseThemeProps } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme\n });\n}","import getThemeProps from './getThemeProps';\nimport useTheme from '../useTheme';\nexport default function useThemeProps({\n props,\n name,\n defaultTheme\n}) {\n const theme = useTheme(defaultTheme);\n const mergedProps = getThemeProps({\n theme,\n name,\n props\n });\n return mergedProps;\n}","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n var _style$transitionDura, _style$transitionTimi;\n\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: (_style$transitionDura = style.transitionDuration) != null ? _style$transitionDura : typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n easing: (_style$transitionTimi = style.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing === 'object' ? easing[options.mode] : easing,\n delay: style.transitionDelay\n };\n}","import * as React from 'react';\nimport { getThemeProps, useThemeWithoutDefault as useTheme } from '@mui/system';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\n/**\n * @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.\n */\n\nexport default function useMediaQuery(queryInput, options = {}) {\n const theme = useTheme(); // Wait for jsdom to support the match media feature.\n // All the browsers MUI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n\n const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n const {\n defaultMatches = false,\n matchMedia = supportMatchMedia ? window.matchMedia : null,\n noSsr = false,\n ssrMatchMedia = null\n } = getThemeProps({\n name: 'MuiUseMediaQuery',\n props: options,\n theme\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, '');\n const [match, setMatch] = React.useState(() => {\n if (noSsr && supportMatchMedia) {\n return matchMedia(query).matches;\n }\n\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n } // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n\n\n return defaultMatches;\n });\n useEnhancedEffect(() => {\n let active = true;\n\n if (!supportMatchMedia) {\n return undefined;\n }\n\n const queryList = matchMedia(query);\n\n const updateMatch = () => {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n\n updateMatch();\n queryList.addListener(updateMatch);\n return () => {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia, supportMatchMedia]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query,\n match\n });\n }\n\n return match;\n}","import { unstable_capitalize as capitalize } from '@mui/utils';\nexport default capitalize;","import { unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nexport default createChainedFunction;","import { generateUtilityClass, generateUtilityClasses } from '@mui/core';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/core';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getSvgIconUtilityClass } from './svgIconClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\n\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$palette$ownerS, _theme$palette$ownerS2;\n\n return {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n }),\n fontSize: {\n inherit: 'inherit',\n small: theme.typography.pxToRem(20),\n medium: theme.typography.pxToRem(24),\n large: theme.typography.pxToRem(35)\n }[ownerState.fontSize],\n // TODO v5 deprecate, v6 remove for sx\n color: (_theme$palette$ownerS = (_theme$palette$ownerS2 = theme.palette[ownerState.color]) == null ? void 0 : _theme$palette$ownerS2.main) != null ? _theme$palette$ownerS : {\n action: theme.palette.action.active,\n disabled: theme.palette.action.disabled,\n inherit: undefined\n }[ownerState.color]\n };\n});\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n titleAccess,\n viewBox = '0 0 24 24'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n color,\n component,\n fontSize,\n viewBox\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other, {\n children: [children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport SvgIcon from '../SvgIcon';\n/**\n * Private module reserved for @mui packages.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n const Component = (props, ref) => /*#__PURE__*/_jsx(SvgIcon, _extends({\n \"data-testid\": `${displayName}Icon`,\n ref: ref\n }, props, {\n children: path\n }));\n\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","import { unstable_debounce as debounce } from '@mui/utils';\nexport default debounce;","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n\n function debounced(...args) {\n const later = () => {\n func.apply(this, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n\n return debounced;\n}","import { unstable_deprecatedPropType as deprecatedPropType } from '@mui/utils';\nexport default deprecatedPropType;","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<<anonymous>>';\n const propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n\n return null;\n };\n}","import { unstable_requirePropFactory as requirePropFactory } from '@mui/utils';\nexport default requirePropFactory;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n } // eslint-disable-next-line react/forbid-foreign-prop-types\n\n\n const prevPropTypes = Component ? _extends({}, Component.propTypes) : null;\n\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];\n\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n\n return null;\n };\n\n return requireProp;\n}","import { unstable_setRef as setRef } from '@mui/utils';\nexport default setRef;","import { unstable_unsupportedProp as unsupportedProp } from '@mui/utils';\nexport default unsupportedProp;","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n\n const propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n\n return null;\n}","import { unstable_isMuiElement as isMuiElement } from '@mui/utils';\nexport default isMuiElement;","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;\n}","import { unstable_ownerDocument as ownerDocument } from '@mui/utils';\nexport default ownerDocument;","import { unstable_ownerWindow as ownerWindow } from '@mui/utils';\nexport default ownerWindow;","import { unstable_useControlled as useControlled } from '@mui/utils';\nexport default useControlled;","/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nexport default useEnhancedEffect;","import { unstable_useEventCallback as useEventCallback } from '@mui/utils';\nexport default useEventCallback;","import { unstable_useForkRef as useForkRef } from '@mui/utils';\nexport default useForkRef;","import { unstable_useId as useId } from '@mui/utils';\nexport default useId;","// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nlet hadFocusVisibleRecentlyTimeout = null;\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\n\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n\n if (node.isContentEditable) {\n return true;\n }\n\n return false;\n}\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\n\n\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n hadKeyboardEvent = true;\n}\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\n\n\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\n\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\n\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n\n try {\n return target.matches(':focus-visible');\n } catch (error) {// Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n } // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n\n\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\n\nexport default function useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n /**\n * Should be called if a blur event is fired\n */\n\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {\n hadFocusVisibleRecently = false;\n }, 100);\n isFocusVisibleRef.current = false;\n return true;\n }\n\n return false;\n }\n /**\n * Should be called if a blur event is fired\n */\n\n\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n\n return false;\n }\n\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}","import { unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';\nexport default useIsFocusVisible;","import * as React from 'react';\nconst ThemeContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\n\nexport default ThemeContext;","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default isPropValid;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { useContext, createElement } from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\n\nvar createStyled = function createStyled(tag, options) {\n if (process.env.NODE_ENV !== 'production') {\n if (tag === undefined) {\n throw new Error('You are trying to create a styled element with an undefined component.\\nYou may have forgotten to import it.');\n }\n }\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n styles.push.apply(styles, args);\n } else {\n if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[0][0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[i], args[0][i]);\n }\n } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class\n\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var finalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n var rules = insertStyles(cache, serialized, typeof finalTag === 'string');\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if ( // $FlowFixMe\n finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n newProps.ref = ref;\n var ele = /*#__PURE__*/createElement(finalTag, newProps);\n\n return ele;\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {\n return 'NO_COMPONENT_SELECTOR';\n } // $FlowFixMe: coerce undefined to string\n\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n return createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n })).apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport default createStyled;\n","import '@babel/runtime/helpers/extends';\nimport 'react';\nimport '@emotion/is-prop-valid';\nimport createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@emotion/react';\nimport '@emotion/utils';\nimport '@emotion/serialize';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = createStyled.bind();\ntags.forEach(function (tagName) {\n // $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport default newStyled;\n","/** @license MUI v5.0.1\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport emStyled from '@emotion/styled';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n\n return stylesFactory(...styles);\n };\n }\n\n return stylesFactory;\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from './StyledEngineProvider';\nexport { default as GlobalStyles } from './GlobalStyles';","const hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@mui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested'; // To support composition of theme.\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\\n'));\n }\n }\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, localTheme);\n}\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\n\n\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n\n const theme = React.useMemo(() => {\n const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/_jsx(ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\n\nexport default ThemeProvider;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider } from '@mui/private-theming';\nimport { exactProp } from '@mui/utils';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useTheme from '../useTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction InnerThemeProvider(props) {\n const theme = useTheme();\n return /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: typeof theme === 'object' ? theme : {},\n children: props.children\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? InnerThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node\n} : void 0;\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n */\n\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: localTheme,\n children: /*#__PURE__*/_jsx(InnerThemeProvider, {\n children: children\n })\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\n\nexport default ThemeProvider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport { deepmerge } from '@mui/utils';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablets\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screens\n\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n\n return acc;\n }, {});\n }\n\n const output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\n\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n\n const breakpointsInOrder = breakpointsInput == null ? void 0 : (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = Object.keys(breakpointOutput).length === 0;\n\n if (isBreakpointUnused) {\n delete acc[key];\n }\n\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n base\n}) {\n const keys = Object.keys(base);\n\n if (keys.length === 0) {\n return breakpointValues;\n }\n\n let previous;\n return keys.reduce((acc, breakpoint) => {\n if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n } else {\n acc[breakpoint] = breakpointValues;\n }\n\n previous = breakpoint;\n return acc;\n }, {});\n}\nexport default breakpoints;","import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nexport function hexToRgb(color) {\n color = color.substr(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\n\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\n\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n }\n\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].substr(1);\n }\n\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n\n return `${type}(${values})`;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablets\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screens\n\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = _objectWithoutPropertiesLoose(breakpoints, _excluded);\n\n const keys = Object.keys(values);\n\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n\n return up(key);\n }\n\n return _extends({\n keys,\n values,\n up,\n down,\n between,\n only,\n unit\n }, other);\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nimport { deepmerge } from '@mui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\n\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: _extends({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: _extends({}, shape, shapeInput)\n }, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n return muiTheme;\n}\n\nexport default createTheme;","import { createUnarySpacing } from '../spacing';\n\n/* tslint:enable:unified-signatures */\nexport default function createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n const transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n\n spacing.mui = true;\n return spacing;\n}","import merge from './merge';\n\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n\n return acc;\n }, {});\n };\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\n\nexport default compose;","import responsivePropType from './responsivePropType';\nimport style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\n\nfunction getBorder(value) {\n if (typeof value !== 'number') {\n return value;\n }\n\n return `${value}px solid`;\n}\n\nexport const border = style({\n prop: 'border',\n themeKey: 'borders',\n transform: getBorder\n});\nexport const borderTop = style({\n prop: 'borderTop',\n themeKey: 'borders',\n transform: getBorder\n});\nexport const borderRight = style({\n prop: 'borderRight',\n themeKey: 'borders',\n transform: getBorder\n});\nexport const borderBottom = style({\n prop: 'borderBottom',\n themeKey: 'borders',\n transform: getBorder\n});\nexport const borderLeft = style({\n prop: 'borderLeft',\n themeKey: 'borders',\n transform: getBorder\n});\nexport const borderColor = style({\n prop: 'borderColor',\n themeKey: 'palette'\n});\nexport const borderTopColor = style({\n prop: 'borderTopColor',\n themeKey: 'palette'\n});\nexport const borderRightColor = style({\n prop: 'borderRightColor',\n themeKey: 'palette'\n});\nexport const borderBottomColor = style({\n prop: 'borderBottomColor',\n themeKey: 'palette'\n});\nexport const borderLeftColor = style({\n prop: 'borderLeftColor',\n themeKey: 'palette'\n});\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius);\nexport default borders;","import style from './style';\nimport compose from './compose';\nexport const displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n});\nexport const displayRaw = style({\n prop: 'display'\n});\nexport const overflow = style({\n prop: 'overflow'\n});\nexport const textOverflow = style({\n prop: 'textOverflow'\n});\nexport const visibility = style({\n prop: 'visibility'\n});\nexport const whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nimport compose from './compose';\nexport const flexBasis = style({\n prop: 'flexBasis'\n});\nexport const flexDirection = style({\n prop: 'flexDirection'\n});\nexport const flexWrap = style({\n prop: 'flexWrap'\n});\nexport const justifyContent = style({\n prop: 'justifyContent'\n});\nexport const alignItems = style({\n prop: 'alignItems'\n});\nexport const alignContent = style({\n prop: 'alignContent'\n});\nexport const order = style({\n prop: 'order'\n});\nexport const flex = style({\n prop: 'flex'\n});\nexport const flexGrow = style({\n prop: 'flexGrow'\n});\nexport const flexShrink = style({\n prop: 'flexShrink'\n});\nexport const alignSelf = style({\n prop: 'alignSelf'\n});\nexport const justifyItems = style({\n prop: 'justifyItems'\n});\nexport const justifySelf = style({\n prop: 'justifySelf'\n});\nconst flexbox = compose(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);\nexport default flexbox;","import style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nimport responsivePropType from './responsivePropType';\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport const position = style({\n prop: 'position'\n});\nexport const zIndex = style({\n prop: 'zIndex',\n themeKey: 'zIndex'\n});\nexport const top = style({\n prop: 'top'\n});\nexport const right = style({\n prop: 'right'\n});\nexport const bottom = style({\n prop: 'bottom'\n});\nexport const left = style({\n prop: 'left'\n});\nexport default compose(position, zIndex, top, right, bottom, left);","import style from './style';\nimport compose from './compose';\nexport const color = style({\n prop: 'color',\n themeKey: 'palette'\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette'\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette'\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from './style';\nconst boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","import style from './style';\nimport compose from './compose';\nimport { handleBreakpoints, values as breakpointsValues } from './breakpoints';\n\nfunction transform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\n\nexport const width = style({\n prop: 'width',\n transform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme$breakpoi, _props$theme$breakpoi2;\n\n const breakpoint = ((_props$theme = props.theme) == null ? void 0 : (_props$theme$breakpoi = _props$theme.breakpoints) == null ? void 0 : (_props$theme$breakpoi2 = _props$theme$breakpoi.values) == null ? void 0 : _props$theme$breakpoi2[propValue]) || breakpointsValues[propValue];\n return {\n maxWidth: breakpoint || transform(propValue)\n };\n };\n\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform\n});\nexport const height = style({\n prop: 'height',\n transform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import style from './style';\nimport compose from './compose';\nexport const fontFamily = style({\n prop: 'fontFamily',\n themeKey: 'typography'\n});\nexport const fontSize = style({\n prop: 'fontSize',\n themeKey: 'typography'\n});\nexport const fontStyle = style({\n prop: 'fontStyle',\n themeKey: 'typography'\n});\nexport const fontWeight = style({\n prop: 'fontWeight',\n themeKey: 'typography'\n});\nexport const letterSpacing = style({\n prop: 'letterSpacing'\n});\nexport const lineHeight = style({\n prop: 'lineHeight'\n});\nexport const textAlign = style({\n prop: 'textAlign'\n});\nexport const typographyVariant = style({\n prop: 'typography',\n cssProperty: false,\n themeKey: 'typography'\n});\nconst typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);\nexport default typography;","import borders from './borders';\nimport display from './display';\nimport flexbox from './flexbox';\nimport grid from './grid';\nimport positions from './positions';\nimport palette from './palette';\nimport shadows from './shadows';\nimport sizing from './sizing';\nimport spacing from './spacing';\nimport typography from './typography';\nconst filterPropsMapping = {\n borders: borders.filterProps,\n display: display.filterProps,\n flexbox: flexbox.filterProps,\n grid: grid.filterProps,\n positions: positions.filterProps,\n palette: palette.filterProps,\n shadows: shadows.filterProps,\n sizing: sizing.filterProps,\n spacing: spacing.filterProps,\n typography: typography.filterProps\n};\nconst styleFunctionMapping = {\n borders,\n display,\n flexbox,\n grid,\n positions,\n palette,\n shadows,\n sizing,\n spacing,\n typography\n};\nexport const propToStyleFunction = Object.keys(filterPropsMapping).reduce((acc, styleFnName) => {\n filterPropsMapping[styleFnName].forEach(propName => {\n acc[propName] = styleFunctionMapping[styleFnName];\n });\n return acc;\n}, {});\n\nfunction getThemeValue(prop, value, theme) {\n const inputProps = {\n [prop]: value,\n theme\n };\n const styleFunction = propToStyleFunction[prop];\n return styleFunction ? styleFunction(inputProps) : {\n [prop]: value\n };\n}\n\nexport default getThemeValue;","import { deepmerge } from '@mui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","import responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport { getPath } from './style';\nimport merge from './merge';\nimport memoize from './memoize';\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n}; // memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\n\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nconst marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nconst paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n const themeSpacing = getPath(theme, themeKey) || defaultValue;\n\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n\n return themeSpacing * abs;\n };\n }\n\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n\n return themeSpacing[abs];\n };\n }\n\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n\n if (propValue >= 0) {\n return transformed;\n }\n\n if (typeof transformed === 'number') {\n return -transformed;\n }\n\n return `-${transformed}`;\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\n\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\n\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\n\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\n\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\n\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n\n return cache[arg];\n };\n}","import { unstable_capitalize as capitalize } from '@mui/utils';\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nexport function getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n}\n\nfunction getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n\n if (transform) {\n value = transform(value);\n }\n\n return value;\n}\n\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return {\n [cssProperty]: value\n };\n };\n\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\n\nexport default style;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"sx\"];\nimport { propToStyleFunction } from '../getThemeValue';\n\nconst splitProps = props => {\n const result = {\n systemProps: {},\n otherProps: {}\n };\n Object.keys(props).forEach(prop => {\n if (propToStyleFunction[prop]) {\n result.systemProps[prop] = props[prop];\n } else {\n result.otherProps[prop] = props[prop];\n }\n });\n return result;\n};\n\nexport default function extendSxProp(props) {\n const {\n sx: inSx\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n systemProps,\n otherProps\n } = splitProps(other);\n return _extends({}, otherProps, {\n sx: _extends({}, systemProps, inSx)\n });\n}","import merge from '../merge';\nimport getThemeValue, { propToStyleFunction } from '../getThemeValue';\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';\n\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\n\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\nfunction styleFunctionSx(props) {\n const {\n sx: styles,\n theme = {}\n } = props || {};\n\n if (!styles) {\n return null;\n }\n\n if (typeof styles === 'function') {\n return styles(theme);\n }\n\n if (typeof styles !== 'object') {\n // value\n return styles;\n }\n\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(styles).forEach(styleKey => {\n const value = callIfFn(styles[styleKey], theme);\n\n if (typeof value === 'object') {\n if (propToStyleFunction[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme));\n }\n });\n return removeUnusedBreakpoints(breakpointsKeys, css);\n}\n\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","import createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\n\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\n\nexport default useTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\n/* eslint-disable no-restricted-syntax */\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n\n const output = _extends({}, props); // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n const defaultProps = theme.components[name].defaultProps;\n let propName;\n\n for (propName in defaultProps) {\n if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n }\n\n return output;\n}","import { useTheme as muiUseTheme } from '@mui/private-theming';\n\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\nfunction useTheme(defaultTheme = null) {\n const contextTheme = muiUseTheme();\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\n\nexport default useTheme;","import _formatMuiErrorMessage from \"./formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function isPlainObject(item) {\n return item !== null && typeof item === 'object' && // TS thinks `item is possibly null` even though this was our first guard.\n // @ts-expect-error\n item.constructor === Object;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n\n if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else {\n output[key] = source[key];\n }\n });\n }\n\n return output;\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/utils/macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe iff we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui-org/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import * as React from 'react';\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","import * as React from 'react';\nimport useEnhancedEffect from './useEnhancedEffect';\n/**\n * https://github.com/facebook/react/issues/14099#issuecomment-440013892\n */\n\nexport default function useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useCallback((...args) => // @ts-expect-error hide `this`\n // tslint:disable-next-line:ban-comma-operator\n (0, ref.current)(...args), []);\n}","import * as React from 'react';\nimport setRef from './setRef';\nexport default function useForkRef(refA, refB) {\n /**\n * This will create a new function if the ref props change and are defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refA == null && refB == null) {\n return null;\n }\n\n return refValue => {\n setRef(refA, refValue);\n setRef(refB, refValue);\n };\n }, [refA, refB]);\n}","import * as React from 'react';\nexport default function useId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(`mui-${Math.round(Math.random() * 1e9)}`);\n }\n }, [defaultId]);\n return id;\n}","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @packageDocumentation\n * @preferred\n */\nimport { isFunction, isString, isArray, isRegExp, isDate } from './predicates';\nimport { all, any, prop, curry, not } from './hof';\nimport { services } from './coreservices';\nexport var root = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) ||\n this;\nvar angular = root.angular || {};\nexport var fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport var toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport var forEach = angular.forEach || _forEach;\nexport var extend = Object.assign || _extend;\nexport var equals = angular.equals || _equals;\nexport function identity(x) {\n return x;\n}\nexport function noop() { }\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source, target, bind, fnNames, latebind) {\n if (latebind === void 0) { latebind = false; }\n var bindFunction = function (fnName) { return source()[fnName].bind(bind()); };\n var makeLateRebindFn = function (fnName) {\n return function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n };\n fnNames = fnNames || Object.keys(source());\n return fnNames.reduce(function (acc, name) {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport var inherit = function (parent, extra) { return extend(Object.create(parent), extra); };\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport var inArray = curry(_inArray);\nexport function _inArray(array, obj) {\n return array.indexOf(obj) !== -1;\n}\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport var removeFrom = curry(_removeFrom);\nexport function _removeFrom(array, obj) {\n var idx = array.indexOf(obj);\n if (idx >= 0)\n array.splice(idx, 1);\n return array;\n}\n/** pushes a values to an array and returns the value */\nexport var pushTo = curry(_pushTo);\nexport function _pushTo(arr, val) {\n return arr.push(val), val;\n}\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport var deregAll = function (functions) {\n return functions.slice().forEach(function (fn) {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n};\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts) {\n var defaultsList = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n defaultsList[_i - 1] = arguments[_i];\n }\n var defaultVals = extend.apply(void 0, __spreadArrays([{}], defaultsList.reverse()));\n return extend(defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport var mergeR = function (memo, item) { return extend(memo, item); };\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first, second) {\n var path = [];\n // tslint:disable-next-line:forin\n for (var n in first.path) {\n if (first.path[n] !== second.path[n])\n break;\n path.push(first.path[n]);\n }\n return path;\n}\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj, propNames) {\n var objCopy = {};\n for (var _prop in obj) {\n if (propNames.indexOf(_prop) !== -1) {\n objCopy[_prop] = obj[_prop];\n }\n }\n return objCopy;\n}\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj, propNames) {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce(function (acc, key) { return ((acc[key] = obj[key]), acc); }, {});\n}\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection, propName) {\n return map(collection, prop(propName));\n}\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection, callback) {\n var arr = isArray(collection), result = arr ? [] : {};\n var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return (result[key] = x); };\n forEach(collection, function (item, i) {\n if (callback(item, i))\n accept(item, i);\n });\n return result;\n}\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection, callback) {\n var result;\n forEach(collection, function (item, i) {\n if (result)\n return;\n if (callback(item, i))\n result = item;\n });\n return result;\n}\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport var mapObj = map;\n/** Maps an array or object properties using a callback function */\nexport function map(collection, callback, target) {\n target = target || (isArray(collection) ? [] : {});\n forEach(collection, function (item, i) { return (target[i] = callback(item, i)); });\n return target;\n}\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport var values = function (obj) { return Object.keys(obj).map(function (key) { return obj[key]; }); };\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport var allTrueR = function (memo, elem) { return memo && elem; };\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport var anyTrueR = function (memo, elem) { return memo || elem; };\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport var unnestR = function (memo, elem) { return memo.concat(elem); };\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport var flattenR = function (memo, elem) {\n return isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n};\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr, obj) {\n arr.push(obj);\n return arr;\n}\n/** Reduce function that filters out duplicates */\nexport var uniqR = function (acc, token) { return (inArray(acc, token) ? acc : pushR(acc, token)); };\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport var unnest = function (arr) { return arr.reduce(unnestR, []); };\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport var flatten = function (arr) { return arr.reduce(flattenR, []); };\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport var assertPredicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport var assertMap = assertFn;\nexport function assertFn(predicateOrMap, errMsg) {\n if (errMsg === void 0) { errMsg = 'assert failure'; }\n return function (obj) {\n var result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? errMsg(obj) : errMsg);\n }\n return result;\n };\n}\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport var pairs = function (obj) { return Object.keys(obj).map(function (key) { return [key, obj[key]]; }); };\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (args.length === 0)\n return [];\n var maxArrayLen = args.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n var result = [];\n var _loop_1 = function (i) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1:\n result.push([args[0][i]]);\n break;\n case 2:\n result.push([args[0][i], args[1][i]]);\n break;\n case 3:\n result.push([args[0][i], args[1][i], args[2][i]]);\n break;\n case 4:\n result.push([args[0][i], args[1][i], args[2][i], args[3][i]]);\n break;\n default:\n result.push(args.map(function (array) { return array[i]; }));\n break;\n }\n };\n for (var i = 0; i < maxArrayLen; i++) {\n _loop_1(i);\n }\n return result;\n}\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo, keyValTuple) {\n var key, value;\n if (isArray(keyValTuple))\n key = keyValTuple[0], value = keyValTuple[1];\n if (!isString(key))\n throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n}\n/** Get the last element of an array */\nexport function tail(arr) {\n return (arr.length && arr[arr.length - 1]) || undefined;\n}\n/**\n * shallow copy from src to dest\n */\nexport function copy(src, dest) {\n if (dest)\n Object.keys(dest).forEach(function (key) { return delete dest[key]; });\n if (!dest)\n dest = {};\n return extend(dest, src);\n}\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj, cb, _this) {\n if (isArray(obj))\n return obj.forEach(cb, _this);\n Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n}\nexport function _extend(toObj) {\n for (var i = 1; i < arguments.length; i++) {\n var obj = arguments[i];\n if (!obj)\n continue;\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n return toObj;\n}\nfunction _equals(o1, o2) {\n if (o1 === o2)\n return true;\n if (o1 === null || o2 === null)\n return false;\n if (o1 !== o1 && o2 !== o2)\n return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object')\n return false;\n var tup = [o1, o2];\n if (all(isArray)(tup))\n return _arraysEq(o1, o2);\n if (all(isDate)(tup))\n return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup))\n return o1.toString() === o2.toString();\n if (all(isFunction)(tup))\n return true; // meh\n var predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce(function (b, fn) { return b || !!fn(tup); }, false))\n return false;\n var keys = {};\n // tslint:disable-next-line:forin\n for (var key in o1) {\n if (!_equals(o1[key], o2[key]))\n return false;\n keys[key] = true;\n }\n for (var key in o2) {\n if (!keys[key])\n return false;\n }\n return true;\n}\nfunction _arraysEq(a1, a2) {\n if (a1.length !== a2.length)\n return false;\n return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true);\n}\n// issue #2676\nexport var silenceUncaughtInPromise = function (promise) { return promise.catch(function (e) { return 0; }) && promise; };\nexport var silentRejection = function (error) { return silenceUncaughtInPromise(services.$q.reject(error)); };\n//# sourceMappingURL=common.js.map","var noImpl = function (fnname) { return function () {\n throw new Error(\"No implementation for \" + fnname + \". The framework specific code did not implement this method.\");\n}; };\nexport var makeStub = function (service, methods) {\n return methods.reduce(function (acc, key) { return ((acc[key] = noImpl(service + \".\" + key + \"()\")), acc); }, {});\n};\nvar services = {\n $q: undefined,\n $injector: undefined,\n};\nexport { services };\n//# sourceMappingURL=coreservices.js.map","/**\n * Matches state names using glob-like pattern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n * @packageDocumentation\n */\nvar Glob = /** @class */ (function () {\n function Glob(text) {\n this.text = text;\n this.glob = text.split('.');\n var regexpString = this.text\n .split('.')\n .map(function (seg) {\n if (seg === '**')\n return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*')\n return '\\\\.[^.]*';\n return '\\\\.' + seg;\n })\n .join('');\n this.regexp = new RegExp('^' + regexpString + '$');\n }\n /** Returns true if the string has glob-like characters in it */\n Glob.is = function (text) {\n return !!/[!,*]+/.exec(text);\n };\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n Glob.fromString = function (text) {\n return Glob.is(text) ? new Glob(text) : null;\n };\n Glob.prototype.matches = function (name) {\n return this.regexp.test('.' + name);\n };\n return Glob;\n}());\nexport { Glob };\n//# sourceMappingURL=glob.js.map","/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @packageDocumentation\n */\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn) {\n return function curried() {\n if (arguments.length >= fn.length) {\n return fn.apply(this, arguments);\n }\n var args = Array.prototype.slice.call(arguments);\n return curried.bind.apply(curried, __spreadArrays([this], args));\n };\n}\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function () {\n var i = start, result = args[start].apply(this, arguments);\n while (i--)\n result = args[i].call(this, result);\n return result;\n };\n}\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe() {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport var prop = function (name) { return function (obj) { return obj && obj[name]; }; };\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport var propEq = curry(function (name, _val, obj) { return obj && obj[name] === _val; });\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport var parse = function (name) { return pipe.apply(null, name.split('.').map(prop)); };\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport var not = function (fn) { return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return !fn.apply(null, args);\n}; };\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1, fn2) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return fn1.apply(null, args) && fn2.apply(null, args);\n };\n}\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1, fn2) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return fn1.apply(null, args) || fn2.apply(null, args);\n };\n}\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport var all = function (fn1) { return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; };\n// tslint:disable-next-line:variable-name\nexport var any = function (fn1) { return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; };\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport var is = function (ctor) { return function (obj) {\n return (obj != null && obj.constructor === ctor) || obj instanceof ctor;\n}; };\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport var eq = function (value) { return function (other) { return value === other; }; };\n/** Given a value, returns a function which returns the value */\nexport var val = function (v) { return function () { return v; }; };\nexport function invoke(fnName, args) {\n return function (obj) { return obj[fnName].apply(obj, args); };\n}\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct) {\n return function (x) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x))\n return struct[i][1](x);\n }\n };\n}\n//# sourceMappingURL=hof.js.map","/**\n * Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @packageDocumentation\n */\nimport { and, not, pipe, prop, or } from './hof';\nvar toStr = Object.prototype.toString;\nvar tis = function (t) { return function (x) { return typeof x === t; }; };\nexport var isUndefined = tis('undefined');\nexport var isDefined = not(isUndefined);\nexport var isNull = function (o) { return o === null; };\nexport var isNullOrUndefined = or(isNull, isUndefined);\nexport var isFunction = tis('function');\nexport var isNumber = tis('number');\nexport var isString = tis('string');\nexport var isObject = function (x) { return x !== null && typeof x === 'object'; };\nexport var isArray = Array.isArray;\nexport var isDate = (function (x) { return toStr.call(x) === '[object Date]'; });\nexport var isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; });\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val) {\n if (isArray(val) && val.length) {\n var head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport var isPromise = and(isObject, pipe(prop('then'), isFunction));\n//# sourceMappingURL=predicates.js.map","import { pushTo } from './common';\nvar Queue = /** @class */ (function () {\n function Queue(_items, _limit) {\n if (_items === void 0) { _items = []; }\n if (_limit === void 0) { _limit = null; }\n this._items = _items;\n this._limit = _limit;\n this._evictListeners = [];\n this.onEvict = pushTo(this._evictListeners);\n }\n Queue.prototype.enqueue = function (item) {\n var items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit)\n this.evict();\n return item;\n };\n Queue.prototype.evict = function () {\n var item = this._items.shift();\n this._evictListeners.forEach(function (fn) { return fn(item); });\n return item;\n };\n Queue.prototype.dequeue = function () {\n if (this.size())\n return this._items.splice(0, 1)[0];\n };\n Queue.prototype.clear = function () {\n var current = this._items;\n this._items = [];\n return current;\n };\n Queue.prototype.size = function () {\n return this._items.length;\n };\n Queue.prototype.remove = function (item) {\n var idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n };\n Queue.prototype.peekTail = function () {\n return this._items[this._items.length - 1];\n };\n Queue.prototype.peekHead = function () {\n if (this.size())\n return this._items[0];\n };\n return Queue;\n}());\nexport { Queue };\n//# sourceMappingURL=queue.js.map","/**\n * workaround for missing console object in IE9 when dev tools haven't been opened o_O\n * @packageDocumentation\n */\n/* tslint:disable:no-console */\nimport { noop } from './common';\nvar noopConsoleStub = { log: noop, error: noop, table: noop };\nfunction ie9Console(console) {\n var bound = function (fn) { return Function.prototype.bind.call(fn, console); };\n return {\n log: bound(console.log),\n error: bound(console.log),\n table: bound(console.log),\n };\n}\nfunction fallbackConsole(console) {\n var log = console.log.bind(console);\n var error = console.error ? console.error.bind(console) : log;\n var table = console.table ? console.table.bind(console) : log;\n return { log: log, error: error, table: table };\n}\nfunction getSafeConsole() {\n // @ts-ignore\n var isIE9 = typeof document !== 'undefined' && document.documentMode && document.documentMode === 9;\n if (isIE9) {\n return window && window.console ? ie9Console(window.console) : noopConsoleStub;\n }\n else if (!console.table || !console.error) {\n return fallbackConsole(console);\n }\n else {\n return console;\n }\n}\nexport var safeConsole = getSafeConsole();\n//# sourceMappingURL=safeConsole.js.map","/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @packageDocumentation\n */\nimport { isArray, isFunction, isInjectable, isNull, isObject, isPromise, isString, isUndefined } from './predicates';\nimport { Rejection } from '../transition/rejectFactory';\nimport { identity, pushR, tail } from './common';\nimport { pattern, val } from './hof';\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max, str) {\n if (str.length <= max)\n return str;\n return str.substr(0, max - 3) + '...';\n}\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length, str) {\n while (str.length < length)\n str += ' ';\n return str;\n}\nexport function kebobString(camelCase) {\n return camelCase\n .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char\n .replace(/([A-Z])/g, function ($1) { return '-' + $1.toLowerCase(); }); // replace rest\n}\nexport function functionToString(fn) {\n var fnStr = fnToString(fn);\n var namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n var fnName = fn['name'] || '';\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\nexport function fnToString(fn) {\n var _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return (_fn && _fn.toString()) || 'undefined';\n}\nexport function stringify(o) {\n var seen = [];\n var isRejection = Rejection.isRejectionPromise;\n var hasToString = function (obj) {\n return isObject(obj) && !isArray(obj) && obj.constructor !== Object && isFunction(obj.toString);\n };\n var stringifyPattern = pattern([\n [isUndefined, val('undefined')],\n [isNull, val('null')],\n [isPromise, val('[Promise]')],\n [isRejection, function (x) { return x._transitionRejection.toString(); }],\n [hasToString, function (x) { return x.toString(); }],\n [isInjectable, functionToString],\n [val(true), identity],\n ]);\n function format(value) {\n if (isObject(value)) {\n if (seen.indexOf(value) !== -1)\n return '[circular ref]';\n seen.push(value);\n }\n return stringifyPattern(value);\n }\n if (isUndefined(o)) {\n // Workaround for IE & Edge Spec incompatibility where replacer function would not be called when JSON.stringify\n // is given `undefined` as value. To work around that, we simply detect `undefined` and bail out early by\n // manually stringifying it.\n return format(o);\n }\n return JSON.stringify(o, function (key, value) { return format(value); }).replace(/\\\\\"/g, '\"');\n}\n/** Returns a function that splits a string on a character or substring */\nexport var beforeAfterSubstr = function (char) {\n return function (str) {\n if (!str)\n return ['', ''];\n var idx = str.indexOf(char);\n if (idx === -1)\n return [str, ''];\n return [str.substr(0, idx), str.substr(idx + 1)];\n };\n};\nexport var hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport var stripLastPathElement = function (str) { return str.replace(/\\/[^/]*$/, ''); };\nexport var splitHash = beforeAfterSubstr('#');\nexport var splitQuery = beforeAfterSubstr('?');\nexport var splitEqual = beforeAfterSubstr('=');\nexport var trimHashVal = function (str) { return (str ? str.replace(/^#/, '') : ''); };\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim) {\n var re = new RegExp('(' + delim + ')', 'g');\n return function (str) { return str.split(re).filter(identity); };\n}\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc, x) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc) + x);\n return pushR(acc, x);\n}\n//# sourceMappingURL=strings.js.map","/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"@uirouter/core\";\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"@uirouter/core\").trace;\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"@uirouter/core\"].trace;\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @packageDocumentation\n */\nimport { parse } from '../common/hof';\nimport { isNumber } from '../common/predicates';\nimport { stringify, functionToString, maxLength, padString } from './strings';\nimport { safeConsole } from './safeConsole';\nfunction uiViewString(uiview) {\n if (!uiview)\n return 'ui-view (defunct)';\n var state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return \"[ui-view#\" + uiview.id + \" \" + uiview.$type + \":\" + uiview.fqn + \" (\" + uiview.name + \"@\" + state + \")]\";\n}\nvar viewConfigString = function (viewConfig) {\n var view = viewConfig.viewDecl;\n var state = view.$context.name || '(root)';\n return \"[View#\" + viewConfig.$id + \" from '\" + state + \"' state]: target ui-view: '\" + view.$uiViewName + \"@\" + view.$uiViewContextAnchor + \"'\";\n};\nfunction normalizedCat(input) {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nvar Category;\n(function (Category) {\n Category[Category[\"RESOLVE\"] = 0] = \"RESOLVE\";\n Category[Category[\"TRANSITION\"] = 1] = \"TRANSITION\";\n Category[Category[\"HOOK\"] = 2] = \"HOOK\";\n Category[Category[\"UIVIEW\"] = 3] = \"UIVIEW\";\n Category[Category[\"VIEWCONFIG\"] = 4] = \"VIEWCONFIG\";\n})(Category || (Category = {}));\nexport { Category };\nvar _tid = parse('$id');\nvar _rid = parse('router.$id');\nvar transLbl = function (trans) { return \"Transition #\" + _tid(trans) + \"-\" + _rid(trans); };\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nvar Trace = /** @class */ (function () {\n /** @internal */\n function Trace() {\n /** @internal */\n this._enabled = {};\n this.approximateDigests = 0;\n }\n /** @internal */\n Trace.prototype._set = function (enabled, categories) {\n var _this = this;\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(function (k) { return parseInt(k, 10); })\n .filter(function (k) { return !isNaN(k); })\n .map(function (key) { return Category[key]; });\n }\n categories.map(normalizedCat).forEach(function (category) { return (_this._enabled[category] = enabled); });\n };\n Trace.prototype.enable = function () {\n var categories = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n categories[_i] = arguments[_i];\n }\n this._set(true, categories);\n };\n Trace.prototype.disable = function () {\n var categories = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n categories[_i] = arguments[_i];\n }\n this._set(false, categories);\n };\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n Trace.prototype.enabled = function (category) {\n return !!this._enabled[normalizedCat(category)];\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceTransitionStart = function (trans) {\n if (!this.enabled(Category.TRANSITION))\n return;\n safeConsole.log(transLbl(trans) + \": Started -> \" + stringify(trans));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceTransitionIgnored = function (trans) {\n if (!this.enabled(Category.TRANSITION))\n return;\n safeConsole.log(transLbl(trans) + \": Ignored <> \" + stringify(trans));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceHookInvocation = function (step, trans, options) {\n if (!this.enabled(Category.HOOK))\n return;\n var event = parse('traceData.hookType')(options) || 'internal', context = parse('traceData.context.state.name')(options) || parse('traceData.context')(options) || 'unknown', name = functionToString(step.registeredHook.callback);\n safeConsole.log(transLbl(trans) + \": Hook -> \" + event + \" context: \" + context + \", \" + maxLength(200, name));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) {\n if (!this.enabled(Category.HOOK))\n return;\n safeConsole.log(transLbl(trans) + \": <- Hook returned: \" + maxLength(200, stringify(hookResult)));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceResolvePath = function (path, when, trans) {\n if (!this.enabled(Category.RESOLVE))\n return;\n safeConsole.log(transLbl(trans) + \": Resolving \" + path + \" (\" + when + \")\");\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceResolvableResolved = function (resolvable, trans) {\n if (!this.enabled(Category.RESOLVE))\n return;\n safeConsole.log(transLbl(trans) + \": <- Resolved \" + resolvable + \" to: \" + maxLength(200, stringify(resolvable.data)));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceError = function (reason, trans) {\n if (!this.enabled(Category.TRANSITION))\n return;\n safeConsole.log(transLbl(trans) + \": <- Rejected \" + stringify(trans) + \", reason: \" + reason);\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceSuccess = function (finalState, trans) {\n if (!this.enabled(Category.TRANSITION))\n return;\n safeConsole.log(transLbl(trans) + \": <- Success \" + stringify(trans) + \", final state: \" + finalState.name);\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceUIViewEvent = function (event, viewData, extra) {\n if (extra === void 0) { extra = ''; }\n if (!this.enabled(Category.UIVIEW))\n return;\n safeConsole.log(\"ui-view: \" + padString(30, event) + \" \" + uiViewString(viewData) + extra);\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) {\n if (!this.enabled(Category.UIVIEW))\n return;\n this.traceUIViewEvent('Updating', viewData, \" with ViewConfig from context='\" + context + \"'\");\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceUIViewFill = function (viewData, html) {\n if (!this.enabled(Category.UIVIEW))\n return;\n this.traceUIViewEvent('Fill', viewData, \" with: \" + maxLength(200, html));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceViewSync = function (pairs) {\n if (!this.enabled(Category.VIEWCONFIG))\n return;\n var uivheader = 'uiview component fqn';\n var cfgheader = 'view config state (view name)';\n var mapping = pairs\n .map(function (_a) {\n var _b;\n var uiView = _a.uiView, viewConfig = _a.viewConfig;\n var uiv = uiView && uiView.fqn;\n var cfg = viewConfig && viewConfig.viewDecl.$context.name + \": (\" + viewConfig.viewDecl.$name + \")\";\n return _b = {}, _b[uivheader] = uiv, _b[cfgheader] = cfg, _b;\n })\n .sort(function (a, b) { return (a[uivheader] || '').localeCompare(b[uivheader] || ''); });\n safeConsole.table(mapping);\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceViewServiceEvent = function (event, viewConfig) {\n if (!this.enabled(Category.VIEWCONFIG))\n return;\n safeConsole.log(\"VIEWCONFIG: \" + event + \" \" + viewConfigString(viewConfig));\n };\n /** @internal called by ui-router code */\n Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) {\n if (!this.enabled(Category.VIEWCONFIG))\n return;\n safeConsole.log(\"VIEWCONFIG: \" + event + \" \" + uiViewString(viewData));\n };\n return Trace;\n}());\nexport { Trace };\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"@uirouter/core\";\n * trace.enable(1, 5);\n * ```\n */\nvar trace = new Trace();\nexport { trace };\n//# sourceMappingURL=trace.js.map","import { StateParams } from './params/stateParams';\nimport { Queue } from './common/queue';\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nvar UIRouterGlobals = /** @class */ (function () {\n function UIRouterGlobals() {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n this.params = new StateParams();\n /** @internal */\n this.lastStartedTransitionId = -1;\n /** @internal */\n this.transitionHistory = new Queue([], 1);\n /** @internal */\n this.successfulTransitions = new Queue([], 1);\n }\n UIRouterGlobals.prototype.dispose = function () {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n };\n return UIRouterGlobals;\n}());\nexport { UIRouterGlobals };\n//# sourceMappingURL=globals.js.map","import { services } from '../common/coreservices';\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nvar lazyLoadHook = function (transition) {\n var router = transition.router;\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n var orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n var $url = router.urlService;\n var result = $url.match($url.parts());\n var rule = result && result.rule;\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === 'STATE') {\n var state = rule.state;\n var params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n var promises = transition\n .entering()\n .filter(function (state) { return !!state.$$state().lazyLoad; })\n .map(function (state) { return lazyLoadState(transition, state); });\n return services.$q.all(promises).then(retryTransition);\n};\nexport var registerLazyLoadHook = function (transitionService) {\n return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook);\n};\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition, state) {\n var lazyLoadFn = state.$$state().lazyLoad;\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n var promise = lazyLoadFn['_promise'];\n if (!promise) {\n var success = function (result) {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n var error = function (err) {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n promise = lazyLoadFn['_promise'] = services.$q\n .when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(function (_state) { return transition.router.stateRegistry.register(_state); });\n }\n return result;\n }\n return promise;\n}\n//# sourceMappingURL=lazyLoad.js.map","import { extend, filter, map, allTrueR, find } from '../common/common';\nimport { prop } from '../common/hof';\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from '../common/predicates';\nimport { services } from '../common/coreservices';\nimport { ParamType } from './paramType';\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar isShorthand = function (cfg) {\n return ['value', 'type', 'squash', 'array', 'dynamic'].filter(hasOwn.bind(cfg || {})).length === 0;\n};\nvar DefType;\n(function (DefType) {\n DefType[DefType[\"PATH\"] = 0] = \"PATH\";\n DefType[DefType[\"SEARCH\"] = 1] = \"SEARCH\";\n DefType[DefType[\"CONFIG\"] = 2] = \"CONFIG\";\n})(DefType || (DefType = {}));\nexport { DefType };\nfunction getParamDeclaration(paramName, location, state) {\n var noReloadOnSearch = (state.reloadOnSearch === false && location === DefType.SEARCH) || undefined;\n var dynamic = find([state.dynamic, noReloadOnSearch], isDefined);\n var defaultConfig = isDefined(dynamic) ? { dynamic: dynamic } : {};\n var paramConfig = unwrapShorthand(state && state.params && state.params[paramName]);\n return extend(defaultConfig, paramConfig);\n}\nfunction unwrapShorthand(cfg) {\n cfg = isShorthand(cfg) ? { value: cfg } : cfg;\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n var $$fn = isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue;\n return extend(cfg, { $$fn: $$fn });\n}\nfunction getType(cfg, urlType, location, id, paramTypes) {\n if (cfg.type && urlType && urlType.name !== 'string')\n throw new Error(\"Param '\" + id + \"' has two type configurations.\");\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type))\n return paramTypes.type(cfg.type);\n if (urlType)\n return urlType;\n if (!cfg.type) {\n var type = location === DefType.CONFIG\n ? 'any'\n : location === DefType.PATH\n ? 'path'\n : location === DefType.SEARCH\n ? 'query'\n : 'string';\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type);\n}\n/** returns false, true, or the squash value to indicate the \"default parameter url squash policy\". */\nfunction getSquashPolicy(config, isOptional, defaultPolicy) {\n var squash = config.squash;\n if (!isOptional || squash === false)\n return false;\n if (!isDefined(squash) || squash == null)\n return defaultPolicy;\n if (squash === true || isString(squash))\n return squash;\n throw new Error(\"Invalid squash policy: '\" + squash + \"'. Valid policies: false, true, or arbitrary string\");\n}\nfunction getReplace(config, arrayMode, isOptional, squash) {\n var defaultPolicy = [\n { from: '', to: isOptional || arrayMode ? undefined : '' },\n { from: null, to: isOptional || arrayMode ? undefined : '' },\n ];\n var replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash))\n replace.push({ from: squash, to: undefined });\n var configuredKeys = map(replace, prop('from'));\n return filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace);\n}\nvar Param = /** @class */ (function () {\n function Param(id, type, location, urlConfig, state) {\n var config = getParamDeclaration(id, location, state);\n type = getType(config, type, location, id, urlConfig.paramTypes);\n var arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n var isOptional = config.value !== undefined || location === DefType.SEARCH;\n var dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n var raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n var squash = getSquashPolicy(config, isOptional, urlConfig.defaultSquashPolicy());\n var replace = getReplace(config, arrayMode, isOptional, squash);\n var inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n var arrayDefaults = { array: location === DefType.SEARCH ? 'auto' : false };\n var arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit, array: arrayMode, config: config });\n }\n Param.values = function (params, values) {\n if (values === void 0) { values = {}; }\n var paramValues = {};\n for (var _i = 0, params_1 = params; _i < params_1.length; _i++) {\n var param = params_1[_i];\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n };\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n Param.changed = function (params, values1, values2) {\n if (values1 === void 0) { values1 = {}; }\n if (values2 === void 0) { values2 = {}; }\n return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); });\n };\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n Param.equals = function (params, values1, values2) {\n if (values1 === void 0) { values1 = {}; }\n if (values2 === void 0) { values2 = {}; }\n return Param.changed(params, values1, values2).length === 0;\n };\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n Param.validates = function (params, values) {\n if (values === void 0) { values = {}; }\n return params.map(function (param) { return param.validates(values[param.id]); }).reduce(allTrueR, true);\n };\n Param.prototype.isDefaultValue = function (value) {\n return this.isOptional && this.type.equals(this.value(), value);\n };\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n Param.prototype.value = function (value) {\n var _this = this;\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n var getDefaultValue = function () {\n if (_this._defaultValueCache)\n return _this._defaultValueCache.defaultValue;\n if (!services.$injector)\n throw new Error('Injectable functions cannot be called at configuration time');\n var defaultValue = services.$injector.invoke(_this.config.$$fn);\n if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue))\n throw new Error(\"Default value (\" + defaultValue + \") for parameter '\" + _this.id + \"' is not an instance of ParamType (\" + _this.type.name + \")\");\n if (_this.config.$$fn['__cacheable']) {\n _this._defaultValueCache = { defaultValue: defaultValue };\n }\n return defaultValue;\n };\n var replaceSpecialValues = function (val) {\n for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) {\n var tuple = _a[_i];\n if (tuple.from === val)\n return tuple.to;\n }\n return val;\n };\n value = replaceSpecialValues(value);\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n };\n Param.prototype.isSearch = function () {\n return this.location === DefType.SEARCH;\n };\n Param.prototype.validates = function (value) {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional)\n return true;\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n var normalized = this.type.$normalize(value);\n if (!this.type.is(normalized))\n return false;\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n var encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec(encoded));\n };\n Param.prototype.toString = function () {\n return \"{Param:\" + this.id + \" \" + this.type + \" squash: '\" + this.squash + \"' optional: \" + this.isOptional + \"}\";\n };\n return Param;\n}());\nexport { Param };\n//# sourceMappingURL=param.js.map","import { extend, filter, map } from '../common/common';\nimport { isArray, isDefined } from '../common/predicates';\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n */\nvar ParamType = /** @class */ (function () {\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n function ParamType(def) {\n /** @inheritdoc */\n this.pattern = /.*/;\n /** @inheritdoc */\n this.inherit = true;\n extend(this, def);\n }\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n ParamType.prototype.is = function (val, key) {\n return true;\n };\n /** @inheritdoc */\n ParamType.prototype.encode = function (val, key) {\n return val;\n };\n /** @inheritdoc */\n ParamType.prototype.decode = function (val, key) {\n return val;\n };\n /** @inheritdoc */\n ParamType.prototype.equals = function (a, b) {\n // tslint:disable-next-line:triple-equals\n return a == b;\n };\n ParamType.prototype.$subPattern = function () {\n var sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n };\n ParamType.prototype.toString = function () {\n return \"{ParamType:\" + this.name + \"}\";\n };\n /** Given an encoded string, or a decoded object, returns a decoded object */\n ParamType.prototype.$normalize = function (val) {\n return this.is(val) ? val : this.decode(val);\n };\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n ParamType.prototype.$asArray = function (mode, isSearch) {\n if (!mode)\n return this;\n if (mode === 'auto' && !isSearch)\n throw new Error(\"'auto' array mode is for query parameters only\");\n return new ArrayType(this, mode);\n };\n return ParamType;\n}());\nexport { ParamType };\n/** Wraps up a `ParamType` object to handle array values. */\nfunction ArrayType(type, mode) {\n var _this = this;\n // Wrap non-array value as array\n function arrayWrap(val) {\n return isArray(val) ? val : isDefined(val) ? [val] : [];\n }\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val) {\n switch (val.length) {\n case 0:\n return undefined;\n case 1:\n return mode === 'auto' ? val[0] : val;\n default:\n return val;\n }\n }\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback, allTruthyMode) {\n return function handleArray(val) {\n if (isArray(val) && val.length === 0)\n return val;\n var arr = arrayWrap(val);\n var result = map(arr, callback);\n return allTruthyMode === true ? filter(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result);\n };\n }\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length)\n return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i]))\n return false;\n }\n return true;\n };\n }\n ['encode', 'decode', 'equals', '$normalize'].forEach(function (name) {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n _this[name] = wrapperFn(paramTypeFn);\n });\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n raw: type.raw,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode,\n });\n}\n//# sourceMappingURL=paramType.js.map","import { fromJson, toJson, identity, equals, inherit, map, extend, pick } from '../common/common';\nimport { isDefined, isNullOrUndefined } from '../common/predicates';\nimport { is } from '../common/hof';\nimport { services } from '../common/coreservices';\nimport { ParamType } from './paramType';\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n *\n * To register custom parameter types, use [[UrlConfig.type]], i.e.,\n *\n * ```js\n * router.urlService.config.type(customType)\n * ```\n */\nvar ParamTypes = /** @class */ (function () {\n function ParamTypes() {\n this.enqueue = true;\n this.typeQueue = [];\n this.defaultTypes = pick(ParamTypes.prototype, [\n 'hash',\n 'string',\n 'query',\n 'path',\n 'int',\n 'bool',\n 'date',\n 'json',\n 'any',\n ]);\n // Register default types. Store them in the prototype of this.types.\n var makeType = function (definition, name) { return new ParamType(extend({ name: name }, definition)); };\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n ParamTypes.prototype.dispose = function () {\n this.types = {};\n };\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n ParamTypes.prototype.type = function (name, definition, definitionFn) {\n if (!isDefined(definition))\n return this.types[name];\n if (this.types.hasOwnProperty(name))\n throw new Error(\"A type named '\" + name + \"' has already been defined.\");\n this.types[name] = new ParamType(extend({ name: name }, definition));\n if (definitionFn) {\n this.typeQueue.push({ name: name, def: definitionFn });\n if (!this.enqueue)\n this._flushTypeQueue();\n }\n return this;\n };\n ParamTypes.prototype._flushTypeQueue = function () {\n while (this.typeQueue.length) {\n var type = this.typeQueue.shift();\n if (type.pattern)\n throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n };\n return ParamTypes;\n}());\nexport { ParamTypes };\nfunction initDefaultTypes() {\n var makeDefaultType = function (def) {\n var valToString = function (val) { return (val != null ? val.toString() : val); };\n var defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n // tslint:disable-next-line:triple-equals\n equals: function (a, b) { return a == b; },\n };\n return extend({}, defaultTypeBase, def);\n };\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n query: makeDefaultType({}),\n hash: makeDefaultType({\n inherit: false,\n }),\n int: makeDefaultType({\n decode: function (val) { return parseInt(val, 10); },\n is: function (val) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n bool: makeDefaultType({\n encode: function (val) { return (val && 1) || 0; },\n decode: function (val) { return parseInt(val, 10) !== 0; },\n is: is(Boolean),\n pattern: /0|1/,\n }),\n date: makeDefaultType({\n encode: function (val) {\n return !this.is(val)\n ? undefined\n : [val.getFullYear(), ('0' + (val.getMonth() + 1)).slice(-2), ('0' + val.getDate()).slice(-2)].join('-');\n },\n decode: function (val) {\n if (this.is(val))\n return val;\n var match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: function (val) { return val instanceof Date && !isNaN(val.valueOf()); },\n equals: function (l, r) {\n return ['getFullYear', 'getMonth', 'getDate'].reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: function () { return true; },\n equals: equals,\n }),\n });\n}\ninitDefaultTypes();\n//# sourceMappingURL=paramTypes.js.map","import { extend, ancestors } from '../common/common';\nvar StateParams = /** @class */ (function () {\n function StateParams(params) {\n if (params === void 0) { params = {}; }\n extend(this, params);\n }\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n StateParams.prototype.$inherit = function (newParams, $current, $to) {\n var parentParams;\n var parents = ancestors($current, $to), inherited = {}, inheritList = [];\n for (var i in parents) {\n if (!parents[i] || !parents[i].params)\n continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length)\n continue;\n for (var j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0)\n continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n return StateParams;\n}());\nexport { StateParams };\n//# sourceMappingURL=stateParams.js.map","import { extend, applyPairs, find } from '../common/common';\nimport { propEq } from '../common/hof';\nimport { Param } from '../params/param';\n/**\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nvar PathNode = /** @class */ (function () {\n function PathNode(stateOrNode) {\n if (stateOrNode instanceof PathNode) {\n var node = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n }\n else {\n var state = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(function (res) { return res.clone(); });\n }\n }\n PathNode.prototype.clone = function () {\n return new PathNode(this);\n };\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n PathNode.prototype.applyRawParams = function (params) {\n var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; };\n this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return applyPairs(memo, getParamVal(pDef)); }, {});\n return this;\n };\n /** Gets a specific [[Param]] metadata that belongs to the node */\n PathNode.prototype.parameter = function (name) {\n return find(this.paramSchema, propEq('id', name));\n };\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n PathNode.prototype.equals = function (node, paramsFn) {\n var diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n };\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n PathNode.prototype.diff = function (node, paramsFn) {\n if (this.state !== node.state)\n return false;\n var params = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n };\n /**\n * Returns a clone of the PathNode\n * @deprecated use instance method `node.clone()`\n */\n PathNode.clone = function (node) { return node.clone(); };\n return PathNode;\n}());\nexport { PathNode };\n//# sourceMappingURL=pathNode.js.map","import { extend, find, pick, omit, tail, mergeR, values, unnestR, inArray, arrayTuples, } from '../common/common';\nimport { prop, propEq } from '../common/hof';\nimport { TargetState } from '../state/targetState';\nimport { PathNode } from './pathNode';\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nvar PathUtils = /** @class */ (function () {\n function PathUtils() {\n }\n /** Given a PathNode[], create an TargetState */\n PathUtils.makeTargetState = function (registry, path) {\n var state = tail(path).state;\n return new TargetState(registry, state, path.map(prop('paramValues')).reduce(mergeR, {}), {});\n };\n PathUtils.buildPath = function (targetState) {\n var toParams = targetState.params();\n return targetState.$state().path.map(function (state) { return new PathNode(state).applyRawParams(toParams); });\n };\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n PathUtils.buildToPath = function (fromPath, targetState) {\n var toPath = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n };\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n PathUtils.applyViewConfigs = function ($view, path, states) {\n // Only apply the viewConfigs to the nodes for the given states\n path\n .filter(function (node) { return inArray(states, node.state); })\n .forEach(function (node) {\n var viewDecls = values(node.state.views || {});\n var subPath = PathUtils.subPath(path, function (n) { return n === node; });\n var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); });\n node.views = viewConfigs.reduce(unnestR, []);\n });\n };\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n PathUtils.inheritParams = function (fromPath, toPath, toKeys) {\n if (toKeys === void 0) { toKeys = []; }\n function nodeParamVals(path, state) {\n var node = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n var noInherit = fromPath\n .map(function (node) { return node.paramSchema; })\n .reduce(unnestR, [])\n .filter(function (param) { return !param.inherit; })\n .map(prop('id'));\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode) {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n var toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n var incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n var fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n var ownParamVals = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n };\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n PathUtils.treeChanges = function (fromPath, toPath, reloadState) {\n var max = Math.min(fromPath.length, toPath.length);\n var keep = 0;\n var nodesMatch = function (node1, node2) { return node1.equals(node2, PathUtils.nonDynamicParams); };\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode, idx) {\n var cloned = retainedNode.clone();\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n var from, retained, exiting, entering, to;\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n var retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = retainedWithToParams.concat(entering);\n return { from: from, to: to, retained: retained, retainedWithToParams: retainedWithToParams, exiting: exiting, entering: entering };\n };\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n PathUtils.matching = function (pathA, pathB, paramsFn) {\n var done = false;\n var tuples = arrayTuples(pathA, pathB);\n return tuples.reduce(function (matching, _a) {\n var nodeA = _a[0], nodeB = _a[1];\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n };\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n PathUtils.equals = function (pathA, pathB, paramsFn) {\n return pathA.length === pathB.length && PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n };\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n PathUtils.subPath = function (path, predicate) {\n var node = find(path, predicate);\n var elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n };\n PathUtils.nonDynamicParams = function (node) {\n return node.state.parameters({ inherit: false }).filter(function (param) { return !param.dynamic; });\n };\n /** Gets the raw parameter values from a path */\n PathUtils.paramValues = function (path) { return path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {}); };\n return PathUtils;\n}());\nexport { PathUtils };\n//# sourceMappingURL=pathUtils.js.map","export var resolvePolicies = {\n when: {\n LAZY: 'LAZY',\n EAGER: 'EAGER',\n },\n async: {\n WAIT: 'WAIT',\n NOWAIT: 'NOWAIT',\n },\n};\n//# sourceMappingURL=interface.js.map","import { extend, identity } from '../common/common';\nimport { services } from '../common/coreservices';\nimport { trace } from '../common/trace';\nimport { stringify } from '../common/strings';\nimport { isFunction, isObject } from '../common/predicates';\nimport { isNullOrUndefined } from '../common/predicates';\n// TODO: explicitly make this user configurable\nexport var defaultResolvePolicy = {\n when: 'LAZY',\n async: 'WAIT',\n};\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nvar Resolvable = /** @class */ (function () {\n function Resolvable(arg1, resolveFn, deps, policy, data) {\n this.resolved = false;\n this.promise = undefined;\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n }\n else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1))\n throw new Error('new Resolvable(): token argument is required');\n if (!isFunction(resolveFn))\n throw new Error('new Resolvable(): resolveFn argument must be a function');\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n }\n else if (isObject(arg1) && arg1.token && (arg1.hasOwnProperty('resolveFn') || arg1.hasOwnProperty('data'))) {\n var literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n Resolvable.prototype.getPolicy = function (state) {\n var thisPolicy = this.policy || {};\n var statePolicy = (state && state.resolvePolicy) || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n };\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n Resolvable.prototype.resolve = function (resolveContext, trans) {\n var _this = this;\n var $q = services.$q;\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n var getResolvableDependencies = function () {\n return $q.all(resolveContext.getDependencies(_this).map(function (resolvable) { return resolvable.get(resolveContext, trans); }));\n };\n // Invokes the resolve function passing the resolved dependencies as arguments\n var invokeResolveFn = function (resolvedDeps) { return _this.resolveFn.apply(null, resolvedDeps); };\n var node = resolveContext.findNode(this);\n var state = node && node.state;\n var asyncPolicy = this.getPolicy(state).async;\n var customAsyncPolicy = isFunction(asyncPolicy) ? asyncPolicy : identity;\n // After the final value has been resolved, update the state of the Resolvable\n var applyResolvedValue = function (resolvedValue) {\n _this.data = resolvedValue;\n _this.resolved = true;\n _this.resolveFn = null;\n trace.traceResolvableResolved(_this, trans);\n return _this.data;\n };\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return (this.promise = $q\n .when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(customAsyncPolicy)\n .then(applyResolvedValue));\n };\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n Resolvable.prototype.get = function (resolveContext, trans) {\n return this.promise || this.resolve(resolveContext, trans);\n };\n Resolvable.prototype.toString = function () {\n return \"Resolvable(token: \" + stringify(this.token) + \", requires: [\" + this.deps.map(stringify) + \"])\";\n };\n Resolvable.prototype.clone = function () {\n return new Resolvable(this);\n };\n Resolvable.fromData = function (token, data) { return new Resolvable(token, function () { return data; }, null, null, data); };\n return Resolvable;\n}());\nexport { Resolvable };\n//# sourceMappingURL=resolvable.js.map","import { find, tail, uniqR, unnestR, inArray } from '../common/common';\nimport { propEq, not } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { resolvePolicies } from './interface';\nimport { Resolvable } from './resolvable';\nimport { PathUtils } from '../path/pathUtils';\nimport { stringify } from '../common/strings';\nimport { isUndefined } from '../common';\nvar whens = resolvePolicies.when;\nvar ALL_WHENS = [whens.EAGER, whens.LAZY];\nvar EAGER_WHENS = [whens.EAGER];\n// tslint:disable-next-line:no-inferrable-types\nexport var NATIVE_INJECTOR_TOKEN = 'Native Injector';\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nvar ResolveContext = /** @class */ (function () {\n function ResolveContext(_path) {\n this._path = _path;\n }\n /** Gets all the tokens found in the resolve context, de-duplicated */\n ResolveContext.prototype.getTokens = function () {\n return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(uniqR, []);\n };\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n ResolveContext.prototype.getResolvable = function (token) {\n var matching = this._path\n .map(function (node) { return node.resolvables; })\n .reduce(unnestR, [])\n .filter(function (r) { return r.token === token; });\n return tail(matching);\n };\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n ResolveContext.prototype.getPolicy = function (resolvable) {\n var node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n };\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n ResolveContext.prototype.subContext = function (state) {\n return new ResolveContext(PathUtils.subPath(this._path, function (node) { return node.state === state; }));\n };\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n ResolveContext.prototype.addResolvables = function (newResolvables, state) {\n var node = find(this._path, propEq('state', state));\n var keys = newResolvables.map(function (r) { return r.token; });\n node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables);\n };\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise<any>|any}\n */\n ResolveContext.prototype.resolvePath = function (when, trans) {\n var _this = this;\n if (when === void 0) { when = 'LAZY'; }\n // This option determines which 'when' policy Resolvables we are about to fetch.\n var whenOption = inArray(ALL_WHENS, when) ? when : 'LAZY';\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n var matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n var matchesPolicy = function (acceptedVals, whenOrAsync) { return function (resolvable) {\n return inArray(acceptedVals, _this.getPolicy(resolvable)[whenOrAsync]);\n }; };\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n var promises = this._path.reduce(function (acc, node) {\n var nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n var nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n var wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n // For the matching Resolvables, start their async fetch process.\n var subContext = _this.subContext(node.state);\n var getResult = function (r) {\n return r\n .get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(function (value) { return ({ token: r.token, value: value }); });\n };\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n };\n ResolveContext.prototype.injector = function () {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n };\n ResolveContext.prototype.findNode = function (resolvable) {\n return find(this._path, function (node) { return inArray(node.resolvables, resolvable); });\n };\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n ResolveContext.prototype.getDependencies = function (resolvable) {\n var _this = this;\n var node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n var subPath = PathUtils.subPath(this._path, function (x) { return x === node; }) || this._path;\n var availableResolvables = subPath\n .reduce(function (acc, _node) { return acc.concat(_node.resolvables); }, []) // all of subpath's resolvables\n .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument\n var getDependency = function (token) {\n var matching = availableResolvables.filter(function (r) { return r.token === token; });\n if (matching.length)\n return tail(matching);\n var fromInjector = _this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error('Could not find Dependency Injection token: ' + stringify(token));\n }\n return new Resolvable(token, function () { return fromInjector; }, [], fromInjector);\n };\n return resolvable.deps.map(getDependency);\n };\n return ResolveContext;\n}());\nexport { ResolveContext };\n/** @internal */\nvar UIInjectorImpl = /** @class */ (function () {\n function UIInjectorImpl(context) {\n this.context = context;\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n UIInjectorImpl.prototype.get = function (token) {\n var resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n if (!resolvable.resolved) {\n throw new Error('Resolvable async .get() not complete:' + stringify(resolvable.token));\n }\n return resolvable.data;\n }\n return this.getNative(token);\n };\n UIInjectorImpl.prototype.getAsync = function (token) {\n var resolvable = this.context.getResolvable(token);\n if (resolvable)\n return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n };\n UIInjectorImpl.prototype.getNative = function (token) {\n return this.native && this.native.get(token);\n };\n return UIInjectorImpl;\n}());\n//# sourceMappingURL=resolveContext.js.map","import { UrlMatcherFactory } from './url/urlMatcherFactory';\nimport { UrlRouter } from './url/urlRouter';\nimport { TransitionService } from './transition/transitionService';\nimport { ViewService } from './view/view';\nimport { StateRegistry } from './state/stateRegistry';\nimport { StateService } from './state/stateService';\nimport { UIRouterGlobals } from './globals';\nimport { values, removeFrom } from './common/common';\nimport { isFunction } from './common/predicates';\nimport { UrlService } from './url/urlService';\nimport { trace } from './common/trace';\nimport { makeStub } from './common';\n/** @internal */\nvar _routerInstance = 0;\n/** @internal */\nvar locSvcFns = ['url', 'path', 'search', 'hash', 'onChange'];\n/** @internal */\nvar locCfgFns = ['port', 'protocol', 'host', 'baseHref', 'html5Mode', 'hashPrefix'];\n/** @internal */\nvar locationServiceStub = makeStub('LocationServices', locSvcFns);\n/** @internal */\nvar locationConfigStub = makeStub('LocationConfig', locCfgFns);\n/**\n * An instance of UI-Router.\n *\n * This object contains references to service APIs which define your application's routing behavior.\n */\nvar UIRouter = /** @class */ (function () {\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internal\n */\n function UIRouter(locationService, locationConfig) {\n if (locationService === void 0) { locationService = locationServiceStub; }\n if (locationConfig === void 0) { locationConfig = locationConfigStub; }\n this.locationService = locationService;\n this.locationConfig = locationConfig;\n /** @internal */ this.$id = _routerInstance++;\n /** @internal */ this._disposed = false;\n /** @internal */ this._disposables = [];\n /** Enable/disable tracing to the javascript console */\n this.trace = trace;\n /** Provides services related to ui-view synchronization */\n this.viewService = new ViewService(this);\n /** An object that contains global router state, such as the current state and params */\n this.globals = new UIRouterGlobals();\n /** A service that exposes global Transition Hooks */\n this.transitionService = new TransitionService(this);\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n this.urlMatcherFactory = new UrlMatcherFactory(this);\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n this.urlRouter = new UrlRouter(this);\n /** Provides services related to the URL */\n this.urlService = new UrlService(this);\n /** Provides a registry for states, and related registration services */\n this.stateRegistry = new StateRegistry(this);\n /** Provides services related to states */\n this.stateService = new StateService(this);\n /** @internal plugin instances are registered here */\n this._plugins = {};\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlService);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n /** Registers an object to be notified when the router is disposed */\n UIRouter.prototype.disposable = function (disposable) {\n this._disposables.push(disposable);\n };\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @internal\n * @param disposable (optional) the disposable to dispose\n */\n UIRouter.prototype.dispose = function (disposable) {\n var _this = this;\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n this._disposed = true;\n this._disposables.slice().forEach(function (d) {\n try {\n typeof d.dispose === 'function' && d.dispose(_this);\n removeFrom(_this._disposables, d);\n }\n catch (ignored) { }\n });\n };\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n UIRouter.prototype.plugin = function (plugin, options) {\n if (options === void 0) { options = {}; }\n var pluginInstance = new plugin(this, options);\n if (!pluginInstance.name)\n throw new Error('Required property `name` missing on plugin: ' + pluginInstance);\n this._disposables.push(pluginInstance);\n return (this._plugins[pluginInstance.name] = pluginInstance);\n };\n UIRouter.prototype.getPlugin = function (pluginName) {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n };\n return UIRouter;\n}());\nexport { UIRouter };\n//# sourceMappingURL=router.js.map","import { applyPairs, extend, identity, inherit, mapObj, noop, omit, tail, values, copy } from '../common/common';\nimport { isArray, isDefined, isFunction, isString } from '../common/predicates';\nimport { stringify } from '../common/strings';\nimport { is, pattern, pipe, prop, val } from '../common/hof';\nimport { Resolvable } from '../resolve/resolvable';\nimport { services } from '../common/coreservices';\nvar parseUrl = function (url) {\n if (!isString(url))\n return false;\n var root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root: root };\n};\nfunction nameBuilder(state) {\n return state.name;\n}\nfunction selfBuilder(state) {\n state.self.$$state = function () { return state; };\n return state.self;\n}\nfunction dataBuilder(state) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\nvar getUrlBuilder = function ($urlMatcherFactoryProvider, root) {\n return function urlBuilder(stateObject) {\n var stateDec = stateObject.self;\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n var newStateDec = {};\n copy(stateDec, newStateDec);\n newStateDec.url += '{remainder:any}'; // match any path (.*)\n stateDec = newStateDec;\n }\n var parent = stateObject.parent;\n var parsed = parseUrl(stateDec.url);\n var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { state: stateDec });\n if (!url)\n return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url))\n throw new Error(\"Invalid url '\" + url + \"' in state '\" + stateObject + \"'\");\n return parsed && parsed.root ? url : ((parent && parent.navigable) || root()).url.append(url);\n };\n};\nvar getNavigableBuilder = function (isRoot) {\n return function navigableBuilder(state) {\n return !isRoot(state) && state.url ? state : state.parent ? state.parent.navigable : null;\n };\n};\nvar getParamsBuilder = function (paramFactory) {\n return function paramsBuilder(state) {\n var makeConfigParam = function (config, id) { return paramFactory.fromConfig(id, null, state.self); };\n var urlParams = (state.url && state.url.parameters({ inherit: false })) || [];\n var nonUrlParams = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams\n .concat(nonUrlParams)\n .map(function (p) { return [p.id, p]; })\n .reduce(applyPairs, {});\n };\n};\nfunction pathBuilder(state) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\nfunction includesBuilder(state) {\n var includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state) {\n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n var objects2Tuples = function (resolveObj, resolvePolicies) {\n return Object.keys(resolveObj || {}).map(function (token) { return ({\n token: token,\n val: resolveObj[token],\n deps: undefined,\n policy: resolvePolicies[token],\n }); });\n };\n /** fetch DI annotations from a function or ng1-style array */\n var annotate = function (fn) {\n var $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || 'deferred';\n };\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); };\n /** true if the object looks like a provide literal, or a ng2 Provider */\n var isLikeNg2Provider = function (obj) {\n return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n };\n /** true if the object looks like a tuple from obj2Tuples */\n var isTupleFromObj = function (obj) {\n return !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n };\n /** extracts the token from a Provider or provide literal */\n var getToken = function (p) { return p.provide || p.token; };\n // prettier-ignore: Given a literal resolve or provider object, returns a Resolvable\n var literal2Resolvable = pattern([\n [prop('resolveFn'), function (p) { return new Resolvable(getToken(p), p.resolveFn, p.deps, p.policy); }],\n [prop('useFactory'), function (p) { return new Resolvable(getToken(p), p.useFactory, p.deps || p.dependencies, p.policy); }],\n [prop('useClass'), function (p) { return new Resolvable(getToken(p), function () { return new p.useClass(); }, [], p.policy); }],\n [prop('useValue'), function (p) { return new Resolvable(getToken(p), function () { return p.useValue; }, [], p.policy, p.useValue); }],\n [prop('useExisting'), function (p) { return new Resolvable(getToken(p), identity, [p.useExisting], p.policy); }],\n ]);\n // prettier-ignore\n var tuple2Resolvable = pattern([\n [pipe(prop('val'), isString), function (tuple) { return new Resolvable(tuple.token, identity, [tuple.val], tuple.policy); }],\n [pipe(prop('val'), isArray), function (tuple) { return new Resolvable(tuple.token, tail(tuple.val), tuple.val.slice(0, -1), tuple.policy); }],\n [pipe(prop('val'), isFunction), function (tuple) { return new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }],\n ]);\n // prettier-ignore\n var item2Resolvable = pattern([\n [is(Resolvable), function (r) { return r; }],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), function (obj) { throw new Error('Invalid resolve value: ' + stringify(obj)); },],\n ]);\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n var decl = state.resolve;\n var items = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n/**\n * A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nvar StateBuilder = /** @class */ (function () {\n function StateBuilder(matcher, urlMatcherFactory) {\n this.matcher = matcher;\n var self = this;\n var root = function () { return matcher.find(''); };\n var isRoot = function (state) { return state.name === ''; };\n function parentBuilder(state) {\n if (isRoot(state))\n return null;\n return matcher.find(self.parentName(state)) || root();\n }\n this.builders = {\n name: [nameBuilder],\n self: [selfBuilder],\n parent: [parentBuilder],\n data: [dataBuilder],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [getUrlBuilder(urlMatcherFactory, root)],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [getNavigableBuilder(isRoot)],\n params: [getParamsBuilder(urlMatcherFactory.paramFactory)],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [pathBuilder],\n // Speed up $state.includes() as it's used a lot\n includes: [includesBuilder],\n resolvables: [resolvablesBuilder],\n };\n }\n StateBuilder.prototype.builder = function (name, fn) {\n var builders = this.builders;\n var array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn))\n return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn))\n return;\n builders[name] = array;\n builders[name].push(fn);\n return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; };\n };\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n StateBuilder.prototype.build = function (state) {\n var _a = this, matcher = _a.matcher, builders = _a.builders;\n var parent = this.parentName(state);\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n for (var key in builders) {\n if (!builders.hasOwnProperty(key))\n continue;\n var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, noop);\n state[key] = chain(state);\n }\n return state;\n };\n StateBuilder.prototype.parentName = function (state) {\n // name = 'foo.bar.baz.**'\n var name = state.name || '';\n // segments = ['foo', 'bar', 'baz', '.**']\n var segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n var lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**')\n segments.pop();\n if (segments.length) {\n if (state.parent) {\n throw new Error(\"States that specify the 'parent:' property should not have a '.' in their name (\" + name + \")\");\n }\n // 'foo.bar'\n return segments.join('.');\n }\n if (!state.parent)\n return '';\n return isString(state.parent) ? state.parent : state.parent.name;\n };\n StateBuilder.prototype.name = function (state) {\n var name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent)\n return name;\n var parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + '.' + name : name;\n };\n return StateBuilder;\n}());\nexport { StateBuilder };\n//# sourceMappingURL=stateBuilder.js.map","import { isString } from '../common/predicates';\nimport { values } from '../common/common';\nimport { safeConsole } from '../common/safeConsole';\nvar StateMatcher = /** @class */ (function () {\n function StateMatcher(_states) {\n this._states = _states;\n }\n StateMatcher.prototype.isRelative = function (stateName) {\n stateName = stateName || '';\n return stateName.indexOf('.') === 0 || stateName.indexOf('^') === 0;\n };\n StateMatcher.prototype.find = function (stateOrName, base, matchGlob) {\n if (matchGlob === void 0) { matchGlob = true; }\n if (!stateOrName && stateOrName !== '')\n return undefined;\n var isStr = isString(stateOrName);\n var name = isStr ? stateOrName : stateOrName.name;\n if (this.isRelative(name))\n name = this.resolvePath(name, base);\n var state = this._states[name];\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n }\n else if (isStr && matchGlob) {\n var _states = values(this._states);\n var matches = _states.filter(function (_state) { return _state.__stateObjectCache.nameGlob && _state.__stateObjectCache.nameGlob.matches(name); });\n if (matches.length > 1) {\n safeConsole.error(\"stateMatcher.find: Found multiple matches for \" + name + \" using glob: \", matches.map(function (match) { return match.name; }));\n }\n return matches[0];\n }\n return undefined;\n };\n StateMatcher.prototype.resolvePath = function (name, base) {\n if (!base)\n throw new Error(\"No reference point given for path '\" + name + \"'\");\n var baseState = this.find(base);\n var splitName = name.split('.');\n var pathLength = splitName.length;\n var i = 0, current = baseState;\n for (; i < pathLength; i++) {\n if (splitName[i] === '' && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === '^') {\n if (!current.parent)\n throw new Error(\"Path '\" + name + \"' not valid for state '\" + baseState.name + \"'\");\n current = current.parent;\n continue;\n }\n break;\n }\n var relName = splitName.slice(i).join('.');\n return current.name + (current.name && relName ? '.' : '') + relName;\n };\n return StateMatcher;\n}());\nexport { StateMatcher };\n//# sourceMappingURL=stateMatcher.js.map","import { defaults, values, find, inherit } from '../common/common';\nimport { propEq } from '../common/hof';\nimport { Glob } from '../common/glob';\nimport { isObject, isFunction } from '../common/predicates';\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nvar StateObject = /** @class */ (function () {\n /** @deprecated use State.create() */\n function StateObject(config) {\n return StateObject.create(config || {});\n }\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n StateObject.create = function (stateDecl) {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n var state = inherit(inherit(stateDecl, StateObject.prototype));\n stateDecl.$$state = function () { return state; };\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name),\n };\n return state;\n };\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n StateObject.prototype.is = function (ref) {\n return this === ref || this.self === ref || this.fqn() === ref;\n };\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n StateObject.prototype.fqn = function () {\n if (!this.parent || !(this.parent instanceof this.constructor))\n return this.name;\n var name = this.parent.fqn();\n return name ? name + '.' + this.name : this.name;\n };\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n StateObject.prototype.root = function () {\n return (this.parent && this.parent.root()) || this;\n };\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n StateObject.prototype.parameters = function (opts) {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n var inherited = (opts.inherit && this.parent && this.parent.parameters()) || [];\n return inherited\n .concat(values(this.params))\n .filter(function (param) { return !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id); });\n };\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n StateObject.prototype.parameter = function (id, opts) {\n if (opts === void 0) { opts = {}; }\n return ((this.url && this.url.parameter(id, opts)) ||\n find(values(this.params), propEq('id', id)) ||\n (opts.inherit && this.parent && this.parent.parameter(id)));\n };\n StateObject.prototype.toString = function () {\n return this.fqn();\n };\n /** Predicate which returns true if the object is an class with @State() decorator */\n StateObject.isStateClass = function (stateDecl) {\n return isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n };\n /** Predicate which returns true if the object is a [[StateDeclaration]] object */\n StateObject.isStateDeclaration = function (obj) { return isFunction(obj['$$state']); };\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n StateObject.isState = function (obj) { return isObject(obj['__stateObjectCache']); };\n return StateObject;\n}());\nexport { StateObject };\n//# sourceMappingURL=stateObject.js.map","import { inArray, isString, prop } from '../common';\nimport { StateObject } from './stateObject';\nvar StateQueueManager = /** @class */ (function () {\n function StateQueueManager(router, states, builder, listeners) {\n this.router = router;\n this.states = states;\n this.builder = builder;\n this.listeners = listeners;\n this.queue = [];\n }\n StateQueueManager.prototype.dispose = function () {\n this.queue = [];\n };\n StateQueueManager.prototype.register = function (stateDecl) {\n var queue = this.queue;\n var state = StateObject.create(stateDecl);\n var name = state.name;\n if (!isString(name))\n throw new Error('State must have a valid name');\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(\"State '\" + name + \"' is already defined\");\n queue.push(state);\n this.flush();\n return state;\n };\n StateQueueManager.prototype.flush = function () {\n var _this = this;\n var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder;\n var registered = [], // states that got registered\n orphans = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n var getState = function (name) { return _this.states.hasOwnProperty(name) && _this.states[name]; };\n var notifyListeners = function () {\n if (registered.length) {\n _this.listeners.forEach(function (listener) {\n return listener('registered', registered.map(function (s) { return s.self; }));\n });\n }\n };\n while (queue.length > 0) {\n var state = queue.shift();\n var name_1 = state.name;\n var result = builder.build(state);\n var orphanIdx = orphans.indexOf(state);\n if (result) {\n var existingState = getState(name_1);\n if (existingState && existingState.name === name_1) {\n throw new Error(\"State '\" + name_1 + \"' is already defined\");\n }\n var existingFutureState = getState(name_1 + '.**');\n if (existingFutureState) {\n // Remove future state of the same name\n this.router.stateRegistry.deregister(existingFutureState);\n }\n states[name_1] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0)\n orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n var prev = previousQueueLength[name_1];\n previousQueueLength[name_1] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n notifyListeners();\n return states;\n }\n else if (orphanIdx < 0) {\n orphans.push(state);\n }\n queue.push(state);\n }\n notifyListeners();\n return states;\n };\n StateQueueManager.prototype.attachRoute = function (state) {\n if (state.abstract || !state.url)\n return;\n var rulesApi = this.router.urlService.rules;\n rulesApi.rule(rulesApi.urlRuleFactory.create(state));\n };\n return StateQueueManager;\n}());\nexport { StateQueueManager };\n//# sourceMappingURL=stateQueueManager.js.map","import { StateMatcher } from './stateMatcher';\nimport { StateBuilder } from './stateBuilder';\nimport { StateQueueManager } from './stateQueueManager';\nimport { removeFrom } from '../common/common';\nimport { propEq } from '../common/hof';\n/**\n * A registry for all of the application's [[StateDeclaration]]s\n *\n * This API is found at `router.stateRegistry` ([[UIRouter.stateRegistry]])\n */\nvar StateRegistry = /** @class */ (function () {\n /** @internal */\n function StateRegistry(router) {\n this.router = router;\n this.states = {};\n /** @internal */\n this.listeners = [];\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(router, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n /** @internal */\n StateRegistry.prototype._registerRoot = function () {\n var rootStateDef = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true },\n },\n abstract: true,\n };\n var _root = (this._root = this.stateQueue.register(rootStateDef));\n _root.navigable = null;\n };\n /** @internal */\n StateRegistry.prototype.dispose = function () {\n var _this = this;\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(function (state) { return _this.get(state) && _this.deregister(state); });\n };\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n StateRegistry.prototype.onStatesChanged = function (listener) {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n };\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n StateRegistry.prototype.root = function () {\n return this._root;\n };\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n StateRegistry.prototype.register = function (stateDefinition) {\n return this.stateQueue.register(stateDefinition);\n };\n /** @internal */\n StateRegistry.prototype._deregisterTree = function (state) {\n var _this = this;\n var all = this.get().map(function (s) { return s.$$state(); });\n var getChildren = function (states) {\n var _children = all.filter(function (s) { return states.indexOf(s.parent) !== -1; });\n return _children.length === 0 ? _children : _children.concat(getChildren(_children));\n };\n var children = getChildren([state]);\n var deregistered = [state].concat(children).reverse();\n deregistered.forEach(function (_state) {\n var rulesApi = _this.router.urlService.rules;\n // Remove URL rule\n rulesApi\n .rules()\n .filter(propEq('state', _state))\n .forEach(function (rule) { return rulesApi.removeRule(rule); });\n // Remove state from registry\n delete _this.states[_state.name];\n });\n return deregistered;\n };\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n StateRegistry.prototype.deregister = function (stateOrName) {\n var _state = this.get(stateOrName);\n if (!_state)\n throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n var deregisteredStates = this._deregisterTree(_state.$$state());\n this.listeners.forEach(function (listener) {\n return listener('deregistered', deregisteredStates.map(function (s) { return s.self; }));\n });\n return deregisteredStates;\n };\n StateRegistry.prototype.get = function (stateOrName, base) {\n var _this = this;\n if (arguments.length === 0)\n return Object.keys(this.states).map(function (name) { return _this.states[name].self; });\n var found = this.matcher.find(stateOrName, base);\n return (found && found.self) || null;\n };\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param property The name of the State property being registered for.\n * @param builderFunction The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n StateRegistry.prototype.decorator = function (property, builderFunction) {\n return this.builder.builder(property, builderFunction);\n };\n return StateRegistry;\n}());\nexport { StateRegistry };\n//# sourceMappingURL=stateRegistry.js.map","import { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection, } from '../common/common';\nimport { isDefined, isObject, isString } from '../common/predicates';\nimport { Queue } from '../common/queue';\nimport { services } from '../common/coreservices';\nimport { PathUtils } from '../path/pathUtils';\nimport { PathNode } from '../path/pathNode';\nimport { defaultTransOpts } from '../transition/transitionService';\nimport { Rejection, RejectType } from '../transition/rejectFactory';\nimport { TargetState } from './targetState';\nimport { Param } from '../params/param';\nimport { Glob } from '../common/glob';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { lazyLoadState } from '../hooks/lazyLoad';\nimport { not, val } from '../common/hof';\n/**\n * Provides services related to ui-router states.\n *\n * This API is located at `router.stateService` ([[UIRouter.stateService]])\n */\nvar StateService = /** @class */ (function () {\n /** @internal */\n function StateService(/** @internal */ router) {\n this.router = router;\n /** @internal */\n this.invalidCallbacks = [];\n /** @internal */\n this._defaultErrorHandler = function $defaultErrorHandler($error$) {\n if ($error$ instanceof Error && $error$.stack) {\n console.error($error$);\n console.error($error$.stack);\n }\n else if ($error$ instanceof Rejection) {\n console.error($error$.toString());\n if ($error$.detail && $error$.detail.stack)\n console.error($error$.detail.stack);\n }\n else {\n console.error($error$);\n }\n };\n var getters = ['current', '$current', 'params', 'transition'];\n var boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n Object.defineProperty(StateService.prototype, \"transition\", {\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get: function () {\n return this.router.globals.transition;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"params\", {\n /**\n * The latest successful state parameters\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get: function () {\n return this.router.globals.params;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"current\", {\n /**\n * The current [[StateDeclaration]]\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get: function () {\n return this.router.globals.current;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"$current\", {\n /**\n * The current [[StateObject]] (an internal API)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get: function () {\n return this.router.globals.$current;\n },\n enumerable: false,\n configurable: true\n });\n /** @internal */\n StateService.prototype.dispose = function () {\n this.defaultErrorHandler(noop);\n this.invalidCallbacks = [];\n };\n /**\n * Handler for when [[transitionTo]] is called with an invalid state.\n *\n * Invokes the [[onInvalid]] callbacks, in natural order.\n * Each callback's return value is checked in sequence until one of them returns an instance of TargetState.\n * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.\n *\n * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.\n *\n * @internal\n */\n StateService.prototype._handleInvalidTargetState = function (fromPath, toState) {\n var _this = this;\n var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n var globals = this.router.globals;\n var latestThing = function () { return globals.transitionHistory.peekTail(); };\n var latest = latestThing();\n var callbackQueue = new Queue(this.invalidCallbacks.slice());\n var injector = new ResolveContext(fromPath).injector();\n var checkForRedirect = function (result) {\n if (!(result instanceof TargetState)) {\n return;\n }\n var target = result;\n // Recreate the TargetState, in case the state is now defined.\n target = _this.target(target.identifier(), target.params(), target.options());\n if (!target.valid()) {\n return Rejection.invalid(target.error()).toPromise();\n }\n if (latestThing() !== latest) {\n return Rejection.superseded().toPromise();\n }\n return _this.transitionTo(target.identifier(), target.params(), target.options());\n };\n function invokeNextCallback() {\n var nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined)\n return Rejection.invalid(toState.error()).toPromise();\n var callbackResult = services.$q.when(nextCallback(toState, fromState, injector));\n return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); });\n }\n return invokeNextCallback();\n };\n /**\n * Registers an Invalid State handler\n *\n * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]]\n * has been called with an invalid state reference parameter\n *\n * Example:\n * ```js\n * stateService.onInvalid(function(to, from, injector) {\n * if (to.name() === 'foo') {\n * let lazyLoader = injector.get('LazyLoadService');\n * return lazyLoader.load('foo')\n * .then(() => stateService.target('foo'));\n * }\n * });\n * ```\n *\n * @param {function} callback invoked when the toState is invalid\n * This function receives the (invalid) toState, the fromState, and an injector.\n * The function may optionally return a [[TargetState]] or a Promise for a TargetState.\n * If one is returned, it is treated as a redirect.\n *\n * @returns a function which deregisters the callback\n */\n StateService.prototype.onInvalid = function (callback) {\n this.invalidCallbacks.push(callback);\n return function deregisterListener() {\n removeFrom(this.invalidCallbacks)(callback);\n }.bind(this);\n };\n /**\n * Reloads the current state\n *\n * A method that force reloads the current state, or a partial state hierarchy.\n * All resolves are re-resolved, and components reinstantiated.\n *\n * #### Example:\n * ```js\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * $state.reload();\n * }\n * });\n * ```\n *\n * Note: `reload()` is just an alias for:\n *\n * ```js\n * $state.transitionTo($state.current, $state.params, {\n * reload: true, inherit: false\n * });\n * ```\n *\n * @param reloadState A state name or a state object.\n * If present, this state and all its children will be reloaded, but ancestors will not reload.\n *\n * #### Example:\n * ```js\n * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item'\n * //and current state is 'contacts.detail.item'\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * //will reload 'contact.detail' and nested 'contact.detail.item' states\n * $state.reload('contact.detail');\n * }\n * });\n * ```\n *\n * @returns A promise representing the state of the new transition. See [[StateService.go]]\n */\n StateService.prototype.reload = function (reloadState) {\n return this.transitionTo(this.current, this.params, {\n reload: isDefined(reloadState) ? reloadState : true,\n inherit: false,\n notify: false,\n });\n };\n /**\n * Transition to a different state and/or parameters\n *\n * Convenience method for transitioning to a new state.\n *\n * `$state.go` calls `$state.transitionTo` internally but automatically sets options to\n * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`.\n * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`).\n * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters\n * inherit from the current parameter values (because of `inherit: true`).\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.go('contact.detail');\n * };\n * });\n * ```\n *\n * @param to Absolute state name, state object, or relative state path (relative to current state).\n *\n * Some examples:\n *\n * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n * - `$state.go('^')` - will go to the parent state\n * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state\n * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state\n *\n * @param params A map of the parameters that will be sent to the state, will populate $stateParams.\n *\n * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`).\n * This allows, for example, going to a sibling state that shares parameters defined by a parent state.\n *\n * @param options Transition options\n *\n * @returns {promise} A promise representing the state of the new transition.\n */\n StateService.prototype.go = function (to, params, options) {\n var defautGoOpts = { relative: this.$current, inherit: true };\n var transOpts = defaults(options, defautGoOpts, defaultTransOpts);\n return this.transitionTo(to, params, transOpts);\n };\n /**\n * Creates a [[TargetState]]\n *\n * This is a factory method for creating a TargetState\n *\n * This may be returned from a Transition Hook to redirect a transition, for example.\n */\n StateService.prototype.target = function (identifier, params, options) {\n if (options === void 0) { options = {}; }\n // If we're reloading, find the state object to reload from\n if (isObject(options.reload) && !options.reload.name)\n throw new Error('Invalid reload state object');\n var reg = this.router.stateRegistry;\n options.reloadState =\n options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative);\n if (options.reload && !options.reloadState)\n throw new Error(\"No such reload state '\" + (isString(options.reload) ? options.reload : options.reload.name) + \"'\");\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n /** @internal */\n StateService.prototype.getCurrentPath = function () {\n var _this = this;\n var globals = this.router.globals;\n var latestSuccess = globals.successfulTransitions.peekTail();\n var rootPath = function () { return [new PathNode(_this.router.stateRegistry.root())]; };\n return latestSuccess ? latestSuccess.treeChanges().to : rootPath();\n };\n /**\n * Low-level method for transitioning to a new state.\n *\n * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations.\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.transitionTo('contact.detail');\n * };\n * });\n * ```\n *\n * @param to State name or state object.\n * @param toParams A map of the parameters that will be sent to the state,\n * will populate $stateParams.\n * @param options Transition options\n *\n * @returns A promise representing the state of the new transition. See [[go]]\n */\n StateService.prototype.transitionTo = function (to, toParams, options) {\n var _this = this;\n if (toParams === void 0) { toParams = {}; }\n if (options === void 0) { options = {}; }\n var router = this.router;\n var globals = router.globals;\n options = defaults(options, defaultTransOpts);\n var getCurrent = function () { return globals.transition; };\n options = extend(options, { current: getCurrent });\n var ref = this.target(to, toParams, options);\n var currentPath = this.getCurrentPath();\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n if (!ref.valid())\n return silentRejection(ref.error());\n if (options.supercede === false && getCurrent()) {\n return (Rejection.ignored('Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.').toPromise());\n }\n /**\n * Special handling for Ignored, Aborted, and Redirected transitions\n *\n * The semantics for the transition.run() promise and the StateService.transitionTo()\n * promise differ. For instance, the run() promise may be rejected because it was\n * IGNORED, but the transitionTo() promise is resolved because from the user perspective\n * no error occurred. Likewise, the transition.run() promise may be rejected because of\n * a Redirect, but the transitionTo() promise is chained to the new Transition's promise.\n */\n var rejectedTransitionHandler = function (trans) { return function (error) {\n if (error instanceof Rejection) {\n var isLatest = router.globals.lastStartedTransitionId <= trans.$id;\n if (error.type === RejectType.IGNORED) {\n isLatest && router.urlRouter.update();\n // Consider ignored `Transition.run()` as a successful `transitionTo`\n return services.$q.when(globals.current);\n }\n var detail = error.detail;\n if (error.type === RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) {\n // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully\n // by returning the promise for the new (redirect) `Transition.run()`.\n var redirect = trans.redirect(detail);\n return redirect.run().catch(rejectedTransitionHandler(redirect));\n }\n if (error.type === RejectType.ABORTED) {\n isLatest && router.urlRouter.update();\n return services.$q.reject(error);\n }\n }\n var errorHandler = _this.defaultErrorHandler();\n errorHandler(error);\n return services.$q.reject(error);\n }; };\n var transition = this.router.transitionService.create(currentPath, ref);\n var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition));\n silenceUncaughtInPromise(transitionToPromise); // issue #2676\n // Return a promise for the transition, which also has the transition object on it.\n return extend(transitionToPromise, { transition: transition });\n };\n /**\n * Checks if the current state *is* the provided state\n *\n * Similar to [[includes]] but only checks for the full state name.\n * If params is supplied then it will be tested for strict equality against the current\n * active params object, so all params must match with none missing and no extras.\n *\n * #### Example:\n * ```js\n * $state.$current.name = 'contacts.details.item';\n *\n * // absolute name\n * $state.is('contact.details.item'); // returns true\n * $state.is(contactDetailItemStateObject); // returns true\n * ```\n *\n * // relative name (. and ^), typically from a template\n * // E.g. from the 'contacts.details' template\n * ```html\n * <div ng-class=\"{highlighted: $state.is('.item')}\">Item</div>\n * ```\n *\n * @param stateOrName The state name (absolute or relative) or state object you'd like to check.\n * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like\n * to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns Returns true if it is the state.\n */\n StateService.prototype.is = function (stateOrName, params, options) {\n options = defaults(options, { relative: this.$current });\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state))\n return undefined;\n if (this.$current !== state)\n return false;\n if (!params)\n return true;\n var schema = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\n /**\n * Checks if the current state *includes* the provided state\n *\n * A method to determine if the current active state is equal to or is the child of the\n * state stateName. If any params are passed then they will be tested for a match as well.\n * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n *\n * #### Example when `$state.$current.name === 'contacts.details.item'`\n * ```js\n * // Using partial names\n * $state.includes(\"contacts\"); // returns true\n * $state.includes(\"contacts.details\"); // returns true\n * $state.includes(\"contacts.details.item\"); // returns true\n * $state.includes(\"contacts.list\"); // returns false\n * $state.includes(\"about\"); // returns false\n * ```\n *\n * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`:\n * ```js\n * $state.includes(\"*.details.*.*\"); // returns true\n * $state.includes(\"*.details.**\"); // returns true\n * $state.includes(\"**.item.**\"); // returns true\n * $state.includes(\"*.details.item.url\"); // returns true\n * $state.includes(\"*.details.*.url\"); // returns true\n * $state.includes(\"*.details.*\"); // returns false\n * $state.includes(\"item.**\"); // returns false\n * ```\n *\n * @param stateOrName A partial name, relative name, glob pattern,\n * or state object to be searched for within the current state name.\n * @param params A param object, e.g. `{sectionId: section.id}`,\n * that you'd like to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns {boolean} Returns true if it does include the state\n */\n StateService.prototype.includes = function (stateOrName, params, options) {\n options = defaults(options, { relative: this.$current });\n var glob = isString(stateOrName) && Glob.fromString(stateOrName);\n if (glob) {\n if (!glob.matches(this.$current.name))\n return false;\n stateOrName = this.$current.name;\n }\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes;\n if (!isDefined(state))\n return undefined;\n if (!isDefined(include[state.name]))\n return false;\n if (!params)\n return true;\n var schema = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\n /**\n * Generates a URL for a state and parameters\n *\n * Returns the url for the given state populated with the given params.\n *\n * #### Example:\n * ```js\n * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n * ```\n *\n * @param stateOrName The state name or state object you'd like to generate a url from.\n * @param params An object of parameter values to fill the state's required parameters.\n * @param options Options object. The options are:\n *\n * @returns {string} compiled state url\n */\n StateService.prototype.href = function (stateOrName, params, options) {\n var defaultHrefOpts = {\n lossy: true,\n inherit: true,\n absolute: false,\n relative: this.$current,\n };\n options = defaults(options, defaultHrefOpts);\n params = params || {};\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state))\n return null;\n if (options.inherit)\n params = this.params.$inherit(params, this.$current, state);\n var nav = state && options.lossy ? state.navigable : state;\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, { absolute: options.absolute });\n };\n /**\n * Sets or gets the default [[transitionTo]] error handler.\n *\n * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition.\n * This includes errors caused by resolves and transition hooks.\n *\n * Note:\n * This handler does not receive certain Transition rejections.\n * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]].\n *\n * The built-in default error handler logs the error to the console.\n *\n * You can provide your own custom handler.\n *\n * #### Example:\n * ```js\n * stateService.defaultErrorHandler(function() {\n * // Do not log transitionTo errors\n * });\n * ```\n *\n * @param handler a global error handler function\n * @returns the current global error handler\n */\n StateService.prototype.defaultErrorHandler = function (handler) {\n return (this._defaultErrorHandler = handler || this._defaultErrorHandler);\n };\n StateService.prototype.get = function (stateOrName, base) {\n var reg = this.router.stateRegistry;\n if (arguments.length === 0)\n return reg.get();\n return reg.get(stateOrName, base || this.$current);\n };\n /**\n * Lazy loads a state\n *\n * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function.\n *\n * @param stateOrName the state that should be lazy loaded\n * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc)\n * Note: If no transition is provided, a noop transition is created using the from the current state to the current state.\n * This noop transition is not actually run.\n *\n * @returns a promise to lazy load\n */\n StateService.prototype.lazyLoad = function (stateOrName, transition) {\n var state = this.get(stateOrName);\n if (!state || !state.lazyLoad)\n throw new Error('Can not lazy load ' + stateOrName);\n var currentPath = this.getCurrentPath();\n var target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath);\n transition = transition || this.router.transitionService.create(currentPath, target);\n return lazyLoadState(transition, state);\n };\n return StateService;\n}());\nexport { StateService };\n//# sourceMappingURL=stateService.js.map","import { isObject, isString } from '../common/predicates';\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nvar TargetState = /** @class */ (function () {\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internal\n */\n function TargetState(_stateRegistry, _identifier, _params, _options) {\n this._stateRegistry = _stateRegistry;\n this._identifier = _identifier;\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n /** The name of the state this object targets */\n TargetState.prototype.name = function () {\n return (this._definition && this._definition.name) || this._identifier;\n };\n /** The identifier used when creating this TargetState */\n TargetState.prototype.identifier = function () {\n return this._identifier;\n };\n /** The target parameter values */\n TargetState.prototype.params = function () {\n return this._params;\n };\n /** The internal state object (if it was found) */\n TargetState.prototype.$state = function () {\n return this._definition;\n };\n /** The internal state declaration (if it was found) */\n TargetState.prototype.state = function () {\n return this._definition && this._definition.self;\n };\n /** The target options */\n TargetState.prototype.options = function () {\n return this._options;\n };\n /** True if the target state was found */\n TargetState.prototype.exists = function () {\n return !!(this._definition && this._definition.self);\n };\n /** True if the object is valid */\n TargetState.prototype.valid = function () {\n return !this.error();\n };\n /** If the object is invalid, returns the reason why */\n TargetState.prototype.error = function () {\n var base = this.options().relative;\n if (!this._definition && !!base) {\n var stateName = base.name ? base.name : base;\n return \"Could not resolve '\" + this.name() + \"' from state '\" + stateName + \"'\";\n }\n if (!this._definition)\n return \"No such state '\" + this.name() + \"'\";\n if (!this._definition.self)\n return \"State '\" + this.name() + \"' has an invalid definition\";\n };\n TargetState.prototype.toString = function () {\n return \"'\" + this.name() + \"'\" + stringify(this.params());\n };\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n TargetState.prototype.withState = function (state) {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n };\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n TargetState.prototype.withParams = function (params, replace) {\n if (replace === void 0) { replace = false; }\n var newParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n };\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n TargetState.prototype.withOptions = function (options, replace) {\n if (replace === void 0) { replace = false; }\n var newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n };\n /** Returns true if the object has a state property that might be a state or state name */\n TargetState.isDef = function (obj) {\n return obj && obj.state && (isString(obj.state) || (isObject(obj.state) && isString(obj.state.name)));\n };\n return TargetState;\n}());\nexport { TargetState };\n//# sourceMappingURL=targetState.js.map","import { extend, assertPredicate, unnestR, identity } from '../common/common';\nimport { isArray } from '../common/predicates';\nimport { TransitionHookPhase, TransitionHookScope, } from './interface';\nimport { TransitionHook } from './transitionHook';\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n */\nvar HookBuilder = /** @class */ (function () {\n function HookBuilder(transition) {\n this.transition = transition;\n }\n HookBuilder.prototype.buildHooksForPhase = function (phase) {\n var _this = this;\n var $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi\n ._getEvents(phase)\n .map(function (type) { return _this.buildHooks(type); })\n .reduce(unnestR, [])\n .filter(identity);\n };\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n HookBuilder.prototype.buildHooks = function (hookType) {\n var transition = this.transition;\n var treeChanges = transition.treeChanges();\n // Find all the matching registered hooks for a given hook type\n var matchingHooks = this.getMatchingHooks(hookType, treeChanges, transition);\n if (!matchingHooks)\n return [];\n var baseHookOptions = {\n transition: transition,\n current: transition.options().current,\n };\n var makeTransitionHooks = function (hook) {\n // Fetch the Nodes that caused this hook to match.\n var matches = hook.matches(treeChanges, transition);\n // Select the PathNode[] that will be used as TransitionHook context objects\n var matchingNodes = matches[hookType.criteriaMatchPath.name];\n // Return an array of HookTuples\n return matchingNodes.map(function (node) {\n var _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node },\n }, baseHookOptions);\n var state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n var transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook: hook, node: node, transitionHook: transitionHook };\n });\n };\n return matchingHooks\n .map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(function (tuple) { return tuple.transitionHook; });\n };\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n HookBuilder.prototype.getMatchingHooks = function (hookType, treeChanges, transition) {\n var isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n // Instance and Global hook registries\n var $transitions = this.transition.router.transitionService;\n var registries = isCreate ? [$transitions] : [this.transition, $transitions];\n return registries\n .map(function (reg) { return reg.getHooks(hookType.name); }) // Get named hooks from registries\n .filter(assertPredicate(isArray, \"broken event named: \" + hookType.name)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(function (hook) { return hook.matches(treeChanges, transition); }); // Only those satisfying matchCriteria\n };\n return HookBuilder;\n}());\nexport { HookBuilder };\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort) {\n if (reverseDepthSort === void 0) { reverseDepthSort = false; }\n return function nodeDepthThenPriority(l, r) {\n var factor = reverseDepthSort ? -1 : 1;\n var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n };\n}\n//# sourceMappingURL=hookBuilder.js.map","import { isString, isFunction, Glob, extend, removeFrom, tail, values, identity, mapObj } from '../common';\nimport { // has or is using\nTransitionHookScope, } from './interface';\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @internal\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state, criterion, transition) {\n var toMatch = isString(criterion) ? [criterion] : criterion;\n function matchGlobs(_state) {\n var globStrings = toMatch;\n for (var i = 0; i < globStrings.length; i++) {\n var glob = new Glob(globStrings[i]);\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n var matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state, transition);\n}\n/**\n * The registration data for a registered transition hook\n */\nvar RegisteredHook = /** @class */ (function () {\n function RegisteredHook(tranSvc, eventType, callback, matchCriteria, removeHookFromRegistry, options) {\n if (options === void 0) { options = {}; }\n this.tranSvc = tranSvc;\n this.eventType = eventType;\n this.callback = callback;\n this.matchCriteria = matchCriteria;\n this.removeHookFromRegistry = removeHookFromRegistry;\n this.invokeCount = 0;\n this._deregistered = false;\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n RegisteredHook.prototype._matchingNodes = function (nodes, criterion, transition) {\n if (criterion === true)\n return nodes;\n var matching = nodes.filter(function (node) { return matchState(node.state, criterion, transition); });\n return matching.length ? matching : null;\n };\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n RegisteredHook.prototype._getDefaultMatchCriteria = function () {\n return mapObj(this.tranSvc._pluginapi._getPathTypes(), function () { return true; });\n };\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n RegisteredHook.prototype._getMatchingNodes = function (treeChanges, transition) {\n var _this = this;\n var criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n var paths = values(this.tranSvc._pluginapi._getPathTypes());\n return paths.reduce(function (mn, pathtype) {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n var isStateHook = pathtype.scope === TransitionHookScope.STATE;\n var path = treeChanges[pathtype.name] || [];\n var nodes = isStateHook ? path : [tail(path)];\n mn[pathtype.name] = _this._matchingNodes(nodes, criteria[pathtype.name], transition);\n return mn;\n }, {});\n };\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n RegisteredHook.prototype.matches = function (treeChanges, transition) {\n var matches = this._getMatchingNodes(treeChanges, transition);\n // Check if all the criteria matched the TreeChanges object\n var allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n };\n RegisteredHook.prototype.deregister = function () {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n };\n return RegisteredHook;\n}());\nexport { RegisteredHook };\n/** Return a registration function of the requested type. */\nexport function makeEvent(registry, transitionService, eventType) {\n // Create the object which holds the registered transition hooks.\n var _registeredHooks = (registry._registeredHooks = registry._registeredHooks || {});\n var hooks = (_registeredHooks[eventType.name] = []);\n var removeHookFn = removeFrom(hooks);\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n function hookRegistrationFn(matchObject, callback, options) {\n if (options === void 0) { options = {}; }\n var registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n return hookRegistrationFn;\n}\n//# sourceMappingURL=hookRegistry.js.map","var TransitionHookPhase;\n(function (TransitionHookPhase) {\n TransitionHookPhase[TransitionHookPhase[\"CREATE\"] = 0] = \"CREATE\";\n TransitionHookPhase[TransitionHookPhase[\"BEFORE\"] = 1] = \"BEFORE\";\n TransitionHookPhase[TransitionHookPhase[\"RUN\"] = 2] = \"RUN\";\n TransitionHookPhase[TransitionHookPhase[\"SUCCESS\"] = 3] = \"SUCCESS\";\n TransitionHookPhase[TransitionHookPhase[\"ERROR\"] = 4] = \"ERROR\";\n})(TransitionHookPhase || (TransitionHookPhase = {}));\nvar TransitionHookScope;\n(function (TransitionHookScope) {\n TransitionHookScope[TransitionHookScope[\"TRANSITION\"] = 0] = \"TRANSITION\";\n TransitionHookScope[TransitionHookScope[\"STATE\"] = 1] = \"STATE\";\n})(TransitionHookScope || (TransitionHookScope = {}));\nexport { TransitionHookPhase, TransitionHookScope };\n//# sourceMappingURL=interface.js.map","'use strict';\nimport { extend, silentRejection } from '../common/common';\nimport { stringify } from '../common/strings';\nimport { is } from '../common/hof';\n/** An enum for Transition Rejection reasons */\nvar RejectType;\n(function (RejectType) {\n /**\n * A new transition superseded this one.\n *\n * While this transition was running, a new transition started.\n * This transition is cancelled because it was superseded by new transition.\n */\n RejectType[RejectType[\"SUPERSEDED\"] = 2] = \"SUPERSEDED\";\n /**\n * The transition was aborted\n *\n * The transition was aborted by a hook which returned `false`\n */\n RejectType[RejectType[\"ABORTED\"] = 3] = \"ABORTED\";\n /**\n * The transition was invalid\n *\n * The transition was never started because it was invalid\n */\n RejectType[RejectType[\"INVALID\"] = 4] = \"INVALID\";\n /**\n * The transition was ignored\n *\n * The transition was ignored because it would have no effect.\n *\n * Either:\n *\n * - The transition is targeting the current state and parameter values\n * - The transition is targeting the same state and parameter values as the currently running transition.\n */\n RejectType[RejectType[\"IGNORED\"] = 5] = \"IGNORED\";\n /**\n * The transition errored.\n *\n * This generally means a hook threw an error or returned a rejected promise\n */\n RejectType[RejectType[\"ERROR\"] = 6] = \"ERROR\";\n})(RejectType || (RejectType = {}));\nexport { RejectType };\n/** @internal */\nvar id = 0;\nvar Rejection = /** @class */ (function () {\n function Rejection(type, message, detail) {\n /** @internal */\n this.$id = id++;\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n Rejection.isRejectionPromise = function (obj) {\n return obj && typeof obj.then === 'function' && is(Rejection)(obj._transitionRejection);\n };\n /** Returns a Rejection due to transition superseded */\n Rejection.superseded = function (detail, options) {\n var message = 'The transition has been superseded by a different transition';\n var rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n };\n /** Returns a Rejection due to redirected transition */\n Rejection.redirected = function (detail) {\n return Rejection.superseded(detail, { redirected: true });\n };\n /** Returns a Rejection due to invalid transition */\n Rejection.invalid = function (detail) {\n var message = 'This transition is invalid';\n return new Rejection(RejectType.INVALID, message, detail);\n };\n /** Returns a Rejection due to ignored transition */\n Rejection.ignored = function (detail) {\n var message = 'The transition was ignored';\n return new Rejection(RejectType.IGNORED, message, detail);\n };\n /** Returns a Rejection due to aborted transition */\n Rejection.aborted = function (detail) {\n var message = 'The transition has been aborted';\n return new Rejection(RejectType.ABORTED, message, detail);\n };\n /** Returns a Rejection due to aborted transition */\n Rejection.errored = function (detail) {\n var message = 'The transition errored';\n return new Rejection(RejectType.ERROR, message, detail);\n };\n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n Rejection.normalize = function (detail) {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n };\n Rejection.prototype.toString = function () {\n var detailString = function (d) { return (d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d)); };\n var detail = detailString(this.detail);\n var _a = this, $id = _a.$id, type = _a.type, message = _a.message;\n return \"Transition Rejection($id: \" + $id + \" type: \" + type + \", message: \" + message + \", detail: \" + detail + \")\";\n };\n Rejection.prototype.toPromise = function () {\n return extend(silentRejection(this), { _transitionRejection: this });\n };\n return Rejection;\n}());\nexport { Rejection };\n//# sourceMappingURL=rejectFactory.js.map","import { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport { isObject, isUndefined } from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { TransitionHookPhase, } from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathUtils } from '../path/pathUtils';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { Rejection } from './rejectFactory';\nimport { flattenR, uniqR } from '../common';\n/** @internal */\nvar stateSelf = prop('self');\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nvar Transition = /** @class */ (function () {\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internal\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n * @internal\n */\n function Transition(fromPath, targetState, router) {\n var _this = this;\n /** @internal */\n this._deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n this.promise = this._deferred.promise;\n /** @internal Holds the hook registration functions such as those passed to Transition.onStart() */\n this._registeredHooks = {};\n /** @internal */\n this._hookBuilder = new HookBuilder(this);\n /** Checks if this transition is currently active/running. */\n this.isActive = function () { return _this.router.globals.transition === _this; };\n this.router = router;\n this._targetState = targetState;\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n var toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n var onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, function () { return null; });\n this.applyViewConfigs(router);\n }\n /** @internal */\n Transition.prototype.onBefore = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onStart = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onExit = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onRetain = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onEnter = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onFinish = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onSuccess = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n Transition.prototype.onError = function (criteria, callback, options) {\n return;\n };\n /** @internal\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n Transition.prototype.createTransitionHookRegFns = function () {\n var _this = this;\n this.router.transitionService._pluginapi\n ._getEvents()\n .filter(function (type) { return type.hookPhase !== TransitionHookPhase.CREATE; })\n .forEach(function (type) { return makeEvent(_this, _this.router.transitionService, type); });\n };\n /** @internal */\n Transition.prototype.getHooks = function (hookName) {\n return this._registeredHooks[hookName];\n };\n Transition.prototype.applyViewConfigs = function (router) {\n var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; });\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n };\n /**\n * @internal\n * @returns the internal from [State] object\n */\n Transition.prototype.$from = function () {\n return tail(this._treeChanges.from).state;\n };\n /**\n * @internal\n * @returns the internal to [State] object\n */\n Transition.prototype.$to = function () {\n return tail(this._treeChanges.to).state;\n };\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n Transition.prototype.from = function () {\n return this.$from().self;\n };\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n Transition.prototype.to = function () {\n return this.$to().self;\n };\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n Transition.prototype.targetState = function () {\n return this._targetState;\n };\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n Transition.prototype.is = function (compare) {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !((compare.to && !matchState(this.$to(), compare.to, this)) ||\n (compare.from && !matchState(this.$from(), compare.from, this)));\n };\n Transition.prototype.params = function (pathname) {\n if (pathname === void 0) { pathname = 'to'; }\n return Object.freeze(this._treeChanges[pathname].map(prop('paramValues')).reduce(mergeR, {}));\n };\n Transition.prototype.paramsChanged = function () {\n var fromParams = this.params('from');\n var toParams = this.params('to');\n // All the parameters declared on both the \"to\" and \"from\" paths\n var allParamDescriptors = []\n .concat(this._treeChanges.to)\n .concat(this._treeChanges.from)\n .map(function (pathNode) { return pathNode.paramSchema; })\n .reduce(flattenR, [])\n .reduce(uniqR, []);\n var changedParamDescriptors = Param.changed(allParamDescriptors, fromParams, toParams);\n return changedParamDescriptors.reduce(function (changedValues, descriptor) {\n changedValues[descriptor.id] = toParams[descriptor.id];\n return changedValues;\n }, {});\n };\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `myResolve` resolve\n * // even though `foo.bar` also has a `myResolve` resolve\n * var fooData = trans.injector('foo').get('myResolve');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `myResolve` from the state being exited\n * var fooData = trans.injector(null, 'from').get('myResolve');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n Transition.prototype.injector = function (state, pathName) {\n if (pathName === void 0) { pathName = 'to'; }\n var path = this._treeChanges[pathName];\n if (state)\n path = PathUtils.subPath(path, function (node) { return node.state === state || node.state.name === state; });\n return new ResolveContext(path).injector();\n };\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n Transition.prototype.getResolveTokens = function (pathname) {\n if (pathname === void 0) { pathname = 'to'; }\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n };\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * Allows a transition hook to dynamically add a Resolvable to this Transition.\n *\n * Use the [[Transition.injector]] to retrieve the resolved data in subsequent hooks ([[UIInjector.get]]).\n *\n * If a `state` argument is provided, the Resolvable is processed when that state is being entered.\n * If no `state` is provided then the root state is used.\n * If the given `state` has already been entered, the Resolvable is processed when any child state is entered.\n * If no child states will be entered, the Resolvable is processed during the `onFinish` phase of the Transition.\n *\n * The `state` argument also scopes the resolved data.\n * The resolved data is available from the injector for that `state` and any children states.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n Transition.prototype.addResolvable = function (resolvable, state) {\n if (state === void 0) { state = ''; }\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n var stateName = typeof state === 'string' ? state : state.name;\n var topath = this._treeChanges.to;\n var targetNode = find(topath, function (node) { return node.state.name === stateName; });\n var resolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable], targetNode.state);\n };\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n Transition.prototype.redirectedFrom = function () {\n return this._options.redirectedFrom || null;\n };\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n Transition.prototype.originalTransition = function () {\n var rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n };\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n Transition.prototype.options = function () {\n return this._options;\n };\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n Transition.prototype.entering = function () {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n };\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n Transition.prototype.exiting = function () {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n };\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n Transition.prototype.retained = function () {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n };\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n Transition.prototype.views = function (pathname, state) {\n if (pathname === void 0) { pathname = 'entering'; }\n var path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop('views')).filter(identity).reduce(unnestR, []);\n };\n Transition.prototype.treeChanges = function (pathname) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n };\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internal\n *\n * @returns Returns a new [[Transition]] instance.\n */\n Transition.prototype.redirect = function (targetState) {\n var redirects = 1, trans = this;\n // tslint:disable-next-line:no-conditional-assignment\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20)\n throw new Error(\"Too many consecutive Transition redirects (20+)\");\n }\n var redirectOpts = { redirectedFrom: this, source: 'redirect' };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n var newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n var originalEnteringNodes = this._treeChanges.entering;\n var redirectEnteringNodes = newTransition._treeChanges.entering;\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n var nodeIsReloading = function (reloadState) { return function (node) {\n return reloadState && node.state.includes[reloadState.name];\n }; };\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n var matchingEnteringNodes = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams).filter(not(nodeIsReloading(targetState.options().reloadState)));\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach(function (node, idx) {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n return newTransition;\n };\n /** @internal If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n Transition.prototype._changedParams = function () {\n var tc = this._treeChanges;\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload)\n return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length)\n return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length)\n return undefined;\n // If the to/from paths are different\n var pathsDiffer = arrayTuples(tc.to, tc.from)\n .map(function (tuple) { return tuple[0].state !== tuple[1].state; })\n .reduce(anyTrueR, false);\n if (pathsDiffer)\n return undefined;\n // Find any parameter values that differ\n var nodeSchemas = tc.to.map(function (node) { return node.paramSchema; });\n var _a = [tc.to, tc.from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _a[0], fromValues = _a[1];\n var tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n return tuples.map(function (_a) {\n var schema = _a[0], toVals = _a[1], fromVals = _a[2];\n return Param.changed(schema, toVals, fromVals);\n }).reduce(unnestR, []);\n };\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n Transition.prototype.dynamic = function () {\n var changes = this._changedParams();\n return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(anyTrueR, false);\n };\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n Transition.prototype.ignored = function () {\n return !!this._ignoredReason();\n };\n /** @internal */\n Transition.prototype._ignoredReason = function () {\n var pending = this.router.globals.transition;\n var reloadState = this._options.reloadState;\n var same = function (pathA, pathB) {\n if (pathA.length !== pathB.length)\n return false;\n var matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(function (node) { return !reloadState || !node.state.includes[reloadState.name]; }).length;\n };\n var newTC = this.treeChanges();\n var pendTC = pending && pending.treeChanges();\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting))\n return 'SameAsPending';\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to))\n return 'SameAsCurrent';\n };\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internal\n *\n * @returns a promise for a successful transition.\n */\n Transition.prototype.run = function () {\n var _this = this;\n var runAllHooks = TransitionHook.runAllHooks;\n // Gets transition hooks array for the given phase\n var getHooksFor = function (phase) { return _this._hookBuilder.buildHooksForPhase(phase); };\n // When the chain is complete, then resolve or reject the deferred\n var transitionSuccess = function () {\n trace.traceSuccess(_this.$to(), _this);\n _this.success = true;\n _this._deferred.resolve(_this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n var transitionError = function (reason) {\n trace.traceError(reason, _this);\n _this.success = false;\n _this._deferred.reject(reason);\n _this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n var runTransition = function () {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n var allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n var done = function () { return services.$q.when(undefined); };\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n var startTransition = function () {\n var globals = _this.router.globals;\n globals.lastStartedTransitionId = _this.$id;\n globals.transition = _this;\n globals.transitionHistory.enqueue(_this);\n trace.traceTransitionStart(_this);\n return services.$q.when(undefined);\n };\n var allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n return this.promise;\n };\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n Transition.prototype.valid = function () {\n return !this.error() || this.success !== undefined;\n };\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n Transition.prototype.abort = function () {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n };\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns a transition rejection explaining why the transition is invalid, or the reason the transition failed.\n */\n Transition.prototype.error = function () {\n var state = this.$to();\n if (state.self.abstract) {\n return Rejection.invalid(\"Cannot transition to abstract state '\" + state.name + \"'\");\n }\n var paramDefs = state.parameters();\n var values = this.params();\n var invalidParams = paramDefs.filter(function (param) { return !param.validates(values[param.id]); });\n if (invalidParams.length) {\n var invalidValues = invalidParams.map(function (param) { return \"[\" + param.id + \":\" + stringify(values[param.id]) + \"]\"; }).join(', ');\n var detail = \"The following parameter values are not valid for state '\" + state.name + \"': \" + invalidValues;\n return Rejection.invalid(detail);\n }\n if (this.success === false)\n return this._error;\n };\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n Transition.prototype.toString = function () {\n var fromStateOrName = this.from();\n var toStateOrName = this.to();\n var avoidEmptyHash = function (params) {\n return params['#'] !== null && params['#'] !== undefined ? params : omit(params, ['#']);\n };\n // (X) means the to state is invalid.\n var id = this.$id, from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))), toValid = this.valid() ? '' : '(X) ', to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = stringify(avoidEmptyHash(this.params()));\n return \"Transition#\" + id + \"( '\" + from + \"'\" + fromParams + \" -> \" + toValid + \"'\" + to + \"'\" + toParams + \" )\";\n };\n /** @internal */\n Transition.diToken = Transition;\n return Transition;\n}());\nexport { Transition };\n//# sourceMappingURL=transition.js.map","import { TransitionHook } from './transitionHook';\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n */\nvar TransitionEventType = /** @class */ (function () {\n /* tslint:disable:no-inferrable-types */\n function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) {\n if (reverseSort === void 0) { reverseSort = false; }\n if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; }\n if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; }\n if (synchronous === void 0) { synchronous = false; }\n this.name = name;\n this.hookPhase = hookPhase;\n this.hookOrder = hookOrder;\n this.criteriaMatchPath = criteriaMatchPath;\n this.reverseSort = reverseSort;\n this.getResultHandler = getResultHandler;\n this.getErrorHandler = getErrorHandler;\n this.synchronous = synchronous;\n }\n return TransitionEventType;\n}());\nexport { TransitionEventType };\n//# sourceMappingURL=transitionEventType.js.map","import { TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nvar defaultOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\nvar TransitionHook = /** @class */ (function () {\n function TransitionHook(transition, stateContext, registeredHook, options) {\n var _this = this;\n this.transition = transition;\n this.stateContext = stateContext;\n this.registeredHook = registeredHook;\n this.options = options;\n this.isSuperseded = function () { return _this.type.hookPhase === TransitionHookPhase.RUN && !_this.options.transition.isActive(); };\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise<any> = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n TransitionHook.chain = function (hooks, waitFor) {\n // Chain the next hook off the previous\n var createHookChainR = function (prev, nextHook) { return prev.then(function () { return nextHook.invokeHook(); }); };\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n };\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n TransitionHook.invokeHooks = function (hooks, doneCallback) {\n for (var idx = 0; idx < hooks.length; idx++) {\n var hookResult = hooks[idx].invokeHook();\n if (isPromise(hookResult)) {\n var remainingHooks = hooks.slice(idx + 1);\n return TransitionHook.chain(remainingHooks, hookResult).then(doneCallback);\n }\n }\n return doneCallback();\n };\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n TransitionHook.runAllHooks = function (hooks) {\n hooks.forEach(function (hook) { return hook.invokeHook(); });\n };\n TransitionHook.prototype.logError = function (err) {\n this.transition.router.stateService.defaultErrorHandler()(err);\n };\n TransitionHook.prototype.invokeHook = function () {\n var _this = this;\n var hook = this.registeredHook;\n if (hook._deregistered)\n return;\n var notCurrent = this.getNotCurrentRejection();\n if (notCurrent)\n return notCurrent;\n var options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n var invokeCallback = function () { return hook.callback.call(options.bind, _this.transition, _this.stateContext); };\n var normalizeErr = function (err) { return Rejection.normalize(err).toPromise(); };\n var handleError = function (err) { return hook.eventType.getErrorHandler(_this)(err); };\n var handleResult = function (result) { return hook.eventType.getResultHandler(_this)(result); };\n try {\n var result = invokeCallback();\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr).then(handleResult, handleError);\n }\n else {\n return handleResult(result);\n }\n }\n catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n }\n finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n };\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n TransitionHook.prototype.handleHookResult = function (result) {\n var _this = this;\n var notCurrent = this.getNotCurrentRejection();\n if (notCurrent)\n return notCurrent;\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(function (val) { return _this.handleHookResult(val); });\n }\n trace.traceHookResult(result, this.transition, this.options);\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted('Hook aborted transition').toPromise();\n }\n var isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n };\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n TransitionHook.prototype.getNotCurrentRejection = function () {\n var router = this.transition.router;\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(\"UIRouter instance #\" + router.$id + \" has been stopped (disposed)\").toPromise();\n }\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n };\n TransitionHook.prototype.toString = function () {\n var _a = this, options = _a.options, registeredHook = _a.registeredHook;\n var event = parse('traceData.hookType')(options) || 'internal', context = parse('traceData.context.state.name')(options) || parse('traceData.context')(options) || 'unknown', name = fnToString(registeredHook.callback);\n return event + \" context: \" + context + \", \" + maxLength(200, name);\n };\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n TransitionHook.HANDLE_RESULT = function (hook) { return function (result) {\n return hook.handleHookResult(result);\n }; };\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n TransitionHook.LOG_REJECTED_RESULT = function (hook) { return function (result) {\n isPromise(result) && result.catch(function (err) { return hook.logError(Rejection.normalize(err)); });\n return undefined;\n }; };\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n TransitionHook.LOG_ERROR = function (hook) { return function (error) { return hook.logError(error); }; };\n TransitionHook.REJECT_ERROR = function (hook) { return function (error) { return silentRejection(error); }; };\n TransitionHook.THROW_ERROR = function (hook) { return function (error) {\n throw error;\n }; };\n return TransitionHook;\n}());\nexport { TransitionHook };\n//# sourceMappingURL=transitionHook.js.map","import { Transition } from '../transition/transition';\nimport { UIRouter } from '../router';\nimport { Resolvable } from '../resolve';\nimport { inArray, uniqR, unnestR, values } from '../common';\nfunction addCoreResolvables(trans) {\n trans.addResolvable(Resolvable.fromData(UIRouter, trans.router), '');\n trans.addResolvable(Resolvable.fromData(Transition, trans), '');\n trans.addResolvable(Resolvable.fromData('$transition$', trans), '');\n trans.addResolvable(Resolvable.fromData('$stateParams', trans.params()), '');\n trans.entering().forEach(function (state) {\n trans.addResolvable(Resolvable.fromData('$state$', state), state);\n });\n}\nexport var registerAddCoreResolvables = function (transitionService) {\n return transitionService.onCreate({}, addCoreResolvables);\n};\nvar TRANSITION_TOKENS = ['$transition$', Transition];\nvar isTransition = inArray(TRANSITION_TOKENS);\n// References to Transition in the treeChanges pathnodes makes all\n// previous Transitions reachable in memory, causing a memory leak\n// This function removes resolves for '$transition$' and `Transition` from the treeChanges.\n// Do not use this on current transitions, only on old ones.\nexport var treeChangesCleanup = function (trans) {\n var nodes = values(trans.treeChanges()).reduce(unnestR, []).reduce(uniqR, []);\n // If the resolvable is a Transition, return a new resolvable with null data\n var replaceTransitionWithNull = function (r) {\n return isTransition(r.token) ? Resolvable.fromData(r.token, null) : r;\n };\n nodes.forEach(function (node) {\n node.resolvables = node.resolvables.map(replaceTransitionWithNull);\n });\n};\n//# sourceMappingURL=coreResolvables.js.map","import { isString, isFunction } from '../common/predicates';\nimport { services } from '../common/coreservices';\nimport { TargetState } from '../state/targetState';\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n *\n * See [[StateDeclaration.redirectTo]]\n */\nvar redirectToHook = function (trans) {\n var redirect = trans.to().redirectTo;\n if (!redirect)\n return;\n var $state = trans.router.stateService;\n function handleResult(result) {\n if (!result)\n return;\n if (result instanceof TargetState)\n return result;\n if (isString(result))\n return $state.target(result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\nexport var registerRedirectToHook = function (transitionService) {\n return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook);\n};\n//# sourceMappingURL=redirectTo.js.map","/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n */\nfunction makeEnterExitRetainHook(hookName) {\n return function (transition, state) {\n var _state = state.$$state();\n var hookFn = _state[hookName];\n return hookFn(transition, state);\n };\n}\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nvar onExitHook = makeEnterExitRetainHook('onExit');\nexport var registerOnExitHook = function (transitionService) {\n return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook);\n};\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nvar onRetainHook = makeEnterExitRetainHook('onRetain');\nexport var registerOnRetainHook = function (transitionService) {\n return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook);\n};\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nvar onEnterHook = makeEnterExitRetainHook('onEnter');\nexport var registerOnEnterHook = function (transitionService) {\n return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook);\n};\n//# sourceMappingURL=onEnterExitRetain.js.map","import { noop } from '../common/common';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { val } from '../common/hof';\nexport var RESOLVE_HOOK_PRIORITY = 1000;\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath, { priority: 1000 });`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nvar eagerResolvePath = function (trans) {\n return new ResolveContext(trans.treeChanges().to).resolvePath('EAGER', trans).then(noop);\n};\nexport var registerEagerResolvePath = function (transitionService) {\n return transitionService.onStart({}, eagerResolvePath, { priority: RESOLVE_HOOK_PRIORITY });\n};\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState, { priority: 1000 });`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nvar lazyResolveState = function (trans, state) {\n return new ResolveContext(trans.treeChanges().to).subContext(state.$$state()).resolvePath('LAZY', trans).then(noop);\n};\nexport var registerLazyResolveState = function (transitionService) {\n return transitionService.onEnter({ entering: val(true) }, lazyResolveState, { priority: RESOLVE_HOOK_PRIORITY });\n};\n/**\n * A [[TransitionHookFn]] which resolves any dynamically added (LAZY or EAGER) Resolvables.\n *\n * Registered using `transitionService.onFinish({}, eagerResolvePath, { priority: 1000 });`\n *\n * After all entering states have been entered, this hook resolves any remaining Resolvables.\n * These are typically dynamic resolves which were added by some Transition Hook using [[Transition.addResolvable]].\n *\n * See [[StateDeclaration.resolve]]\n */\nvar resolveRemaining = function (trans) {\n return new ResolveContext(trans.treeChanges().to).resolvePath('LAZY', trans).then(noop);\n};\nexport var registerResolveRemaining = function (transitionService) {\n return transitionService.onFinish({}, resolveRemaining, { priority: RESOLVE_HOOK_PRIORITY });\n};\n//# sourceMappingURL=resolve.js.map","import { noop } from '../common/common';\nimport { services } from '../common/coreservices';\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nvar loadEnteringViews = function (transition) {\n var $q = services.$q;\n var enteringViews = transition.views('entering');\n if (!enteringViews.length)\n return;\n return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(noop);\n};\nexport var registerLoadEnteringViews = function (transitionService) {\n return transitionService.onFinish({}, loadEnteringViews);\n};\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nvar activateViews = function (transition) {\n var enteringViews = transition.views('entering');\n var exitingViews = transition.views('exiting');\n if (!enteringViews.length && !exitingViews.length)\n return;\n var $view = transition.router.viewService;\n exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); });\n enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); });\n $view.sync();\n};\nexport var registerActivateViews = function (transitionService) {\n return transitionService.onSuccess({}, activateViews);\n};\n//# sourceMappingURL=views.js.map","import { copy } from '../common/common';\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nvar updateGlobalState = function (trans) {\n var globals = trans.router.globals;\n var transitionSuccessful = function () {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n copy(trans.params(), globals.params);\n };\n var clearCurrentTransition = function () {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans)\n globals.transition = null;\n };\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\nexport var registerUpdateGlobalState = function (transitionService) {\n return transitionService.onCreate({}, updateGlobalState);\n};\n//# sourceMappingURL=updateGlobals.js.map","/**\n * A [[TransitionHookFn]] which updates the URL after a successful transition\n *\n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nvar updateUrl = function (transition) {\n var options = transition.options();\n var $state = transition.router.stateService;\n var $urlRouter = transition.router.urlRouter;\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = { replace: options.location === 'replace' };\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n $urlRouter.update(true);\n};\nexport var registerUpdateUrl = function (transitionService) {\n return transitionService.onSuccess({}, updateUrl, { priority: 9999 });\n};\n//# sourceMappingURL=url.js.map","import { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans) {\n var ignoredReason = trans._ignoredReason();\n if (!ignoredReason)\n return;\n trace.traceTransitionIgnored(trans);\n var pending = trans.router.globals.transition;\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n return Rejection.ignored().toPromise();\n}\nexport var registerIgnoredTransitionHook = function (transitionService) {\n return transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n};\n//# sourceMappingURL=ignoredTransition.js.map","/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans) {\n if (!trans.valid()) {\n throw new Error(trans.error().toString());\n }\n}\nexport var registerInvalidTransitionHook = function (transitionService) {\n return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n};\n//# sourceMappingURL=invalidTransition.js.map","import { TransitionHookScope, TransitionHookPhase, } from './interface';\nimport { Transition } from './transition';\nimport { makeEvent } from './hookRegistry';\nimport { registerAddCoreResolvables, treeChangesCleanup } from '../hooks/coreResolvables';\nimport { registerRedirectToHook } from '../hooks/redirectTo';\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from '../hooks/onEnterExitRetain';\nimport { registerEagerResolvePath, registerLazyResolveState, registerResolveRemaining } from '../hooks/resolve';\nimport { registerLoadEnteringViews, registerActivateViews } from '../hooks/views';\nimport { registerUpdateGlobalState } from '../hooks/updateGlobals';\nimport { registerUpdateUrl } from '../hooks/url';\nimport { registerLazyLoadHook } from '../hooks/lazyLoad';\nimport { TransitionEventType } from './transitionEventType';\nimport { TransitionHook } from './transitionHook';\nimport { isDefined } from '../common/predicates';\nimport { removeFrom, values, createProxyFunctions } from '../common/common';\nimport { val } from '../common/hof';\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport var defaultTransOpts = {\n location: true,\n relative: null,\n inherit: false,\n notify: true,\n reload: false,\n supercede: true,\n custom: {},\n current: function () { return null; },\n source: 'unknown',\n};\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n *\n * This API is located at `router.transitionService` ([[UIRouter.transitionService]])\n */\nvar TransitionService = /** @class */ (function () {\n /** @internal */\n function TransitionService(_router) {\n /** @internal */\n this._transitionCount = 0;\n /** The transition hook types, such as `onEnter`, `onStart`, etc */\n this._eventTypes = [];\n /** @internal The registered transition hooks */\n this._registeredHooks = {};\n /** The paths on a criteria object */\n this._criteriaPaths = {};\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = (createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]));\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n _router.globals.successfulTransitions.onEvict(treeChangesCleanup);\n }\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internal\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n TransitionService.prototype.onCreate = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onBefore = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onStart = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onExit = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onRetain = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onEnter = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onFinish = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onSuccess = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onError = function (criteria, callback, options) {\n return;\n };\n /**\n * dispose\n * @internal\n */\n TransitionService.prototype.dispose = function (router) {\n values(this._registeredHooks).forEach(function (hooksArray) {\n return hooksArray.forEach(function (hook) {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n });\n });\n };\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @internal\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n TransitionService.prototype.create = function (fromPath, targetState) {\n return new Transition(fromPath, targetState, this._router);\n };\n /** @internal */\n TransitionService.prototype._defineCoreEvents = function () {\n var Phase = TransitionHookPhase;\n var TH = TransitionHook;\n var paths = this._criteriaPaths;\n var NORMAL_SORT = false, REVERSE_SORT = true;\n var SYNCHRONOUS = true;\n this._defineEvent('onCreate', Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n this._defineEvent('onBefore', Phase.BEFORE, 0, paths.to);\n this._defineEvent('onStart', Phase.RUN, 0, paths.to);\n this._defineEvent('onExit', Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent('onRetain', Phase.RUN, 200, paths.retained);\n this._defineEvent('onEnter', Phase.RUN, 300, paths.entering);\n this._defineEvent('onFinish', Phase.RUN, 400, paths.to);\n this._defineEvent('onSuccess', Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent('onError', Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n };\n /** @internal */\n TransitionService.prototype._defineCorePaths = function () {\n var STATE = TransitionHookScope.STATE, TRANSITION = TransitionHookScope.TRANSITION;\n this._definePathType('to', TRANSITION);\n this._definePathType('from', TRANSITION);\n this._definePathType('exiting', STATE);\n this._definePathType('retained', STATE);\n this._definePathType('entering', STATE);\n };\n /** @internal */\n TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) {\n if (reverseSort === void 0) { reverseSort = false; }\n if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; }\n if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; }\n if (synchronous === void 0) { synchronous = false; }\n var eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n /** @internal */\n TransitionService.prototype._getEvents = function (phase) {\n var transitionHookTypes = isDefined(phase)\n ? this._eventTypes.filter(function (type) { return type.hookPhase === phase; })\n : this._eventTypes.slice();\n return transitionHookTypes.sort(function (l, r) {\n var cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n });\n };\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @internal\n */\n TransitionService.prototype._definePathType = function (name, hookScope) {\n this._criteriaPaths[name] = { name: name, scope: hookScope };\n };\n /** @internal */\n // tslint:disable-next-line\n TransitionService.prototype._getPathTypes = function () {\n return this._criteriaPaths;\n };\n /** @internal */\n TransitionService.prototype.getHooks = function (hookName) {\n return this._registeredHooks[hookName];\n };\n /** @internal */\n TransitionService.prototype._registerCoreTransitionHooks = function () {\n var fns = this._deregisterHookFns;\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n fns.resolveAll = registerResolveRemaining(this);\n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n };\n return TransitionService;\n}());\nexport { TransitionService };\n//# sourceMappingURL=transitionService.js.map","import { ParamTypes } from '../params';\nimport { isDefined, isString } from '../common';\n/**\n * An API to customize the URL behavior and retrieve URL configuration\n *\n * This API is used to customize the behavior of the URL.\n * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]),\n * and custom parameter encoding (custom [[type]]).\n *\n * It also has information about the location (url) configuration such as [[port]] and [[baseHref]].\n * This information can be used to build absolute URLs, such as\n * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;\n *\n * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]])\n */\nvar UrlConfig = /** @class */ (function () {\n /** @internal */ function UrlConfig(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this.paramTypes = new ParamTypes();\n /** @internal */ this._decodeParams = true;\n /** @internal */ this._isCaseInsensitive = false;\n /** @internal */ this._isStrictMode = true;\n /** @internal */ this._defaultSquashPolicy = false;\n /** @internal */ this.dispose = function () { return _this.paramTypes.dispose(); };\n // Delegate these calls to the current LocationConfig implementation\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n this.baseHref = function () { return _this.router.locationConfig.baseHref(); };\n /**\n * Gets or sets the hashPrefix\n *\n * This only applies when not running in [[html5Mode]] (pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n this.hashPrefix = function (newprefix) { return _this.router.locationConfig.hashPrefix(newprefix); };\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n this.host = function () { return _this.router.locationConfig.host(); };\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in html5 mode (pushstate mode).\n */\n this.html5Mode = function () { return _this.router.locationConfig.html5Mode(); };\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n this.port = function () { return _this.router.locationConfig.port(); };\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n this.protocol = function () { return _this.router.locationConfig.protocol(); };\n }\n /**\n * Defines whether URL matching should be case sensitive (the default behavior), or not.\n *\n * #### Example:\n * ```js\n * // Allow case insensitive url matches\n * urlService.config.caseInsensitive(true);\n * ```\n *\n * @param value `false` to match URL in a case sensitive manner; otherwise `true`;\n * @returns the current value of caseInsensitive\n */\n UrlConfig.prototype.caseInsensitive = function (value) {\n return (this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive);\n };\n /**\n * Sets the default behavior when generating or matching URLs with default parameter values.\n *\n * #### Example:\n * ```js\n * // Remove default parameter values from the url\n * urlService.config.defaultSquashPolicy(true);\n * ```\n *\n * @param value A string that defines the default parameter URL squashing behavior.\n * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n * parameter is surrounded by slashes, squash (remove) one slash from the URL\n * - any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n * the parameter value from the URL and replace it with this string.\n * @returns the current value of defaultSquashPolicy\n */\n UrlConfig.prototype.defaultSquashPolicy = function (value) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n return (this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy);\n };\n /**\n * Defines whether URLs should match trailing slashes, or not (the default behavior).\n *\n * #### Example:\n * ```js\n * // Allow optional trailing slashes\n * urlService.config.strictMode(false);\n * ```\n *\n * @param value `false` to match trailing slashes in URLs, otherwise `true`.\n * @returns the current value of strictMode\n */\n UrlConfig.prototype.strictMode = function (value) {\n return (this._isStrictMode = isDefined(value) ? value : this._isStrictMode);\n };\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.\n *\n * #### Note: Register custom types *before using them* in a state definition.\n *\n * #### Example:\n * ```js\n * // Encode object parameter as JSON string\n * urlService.config.type('myjson', {\n * encode: (obj) => JSON.stringify(obj),\n * decode: (str) => JSON.parse(str),\n * is: (val) => typeof(val) === 'object',\n * pattern: /[^/]+/,\n * equals: (a, b) => _.isEqual(a, b),\n * });\n * ```\n *\n * See [[ParamTypeDefinition]] for more examples\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n */\n UrlConfig.prototype.type = function (name, definition, definitionFn) {\n var type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n return UrlConfig;\n}());\nexport { UrlConfig };\n//# sourceMappingURL=urlConfig.js.map","import { map, inherit, identity, unnest, tail, find, allTrueR, unnestR, arrayTuples } from '../common/common';\nimport { prop, propEq } from '../common/hof';\nimport { isArray, isString, isDefined } from '../common/predicates';\nimport { Param, DefType } from '../params/param';\nimport { joinNeighborsR, splitOnDelim } from '../common/strings';\nimport { defaults } from '../common';\nfunction quoteRegExp(str, param) {\n var surroundPattern = ['', ''], result = str.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, '\\\\$&');\n if (!param)\n return result;\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')];\n break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:/(', ')|/)?'];\n break;\n default:\n surroundPattern = [\"(\" + param.squash + \"|\", ')?'];\n break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\nvar memoizeTo = function (obj, _prop, fn) { return (obj[_prop] = obj[_prop] || fn()); };\nvar splitOnSlash = splitOnDelim('/');\nvar defaultConfig = {\n state: { params: {} },\n strict: true,\n caseInsensitive: true,\n decodeParams: true,\n};\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nvar UrlMatcher = /** @class */ (function () {\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param paramFactory A [[ParamFactory]] object\n * @param config A [[UrlMatcherCompileConfig]] configuration object\n */\n function UrlMatcher(pattern, paramTypes, paramFactory, config) {\n var _this = this;\n /** @internal */\n this._cache = { path: [this] };\n /** @internal */\n this._children = [];\n /** @internal */\n this._params = [];\n /** @internal */\n this._segments = [];\n /** @internal */\n this._compiled = [];\n this.config = config = defaults(config, defaultConfig);\n this.pattern = pattern;\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n var placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g;\n var searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g;\n var patterns = [];\n var last = 0;\n var matchArray;\n var checkParamErrors = function (id) {\n if (!UrlMatcher.nameValidator.test(id))\n throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n if (find(_this._params, propEq('id', id)))\n throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n };\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n var matchDetails = function (m, isSearch) {\n // IE[78] returns '' for unmatched groups instead of null\n var id = m[2] || m[3];\n var regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n var makeRegexpType = function (str) {\n return inherit(paramTypes.type(isSearch ? 'query' : 'path'), {\n pattern: new RegExp(str, _this.config.caseInsensitive ? 'i' : undefined),\n });\n };\n return {\n id: id,\n regexp: regexp,\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp),\n };\n };\n var details;\n var segment;\n // tslint:disable-next-line:no-conditional-assignment\n while ((matchArray = placeholder.exec(pattern))) {\n details = matchDetails(matchArray, false);\n if (details.segment.indexOf('?') >= 0)\n break; // we're into the search part\n checkParamErrors(details.id);\n this._params.push(paramFactory.fromPath(details.id, details.type, config.state));\n this._segments.push(details.segment);\n patterns.push([details.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n // Find any search parameter names and remove them from the last segment\n var i = segment.indexOf('?');\n if (i >= 0) {\n var search = segment.substring(i);\n segment = segment.substring(0, i);\n if (search.length > 0) {\n last = 0;\n // tslint:disable-next-line:no-conditional-assignment\n while ((matchArray = searchPlaceholder.exec(search))) {\n details = matchDetails(matchArray, true);\n checkParamErrors(details.id);\n this._params.push(paramFactory.fromSearch(details.id, details.type, config.state));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n this._segments.push(segment);\n this._compiled = patterns.map(function (_pattern) { return quoteRegExp.apply(null, _pattern); }).concat(quoteRegExp(segment));\n }\n /** @internal */\n UrlMatcher.encodeDashes = function (str) {\n // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, function (c) { return \"%5C%\" + c.charCodeAt(0).toString(16).toUpperCase(); });\n };\n /** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */\n UrlMatcher.pathSegmentsAndParams = function (matcher) {\n var staticSegments = matcher._segments;\n var pathParams = matcher._params.filter(function (p) { return p.location === DefType.PATH; });\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(function (x) { return x !== '' && isDefined(x); });\n };\n /** @internal Given a matcher, return an array with the matcher's query params */\n UrlMatcher.queryParams = function (matcher) {\n return matcher._params.filter(function (p) { return p.location === DefType.SEARCH; });\n };\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n UrlMatcher.compare = function (a, b) {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n var segments = function (matcher) {\n return (matcher._cache.segments =\n matcher._cache.segments ||\n matcher._cache.path\n .map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(function (x) { return (isString(x) ? splitOnSlash(x) : x); })\n .reduce(unnestR, []));\n };\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n var weights = function (matcher) {\n return (matcher._cache.weights =\n matcher._cache.weights ||\n segments(matcher).map(function (segment) {\n // Sort slashes first, then static strings, the Params\n if (segment === '/')\n return 1;\n if (isString(segment))\n return 2;\n if (segment instanceof Param)\n return 3;\n }));\n };\n /**\n * Pads shorter array in-place (mutates)\n */\n var padArrays = function (l, r, padVal) {\n var len = Math.max(l.length, r.length);\n while (l.length < len)\n l.push(padVal);\n while (r.length < len)\n r.push(padVal);\n };\n var weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n var _pairs = arrayTuples(weightsA, weightsB);\n var cmp, i;\n for (i = 0; i < _pairs.length; i++) {\n cmp = _pairs[i][0] - _pairs[i][1];\n if (cmp !== 0)\n return cmp;\n }\n return 0;\n };\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n UrlMatcher.prototype.append = function (url) {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n };\n /** @internal */\n UrlMatcher.prototype.isRoot = function () {\n return this._cache.path[0] === this;\n };\n /** Returns the input pattern string */\n UrlMatcher.prototype.toString = function () {\n return this.pattern;\n };\n UrlMatcher.prototype._getDecodedParamValue = function (value, param) {\n if (isDefined(value)) {\n if (this.config.decodeParams && !param.type.raw) {\n if (isArray(value)) {\n value = value.map(function (paramValue) { return decodeURIComponent(paramValue); });\n }\n else {\n value = decodeURIComponent(value);\n }\n }\n value = param.type.decode(value);\n }\n return param.value(value);\n };\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n UrlMatcher.prototype.exec = function (path, search, hash, options) {\n var _this = this;\n if (search === void 0) { search = {}; }\n if (options === void 0) { options = {}; }\n var match = memoizeTo(this._cache, 'pattern', function () {\n return new RegExp([\n '^',\n unnest(_this._cache.path.map(prop('_compiled'))).join(''),\n _this.config.strict === false ? '/?' : '',\n '$',\n ].join(''), _this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n if (!match)\n return null;\n // options = defaults(options, { isolate: false });\n var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values = {};\n if (nPathSegments !== match.length - 1)\n throw new Error(\"Unbalanced capture group in route '\" + this.pattern + \"'\");\n function decodePathArray(paramVal) {\n var reverseString = function (str) { return str.split('').reverse().join(''); };\n var unquoteDashes = function (str) { return str.replace(/\\\\-/g, '-'); };\n var split = reverseString(paramVal).split(/-(?!\\\\)/);\n var allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n for (var i = 0; i < nPathSegments; i++) {\n var param = pathParams[i];\n var value = match[i + 1];\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (var j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value)\n value = param.replace[j].to;\n }\n if (value && param.array === true)\n value = decodePathArray(value);\n values[param.id] = this._getDecodedParamValue(value, param);\n }\n searchParams.forEach(function (param) {\n var value = search[param.id];\n for (var j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value)\n value = param.replace[j].to;\n }\n values[param.id] = _this._getDecodedParamValue(value, param);\n });\n if (hash)\n values['#'] = hash;\n return values;\n };\n /**\n * @internal\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.<Param>} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n UrlMatcher.prototype.parameters = function (opts) {\n if (opts === void 0) { opts = {}; }\n if (opts.inherit === false)\n return this._params;\n return unnest(this._cache.path.map(function (matcher) { return matcher._params; }));\n };\n /**\n * @internal\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n UrlMatcher.prototype.parameter = function (id, opts) {\n var _this = this;\n if (opts === void 0) { opts = {}; }\n var findParam = function () {\n for (var _i = 0, _a = _this._params; _i < _a.length; _i++) {\n var param = _a[_i];\n if (param.id === id)\n return param;\n }\n };\n var parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n };\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n UrlMatcher.prototype.validates = function (params) {\n var validParamVal = function (param, val) { return !param || param.validates(val); };\n params = params || {};\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); });\n return paramSchema.map(function (paramDef) { return validParamVal(paramDef, params[paramDef.id]); }).reduce(allTrueR, true);\n };\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n UrlMatcher.prototype.format = function (values) {\n if (values === void 0) { values = {}; }\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n var urlMatchers = this._cache.path;\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n var pathSegmentsAndParams = urlMatchers\n .map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(function (x) { return (isString(x) ? x : getDetails(x)); });\n // Extract the query params into a separate array\n var queryParams = urlMatchers\n .map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n var isInvalid = function (param) { return param.isValid === false; };\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param) {\n // Normalize to typed value\n var value = param.value(values[param.id]);\n var isValid = param.validates(value);\n var isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n var squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n var encoded = param.type.encode(value);\n return { param: param, value: value, isValid: isValid, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded };\n }\n // Build up the path-portion from the list of static segments and parameters\n var pathString = pathSegmentsAndParams.reduce(function (acc, x) {\n // The element is a static segment (a raw string); just append it\n if (isString(x))\n return acc + x;\n // Otherwise, it's a ParamDetails.\n var squash = x.squash, encoded = x.encoded, param = x.param;\n // If squash is === true, try to remove a slash from the path\n if (squash === true)\n return acc.match(/\\/$/) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash))\n return acc + squash;\n if (squash !== false)\n return acc; // ?\n if (encoded == null)\n return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded))\n return acc + map(encoded, UrlMatcher.encodeDashes).join('-');\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw)\n return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent(encoded);\n }, '');\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n var queryString = queryParams\n .map(function (paramDetails) {\n var param = paramDetails.param, squash = paramDetails.squash, encoded = paramDetails.encoded, isDefaultValue = paramDetails.isDefaultValue;\n if (encoded == null || (isDefaultValue && squash !== false))\n return;\n if (!isArray(encoded))\n encoded = [encoded];\n if (encoded.length === 0)\n return;\n if (!param.raw)\n encoded = map(encoded, encodeURIComponent);\n return encoded.map(function (val) { return param.id + \"=\" + val; });\n })\n .filter(identity)\n .reduce(unnestR, [])\n .join('&');\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? \"?\" + queryString : '') + (values['#'] ? '#' + values['#'] : '');\n };\n /** @internal */\n UrlMatcher.nameValidator = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n return UrlMatcher;\n}());\nexport { UrlMatcher };\n//# sourceMappingURL=urlMatcher.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { extend, forEach, isDefined, isFunction, isObject } from '../common';\nimport { UrlMatcher } from './urlMatcher';\nimport { DefType, Param } from '../params';\nvar ParamFactory = /** @class */ (function () {\n function ParamFactory(router) {\n this.router = router;\n }\n ParamFactory.prototype.fromConfig = function (id, type, state) {\n return new Param(id, type, DefType.CONFIG, this.router.urlService.config, state);\n };\n ParamFactory.prototype.fromPath = function (id, type, state) {\n return new Param(id, type, DefType.PATH, this.router.urlService.config, state);\n };\n ParamFactory.prototype.fromSearch = function (id, type, state) {\n return new Param(id, type, DefType.SEARCH, this.router.urlService.config, state);\n };\n return ParamFactory;\n}());\nexport { ParamFactory };\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nvar UrlMatcherFactory = /** @class */ (function () {\n // TODO: move implementations to UrlConfig (urlService.config)\n function UrlMatcherFactory(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** Creates a new [[Param]] for a given location (DefType) */\n this.paramFactory = new ParamFactory(this.router);\n // TODO: Check if removal of this will break anything, then remove these\n this.UrlMatcher = UrlMatcher;\n this.Param = Param;\n /** @deprecated use [[UrlConfig.caseInsensitive]] */\n this.caseInsensitive = function (value) { return _this.router.urlService.config.caseInsensitive(value); };\n /** @deprecated use [[UrlConfig.defaultSquashPolicy]] */\n this.defaultSquashPolicy = function (value) { return _this.router.urlService.config.defaultSquashPolicy(value); };\n /** @deprecated use [[UrlConfig.strictMode]] */\n this.strictMode = function (value) { return _this.router.urlService.config.strictMode(value); };\n /** @deprecated use [[UrlConfig.type]] */\n this.type = function (name, definition, definitionFn) {\n return _this.router.urlService.config.type(name, definition, definitionFn) || _this;\n };\n }\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n UrlMatcherFactory.prototype.compile = function (pattern, config) {\n var urlConfig = this.router.urlService.config;\n // backward-compatible support for config.params -> config.state.params\n var params = config && !config.state && config.params;\n config = params ? __assign({ state: { params: params } }, config) : config;\n var globalConfig = {\n strict: urlConfig._isStrictMode,\n caseInsensitive: urlConfig._isCaseInsensitive,\n decodeParams: urlConfig._decodeParams,\n };\n return new UrlMatcher(pattern, urlConfig.paramTypes, this.paramFactory, extend(globalConfig, config));\n };\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n UrlMatcherFactory.prototype.isMatcher = function (object) {\n // TODO: typeof?\n if (!isObject(object))\n return false;\n var result = true;\n forEach(UrlMatcher.prototype, function (val, name) {\n if (isFunction(val))\n result = result && isDefined(object[name]) && isFunction(object[name]);\n });\n return result;\n };\n /** @internal */\n UrlMatcherFactory.prototype.$get = function () {\n var urlConfig = this.router.urlService.config;\n urlConfig.paramTypes.enqueue = false;\n urlConfig.paramTypes._flushTypeQueue();\n return this;\n };\n return UrlMatcherFactory;\n}());\nexport { UrlMatcherFactory };\n//# sourceMappingURL=urlMatcherFactory.js.map","import { stripLastPathElement } from '../common';\nimport { UrlRuleFactory } from './urlRule';\nfunction appendBasePath(url, isHtml5, absolute, baseHref) {\n if (baseHref === '/')\n return url;\n if (isHtml5)\n return stripLastPathElement(baseHref) + url;\n if (absolute)\n return baseHref.slice(1) + url;\n return url;\n}\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRules]] which can be found as [[UrlService.rules]].\n */\nvar UrlRouter = /** @class */ (function () {\n /** @internal */\n function UrlRouter(/** @internal */ router) {\n var _this = this;\n this.router = router;\n // Delegate these calls to [[UrlService]]\n /** @deprecated use [[UrlService.sync]]*/\n this.sync = function (evt) { return _this.router.urlService.sync(evt); };\n /** @deprecated use [[UrlService.listen]]*/\n this.listen = function (enabled) { return _this.router.urlService.listen(enabled); };\n /** @deprecated use [[UrlService.deferIntercept]]*/\n this.deferIntercept = function (defer) { return _this.router.urlService.deferIntercept(defer); };\n /** @deprecated use [[UrlService.match]]*/\n this.match = function (urlParts) { return _this.router.urlService.match(urlParts); };\n // Delegate these calls to [[UrlRules]]\n /** @deprecated use [[UrlRules.initial]]*/\n this.initial = function (handler) {\n return _this.router.urlService.rules.initial(handler);\n };\n /** @deprecated use [[UrlRules.otherwise]]*/\n this.otherwise = function (handler) {\n return _this.router.urlService.rules.otherwise(handler);\n };\n /** @deprecated use [[UrlRules.removeRule]]*/\n this.removeRule = function (rule) { return _this.router.urlService.rules.removeRule(rule); };\n /** @deprecated use [[UrlRules.rule]]*/\n this.rule = function (rule) { return _this.router.urlService.rules.rule(rule); };\n /** @deprecated use [[UrlRules.rules]]*/\n this.rules = function () { return _this.router.urlService.rules.rules(); };\n /** @deprecated use [[UrlRules.sort]]*/\n this.sort = function (compareFn) { return _this.router.urlService.rules.sort(compareFn); };\n /** @deprecated use [[UrlRules.when]]*/\n this.when = function (matcher, handler, options) { return _this.router.urlService.rules.when(matcher, handler, options); };\n this.urlRuleFactory = new UrlRuleFactory(router);\n }\n /** Internal API. */\n UrlRouter.prototype.update = function (read) {\n var $url = this.router.locationService;\n if (read) {\n this.location = $url.url();\n return;\n }\n if ($url.url() === this.location)\n return;\n $url.url(this.location, true);\n };\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internal\n * @param urlMatcher\n * @param params\n * @param options\n */\n UrlRouter.prototype.push = function (urlMatcher, params, options) {\n var replace = options && !!options.replace;\n this.router.urlService.url(urlMatcher.format(params || {}), replace);\n };\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n UrlRouter.prototype.href = function (urlMatcher, params, options) {\n var url = urlMatcher.format(params);\n if (url == null)\n return null;\n options = options || { absolute: false };\n var cfg = this.router.urlService.config;\n var isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = '#' + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n if (!options.absolute || !url) {\n return url;\n }\n var slash = !isHtml5 && url ? '/' : '';\n var cfgPort = cfg.port();\n var port = (cfgPort === 80 || cfgPort === 443 ? '' : ':' + cfgPort);\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n };\n Object.defineProperty(UrlRouter.prototype, \"interceptDeferred\", {\n /** @deprecated use [[UrlService.interceptDeferred]]*/\n get: function () {\n return this.router.urlService.interceptDeferred;\n },\n enumerable: false,\n configurable: true\n });\n return UrlRouter;\n}());\nexport { UrlRouter };\n//# sourceMappingURL=urlRouter.js.map","import { UrlMatcher } from './urlMatcher';\nimport { isString, isDefined, isFunction } from '../common/predicates';\nimport { identity, extend } from '../common/common';\nimport { is, or, pattern } from '../common/hof';\nimport { StateObject } from '../state/stateObject';\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n */\nvar UrlRuleFactory = /** @class */ (function () {\n function UrlRuleFactory(router) {\n this.router = router;\n }\n UrlRuleFactory.prototype.compile = function (str) {\n return this.router.urlMatcherFactory.compile(str);\n };\n UrlRuleFactory.prototype.create = function (what, handler) {\n var _this = this;\n var isState = StateObject.isState, isStateDeclaration = StateObject.isStateDeclaration;\n var makeRule = pattern([\n [isString, function (_what) { return makeRule(_this.compile(_what)); }],\n [is(UrlMatcher), function (_what) { return _this.fromUrlMatcher(_what, handler); }],\n [or(isState, isStateDeclaration), function (_what) { return _this.fromState(_what, _this.router); }],\n [is(RegExp), function (_what) { return _this.fromRegExp(_what, handler); }],\n [isFunction, function (_what) { return new BaseUrlRule(_what, handler); }],\n ]);\n var rule = makeRule(what);\n if (!rule)\n throw new Error(\"invalid 'what' in when()\");\n return rule;\n };\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n UrlRuleFactory.prototype.fromUrlMatcher = function (urlMatcher, handler) {\n var _handler = handler;\n if (isString(handler))\n handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler))\n _handler = function (match) { return handler.format(match); };\n function matchUrlParamters(url) {\n var params = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(params) && params;\n }\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params) {\n var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; });\n if (!optional.length)\n return 0.000001;\n var matched = optional.filter(function (param) { return params[param.id]; });\n return matched.length / optional.length;\n }\n var details = { urlMatcher: urlMatcher, matchPriority: matchPriority, type: 'URLMATCHER' };\n return extend(new BaseUrlRule(matchUrlParamters, _handler), details);\n };\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n UrlRuleFactory.prototype.fromState = function (stateOrDecl, router) {\n var state = StateObject.isStateDeclaration(stateOrDecl) ? stateOrDecl.$$state() : stateOrDecl;\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n var handler = function (match) {\n var $state = router.stateService;\n var globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: 'url' });\n }\n };\n var details = { state: state, type: 'STATE' };\n return extend(this.fromUrlMatcher(state.url, handler), details);\n };\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n UrlRuleFactory.prototype.fromRegExp = function (regexp, handler) {\n if (regexp.global || regexp.sticky)\n throw new Error('Rule RegExp must not be global or sticky');\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n var redirectUrlTo = function (match) {\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n return handler.replace(/\\$(\\$|\\d{1,2})/, function (m, what) { return match[what === '$' ? 0 : Number(what)]; });\n };\n var _handler = isString(handler) ? redirectUrlTo : handler;\n var matchParamsFromRegexp = function (url) { return regexp.exec(url.path); };\n var details = { regexp: regexp, type: 'REGEXP' };\n return extend(new BaseUrlRule(matchParamsFromRegexp, _handler), details);\n };\n UrlRuleFactory.isUrlRule = function (obj) { return obj && ['type', 'match', 'handler'].every(function (key) { return isDefined(obj[key]); }); };\n return UrlRuleFactory;\n}());\nexport { UrlRuleFactory };\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internal\n */\nvar BaseUrlRule = /** @class */ (function () {\n function BaseUrlRule(match, handler) {\n var _this = this;\n this.match = match;\n this.type = 'RAW';\n this.matchPriority = function (match) { return 0 - _this.$id; };\n this.handler = handler || identity;\n }\n return BaseUrlRule;\n}());\nexport { BaseUrlRule };\n//# sourceMappingURL=urlRule.js.map","import { TargetState } from '../state';\nimport { UrlMatcher } from './urlMatcher';\nimport { is, isDefined, isFunction, isString, removeFrom, val } from '../common';\nimport { UrlRuleFactory } from './urlRule';\nvar prioritySort = function (a, b) { return (b.priority || 0) - (a.priority || 0); };\nvar typeSort = function (a, b) {\n var weights = { STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\nvar urlMatcherSort = function (a, b) {\n return !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n};\nvar idSort = function (a, b) {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n var useMatchPriority = { STATE: true, URLMATCHER: true };\n var equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRules.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n */\nvar defaultRuleSortFn;\ndefaultRuleSortFn = function (a, b) {\n var cmp = prioritySort(a, b);\n if (cmp !== 0)\n return cmp;\n cmp = typeSort(a, b);\n if (cmp !== 0)\n return cmp;\n cmp = urlMatcherSort(a, b);\n if (cmp !== 0)\n return cmp;\n return idSort(a, b);\n};\nfunction getHandlerFn(handler) {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler : val(handler);\n}\n/**\n * API for managing URL rules\n *\n * This API is used to create and manage URL rules.\n * URL rules are a mechanism to respond to specific URL patterns.\n *\n * The most commonly used methods are [[otherwise]] and [[when]].\n *\n * This API is found at `router.urlService.rules` (see: [[UIRouter.urlService]], [[URLService.rules]])\n */\nvar UrlRules = /** @class */ (function () {\n /** @internal */\n function UrlRules(/** @internal */ router) {\n this.router = router;\n /** @internal */ this._sortFn = defaultRuleSortFn;\n /** @internal */ this._rules = [];\n /** @internal */ this._id = 0;\n this.urlRuleFactory = new UrlRuleFactory(router);\n }\n /** @internal */\n UrlRules.prototype.dispose = function (router) {\n this._rules = [];\n delete this._otherwiseFn;\n };\n /**\n * Defines the initial state, path, or behavior to use when the app starts.\n *\n * This rule defines the initial/starting state for the application.\n *\n * This rule is triggered the first time the URL is checked (when the app initially loads).\n * The rule is triggered only when the url matches either `\"\"` or `\"/\"`.\n *\n * Note: The rule is intended to be used when the root of the application is directly linked to.\n * When the URL is *not* `\"\"` or `\"/\"` and doesn't match other rules, the [[otherwise]] rule is triggered.\n * This allows 404-like behavior when an unknown URL is deep-linked.\n *\n * #### Example:\n * Start app at `home` state.\n * ```js\n * .initial({ state: 'home' });\n * ```\n *\n * #### Example:\n * Start app at `/home` (by url)\n * ```js\n * .initial('/home');\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .initial((matchValue, url, router) => {\n * console.log('initial state');\n * return { state: 'home' };\n * })\n * ```\n *\n * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic).\n */\n UrlRules.prototype.initial = function (handler) {\n var handlerFn = getHandlerFn(handler);\n var matchFn = function (urlParts, router) {\n return router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n };\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n /**\n * Defines the state, url, or behavior to use when no other rule matches the URL.\n *\n * This rule is matched when *no other rule* matches.\n * It is generally used to handle unknown URLs (similar to \"404\" behavior, but on the client side).\n *\n * - If `handler` a string, it is treated as a url redirect\n *\n * #### Example:\n * When no other url rule matches, redirect to `/index`\n * ```js\n * .otherwise('/index');\n * ```\n *\n * - If `handler` is an object with a `state` property, the state is activated.\n *\n * #### Example:\n * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value.\n * ```js\n * .otherwise({ state: 'home', params: { dashboard: 'default' } });\n * ```\n *\n * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.\n * The function can perform actions, and/or return a value.\n *\n * #### Example:\n * When no other url rule matches, manually trigger a transition to the `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * router.stateService.go('home');\n * });\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * return { state: 'home' };\n * });\n * ```\n *\n * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic).\n */\n UrlRules.prototype.otherwise = function (handler) {\n var handlerFn = getHandlerFn(handler);\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n /**\n * Remove a rule previously registered\n *\n * @param rule the matcher rule that was previously registered using [[rule]]\n */\n UrlRules.prototype.removeRule = function (rule) {\n removeFrom(this._rules, rule);\n };\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[urlRuleFactory]], or created manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n UrlRules.prototype.rule = function (rule) {\n var _this = this;\n if (!UrlRuleFactory.isUrlRule(rule))\n throw new Error('invalid rule');\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n this._rules.push(rule);\n this._sorted = false;\n return function () { return _this.removeRule(rule); };\n };\n /**\n * Gets all registered rules\n *\n * @returns an array of all the registered rules\n */\n UrlRules.prototype.rules = function () {\n this.ensureSorted();\n return this._rules.concat(this._otherwiseFn ? [this._otherwiseFn] : []);\n };\n /**\n * Defines URL Rule priorities\n *\n * More than one rule ([[UrlRule]]) might match a given URL.\n * This `compareFn` is used to sort the rules by priority.\n * Higher priority rules should sort earlier.\n *\n * The [[defaultRuleSortFn]] is used by default.\n *\n * You only need to call this function once.\n * The `compareFn` will be used to sort the rules as each is registered.\n *\n * If called without any parameter, it will re-sort the rules.\n *\n * ---\n *\n * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]].\n * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]]\n * The `$id` is is the order in which the rule was registered.\n *\n * The sort function should use these data, or data found on a specific type\n * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired.\n *\n * #### Example:\n * This compare function prioritizes rules by the order in which the rules were registered.\n * A rule registered earlier has higher priority.\n *\n * ```js\n * function compareFn(a, b) {\n * return a.$id - b.$id;\n * }\n * ```\n *\n * @param compareFn a function that compares to [[UrlRule]] objects.\n * The `compareFn` should abide by the `Array.sort` compare function rules.\n * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority.\n * Return a positive number if `b` should be higher priority.\n * Return `0` if the rules are identical.\n *\n * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description)\n * for details.\n */\n UrlRules.prototype.sort = function (compareFn) {\n var sorted = this.stableSort(this._rules, (this._sortFn = compareFn || this._sortFn));\n // precompute _sortGroup values and apply to each rule\n var group = 0;\n for (var i = 0; i < sorted.length; i++) {\n sorted[i]._group = group;\n if (i < sorted.length - 1 && this._sortFn(sorted[i], sorted[i + 1]) !== 0) {\n group++;\n }\n }\n this._rules = sorted;\n this._sorted = true;\n };\n /** @internal */\n UrlRules.prototype.ensureSorted = function () {\n this._sorted || this.sort();\n };\n /** @internal */\n UrlRules.prototype.stableSort = function (arr, compareFn) {\n var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); });\n arrOfWrapper.sort(function (wrapperA, wrapperB) {\n var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0 ? wrapperA.idx - wrapperB.idx : cmpDiff;\n });\n return arrOfWrapper.map(function (wrapper) { return wrapper.elem; });\n };\n /**\n * Registers a `matcher` and `handler` for custom URLs handling.\n *\n * The `matcher` can be:\n *\n * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]]\n * - a `string`: The string is compiled to a [[UrlMatcher]]\n * - a `RegExp`: The regexp is used to match the url.\n *\n * The `handler` can be:\n *\n * - a string: The url is redirected to the value of the string.\n * - a function: The url is redirected to the return value of the function.\n *\n * ---\n *\n * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect\n * string is interpolated with parameter values.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(\"/foo/:param1\", \"/bar/:param1\")\n * ```\n *\n * ---\n *\n * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is\n * interpolated with capture groups from the RegExp.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), \"/bar/$1\");\n * ```\n *\n * ---\n *\n * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]).\n * The \"matched value\" differs based on the `matcher`.\n * For [[UrlMatcher]]s, it will be the matched state params.\n * For `RegExp`, it will be the match array from `regexp.exec()`.\n *\n * If the handler returns a string, the URL is redirected to the string.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), match => \"/bar/\" + match[1]);\n * ```\n *\n * Note: the `handler` may also invoke arbitrary code, such as `$state.go()`\n *\n * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`.\n * @param handler The path to redirect to, or a function that returns the path.\n * @param options `{ priority: number }`\n *\n * @return the registered [[UrlRule]]\n */\n UrlRules.prototype.when = function (matcher, handler, options) {\n var rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority))\n rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n return UrlRules;\n}());\nexport { UrlRules };\n//# sourceMappingURL=urlRules.js.map","import { extend, is, isString, pattern } from '../common';\nimport { UrlRules } from './urlRules';\nimport { UrlConfig } from './urlConfig';\nimport { TargetState } from '../state';\n/**\n * API for URL management\n */\nvar UrlService = /** @class */ (function () {\n /** @internal */\n function UrlService(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this.interceptDeferred = false;\n /**\n * The nested [[UrlRules]] API for managing URL rules and rewrites\n *\n * See: [[UrlRules]] for details\n */\n this.rules = new UrlRules(this.router);\n /**\n * The nested [[UrlConfig]] API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfig]] for details\n */\n this.config = new UrlConfig(this.router);\n // Delegate these calls to the current LocationServices implementation\n /**\n * Gets the current url, or updates the url\n *\n * ### Getting the current URL\n *\n * When no arguments are passed, returns the current URL.\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * ### Updating the URL\n *\n * When `newurl` arguments is provided, changes the URL to reflect `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n *\n * @return the url (after potentially being processed)\n */\n this.url = function (newurl, replace, state) {\n return _this.router.locationService.url(newurl, replace, state);\n };\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n this.path = function () { return _this.router.locationService.path(); };\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (query) portion of the url, as an object\n */\n this.search = function () { return _this.router.locationService.search(); };\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n this.hash = function () { return _this.router.locationService.hash(); };\n /**\n * @internal\n *\n * Registers a low level url change handler\n *\n * Note: Because this is a low level handler, it's not recommended for general use.\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n this.onChange = function (callback) { return _this.router.locationService.onChange(callback); };\n }\n /** @internal */\n UrlService.prototype.dispose = function () {\n this.listen(false);\n this.rules.dispose();\n };\n /**\n * Gets the current URL parts\n *\n * This method returns the different parts of the current URL (the [[path]], [[search]], and [[hash]]) as a [[UrlParts]] object.\n */\n UrlService.prototype.parts = function () {\n return { path: this.path(), search: this.search(), hash: this.hash() };\n };\n /**\n * Activates the best rule for the current URL\n *\n * Checks the current URL for a matching [[UrlRule]], then invokes that rule's handler.\n * This method is called internally any time the URL has changed.\n *\n * This effectively activates the state (or redirect, etc) which matches the current URL.\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * // Find the matching URL and invoke the handler.\n * urlService.sync();\n * });\n * ```\n */\n UrlService.prototype.sync = function (evt) {\n if (evt && evt.defaultPrevented)\n return;\n var _a = this.router, urlService = _a.urlService, stateService = _a.stateService;\n var url = { path: urlService.path(), search: urlService.search(), hash: urlService.hash() };\n var best = this.match(url);\n var applyResult = pattern([\n [isString, function (newurl) { return urlService.url(newurl, true); }],\n [TargetState.isDef, function (def) { return stateService.go(def.state, def.params, def.options); }],\n [is(TargetState), function (target) { return stateService.go(target.state(), target.params(), target.options()); }],\n ]);\n applyResult(best && best.rule.handler(best.match, url, this.router));\n };\n /**\n * Starts or stops listening for URL changes\n *\n * Call this sometime after calling [[deferIntercept]] to start monitoring the url.\n * This causes UI-Router to start listening for changes to the URL, if it wasn't already listening.\n *\n * If called with `false`, UI-Router will stop listening (call listen(true) to start listening again).\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * // Start responding to URL changes\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param enabled `true` or `false` to start or stop listening to URL changes\n */\n UrlService.prototype.listen = function (enabled) {\n var _this = this;\n if (enabled === false) {\n this._stopListeningFn && this._stopListeningFn();\n delete this._stopListeningFn;\n }\n else {\n return (this._stopListeningFn =\n this._stopListeningFn || this.router.urlService.onChange(function (evt) { return _this.sync(evt); }));\n }\n };\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * // Prevent UI-Router from automatically intercepting URL changes when it starts;\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n UrlService.prototype.deferIntercept = function (defer) {\n if (defer === undefined)\n defer = true;\n this.interceptDeferred = defer;\n };\n /**\n * Matches a URL\n *\n * Given a URL (as a [[UrlParts]] object), check all rules and determine the best matching rule.\n * Return the result as a [[MatchResult]].\n */\n UrlService.prototype.match = function (url) {\n var _this = this;\n url = extend({ path: '', search: {}, hash: '' }, url);\n var rules = this.rules.rules();\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n var checkRule = function (rule) {\n var match = rule.match(url, _this.router);\n return match && { match: match, rule: rule, weight: rule.matchPriority(match) };\n };\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n var best;\n for (var i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && best.rule._group !== rules[i]._group)\n break;\n var current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = !best || (current && current.weight > best.weight) ? current : best;\n }\n return best;\n };\n return UrlService;\n}());\nexport { UrlService };\n//# sourceMappingURL=urlService.js.map","import { identity, unnestR, isArray, splitEqual, splitHash, splitQuery, } from '../common';\nexport var keyValsToObjectR = function (accum, _a) {\n var key = _a[0], val = _a[1];\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n }\n else if (isArray(accum[key])) {\n accum[key].push(val);\n }\n else {\n accum[key] = [accum[key], val];\n }\n return accum;\n};\nexport var getParams = function (queryString) {\n return queryString.split('&').filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n};\nexport function parseUrl(url) {\n var orEmptyString = function (x) { return x || ''; };\n var _a = splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1];\n var _b = splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1];\n return { path: path, search: search, hash: hash, url: url };\n}\nexport var buildUrl = function (loc) {\n var path = loc.path();\n var searchObject = loc.search();\n var hash = loc.hash();\n var search = Object.keys(searchObject)\n .map(function (key) {\n var param = searchObject[key];\n var vals = isArray(param) ? param : [param];\n return vals.map(function (val) { return key + '=' + val; });\n })\n .reduce(unnestR, [])\n .join('&');\n return path + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n};\nexport function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) {\n return function (uiRouter) {\n var service = (uiRouter.locationService = new serviceClass(uiRouter));\n var configuration = (uiRouter.locationConfig = new configurationClass(uiRouter, isHtml5));\n function dispose(router) {\n router.dispose(service);\n router.dispose(configuration);\n }\n return { name: name, service: service, configuration: configuration, dispose: dispose };\n };\n}\n//# sourceMappingURL=utils.js.map","import { deregAll, isDefined, removeFrom, root } from '../common';\nimport { buildUrl, getParams, parseUrl } from './utils';\n/** A base `LocationServices` */\nvar BaseLocationServices = /** @class */ (function () {\n function BaseLocationServices(router, fireAfterUpdate) {\n var _this = this;\n this.fireAfterUpdate = fireAfterUpdate;\n this._listeners = [];\n this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); };\n this.hash = function () { return parseUrl(_this._get()).hash; };\n this.path = function () { return parseUrl(_this._get()).path; };\n this.search = function () { return getParams(parseUrl(_this._get()).search); };\n this._location = root.location;\n this._history = root.history;\n }\n BaseLocationServices.prototype.url = function (url, replace) {\n if (replace === void 0) { replace = true; }\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n if (this.fireAfterUpdate) {\n this._listeners.forEach(function (cb) { return cb({ url: url }); });\n }\n }\n return buildUrl(this);\n };\n BaseLocationServices.prototype.onChange = function (cb) {\n var _this = this;\n this._listeners.push(cb);\n return function () { return removeFrom(_this._listeners, cb); };\n };\n BaseLocationServices.prototype.dispose = function (router) {\n deregAll(this._listeners);\n };\n return BaseLocationServices;\n}());\nexport { BaseLocationServices };\n//# sourceMappingURL=baseLocationService.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { root, trimHashVal } from '../common';\nimport { BaseLocationServices } from './baseLocationService';\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nvar HashLocationService = /** @class */ (function (_super) {\n __extends(HashLocationService, _super);\n function HashLocationService(router) {\n var _this = _super.call(this, router, false) || this;\n root.addEventListener('hashchange', _this._listener, false);\n return _this;\n }\n HashLocationService.prototype._get = function () {\n return trimHashVal(this._location.hash);\n };\n HashLocationService.prototype._set = function (state, title, url, replace) {\n this._location.hash = url;\n };\n HashLocationService.prototype.dispose = function (router) {\n _super.prototype.dispose.call(this, router);\n root.removeEventListener('hashchange', this._listener);\n };\n return HashLocationService;\n}(BaseLocationServices));\nexport { HashLocationService };\n//# sourceMappingURL=hashLocationService.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BaseLocationServices } from './baseLocationService';\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nvar MemoryLocationService = /** @class */ (function (_super) {\n __extends(MemoryLocationService, _super);\n function MemoryLocationService(router) {\n return _super.call(this, router, true) || this;\n }\n MemoryLocationService.prototype._get = function () {\n return this._url;\n };\n MemoryLocationService.prototype._set = function (state, title, url, replace) {\n this._url = url;\n };\n return MemoryLocationService;\n}(BaseLocationServices));\nexport { MemoryLocationService };\n//# sourceMappingURL=memoryLocationService.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BaseLocationServices } from './baseLocationService';\nimport { root, splitHash, splitQuery, stripLastPathElement } from '../common';\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nvar PushStateLocationService = /** @class */ (function (_super) {\n __extends(PushStateLocationService, _super);\n function PushStateLocationService(router) {\n var _this = _super.call(this, router, true) || this;\n _this._config = router.urlService.config;\n root.addEventListener('popstate', _this._listener, false);\n return _this;\n }\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If <base href='/base/'>, this returns '/base'.\n * If <base href='/foo/base/'>, this returns '/foo/base'.\n * If <base href='/base/index.html'>, this returns '/base'.\n * If <base href='http://localhost:8080/base/index.html'>, this returns '/base'.\n * If <base href='/base'>, this returns ''.\n * If <base href='http://localhost:8080'>, this returns ''.\n * If <base href='http://localhost:8080/'>, this returns ''.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n PushStateLocationService.prototype._getBasePrefix = function () {\n return stripLastPathElement(this._config.baseHref());\n };\n PushStateLocationService.prototype._get = function () {\n var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n var basePrefix = this._getBasePrefix();\n var exactBaseHrefMatch = pathname === this._config.baseHref();\n var startsWithBase = pathname.substr(0, basePrefix.length) === basePrefix;\n pathname = exactBaseHrefMatch ? '/' : startsWithBase ? pathname.substring(basePrefix.length) : pathname;\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n };\n PushStateLocationService.prototype._set = function (state, title, url, replace) {\n var basePrefix = this._getBasePrefix();\n var slash = url && url[0] !== '/' ? '/' : '';\n var fullUrl = url === '' || url === '/' ? this._config.baseHref() : basePrefix + slash + url;\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n }\n else {\n this._history.pushState(state, title, fullUrl);\n }\n };\n PushStateLocationService.prototype.dispose = function (router) {\n _super.prototype.dispose.call(this, router);\n root.removeEventListener('popstate', this._listener);\n };\n return PushStateLocationService;\n}(BaseLocationServices));\nexport { PushStateLocationService };\n//# sourceMappingURL=pushStateLocationService.js.map","import { isDefined, isUndefined } from '../common/predicates';\n/** A `LocationConfig` that delegates to the browser's `location` object */\nvar BrowserLocationConfig = /** @class */ (function () {\n function BrowserLocationConfig(router, _isHtml5) {\n if (_isHtml5 === void 0) { _isHtml5 = false; }\n this._isHtml5 = _isHtml5;\n this._baseHref = undefined;\n this._hashPrefix = '';\n }\n BrowserLocationConfig.prototype.port = function () {\n if (location.port) {\n return Number(location.port);\n }\n return this.protocol() === 'https' ? 443 : 80;\n };\n BrowserLocationConfig.prototype.protocol = function () {\n return location.protocol.replace(/:/g, '');\n };\n BrowserLocationConfig.prototype.host = function () {\n return location.hostname;\n };\n BrowserLocationConfig.prototype.html5Mode = function () {\n return this._isHtml5;\n };\n BrowserLocationConfig.prototype.hashPrefix = function (newprefix) {\n return isDefined(newprefix) ? (this._hashPrefix = newprefix) : this._hashPrefix;\n };\n BrowserLocationConfig.prototype.baseHref = function (href) {\n if (isDefined(href))\n this._baseHref = href;\n if (isUndefined(this._baseHref))\n this._baseHref = this.getBaseHref();\n return this._baseHref;\n };\n BrowserLocationConfig.prototype.getBaseHref = function () {\n var baseTag = document.getElementsByTagName('base')[0];\n if (baseTag && baseTag.href) {\n return baseTag.href.replace(/^([^/:]*:)?\\/\\/[^/]*/, '');\n }\n return this._isHtml5 ? '/' : location.pathname || '/';\n };\n BrowserLocationConfig.prototype.dispose = function () { };\n return BrowserLocationConfig;\n}());\nexport { BrowserLocationConfig };\n//# sourceMappingURL=browserLocationConfig.js.map","import { BrowserLocationConfig } from './browserLocationConfig';\nimport { HashLocationService } from './hashLocationService';\nimport { locationPluginFactory } from './utils';\nimport { PushStateLocationService } from './pushStateLocationService';\nimport { MemoryLocationService } from './memoryLocationService';\nimport { MemoryLocationConfig } from './memoryLocationConfig';\nimport { $injector } from './injector';\nimport { $q } from './q';\nimport { services } from '../common/coreservices';\nexport function servicesPlugin(router) {\n services.$injector = $injector;\n services.$q = $q;\n return { name: 'vanilla.services', $q: $q, $injector: $injector, dispose: function () { return null; } };\n}\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport var hashLocationPlugin = locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport var pushStateLocationPlugin = locationPluginFactory('vanilla.pushStateLocation', true, PushStateLocationService, BrowserLocationConfig);\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport var memoryLocationPlugin = locationPluginFactory('vanilla.memoryLocation', false, MemoryLocationService, MemoryLocationConfig);\n//# sourceMappingURL=plugins.js.map","import { isDefined } from '../common/predicates';\nimport { noop } from '../common/common';\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nvar MemoryLocationConfig = /** @class */ (function () {\n function MemoryLocationConfig() {\n var _this = this;\n this.dispose = noop;\n this._baseHref = '';\n this._port = 80;\n this._protocol = 'http';\n this._host = 'localhost';\n this._hashPrefix = '';\n this.port = function () { return _this._port; };\n this.protocol = function () { return _this._protocol; };\n this.host = function () { return _this._host; };\n this.baseHref = function () { return _this._baseHref; };\n this.html5Mode = function () { return false; };\n this.hashPrefix = function (newval) { return (isDefined(newval) ? (_this._hashPrefix = newval) : _this._hashPrefix); };\n }\n return MemoryLocationConfig;\n}());\nexport { MemoryLocationConfig };\n//# sourceMappingURL=memoryLocationConfig.js.map","import { equals, applyPairs, removeFrom, inArray, find } from '../common/common';\nimport { curry, prop } from '../common/hof';\nimport { isString, isArray } from '../common/predicates';\nimport { trace } from '../common/trace';\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nvar ViewService = /** @class */ (function () {\n /** @internal */\n function ViewService(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this._uiViews = [];\n /** @internal */ this._viewConfigs = [];\n /** @internal */ this._viewConfigFactories = {};\n /** @internal */ this._listeners = [];\n /** @internal */\n this._pluginapi = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIView: function (id) { return find(_this._uiViews, function (view) { return _this.router.$id + \".\" + view.id === id; }); },\n _registeredUIViews: function () { return _this._uiViews; },\n _activeViewConfigs: function () { return _this._viewConfigs; },\n _onSync: function (listener) {\n _this._listeners.push(listener);\n return function () { return removeFrom(_this._listeners, listener); };\n },\n };\n }\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n ViewService.normalizeUIViewTarget = function (context, rawViewName) {\n if (rawViewName === void 0) { rawViewName = ''; }\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n var viewAtContext = rawViewName.split('@');\n var uiViewName = viewAtContext[0] || '$default'; // default to unnamed view\n var uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : '^'; // default to parent context\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n var relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = ''; // target absolutely from root\n }\n // handle parent relative targeting \"^.^.^\"\n var relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n var anchorState = uiViewContextAnchor.split('.').reduce(function (anchor, x) { return anchor.parent; }, context);\n uiViewContextAnchor = anchorState.name;\n }\n else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor };\n };\n /** @internal */\n ViewService.prototype._rootViewContext = function (context) {\n return (this._rootContext = context || this._rootContext);\n };\n /** @internal */\n ViewService.prototype._viewConfigFactory = function (viewType, factory) {\n this._viewConfigFactories[viewType] = factory;\n };\n ViewService.prototype.createViewConfig = function (path, decl) {\n var cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory)\n throw new Error('ViewService: No view config factory registered for type ' + decl.$type);\n var cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n };\n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n ViewService.prototype.deactivateViewConfig = function (viewConfig) {\n trace.traceViewServiceEvent('<- Removing', viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n };\n ViewService.prototype.activateViewConfig = function (viewConfig) {\n trace.traceViewServiceEvent('-> Registering', viewConfig);\n this._viewConfigs.push(viewConfig);\n };\n ViewService.prototype.sync = function () {\n var _this = this;\n var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(applyPairs, {});\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView) {\n var stateDepth = function (context) { return (context && context.parent ? stateDepth(context.parent) + 1 : 1); };\n return uiView.fqn.split('.').length * 10000 + stateDepth(uiView.creationContext);\n }\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config) {\n var context = config.viewDecl.$context, count = 0;\n while (++count && context.parent)\n context = context.parent;\n return count;\n }\n // Given a depth function, returns a compare function which can return either ascending or descending order\n var depthCompare = curry(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); });\n var matchingConfigPair = function (uiView) {\n var matchingConfigs = _this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return { uiView: uiView, viewConfig: matchingConfigs[0] };\n };\n var configureUIView = function (tuple) {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (_this._uiViews.indexOf(tuple.uiView) !== -1)\n tuple.uiView.configUpdated(tuple.viewConfig);\n };\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n var uiViewTuples = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n var matchedViewConfigs = uiViewTuples.map(function (tuple) { return tuple.viewConfig; });\n var unmatchedConfigTuples = this._viewConfigs\n .filter(function (config) { return !inArray(matchedViewConfigs, config); })\n .map(function (viewConfig) { return ({ uiView: undefined, viewConfig: viewConfig }); });\n uiViewTuples.forEach(configureUIView);\n var allTuples = uiViewTuples.concat(unmatchedConfigTuples);\n this._listeners.forEach(function (cb) { return cb(allTuples); });\n trace.traceViewSync(allTuples);\n };\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n ViewService.prototype.registerUIView = function (uiView) {\n trace.traceViewServiceUIViewEvent('-> Registering', uiView);\n var uiViews = this._uiViews;\n var fqnAndTypeMatches = function (uiv) { return uiv.fqn === uiView.fqn && uiv.$type === uiView.$type; };\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent('!!!! duplicate uiView named:', uiView);\n uiViews.push(uiView);\n this.sync();\n return function () {\n var idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent('Tried removing non-registered uiView', uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent('<- Deregistering', uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n ViewService.prototype.available = function () {\n return this._uiViews.map(prop('fqn'));\n };\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n ViewService.prototype.active = function () {\n return this._uiViews.filter(prop('$config')).map(prop('name'));\n };\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * <ui-view> <!-- created in the root context (name: \"\") -->\n * <ui-view name=\"foo\"> <!-- created in the context named: \"A\" -->\n * <ui-view> <!-- created in the context named: \"A.B\" -->\n * <ui-view name=\"bar\"> <!-- created in the context named: \"A.B.C\" -->\n * </ui-view>\n * </ui-view>\n * </ui-view>\n * </ui-view>\n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internal\n */\n ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type)\n return false;\n // Split names apart from both viewConfig and uiView into segments\n var vc = viewConfig.viewDecl;\n var vcSegments = vc.$uiViewName.split('.');\n var uivSegments = uiView.fqn.split('.');\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n var negOffset = 1 - vcSegments.length || undefined;\n var fqnToFirstSegment = uivSegments.slice(0, negOffset).join('.');\n var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }; };\n return ViewService;\n}());\nexport { ViewService };\n//# sourceMappingURL=view.js.map","/**\n * @license AngularJS v1.8.3\n * (c) 2010-2020 Google LLC. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\nvar ELEMENT_NODE = 1;\nvar COMMENT_NODE = 8;\n\nvar ADD_CLASS_SUFFIX = '-add';\nvar REMOVE_CLASS_SUFFIX = '-remove';\nvar EVENT_CLASS_PREFIX = 'ng-';\nvar ACTIVE_CLASS_SUFFIX = '-active';\nvar PREPARE_CLASS_SUFFIX = '-prepare';\n\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\nvar NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';\n\n// Detect proper transitionend/animationend event names.\nvar CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n// If unprefixed events are not supported but webkit-prefixed are, use the latter.\n// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n// Register both events in case `window.onanimationend` is not supported because of that,\n// do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n// therefore there is no reason to test anymore for other vendor prefixes:\n// http://caniuse.com/#search=transition\nif ((window.ontransitionend === undefined) && (window.onwebkittransitionend !== undefined)) {\n CSS_PREFIX = '-webkit-';\n TRANSITION_PROP = 'WebkitTransition';\n TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n} else {\n TRANSITION_PROP = 'transition';\n TRANSITIONEND_EVENT = 'transitionend';\n}\n\nif ((window.onanimationend === undefined) && (window.onwebkitanimationend !== undefined)) {\n CSS_PREFIX = '-webkit-';\n ANIMATION_PROP = 'WebkitAnimation';\n ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n} else {\n ANIMATION_PROP = 'animation';\n ANIMATIONEND_EVENT = 'animationend';\n}\n\nvar DURATION_KEY = 'Duration';\nvar PROPERTY_KEY = 'Property';\nvar DELAY_KEY = 'Delay';\nvar TIMING_KEY = 'TimingFunction';\nvar ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\nvar ANIMATION_PLAYSTATE_KEY = 'PlayState';\nvar SAFE_FAST_FORWARD_DURATION_VALUE = 9999;\n\nvar ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;\nvar ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;\nvar TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;\nvar TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;\n\nvar ngMinErr = angular.$$minErr('ng');\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', 'Argument \\'{0}\\' is {1}', (name || '?'), (reason || 'required'));\n }\n return arg;\n}\n\nfunction mergeClasses(a,b) {\n if (!a && !b) return '';\n if (!a) return b;\n if (!b) return a;\n if (isArray(a)) a = a.join(' ');\n if (isArray(b)) b = b.join(' ');\n return a + ' ' + b;\n}\n\nfunction packageStyles(options) {\n var styles = {};\n if (options && (options.to || options.from)) {\n styles.to = options.to;\n styles.from = options.from;\n }\n return styles;\n}\n\nfunction pendClasses(classes, fix, isPrefix) {\n var className = '';\n classes = isArray(classes)\n ? classes\n : classes && isString(classes) && classes.length\n ? classes.split(/\\s+/)\n : [];\n forEach(classes, function(klass, i) {\n if (klass && klass.length > 0) {\n className += (i > 0) ? ' ' : '';\n className += isPrefix ? fix + klass\n : klass + fix;\n }\n });\n return className;\n}\n\nfunction removeFromArray(arr, val) {\n var index = arr.indexOf(val);\n if (val >= 0) {\n arr.splice(index, 1);\n }\n}\n\nfunction stripCommentsFromElement(element) {\n if (element instanceof jqLite) {\n switch (element.length) {\n case 0:\n return element;\n\n case 1:\n // there is no point of stripping anything if the element\n // is the only element within the jqLite wrapper.\n // (it's important that we retain the element instance.)\n if (element[0].nodeType === ELEMENT_NODE) {\n return element;\n }\n break;\n\n default:\n return jqLite(extractElementNode(element));\n }\n }\n\n if (element.nodeType === ELEMENT_NODE) {\n return jqLite(element);\n }\n}\n\nfunction extractElementNode(element) {\n if (!element[0]) return element;\n for (var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType === ELEMENT_NODE) {\n return elm;\n }\n }\n}\n\nfunction $$addClass($$jqLite, element, className) {\n forEach(element, function(elm) {\n $$jqLite.addClass(elm, className);\n });\n}\n\nfunction $$removeClass($$jqLite, element, className) {\n forEach(element, function(elm) {\n $$jqLite.removeClass(elm, className);\n });\n}\n\nfunction applyAnimationClassesFactory($$jqLite) {\n return function(element, options) {\n if (options.addClass) {\n $$addClass($$jqLite, element, options.addClass);\n options.addClass = null;\n }\n if (options.removeClass) {\n $$removeClass($$jqLite, element, options.removeClass);\n options.removeClass = null;\n }\n };\n}\n\nfunction prepareAnimationOptions(options) {\n options = options || {};\n if (!options.$$prepared) {\n var domOperation = options.domOperation || noop;\n options.domOperation = function() {\n options.$$domOperationFired = true;\n domOperation();\n domOperation = noop;\n };\n options.$$prepared = true;\n }\n return options;\n}\n\nfunction applyAnimationStyles(element, options) {\n applyAnimationFromStyles(element, options);\n applyAnimationToStyles(element, options);\n}\n\nfunction applyAnimationFromStyles(element, options) {\n if (options.from) {\n element.css(options.from);\n options.from = null;\n }\n}\n\nfunction applyAnimationToStyles(element, options) {\n if (options.to) {\n element.css(options.to);\n options.to = null;\n }\n}\n\nfunction mergeAnimationDetails(element, oldAnimation, newAnimation) {\n var target = oldAnimation.options || {};\n var newOptions = newAnimation.options || {};\n\n var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');\n var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');\n var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);\n\n if (newOptions.preparationClasses) {\n target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);\n delete newOptions.preparationClasses;\n }\n\n // noop is basically when there is no callback; otherwise something has been set\n var realDomOperation = target.domOperation !== noop ? target.domOperation : null;\n\n extend(target, newOptions);\n\n // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.\n if (realDomOperation) {\n target.domOperation = realDomOperation;\n }\n\n if (classes.addClass) {\n target.addClass = classes.addClass;\n } else {\n target.addClass = null;\n }\n\n if (classes.removeClass) {\n target.removeClass = classes.removeClass;\n } else {\n target.removeClass = null;\n }\n\n oldAnimation.addClass = target.addClass;\n oldAnimation.removeClass = target.removeClass;\n\n return target;\n}\n\nfunction resolveElementClasses(existing, toAdd, toRemove) {\n var ADD_CLASS = 1;\n var REMOVE_CLASS = -1;\n\n var flags = {};\n existing = splitClassesToLookup(existing);\n\n toAdd = splitClassesToLookup(toAdd);\n forEach(toAdd, function(value, key) {\n flags[key] = ADD_CLASS;\n });\n\n toRemove = splitClassesToLookup(toRemove);\n forEach(toRemove, function(value, key) {\n flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;\n });\n\n var classes = {\n addClass: '',\n removeClass: ''\n };\n\n forEach(flags, function(val, klass) {\n var prop, allow;\n if (val === ADD_CLASS) {\n prop = 'addClass';\n allow = !existing[klass] || existing[klass + REMOVE_CLASS_SUFFIX];\n } else if (val === REMOVE_CLASS) {\n prop = 'removeClass';\n allow = existing[klass] || existing[klass + ADD_CLASS_SUFFIX];\n }\n if (allow) {\n if (classes[prop].length) {\n classes[prop] += ' ';\n }\n classes[prop] += klass;\n }\n });\n\n function splitClassesToLookup(classes) {\n if (isString(classes)) {\n classes = classes.split(' ');\n }\n\n var obj = {};\n forEach(classes, function(klass) {\n // sometimes the split leaves empty string values\n // incase extra spaces were applied to the options\n if (klass.length) {\n obj[klass] = true;\n }\n });\n return obj;\n }\n\n return classes;\n}\n\nfunction getDomNode(element) {\n return (element instanceof jqLite) ? element[0] : element;\n}\n\nfunction applyGeneratedPreparationClasses($$jqLite, element, event, options) {\n var classes = '';\n if (event) {\n classes = pendClasses(event, EVENT_CLASS_PREFIX, true);\n }\n if (options.addClass) {\n classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX));\n }\n if (options.removeClass) {\n classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX));\n }\n if (classes.length) {\n options.preparationClasses = classes;\n element.addClass(classes);\n }\n}\n\nfunction clearGeneratedClasses(element, options) {\n if (options.preparationClasses) {\n element.removeClass(options.preparationClasses);\n options.preparationClasses = null;\n }\n if (options.activeClasses) {\n element.removeClass(options.activeClasses);\n options.activeClasses = null;\n }\n}\n\nfunction blockKeyframeAnimations(node, applyBlock) {\n var value = applyBlock ? 'paused' : '';\n var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY;\n applyInlineStyle(node, [key, value]);\n return [key, value];\n}\n\nfunction applyInlineStyle(node, styleTuple) {\n var prop = styleTuple[0];\n var value = styleTuple[1];\n node.style[prop] = value;\n}\n\nfunction concatWithSpace(a,b) {\n if (!a) return b;\n if (!b) return a;\n return a + ' ' + b;\n}\n\nvar helpers = {\n blockTransitions: function(node, duration) {\n // we use a negative delay value since it performs blocking\n // yet it doesn't kill any existing transitions running on the\n // same element which makes this safe for class-based animations\n var value = duration ? '-' + duration + 's' : '';\n applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);\n return [TRANSITION_DELAY_PROP, value];\n }\n};\n\nvar $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {\n var queue, cancelFn;\n\n function scheduler(tasks) {\n // we make a copy since RAFScheduler mutates the state\n // of the passed in array variable and this would be difficult\n // to track down on the outside code\n queue = queue.concat(tasks);\n nextTick();\n }\n\n queue = scheduler.queue = [];\n\n /* waitUntilQuiet does two things:\n * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through\n * 2. It will delay the next wave of tasks from running until the quiet `fn` has run.\n *\n * The motivation here is that animation code can request more time from the scheduler\n * before the next wave runs. This allows for certain DOM properties such as classes to\n * be resolved in time for the next animation to run.\n */\n scheduler.waitUntilQuiet = function(fn) {\n if (cancelFn) cancelFn();\n\n cancelFn = $$rAF(function() {\n cancelFn = null;\n fn();\n nextTick();\n });\n };\n\n return scheduler;\n\n function nextTick() {\n if (!queue.length) return;\n\n var items = queue.shift();\n for (var i = 0; i < items.length; i++) {\n items[i]();\n }\n\n if (!cancelFn) {\n $$rAF(function() {\n if (!cancelFn) nextTick();\n });\n }\n }\n}];\n\n/**\n * @ngdoc directive\n * @name ngAnimateChildren\n * @restrict AE\n * @element ANY\n *\n * @description\n *\n * ngAnimateChildren allows you to specify that children of this element should animate even if any\n * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`\n * (structural) animation, child elements that also have an active structural animation are not animated.\n *\n * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).\n *\n *\n * @param {string} ngAnimateChildren If the value is empty, `true` or `on`,\n * then child animations are allowed. If the value is `false`, child animations are not allowed.\n *\n * @example\n * <example module=\"ngAnimateChildren\" name=\"ngAnimateChildren\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"MainController as main\">\n <label>Show container? <input type=\"checkbox\" ng-model=\"main.enterElement\" /></label>\n <label>Animate children? <input type=\"checkbox\" ng-model=\"main.animateChildren\" /></label>\n <hr>\n <div ng-animate-children=\"{{main.animateChildren}}\">\n <div ng-if=\"main.enterElement\" class=\"container\">\n List of items:\n <div ng-repeat=\"item in [0, 1, 2, 3]\" class=\"item\">Item {{item}}</div>\n </div>\n </div>\n </div>\n </file>\n <file name=\"animations.css\">\n\n .container.ng-enter,\n .container.ng-leave {\n transition: all ease 1.5s;\n }\n\n .container.ng-enter,\n .container.ng-leave-active {\n opacity: 0;\n }\n\n .container.ng-leave,\n .container.ng-enter-active {\n opacity: 1;\n }\n\n .item {\n background: firebrick;\n color: #FFF;\n margin-bottom: 10px;\n }\n\n .item.ng-enter,\n .item.ng-leave {\n transition: transform 1.5s ease;\n }\n\n .item.ng-enter {\n transform: translateX(50px);\n }\n\n .item.ng-enter-active {\n transform: translateX(0);\n }\n </file>\n <file name=\"script.js\">\n angular.module('ngAnimateChildren', ['ngAnimate'])\n .controller('MainController', function MainController() {\n this.animateChildren = false;\n this.enterElement = false;\n });\n </file>\n </example>\n */\nvar $$AnimateChildrenDirective = ['$interpolate', function($interpolate) {\n return {\n link: function(scope, element, attrs) {\n var val = attrs.ngAnimateChildren;\n if (isString(val) && val.length === 0) { //empty attribute\n element.data(NG_ANIMATE_CHILDREN_DATA, true);\n } else {\n // Interpolate and set the value, so that it is available to\n // animations that run right after compilation\n setData($interpolate(val)(scope));\n attrs.$observe('ngAnimateChildren', setData);\n }\n\n function setData(value) {\n value = value === 'on' || value === 'true';\n element.data(NG_ANIMATE_CHILDREN_DATA, value);\n }\n }\n };\n}];\n\n/* exported $AnimateCssProvider */\n\nvar ANIMATE_TIMER_KEY = '$$animateCss';\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n *\n * @description\n * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes\n * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT\n * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or\n * directives to create more complex animations that can be purely driven using CSS code.\n *\n * Note that only browsers that support CSS transitions and/or keyframe animations are capable of\n * rendering animations triggered via `$animateCss` (bad news for IE9 and lower).\n *\n * ## General Use\n * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that\n * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however,\n * any automatic control over cancelling animations and/or preventing animations from being run on\n * child elements will not be handled by AngularJS. For this to work as expected, please use `$animate` to\n * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger\n * the CSS animation.\n *\n * The example below shows how we can create a folding animation on an element using `ng-if`:\n *\n * ```html\n * <!-- notice the `fold-animation` CSS class -->\n * <div ng-if=\"onOff\" class=\"fold-animation\">\n * This element will go BOOM\n * </div>\n * <button ng-click=\"onOff=true\">Fold In</button>\n * ```\n *\n * Now we create the **JavaScript animation** that will trigger the CSS transition:\n *\n * ```js\n * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element, doneFn) {\n * var height = element[0].offsetHeight;\n * return $animateCss(element, {\n * from: { height:'0px' },\n * to: { height:height + 'px' },\n * duration: 1 // one second\n * });\n * }\n * }\n * }]);\n * ```\n *\n * ## More Advanced Uses\n *\n * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks\n * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code.\n *\n * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation,\n * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with\n * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order\n * to provide a working animation that will run in CSS.\n *\n * The example below showcases a more advanced version of the `.fold-animation` from the example above:\n *\n * ```js\n * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element, doneFn) {\n * var height = element[0].offsetHeight;\n * return $animateCss(element, {\n * addClass: 'red large-text pulse-twice',\n * easing: 'ease-out',\n * from: { height:'0px' },\n * to: { height:height + 'px' },\n * duration: 1 // one second\n * });\n * }\n * }\n * }]);\n * ```\n *\n * Since we're adding/removing CSS classes then the CSS transition will also pick those up:\n *\n * ```css\n * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code,\n * the CSS classes below will be transitioned despite them being defined as regular CSS classes */\n * .red { background:red; }\n * .large-text { font-size:20px; }\n *\n * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */\n * .pulse-twice {\n * animation: 0.5s pulse linear 2;\n * -webkit-animation: 0.5s pulse linear 2;\n * }\n *\n * @keyframes pulse {\n * from { transform: scale(0.5); }\n * to { transform: scale(1.5); }\n * }\n *\n * @-webkit-keyframes pulse {\n * from { -webkit-transform: scale(0.5); }\n * to { -webkit-transform: scale(1.5); }\n * }\n * ```\n *\n * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen.\n *\n * ## How the Options are handled\n *\n * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation\n * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline\n * styles using the `from` and `to` properties.\n *\n * ```js\n * var animator = $animateCss(element, {\n * from: { background:'red' },\n * to: { background:'blue' }\n * });\n * animator.start();\n * ```\n *\n * ```css\n * .rotating-animation {\n * animation:0.5s rotate linear;\n * -webkit-animation:0.5s rotate linear;\n * }\n *\n * @keyframes rotate {\n * from { transform: rotate(0deg); }\n * to { transform: rotate(360deg); }\n * }\n *\n * @-webkit-keyframes rotate {\n * from { -webkit-transform: rotate(0deg); }\n * to { -webkit-transform: rotate(360deg); }\n * }\n * ```\n *\n * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is\n * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition\n * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition\n * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied\n * and spread across the transition and keyframe animation.\n *\n * ## What is returned\n *\n * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually\n * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are\n * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties:\n *\n * ```js\n * var animator = $animateCss(element, { ... });\n * ```\n *\n * Now what do the contents of our `animator` variable look like:\n *\n * ```js\n * {\n * // starts the animation\n * start: Function,\n *\n * // ends (aborts) the animation\n * end: Function\n * }\n * ```\n *\n * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends.\n * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been\n * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties\n * and that changing them will not reconfigure the parameters of the animation.\n *\n * ### runner.done() vs runner.then()\n * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the\n * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**.\n * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()`\n * unless you really need a digest to kick off afterwards.\n *\n * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss\n * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code).\n * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works.\n *\n * @param {DOMElement} element the element that will be animated\n * @param {object} options the animation-related options that will be applied during the animation\n *\n * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied\n * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)\n * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and\n * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted.\n * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both).\n * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`).\n * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`).\n * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation.\n * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.\n * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation.\n * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation.\n * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0`\n * is provided then the animation will be skipped entirely.\n * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is\n * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value\n * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same\n * CSS delay value.\n * * `stagger` - A numeric time value representing the delay between successively animated elements\n * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.})\n * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a\n * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)\n * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.)\n * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once\n * the animation is closed. This is useful for when the styles are used purely for the sake of\n * the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation).\n * By default this value is set to `false`.\n *\n * @return {object} an object with start and end methods and details about the animation.\n *\n * * `start` - The method to start the animation. This will return a `Promise` when called.\n * * `end` - This method will cancel the animation and remove all applied CSS classes and styles.\n */\nvar ONE_SECOND = 1000;\n\nvar ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nvar CLOSING_TIME_BUFFER = 1.5;\n\nvar DETECT_CSS_PROPERTIES = {\n transitionDuration: TRANSITION_DURATION_PROP,\n transitionDelay: TRANSITION_DELAY_PROP,\n transitionProperty: TRANSITION_PROP + PROPERTY_KEY,\n animationDuration: ANIMATION_DURATION_PROP,\n animationDelay: ANIMATION_DELAY_PROP,\n animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY\n};\n\nvar DETECT_STAGGER_CSS_PROPERTIES = {\n transitionDuration: TRANSITION_DURATION_PROP,\n transitionDelay: TRANSITION_DELAY_PROP,\n animationDuration: ANIMATION_DURATION_PROP,\n animationDelay: ANIMATION_DELAY_PROP\n};\n\nfunction getCssKeyframeDurationStyle(duration) {\n return [ANIMATION_DURATION_PROP, duration + 's'];\n}\n\nfunction getCssDelayStyle(delay, isKeyframeAnimation) {\n var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP;\n return [prop, delay + 's'];\n}\n\nfunction computeCssStyles($window, element, properties) {\n var styles = Object.create(null);\n var detectedStyles = $window.getComputedStyle(element) || {};\n forEach(properties, function(formalStyleName, actualStyleName) {\n var val = detectedStyles[formalStyleName];\n if (val) {\n var c = val.charAt(0);\n\n // only numerical-based values have a negative sign or digit as the first value\n if (c === '-' || c === '+' || c >= 0) {\n val = parseMaxTime(val);\n }\n\n // by setting this to null in the event that the delay is not set or is set directly as 0\n // then we can still allow for negative values to be used later on and not mistake this\n // value for being greater than any other negative value.\n if (val === 0) {\n val = null;\n }\n styles[actualStyleName] = val;\n }\n });\n\n return styles;\n}\n\nfunction parseMaxTime(str) {\n var maxValue = 0;\n var values = str.split(/\\s*,\\s*/);\n forEach(values, function(value) {\n // it's always safe to consider only second values and omit `ms` values since\n // getComputedStyle will always handle the conversion for us\n if (value.charAt(value.length - 1) === 's') {\n value = value.substring(0, value.length - 1);\n }\n value = parseFloat(value) || 0;\n maxValue = maxValue ? Math.max(value, maxValue) : value;\n });\n return maxValue;\n}\n\nfunction truthyTimingValue(val) {\n return val === 0 || val != null;\n}\n\nfunction getCssTransitionDurationStyle(duration, applyOnlyDuration) {\n var style = TRANSITION_PROP;\n var value = duration + 's';\n if (applyOnlyDuration) {\n style += DURATION_KEY;\n } else {\n value += ' linear all';\n }\n return [style, value];\n}\n\n// we do not reassign an already present style value since\n// if we detect the style property value again we may be\n// detecting styles that were added via the `from` styles.\n// We make use of `isDefined` here since an empty string\n// or null value (which is what getPropertyValue will return\n// for a non-existing style) will still be marked as a valid\n// value for the style (a falsy value implies that the style\n// is to be removed at the end of the animation). If we had a simple\n// \"OR\" statement then it would not be enough to catch that.\nfunction registerRestorableStyles(backup, node, properties) {\n forEach(properties, function(prop) {\n backup[prop] = isDefined(backup[prop])\n ? backup[prop]\n : node.style.getPropertyValue(prop);\n });\n}\n\nvar $AnimateCssProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n\n this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', '$$animateCache',\n '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue',\n function($window, $$jqLite, $$AnimateRunner, $timeout, $$animateCache,\n $$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) {\n\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n function computeCachedCssStyles(node, className, cacheKey, allowNoDuration, properties) {\n var timings = $$animateCache.get(cacheKey);\n\n if (!timings) {\n timings = computeCssStyles($window, node, properties);\n if (timings.animationIterationCount === 'infinite') {\n timings.animationIterationCount = 1;\n }\n }\n\n // if a css animation has no duration we\n // should mark that so that repeated addClass/removeClass calls are skipped\n var hasDuration = allowNoDuration || (timings.transitionDuration > 0 || timings.animationDuration > 0);\n\n // we keep putting this in multiple times even though the value and the cacheKey are the same\n // because we're keeping an internal tally of how many duplicate animations are detected.\n $$animateCache.put(cacheKey, timings, hasDuration);\n\n return timings;\n }\n\n function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {\n var stagger;\n var staggerCacheKey = 'stagger-' + cacheKey;\n\n // if we have one or more existing matches of matching elements\n // containing the same parent + CSS styles (which is how cacheKey works)\n // then staggering is possible\n if ($$animateCache.count(cacheKey) > 0) {\n stagger = $$animateCache.get(staggerCacheKey);\n\n if (!stagger) {\n var staggerClassName = pendClasses(className, '-stagger');\n\n $$jqLite.addClass(node, staggerClassName);\n\n stagger = computeCssStyles($window, node, properties);\n\n // force the conversion of a null value to zero incase not set\n stagger.animationDuration = Math.max(stagger.animationDuration, 0);\n stagger.transitionDuration = Math.max(stagger.transitionDuration, 0);\n\n $$jqLite.removeClass(node, staggerClassName);\n\n $$animateCache.put(staggerCacheKey, stagger, true);\n }\n }\n\n return stagger || {};\n }\n\n var rafWaitQueue = [];\n function waitUntilQuiet(callback) {\n rafWaitQueue.push(callback);\n $$rAFScheduler.waitUntilQuiet(function() {\n $$animateCache.flush();\n\n // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.\n // PLEASE EXAMINE THE `$$forceReflow` service to understand why.\n var pageWidth = $$forceReflow();\n\n // we use a for loop to ensure that if the queue is changed\n // during this looping then it will consider new requests\n for (var i = 0; i < rafWaitQueue.length; i++) {\n rafWaitQueue[i](pageWidth);\n }\n rafWaitQueue.length = 0;\n });\n }\n\n function computeTimings(node, className, cacheKey, allowNoDuration) {\n var timings = computeCachedCssStyles(node, className, cacheKey, allowNoDuration, DETECT_CSS_PROPERTIES);\n var aD = timings.animationDelay;\n var tD = timings.transitionDelay;\n timings.maxDelay = aD && tD\n ? Math.max(aD, tD)\n : (aD || tD);\n timings.maxDuration = Math.max(\n timings.animationDuration * timings.animationIterationCount,\n timings.transitionDuration);\n\n return timings;\n }\n\n return function init(element, initialOptions) {\n // all of the animation functions should create\n // a copy of the options data, however, if a\n // parent service has already created a copy then\n // we should stick to using that\n var options = initialOptions || {};\n if (!options.$$prepared) {\n options = prepareAnimationOptions(copy(options));\n }\n\n var restoreStyles = {};\n var node = getDomNode(element);\n if (!node\n || !node.parentNode\n || !$$animateQueue.enabled()) {\n return closeAndReturnNoopAnimator();\n }\n\n var temporaryStyles = [];\n var classes = element.attr('class');\n var styles = packageStyles(options);\n var animationClosed;\n var animationPaused;\n var animationCompleted;\n var runner;\n var runnerHost;\n var maxDelay;\n var maxDelayTime;\n var maxDuration;\n var maxDurationTime;\n var startTime;\n var events = [];\n\n if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) {\n return closeAndReturnNoopAnimator();\n }\n\n var method = options.event && isArray(options.event)\n ? options.event.join(' ')\n : options.event;\n\n var isStructural = method && options.structural;\n var structuralClassName = '';\n var addRemoveClassName = '';\n\n if (isStructural) {\n structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true);\n } else if (method) {\n structuralClassName = method;\n }\n\n if (options.addClass) {\n addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX);\n }\n\n if (options.removeClass) {\n if (addRemoveClassName.length) {\n addRemoveClassName += ' ';\n }\n addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX);\n }\n\n // there may be a situation where a structural animation is combined together\n // with CSS classes that need to resolve before the animation is computed.\n // However this means that there is no explicit CSS code to block the animation\n // from happening (by setting 0s none in the class name). If this is the case\n // we need to apply the classes before the first rAF so we know to continue if\n // there actually is a detected transition or keyframe animation\n if (options.applyClassesEarly && addRemoveClassName.length) {\n applyAnimationClasses(element, options);\n }\n\n var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim();\n var fullClassName = classes + ' ' + preparationClasses;\n var hasToStyles = styles.to && Object.keys(styles.to).length > 0;\n var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0;\n\n // there is no way we can trigger an animation if no styles and\n // no classes are being applied which would then trigger a transition,\n // unless there a is raw keyframe value that is applied to the element.\n if (!containsKeyframeAnimation\n && !hasToStyles\n && !preparationClasses) {\n return closeAndReturnNoopAnimator();\n }\n\n var stagger, cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);\n if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) {\n preparationClasses = null;\n return closeAndReturnNoopAnimator();\n }\n\n if (options.stagger > 0) {\n var staggerVal = parseFloat(options.stagger);\n stagger = {\n transitionDelay: staggerVal,\n animationDelay: staggerVal,\n transitionDuration: 0,\n animationDuration: 0\n };\n } else {\n stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES);\n }\n\n if (!options.$$skipPreparationClasses) {\n $$jqLite.addClass(element, preparationClasses);\n }\n\n var applyOnlyDuration;\n\n if (options.transitionStyle) {\n var transitionStyle = [TRANSITION_PROP, options.transitionStyle];\n applyInlineStyle(node, transitionStyle);\n temporaryStyles.push(transitionStyle);\n }\n\n if (options.duration >= 0) {\n applyOnlyDuration = node.style[TRANSITION_PROP].length > 0;\n var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration);\n\n // we set the duration so that it will be picked up by getComputedStyle later\n applyInlineStyle(node, durationStyle);\n temporaryStyles.push(durationStyle);\n }\n\n if (options.keyframeStyle) {\n var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle];\n applyInlineStyle(node, keyframeStyle);\n temporaryStyles.push(keyframeStyle);\n }\n\n var itemIndex = stagger\n ? options.staggerIndex >= 0\n ? options.staggerIndex\n : $$animateCache.count(cacheKey)\n : 0;\n\n var isFirst = itemIndex === 0;\n\n // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY\n // without causing any combination of transitions to kick in. By adding a negative delay value\n // it forces the setup class' transition to end immediately. We later then remove the negative\n // transition delay to allow for the transition to naturally do it's thing. The beauty here is\n // that if there is no transition defined then nothing will happen and this will also allow\n // other transitions to be stacked on top of each other without any chopping them out.\n if (isFirst && !options.skipBlocking) {\n helpers.blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);\n }\n\n var timings = computeTimings(node, fullClassName, cacheKey, !isStructural);\n var relativeDelay = timings.maxDelay;\n maxDelay = Math.max(relativeDelay, 0);\n maxDuration = timings.maxDuration;\n\n var flags = {};\n flags.hasTransitions = timings.transitionDuration > 0;\n flags.hasAnimations = timings.animationDuration > 0;\n flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty === 'all';\n flags.applyTransitionDuration = hasToStyles && (\n (flags.hasTransitions && !flags.hasTransitionAll)\n || (flags.hasAnimations && !flags.hasTransitions));\n flags.applyAnimationDuration = options.duration && flags.hasAnimations;\n flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions);\n flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations;\n flags.recalculateTimingStyles = addRemoveClassName.length > 0;\n\n if (flags.applyTransitionDuration || flags.applyAnimationDuration) {\n maxDuration = options.duration ? parseFloat(options.duration) : maxDuration;\n\n if (flags.applyTransitionDuration) {\n flags.hasTransitions = true;\n timings.transitionDuration = maxDuration;\n applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0;\n temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration));\n }\n\n if (flags.applyAnimationDuration) {\n flags.hasAnimations = true;\n timings.animationDuration = maxDuration;\n temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));\n }\n }\n\n if (maxDuration === 0 && !flags.recalculateTimingStyles) {\n return closeAndReturnNoopAnimator();\n }\n\n var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);\n\n if (options.delay != null) {\n var delayStyle;\n if (typeof options.delay !== 'boolean') {\n delayStyle = parseFloat(options.delay);\n // number in options.delay means we have to recalculate the delay for the closing timeout\n maxDelay = Math.max(delayStyle, 0);\n }\n\n if (flags.applyTransitionDelay) {\n temporaryStyles.push(getCssDelayStyle(delayStyle));\n }\n\n if (flags.applyAnimationDelay) {\n temporaryStyles.push(getCssDelayStyle(delayStyle, true));\n }\n }\n\n // we need to recalculate the delay value since we used a pre-emptive negative\n // delay value and the delay value is required for the final event checking. This\n // property will ensure that this will happen after the RAF phase has passed.\n if (options.duration == null && timings.transitionDuration > 0) {\n flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst;\n }\n\n maxDelayTime = maxDelay * ONE_SECOND;\n maxDurationTime = maxDuration * ONE_SECOND;\n if (!options.skipBlocking) {\n flags.blockTransition = timings.transitionDuration > 0;\n flags.blockKeyframeAnimation = timings.animationDuration > 0 &&\n stagger.animationDelay > 0 &&\n stagger.animationDuration === 0;\n }\n\n if (options.from) {\n if (options.cleanupStyles) {\n registerRestorableStyles(restoreStyles, node, Object.keys(options.from));\n }\n applyAnimationFromStyles(element, options);\n }\n\n if (flags.blockTransition || flags.blockKeyframeAnimation) {\n applyBlocking(maxDuration);\n } else if (!options.skipBlocking) {\n helpers.blockTransitions(node, false);\n }\n\n // TODO(matsko): for 1.5 change this code to have an animator object for better debugging\n return {\n $$willAnimate: true,\n end: endFn,\n start: function() {\n if (animationClosed) return;\n\n runnerHost = {\n end: endFn,\n cancel: cancelFn,\n resume: null, //this will be set during the start() phase\n pause: null\n };\n\n runner = new $$AnimateRunner(runnerHost);\n\n waitUntilQuiet(start);\n\n // we don't have access to pause/resume the animation\n // since it hasn't run yet. AnimateRunner will therefore\n // set noop functions for resume and pause and they will\n // later be overridden once the animation is triggered\n return runner;\n }\n };\n\n function endFn() {\n close();\n }\n\n function cancelFn() {\n close(true);\n }\n\n function close(rejected) {\n // if the promise has been called already then we shouldn't close\n // the animation again\n if (animationClosed || (animationCompleted && animationPaused)) return;\n animationClosed = true;\n animationPaused = false;\n\n if (preparationClasses && !options.$$skipPreparationClasses) {\n $$jqLite.removeClass(element, preparationClasses);\n }\n\n if (activeClasses) {\n $$jqLite.removeClass(element, activeClasses);\n }\n\n blockKeyframeAnimations(node, false);\n helpers.blockTransitions(node, false);\n\n forEach(temporaryStyles, function(entry) {\n // There is only one way to remove inline style properties entirely from elements.\n // By using `removeProperty` this works, but we need to convert camel-cased CSS\n // styles down to hyphenated values.\n node.style[entry[0]] = '';\n });\n\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n\n if (Object.keys(restoreStyles).length) {\n forEach(restoreStyles, function(value, prop) {\n if (value) {\n node.style.setProperty(prop, value);\n } else {\n node.style.removeProperty(prop);\n }\n });\n }\n\n // the reason why we have this option is to allow a synchronous closing callback\n // that is fired as SOON as the animation ends (when the CSS is removed) or if\n // the animation never takes off at all. A good example is a leave animation since\n // the element must be removed just after the animation is over or else the element\n // will appear on screen for one animation frame causing an overbearing flicker.\n if (options.onDone) {\n options.onDone();\n }\n\n if (events && events.length) {\n // Remove the transitionend / animationend listener(s)\n element.off(events.join(' '), onAnimationProgress);\n }\n\n //Cancel the fallback closing timeout and remove the timer data\n var animationTimerData = element.data(ANIMATE_TIMER_KEY);\n if (animationTimerData) {\n $timeout.cancel(animationTimerData[0].timer);\n element.removeData(ANIMATE_TIMER_KEY);\n }\n\n // if the preparation function fails then the promise is not setup\n if (runner) {\n runner.complete(!rejected);\n }\n }\n\n function applyBlocking(duration) {\n if (flags.blockTransition) {\n helpers.blockTransitions(node, duration);\n }\n\n if (flags.blockKeyframeAnimation) {\n blockKeyframeAnimations(node, !!duration);\n }\n }\n\n function closeAndReturnNoopAnimator() {\n runner = new $$AnimateRunner({\n end: endFn,\n cancel: cancelFn\n });\n\n // should flush the cache animation\n waitUntilQuiet(noop);\n close();\n\n return {\n $$willAnimate: false,\n start: function() {\n return runner;\n },\n end: endFn\n };\n }\n\n function onAnimationProgress(event) {\n event.stopPropagation();\n var ev = event.originalEvent || event;\n\n if (ev.target !== node) {\n // Since TransitionEvent / AnimationEvent bubble up,\n // we have to ignore events by finished child animations\n return;\n }\n\n // we now always use `Date.now()` due to the recent changes with\n // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info)\n var timeStamp = ev.$manualTimeStamp || Date.now();\n\n /* Firefox (or possibly just Gecko) likes to not round values up\n * when a ms measurement is used for the animation */\n var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n /* $manualTimeStamp is a mocked timeStamp value which is set\n * within browserTrigger(). This is only here so that tests can\n * mock animations properly. Real events fallback to event.timeStamp,\n * or, if they don't, then a timeStamp is automatically created for them.\n * We're checking to see if the timeStamp surpasses the expected delay,\n * but we're using elapsedTime instead of the timeStamp on the 2nd\n * pre-condition since animationPauseds sometimes close off early */\n if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n // we set this flag to ensure that if the transition is paused then, when resumed,\n // the animation will automatically close itself since transitions cannot be paused.\n animationCompleted = true;\n close();\n }\n }\n\n function start() {\n if (animationClosed) return;\n if (!node.parentNode) {\n close();\n return;\n }\n\n // even though we only pause keyframe animations here the pause flag\n // will still happen when transitions are used. Only the transition will\n // not be paused since that is not possible. If the animation ends when\n // paused then it will not complete until unpaused or cancelled.\n var playPause = function(playAnimation) {\n if (!animationCompleted) {\n animationPaused = !playAnimation;\n if (timings.animationDuration) {\n var value = blockKeyframeAnimations(node, animationPaused);\n if (animationPaused) {\n temporaryStyles.push(value);\n } else {\n removeFromArray(temporaryStyles, value);\n }\n }\n } else if (animationPaused && playAnimation) {\n animationPaused = false;\n close();\n }\n };\n\n // checking the stagger duration prevents an accidentally cascade of the CSS delay style\n // being inherited from the parent. If the transition duration is zero then we can safely\n // rely that the delay value is an intentional stagger delay style.\n var maxStagger = itemIndex > 0\n && ((timings.transitionDuration && stagger.transitionDuration === 0) ||\n (timings.animationDuration && stagger.animationDuration === 0))\n && Math.max(stagger.animationDelay, stagger.transitionDelay);\n if (maxStagger) {\n $timeout(triggerAnimationStart,\n Math.floor(maxStagger * itemIndex * ONE_SECOND),\n false);\n } else {\n triggerAnimationStart();\n }\n\n // this will decorate the existing promise runner with pause/resume methods\n runnerHost.resume = function() {\n playPause(true);\n };\n\n runnerHost.pause = function() {\n playPause(false);\n };\n\n function triggerAnimationStart() {\n // just incase a stagger animation kicks in when the animation\n // itself was cancelled entirely\n if (animationClosed) return;\n\n applyBlocking(false);\n\n forEach(temporaryStyles, function(entry) {\n var key = entry[0];\n var value = entry[1];\n node.style[key] = value;\n });\n\n applyAnimationClasses(element, options);\n $$jqLite.addClass(element, activeClasses);\n\n if (flags.recalculateTimingStyles) {\n fullClassName = node.getAttribute('class') + ' ' + preparationClasses;\n cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);\n\n timings = computeTimings(node, fullClassName, cacheKey, false);\n relativeDelay = timings.maxDelay;\n maxDelay = Math.max(relativeDelay, 0);\n maxDuration = timings.maxDuration;\n\n if (maxDuration === 0) {\n close();\n return;\n }\n\n flags.hasTransitions = timings.transitionDuration > 0;\n flags.hasAnimations = timings.animationDuration > 0;\n }\n\n if (flags.applyAnimationDelay) {\n relativeDelay = typeof options.delay !== 'boolean' && truthyTimingValue(options.delay)\n ? parseFloat(options.delay)\n : relativeDelay;\n\n maxDelay = Math.max(relativeDelay, 0);\n timings.animationDelay = relativeDelay;\n delayStyle = getCssDelayStyle(relativeDelay, true);\n temporaryStyles.push(delayStyle);\n node.style[delayStyle[0]] = delayStyle[1];\n }\n\n maxDelayTime = maxDelay * ONE_SECOND;\n maxDurationTime = maxDuration * ONE_SECOND;\n\n if (options.easing) {\n var easeProp, easeVal = options.easing;\n if (flags.hasTransitions) {\n easeProp = TRANSITION_PROP + TIMING_KEY;\n temporaryStyles.push([easeProp, easeVal]);\n node.style[easeProp] = easeVal;\n }\n if (flags.hasAnimations) {\n easeProp = ANIMATION_PROP + TIMING_KEY;\n temporaryStyles.push([easeProp, easeVal]);\n node.style[easeProp] = easeVal;\n }\n }\n\n if (timings.transitionDuration) {\n events.push(TRANSITIONEND_EVENT);\n }\n\n if (timings.animationDuration) {\n events.push(ANIMATIONEND_EVENT);\n }\n\n startTime = Date.now();\n var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime;\n var endTime = startTime + timerTime;\n\n var animationsData = element.data(ANIMATE_TIMER_KEY) || [];\n var setupFallbackTimer = true;\n if (animationsData.length) {\n var currentTimerData = animationsData[0];\n setupFallbackTimer = endTime > currentTimerData.expectedEndTime;\n if (setupFallbackTimer) {\n $timeout.cancel(currentTimerData.timer);\n } else {\n animationsData.push(close);\n }\n }\n\n if (setupFallbackTimer) {\n var timer = $timeout(onAnimationExpired, timerTime, false);\n animationsData[0] = {\n timer: timer,\n expectedEndTime: endTime\n };\n animationsData.push(close);\n element.data(ANIMATE_TIMER_KEY, animationsData);\n }\n\n if (events.length) {\n element.on(events.join(' '), onAnimationProgress);\n }\n\n if (options.to) {\n if (options.cleanupStyles) {\n registerRestorableStyles(restoreStyles, node, Object.keys(options.to));\n }\n applyAnimationToStyles(element, options);\n }\n }\n\n function onAnimationExpired() {\n var animationsData = element.data(ANIMATE_TIMER_KEY);\n\n // this will be false in the event that the element was\n // removed from the DOM (via a leave animation or something\n // similar)\n if (animationsData) {\n for (var i = 1; i < animationsData.length; i++) {\n animationsData[i]();\n }\n element.removeData(ANIMATE_TIMER_KEY);\n }\n }\n }\n };\n }];\n}];\n\nvar $$AnimateCssDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {\n $$animationProvider.drivers.push('$$animateCssDriver');\n\n var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';\n var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';\n\n var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out';\n var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in';\n\n function isDocumentFragment(node) {\n return node.parentNode && node.parentNode.nodeType === 11;\n }\n\n this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document',\n function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) {\n\n // only browsers that support these properties can render animations\n if (!$sniffer.animations && !$sniffer.transitions) return noop;\n\n var bodyNode = $document[0].body;\n var rootNode = getDomNode($rootElement);\n\n var rootBodyElement = jqLite(\n // this is to avoid using something that exists outside of the body\n // we also special case the doc fragment case because our unit test code\n // appends the $rootElement to the body after the app has been bootstrapped\n isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode\n );\n\n return function initDriverFn(animationDetails) {\n return animationDetails.from && animationDetails.to\n ? prepareFromToAnchorAnimation(animationDetails.from,\n animationDetails.to,\n animationDetails.classes,\n animationDetails.anchors)\n : prepareRegularAnimation(animationDetails);\n };\n\n function filterCssClasses(classes) {\n //remove all the `ng-` stuff\n return classes.replace(/\\bng-\\S+\\b/g, '');\n }\n\n function getUniqueValues(a, b) {\n if (isString(a)) a = a.split(' ');\n if (isString(b)) b = b.split(' ');\n return a.filter(function(val) {\n return b.indexOf(val) === -1;\n }).join(' ');\n }\n\n function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {\n var clone = jqLite(getDomNode(outAnchor).cloneNode(true));\n var startingClasses = filterCssClasses(getClassVal(clone));\n\n outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);\n inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);\n\n clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME);\n\n rootBodyElement.append(clone);\n\n var animatorIn, animatorOut = prepareOutAnimation();\n\n // the user may not end up using the `out` animation and\n // only making use of the `in` animation or vice-versa.\n // In either case we should allow this and not assume the\n // animation is over unless both animations are not used.\n if (!animatorOut) {\n animatorIn = prepareInAnimation();\n if (!animatorIn) {\n return end();\n }\n }\n\n var startingAnimator = animatorOut || animatorIn;\n\n return {\n start: function() {\n var runner;\n\n var currentAnimation = startingAnimator.start();\n currentAnimation.done(function() {\n currentAnimation = null;\n if (!animatorIn) {\n animatorIn = prepareInAnimation();\n if (animatorIn) {\n currentAnimation = animatorIn.start();\n currentAnimation.done(function() {\n currentAnimation = null;\n end();\n runner.complete();\n });\n return currentAnimation;\n }\n }\n // in the event that there is no `in` animation\n end();\n runner.complete();\n });\n\n runner = new $$AnimateRunner({\n end: endFn,\n cancel: endFn\n });\n\n return runner;\n\n function endFn() {\n if (currentAnimation) {\n currentAnimation.end();\n }\n }\n }\n };\n\n function calculateAnchorStyles(anchor) {\n var styles = {};\n\n var coords = getDomNode(anchor).getBoundingClientRect();\n\n // we iterate directly since safari messes up and doesn't return\n // all the keys for the coords object when iterated\n forEach(['width','height','top','left'], function(key) {\n var value = coords[key];\n switch (key) {\n case 'top':\n value += bodyNode.scrollTop;\n break;\n case 'left':\n value += bodyNode.scrollLeft;\n break;\n }\n styles[key] = Math.floor(value) + 'px';\n });\n return styles;\n }\n\n function prepareOutAnimation() {\n var animator = $animateCss(clone, {\n addClass: NG_OUT_ANCHOR_CLASS_NAME,\n delay: true,\n from: calculateAnchorStyles(outAnchor)\n });\n\n // read the comment within `prepareRegularAnimation` to understand\n // why this check is necessary\n return animator.$$willAnimate ? animator : null;\n }\n\n function getClassVal(element) {\n return element.attr('class') || '';\n }\n\n function prepareInAnimation() {\n var endingClasses = filterCssClasses(getClassVal(inAnchor));\n var toAdd = getUniqueValues(endingClasses, startingClasses);\n var toRemove = getUniqueValues(startingClasses, endingClasses);\n\n var animator = $animateCss(clone, {\n to: calculateAnchorStyles(inAnchor),\n addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd,\n removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove,\n delay: true\n });\n\n // read the comment within `prepareRegularAnimation` to understand\n // why this check is necessary\n return animator.$$willAnimate ? animator : null;\n }\n\n function end() {\n clone.remove();\n outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);\n inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);\n }\n }\n\n function prepareFromToAnchorAnimation(from, to, classes, anchors) {\n var fromAnimation = prepareRegularAnimation(from, noop);\n var toAnimation = prepareRegularAnimation(to, noop);\n\n var anchorAnimations = [];\n forEach(anchors, function(anchor) {\n var outElement = anchor['out'];\n var inElement = anchor['in'];\n var animator = prepareAnchoredAnimation(classes, outElement, inElement);\n if (animator) {\n anchorAnimations.push(animator);\n }\n });\n\n // no point in doing anything when there are no elements to animate\n if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return;\n\n return {\n start: function() {\n var animationRunners = [];\n\n if (fromAnimation) {\n animationRunners.push(fromAnimation.start());\n }\n\n if (toAnimation) {\n animationRunners.push(toAnimation.start());\n }\n\n forEach(anchorAnimations, function(animation) {\n animationRunners.push(animation.start());\n });\n\n var runner = new $$AnimateRunner({\n end: endFn,\n cancel: endFn // CSS-driven animations cannot be cancelled, only ended\n });\n\n $$AnimateRunner.all(animationRunners, function(status) {\n runner.complete(status);\n });\n\n return runner;\n\n function endFn() {\n forEach(animationRunners, function(runner) {\n runner.end();\n });\n }\n }\n };\n }\n\n function prepareRegularAnimation(animationDetails) {\n var element = animationDetails.element;\n var options = animationDetails.options || {};\n\n if (animationDetails.structural) {\n options.event = animationDetails.event;\n options.structural = true;\n options.applyClassesEarly = true;\n\n // we special case the leave animation since we want to ensure that\n // the element is removed as soon as the animation is over. Otherwise\n // a flicker might appear or the element may not be removed at all\n if (animationDetails.event === 'leave') {\n options.onDone = options.domOperation;\n }\n }\n\n // We assign the preparationClasses as the actual animation event since\n // the internals of $animateCss will just suffix the event token values\n // with `-active` to trigger the animation.\n if (options.preparationClasses) {\n options.event = concatWithSpace(options.event, options.preparationClasses);\n }\n\n var animator = $animateCss(element, options);\n\n // the driver lookup code inside of $$animation attempts to spawn a\n // driver one by one until a driver returns a.$$willAnimate animator object.\n // $animateCss will always return an object, however, it will pass in\n // a flag as a hint as to whether an animation was detected or not\n return animator.$$willAnimate ? animator : null;\n }\n }];\n}];\n\n// TODO(matsko): use caching here to speed things up for detection\n// TODO(matsko): add documentation\n// by the time...\n\nvar $$AnimateJsProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n this.$get = ['$injector', '$$AnimateRunner', '$$jqLite',\n function($injector, $$AnimateRunner, $$jqLite) {\n\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n // $animateJs(element, 'enter');\n return function(element, event, classes, options) {\n var animationClosed = false;\n\n // the `classes` argument is optional and if it is not used\n // then the classes will be resolved from the element's className\n // property as well as options.addClass/options.removeClass.\n if (arguments.length === 3 && isObject(classes)) {\n options = classes;\n classes = null;\n }\n\n options = prepareAnimationOptions(options);\n if (!classes) {\n classes = element.attr('class') || '';\n if (options.addClass) {\n classes += ' ' + options.addClass;\n }\n if (options.removeClass) {\n classes += ' ' + options.removeClass;\n }\n }\n\n var classesToAdd = options.addClass;\n var classesToRemove = options.removeClass;\n\n // the lookupAnimations function returns a series of animation objects that are\n // matched up with one or more of the CSS classes. These animation objects are\n // defined via the module.animation factory function. If nothing is detected then\n // we don't return anything which then makes $animation query the next driver.\n var animations = lookupAnimations(classes);\n var before, after;\n if (animations.length) {\n var afterFn, beforeFn;\n if (event === 'leave') {\n beforeFn = 'leave';\n afterFn = 'afterLeave'; // TODO(matsko): get rid of this\n } else {\n beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1);\n afterFn = event;\n }\n\n if (event !== 'enter' && event !== 'move') {\n before = packageAnimations(element, event, options, animations, beforeFn);\n }\n after = packageAnimations(element, event, options, animations, afterFn);\n }\n\n // no matching animations\n if (!before && !after) return;\n\n function applyOptions() {\n options.domOperation();\n applyAnimationClasses(element, options);\n }\n\n function close() {\n animationClosed = true;\n applyOptions();\n applyAnimationStyles(element, options);\n }\n\n var runner;\n\n return {\n $$willAnimate: true,\n end: function() {\n if (runner) {\n runner.end();\n } else {\n close();\n runner = new $$AnimateRunner();\n runner.complete(true);\n }\n return runner;\n },\n start: function() {\n if (runner) {\n return runner;\n }\n\n runner = new $$AnimateRunner();\n var closeActiveAnimations;\n var chain = [];\n\n if (before) {\n chain.push(function(fn) {\n closeActiveAnimations = before(fn);\n });\n }\n\n if (chain.length) {\n chain.push(function(fn) {\n applyOptions();\n fn(true);\n });\n } else {\n applyOptions();\n }\n\n if (after) {\n chain.push(function(fn) {\n closeActiveAnimations = after(fn);\n });\n }\n\n runner.setHost({\n end: function() {\n endAnimations();\n },\n cancel: function() {\n endAnimations(true);\n }\n });\n\n $$AnimateRunner.chain(chain, onComplete);\n return runner;\n\n function onComplete(success) {\n close(success);\n runner.complete(success);\n }\n\n function endAnimations(cancelled) {\n if (!animationClosed) {\n (closeActiveAnimations || noop)(cancelled);\n onComplete(cancelled);\n }\n }\n }\n };\n\n function executeAnimationFn(fn, element, event, options, onDone) {\n var args;\n switch (event) {\n case 'animate':\n args = [element, options.from, options.to, onDone];\n break;\n\n case 'setClass':\n args = [element, classesToAdd, classesToRemove, onDone];\n break;\n\n case 'addClass':\n args = [element, classesToAdd, onDone];\n break;\n\n case 'removeClass':\n args = [element, classesToRemove, onDone];\n break;\n\n default:\n args = [element, onDone];\n break;\n }\n\n args.push(options);\n\n var value = fn.apply(fn, args);\n if (value) {\n if (isFunction(value.start)) {\n value = value.start();\n }\n\n if (value instanceof $$AnimateRunner) {\n value.done(onDone);\n } else if (isFunction(value)) {\n // optional onEnd / onCancel callback\n return value;\n }\n }\n\n return noop;\n }\n\n function groupEventedAnimations(element, event, options, animations, fnName) {\n var operations = [];\n forEach(animations, function(ani) {\n var animation = ani[fnName];\n if (!animation) return;\n\n // note that all of these animations will run in parallel\n operations.push(function() {\n var runner;\n var endProgressCb;\n\n var resolved = false;\n var onAnimationComplete = function(rejected) {\n if (!resolved) {\n resolved = true;\n (endProgressCb || noop)(rejected);\n runner.complete(!rejected);\n }\n };\n\n runner = new $$AnimateRunner({\n end: function() {\n onAnimationComplete();\n },\n cancel: function() {\n onAnimationComplete(true);\n }\n });\n\n endProgressCb = executeAnimationFn(animation, element, event, options, function(result) {\n var cancelled = result === false;\n onAnimationComplete(cancelled);\n });\n\n return runner;\n });\n });\n\n return operations;\n }\n\n function packageAnimations(element, event, options, animations, fnName) {\n var operations = groupEventedAnimations(element, event, options, animations, fnName);\n if (operations.length === 0) {\n var a, b;\n if (fnName === 'beforeSetClass') {\n a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass');\n b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass');\n } else if (fnName === 'setClass') {\n a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass');\n b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass');\n }\n\n if (a) {\n operations = operations.concat(a);\n }\n if (b) {\n operations = operations.concat(b);\n }\n }\n\n if (operations.length === 0) return;\n\n // TODO(matsko): add documentation\n return function startAnimation(callback) {\n var runners = [];\n if (operations.length) {\n forEach(operations, function(animateFn) {\n runners.push(animateFn());\n });\n }\n\n if (runners.length) {\n $$AnimateRunner.all(runners, callback);\n } else {\n callback();\n }\n\n return function endFn(reject) {\n forEach(runners, function(runner) {\n if (reject) {\n runner.cancel();\n } else {\n runner.end();\n }\n });\n };\n };\n }\n };\n\n function lookupAnimations(classes) {\n classes = isArray(classes) ? classes : classes.split(' ');\n var matches = [], flagMap = {};\n for (var i = 0; i < classes.length; i++) {\n var klass = classes[i],\n animationFactory = $animateProvider.$$registeredAnimations[klass];\n if (animationFactory && !flagMap[klass]) {\n matches.push($injector.get(animationFactory));\n flagMap[klass] = true;\n }\n }\n return matches;\n }\n }];\n}];\n\nvar $$AnimateJsDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {\n $$animationProvider.drivers.push('$$animateJsDriver');\n this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {\n return function initDriverFn(animationDetails) {\n if (animationDetails.from && animationDetails.to) {\n var fromAnimation = prepareAnimation(animationDetails.from);\n var toAnimation = prepareAnimation(animationDetails.to);\n if (!fromAnimation && !toAnimation) return;\n\n return {\n start: function() {\n var animationRunners = [];\n\n if (fromAnimation) {\n animationRunners.push(fromAnimation.start());\n }\n\n if (toAnimation) {\n animationRunners.push(toAnimation.start());\n }\n\n $$AnimateRunner.all(animationRunners, done);\n\n var runner = new $$AnimateRunner({\n end: endFnFactory(),\n cancel: endFnFactory()\n });\n\n return runner;\n\n function endFnFactory() {\n return function() {\n forEach(animationRunners, function(runner) {\n // at this point we cannot cancel animations for groups just yet. 1.5+\n runner.end();\n });\n };\n }\n\n function done(status) {\n runner.complete(status);\n }\n }\n };\n } else {\n return prepareAnimation(animationDetails);\n }\n };\n\n function prepareAnimation(animationDetails) {\n // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations\n var element = animationDetails.element;\n var event = animationDetails.event;\n var options = animationDetails.options;\n var classes = animationDetails.classes;\n return $$animateJs(element, event, classes, options);\n }\n }];\n}];\n\nvar NG_ANIMATE_ATTR_NAME = 'data-ng-animate';\nvar NG_ANIMATE_PIN_DATA = '$ngAnimatePin';\nvar $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n var PRE_DIGEST_STATE = 1;\n var RUNNING_STATE = 2;\n var ONE_SPACE = ' ';\n\n var rules = this.rules = {\n skip: [],\n cancel: [],\n join: []\n };\n\n function getEventData(options) {\n return {\n addClass: options.addClass,\n removeClass: options.removeClass,\n from: options.from,\n to: options.to\n };\n }\n\n function makeTruthyCssClassMap(classString) {\n if (!classString) {\n return null;\n }\n\n var keys = classString.split(ONE_SPACE);\n var map = Object.create(null);\n\n forEach(keys, function(key) {\n map[key] = true;\n });\n return map;\n }\n\n function hasMatchingClasses(newClassString, currentClassString) {\n if (newClassString && currentClassString) {\n var currentClassMap = makeTruthyCssClassMap(currentClassString);\n return newClassString.split(ONE_SPACE).some(function(className) {\n return currentClassMap[className];\n });\n }\n }\n\n function isAllowed(ruleType, currentAnimation, previousAnimation) {\n return rules[ruleType].some(function(fn) {\n return fn(currentAnimation, previousAnimation);\n });\n }\n\n function hasAnimationClasses(animation, and) {\n var a = (animation.addClass || '').length > 0;\n var b = (animation.removeClass || '').length > 0;\n return and ? a && b : a || b;\n }\n\n rules.join.push(function(newAnimation, currentAnimation) {\n // if the new animation is class-based then we can just tack that on\n return !newAnimation.structural && hasAnimationClasses(newAnimation);\n });\n\n rules.skip.push(function(newAnimation, currentAnimation) {\n // there is no need to animate anything if no classes are being added and\n // there is no structural animation that will be triggered\n return !newAnimation.structural && !hasAnimationClasses(newAnimation);\n });\n\n rules.skip.push(function(newAnimation, currentAnimation) {\n // why should we trigger a new structural animation if the element will\n // be removed from the DOM anyway?\n return currentAnimation.event === 'leave' && newAnimation.structural;\n });\n\n rules.skip.push(function(newAnimation, currentAnimation) {\n // if there is an ongoing current animation then don't even bother running the class-based animation\n return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural;\n });\n\n rules.cancel.push(function(newAnimation, currentAnimation) {\n // there can never be two structural animations running at the same time\n return currentAnimation.structural && newAnimation.structural;\n });\n\n rules.cancel.push(function(newAnimation, currentAnimation) {\n // if the previous animation is already running, but the new animation will\n // be triggered, but the new animation is structural\n return currentAnimation.state === RUNNING_STATE && newAnimation.structural;\n });\n\n rules.cancel.push(function(newAnimation, currentAnimation) {\n // cancel the animation if classes added / removed in both animation cancel each other out,\n // but only if the current animation isn't structural\n\n if (currentAnimation.structural) return false;\n\n var nA = newAnimation.addClass;\n var nR = newAnimation.removeClass;\n var cA = currentAnimation.addClass;\n var cR = currentAnimation.removeClass;\n\n // early detection to save the global CPU shortage :)\n if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) {\n return false;\n }\n\n return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA);\n });\n\n this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$Map',\n '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow',\n '$$isDocumentHidden',\n function($$rAF, $rootScope, $rootElement, $document, $$Map,\n $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow,\n $$isDocumentHidden) {\n\n var activeAnimationsLookup = new $$Map();\n var disabledElementsLookup = new $$Map();\n var animationsEnabled = null;\n\n function removeFromDisabledElementsLookup(evt) {\n disabledElementsLookup.delete(evt.target);\n }\n\n function postDigestTaskFactory() {\n var postDigestCalled = false;\n return function(fn) {\n // we only issue a call to postDigest before\n // it has first passed. This prevents any callbacks\n // from not firing once the animation has completed\n // since it will be out of the digest cycle.\n if (postDigestCalled) {\n fn();\n } else {\n $rootScope.$$postDigest(function() {\n postDigestCalled = true;\n fn();\n });\n }\n };\n }\n\n // Wait until all directive and route-related templates are downloaded and\n // compiled. The $templateRequest.totalPendingRequests variable keeps track of\n // all of the remote templates being currently downloaded. If there are no\n // templates currently downloading then the watcher will still fire anyway.\n var deregisterWatch = $rootScope.$watch(\n function() { return $templateRequest.totalPendingRequests === 0; },\n function(isEmpty) {\n if (!isEmpty) return;\n deregisterWatch();\n\n // Now that all templates have been downloaded, $animate will wait until\n // the post digest queue is empty before enabling animations. By having two\n // calls to $postDigest calls we can ensure that the flag is enabled at the\n // very end of the post digest queue. Since all of the animations in $animate\n // use $postDigest, it's important that the code below executes at the end.\n // This basically means that the page is fully downloaded and compiled before\n // any animations are triggered.\n $rootScope.$$postDigest(function() {\n $rootScope.$$postDigest(function() {\n // we check for null directly in the event that the application already called\n // .enabled() with whatever arguments that it provided it with\n if (animationsEnabled === null) {\n animationsEnabled = true;\n }\n });\n });\n }\n );\n\n var callbackRegistry = Object.create(null);\n\n // remember that the `customFilter`/`classNameFilter` are set during the\n // provider/config stage therefore we can optimize here and setup helper functions\n var customFilter = $animateProvider.customFilter();\n var classNameFilter = $animateProvider.classNameFilter();\n var returnTrue = function() { return true; };\n\n var isAnimatableByFilter = customFilter || returnTrue;\n var isAnimatableClassName = !classNameFilter ? returnTrue : function(node, options) {\n var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');\n return classNameFilter.test(className);\n };\n\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n function normalizeAnimationDetails(element, animation) {\n return mergeAnimationDetails(element, animation, {});\n }\n\n // IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\n var contains = window.Node.prototype.contains || /** @this */ function(arg) {\n // eslint-disable-next-line no-bitwise\n return this === arg || !!(this.compareDocumentPosition(arg) & 16);\n };\n\n function findCallbacks(targetParentNode, targetNode, event) {\n var matches = [];\n var entries = callbackRegistry[event];\n if (entries) {\n forEach(entries, function(entry) {\n if (contains.call(entry.node, targetNode)) {\n matches.push(entry.callback);\n } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) {\n matches.push(entry.callback);\n }\n });\n }\n\n return matches;\n }\n\n function filterFromRegistry(list, matchContainer, matchCallback) {\n var containerNode = extractElementNode(matchContainer);\n return list.filter(function(entry) {\n var isMatch = entry.node === containerNode &&\n (!matchCallback || entry.callback === matchCallback);\n return !isMatch;\n });\n }\n\n function cleanupEventListeners(phase, node) {\n if (phase === 'close' && !node.parentNode) {\n // If the element is not attached to a parentNode, it has been removed by\n // the domOperation, and we can safely remove the event callbacks\n $animate.off(node);\n }\n }\n\n var $animate = {\n on: function(event, container, callback) {\n var node = extractElementNode(container);\n callbackRegistry[event] = callbackRegistry[event] || [];\n callbackRegistry[event].push({\n node: node,\n callback: callback\n });\n\n // Remove the callback when the element is removed from the DOM\n jqLite(container).on('$destroy', function() {\n var animationDetails = activeAnimationsLookup.get(node);\n\n if (!animationDetails) {\n // If there's an animation ongoing, the callback calling code will remove\n // the event listeners. If we'd remove here, the callbacks would be removed\n // before the animation ends\n $animate.off(event, container, callback);\n }\n });\n },\n\n off: function(event, container, callback) {\n if (arguments.length === 1 && !isString(arguments[0])) {\n container = arguments[0];\n for (var eventType in callbackRegistry) {\n callbackRegistry[eventType] = filterFromRegistry(callbackRegistry[eventType], container);\n }\n\n return;\n }\n\n var entries = callbackRegistry[event];\n if (!entries) return;\n\n callbackRegistry[event] = arguments.length === 1\n ? null\n : filterFromRegistry(entries, container, callback);\n },\n\n pin: function(element, parentElement) {\n assertArg(isElement(element), 'element', 'not an element');\n assertArg(isElement(parentElement), 'parentElement', 'not an element');\n element.data(NG_ANIMATE_PIN_DATA, parentElement);\n },\n\n push: function(element, event, options, domOperation) {\n options = options || {};\n options.domOperation = domOperation;\n return queueAnimation(element, event, options);\n },\n\n // this method has four signatures:\n // () - global getter\n // (bool) - global setter\n // (element) - element getter\n // (element, bool) - element setter<F37>\n enabled: function(element, bool) {\n var argCount = arguments.length;\n\n if (argCount === 0) {\n // () - Global getter\n bool = !!animationsEnabled;\n } else {\n var hasElement = isElement(element);\n\n if (!hasElement) {\n // (bool) - Global setter\n bool = animationsEnabled = !!element;\n } else {\n var node = getDomNode(element);\n\n if (argCount === 1) {\n // (element) - Element getter\n bool = !disabledElementsLookup.get(node);\n } else {\n // (element, bool) - Element setter\n if (!disabledElementsLookup.has(node)) {\n // The element is added to the map for the first time.\n // Create a listener to remove it on `$destroy` (to avoid memory leak).\n jqLite(element).on('$destroy', removeFromDisabledElementsLookup);\n }\n disabledElementsLookup.set(node, !bool);\n }\n }\n }\n\n return bool;\n }\n };\n\n return $animate;\n\n function queueAnimation(originalElement, event, initialOptions) {\n // we always make a copy of the options since\n // there should never be any side effects on\n // the input data when running `$animateCss`.\n var options = copy(initialOptions);\n\n var element = stripCommentsFromElement(originalElement);\n var node = getDomNode(element);\n var parentNode = node && node.parentNode;\n\n options = prepareAnimationOptions(options);\n\n // we create a fake runner with a working promise.\n // These methods will become available after the digest has passed\n var runner = new $$AnimateRunner();\n\n // this is used to trigger callbacks in postDigest mode\n var runInNextPostDigestOrNow = postDigestTaskFactory();\n\n if (isArray(options.addClass)) {\n options.addClass = options.addClass.join(' ');\n }\n\n if (options.addClass && !isString(options.addClass)) {\n options.addClass = null;\n }\n\n if (isArray(options.removeClass)) {\n options.removeClass = options.removeClass.join(' ');\n }\n\n if (options.removeClass && !isString(options.removeClass)) {\n options.removeClass = null;\n }\n\n if (options.from && !isObject(options.from)) {\n options.from = null;\n }\n\n if (options.to && !isObject(options.to)) {\n options.to = null;\n }\n\n // If animations are hard-disabled for the whole application there is no need to continue.\n // There are also situations where a directive issues an animation for a jqLite wrapper that\n // contains only comment nodes. In this case, there is no way we can perform an animation.\n if (!animationsEnabled ||\n !node ||\n !isAnimatableByFilter(node, event, initialOptions) ||\n !isAnimatableClassName(node, options)) {\n close();\n return runner;\n }\n\n var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;\n\n var documentHidden = $$isDocumentHidden();\n\n // This is a hard disable of all animations the element itself, therefore there is no need to\n // continue further past this point if not enabled\n // Animations are also disabled if the document is currently hidden (page is not visible\n // to the user), because browsers slow down or do not flush calls to requestAnimationFrame\n var skipAnimations = documentHidden || disabledElementsLookup.get(node);\n var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};\n var hasExistingAnimation = !!existingAnimation.state;\n\n // there is no point in traversing the same collection of parent ancestors if a followup\n // animation will be run on the same element that already did all that checking work\n if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state !== PRE_DIGEST_STATE)) {\n skipAnimations = !areAnimationsAllowed(node, parentNode, event);\n }\n\n if (skipAnimations) {\n // Callbacks should fire even if the document is hidden (regression fix for issue #14120)\n if (documentHidden) notifyProgress(runner, event, 'start', getEventData(options));\n close();\n if (documentHidden) notifyProgress(runner, event, 'close', getEventData(options));\n return runner;\n }\n\n if (isStructural) {\n closeChildAnimations(node);\n }\n\n var newAnimation = {\n structural: isStructural,\n element: element,\n event: event,\n addClass: options.addClass,\n removeClass: options.removeClass,\n close: close,\n options: options,\n runner: runner\n };\n\n if (hasExistingAnimation) {\n var skipAnimationFlag = isAllowed('skip', newAnimation, existingAnimation);\n if (skipAnimationFlag) {\n if (existingAnimation.state === RUNNING_STATE) {\n close();\n return runner;\n } else {\n mergeAnimationDetails(element, existingAnimation, newAnimation);\n return existingAnimation.runner;\n }\n }\n var cancelAnimationFlag = isAllowed('cancel', newAnimation, existingAnimation);\n if (cancelAnimationFlag) {\n if (existingAnimation.state === RUNNING_STATE) {\n // this will end the animation right away and it is safe\n // to do so since the animation is already running and the\n // runner callback code will run in async\n existingAnimation.runner.end();\n } else if (existingAnimation.structural) {\n // this means that the animation is queued into a digest, but\n // hasn't started yet. Therefore it is safe to run the close\n // method which will call the runner methods in async.\n existingAnimation.close();\n } else {\n // this will merge the new animation options into existing animation options\n mergeAnimationDetails(element, existingAnimation, newAnimation);\n\n return existingAnimation.runner;\n }\n } else {\n // a joined animation means that this animation will take over the existing one\n // so an example would involve a leave animation taking over an enter. Then when\n // the postDigest kicks in the enter will be ignored.\n var joinAnimationFlag = isAllowed('join', newAnimation, existingAnimation);\n if (joinAnimationFlag) {\n if (existingAnimation.state === RUNNING_STATE) {\n normalizeAnimationDetails(element, newAnimation);\n } else {\n applyGeneratedPreparationClasses($$jqLite, element, isStructural ? event : null, options);\n\n event = newAnimation.event = existingAnimation.event;\n options = mergeAnimationDetails(element, existingAnimation, newAnimation);\n\n //we return the same runner since only the option values of this animation will\n //be fed into the `existingAnimation`.\n return existingAnimation.runner;\n }\n }\n }\n } else {\n // normalization in this case means that it removes redundant CSS classes that\n // already exist (addClass) or do not exist (removeClass) on the element\n normalizeAnimationDetails(element, newAnimation);\n }\n\n // when the options are merged and cleaned up we may end up not having to do\n // an animation at all, therefore we should check this before issuing a post\n // digest callback. Structural animations will always run no matter what.\n var isValidAnimation = newAnimation.structural;\n if (!isValidAnimation) {\n // animate (from/to) can be quickly checked first, otherwise we check if any classes are present\n isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0)\n || hasAnimationClasses(newAnimation);\n }\n\n if (!isValidAnimation) {\n close();\n clearElementAnimationState(node);\n return runner;\n }\n\n // the counter keeps track of cancelled animations\n var counter = (existingAnimation.counter || 0) + 1;\n newAnimation.counter = counter;\n\n markElementAnimationState(node, PRE_DIGEST_STATE, newAnimation);\n\n $rootScope.$$postDigest(function() {\n // It is possible that the DOM nodes inside `originalElement` have been replaced. This can\n // happen if the animated element is a transcluded clone and also has a `templateUrl`\n // directive on it. Therefore, we must recreate `element` in order to interact with the\n // actual DOM nodes.\n // Note: We still need to use the old `node` for certain things, such as looking up in\n // HashMaps where it was used as the key.\n\n element = stripCommentsFromElement(originalElement);\n\n var animationDetails = activeAnimationsLookup.get(node);\n var animationCancelled = !animationDetails;\n animationDetails = animationDetails || {};\n\n // if addClass/removeClass is called before something like enter then the\n // registered parent element may not be present. The code below will ensure\n // that a final value for parent element is obtained\n var parentElement = element.parent() || [];\n\n // animate/structural/class-based animations all have requirements. Otherwise there\n // is no point in performing an animation. The parent node must also be set.\n var isValidAnimation = parentElement.length > 0\n && (animationDetails.event === 'animate'\n || animationDetails.structural\n || hasAnimationClasses(animationDetails));\n\n // this means that the previous animation was cancelled\n // even if the follow-up animation is the same event\n if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) {\n // if another animation did not take over then we need\n // to make sure that the domOperation and options are\n // handled accordingly\n if (animationCancelled) {\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n }\n\n // if the event changed from something like enter to leave then we do\n // it, otherwise if it's the same then the end result will be the same too\n if (animationCancelled || (isStructural && animationDetails.event !== event)) {\n options.domOperation();\n runner.end();\n }\n\n // in the event that the element animation was not cancelled or a follow-up animation\n // isn't allowed to animate from here then we need to clear the state of the element\n // so that any future animations won't read the expired animation data.\n if (!isValidAnimation) {\n clearElementAnimationState(node);\n }\n\n return;\n }\n\n // this combined multiple class to addClass / removeClass into a setClass event\n // so long as a structural event did not take over the animation\n event = !animationDetails.structural && hasAnimationClasses(animationDetails, true)\n ? 'setClass'\n : animationDetails.event;\n\n markElementAnimationState(node, RUNNING_STATE);\n var realRunner = $$animation(element, event, animationDetails.options);\n\n // this will update the runner's flow-control events based on\n // the `realRunner` object.\n runner.setHost(realRunner);\n notifyProgress(runner, event, 'start', getEventData(options));\n\n realRunner.done(function(status) {\n close(!status);\n var animationDetails = activeAnimationsLookup.get(node);\n if (animationDetails && animationDetails.counter === counter) {\n clearElementAnimationState(node);\n }\n notifyProgress(runner, event, 'close', getEventData(options));\n });\n });\n\n return runner;\n\n function notifyProgress(runner, event, phase, data) {\n runInNextPostDigestOrNow(function() {\n var callbacks = findCallbacks(parentNode, node, event);\n if (callbacks.length) {\n // do not optimize this call here to RAF because\n // we don't know how heavy the callback code here will\n // be and if this code is buffered then this can\n // lead to a performance regression.\n $$rAF(function() {\n forEach(callbacks, function(callback) {\n callback(element, phase, data);\n });\n cleanupEventListeners(phase, node);\n });\n } else {\n cleanupEventListeners(phase, node);\n }\n });\n runner.progress(event, phase, data);\n }\n\n function close(reject) {\n clearGeneratedClasses(element, options);\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n options.domOperation();\n runner.complete(!reject);\n }\n }\n\n function closeChildAnimations(node) {\n var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']');\n forEach(children, function(child) {\n var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME), 10);\n var animationDetails = activeAnimationsLookup.get(child);\n if (animationDetails) {\n switch (state) {\n case RUNNING_STATE:\n animationDetails.runner.end();\n /* falls through */\n case PRE_DIGEST_STATE:\n activeAnimationsLookup.delete(child);\n break;\n }\n }\n });\n }\n\n function clearElementAnimationState(node) {\n node.removeAttribute(NG_ANIMATE_ATTR_NAME);\n activeAnimationsLookup.delete(node);\n }\n\n /**\n * This fn returns false if any of the following is true:\n * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed\n * b) a parent element has an ongoing structural animation, and animateChildren is false\n * c) the element is not a child of the body\n * d) the element is not a child of the $rootElement\n */\n function areAnimationsAllowed(node, parentNode, event) {\n var bodyNode = $document[0].body;\n var rootNode = getDomNode($rootElement);\n\n var bodyNodeDetected = (node === bodyNode) || node.nodeName === 'HTML';\n var rootNodeDetected = (node === rootNode);\n var parentAnimationDetected = false;\n var elementDisabled = disabledElementsLookup.get(node);\n var animateChildren;\n\n var parentHost = jqLite.data(node, NG_ANIMATE_PIN_DATA);\n if (parentHost) {\n parentNode = getDomNode(parentHost);\n }\n\n while (parentNode) {\n if (!rootNodeDetected) {\n // AngularJS doesn't want to attempt to animate elements outside of the application\n // therefore we need to ensure that the rootElement is an ancestor of the current element\n rootNodeDetected = (parentNode === rootNode);\n }\n\n if (parentNode.nodeType !== ELEMENT_NODE) {\n // no point in inspecting the #document element\n break;\n }\n\n var details = activeAnimationsLookup.get(parentNode) || {};\n // either an enter, leave or move animation will commence\n // therefore we can't allow any animations to take place\n // but if a parent animation is class-based then that's ok\n if (!parentAnimationDetected) {\n var parentNodeDisabled = disabledElementsLookup.get(parentNode);\n\n if (parentNodeDisabled === true && elementDisabled !== false) {\n // disable animations if the user hasn't explicitly enabled animations on the\n // current element\n elementDisabled = true;\n // element is disabled via parent element, no need to check anything else\n break;\n } else if (parentNodeDisabled === false) {\n elementDisabled = false;\n }\n parentAnimationDetected = details.structural;\n }\n\n if (isUndefined(animateChildren) || animateChildren === true) {\n var value = jqLite.data(parentNode, NG_ANIMATE_CHILDREN_DATA);\n if (isDefined(value)) {\n animateChildren = value;\n }\n }\n\n // there is no need to continue traversing at this point\n if (parentAnimationDetected && animateChildren === false) break;\n\n if (!bodyNodeDetected) {\n // we also need to ensure that the element is or will be a part of the body element\n // otherwise it is pointless to even issue an animation to be rendered\n bodyNodeDetected = (parentNode === bodyNode);\n }\n\n if (bodyNodeDetected && rootNodeDetected) {\n // If both body and root have been found, any other checks are pointless,\n // as no animation data should live outside the application\n break;\n }\n\n if (!rootNodeDetected) {\n // If `rootNode` is not detected, check if `parentNode` is pinned to another element\n parentHost = jqLite.data(parentNode, NG_ANIMATE_PIN_DATA);\n if (parentHost) {\n // The pin target element becomes the next parent element\n parentNode = getDomNode(parentHost);\n continue;\n }\n }\n\n parentNode = parentNode.parentNode;\n }\n\n var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true;\n return allowAnimation && rootNodeDetected && bodyNodeDetected;\n }\n\n function markElementAnimationState(node, state, details) {\n details = details || {};\n details.state = state;\n\n node.setAttribute(NG_ANIMATE_ATTR_NAME, state);\n\n var oldValue = activeAnimationsLookup.get(node);\n var newValue = oldValue\n ? extend(oldValue, details)\n : details;\n activeAnimationsLookup.set(node, newValue);\n }\n }];\n}];\n\n/** @this */\nvar $$AnimateCacheProvider = function() {\n\n var KEY = '$$ngAnimateParentKey';\n var parentCounter = 0;\n var cache = Object.create(null);\n\n this.$get = [function() {\n return {\n cacheKey: function(node, method, addClass, removeClass) {\n var parentNode = node.parentNode;\n var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);\n var parts = [parentID, method, node.getAttribute('class')];\n if (addClass) {\n parts.push(addClass);\n }\n if (removeClass) {\n parts.push(removeClass);\n }\n return parts.join(' ');\n },\n\n containsCachedAnimationWithoutDuration: function(key) {\n var entry = cache[key];\n\n // nothing cached, so go ahead and animate\n // otherwise it should be a valid animation\n return (entry && !entry.isValid) || false;\n },\n\n flush: function() {\n cache = Object.create(null);\n },\n\n count: function(key) {\n var entry = cache[key];\n return entry ? entry.total : 0;\n },\n\n get: function(key) {\n var entry = cache[key];\n return entry && entry.value;\n },\n\n put: function(key, value, isValid) {\n if (!cache[key]) {\n cache[key] = { total: 1, value: value, isValid: isValid };\n } else {\n cache[key].total++;\n cache[key].value = value;\n }\n }\n };\n }];\n};\n\n/* exported $$AnimationProvider */\n\nvar $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';\n\n var drivers = this.drivers = [];\n\n var RUNNER_STORAGE_KEY = '$$animationRunner';\n var PREPARE_CLASSES_KEY = '$$animatePrepareClasses';\n\n function setRunner(element, runner) {\n element.data(RUNNER_STORAGE_KEY, runner);\n }\n\n function removeRunner(element) {\n element.removeData(RUNNER_STORAGE_KEY);\n }\n\n function getRunner(element) {\n return element.data(RUNNER_STORAGE_KEY);\n }\n\n this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$Map', '$$rAFScheduler', '$$animateCache',\n function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler, $$animateCache) {\n\n var animationQueue = [];\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n function sortAnimations(animations) {\n var tree = { children: [] };\n var i, lookup = new $$Map();\n\n // this is done first beforehand so that the map\n // is filled with a list of the elements that will be animated\n for (i = 0; i < animations.length; i++) {\n var animation = animations[i];\n lookup.set(animation.domNode, animations[i] = {\n domNode: animation.domNode,\n element: animation.element,\n fn: animation.fn,\n children: []\n });\n }\n\n for (i = 0; i < animations.length; i++) {\n processNode(animations[i]);\n }\n\n return flatten(tree);\n\n function processNode(entry) {\n if (entry.processed) return entry;\n entry.processed = true;\n\n var elementNode = entry.domNode;\n var parentNode = elementNode.parentNode;\n lookup.set(elementNode, entry);\n\n var parentEntry;\n while (parentNode) {\n parentEntry = lookup.get(parentNode);\n if (parentEntry) {\n if (!parentEntry.processed) {\n parentEntry = processNode(parentEntry);\n }\n break;\n }\n parentNode = parentNode.parentNode;\n }\n\n (parentEntry || tree).children.push(entry);\n return entry;\n }\n\n function flatten(tree) {\n var result = [];\n var queue = [];\n var i;\n\n for (i = 0; i < tree.children.length; i++) {\n queue.push(tree.children[i]);\n }\n\n var remainingLevelEntries = queue.length;\n var nextLevelEntries = 0;\n var row = [];\n\n for (i = 0; i < queue.length; i++) {\n var entry = queue[i];\n if (remainingLevelEntries <= 0) {\n remainingLevelEntries = nextLevelEntries;\n nextLevelEntries = 0;\n result.push(row);\n row = [];\n }\n row.push(entry);\n entry.children.forEach(function(childEntry) {\n nextLevelEntries++;\n queue.push(childEntry);\n });\n remainingLevelEntries--;\n }\n\n if (row.length) {\n result.push(row);\n }\n\n return result;\n }\n }\n\n // TODO(matsko): document the signature in a better way\n return function(element, event, options) {\n options = prepareAnimationOptions(options);\n var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;\n\n // there is no animation at the current moment, however\n // these runner methods will get later updated with the\n // methods leading into the driver's end/cancel methods\n // for now they just stop the animation from starting\n var runner = new $$AnimateRunner({\n end: function() { close(); },\n cancel: function() { close(true); }\n });\n\n if (!drivers.length) {\n close();\n return runner;\n }\n\n var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass));\n var tempClasses = options.tempClasses;\n if (tempClasses) {\n classes += ' ' + tempClasses;\n options.tempClasses = null;\n }\n\n if (isStructural) {\n element.data(PREPARE_CLASSES_KEY, 'ng-' + event + PREPARE_CLASS_SUFFIX);\n }\n\n setRunner(element, runner);\n\n animationQueue.push({\n // this data is used by the postDigest code and passed into\n // the driver step function\n element: element,\n classes: classes,\n event: event,\n structural: isStructural,\n options: options,\n beforeStart: beforeStart,\n close: close\n });\n\n element.on('$destroy', handleDestroyedElement);\n\n // we only want there to be one function called within the post digest\n // block. This way we can group animations for all the animations that\n // were apart of the same postDigest flush call.\n if (animationQueue.length > 1) return runner;\n\n $rootScope.$$postDigest(function() {\n var animations = [];\n forEach(animationQueue, function(entry) {\n // the element was destroyed early on which removed the runner\n // form its storage. This means we can't animate this element\n // at all and it already has been closed due to destruction.\n if (getRunner(entry.element)) {\n animations.push(entry);\n } else {\n entry.close();\n }\n });\n\n // now any future animations will be in another postDigest\n animationQueue.length = 0;\n\n var groupedAnimations = groupAnimations(animations);\n var toBeSortedAnimations = [];\n\n forEach(groupedAnimations, function(animationEntry) {\n var element = animationEntry.from ? animationEntry.from.element : animationEntry.element;\n var extraClasses = options.addClass;\n\n extraClasses = (extraClasses ? (extraClasses + ' ') : '') + NG_ANIMATE_CLASSNAME;\n var cacheKey = $$animateCache.cacheKey(element[0], animationEntry.event, extraClasses, options.removeClass);\n\n toBeSortedAnimations.push({\n element: element,\n domNode: getDomNode(element),\n fn: function triggerAnimationStart() {\n var startAnimationFn, closeFn = animationEntry.close;\n\n // in the event that we've cached the animation status for this element\n // and it's in fact an invalid animation (something that has duration = 0)\n // then we should skip all the heavy work from here on\n if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) {\n closeFn();\n return;\n }\n\n // it's important that we apply the `ng-animate` CSS class and the\n // temporary classes before we do any driver invoking since these\n // CSS classes may be required for proper CSS detection.\n animationEntry.beforeStart();\n\n // in the event that the element was removed before the digest runs or\n // during the RAF sequencing then we should not trigger the animation.\n var targetElement = animationEntry.anchors\n ? (animationEntry.from.element || animationEntry.to.element)\n : animationEntry.element;\n\n if (getRunner(targetElement)) {\n var operation = invokeFirstDriver(animationEntry);\n if (operation) {\n startAnimationFn = operation.start;\n }\n }\n\n if (!startAnimationFn) {\n closeFn();\n } else {\n var animationRunner = startAnimationFn();\n animationRunner.done(function(status) {\n closeFn(!status);\n });\n updateAnimationRunners(animationEntry, animationRunner);\n }\n }\n });\n });\n\n // we need to sort each of the animations in order of parent to child\n // relationships. This ensures that the child classes are applied at the\n // right time.\n var finalAnimations = sortAnimations(toBeSortedAnimations);\n for (var i = 0; i < finalAnimations.length; i++) {\n var innerArray = finalAnimations[i];\n for (var j = 0; j < innerArray.length; j++) {\n var entry = innerArray[j];\n var element = entry.element;\n\n // the RAFScheduler code only uses functions\n finalAnimations[i][j] = entry.fn;\n\n // the first row of elements shouldn't have a prepare-class added to them\n // since the elements are at the top of the animation hierarchy and they\n // will be applied without a RAF having to pass...\n if (i === 0) {\n element.removeData(PREPARE_CLASSES_KEY);\n continue;\n }\n\n var prepareClassName = element.data(PREPARE_CLASSES_KEY);\n if (prepareClassName) {\n $$jqLite.addClass(element, prepareClassName);\n }\n }\n }\n\n $$rAFScheduler(finalAnimations);\n });\n\n return runner;\n\n // TODO(matsko): change to reference nodes\n function getAnchorNodes(node) {\n var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']';\n var items = node.hasAttribute(NG_ANIMATE_REF_ATTR)\n ? [node]\n : node.querySelectorAll(SELECTOR);\n var anchors = [];\n forEach(items, function(node) {\n var attr = node.getAttribute(NG_ANIMATE_REF_ATTR);\n if (attr && attr.length) {\n anchors.push(node);\n }\n });\n return anchors;\n }\n\n function groupAnimations(animations) {\n var preparedAnimations = [];\n var refLookup = {};\n forEach(animations, function(animation, index) {\n var element = animation.element;\n var node = getDomNode(element);\n var event = animation.event;\n var enterOrMove = ['enter', 'move'].indexOf(event) >= 0;\n var anchorNodes = animation.structural ? getAnchorNodes(node) : [];\n\n if (anchorNodes.length) {\n var direction = enterOrMove ? 'to' : 'from';\n\n forEach(anchorNodes, function(anchor) {\n var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR);\n refLookup[key] = refLookup[key] || {};\n refLookup[key][direction] = {\n animationID: index,\n element: jqLite(anchor)\n };\n });\n } else {\n preparedAnimations.push(animation);\n }\n });\n\n var usedIndicesLookup = {};\n var anchorGroups = {};\n forEach(refLookup, function(operations, key) {\n var from = operations.from;\n var to = operations.to;\n\n if (!from || !to) {\n // only one of these is set therefore we can't have an\n // anchor animation since all three pieces are required\n var index = from ? from.animationID : to.animationID;\n var indexKey = index.toString();\n if (!usedIndicesLookup[indexKey]) {\n usedIndicesLookup[indexKey] = true;\n preparedAnimations.push(animations[index]);\n }\n return;\n }\n\n var fromAnimation = animations[from.animationID];\n var toAnimation = animations[to.animationID];\n var lookupKey = from.animationID.toString();\n if (!anchorGroups[lookupKey]) {\n var group = anchorGroups[lookupKey] = {\n structural: true,\n beforeStart: function() {\n fromAnimation.beforeStart();\n toAnimation.beforeStart();\n },\n close: function() {\n fromAnimation.close();\n toAnimation.close();\n },\n classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes),\n from: fromAnimation,\n to: toAnimation,\n anchors: [] // TODO(matsko): change to reference nodes\n };\n\n // the anchor animations require that the from and to elements both have at least\n // one shared CSS class which effectively marries the two elements together to use\n // the same animation driver and to properly sequence the anchor animation.\n if (group.classes.length) {\n preparedAnimations.push(group);\n } else {\n preparedAnimations.push(fromAnimation);\n preparedAnimations.push(toAnimation);\n }\n }\n\n anchorGroups[lookupKey].anchors.push({\n 'out': from.element, 'in': to.element\n });\n });\n\n return preparedAnimations;\n }\n\n function cssClassesIntersection(a,b) {\n a = a.split(' ');\n b = b.split(' ');\n var matches = [];\n\n for (var i = 0; i < a.length; i++) {\n var aa = a[i];\n if (aa.substring(0,3) === 'ng-') continue;\n\n for (var j = 0; j < b.length; j++) {\n if (aa === b[j]) {\n matches.push(aa);\n break;\n }\n }\n }\n\n return matches.join(' ');\n }\n\n function invokeFirstDriver(animationDetails) {\n // we loop in reverse order since the more general drivers (like CSS and JS)\n // may attempt more elements, but custom drivers are more particular\n for (var i = drivers.length - 1; i >= 0; i--) {\n var driverName = drivers[i];\n var factory = $injector.get(driverName);\n var driver = factory(animationDetails);\n if (driver) {\n return driver;\n }\n }\n }\n\n function beforeStart() {\n tempClasses = (tempClasses ? (tempClasses + ' ') : '') + NG_ANIMATE_CLASSNAME;\n $$jqLite.addClass(element, tempClasses);\n\n var prepareClassName = element.data(PREPARE_CLASSES_KEY);\n if (prepareClassName) {\n $$jqLite.removeClass(element, prepareClassName);\n prepareClassName = null;\n }\n }\n\n function updateAnimationRunners(animation, newRunner) {\n if (animation.from && animation.to) {\n update(animation.from.element);\n update(animation.to.element);\n } else {\n update(animation.element);\n }\n\n function update(element) {\n var runner = getRunner(element);\n if (runner) runner.setHost(newRunner);\n }\n }\n\n function handleDestroyedElement() {\n var runner = getRunner(element);\n if (runner && (event !== 'leave' || !options.$$domOperationFired)) {\n runner.end();\n }\n }\n\n function close(rejected) {\n element.off('$destroy', handleDestroyedElement);\n removeRunner(element);\n\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n options.domOperation();\n\n if (tempClasses) {\n $$jqLite.removeClass(element, tempClasses);\n }\n\n runner.complete(!rejected);\n }\n };\n }];\n}];\n\n/**\n * @ngdoc directive\n * @name ngAnimateSwap\n * @restrict A\n * @scope\n *\n * @description\n *\n * ngAnimateSwap is a animation-oriented directive that allows for the container to\n * be removed and entered in whenever the associated expression changes. A\n * common usecase for this directive is a rotating banner or slider component which\n * contains one image being present at a time. When the active image changes\n * then the old image will perform a `leave` animation and the new element\n * will be inserted via an `enter` animation.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|--------------------------------------|\n * | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM |\n * | {@link ng.$animate#leave leave} | when the old element is removed from the DOM |\n *\n * @example\n * <example name=\"ngAnimateSwap-directive\" module=\"ngAnimateSwapExample\"\n * deps=\"angular-animate.js\"\n * animations=\"true\" fixBase=\"true\">\n * <file name=\"index.html\">\n * <div class=\"container\" ng-controller=\"AppCtrl\">\n * <div ng-animate-swap=\"number\" class=\"cell swap-animation\" ng-class=\"colorClass(number)\">\n * {{ number }}\n * </div>\n * </div>\n * </file>\n * <file name=\"script.js\">\n * angular.module('ngAnimateSwapExample', ['ngAnimate'])\n * .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) {\n * $scope.number = 0;\n * $interval(function() {\n * $scope.number++;\n * }, 1000);\n *\n * var colors = ['red','blue','green','yellow','orange'];\n * $scope.colorClass = function(number) {\n * return colors[number % colors.length];\n * };\n * }]);\n * </file>\n * <file name=\"animations.css\">\n * .container {\n * height:250px;\n * width:250px;\n * position:relative;\n * overflow:hidden;\n * border:2px solid black;\n * }\n * .container .cell {\n * font-size:150px;\n * text-align:center;\n * line-height:250px;\n * position:absolute;\n * top:0;\n * left:0;\n * right:0;\n * border-bottom:2px solid black;\n * }\n * .swap-animation.ng-enter, .swap-animation.ng-leave {\n * transition:0.5s linear all;\n * }\n * .swap-animation.ng-enter {\n * top:-250px;\n * }\n * .swap-animation.ng-enter-active {\n * top:0px;\n * }\n * .swap-animation.ng-leave {\n * top:0px;\n * }\n * .swap-animation.ng-leave-active {\n * top:250px;\n * }\n * .red { background:red; }\n * .green { background:green; }\n * .blue { background:blue; }\n * .yellow { background:yellow; }\n * .orange { background:orange; }\n * </file>\n * </example>\n */\nvar ngAnimateSwapDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n transclude: 'element',\n terminal: true,\n priority: 550, // We use 550 here to ensure that the directive is caught before others,\n // but after `ngIf` (at priority 600).\n link: function(scope, $element, attrs, ctrl, $transclude) {\n var previousElement, previousScope;\n scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {\n if (previousElement) {\n $animate.leave(previousElement);\n }\n if (previousScope) {\n previousScope.$destroy();\n previousScope = null;\n }\n if (value || value === 0) {\n $transclude(function(clone, childScope) {\n previousElement = clone;\n previousScope = childScope;\n $animate.enter(clone, null, $element);\n });\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc module\n * @name ngAnimate\n * @description\n *\n * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via\n * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an AngularJS app.\n *\n * ## Usage\n * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based\n * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For\n * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within\n * the HTML element that the animation will be triggered on.\n *\n * ## Directive Support\n * The following directives are \"animation aware\":\n *\n * | Directive | Supported Animations |\n * |-------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n * | {@link ng.directive:form#animations form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) |\n * | {@link ngAnimate.directive:ngAnimateSwap#animations ngAnimateSwap} | enter and leave |\n * | {@link ng.directive:ngClass#animations ngClass / {{class}​}} | add and remove |\n * | {@link ng.directive:ngClassEven#animations ngClassEven} | add and remove |\n * | {@link ng.directive:ngClassOdd#animations ngClassOdd} | add and remove |\n * | {@link ng.directive:ngHide#animations ngHide} | add and remove (the `ng-hide` class) |\n * | {@link ng.directive:ngIf#animations ngIf} | enter and leave |\n * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |\n * | {@link module:ngMessages#animations ngMessage / ngMessageExp} | enter and leave |\n * | {@link module:ngMessages#animations ngMessages} | add and remove (the `ng-active`/`ng-inactive` classes) |\n * | {@link ng.directive:ngModel#animations ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) |\n * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave, and move |\n * | {@link ng.directive:ngShow#animations ngShow} | add and remove (the `ng-hide` class) |\n * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |\n * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |\n *\n * (More information can be found by visiting the documentation associated with each directive.)\n *\n * For a full breakdown of the steps involved during each animation event, refer to the\n * {@link ng.$animate `$animate` API docs}.\n *\n * ## CSS-based Animations\n *\n * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML\n * and CSS code we can create an animation that will be picked up by AngularJS when an underlying directive performs an operation.\n *\n * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:\n *\n * ```html\n * <div ng-if=\"bool\" class=\"fade\">\n * Fade me in out\n * </div>\n * <button ng-click=\"bool=true\">Fade In!</button>\n * <button ng-click=\"bool=false\">Fade Out!</button>\n * ```\n *\n * Notice the CSS class **fade**? We can now create the CSS transition code that references this class:\n *\n * ```css\n * /* The starting CSS styles for the enter animation */\n * .fade.ng-enter {\n * transition:0.5s linear all;\n * opacity:0;\n * }\n *\n * /* The finishing CSS styles for the enter animation */\n * .fade.ng-enter.ng-enter-active {\n * opacity:1;\n * }\n * ```\n *\n * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two\n * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition\n * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards.\n *\n * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions:\n *\n * ```css\n * /* now the element will fade out before it is removed from the DOM */\n * .fade.ng-leave {\n * transition:0.5s linear all;\n * opacity:1;\n * }\n * .fade.ng-leave.ng-leave-active {\n * opacity:0;\n * }\n * ```\n *\n * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class:\n *\n * ```css\n * /* there is no need to define anything inside of the destination\n * CSS class since the keyframe will take charge of the animation */\n * .fade.ng-leave {\n * animation: my_fade_animation 0.5s linear;\n * -webkit-animation: my_fade_animation 0.5s linear;\n * }\n *\n * @keyframes my_fade_animation {\n * from { opacity:1; }\n * to { opacity:0; }\n * }\n *\n * @-webkit-keyframes my_fade_animation {\n * from { opacity:1; }\n * to { opacity:0; }\n * }\n * ```\n *\n * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.\n *\n * ### CSS Class-based Animations\n *\n * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different\n * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added\n * and removed.\n *\n * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class:\n *\n * ```html\n * <div ng-show=\"bool\" class=\"fade\">\n * Show and hide me\n * </div>\n * <button ng-click=\"bool=!bool\">Toggle</button>\n *\n * <style>\n * .fade.ng-hide {\n * transition:0.5s linear all;\n * opacity:0;\n * }\n * </style>\n * ```\n *\n * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since\n * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.\n *\n * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation\n * with CSS styles.\n *\n * ```html\n * <div ng-class=\"{on:onOff}\" class=\"highlight\">\n * Highlight this box\n * </div>\n * <button ng-click=\"onOff=!onOff\">Toggle</button>\n *\n * <style>\n * .highlight {\n * transition:0.5s linear all;\n * }\n * .highlight.on-add {\n * background:white;\n * }\n * .highlight.on {\n * background:yellow;\n * }\n * .highlight.on-remove {\n * background:black;\n * }\n * </style>\n * ```\n *\n * We can also make use of CSS keyframes by placing them within the CSS classes.\n *\n *\n * ### CSS Staggering Animations\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * ```css\n * .my-animation.ng-enter {\n * /* standard transition code */\n * transition: 1s linear all;\n * opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n * /* this will have a 100ms delay between each successive leave animation */\n * transition-delay: 0.1s;\n *\n * /* As of 1.4.4, this must always be set: it signals ngAnimate\n * to not accidentally inherit a delay property from another CSS class */\n * transition-duration: 0s;\n *\n * /* if you are using animations instead of transitions you should configure as follows:\n * animation-delay: 0.1s;\n * animation-duration: 0s; */\n * }\n * .my-animation.ng-enter.ng-enter-active {\n * /* standard transition styles */\n * opacity:1;\n * }\n * ```\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * ```js\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * window.requestAnimationFrame(function() {\n * //stagger has reset itself\n * $animate.leave(kids[5]); //stagger index=0\n * $animate.leave(kids[6]); //stagger index=1\n *\n * $scope.$digest();\n * });\n * ```\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * ### The `ng-animate` CSS class\n *\n * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation.\n * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).\n *\n * Therefore, animations can be applied to an element using this temporary class directly via CSS.\n *\n * ```css\n * .zipper.ng-animate {\n * transition:0.5s linear all;\n * }\n * .zipper.ng-enter {\n * opacity:0;\n * }\n * .zipper.ng-enter.ng-enter-active {\n * opacity:1;\n * }\n * .zipper.ng-leave {\n * opacity:1;\n * }\n * .zipper.ng-leave.ng-leave-active {\n * opacity:0;\n * }\n * ```\n *\n * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove\n * the CSS class once an animation has completed.)\n *\n *\n * ### The `ng-[event]-prepare` class\n *\n * This is a special class that can be used to prevent unwanted flickering / flash of content before\n * the actual animation starts. The class is added as soon as an animation is initialized, but removed\n * before the actual animation starts (after waiting for a $digest).\n * It is also only added for *structural* animations (`enter`, `move`, and `leave`).\n *\n * In practice, flickering can appear when nesting elements with structural animations such as `ngIf`\n * into elements that have class-based animations such as `ngClass`.\n *\n * ```html\n * <div ng-class=\"{red: myProp}\">\n * <div ng-class=\"{blue: myProp}\">\n * <div class=\"message\" ng-if=\"myProp\"></div>\n * </div>\n * </div>\n * ```\n *\n * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating.\n * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts:\n *\n * ```css\n * .message.ng-enter-prepare {\n * opacity: 0;\n * }\n * ```\n *\n * ### Animating between value changes\n *\n * Sometimes you need to animate between different expression states, whose values\n * don't necessary need to be known or referenced in CSS styles.\n * Unless possible with another {@link ngAnimate#directive-support \"animation aware\" directive},\n * that specific use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as\n * can be seen in {@link ngAnimate.directive:ngAnimateSwap#examples this example}.\n *\n * Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it\n * creates a new instance of the element (including any other/child directives it may have) and\n * links it to a new scope every time *swap* happens. In some cases this might not be desirable\n * (e.g. for performance reasons, or when you wish to retain internal state on the original\n * element instance).\n *\n * ## JavaScript-based Animations\n *\n * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared\n * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the\n * `module.animation()` module function we can register the animation.\n *\n * Let's see an example of a enter/leave animation using `ngRepeat`:\n *\n * ```html\n * <div ng-repeat=\"item in items\" class=\"slide\">\n * {{ item }}\n * </div>\n * ```\n *\n * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`:\n *\n * ```js\n * myModule.animation('.slide', [function() {\n * return {\n * // make note that other events (like addClass/removeClass)\n * // have different function input parameters\n * enter: function(element, doneFn) {\n * jQuery(element).fadeIn(1000, doneFn);\n *\n * // remember to call doneFn so that AngularJS\n * // knows that the animation has concluded\n * },\n *\n * move: function(element, doneFn) {\n * jQuery(element).fadeIn(1000, doneFn);\n * },\n *\n * leave: function(element, doneFn) {\n * jQuery(element).fadeOut(1000, doneFn);\n * }\n * }\n * }]);\n * ```\n *\n * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as\n * greensock.js and velocity.js.\n *\n * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define\n * our animations inside of the same registered animation, however, the function input arguments are a bit different:\n *\n * ```html\n * <div ng-class=\"color\" class=\"colorful\">\n * this box is moody\n * </div>\n * <button ng-click=\"color='red'\">Change to red</button>\n * <button ng-click=\"color='blue'\">Change to blue</button>\n * <button ng-click=\"color='green'\">Change to green</button>\n * ```\n *\n * ```js\n * myModule.animation('.colorful', [function() {\n * return {\n * addClass: function(element, className, doneFn) {\n * // do some cool animation and call the doneFn\n * },\n * removeClass: function(element, className, doneFn) {\n * // do some cool animation and call the doneFn\n * },\n * setClass: function(element, addedClass, removedClass, doneFn) {\n * // do some cool animation and call the doneFn\n * }\n * }\n * }]);\n * ```\n *\n * ## CSS + JS Animations Together\n *\n * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of AngularJS,\n * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking\n * charge of the animation**:\n *\n * ```html\n * <div ng-if=\"bool\" class=\"slide\">\n * Slide in and out\n * </div>\n * ```\n *\n * ```js\n * myModule.animation('.slide', [function() {\n * return {\n * enter: function(element, doneFn) {\n * jQuery(element).slideIn(1000, doneFn);\n * }\n * }\n * }]);\n * ```\n *\n * ```css\n * .slide.ng-enter {\n * transition:0.5s linear all;\n * transform:translateY(-100px);\n * }\n * .slide.ng-enter.ng-enter-active {\n * transform:translateY(0);\n * }\n * ```\n *\n * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the\n * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from\n * our own JS-based animation code:\n *\n * ```js\n * myModule.animation('.slide', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element) {\n* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.\n * return $animateCss(element, {\n * event: 'enter',\n * structural: true\n * });\n * }\n * }\n * }]);\n * ```\n *\n * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.\n *\n * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or\n * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that\n * data into `$animateCss` directly:\n *\n * ```js\n * myModule.animation('.slide', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element) {\n * return $animateCss(element, {\n * event: 'enter',\n * structural: true,\n * addClass: 'maroon-setting',\n * from: { height:0 },\n * to: { height: 200 }\n * });\n * }\n * }\n * }]);\n * ```\n *\n * Now we can fill in the rest via our transition CSS code:\n *\n * ```css\n * /* the transition tells ngAnimate to make the animation happen */\n * .slide.ng-enter { transition:0.5s linear all; }\n *\n * /* this extra CSS class will be absorbed into the transition\n * since the $animateCss code is adding the class */\n * .maroon-setting { background:red; }\n * ```\n *\n * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over.\n *\n * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}.\n *\n * ## Animation Anchoring (via `ng-animate-ref`)\n *\n * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between\n * structural areas of an application (like views) by pairing up elements using an attribute\n * called `ng-animate-ref`.\n *\n * Let's say for example we have two views that are managed by `ng-view` and we want to show\n * that there is a relationship between two components situated in within these views. By using the\n * `ng-animate-ref` attribute we can identify that the two components are paired together and we\n * can then attach an animation, which is triggered when the view changes.\n *\n * Say for example we have the following template code:\n *\n * ```html\n * <!-- index.html -->\n * <div ng-view class=\"view-animation\">\n * </div>\n *\n * <!-- home.html -->\n * <a href=\"#/banner-page\">\n * <img src=\"./banner.jpg\" class=\"banner\" ng-animate-ref=\"banner\">\n * </a>\n *\n * <!-- banner-page.html -->\n * <img src=\"./banner.jpg\" class=\"banner\" ng-animate-ref=\"banner\">\n * ```\n *\n * Now, when the view changes (once the link is clicked), ngAnimate will examine the\n * HTML contents to see if there is a match reference between any components in the view\n * that is leaving and the view that is entering. It will scan both the view which is being\n * removed (leave) and inserted (enter) to see if there are any paired DOM elements that\n * contain a matching ref value.\n *\n * The two images match since they share the same ref value. ngAnimate will now create a\n * transport element (which is a clone of the first image element) and it will then attempt\n * to animate to the position of the second image element in the next view. For the animation to\n * work a special CSS class called `ng-anchor` will be added to the transported element.\n *\n * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then\n * ngAnimate will handle the entire transition for us as well as the addition and removal of\n * any changes of CSS classes between the elements:\n *\n * ```css\n * .banner.ng-anchor {\n * /* this animation will last for 1 second since there are\n * two phases to the animation (an `in` and an `out` phase) */\n * transition:0.5s linear all;\n * }\n * ```\n *\n * We also **must** include animations for the views that are being entered and removed\n * (otherwise anchoring wouldn't be possible since the new view would be inserted right away).\n *\n * ```css\n * .view-animation.ng-enter, .view-animation.ng-leave {\n * transition:0.5s linear all;\n * position:fixed;\n * left:0;\n * top:0;\n * width:100%;\n * }\n * .view-animation.ng-enter {\n * transform:translateX(100%);\n * }\n * .view-animation.ng-leave,\n * .view-animation.ng-enter.ng-enter-active {\n * transform:translateX(0%);\n * }\n * .view-animation.ng-leave.ng-leave-active {\n * transform:translateX(-100%);\n * }\n * ```\n *\n * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur:\n * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away\n * from its origin. Once that animation is over then the `in` stage occurs which animates the\n * element to its destination. The reason why there are two animations is to give enough time\n * for the enter animation on the new element to be ready.\n *\n * The example above sets up a transition for both the in and out phases, but we can also target the out or\n * in phases directly via `ng-anchor-out` and `ng-anchor-in`.\n *\n * ```css\n * .banner.ng-anchor-out {\n * transition: 0.5s linear all;\n *\n * /* the scale will be applied during the out animation,\n * but will be animated away when the in animation runs */\n * transform: scale(1.2);\n * }\n *\n * .banner.ng-anchor-in {\n * transition: 1s linear all;\n * }\n * ```\n *\n *\n *\n *\n * ### Anchoring Demo\n *\n <example module=\"anchoringExample\"\n name=\"anchoringExample\"\n id=\"anchoringExample\"\n deps=\"angular-animate.js;angular-route.js\"\n animations=\"true\">\n <file name=\"index.html\">\n <a href=\"#!/\">Home</a>\n <hr />\n <div class=\"view-container\">\n <div ng-view class=\"view\"></div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])\n .config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/', {\n templateUrl: 'home.html',\n controller: 'HomeController as home'\n });\n $routeProvider.when('/profile/:id', {\n templateUrl: 'profile.html',\n controller: 'ProfileController as profile'\n });\n }])\n .run(['$rootScope', function($rootScope) {\n $rootScope.records = [\n { id: 1, title: 'Miss Beulah Roob' },\n { id: 2, title: 'Trent Morissette' },\n { id: 3, title: 'Miss Ava Pouros' },\n { id: 4, title: 'Rod Pouros' },\n { id: 5, title: 'Abdul Rice' },\n { id: 6, title: 'Laurie Rutherford Sr.' },\n { id: 7, title: 'Nakia McLaughlin' },\n { id: 8, title: 'Jordon Blanda DVM' },\n { id: 9, title: 'Rhoda Hand' },\n { id: 10, title: 'Alexandrea Sauer' }\n ];\n }])\n .controller('HomeController', [function() {\n //empty\n }])\n .controller('ProfileController', ['$rootScope', '$routeParams',\n function ProfileController($rootScope, $routeParams) {\n var index = parseInt($routeParams.id, 10);\n var record = $rootScope.records[index - 1];\n\n this.title = record.title;\n this.id = record.id;\n }]);\n </file>\n <file name=\"home.html\">\n <h2>Welcome to the home page</h1>\n <p>Please click on an element</p>\n <a class=\"record\"\n ng-href=\"#!/profile/{{ record.id }}\"\n ng-animate-ref=\"{{ record.id }}\"\n ng-repeat=\"record in records\">\n {{ record.title }}\n </a>\n </file>\n <file name=\"profile.html\">\n <div class=\"profile record\" ng-animate-ref=\"{{ profile.id }}\">\n {{ profile.title }}\n </div>\n </file>\n <file name=\"animations.css\">\n .record {\n display:block;\n font-size:20px;\n }\n .profile {\n background:black;\n color:white;\n font-size:100px;\n }\n .view-container {\n position:relative;\n }\n .view-container > .view.ng-animate {\n position:absolute;\n top:0;\n left:0;\n width:100%;\n min-height:500px;\n }\n .view.ng-enter, .view.ng-leave,\n .record.ng-anchor {\n transition:0.5s linear all;\n }\n .view.ng-enter {\n transform:translateX(100%);\n }\n .view.ng-enter.ng-enter-active, .view.ng-leave {\n transform:translateX(0%);\n }\n .view.ng-leave.ng-leave-active {\n transform:translateX(-100%);\n }\n .record.ng-anchor-out {\n background:red;\n }\n </file>\n </example>\n *\n * ### How is the element transported?\n *\n * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting\n * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element\n * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The\n * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match\n * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied\n * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class\n * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element\n * will become visible since the shim class will be removed.\n *\n * ### How is the morphing handled?\n *\n * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out\n * what CSS classes differ between the starting element and the destination element. These different CSS classes\n * will be added/removed on the anchor element and a transition will be applied (the transition that is provided\n * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will\n * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that\n * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since\n * the cloned element is placed inside of root element which is likely close to the body element).\n *\n * Note that if the root element is on the `<html>` element then the cloned node will be placed inside of body.\n *\n *\n * ## Using $animate in your directive code\n *\n * So far we've explored how to feed in animations into an AngularJS application, but how do we trigger animations within our own directives in our application?\n * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's\n * imagine we have a greeting box that shows and hides itself when the data changes\n *\n * ```html\n * <greeting-box active=\"onOrOff\">Hi there</greeting-box>\n * ```\n *\n * ```js\n * ngModule.directive('greetingBox', ['$animate', function($animate) {\n * return function(scope, element, attrs) {\n * attrs.$observe('active', function(value) {\n * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');\n * });\n * });\n * }]);\n * ```\n *\n * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element\n * in our HTML code then we can trigger a CSS or JS animation to happen.\n *\n * ```css\n * /* normally we would create a CSS class to reference on the element */\n * greeting-box.on { transition:0.5s linear all; background:green; color:white; }\n * ```\n *\n * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's\n * possible be sure to visit the {@link ng.$animate $animate service API page}.\n *\n *\n * ## Callbacks and Promises\n *\n * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger\n * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has\n * ended by chaining onto the returned promise that animation method returns.\n *\n * ```js\n * // somewhere within the depths of the directive\n * $animate.enter(element, parent).then(function() {\n * //the animation has completed\n * });\n * ```\n *\n * (Note that earlier versions of AngularJS prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case\n * anymore.)\n *\n * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering\n * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view\n * routing controller to hook into that:\n *\n * ```js\n * ngModule.controller('HomePageController', ['$animate', function($animate) {\n * $animate.on('enter', ngViewElement, function(element) {\n * // the animation for this route has completed\n * }]);\n * }])\n * ```\n *\n * (Note that you will need to trigger a digest within the callback to get AngularJS to notice any scope-related changes.)\n */\n\nvar copy;\nvar extend;\nvar forEach;\nvar isArray;\nvar isDefined;\nvar isElement;\nvar isFunction;\nvar isObject;\nvar isString;\nvar isUndefined;\nvar jqLite;\nvar noop;\n\n/**\n * @ngdoc service\n * @name $animate\n * @kind object\n *\n * @description\n * The ngAnimate `$animate` service documentation is the same for the core `$animate` service.\n *\n * Click here {@link ng.$animate to learn more about animations with `$animate`}.\n */\nangular.module('ngAnimate', [], function initAngularHelpers() {\n // Access helpers from AngularJS core.\n // Do it inside a `config` block to ensure `window.angular` is available.\n noop = angular.noop;\n copy = angular.copy;\n extend = angular.extend;\n jqLite = angular.element;\n forEach = angular.forEach;\n isArray = angular.isArray;\n isString = angular.isString;\n isObject = angular.isObject;\n isUndefined = angular.isUndefined;\n isDefined = angular.isDefined;\n isFunction = angular.isFunction;\n isElement = angular.isElement;\n})\n .info({ angularVersion: '1.8.3' })\n .directive('ngAnimateSwap', ngAnimateSwapDirective)\n\n .directive('ngAnimateChildren', $$AnimateChildrenDirective)\n .factory('$$rAFScheduler', $$rAFSchedulerFactory)\n\n .provider('$$animateQueue', $$AnimateQueueProvider)\n .provider('$$animateCache', $$AnimateCacheProvider)\n .provider('$$animation', $$AnimationProvider)\n\n .provider('$animateCss', $AnimateCssProvider)\n .provider('$$animateCssDriver', $$AnimateCssDriverProvider)\n\n .provider('$$animateJs', $$AnimateJsProvider)\n .provider('$$animateJsDriver', $$AnimateJsDriverProvider);\n\n\n})(window, window.angular);\n","require('./angular-animate');\nmodule.exports = 'ngAnimate';\n","/**\n * @license AngularJS v1.8.3\n * (c) 2010-2020 Google LLC. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\n/**\n * @ngdoc module\n * @name ngAria\n * @description\n *\n * The `ngAria` module provides support for common\n * [<abbr title=\"Accessible Rich Internet Applications\">ARIA</abbr>](http://www.w3.org/TR/wai-aria/)\n * attributes that convey state or semantic information about the application for users\n * of assistive technologies, such as screen readers.\n *\n * ## Usage\n *\n * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following\n * directives are supported:\n * `ngModel`, `ngChecked`, `ngReadonly`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`,\n * `ngClick`, `ngDblClick`, and `ngMessages`.\n *\n * Below is a more detailed breakdown of the attributes handled by ngAria:\n *\n * | Directive | Supported Attributes |\n * |---------------------------------------------|-----------------------------------------------------------------------------------------------------|\n * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |\n * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |\n * | {@link ng.directive:ngRequired ngRequired} | aria-required |\n * | {@link ng.directive:ngChecked ngChecked} | aria-checked |\n * | {@link ng.directive:ngReadonly ngReadonly} | aria-readonly |\n * | {@link ng.directive:ngValue ngValue} | aria-checked |\n * | {@link ng.directive:ngShow ngShow} | aria-hidden |\n * | {@link ng.directive:ngHide ngHide} | aria-hidden |\n * | {@link ng.directive:ngDblclick ngDblclick} | tabindex |\n * | {@link module:ngMessages ngMessages} | aria-live |\n * | {@link ng.directive:ngClick ngClick} | tabindex, keydown event, button role |\n *\n * Find out more information about each directive by reading the\n * {@link guide/accessibility ngAria Developer Guide}.\n *\n * ## Example\n * Using ngDisabled with ngAria:\n * ```html\n * <md-checkbox ng-disabled=\"disabled\">\n * ```\n * Becomes:\n * ```html\n * <md-checkbox ng-disabled=\"disabled\" aria-disabled=\"true\">\n * ```\n *\n * ## Disabling Specific Attributes\n * It is possible to disable individual attributes added by ngAria with the\n * {@link ngAria.$ariaProvider#config config} method. For more details, see the\n * {@link guide/accessibility Developer Guide}.\n *\n * ## Disabling `ngAria` on Specific Elements\n * It is possible to make `ngAria` ignore a specific element, by adding the `ng-aria-disable`\n * attribute on it. Note that only the element itself (and not its child elements) will be ignored.\n */\nvar ARIA_DISABLE_ATTR = 'ngAriaDisable';\n\nvar ngAriaModule = angular.module('ngAria', ['ng']).\n info({ angularVersion: '1.8.3' }).\n provider('$aria', $AriaProvider);\n\n/**\n* Internal Utilities\n*/\nvar nativeAriaNodeNames = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY'];\n\nvar isNodeOneOf = function(elem, nodeTypeArray) {\n if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {\n return true;\n }\n};\n/**\n * @ngdoc provider\n * @name $ariaProvider\n * @this\n *\n * @description\n *\n * Used for configuring the ARIA attributes injected and managed by ngAria.\n *\n * ```js\n * angular.module('myApp', ['ngAria'], function config($ariaProvider) {\n * $ariaProvider.config({\n * ariaValue: true,\n * tabindex: false\n * });\n * });\n *```\n *\n * ## Dependencies\n * Requires the {@link ngAria} module to be installed.\n *\n */\nfunction $AriaProvider() {\n var config = {\n ariaHidden: true,\n ariaChecked: true,\n ariaReadonly: true,\n ariaDisabled: true,\n ariaRequired: true,\n ariaInvalid: true,\n ariaValue: true,\n tabindex: true,\n bindKeydown: true,\n bindRoleForClick: true\n };\n\n /**\n * @ngdoc method\n * @name $ariaProvider#config\n *\n * @param {object} config object to enable/disable specific ARIA attributes\n *\n * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags\n * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags\n * - **ariaReadonly** – `{boolean}` – Enables/disables aria-readonly tags\n * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags\n * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags\n * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags\n * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and\n * aria-valuenow tags\n * - **tabindex** – `{boolean}` – Enables/disables tabindex tags\n * - **bindKeydown** – `{boolean}` – Enables/disables keyboard event binding on non-interactive\n * elements (such as `div` or `li`) using ng-click, making them more accessible to users of\n * assistive technologies\n * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements (such as\n * `div` or `li`) using ng-click, making them more accessible to users of assistive\n * technologies\n *\n * @description\n * Enables/disables various ARIA attributes\n */\n this.config = function(newConfig) {\n config = angular.extend(config, newConfig);\n };\n\n function watchExpr(attrName, ariaAttr, nativeAriaNodeNames, negate) {\n return function(scope, elem, attr) {\n if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;\n\n var ariaCamelName = attr.$normalize(ariaAttr);\n if (config[ariaCamelName] && !isNodeOneOf(elem, nativeAriaNodeNames) && !attr[ariaCamelName]) {\n scope.$watch(attr[attrName], function(boolVal) {\n // ensure boolean value\n boolVal = negate ? !boolVal : !!boolVal;\n elem.attr(ariaAttr, boolVal);\n });\n }\n };\n }\n /**\n * @ngdoc service\n * @name $aria\n *\n * @description\n *\n * The $aria service contains helper methods for applying common\n * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives.\n *\n * ngAria injects common accessibility attributes that tell assistive technologies when HTML\n * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria,\n * let's review a code snippet from ngAria itself:\n *\n *```js\n * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) {\n * return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false);\n * }])\n *```\n * Shown above, the ngAria module creates a directive with the same signature as the\n * traditional `ng-disabled` directive. But this ngAria version is dedicated to\n * solely managing accessibility attributes on custom elements. The internal `$aria` service is\n * used to watch the boolean attribute `ngDisabled`. If it has not been explicitly set by the\n * developer, `aria-disabled` is injected as an attribute with its value synchronized to the\n * value in `ngDisabled`.\n *\n * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do\n * anything to enable this feature. The `aria-disabled` attribute is automatically managed\n * simply as a silent side-effect of using `ng-disabled` with the ngAria module.\n *\n * The full list of directives that interface with ngAria:\n * * **ngModel**\n * * **ngChecked**\n * * **ngReadonly**\n * * **ngRequired**\n * * **ngDisabled**\n * * **ngValue**\n * * **ngShow**\n * * **ngHide**\n * * **ngClick**\n * * **ngDblclick**\n * * **ngMessages**\n *\n * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each\n * directive.\n *\n *\n * ## Dependencies\n * Requires the {@link ngAria} module to be installed.\n */\n this.$get = function() {\n return {\n config: function(key) {\n return config[key];\n },\n $$watchExpr: watchExpr\n };\n };\n}\n\n\nngAriaModule.directive('ngShow', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true);\n}])\n.directive('ngHide', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false);\n}])\n.directive('ngValue', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngValue', 'aria-checked', nativeAriaNodeNames, false);\n}])\n.directive('ngChecked', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngChecked', 'aria-checked', nativeAriaNodeNames, false);\n}])\n.directive('ngReadonly', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngReadonly', 'aria-readonly', nativeAriaNodeNames, false);\n}])\n.directive('ngRequired', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngRequired', 'aria-required', nativeAriaNodeNames, false);\n}])\n.directive('ngModel', ['$aria', function($aria) {\n\n function shouldAttachAttr(attr, normalizedAttr, elem, allowNonAriaNodes) {\n return $aria.config(normalizedAttr) &&\n !elem.attr(attr) &&\n (allowNonAriaNodes || !isNodeOneOf(elem, nativeAriaNodeNames)) &&\n (elem.attr('type') !== 'hidden' || elem[0].nodeName !== 'INPUT');\n }\n\n function shouldAttachRole(role, elem) {\n // if element does not have role attribute\n // AND element type is equal to role (if custom element has a type equaling shape) <-- remove?\n // AND element is not in nativeAriaNodeNames\n return !elem.attr('role') && (elem.attr('type') === role) && !isNodeOneOf(elem, nativeAriaNodeNames);\n }\n\n function getShape(attr, elem) {\n var type = attr.type,\n role = attr.role;\n\n return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' :\n ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' :\n (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' : '';\n }\n\n return {\n restrict: 'A',\n require: 'ngModel',\n priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value\n compile: function(elem, attr) {\n if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;\n\n var shape = getShape(attr, elem);\n\n return {\n post: function(scope, elem, attr, ngModel) {\n var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false);\n\n function ngAriaWatchModelValue() {\n return ngModel.$modelValue;\n }\n\n function getRadioReaction(newVal) {\n // Strict comparison would cause a BC\n // eslint-disable-next-line eqeqeq\n var boolVal = (attr.value == ngModel.$viewValue);\n elem.attr('aria-checked', boolVal);\n }\n\n function getCheckboxReaction() {\n elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue));\n }\n\n switch (shape) {\n case 'radio':\n case 'checkbox':\n if (shouldAttachRole(shape, elem)) {\n elem.attr('role', shape);\n }\n if (shouldAttachAttr('aria-checked', 'ariaChecked', elem, false)) {\n scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?\n getRadioReaction : getCheckboxReaction);\n }\n if (needsTabIndex) {\n elem.attr('tabindex', 0);\n }\n break;\n case 'range':\n if (shouldAttachRole(shape, elem)) {\n elem.attr('role', 'slider');\n }\n if ($aria.config('ariaValue')) {\n var needsAriaValuemin = !elem.attr('aria-valuemin') &&\n (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin'));\n var needsAriaValuemax = !elem.attr('aria-valuemax') &&\n (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax'));\n var needsAriaValuenow = !elem.attr('aria-valuenow');\n\n if (needsAriaValuemin) {\n attr.$observe('min', function ngAriaValueMinReaction(newVal) {\n elem.attr('aria-valuemin', newVal);\n });\n }\n if (needsAriaValuemax) {\n attr.$observe('max', function ngAriaValueMinReaction(newVal) {\n elem.attr('aria-valuemax', newVal);\n });\n }\n if (needsAriaValuenow) {\n scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) {\n elem.attr('aria-valuenow', newVal);\n });\n }\n }\n if (needsTabIndex) {\n elem.attr('tabindex', 0);\n }\n break;\n }\n\n if (!attr.hasOwnProperty('ngRequired') && ngModel.$validators.required\n && shouldAttachAttr('aria-required', 'ariaRequired', elem, false)) {\n // ngModel.$error.required is undefined on custom controls\n attr.$observe('required', function() {\n elem.attr('aria-required', !!attr['required']);\n });\n }\n\n if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem, true)) {\n scope.$watch(function ngAriaInvalidWatch() {\n return ngModel.$invalid;\n }, function ngAriaInvalidReaction(newVal) {\n elem.attr('aria-invalid', !!newVal);\n });\n }\n }\n };\n }\n };\n}])\n.directive('ngDisabled', ['$aria', function($aria) {\n return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false);\n}])\n.directive('ngMessages', function() {\n return {\n restrict: 'A',\n require: '?ngMessages',\n link: function(scope, elem, attr, ngMessages) {\n if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;\n\n if (!elem.attr('aria-live')) {\n elem.attr('aria-live', 'assertive');\n }\n }\n };\n})\n.directive('ngClick',['$aria', '$parse', function($aria, $parse) {\n return {\n restrict: 'A',\n compile: function(elem, attr) {\n if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;\n\n var fn = $parse(attr.ngClick);\n return function(scope, elem, attr) {\n\n if (!isNodeOneOf(elem, nativeAriaNodeNames)) {\n\n if ($aria.config('bindRoleForClick') && !elem.attr('role')) {\n elem.attr('role', 'button');\n }\n\n if ($aria.config('tabindex') && !elem.attr('tabindex')) {\n elem.attr('tabindex', 0);\n }\n\n if ($aria.config('bindKeydown') && !attr.ngKeydown && !attr.ngKeypress && !attr.ngKeyup) {\n elem.on('keydown', function(event) {\n var keyCode = event.which || event.keyCode;\n\n if (keyCode === 13 || keyCode === 32) {\n // If the event is triggered on a non-interactive element ...\n if (nativeAriaNodeNames.indexOf(event.target.nodeName) === -1 && !event.target.isContentEditable) {\n // ... prevent the default browser behavior (e.g. scrolling when pressing spacebar)\n // See https://github.com/angular/angular.js/issues/16664\n event.preventDefault();\n }\n scope.$apply(callback);\n }\n\n function callback() {\n fn(scope, { $event: event });\n }\n });\n }\n }\n };\n }\n };\n}])\n.directive('ngDblclick', ['$aria', function($aria) {\n return function(scope, elem, attr) {\n if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;\n\n if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nativeAriaNodeNames)) {\n elem.attr('tabindex', 0);\n }\n };\n}]);\n\n\n})(window, window.angular);\n","require('./angular-aria');\nmodule.exports = 'ngAria';\n","/*!\n * AngularJS Material Design\n * https://github.com/angular/material\n * @license MIT\n * v1.2.5\n */\n(function( window, angular, undefined ){\n\"use strict\";\n\n(function(){\n\"use strict\";\n\nangular.module('ngMaterial', [\"ng\",\"ngAnimate\",\"ngAria\",\"material.core\",\"material.core.animate\",\"material.core.gestures\",\"material.core.interaction\",\"material.core.layout\",\"material.core.meta\",\"material.core.theming.palette\",\"material.core.theming\",\"material.components.autocomplete\",\"material.components.backdrop\",\"material.components.bottomSheet\",\"material.components.button\",\"material.components.card\",\"material.components.checkbox\",\"material.components.chips\",\"material.components.colors\",\"material.components.content\",\"material.components.datepicker\",\"material.components.dialog\",\"material.components.divider\",\"material.components.fabActions\",\"material.components.fabShared\",\"material.components.fabSpeedDial\",\"material.components.fabToolbar\",\"material.components.gridList\",\"material.components.icon\",\"material.components.input\",\"material.components.list\",\"material.components.menu\",\"material.components.menuBar\",\"material.components.navBar\",\"material.components.panel\",\"material.components.progressCircular\",\"material.components.progressLinear\",\"material.components.radioButton\",\"material.components.select\",\"material.components.showHide\",\"material.components.sidenav\",\"material.components.slider\",\"material.components.sticky\",\"material.components.subheader\",\"material.components.swipe\",\"material.components.switch\",\"material.components.tabs\",\"material.components.toast\",\"material.components.toolbar\",\"material.components.tooltip\",\"material.components.truncate\",\"material.components.virtualRepeat\",\"material.components.whiteframe\"]);\n})();\n(function(){\n\"use strict\";\n\n/**\n * Initialization function that validates environment\n * requirements.\n */\nDetectNgTouch.$inject = [\"$log\", \"$injector\"];\nMdCoreConfigure.$inject = [\"$provide\", \"$mdThemingProvider\"];\nrAFDecorator.$inject = [\"$delegate\"];\nqDecorator.$inject = [\"$delegate\"];\nangular\n .module('material.core', [\n 'ngAnimate',\n 'material.core.animate',\n 'material.core.layout',\n 'material.core.interaction',\n 'material.core.gestures',\n 'material.core.theming'\n ])\n .config(MdCoreConfigure)\n .run(DetectNgTouch);\n\n\n/**\n * Detect if the ng-Touch module is also being used.\n * Warn if detected.\n * @ngInject\n */\nfunction DetectNgTouch($log, $injector) {\n if ($injector.has('$swipe')) {\n var msg = \"\" +\n \"You are using the ngTouch module. \\n\" +\n \"AngularJS Material already has mobile click, tap, and swipe support... \\n\" +\n \"ngTouch is not supported with AngularJS Material!\";\n $log.warn(msg);\n }\n}\n\n/**\n * @ngInject\n */\nfunction MdCoreConfigure($provide, $mdThemingProvider) {\n\n $provide.decorator('$$rAF', ['$delegate', rAFDecorator]);\n $provide.decorator('$q', ['$delegate', qDecorator]);\n\n $mdThemingProvider.theme('default')\n .primaryPalette('indigo')\n .accentPalette('pink')\n .warnPalette('deep-orange')\n .backgroundPalette('grey');\n}\n\n/**\n * @ngInject\n */\nfunction rAFDecorator($delegate) {\n /**\n * Use this to throttle events that come in often.\n * The throttled function will always use the *last* invocation before the\n * coming frame.\n *\n * For example, window resize events that fire many times a second:\n * If we set to use an raf-throttled callback on window resize, then\n * our callback will only be fired once per frame, with the last resize\n * event that happened before that frame.\n *\n * @param {function} cb function to debounce\n */\n $delegate.throttle = function(cb) {\n var queuedArgs, alreadyQueued, queueCb, context;\n return function debounced() {\n queuedArgs = arguments;\n context = this;\n queueCb = cb;\n if (!alreadyQueued) {\n alreadyQueued = true;\n $delegate(function() {\n queueCb.apply(context, Array.prototype.slice.call(queuedArgs));\n alreadyQueued = false;\n });\n }\n };\n };\n return $delegate;\n}\n\n/**\n * @ngInject\n */\nfunction qDecorator($delegate) {\n /**\n * Adds a shim for $q.resolve for AngularJS version that don't have it,\n * so we don't have to think about it.\n *\n * via https://github.com/angular/angular.js/pull/11987\n */\n\n // TODO(crisbeto): this won't be necessary once we drop AngularJS 1.3\n if (!$delegate.resolve) {\n $delegate.resolve = $delegate.when;\n }\n return $delegate;\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdAutofocusDirective.$inject = [\"$parse\"];angular.module('material.core')\n .directive('mdAutofocus', MdAutofocusDirective);\n\n/**\n * @ngdoc directive\n * @name mdAutofocus\n * @module material.core.util\n *\n * @description\n *\n * `[md-autofocus]` provides an optional way to identify the focused element when a `$mdDialog`,\n * `$mdBottomSheet`, `$mdMenu` or `$mdSidenav` opens or upon page load for input-like elements.\n *\n * When one of these opens, it will find the first nested element with the `[md-autofocus]`\n * attribute directive and optional expression. An expression may be specified as the directive\n * value to enable conditional activation of the autofocus.\n *\n * @usage\n *\n * ### Dialog\n * <hljs lang=\"html\">\n * <md-dialog>\n * <form>\n * <md-input-container>\n * <label for=\"testInput\">Label</label>\n * <input id=\"testInput\" type=\"text\" md-autofocus>\n * </md-input-container>\n * </form>\n * </md-dialog>\n * </hljs>\n *\n * ### Bottomsheet\n * <hljs lang=\"html\">\n * <md-bottom-sheet class=\"md-list md-has-header\">\n * <md-subheader>Comment Actions</md-subheader>\n * <md-list>\n * <md-list-item ng-repeat=\"item in items\">\n *\n * <md-button md-autofocus=\"$index == 2\">\n * <md-icon md-svg-src=\"{{item.icon}}\"></md-icon>\n * <span class=\"md-inline-list-icon-label\">{{ item.name }}</span>\n * </md-button>\n *\n * </md-list-item>\n * </md-list>\n * </md-bottom-sheet>\n * </hljs>\n *\n * ### Autocomplete\n * <hljs lang=\"html\">\n * <md-autocomplete\n * md-autofocus\n * md-selected-item=\"selectedItem\"\n * md-search-text=\"searchText\"\n * md-items=\"item in getMatches(searchText)\"\n * md-item-text=\"item.display\">\n * <span md-highlight-text=\"searchText\">{{item.display}}</span>\n * </md-autocomplete>\n * </hljs>\n *\n * ### Sidenav\n * <hljs lang=\"html\">\n * <div layout=\"row\" ng-controller=\"MyController\">\n * <md-sidenav md-component-id=\"left\" class=\"md-sidenav-left\">\n * Left Nav!\n * </md-sidenav>\n *\n * <md-content>\n * Center Content\n * <md-button ng-click=\"openLeftMenu()\">\n * Open Left Menu\n * </md-button>\n * </md-content>\n *\n * <md-sidenav md-component-id=\"right\"\n * md-is-locked-open=\"$mdMedia('min-width: 333px')\"\n * class=\"md-sidenav-right\">\n * <form>\n * <md-input-container>\n * <label for=\"testInput\">Test input</label>\n * <input id=\"testInput\" type=\"text\"\n * ng-model=\"data\" md-autofocus>\n * </md-input-container>\n * </form>\n * </md-sidenav>\n * </div>\n * </hljs>\n **/\nfunction MdAutofocusDirective($parse) {\n return {\n restrict: 'A',\n link: {\n pre: preLink\n }\n };\n\n function preLink(scope, element, attr) {\n var attrExp = attr.mdAutoFocus || attr.mdAutofocus || attr.mdSidenavFocus;\n\n // Initially update the expression by manually parsing the expression as per $watch source.\n updateExpression($parse(attrExp)(scope));\n\n // Only watch the expression if it is not empty.\n if (attrExp) {\n scope.$watch(attrExp, updateExpression);\n }\n\n /**\n * Updates the autofocus class which is used to determine whether the attribute\n * expression evaluates to true or false.\n * @param {string|boolean} value Attribute Value\n */\n function updateExpression(value) {\n\n // Rather than passing undefined to the jqLite toggle class function we explicitly set the\n // value to true. Otherwise the class will be just toggled instead of being forced.\n if (angular.isUndefined(value)) {\n value = true;\n }\n\n element.toggleClass('md-autofocus', !!value);\n }\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.core.colorUtil\n * @description\n * Color Util\n */\nangular\n .module('material.core')\n .factory('$mdColorUtil', ColorUtilFactory);\n\nfunction ColorUtilFactory() {\n /**\n * Converts hex value to RGBA string\n * @param color {string}\n * @returns {string}\n */\n function hexToRgba (color) {\n var hex = color[ 0 ] === '#' ? color.substr(1) : color,\n dig = hex.length / 3,\n red = hex.substr(0, dig),\n green = hex.substr(dig, dig),\n blue = hex.substr(dig * 2);\n if (dig === 1) {\n red += red;\n green += green;\n blue += blue;\n }\n return 'rgba(' + parseInt(red, 16) + ',' + parseInt(green, 16) + ',' + parseInt(blue, 16) + ',0.1)';\n }\n\n /**\n * Converts rgba value to hex string\n * @param {string} color\n * @returns {string}\n */\n function rgbaToHex(color) {\n color = color.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\n var hex = (color && color.length === 4) ? \"#\" +\n (\"0\" + parseInt(color[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(color[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(color[3],10).toString(16)).slice(-2) : '';\n\n return hex.toUpperCase();\n }\n\n /**\n * Converts an RGB color to RGBA\n * @param {string} color\n * @returns {string}\n */\n function rgbToRgba (color) {\n return color.replace(')', ', 0.1)').replace('(', 'a(');\n }\n\n /**\n * Converts an RGBA color to RGB\n * @param {string} color\n * @returns {string}\n */\n function rgbaToRgb (color) {\n return color\n ? color.replace('rgba', 'rgb').replace(/,[^),]+\\)/, ')')\n : 'rgb(0,0,0)';\n }\n\n return {\n rgbaToHex: rgbaToHex,\n hexToRgba: hexToRgba,\n rgbToRgba: rgbToRgba,\n rgbaToRgb: rgbaToRgb\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\nangular.module('material.core')\n.factory('$mdConstant', MdConstantFactory);\n\n/**\n * Factory function that creates the grab-bag $mdConstant service.\n * @ngInject\n */\nfunction MdConstantFactory() {\n\n var prefixTestEl = document.createElement('div');\n var vendorPrefix = getVendorPrefix(prefixTestEl);\n var isWebkit = /webkit/i.test(vendorPrefix);\n var SPECIAL_CHARS_REGEXP = /([:\\-_]+(.))/g;\n\n /**\n * @param {string} name CSS property name\n * @return {string} the property name supported by the browser\n */\n function vendorProperty(name) {\n // Add a dash between the prefix and name, to be able to transform the string into camelcase.\n var prefixedName = vendorPrefix + '-' + name;\n var ucPrefix = camelCase(prefixedName);\n var lcPrefix = ucPrefix.charAt(0).toLowerCase() + ucPrefix.substring(1);\n\n return hasStyleProperty(prefixTestEl, name) ? name : // The current browser supports the un-prefixed property\n hasStyleProperty(prefixTestEl, ucPrefix) ? ucPrefix : // The current browser only supports the prefixed property.\n hasStyleProperty(prefixTestEl, lcPrefix) ? lcPrefix : name; // Some browsers are only supporting the prefix in lowercase.\n }\n\n function hasStyleProperty(testElement, property) {\n return angular.isDefined(testElement.style[property]);\n }\n\n /**\n * @param {!string} input value to convert to camelCase\n * @return {string} camelCased version of the input string\n */\n function camelCase(input) {\n return input.replace(SPECIAL_CHARS_REGEXP, function(matches, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n });\n }\n\n function getVendorPrefix(testElement) {\n var prop, match;\n var vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/;\n\n for (prop in testElement.style) {\n if (match = vendorRegex.exec(prop)) {\n return match[0];\n }\n }\n }\n\n var self = {\n isInputKey : function(e) { return (e.keyCode >= 31 && e.keyCode <= 90); },\n isNumPadKey : function(e) { return (3 === e.location && e.keyCode >= 97 && e.keyCode <= 105); },\n isMetaKey: function(e) { return (e.keyCode >= 91 && e.keyCode <= 93); },\n isFnLockKey: function(e) { return (e.keyCode >= 112 && e.keyCode <= 145); },\n isNavigationKey : function(e) {\n var kc = self.KEY_CODE, NAVIGATION_KEYS = [kc.SPACE, kc.ENTER, kc.UP_ARROW, kc.DOWN_ARROW];\n return (NAVIGATION_KEYS.indexOf(e.keyCode) != -1);\n },\n hasModifierKey: function(e) {\n return e.ctrlKey || e.metaKey || e.altKey;\n },\n\n /**\n * Maximum size, in pixels, that can be explicitly set to an element. The actual value varies\n * between browsers, but IE11 has the very lowest size at a mere 1,533,917px. Ideally we could\n * compute this value, but Firefox always reports an element to have a size of zero if it\n * goes over the max, meaning that we'd have to binary search for the value.\n */\n ELEMENT_MAX_PIXELS: 1533917,\n\n /**\n * Priority for a directive that should run before the directives from ngAria.\n */\n BEFORE_NG_ARIA: 210,\n\n /**\n * Common Keyboard actions and their associated keycode.\n */\n KEY_CODE: {\n COMMA: 188,\n SEMICOLON : 186,\n ENTER: 13,\n ESCAPE: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT_ARROW : 37,\n UP_ARROW : 38,\n RIGHT_ARROW : 39,\n DOWN_ARROW : 40,\n TAB : 9,\n BACKSPACE: 8,\n DELETE: 46\n },\n\n /**\n * Vendor prefixed CSS properties to be used to support the given functionality in older browsers\n * as well.\n */\n CSS: {\n /* Constants */\n TRANSITIONEND: 'transitionend' + (isWebkit ? ' webkitTransitionEnd' : ''),\n ANIMATIONEND: 'animationend' + (isWebkit ? ' webkitAnimationEnd' : ''),\n\n TRANSFORM: vendorProperty('transform'),\n TRANSFORM_ORIGIN: vendorProperty('transformOrigin'),\n TRANSITION: vendorProperty('transition'),\n TRANSITION_DURATION: vendorProperty('transitionDuration'),\n ANIMATION_PLAY_STATE: vendorProperty('animationPlayState'),\n ANIMATION_DURATION: vendorProperty('animationDuration'),\n ANIMATION_NAME: vendorProperty('animationName'),\n ANIMATION_TIMING: vendorProperty('animationTimingFunction'),\n ANIMATION_DIRECTION: vendorProperty('animationDirection')\n },\n\n /**\n * As defined in core/style/_variables.scss\n *\n * $layout-breakpoint-xs: 600px !default;\n * $layout-breakpoint-sm: 960px !default;\n * $layout-breakpoint-md: 1280px !default;\n * $layout-breakpoint-lg: 1920px !default;\n *\n */\n MEDIA: {\n 'xs' : '(max-width: 599px)' ,\n 'gt-xs' : '(min-width: 600px)' ,\n 'sm' : '(min-width: 600px) and (max-width: 959px)' ,\n 'gt-sm' : '(min-width: 960px)' ,\n 'md' : '(min-width: 960px) and (max-width: 1279px)' ,\n 'gt-md' : '(min-width: 1280px)' ,\n 'lg' : '(min-width: 1280px) and (max-width: 1919px)',\n 'gt-lg' : '(min-width: 1920px)' ,\n 'xl' : '(min-width: 1920px)' ,\n 'landscape' : '(orientation: landscape)' ,\n 'portrait' : '(orientation: portrait)' ,\n 'print' : 'print'\n },\n\n MEDIA_PRIORITY: [\n 'xl',\n 'gt-lg',\n 'lg',\n 'gt-md',\n 'md',\n 'gt-sm',\n 'sm',\n 'gt-xs',\n 'xs',\n 'landscape',\n 'portrait',\n 'print'\n ]\n };\n\n return self;\n}\n\n})();\n(function(){\n\"use strict\";\n\n angular\n .module('material.core')\n .config([\"$provide\", function($provide){\n $provide.decorator('$mdUtil', ['$delegate', function ($delegate){\n /**\n * Inject the iterator facade to easily support iteration and accessors\n * @see iterator below\n */\n $delegate.iterator = MdIterator;\n\n return $delegate;\n }\n ]);\n }]);\n\n /**\n * iterator is a list facade to easily support iteration and accessors/\n *\n * @param {any[]} items Array list which this iterator will enumerate\n * @param {boolean=} reloop enables iterator to consider the list as an endless loop\n * @return {{add: add, next: (function()), last: (function(): any|null), previous: (function()), count: (function(): number), hasNext: (function(*=): Array.length|*|number|boolean), inRange: (function(*): boolean), remove: remove, contains: (function(*=): *|boolean), itemAt: (function(*=): any|null), findBy: (function(*, *): *[]), hasPrevious: (function(*=): Array.length|*|number|boolean), items: (function(): *[]), indexOf: (function(*=): number), first: (function(): any|null)}}\n * @constructor\n */\n function MdIterator(items, reloop) {\n var trueFn = function() { return true; };\n\n if (items && !angular.isArray(items)) {\n items = Array.prototype.slice.call(items);\n }\n\n reloop = !!reloop;\n var _items = items || [];\n\n // Published API\n return {\n items: getItems,\n count: count,\n\n inRange: inRange,\n contains: contains,\n indexOf: indexOf,\n itemAt: itemAt,\n\n findBy: findBy,\n\n add: add,\n remove: remove,\n\n first: first,\n last: last,\n next: angular.bind(null, findSubsequentItem, false),\n previous: angular.bind(null, findSubsequentItem, true),\n\n hasPrevious: hasPrevious,\n hasNext: hasNext\n };\n\n /**\n * Publish copy of the enumerable set\n * @returns {Array|*}\n */\n function getItems() {\n return [].concat(_items);\n }\n\n /**\n * Determine length of the list\n * @returns {Array.length|*|number}\n */\n function count() {\n return _items.length;\n }\n\n /**\n * Is the index specified valid\n * @param index\n * @returns {Array.length|*|number|boolean}\n */\n function inRange(index) {\n return _items.length && (index > -1) && (index < _items.length);\n }\n\n /**\n * Can the iterator proceed to the next item in the list; relative to\n * the specified item.\n *\n * @param item\n * @returns {Array.length|*|number|boolean}\n */\n function hasNext(item) {\n return item ? inRange(indexOf(item) + 1) : false;\n }\n\n /**\n * Can the iterator proceed to the previous item in the list; relative to\n * the specified item.\n *\n * @param item\n * @returns {Array.length|*|number|boolean}\n */\n function hasPrevious(item) {\n return item ? inRange(indexOf(item) - 1) : false;\n }\n\n /**\n * Get item at specified index/position\n * @param index\n * @returns {*}\n */\n function itemAt(index) {\n return inRange(index) ? _items[index] : null;\n }\n\n /**\n * Find all elements matching the key/value pair\n * otherwise return null\n *\n * @param val\n * @param key\n *\n * @return array\n */\n function findBy(key, val) {\n return _items.filter(function(item) {\n return item[key] === val;\n });\n }\n\n /**\n * Add item to list\n * @param item\n * @param index\n * @returns {*}\n */\n function add(item, index) {\n if (!item) return -1;\n\n if (!angular.isNumber(index)) {\n index = _items.length;\n }\n\n _items.splice(index, 0, item);\n\n return indexOf(item);\n }\n\n /**\n * Remove item from list...\n * @param item\n */\n function remove(item) {\n if (contains(item)){\n _items.splice(indexOf(item), 1);\n }\n }\n\n /**\n * Get the zero-based index of the target item\n * @param item\n * @returns {*}\n */\n function indexOf(item) {\n return _items.indexOf(item);\n }\n\n /**\n * Boolean existence check\n * @param item\n * @returns {boolean}\n */\n function contains(item) {\n return item && (indexOf(item) > -1);\n }\n\n /**\n * Return first item in the list\n * @returns {*}\n */\n function first() {\n return _items.length ? _items[0] : null;\n }\n\n /**\n * Return last item in the list...\n * @returns {*}\n */\n function last() {\n return _items.length ? _items[_items.length - 1] : null;\n }\n\n /**\n * Find the next item. If reloop is true and at the end of the list, it will go back to the\n * first item. If given, the `validate` callback will be used to determine whether the next item\n * is valid. If not valid, it will try to find the next item again.\n *\n * @param {boolean} backwards Specifies the direction of searching (forwards/backwards)\n * @param {*} item The item whose subsequent item we are looking for\n * @param {Function=} validate The `validate` function\n * @param {integer=} limit The recursion limit\n *\n * @returns {*} The subsequent item or null\n */\n function findSubsequentItem(backwards, item, validate, limit) {\n validate = validate || trueFn;\n\n var curIndex = indexOf(item);\n while (true) {\n if (!inRange(curIndex)) return null;\n\n var nextIndex = curIndex + (backwards ? -1 : 1);\n var foundItem = null;\n if (inRange(nextIndex)) {\n foundItem = _items[nextIndex];\n } else if (reloop) {\n foundItem = backwards ? last() : first();\n nextIndex = indexOf(foundItem);\n }\n\n if ((foundItem === null) || (nextIndex === limit)) return null;\n if (validate(foundItem)) return foundItem;\n\n if (angular.isUndefined(limit)) limit = nextIndex;\n\n curIndex = nextIndex;\n }\n }\n }\n\n\n})();\n(function(){\n\"use strict\";\n\n\nmdMediaFactory.$inject = [\"$mdConstant\", \"$rootScope\", \"$window\"];angular.module('material.core')\n.factory('$mdMedia', mdMediaFactory);\n\n/**\n * @ngdoc service\n * @name $mdMedia\n * @module material.core\n *\n * @description\n * `$mdMedia` is used to evaluate whether a given media query is true or false given the\n * current device's screen / window size. The media query will be re-evaluated on resize, allowing\n * you to register a watch.\n *\n * `$mdMedia` also has pre-programmed support for media queries that match the layout breakpoints:\n *\n * <table class=\"md-api-table\">\n * <thead>\n * <tr>\n * <th>Breakpoint</th>\n * <th>mediaQuery</th>\n * </tr>\n * </thead>\n * <tbody>\n * <tr>\n * <td>xs</td>\n * <td>(max-width: 599px)</td>\n * </tr>\n * <tr>\n * <td>gt-xs</td>\n * <td>(min-width: 600px)</td>\n * </tr>\n * <tr>\n * <td>sm</td>\n * <td>(min-width: 600px) and (max-width: 959px)</td>\n * </tr>\n * <tr>\n * <td>gt-sm</td>\n * <td>(min-width: 960px)</td>\n * </tr>\n * <tr>\n * <td>md</td>\n * <td>(min-width: 960px) and (max-width: 1279px)</td>\n * </tr>\n * <tr>\n * <td>gt-md</td>\n * <td>(min-width: 1280px)</td>\n * </tr>\n * <tr>\n * <td>lg</td>\n * <td>(min-width: 1280px) and (max-width: 1919px)</td>\n * </tr>\n * <tr>\n * <td>gt-lg</td>\n * <td>(min-width: 1920px)</td>\n * </tr>\n * <tr>\n * <td>xl</td>\n * <td>(min-width: 1920px)</td>\n * </tr>\n * <tr>\n * <td>landscape</td>\n * <td>landscape</td>\n * </tr>\n * <tr>\n * <td>portrait</td>\n * <td>portrait</td>\n * </tr>\n * <tr>\n * <td>print</td>\n * <td>print</td>\n * </tr>\n * </tbody>\n * </table>\n *\n * See Material Design's <a href=\"https://material.google.com/layout/responsive-ui.html\">Layout - Adaptive UI</a> for more details.\n *\n * <a href=\"https://material.io/archive/guidelines/layout/responsive-ui.html#\">\n * <img src=\"https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B8olV15J7abPSGFxemFiQVRtb1k/layout_adaptive_breakpoints_01.png\" width=\"100%\" height=\"100%\"></img>\n * </a>\n *\n * @returns {boolean} a boolean representing whether or not the given media query is true or false.\n *\n * @usage\n * <hljs lang=\"js\">\n * app.controller('MyController', function($mdMedia, $scope) {\n * $scope.$watch(function() { return $mdMedia('lg'); }, function(big) {\n * $scope.bigScreen = big;\n * });\n *\n * $scope.screenIsSmall = $mdMedia('sm');\n * $scope.customQuery = $mdMedia('(min-width: 1234px)');\n * $scope.anotherCustom = $mdMedia('max-width: 300px');\n * });\n * </hljs>\n */\n\n/* @ngInject */\nfunction mdMediaFactory($mdConstant, $rootScope, $window) {\n var queries = {};\n var mqls = {};\n var results = {};\n var normalizeCache = {};\n\n $mdMedia.getResponsiveAttribute = getResponsiveAttribute;\n $mdMedia.getQuery = getQuery;\n $mdMedia.watchResponsiveAttributes = watchResponsiveAttributes;\n\n return $mdMedia;\n\n function $mdMedia(query) {\n var validated = queries[query];\n if (angular.isUndefined(validated)) {\n validated = queries[query] = validate(query);\n }\n\n var result = results[validated];\n if (angular.isUndefined(result)) {\n result = add(validated);\n }\n\n return result;\n }\n\n function validate(query) {\n return $mdConstant.MEDIA[query] ||\n ((query.charAt(0) !== '(') ? ('(' + query + ')') : query);\n }\n\n function add(query) {\n var result = mqls[query];\n if (!result) {\n result = mqls[query] = $window.matchMedia(query);\n }\n\n result.addListener(onQueryChange);\n return (results[result.media] = !!result.matches);\n }\n\n function onQueryChange(query) {\n $rootScope.$evalAsync(function() {\n results[query.media] = !!query.matches;\n });\n }\n\n function getQuery(name) {\n return mqls[name];\n }\n\n function getResponsiveAttribute(attrs, attrName) {\n for (var i = 0; i < $mdConstant.MEDIA_PRIORITY.length; i++) {\n var mediaName = $mdConstant.MEDIA_PRIORITY[i];\n if (!mqls[queries[mediaName]].matches) {\n continue;\n }\n\n var normalizedName = getNormalizedName(attrs, attrName + '-' + mediaName);\n if (attrs[normalizedName]) {\n return attrs[normalizedName];\n }\n }\n\n // fallback on unprefixed\n return attrs[getNormalizedName(attrs, attrName)];\n }\n\n function watchResponsiveAttributes(attrNames, attrs, watchFn) {\n var unwatchFns = [];\n attrNames.forEach(function(attrName) {\n var normalizedName = getNormalizedName(attrs, attrName);\n if (angular.isDefined(attrs[normalizedName])) {\n unwatchFns.push(\n attrs.$observe(normalizedName, angular.bind(void 0, watchFn, null)));\n }\n\n for (var mediaName in $mdConstant.MEDIA) {\n normalizedName = getNormalizedName(attrs, attrName + '-' + mediaName);\n if (angular.isDefined(attrs[normalizedName])) {\n unwatchFns.push(\n attrs.$observe(normalizedName, angular.bind(void 0, watchFn, mediaName)));\n }\n }\n });\n\n return function unwatch() {\n unwatchFns.forEach(function(fn) { fn(); });\n };\n }\n\n // Improves performance dramatically\n function getNormalizedName(attrs, attrName) {\n return normalizeCache[attrName] ||\n (normalizeCache[attrName] = attrs.$normalize(attrName));\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\nangular\n .module('material.core')\n .config([\"$provide\", function($provide) {\n $provide.decorator('$mdUtil', ['$delegate', function ($delegate) {\n\n // Inject the prefixer into our original $mdUtil service.\n $delegate.prefixer = MdPrefixer;\n\n return $delegate;\n }]);\n }]);\n\n/**\n * @param {string|string[]} initialAttributes\n * @param {boolean} buildSelector\n * @return {string|string[]|{buildSelector: (function(string|string[]): string),\n * buildList: (function(string|string[]): string[]),\n * hasAttribute: (function(JQLite|Element, string): HTMLElement),\n * removeAttribute: (function(JQLite|Element, string): void)}}\n * @constructor\n */\nfunction MdPrefixer(initialAttributes, buildSelector) {\n var PREFIXES = ['data', 'x'];\n\n if (initialAttributes) {\n // The prefixer also accepts attributes as a parameter, and immediately builds a list or selector for\n // the specified attributes.\n return buildSelector ? _buildSelector(initialAttributes) : _buildList(initialAttributes);\n }\n\n return {\n buildList: _buildList,\n buildSelector: _buildSelector,\n hasAttribute: _hasAttribute,\n removeAttribute: _removeAttribute\n };\n\n function _buildList(attributes) {\n attributes = angular.isArray(attributes) ? attributes : [attributes];\n\n attributes.forEach(function(item) {\n PREFIXES.forEach(function(prefix) {\n attributes.push(prefix + '-' + item);\n });\n });\n\n return attributes;\n }\n\n function _buildSelector(attributes) {\n attributes = angular.isArray(attributes) ? attributes : [attributes];\n\n return _buildList(attributes)\n .map(function(item) {\n return '[' + item + ']';\n })\n .join(',');\n }\n\n function _hasAttribute(element, attribute) {\n element = _getNativeElement(element);\n\n if (!element) {\n return false;\n }\n\n var prefixedAttrs = _buildList(attribute);\n\n for (var i = 0; i < prefixedAttrs.length; i++) {\n if (element.hasAttribute(prefixedAttrs[i])) {\n return true;\n }\n }\n\n return false;\n }\n\n function _removeAttribute(element, attribute) {\n element = _getNativeElement(element);\n\n if (!element) {\n return;\n }\n\n _buildList(attribute).forEach(function(prefixedAttribute) {\n element.removeAttribute(prefixedAttribute);\n });\n }\n\n /**\n * Transforms a jqLite or DOM element into a HTML element.\n * This is useful when supporting jqLite elements and DOM elements at\n * same time.\n * @param element {JQLite|Element} Element to be parsed\n * @returns {HTMLElement} Parsed HTMLElement\n */\n function _getNativeElement(element) {\n element = element[0] || element;\n\n if (element.nodeType) {\n return element;\n }\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/*\n * This var has to be outside the angular factory, otherwise when\n * there are multiple material apps on the same page, each app\n * will create its own instance of this array and the app's IDs\n * will not be unique.\n */\nUtilFactory.$inject = [\"$document\", \"$timeout\", \"$compile\", \"$rootScope\", \"$$mdAnimate\", \"$interpolate\", \"$log\", \"$rootElement\", \"$window\", \"$$rAF\"];\nvar nextUniqueId = 0, isIos, isAndroid, isFirefox;\n\n// Support material-tools builds.\nif (window.navigator) {\n var userAgent = window.navigator.userAgent || window.navigator.vendor || window.opera;\n isIos = userAgent.match(/ipad|iphone|ipod/i);\n isAndroid = userAgent.match(/android/i);\n isFirefox = userAgent.match(/(firefox|minefield)/i);\n}\n\n/**\n * @ngdoc module\n * @name material.core.util\n * @description\n * Util\n */\nangular\n.module('material.core')\n.factory('$mdUtil', UtilFactory);\n\n/**\n * @ngInject\n */\nfunction UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $interpolate, $log,\n $rootElement, $window, $$rAF) {\n // Setup some core variables for the processTemplate method\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n usesStandardSymbols = ((startSymbol === '{{') && (endSymbol === '}}'));\n\n // Polyfill document.contains for IE11.\n document.contains || (document.contains = function (node) {\n return document.body.contains(node);\n });\n\n /**\n * Checks if the target element has the requested style by key\n * @param {DOMElement|JQLite} target Target element\n * @param {string} key Style key\n * @param {string=} expectedVal Optional expected value\n * @returns {boolean} Whether the target element has the style or not\n */\n var hasComputedStyle = function (target, key, expectedVal) {\n var hasValue = false;\n\n if (target && target.length) {\n var computedStyles = $window.getComputedStyle(target[0]);\n hasValue = angular.isDefined(computedStyles[key]) &&\n (expectedVal ? computedStyles[key] == expectedVal : true);\n }\n\n return hasValue;\n };\n\n function validateCssValue(value) {\n return !value ? '0' :\n hasPx(value) || hasPercent(value) ? value : value + 'px';\n }\n\n function hasPx(value) {\n return String(value).indexOf('px') > -1;\n }\n\n function hasPercent(value) {\n return String(value).indexOf('%') > -1;\n }\n\n var $mdUtil = {\n dom: {},\n isIos: isIos,\n isAndroid: isAndroid,\n now: window.performance && window.performance.now ?\n angular.bind(window.performance, window.performance.now) : Date.now || function() {\n return new Date().getTime();\n },\n\n /**\n * Cross-version compatibility method to retrieve an option of a ngModel controller,\n * which supports the breaking changes in the AngularJS snapshot (SHA 87a2ff76af5d0a9268d8eb84db5755077d27c84c).\n * @param {!ngModel.NgModelController} ngModelCtrl\n * @param {!string} optionName\n * @returns {string|number|boolean|Object|undefined}\n */\n getModelOption: function (ngModelCtrl, optionName) {\n if (!ngModelCtrl.$options) {\n return;\n }\n\n var $options = ngModelCtrl.$options;\n\n // The newer versions of AngularJS introduced a getOption function and made the option values\n // no longer visible on the $options object.\n return $options.getOption ? $options.getOption(optionName) : $options[optionName];\n },\n\n /**\n * Determines the current 'dir'ectional value based on the value of 'dir'\n * attribute of the element. If that is not defined, it will try to use\n * a 'dir' attribute of the body or html tag.\n *\n * @param {Object=} attrs a hash object with key-value pairs of normalized\n * attribute names and their corresponding attribute values.\n * @returns {boolean} true if the element's passed in attributes,\n * the document, or the body indicates RTL mode, false otherwise.\n */\n isRtl: function(attrs) {\n var dir = angular.isDefined(attrs) && attrs.hasOwnProperty('dir') && attrs.dir;\n\n switch (dir) {\n case 'ltr':\n return false;\n\n case 'rtl':\n return true;\n }\n\n return ($document[0].dir === 'rtl' || $document[0].body.dir === 'rtl');\n },\n\n /**\n * Bi-directional accessor/mutator used to easily update an element's\n * property based on the current 'dir'ectional value.\n */\n bidi: function(element, property, lValue, rValue) {\n var ltr = !this.isRtl();\n\n // If accessor\n if (arguments.length == 0) return ltr ? 'ltr' : 'rtl';\n\n // If mutator\n var elem = angular.element(element);\n\n if (ltr && angular.isDefined(lValue)) {\n elem.css(property, validateCssValue(lValue));\n }\n else if (!ltr && angular.isDefined(rValue)) {\n elem.css(property, validateCssValue(rValue));\n }\n },\n\n bidiProperty: function (element, lProperty, rProperty, value) {\n var ltr = !this.isRtl();\n\n var elem = angular.element(element);\n\n if (ltr && angular.isDefined(lProperty)) {\n elem.css(lProperty, validateCssValue(value));\n elem.css(rProperty, '');\n }\n else if (!ltr && angular.isDefined(rProperty)) {\n elem.css(rProperty, validateCssValue(value));\n elem.css(lProperty, '');\n }\n },\n\n clientRect: function(element, offsetParent, isOffsetRect) {\n var node = getNode(element);\n offsetParent = getNode(offsetParent || node.offsetParent || document.body);\n var nodeRect = node.getBoundingClientRect();\n\n // The user can ask for an offsetRect: a rect relative to the offsetParent,\n // or a clientRect: a rect relative to the page\n var offsetRect = isOffsetRect ?\n offsetParent.getBoundingClientRect() :\n {left: 0, top: 0, width: 0, height: 0};\n return {\n left: nodeRect.left - offsetRect.left,\n top: nodeRect.top - offsetRect.top,\n width: nodeRect.width,\n height: nodeRect.height\n };\n },\n offsetRect: function(element, offsetParent) {\n return $mdUtil.clientRect(element, offsetParent, true);\n },\n\n /**\n * Annoying method to copy nodes to an array, thanks to IE.\n * @param nodes\n * @return {Array}\n */\n nodesToArray: function(nodes) {\n var results = [], i;\n nodes = nodes || [];\n\n for (i = 0; i < nodes.length; ++i) {\n results.push(nodes.item(i));\n }\n return results;\n },\n\n /**\n * Determines the absolute position of the viewport.\n * Useful when making client rectangles absolute.\n * @returns {number}\n */\n getViewportTop: function() {\n // If body scrolling is disabled, then use the cached viewport top value, otherwise get it\n // fresh from the $window.\n if ($mdUtil.disableScrollAround._count && $mdUtil.disableScrollAround._viewPortTop) {\n return $mdUtil.disableScrollAround._viewPortTop;\n } else {\n return $window.scrollY || $window.pageYOffset || 0;\n }\n },\n\n /**\n * Finds the proper focus target by searching the DOM.\n *\n * @param {!JQLite} containerEl\n * @param {string=} attributeVal\n * @returns {JQLite|undefined}\n */\n findFocusTarget: function(containerEl, attributeVal) {\n var AUTO_FOCUS = this.prefixer('md-autofocus', true);\n var elToFocus;\n\n elToFocus = scanForFocusable(containerEl, attributeVal || AUTO_FOCUS);\n\n // Scan for fallback to 'universal' API\n if (!elToFocus) {\n elToFocus = scanForFocusable(containerEl, AUTO_FOCUS);\n }\n\n return elToFocus;\n\n /**\n * Can target and nested children for specified Selector (attribute)\n * whose value may be an expression that evaluates to True/False.\n * @param {!JQLite} target\n * @param {!string} selector\n * @return {JQLite|undefined}\n */\n function scanForFocusable(target, selector) {\n var elFound, items = target[0].querySelectorAll(selector);\n\n // Find the last child element with the focus attribute\n if (items && items.length) {\n items.length && angular.forEach(items, function(it) {\n it = angular.element(it);\n\n // Check the element for the md-autofocus class to ensure any associated expression\n // evaluated to true.\n var isFocusable = it.hasClass('md-autofocus');\n if (isFocusable) elFound = it;\n });\n }\n return elFound;\n }\n },\n\n /**\n * Disables scroll around the passed parent element.\n * @param {Element|JQLite=} element Origin Element (not used)\n * @param {Element|JQLite=} parent Element to disable scrolling within.\n * Defaults to body if none supplied.\n * @param {Object=} options Object of options to modify functionality\n * - disableScrollMask Boolean of whether or not to create a scroll mask element or\n * use the passed parent element.\n */\n disableScrollAround: function(element, parent, options) {\n options = options || {};\n\n $mdUtil.disableScrollAround._count = Math.max(0, $mdUtil.disableScrollAround._count || 0);\n $mdUtil.disableScrollAround._count++;\n\n if ($mdUtil.disableScrollAround._restoreScroll) {\n return $mdUtil.disableScrollAround._restoreScroll;\n }\n\n var body = $document[0].body;\n var restoreBody = disableBodyScroll();\n var restoreElement = disableElementScroll(parent, options);\n\n return $mdUtil.disableScrollAround._restoreScroll = function() {\n if (--$mdUtil.disableScrollAround._count <= 0) {\n delete $mdUtil.disableScrollAround._viewPortTop;\n restoreBody();\n restoreElement();\n delete $mdUtil.disableScrollAround._restoreScroll;\n }\n };\n\n /**\n * Creates a virtual scrolling mask to prevent touchmove, keyboard, scrollbar clicking,\n * and wheel events.\n * @param {!Element|!JQLite} elementToDisable\n * @param {Object=} scrollMaskOptions Object of options to modify functionality\n * - disableScrollMask Boolean of whether or not to create a scroll mask element or\n * use the passed parent element.\n * @returns {Function}\n */\n function disableElementScroll(elementToDisable, scrollMaskOptions) {\n var scrollMask;\n var wrappedElementToDisable = angular.element(elementToDisable || body);\n\n if (scrollMaskOptions.disableScrollMask) {\n scrollMask = wrappedElementToDisable;\n } else {\n scrollMask = angular.element(\n '<div class=\"md-scroll-mask\">' +\n ' <div class=\"md-scroll-mask-bar\"></div>' +\n '</div>');\n wrappedElementToDisable.append(scrollMask);\n }\n\n /**\n * @param {Event} $event\n */\n function preventDefault($event) {\n $event.preventDefault();\n }\n\n scrollMask.on('wheel touchmove', preventDefault);\n\n return function restoreElementScroll() {\n scrollMask.off('wheel touchmove', preventDefault);\n\n if (!scrollMaskOptions.disableScrollMask && scrollMask[0].parentNode) {\n scrollMask[0].parentNode.removeChild(scrollMask[0]);\n }\n };\n }\n\n // Converts the body to a position fixed block and translate it to the proper scroll position\n function disableBodyScroll() {\n var documentElement = $document[0].documentElement;\n\n var prevDocumentStyle = documentElement.style.cssText || '';\n var prevBodyStyle = body.style.cssText || '';\n\n var viewportTop = $mdUtil.getViewportTop();\n $mdUtil.disableScrollAround._viewPortTop = viewportTop;\n var clientWidth = body.clientWidth;\n var hasVerticalScrollbar = body.scrollHeight > body.clientHeight + 1;\n\n // Scroll may be set on <html> element (for example by overflow-y: scroll)\n // but Chrome is reporting the scrollTop position always on <body>.\n // scrollElement will allow to restore the scrollTop position to proper target.\n var scrollElement = documentElement.scrollTop > 0 ? documentElement : body;\n\n if (hasVerticalScrollbar) {\n angular.element(body).css({\n position: 'fixed',\n width: '100%',\n top: -viewportTop + 'px'\n });\n }\n\n if (body.clientWidth < clientWidth) {\n body.style.overflow = 'hidden';\n }\n\n return function restoreScroll() {\n // Reset the inline style CSS to the previous.\n body.style.cssText = prevBodyStyle;\n documentElement.style.cssText = prevDocumentStyle;\n\n // The scroll position while being fixed\n scrollElement.scrollTop = viewportTop;\n };\n }\n\n },\n\n enableScrolling: function() {\n var restoreFn = this.disableScrollAround._restoreScroll;\n restoreFn && restoreFn();\n },\n\n floatingScrollbars: function() {\n if (this.floatingScrollbars.cached === undefined) {\n var tempNode = angular.element('<div><div></div></div>').css({\n width: '100%',\n 'z-index': -1,\n position: 'absolute',\n height: '35px',\n 'overflow-y': 'scroll'\n });\n tempNode.children().css('height', '60px');\n\n $document[0].body.appendChild(tempNode[0]);\n this.floatingScrollbars.cached =\n (tempNode[0].offsetWidth === tempNode[0].childNodes[0].offsetWidth);\n tempNode.remove();\n }\n return this.floatingScrollbars.cached;\n },\n\n /**\n * Mobile safari only allows you to set focus in click event listeners.\n * @param {Element|JQLite} element to focus\n */\n forceFocus: function(element) {\n var node = element[0] || element;\n\n document.addEventListener('click', function focusOnClick(ev) {\n if (ev.target === node && ev.$focus) {\n node.focus();\n ev.stopImmediatePropagation();\n ev.preventDefault();\n node.removeEventListener('click', focusOnClick);\n }\n }, true);\n\n var newEvent = document.createEvent('MouseEvents');\n newEvent.initMouseEvent('click', false, true, window, {}, 0, 0, 0, 0,\n false, false, false, false, 0, null);\n newEvent.$material = true;\n newEvent.$focus = true;\n node.dispatchEvent(newEvent);\n },\n\n /**\n * facade to build md-backdrop element with desired styles\n * NOTE: Use $compile to trigger backdrop postLink function\n */\n createBackdrop: function(scope, addClass) {\n return $compile($mdUtil.supplant('<md-backdrop class=\"{0}\">', [addClass]))(scope);\n },\n\n /**\n * supplant() method from Crockford's `Remedial Javascript`\n * Equivalent to use of $interpolate; without dependency on\n * interpolation symbols and scope. Note: the '{<token>}' can\n * be property names, property chains, or array indices.\n */\n supplant: function(template, values, pattern) {\n pattern = pattern || /\\{([^{}]*)\\}/g;\n return template.replace(pattern, function(a, b) {\n var p = b.split('.'),\n r = values;\n try {\n for (var s in p) {\n if (p.hasOwnProperty(s)) {\n r = r[p[s]];\n }\n }\n } catch (e) {\n r = a;\n }\n return (typeof r === 'string' || typeof r === 'number') ? r : a;\n });\n },\n\n fakeNgModel: function() {\n return {\n $fake: true,\n $setTouched: angular.noop,\n $setViewValue: function(value) {\n this.$viewValue = value;\n this.$render(value);\n this.$viewChangeListeners.forEach(function(cb) {\n cb();\n });\n },\n $isEmpty: function(value) {\n return ('' + value).length === 0;\n },\n $parsers: [],\n $formatters: [],\n $viewChangeListeners: [],\n $render: angular.noop\n };\n },\n\n /**\n * @param {Function} func original function to be debounced\n * @param {number} wait number of milliseconds to delay (since last debounce reset).\n * Default value 10 msecs.\n * @param {Object} scope in which to apply the function after debouncing ends\n * @param {boolean} invokeApply should the $timeout trigger $digest() dirty checking\n * @return {Function} A function, that, as long as it continues to be invoked, will not be\n * triggered. The function will be called after it stops being called for N milliseconds.\n */\n debounce: function(func, wait, scope, invokeApply) {\n var timer;\n\n return function debounced() {\n var context = scope,\n args = Array.prototype.slice.call(arguments);\n\n $timeout.cancel(timer);\n timer = $timeout(function() {\n\n timer = undefined;\n func.apply(context, args);\n\n }, wait || 10, invokeApply);\n };\n },\n\n /**\n * The function will not be called unless it has been more than `delay` milliseconds since the\n * last call.\n * @param {Function} func original function to throttle\n * @param {number} delay number of milliseconds to delay\n * @return {Function} a function that can only be triggered every `delay` milliseconds.\n */\n throttle: function throttle(func, delay) {\n var recent;\n return function throttled() {\n var context = this;\n var args = arguments;\n var now = $mdUtil.now();\n\n if (!recent || (now - recent > delay)) {\n func.apply(context, args);\n recent = now;\n }\n };\n },\n\n /**\n * Measures the number of milliseconds taken to run the provided callback\n * function. Uses a high-precision timer if available.\n */\n time: function time(cb) {\n var start = $mdUtil.now();\n cb();\n return $mdUtil.now() - start;\n },\n\n /**\n * Create an implicit getter that caches its `getter()`\n * lookup value\n */\n valueOnUse : function (scope, key, getter) {\n var value = null, args = Array.prototype.slice.call(arguments);\n var params = (args.length > 3) ? args.slice(3) : [];\n\n Object.defineProperty(scope, key, {\n get: function () {\n if (value === null) value = getter.apply(scope, params);\n return value;\n }\n });\n },\n\n /**\n * Get a unique ID.\n *\n * @returns {string} an unique numeric string\n */\n nextUid: function() {\n return '' + nextUniqueId++;\n },\n\n /**\n * Stop watchers and events from firing on a scope without destroying it,\n * by disconnecting it from its parent and its siblings' linked lists.\n * @param {Object} scope to disconnect\n */\n disconnectScope: function disconnectScope(scope) {\n if (!scope) return;\n\n // we can't destroy the root scope or a scope that has been already destroyed\n if (scope.$root === scope) return;\n if (scope.$$destroyed) return;\n\n var parent = scope.$parent;\n scope.$$disconnected = true;\n\n // See Scope.$destroy\n if (parent.$$childHead === scope) parent.$$childHead = scope.$$nextSibling;\n if (parent.$$childTail === scope) parent.$$childTail = scope.$$prevSibling;\n if (scope.$$prevSibling) scope.$$prevSibling.$$nextSibling = scope.$$nextSibling;\n if (scope.$$nextSibling) scope.$$nextSibling.$$prevSibling = scope.$$prevSibling;\n\n scope.$$nextSibling = scope.$$prevSibling = null;\n\n },\n\n /**\n * Undo the effects of disconnectScope().\n * @param {Object} scope to reconnect\n */\n reconnectScope: function reconnectScope(scope) {\n if (!scope) return;\n\n // we can't disconnect the root node or scope already disconnected\n if (scope.$root === scope) return;\n if (!scope.$$disconnected) return;\n\n var child = scope;\n\n var parent = child.$parent;\n child.$$disconnected = false;\n // See Scope.$new for this logic...\n child.$$prevSibling = parent.$$childTail;\n if (parent.$$childHead) {\n parent.$$childTail.$$nextSibling = child;\n parent.$$childTail = child;\n } else {\n parent.$$childHead = parent.$$childTail = child;\n }\n },\n\n /**\n * Get an element's siblings matching a given tag name.\n *\n * @param {JQLite|angular.element|HTMLElement} element Element to start walking the DOM from\n * @param {string} tagName HTML tag name to match against\n * @returns {Object[]} JQLite\n */\n getSiblings: function getSiblings(element, tagName) {\n var upperCasedTagName = tagName.toUpperCase();\n if (element instanceof angular.element) {\n element = element[0];\n }\n var siblings = Array.prototype.filter.call(element.parentNode.children, function(node) {\n return element !== node && node.tagName.toUpperCase() === upperCasedTagName;\n });\n return siblings.map(function (sibling) {\n return angular.element(sibling);\n });\n },\n\n /**\n * getClosest replicates jQuery.closest() to walk up the DOM tree until it finds a matching\n * nodeName.\n *\n * @param {Node} el Element to start walking the DOM from\n * @param {string|function} validateWith If a string is passed, it will be evaluated against\n * each of the parent nodes' tag name. If a function is passed, the loop will call it with each\n * of the parents and will use the return value to determine whether the node is a match.\n * @param {boolean=} onlyParent Only start checking from the parent element, not `el`.\n * @returns {Node|null} closest matching parent Node or null if not found\n */\n getClosest: function getClosest(el, validateWith, onlyParent) {\n if (angular.isString(validateWith)) {\n var tagName = validateWith.toUpperCase();\n validateWith = function(el) {\n return el.nodeName.toUpperCase() === tagName;\n };\n }\n\n if (el instanceof angular.element) el = el[0];\n if (onlyParent) el = el.parentNode;\n if (!el) return null;\n\n do {\n if (validateWith(el)) {\n return el;\n }\n } while (el = el.parentNode);\n\n return null;\n },\n\n /**\n * Build polyfill for the Node.contains feature (if needed)\n * @param {Node} node\n * @param {Node} child\n * @returns {Node}\n */\n elementContains: function(node, child) {\n var hasContains = (window.Node && window.Node.prototype && Node.prototype.contains);\n var findFn = hasContains ? angular.bind(node, node.contains) : angular.bind(node, function(arg) {\n // compares the positions of two nodes and returns a bitmask\n return (node === child) || !!(this.compareDocumentPosition(arg) & 16);\n });\n\n return findFn(child);\n },\n\n /**\n * Functional equivalent for $element.filter(‘md-bottom-sheet’)\n * useful with interimElements where the element and its container are important...\n *\n * @param {JQLite} element to scan\n * @param {string} nodeName of node to find (e.g. 'md-dialog')\n * @param {boolean=} scanDeep optional flag to allow deep scans; defaults to 'false'.\n * @param {boolean=} warnNotFound optional flag to enable log warnings; defaults to false\n */\n extractElementByName: function(element, nodeName, scanDeep, warnNotFound) {\n var found = scanTree(element);\n if (!found && !!warnNotFound) {\n $log.warn($mdUtil.supplant(\"Unable to find node '{0}' in element '{1}'.\",[nodeName, element[0].outerHTML]));\n }\n\n return angular.element(found || element);\n\n /**\n * Breadth-First tree scan for element with matching `nodeName`\n */\n function scanTree(element) {\n return scanLevel(element) || (scanDeep ? scanChildren(element) : null);\n }\n\n /**\n * Case-insensitive scan of current elements only (do not descend).\n */\n function scanLevel(element) {\n if (element) {\n for (var i = 0, len = element.length; i < len; i++) {\n if (element[i].nodeName.toLowerCase() === nodeName) {\n return element[i];\n }\n }\n }\n return null;\n }\n\n /**\n * Scan children of specified node\n */\n function scanChildren(element) {\n var found;\n if (element) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if (!found) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }\n\n },\n\n /**\n * Give optional properties with no value a boolean true if attr provided or false otherwise\n */\n initOptionalProperties: function(scope, attr, defaults) {\n defaults = defaults || {};\n angular.forEach(scope.$$isolateBindings, function(binding, key) {\n if (binding.optional && angular.isUndefined(scope[key])) {\n var attrIsDefined = angular.isDefined(attr[binding.attrName]);\n scope[key] = angular.isDefined(defaults[key]) ? defaults[key] : attrIsDefined;\n }\n });\n },\n\n /**\n * Alternative to $timeout calls with 0 delay.\n * nextTick() coalesces all calls within a single frame\n * to minimize $digest thrashing\n *\n * @param {Function} callback function to be called after the tick\n * @param {boolean=} digest true to call $rootScope.$digest() after callback\n * @param {Object=} scope associated with callback. If the scope is destroyed, the callback will\n * be skipped.\n * @returns {*}\n */\n nextTick: function(callback, digest, scope) {\n // grab function reference for storing state details\n var nextTick = $mdUtil.nextTick;\n var timeout = nextTick.timeout;\n var queue = nextTick.queue || [];\n\n // add callback to the queue\n queue.push({scope: scope, callback: callback});\n\n // set default value for digest\n if (digest == null) digest = true;\n\n // store updated digest/queue values\n nextTick.digest = nextTick.digest || digest;\n nextTick.queue = queue;\n\n // either return existing timeout or create a new one\n return timeout || (nextTick.timeout = $timeout(processQueue, 0, false));\n\n /**\n * Grab a copy of the current queue\n * Clear the queue for future use\n * Process the existing queue\n * Trigger digest if necessary\n */\n function processQueue() {\n var queue = nextTick.queue;\n var digest = nextTick.digest;\n\n nextTick.queue = [];\n nextTick.timeout = null;\n nextTick.digest = false;\n\n queue.forEach(function(queueItem) {\n var skip = queueItem.scope && queueItem.scope.$$destroyed;\n if (!skip) {\n queueItem.callback();\n }\n });\n\n if (digest) $rootScope.$digest();\n }\n },\n\n /**\n * Processes a template and replaces the start/end symbols if the application has\n * overridden them.\n *\n * @param template The template to process whose start/end tags may be replaced.\n * @returns {*}\n */\n processTemplate: function(template) {\n if (usesStandardSymbols) {\n return template;\n } else {\n if (!template || !angular.isString(template)) return template;\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n }\n },\n\n /**\n * Scan up dom hierarchy for enabled parent;\n */\n getParentWithPointerEvents: function (element) {\n var parent = element.parent();\n\n // jqLite might return a non-null, but still empty, parent; so check for parent and length\n while (hasComputedStyle(parent, 'pointer-events', 'none')) {\n parent = parent.parent();\n }\n\n return parent;\n },\n\n getNearestContentElement: function (element) {\n var current = element.parent()[0];\n // Look for the nearest parent md-content, stopping at the rootElement.\n while (current && current !== $rootElement[0] && current !== document.body && current.nodeName.toUpperCase() !== 'MD-CONTENT') {\n current = current.parentNode;\n }\n return current;\n },\n\n /**\n * Checks if the current browser is natively supporting the `sticky` position.\n * @returns {string} supported sticky property name\n */\n checkStickySupport: function() {\n var stickyProp;\n var testEl = angular.element('<div>');\n $document[0].body.appendChild(testEl[0]);\n\n var stickyProps = ['sticky', '-webkit-sticky'];\n for (var i = 0; i < stickyProps.length; ++i) {\n testEl.css({\n position: stickyProps[i],\n top: 0,\n 'z-index': 2\n });\n\n if (testEl.css('position') == stickyProps[i]) {\n stickyProp = stickyProps[i];\n break;\n }\n }\n\n testEl.remove();\n\n return stickyProp;\n },\n\n /**\n * Parses an attribute value, mostly a string.\n * By default checks for negated values and returns `false´ if present.\n * Negated values are: (native falsy) and negative strings like:\n * `false` or `0`.\n * @param value Attribute value which should be parsed.\n * @param negatedCheck When set to false, won't check for negated values.\n * @returns {boolean}\n */\n parseAttributeBoolean: function(value, negatedCheck) {\n return value === '' || !!value && (negatedCheck === false || value !== 'false' && value !== '0');\n },\n\n hasComputedStyle: hasComputedStyle,\n\n /**\n * Returns true if the parent form of the element has been submitted.\n * @param element An AngularJS or HTML5 element.\n * @returns {boolean}\n */\n isParentFormSubmitted: function(element) {\n var parent = $mdUtil.getClosest(element, 'form');\n var form = parent ? angular.element(parent).controller('form') : null;\n\n return form ? form.$submitted : false;\n },\n\n /**\n * Animate the requested element's scrollTop to the requested scrollPosition with basic easing.\n * @param {!Element} element The element to scroll.\n * @param {number} scrollEnd The new/final scroll position.\n * @param {number=} duration Duration of the scroll. Default is 1000ms.\n */\n animateScrollTo: function(element, scrollEnd, duration) {\n var scrollStart = element.scrollTop;\n var scrollChange = scrollEnd - scrollStart;\n var scrollingDown = scrollStart < scrollEnd;\n var startTime = $mdUtil.now();\n\n $$rAF(scrollChunk);\n\n function scrollChunk() {\n var newPosition = calculateNewPosition();\n\n element.scrollTop = newPosition;\n\n if (scrollingDown ? newPosition < scrollEnd : newPosition > scrollEnd) {\n $$rAF(scrollChunk);\n }\n }\n\n function calculateNewPosition() {\n var easeDuration = duration || 1000;\n var currentTime = $mdUtil.now() - startTime;\n\n return ease(currentTime, scrollStart, scrollChange, easeDuration);\n }\n\n function ease(currentTime, start, change, duration) {\n // If the duration has passed (which can occur if our app loses focus due to $$rAF), jump\n // straight to the proper position\n if (currentTime > duration) {\n return start + change;\n }\n\n var ts = (currentTime /= duration) * currentTime;\n var tc = ts * currentTime;\n\n return start + change * (-2 * tc + 3 * ts);\n }\n },\n\n /**\n * Provides an easy mechanism for removing duplicates from an array.\n *\n * var myArray = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4];\n *\n * $mdUtil.uniq(myArray) => [1, 2, 3, 4]\n *\n * @param {Array} array The array whose unique values should be returned.\n * @returns {Array|void} A copy of the array containing only unique values.\n */\n uniq: function(array) {\n if (!array) { return; }\n\n return array.filter(function(value, index, self) {\n return self.indexOf(value) === index;\n });\n },\n\n /**\n * Gets the inner HTML content of the given HTMLElement.\n * Only intended for use with SVG or Symbol elements in IE11.\n * @param {Element} element\n * @returns {string} the inner HTML of the element passed in\n */\n getInnerHTML: function(element) {\n // For SVG or Symbol elements, innerHTML returns `undefined` in IE.\n // Reference: https://stackoverflow.com/q/28129956/633107\n // The XMLSerializer API is supported on IE11 and is the recommended workaround.\n var serializer = new XMLSerializer();\n\n return Array.prototype.map.call(element.childNodes, function (child) {\n return serializer.serializeToString(child);\n }).join('');\n },\n\n /**\n * Gets the outer HTML content of the given HTMLElement.\n * Only intended for use with SVG or Symbol elements in IE11.\n * @param {Element} element\n * @returns {string} the outer HTML of the element passed in\n */\n getOuterHTML: function(element) {\n // For SVG or Symbol elements, outerHTML returns `undefined` in IE.\n // Reference: https://stackoverflow.com/q/29888050/633107\n // The XMLSerializer API is supported on IE11 and is the recommended workaround.\n var serializer = new XMLSerializer();\n return serializer.serializeToString(element);\n },\n\n /**\n * Support: IE 9-11 only\n * documentMode is an IE-only property\n * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx\n */\n msie: window.document.documentMode,\n\n getTouchAction: function() {\n var testEl = document.createElement('div');\n var vendorPrefixes = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\n\n for (var i = 0; i < vendorPrefixes.length; i++) {\n var prefix = vendorPrefixes[i];\n var property = prefix ? prefix + 'TouchAction' : 'touchAction';\n if (angular.isDefined(testEl.style[property])) {\n return property;\n }\n }\n },\n\n /**\n * @param {Event} event the event to calculate the bubble path for\n * @return {EventTarget[]} the set of nodes that this event could bubble up to\n */\n getEventPath: function(event) {\n var path = [];\n var currentTarget = event.target;\n while (currentTarget) {\n path.push(currentTarget);\n currentTarget = currentTarget.parentElement;\n }\n if (path.indexOf(window) === -1 && path.indexOf(document) === -1)\n path.push(document);\n if (path.indexOf(window) === -1)\n path.push(window);\n return path;\n },\n\n /**\n * Gets the string the user has entered and removes Regex identifiers\n * @param {string} term\n * @returns {string} sanitized string\n */\n sanitize: function(term) {\n if (!term) return term;\n return term.replace(/[\\\\^$*+?.()|{}[]/g, '\\\\$&');\n },\n\n /**********************************************************************************************\n * The following functions were sourced from\n * https://github.com/angular/components/blob/3c37e4b1c1cb74a3d0a90d173240fc730d21d9d4/src/cdk/a11y/interactivity-checker/interactivity-checker.ts\n **********************************************************************************************/\n\n /**\n * Gets whether an element is disabled.\n * @param {HTMLElement} element Element to be checked.\n * @returns {boolean} Whether the element is disabled.\n */\n isDisabled: function(element) {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n },\n\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @param {HTMLElement} element\n * @returns {boolean} Whether the element is visible.\n */\n isVisible: function(element) {\n return $mdUtil.hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n },\n\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n * @param {HTMLElement} element Element to be checked.\n * @returns {boolean} Whether the element is tabbable.\n */\n isTabbable: function(element) {\n var frameElement = $mdUtil.getFrameElement($mdUtil.getWindow(element));\n\n if (frameElement) {\n // Frame elements inherit their tabindex onto all child elements.\n if ($mdUtil.getTabIndexValue(frameElement) === -1) {\n return false;\n }\n\n // Browsers disable tabbing to an element inside of an invisible frame.\n if (!$mdUtil.isVisible(frameElement)) {\n return false;\n }\n }\n\n var nodeName = element.nodeName.toLowerCase();\n var tabIndexValue = $mdUtil.getTabIndexValue(element);\n\n if (element.hasAttribute('contenteditable')) {\n return tabIndexValue !== -1;\n }\n\n if (nodeName === 'iframe' || nodeName === 'object') {\n // The frame or object's content may be tabbable depending on the content, but it's\n // not possibly to reliably detect the content of the frames. We always consider such\n // elements as non-tabbable.\n return false;\n }\n\n // In iOS, the browser only considers some specific elements as tabbable.\n if (isIos && !$mdUtil.isPotentiallyTabbableIOS(element)) {\n return false;\n }\n\n if (nodeName === 'audio') {\n // Audio elements without controls enabled are never tabbable, regardless\n // of the tabindex attribute explicitly being set.\n if (!element.hasAttribute('controls')) {\n return false;\n }\n // Audio elements with controls are by default tabbable unless the\n // tabindex attribute is set to `-1` explicitly.\n return tabIndexValue !== -1;\n }\n\n if (nodeName === 'video') {\n // For all video elements, if the tabindex attribute is set to `-1`, the video\n // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n // tabindex attribute is the source of truth here.\n if (tabIndexValue === -1) {\n return false;\n }\n // If the tabindex is explicitly set, and not `-1` (as per check before), the\n // video element is always tabbable (regardless of whether it has controls or not).\n if (tabIndexValue !== null) {\n return true;\n }\n // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n // has controls enabled. Firefox is special as videos are always tabbable regardless\n // of whether there are controls or not.\n return isFirefox || element.hasAttribute('controls');\n }\n\n return element.tabIndex >= 0;\n },\n\n /**\n * Gets whether an element can be focused by the user.\n * @param {HTMLElement} element Element to be checked.\n * @returns {boolean} Whether the element is focusable.\n */\n isFocusable: function(element) {\n // Perform checks in order of left to most expensive.\n // Again, naive approach that does not capture many edge cases and browser quirks.\n return $mdUtil.isPotentiallyFocusable(element) && !$mdUtil.isDisabled(element) &&\n $mdUtil.isVisible(element);\n },\n\n /**\n * Gets whether an element is potentially focusable without taking current visible/disabled\n * state into account.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n isPotentiallyFocusable: function(element) {\n // Inputs are potentially focusable *unless* they're type=\"hidden\".\n if ($mdUtil.isHiddenInput(element)) {\n return false;\n }\n\n return $mdUtil.isNativeFormElement(element) ||\n $mdUtil.isAnchorWithHref(element) ||\n element.hasAttribute('contenteditable') ||\n $mdUtil.hasValidTabIndex(element);\n },\n\n /**\n * Checks whether the specified element is potentially tabbable on iOS.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n isPotentiallyTabbableIOS: function(element) {\n var nodeName = element.nodeName.toLowerCase();\n var inputType = nodeName === 'input' && element.type;\n\n return inputType === 'text'\n || inputType === 'password'\n || nodeName === 'select'\n || nodeName === 'textarea';\n },\n\n /**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n * @param {HTMLElement} element\n * @returns {null|number}\n */\n getTabIndexValue: function(element) {\n if (!$mdUtil.hasValidTabIndex(element)) {\n return null;\n }\n\n // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n var tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n\n return isNaN(tabIndex) ? -1 : tabIndex;\n },\n\n /**\n * Gets whether an element has a valid tabindex.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n hasValidTabIndex: function(element) {\n if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n return false;\n }\n\n var tabIndex = element.getAttribute('tabindex');\n\n // IE11 parses tabindex=\"\" as the value \"-32768\"\n if (tabIndex == '-32768') {\n return false;\n }\n\n return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n },\n\n /**\n * Checks whether the specified element has any geometry / rectangles.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n hasGeometry: function(element) {\n // Use logic from jQuery to check for an invisible element.\n // See https://github.com/jquery/jquery/blob/8969732518470a7f8e654d5bc5be0b0076cb0b87/src/css/hiddenVisibleSelectors.js#L9\n return !!(element.offsetWidth || element.offsetHeight ||\n (typeof element.getClientRects === 'function' && element.getClientRects().length));\n },\n\n /**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n * @param {Window} window\n * @returns {null|HTMLElement}\n */\n getFrameElement: function(window) {\n try {\n return window.frameElement;\n } catch (error) {\n return null;\n }\n },\n\n /**\n * Gets the parent window of a DOM node with regards of being inside of an iframe.\n * @param {HTMLElement} node\n * @returns {Window}\n */\n getWindow: function(node) {\n // ownerDocument is null if `node` itself *is* a document.\n return node.ownerDocument && node.ownerDocument.defaultView || window;\n },\n\n /**\n * Gets whether an element's\n * @param {Node} element\n * @returns {boolean}\n */\n isNativeFormElement: function(element) {\n var nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' ||\n nodeName === 'select' ||\n nodeName === 'button' ||\n nodeName === 'textarea';\n },\n\n /**\n * Gets whether an element is an `<input type=\"hidden\">`.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n isHiddenInput: function(element) {\n return $mdUtil.isInputElement(element) && element.type == 'hidden';\n },\n\n /**\n * Gets whether an element is an anchor that has an href attribute.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n isAnchorWithHref: function(element) {\n return $mdUtil.isAnchorElement(element) && element.hasAttribute('href');\n },\n\n /**\n * Gets whether an element is an input element.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n isInputElement: function(element) {\n return element.nodeName.toLowerCase() == 'input';\n },\n\n /**\n * Gets whether an element is an anchor element.\n * @param {HTMLElement} element\n * @returns {boolean}\n */\n isAnchorElement: function(element) {\n return element.nodeName.toLowerCase() == 'a';\n },\n\n /**********************************************************************************************\n * The following two functions were sourced from\n * https://github.com/angular/components/blob/3c37e4b1c1cb74a3d0a90d173240fc730d21d9d4/src/cdk/a11y/focus-trap/focus-trap.ts#L268-L311\n **********************************************************************************************/\n\n /**\n * Get the first tabbable element from a DOM subtree (inclusive).\n * @param {HTMLElement} root\n * @returns {HTMLElement|null}\n */\n getFirstTabbableElement: function(root) {\n if ($mdUtil.isFocusable(root) && $mdUtil.isTabbable(root)) {\n return root;\n }\n\n // Iterate in DOM order. Note that IE doesn't have `children` for SVG so we fall\n // back to `childNodes` which includes text nodes, comments etc.\n var children = root.children || root.childNodes;\n\n for (var i = 0; i < children.length; i++) {\n var tabbableChild = children[i].nodeType === $document[0].ELEMENT_NODE ?\n $mdUtil.getFirstTabbableElement(children[i]) : null;\n\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n\n return null;\n },\n\n /**\n * Get the last tabbable element from a DOM subtree (inclusive).\n * @param {HTMLElement} root\n * @returns {HTMLElement|null}\n */\n getLastTabbableElement: function(root) {\n if ($mdUtil.isFocusable(root) && $mdUtil.isTabbable(root)) {\n return root;\n }\n\n // Iterate in reverse DOM order.\n var children = root.children || root.childNodes;\n\n for (var i = children.length - 1; i >= 0; i--) {\n var tabbableChild = children[i].nodeType === $document[0].ELEMENT_NODE ?\n $mdUtil.getLastTabbableElement(children[i]) : null;\n\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n\n return null;\n }\n };\n\n // Instantiate other namespace utility methods\n\n $mdUtil.dom.animator = $$mdAnimate($mdUtil);\n\n return $mdUtil;\n\n function getNode(el) {\n return el[0] || el;\n }\n}\n\n/**\n * Since removing jQuery from the demos, some code that uses `element.focus()` is broken.\n * We need to add `element.focus()`, because it's testable unlike `element[0].focus`.\n */\nangular.element.prototype.focus = angular.element.prototype.focus || function() {\n if (this.length) {\n this[0].focus();\n }\n return this;\n};\n\nangular.element.prototype.blur = angular.element.prototype.blur || function() {\n if (this.length) {\n this[0].blur();\n }\n return this;\n};\n\n})();\n(function(){\n\"use strict\";\n\n// Polyfill angular < 1.4 (provide $animateCss)\nangular\n .module('material.core')\n .factory('$$mdAnimate', [\"$q\", \"$timeout\", \"$mdConstant\", \"$animateCss\", function($q, $timeout, $mdConstant, $animateCss) {\n // Since $$mdAnimate is injected into $mdUtil... use a wrapper function\n // to subsequently inject $mdUtil as an argument to the AnimateDomUtils\n return function($mdUtil) {\n return AnimateDomUtils($mdUtil, $q, $timeout, $mdConstant, $animateCss);\n };\n }]);\n\n/**\n * Factory function that requires special injections\n */\nfunction AnimateDomUtils($mdUtil, $q, $timeout, $mdConstant, $animateCss) {\n var self;\n return self = {\n translate3d : function(target, from, to, options) {\n return $animateCss(target, {\n from: from,\n to: to,\n addClass: options.transitionInClass,\n removeClass: options.transitionOutClass,\n duration: options.duration\n })\n .start()\n .then(function() {\n // Resolve with reverser function...\n return reverseTranslate;\n });\n\n /**\n * Specific reversal of the request translate animation above...\n */\n function reverseTranslate (newFrom) {\n return $animateCss(target, {\n to: newFrom || from,\n addClass: options.transitionOutClass,\n removeClass: options.transitionInClass,\n duration: options.duration\n }).start();\n }\n },\n\n /**\n * Listen for transitionEnd event (with optional timeout)\n * Announce completion or failure via promise handlers\n */\n waitTransitionEnd: function (element, opts) {\n var TIMEOUT = 3000; // fallback is 3 secs\n\n return $q(function(resolve, reject){\n opts = opts || { };\n\n // If there is no transition is found, resolve immediately\n //\n // NOTE: using $mdUtil.nextTick() causes delays/issues\n if (noTransitionFound(opts.cachedTransitionStyles)) {\n TIMEOUT = 0;\n }\n\n var timer = $timeout(finished, opts.timeout || TIMEOUT);\n element.on($mdConstant.CSS.TRANSITIONEND, finished);\n\n /**\n * Upon timeout or transitionEnd, reject or resolve (respectively) this promise.\n * NOTE: Make sure this transitionEnd didn't bubble up from a child\n */\n function finished(ev) {\n if (ev && ev.target !== element[0]) return;\n\n if (ev) $timeout.cancel(timer);\n element.off($mdConstant.CSS.TRANSITIONEND, finished);\n\n // Never reject since ngAnimate may cause timeouts due missed transitionEnd events\n resolve();\n }\n\n /**\n * Checks whether or not there is a transition.\n *\n * @param styles The cached styles to use for the calculation. If null, getComputedStyle()\n * will be used.\n *\n * @returns {boolean} True if there is no transition/duration; false otherwise.\n */\n function noTransitionFound(styles) {\n styles = styles || window.getComputedStyle(element[0]);\n\n return styles.transitionDuration === '0s' ||\n (!styles.transition && !styles.transitionProperty);\n }\n });\n },\n\n calculateTransformValues: function (element, originator) {\n var origin = originator.element;\n var bounds = originator.bounds;\n\n if (origin || bounds) {\n var originBnds = origin ? self.clientRect(origin) || currentBounds() : self.copyRect(bounds);\n var dialogRect = self.copyRect(element[0].getBoundingClientRect());\n var dialogCenterPt = self.centerPointFor(dialogRect);\n var originCenterPt = self.centerPointFor(originBnds);\n\n return {\n centerX: originCenterPt.x - dialogCenterPt.x,\n centerY: originCenterPt.y - dialogCenterPt.y,\n scaleX: Math.round(100 * Math.min(0.5, originBnds.width / dialogRect.width)) / 100,\n scaleY: Math.round(100 * Math.min(0.5, originBnds.height / dialogRect.height)) / 100\n };\n }\n return {centerX: 0, centerY: 0, scaleX: 0.5, scaleY: 0.5};\n\n /**\n * This is a fallback if the origin information is no longer valid, then the\n * origin bounds simply becomes the current bounds for the dialogContainer's parent.\n * @returns {null|DOMRect}\n */\n function currentBounds() {\n var container = element ? element.parent() : null;\n var parent = container ? container.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }\n },\n\n /**\n * Calculate the zoom transform from dialog to origin.\n *\n * We use this to set the dialog position immediately;\n * then the md-transition-in actually translates back to\n * `translate3d(0,0,0) scale(1.0)`...\n *\n * NOTE: all values are rounded to the nearest integer\n */\n calculateZoomToOrigin: function (element, originator) {\n var zoomTemplate = \"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )\";\n var buildZoom = angular.bind(null, $mdUtil.supplant, zoomTemplate);\n\n return buildZoom(self.calculateTransformValues(element, originator));\n },\n\n /**\n * Calculate the slide transform from panel to origin.\n * NOTE: all values are rounded to the nearest integer\n */\n calculateSlideToOrigin: function (element, originator) {\n var slideTemplate = \"translate3d( {centerX}px, {centerY}px, 0 )\";\n var buildSlide = angular.bind(null, $mdUtil.supplant, slideTemplate);\n\n return buildSlide(self.calculateTransformValues(element, originator));\n },\n\n /**\n * Enhance raw values to represent valid css stylings...\n */\n toCss : function(raw) {\n var css = { };\n var lookups = 'left top right bottom width height x y min-width min-height max-width max-height';\n\n angular.forEach(raw, function(value,key) {\n if (angular.isUndefined(value)) return;\n\n if (lookups.indexOf(key) >= 0) {\n css[key] = value + 'px';\n } else {\n switch (key) {\n case 'transition':\n convertToVendor(key, $mdConstant.CSS.TRANSITION, value);\n break;\n case 'transform':\n convertToVendor(key, $mdConstant.CSS.TRANSFORM, value);\n break;\n case 'transformOrigin':\n convertToVendor(key, $mdConstant.CSS.TRANSFORM_ORIGIN, value);\n break;\n case 'font-size':\n css['font-size'] = value; // font sizes aren't always in px\n break;\n }\n }\n });\n\n return css;\n\n function convertToVendor(key, vendor, value) {\n angular.forEach(vendor.split(' '), function (key) {\n css[key] = value;\n });\n }\n },\n\n /**\n * Convert the translate CSS value to key/value pair(s).\n * @param {string} transform\n * @param {boolean=} addTransition\n * @param {string=} transition\n * @return {Object} object containing CSS translate key/value pair(s)\n */\n toTransformCss: function (transform, addTransition, transition) {\n var css = {};\n angular.forEach($mdConstant.CSS.TRANSFORM.split(' '), function (key) {\n css[key] = transform;\n });\n\n if (addTransition) {\n transition = transition || \"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important\";\n css.transition = transition;\n }\n\n return css;\n },\n\n /**\n * Clone the Rect and calculate the height/width if needed.\n * @param {DOMRect} source\n * @param {DOMRect=} destination\n * @returns {null|DOMRect}\n */\n copyRect: function (source, destination) {\n if (!source) return null;\n\n destination = destination || {};\n\n angular.forEach('left top right bottom width height'.split(' '), function (key) {\n destination[key] = Math.round(source[key]);\n });\n\n destination.width = destination.width || (destination.right - destination.left);\n destination.height = destination.height || (destination.bottom - destination.top);\n\n return destination;\n },\n\n /**\n * Calculate ClientRect of element; return null if hidden or zero size.\n * @param {Element|string} element\n * @returns {null|DOMRect}\n */\n clientRect: function (element) {\n var bounds = angular.element(element)[0].getBoundingClientRect();\n var isPositiveSizeClientRect = function (rect) {\n return rect && (rect.width > 0) && (rect.height > 0);\n };\n\n // If the event origin element has zero size, it has probably been hidden.\n return isPositiveSizeClientRect(bounds) ? self.copyRect(bounds) : null;\n },\n\n /**\n * Calculate 'rounded' center point of Rect\n * @param {DOMRect} targetRect\n * @returns {{x: number, y: number}}\n */\n centerPointFor: function (targetRect) {\n return targetRect ? {\n x: Math.round(targetRect.left + (targetRect.width / 2)),\n y: Math.round(targetRect.top + (targetRect.height / 2))\n } : { x : 0, y : 0 };\n }\n };\n}\n\n\n})();\n(function(){\n\"use strict\";\n\nif (angular.version.minor >= 4) {\n angular.module('material.core.animate', []);\n} else {\n(function() {\n \"use strict\";\n\n var forEach = angular.forEach;\n\n var WEBKIT = angular.isDefined(document.documentElement.style.WebkitAppearance);\n var TRANSITION_PROP = WEBKIT ? 'WebkitTransition' : 'transition';\n var ANIMATION_PROP = WEBKIT ? 'WebkitAnimation' : 'animation';\n var PREFIX = WEBKIT ? '-webkit-' : '';\n\n var TRANSITION_EVENTS = (WEBKIT ? 'webkitTransitionEnd ' : '') + 'transitionend';\n var ANIMATION_EVENTS = (WEBKIT ? 'webkitAnimationEnd ' : '') + 'animationend';\n\n var $$ForceReflowFactory = ['$document', function($document) {\n return function() {\n return $document[0].body.clientWidth + 1;\n };\n }];\n\n var $$rAFMutexFactory = ['$$rAF', function($$rAF) {\n return function() {\n var passed = false;\n $$rAF(function() {\n passed = true;\n });\n return function(fn) {\n passed ? fn() : $$rAF(fn);\n };\n };\n }];\n\n var $$AnimateRunnerFactory = ['$q', '$$rAFMutex', function($q, $$rAFMutex) {\n var INITIAL_STATE = 0;\n var DONE_PENDING_STATE = 1;\n var DONE_COMPLETE_STATE = 2;\n\n function AnimateRunner(host) {\n this.setHost(host);\n\n this._doneCallbacks = [];\n this._runInAnimationFrame = $$rAFMutex();\n this._state = 0;\n }\n\n AnimateRunner.prototype = {\n setHost: function(host) {\n this.host = host || {};\n },\n\n done: function(fn) {\n if (this._state === DONE_COMPLETE_STATE) {\n fn();\n } else {\n this._doneCallbacks.push(fn);\n }\n },\n\n progress: angular.noop,\n\n getPromise: function() {\n if (!this.promise) {\n var self = this;\n this.promise = $q(function(resolve, reject) {\n self.done(function(status) {\n status === false ? reject() : resolve();\n });\n });\n }\n return this.promise;\n },\n\n then: function(resolveHandler, rejectHandler) {\n return this.getPromise().then(resolveHandler, rejectHandler);\n },\n\n 'catch': function(handler) {\n return this.getPromise()['catch'](handler);\n },\n\n 'finally': function(handler) {\n return this.getPromise()['finally'](handler);\n },\n\n pause: function() {\n if (this.host.pause) {\n this.host.pause();\n }\n },\n\n resume: function() {\n if (this.host.resume) {\n this.host.resume();\n }\n },\n\n end: function() {\n if (this.host.end) {\n this.host.end();\n }\n this._resolve(true);\n },\n\n cancel: function() {\n if (this.host.cancel) {\n this.host.cancel();\n }\n this._resolve(false);\n },\n\n complete: function(response) {\n var self = this;\n if (self._state === INITIAL_STATE) {\n self._state = DONE_PENDING_STATE;\n self._runInAnimationFrame(function() {\n self._resolve(response);\n });\n }\n },\n\n _resolve: function(response) {\n if (this._state !== DONE_COMPLETE_STATE) {\n forEach(this._doneCallbacks, function(fn) {\n fn(response);\n });\n this._doneCallbacks.length = 0;\n this._state = DONE_COMPLETE_STATE;\n }\n }\n };\n\n // Polyfill AnimateRunner.all which is used by input animations\n AnimateRunner.all = function(runners, callback) {\n var count = 0;\n var status = true;\n forEach(runners, function(runner) {\n runner.done(onProgress);\n });\n\n function onProgress(response) {\n status = status && response;\n if (++count === runners.length) {\n callback(status);\n }\n }\n };\n\n return AnimateRunner;\n }];\n\n angular\n .module('material.core.animate', [])\n .factory('$$forceReflow', $$ForceReflowFactory)\n .factory('$$AnimateRunner', $$AnimateRunnerFactory)\n .factory('$$rAFMutex', $$rAFMutexFactory)\n .factory('$animateCss', ['$window', '$$rAF', '$$AnimateRunner', '$$forceReflow', '$$jqLite', '$timeout', '$animate',\n function($window, $$rAF, $$AnimateRunner, $$forceReflow, $$jqLite, $timeout, $animate) {\n\n function init(element, options) {\n\n var temporaryStyles = [];\n var node = getDomNode(element);\n var areAnimationsAllowed = node && $animate.enabled();\n\n var hasCompleteStyles = false;\n var hasCompleteClasses = false;\n\n if (areAnimationsAllowed) {\n if (options.transitionStyle) {\n temporaryStyles.push([PREFIX + 'transition', options.transitionStyle]);\n }\n\n if (options.keyframeStyle) {\n temporaryStyles.push([PREFIX + 'animation', options.keyframeStyle]);\n }\n\n if (options.delay) {\n temporaryStyles.push([PREFIX + 'transition-delay', options.delay + 's']);\n }\n\n if (options.duration) {\n temporaryStyles.push([PREFIX + 'transition-duration', options.duration + 's']);\n }\n\n hasCompleteStyles = options.keyframeStyle ||\n (options.to && (options.duration > 0 || options.transitionStyle));\n hasCompleteClasses = !!options.addClass || !!options.removeClass;\n\n blockTransition(element, true);\n }\n\n var hasCompleteAnimation = areAnimationsAllowed && (hasCompleteStyles || hasCompleteClasses);\n\n applyAnimationFromStyles(element, options);\n\n var animationClosed = false;\n var events, eventFn;\n\n return {\n close: $window.close,\n start: function() {\n var runner = new $$AnimateRunner();\n waitUntilQuiet(function() {\n blockTransition(element, false);\n if (!hasCompleteAnimation) {\n return close();\n }\n\n forEach(temporaryStyles, function(entry) {\n var key = entry[0];\n var value = entry[1];\n node.style[camelCase(key)] = value;\n });\n\n applyClasses(element, options);\n\n var timings = computeTimings(element);\n if (timings.duration === 0) {\n return close();\n }\n\n var moreStyles = [];\n\n if (options.easing) {\n if (timings.transitionDuration) {\n moreStyles.push([PREFIX + 'transition-timing-function', options.easing]);\n }\n if (timings.animationDuration) {\n moreStyles.push([PREFIX + 'animation-timing-function', options.easing]);\n }\n }\n\n if (options.delay && timings.animationDelay) {\n moreStyles.push([PREFIX + 'animation-delay', options.delay + 's']);\n }\n\n if (options.duration && timings.animationDuration) {\n moreStyles.push([PREFIX + 'animation-duration', options.duration + 's']);\n }\n\n forEach(moreStyles, function(entry) {\n var key = entry[0];\n var value = entry[1];\n node.style[camelCase(key)] = value;\n temporaryStyles.push(entry);\n });\n\n var maxDelay = timings.delay;\n var maxDelayTime = maxDelay * 1000;\n var maxDuration = timings.duration;\n var maxDurationTime = maxDuration * 1000;\n var startTime = Date.now();\n\n events = [];\n if (timings.transitionDuration) {\n events.push(TRANSITION_EVENTS);\n }\n if (timings.animationDuration) {\n events.push(ANIMATION_EVENTS);\n }\n events = events.join(' ');\n eventFn = function(event) {\n event.stopPropagation();\n var ev = event.originalEvent || event;\n var timeStamp = ev.timeStamp || Date.now();\n var elapsedTime = parseFloat(ev.elapsedTime.toFixed(3));\n if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n close();\n }\n };\n element.on(events, eventFn);\n\n applyAnimationToStyles(element, options);\n\n $timeout(close, maxDelayTime + maxDurationTime * 1.5, false);\n });\n\n return runner;\n\n function close() {\n if (animationClosed) return;\n animationClosed = true;\n\n if (events && eventFn) {\n element.off(events, eventFn);\n }\n applyClasses(element, options);\n applyAnimationStyles(element, options);\n forEach(temporaryStyles, function(entry) {\n node.style[camelCase(entry[0])] = '';\n });\n runner.complete(true);\n return runner;\n }\n }\n };\n }\n\n function applyClasses(element, options) {\n if (options.addClass) {\n $$jqLite.addClass(element, options.addClass);\n options.addClass = null;\n }\n if (options.removeClass) {\n $$jqLite.removeClass(element, options.removeClass);\n options.removeClass = null;\n }\n }\n\n function computeTimings(element) {\n var node = getDomNode(element);\n var cs = $window.getComputedStyle(node);\n var tdr = parseMaxTime(cs[prop('transitionDuration')]);\n var adr = parseMaxTime(cs[prop('animationDuration')]);\n var tdy = parseMaxTime(cs[prop('transitionDelay')]);\n var ady = parseMaxTime(cs[prop('animationDelay')]);\n\n adr *= (parseInt(cs[prop('animationIterationCount')], 10) || 1);\n var duration = Math.max(adr, tdr);\n var delay = Math.max(ady, tdy);\n\n return {\n duration: duration,\n delay: delay,\n animationDuration: adr,\n transitionDuration: tdr,\n animationDelay: ady,\n transitionDelay: tdy\n };\n\n function prop(key) {\n return WEBKIT ? 'Webkit' + key.charAt(0).toUpperCase() + key.substr(1)\n : key;\n }\n }\n\n function parseMaxTime(str) {\n var maxValue = 0;\n var values = (str || \"\").split(/\\s*,\\s*/);\n forEach(values, function(value) {\n // it's always safe to consider only second values and omit `ms` values since\n // getComputedStyle will always handle the conversion for us\n if (value.charAt(value.length - 1) == 's') {\n value = value.substring(0, value.length - 1);\n }\n value = parseFloat(value) || 0;\n maxValue = maxValue ? Math.max(value, maxValue) : value;\n });\n return maxValue;\n }\n\n var cancelLastRAFRequest;\n var rafWaitQueue = [];\n function waitUntilQuiet(callback) {\n if (cancelLastRAFRequest) {\n cancelLastRAFRequest(); // cancels the request\n }\n rafWaitQueue.push(callback);\n cancelLastRAFRequest = $$rAF(function() {\n cancelLastRAFRequest = null;\n\n // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.\n // PLEASE EXAMINE THE `$$forceReflow` service to understand why.\n var pageWidth = $$forceReflow();\n\n // we use a for loop to ensure that if the queue is changed\n // during this looping then it will consider new requests\n for (var i = 0; i < rafWaitQueue.length; i++) {\n rafWaitQueue[i](pageWidth);\n }\n rafWaitQueue.length = 0;\n });\n }\n\n function applyAnimationStyles(element, options) {\n applyAnimationFromStyles(element, options);\n applyAnimationToStyles(element, options);\n }\n\n function applyAnimationFromStyles(element, options) {\n if (options.from) {\n element.css(options.from);\n options.from = null;\n }\n }\n\n function applyAnimationToStyles(element, options) {\n if (options.to) {\n element.css(options.to);\n options.to = null;\n }\n }\n\n function getDomNode(element) {\n for (var i = 0; i < element.length; i++) {\n if (element[i].nodeType === 1) return element[i];\n }\n }\n\n function blockTransition(element, bool) {\n var node = getDomNode(element);\n var key = camelCase(PREFIX + 'transition-delay');\n node.style[key] = bool ? '-9999s' : '';\n }\n\n return init;\n }]);\n\n /**\n * Older browsers [FF31] expect camelCase\n * property keys.\n * e.g.\n * animation-duration --> animationDuration\n */\n function camelCase(str) {\n return str.replace(/-[a-z]/g, function(str) {\n return str.charAt(1).toUpperCase();\n });\n }\n\n})();\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.core.aria\n * @description\n * Aria Expectations for AngularJS Material components.\n */\nMdAriaService.$inject = [\"$$rAF\", \"$log\", \"$window\", \"$interpolate\"];\nangular\n .module('material.core')\n .provider('$mdAria', MdAriaProvider);\n\n/**\n * @ngdoc service\n * @name $mdAriaProvider\n * @module material.core.aria\n *\n * @description\n *\n * Modify options of the `$mdAria` service, which will be used by most of the AngularJS Material\n * components.\n *\n * You are able to disable `$mdAria` warnings, by using the following markup.\n *\n * <hljs lang=\"js\">\n * app.config(function($mdAriaProvider) {\n * // Globally disables all ARIA warnings.\n * $mdAriaProvider.disableWarnings();\n * });\n * </hljs>\n *\n */\nfunction MdAriaProvider() {\n\n var config = {\n /** Whether we should show ARIA warnings in the console if labels are missing on the element */\n showWarnings: true\n };\n\n return {\n disableWarnings: disableWarnings,\n $get: [\"$$rAF\", \"$log\", \"$window\", \"$interpolate\", function($$rAF, $log, $window, $interpolate) {\n return MdAriaService.apply(config, arguments);\n }]\n };\n\n /**\n * @ngdoc method\n * @name $mdAriaProvider#disableWarnings\n * @description Disables all ARIA warnings generated by AngularJS Material.\n */\n function disableWarnings() {\n config.showWarnings = false;\n }\n}\n\n/*\n * @ngInject\n */\nfunction MdAriaService($$rAF, $log, $window, $interpolate) {\n\n // Load the showWarnings option from the current context and store it inside of a scope variable,\n // because the context will be probably lost in some function calls.\n var showWarnings = this.showWarnings;\n\n return {\n expect: expect,\n expectAsync: expectAsync,\n expectWithText: expectWithText,\n expectWithoutText: expectWithoutText,\n getText: getText,\n hasAriaLabel: hasAriaLabel,\n parentHasAriaLabel: parentHasAriaLabel\n };\n\n /**\n * Check if expected attribute has been specified on the target element or child\n * @param {string|JQLite} element\n * @param {string} attrName\n * @param {string=} defaultValue What to set the attr to if no value is found\n */\n function expect(element, attrName, defaultValue) {\n\n var node = angular.element(element)[0] || element;\n\n // if node exists and neither it nor its children have the attribute\n if (node &&\n ((!node.hasAttribute(attrName) ||\n node.getAttribute(attrName).length === 0) &&\n !childHasAttribute(node, attrName))) {\n\n defaultValue = angular.isString(defaultValue) ? defaultValue.trim() : '';\n if (defaultValue.length) {\n element.attr(attrName, defaultValue);\n } else if (showWarnings) {\n $log.warn('ARIA: Attribute \"', attrName, '\", required for accessibility, is missing on node:', node);\n }\n\n }\n }\n\n function expectAsync(element, attrName, defaultValueGetter) {\n // Problem: when retrieving the element's contents synchronously to find the label,\n // the text may not be defined yet in the case of a binding.\n // There is a higher chance that a binding will be defined if we wait one frame.\n $$rAF(function() {\n expect(element, attrName, defaultValueGetter());\n });\n }\n\n function expectWithText(element, attrName) {\n var content = getText(element) || \"\";\n var hasBinding = content.indexOf($interpolate.startSymbol()) > -1;\n\n if (hasBinding) {\n expectAsync(element, attrName, function() {\n return getText(element);\n });\n } else {\n expect(element, attrName, content);\n }\n }\n\n function expectWithoutText(element, attrName) {\n var content = getText(element);\n var hasBinding = content.indexOf($interpolate.startSymbol()) > -1;\n\n if (!hasBinding && !content) {\n expect(element, attrName, content);\n }\n }\n\n /**\n * @param {Element|JQLite} element\n * @returns {string}\n */\n function getText(element) {\n element = element[0] || element;\n var walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);\n var text = '';\n\n var node;\n while (node = walker.nextNode()) {\n if (!isAriaHiddenNode(node)) {\n text += node.textContent;\n }\n }\n\n return text.trim() || '';\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function isAriaHiddenNode(node) {\n while (node.parentNode && (node = node.parentNode) !== element) {\n if (node.getAttribute && node.getAttribute('aria-hidden') === 'true') {\n return true;\n }\n }\n }\n }\n\n function childHasAttribute(node, attrName) {\n var hasChildren = node.hasChildNodes(),\n hasAttr = false;\n\n function isHidden(el) {\n var style = el.currentStyle ? el.currentStyle : $window.getComputedStyle(el);\n return (style.display === 'none');\n }\n\n if (hasChildren) {\n var children = node.childNodes;\n for (var i=0; i < children.length; i++) {\n var child = children[i];\n if (child.nodeType === 1 && child.hasAttribute(attrName)) {\n if (!isHidden(child)) {\n hasAttr = true;\n }\n }\n }\n }\n return hasAttr;\n }\n\n /**\n * Check if expected element has aria label attribute\n * @param element\n */\n function hasAriaLabel(element) {\n var node = angular.element(element)[0] || element;\n\n /* Check if compatible node type (ie: not HTML Document node) */\n if (!node.hasAttribute) {\n return false;\n }\n\n /* Check label or description attributes */\n return node.hasAttribute('aria-label') || node.hasAttribute('aria-labelledby') || node.hasAttribute('aria-describedby');\n }\n\n /**\n * Check if expected element's parent has aria label attribute and has valid role and tagName\n * @param {string|JQLite|Node & ParentNode} element\n * @param {number=} level Number of levels deep search should be performed\n */\n function parentHasAriaLabel(element, level) {\n level = level || 1;\n var node = angular.element(element)[0] || element;\n if (!node.parentNode) {\n return false;\n }\n if (performCheck(node.parentNode)) {\n return true;\n }\n level--;\n if (level) {\n return parentHasAriaLabel(node.parentNode, level);\n }\n return false;\n\n function performCheck(parentNode) {\n if (!hasAriaLabel(parentNode)) {\n return false;\n }\n /* Perform role block-list check */\n if (parentNode.hasAttribute('role')) {\n switch (parentNode.getAttribute('role').toLowerCase()) {\n case 'command':\n case 'definition':\n case 'directory':\n case 'grid':\n case 'list':\n case 'listitem':\n case 'log':\n case 'marquee':\n case 'menu':\n case 'menubar':\n case 'note':\n case 'presentation':\n case 'separator':\n case 'scrollbar':\n case 'status':\n case 'tablist':\n return false;\n }\n }\n /* Perform tagName block-list check */\n switch (parentNode.tagName.toLowerCase()) {\n case 'abbr':\n case 'acronym':\n case 'address':\n case 'applet':\n case 'audio':\n case 'b':\n case 'bdi':\n case 'bdo':\n case 'big':\n case 'blockquote':\n case 'br':\n case 'canvas':\n case 'caption':\n case 'center':\n case 'cite':\n case 'code':\n case 'col':\n case 'data':\n case 'dd':\n case 'del':\n case 'dfn':\n case 'dir':\n case 'div':\n case 'dl':\n case 'em':\n case 'embed':\n case 'fieldset':\n case 'figcaption':\n case 'font':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n case 'hgroup':\n case 'html':\n case 'i':\n case 'ins':\n case 'isindex':\n case 'kbd':\n case 'keygen':\n case 'label':\n case 'legend':\n case 'li':\n case 'map':\n case 'mark':\n case 'menu':\n case 'object':\n case 'ol':\n case 'output':\n case 'pre':\n case 'presentation':\n case 'q':\n case 'rt':\n case 'ruby':\n case 'samp':\n case 'small':\n case 'source':\n case 'span':\n case 'status':\n case 'strike':\n case 'strong':\n case 'sub':\n case 'sup':\n case 'svg':\n case 'tbody':\n case 'td':\n case 'th':\n case 'thead':\n case 'time':\n case 'tr':\n case 'track':\n case 'tt':\n case 'ul':\n case 'var':\n return false;\n }\n return true;\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.core.compiler\n * @description\n * AngularJS Material template and element compiler.\n */\nangular\n .module('material.core')\n .provider('$mdCompiler', MdCompilerProvider);\n\nMdCompilerProvider.$inject = ['$compileProvider'];\nfunction MdCompilerProvider() {\n\n this.$get = [\"$q\", \"$templateRequest\", \"$injector\", \"$compile\", \"$controller\",\n function($q, $templateRequest, $injector, $compile, $controller) {\n return new MdCompilerService($q, $templateRequest, $injector, $compile, $controller);\n }];\n\n /**\n * @ngdoc service\n * @name $mdCompiler\n * @module material.core.compiler\n * @description\n * The $mdCompiler service is an abstraction of AngularJS's compiler, that allows developers\n * to compile an element with options like in a Directive Definition Object.\n *\n * > The compiler powers a lot of components inside of AngularJS Material.\n * > Like the `$mdPanel` or `$mdDialog` services.\n *\n * @usage\n *\n * Basic Usage with a template\n *\n * <hljs lang=\"js\">\n * $mdCompiler.compile({\n * templateUrl: 'modal.html',\n * controller: 'ModalCtrl',\n * locals: {\n * modal: myModalInstance;\n * }\n * }).then(function (compileData) {\n * compileData.element; // Compiled DOM element\n * compileData.link(myScope); // Instantiate controller and link element to scope.\n * });\n * </hljs>\n *\n * Example with a content element\n *\n * <hljs lang=\"js\">\n *\n * // Create a virtual element and link it manually.\n * // The compiler doesn't need to recompile the element each time.\n * var myElement = $compile('<span>Test</span>')(myScope);\n *\n * $mdCompiler.compile({\n * contentElement: myElement\n * }).then(function (compileData) {\n * compileData.element // Content Element (same as above)\n * compileData.link // This does nothing when using a contentElement.\n * });\n * </hljs>\n *\n * > Content Element is a significant performance improvement when the developer already knows\n * > that the compiled element will be always the same and the scope will not change either.\n *\n * The `contentElement` option also supports DOM elements which will be temporary removed and\n * restored at its old position.\n *\n * <hljs lang=\"js\">\n * var domElement = document.querySelector('#myElement');\n *\n * $mdCompiler.compile({\n * contentElement: myElement\n * }).then(function (compileData) {\n * compileData.element // Content Element (same as above)\n * compileData.link // This does nothing when using a contentElement.\n * });\n * </hljs>\n *\n * The `$mdCompiler` can also query for the element in the DOM itself.\n *\n * <hljs lang=\"js\">\n * $mdCompiler.compile({\n * contentElement: '#myElement'\n * }).then(function (compileData) {\n * compileData.element // Content Element (same as above)\n * compileData.link // This does nothing when using a contentElement.\n * });\n * </hljs>\n *\n */\n function MdCompilerService($q, $templateRequest, $injector, $compile, $controller) {\n\n /**\n * @private @const\n * @type {!IQService}\n */\n this.$q = $q;\n\n /**\n * @private @const\n * @type {!ITemplateRequestService}\n */\n this.$templateRequest = $templateRequest;\n\n /**\n * @private @const\n * @type {!IInjectorService}\n */\n this.$injector = $injector;\n\n /**\n * @private @const\n * @type{!ICompileService}\n */\n this.$compile = $compile;\n\n /**\n * @private @const\n * @type {!IControllerService}\n */\n this.$controller = $controller;\n }\n\n /**\n * @ngdoc method\n * @name $mdCompiler#compile\n * @description\n *\n * A method to compile a HTML template with the AngularJS compiler.\n * The `$mdCompiler` is wrapper around the AngularJS compiler and provides extra functionality\n * like controller instantiation or async resolves.\n *\n * @param {!Object} options An options object, with the following properties:\n *\n * - `controller` - `{string|function}` Controller fn that should be associated with\n * newly created scope or the name of a registered controller if passed as a string.\n * - `controllerAs` - `{string=}` A controller alias name. If present the controller will be\n * published to scope under the `controllerAs` name.\n * - `contentElement` - `{string|Element}`: Instead of using a template, which will be\n * compiled each time, you can also use a DOM element.<br/>\n * - `template` - `{string=}` An html template as a string.\n * - `templateUrl` - `{string=}` A path to an html template.\n * - `transformTemplate` - `{function(template)=}` A function which transforms the template after\n * it is loaded. It will be given the template string as a parameter, and should\n * return a a new string representing the transformed template.\n * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should\n * be injected into the controller. If any of these dependencies are promises, the compiler\n * will wait for them all to be resolved, or if one is rejected before the controller is\n * instantiated `compile()` will fail..\n * * `key` - `{string}`: a name of a dependency to be injected into the controller.\n * * `factory` - `{string|function}`: If `string` then it is an alias for a service.\n * Otherwise if function, then it is injected and the return value is treated as the\n * dependency. If the result is a promise, it is resolved before its value is\n * injected into the controller.\n *\n * @returns {Q.Promise<{element: JQLite, link: Function, locals: Object, cleanup: any,\n * controller: Object=}>} promise A promise, which will be resolved with a `compileData` object.\n * `compileData` has the following properties:\n *\n * - `element` - `{JQLite}`: an uncompiled element matching the provided template.\n * - `link` - `{function(scope)}`: A link function, which, when called, will compile\n * the element and instantiate the provided controller (if given).\n * - `locals` - `{Object}`: The locals which will be passed into the controller once `link` is\n * called. If `bindToController` is true, they will be copied to the ctrl instead\n */\n MdCompilerService.prototype.compile = function(options) {\n if (options.contentElement) {\n return this._prepareContentElement(options);\n } else {\n return this._compileTemplate(options);\n }\n };\n\n /**\n * Instead of compiling any template, the compiler just fetches an existing HTML element from the\n * DOM and provides a restore function to put the element back it old DOM position.\n * @param {!Object} options Options to be used for the compiler.\n * @returns {Q.Promise<{element: JQLite, link: Function, locals: Object, cleanup: any}>}\n */\n MdCompilerService.prototype._prepareContentElement = function(options) {\n\n var contentElement = this._fetchContentElement(options);\n\n return this.$q.resolve({\n element: contentElement.element,\n cleanup: contentElement.restore,\n locals: {},\n link: function() {\n return contentElement.element;\n }\n });\n\n };\n\n /**\n * Compiles a template by considering all options and waiting for all resolves to be ready.\n * @param {!Object} options Compile options\n * @returns {!Q.Promise<{element: JQLite, link: Function, locals: Object, cleanup: any}>} Compile\n * data with link function.\n */\n MdCompilerService.prototype._compileTemplate = function(options) {\n\n var self = this;\n var templateUrl = options.templateUrl;\n var template = options.template || '';\n var resolve = angular.extend({}, options.resolve);\n var locals = angular.extend({}, options.locals);\n var transformTemplate = options.transformTemplate || angular.identity;\n\n // Take resolve values and invoke them.\n // Resolves can either be a string (value: 'MyRegisteredAngularConst'),\n // or an invokable 'factory' of sorts: (value: function ValueGetter($dependency) {})\n angular.forEach(resolve, function(value, key) {\n if (angular.isString(value)) {\n resolve[key] = self.$injector.get(value);\n } else {\n resolve[key] = self.$injector.invoke(value);\n }\n });\n\n // Add the locals, which are just straight values to inject\n // eg locals: { three: 3 }, will inject three into the controller\n angular.extend(resolve, locals);\n\n if (templateUrl) {\n resolve.$$ngTemplate = this.$templateRequest(templateUrl);\n } else {\n resolve.$$ngTemplate = this.$q.when(template);\n }\n\n\n // Wait for all the resolves to finish if they are promises\n return this.$q.all(resolve).then(function(locals) {\n\n var template = transformTemplate(locals.$$ngTemplate, options);\n var element = options.element || angular.element('<div>').html(template.trim()).contents();\n\n return self._compileElement(locals, element, options);\n });\n\n };\n\n /**\n * Method to compile an element with the given options.\n * @param {!Object} locals Locals to be injected to the controller if present\n * @param {!JQLite} element Element to be compiled and linked\n * @param {!Object} options Options to be used for linking.\n * @returns {!{element: JQLite, link: Function, locals: Object, cleanup: any, controller: Object}} Compile data with link function.\n */\n MdCompilerService.prototype._compileElement = function(locals, element, options) {\n var self = this;\n var ngLinkFn = this.$compile(element);\n\n var compileData = {\n element: element,\n cleanup: element.remove.bind(element),\n locals: locals,\n link: linkFn\n };\n\n function linkFn(scope) {\n locals.$scope = scope;\n\n // Instantiate controller if the developer provided one.\n if (options.controller) {\n\n var injectLocals = angular.extend({}, locals, {\n $element: element\n });\n\n // Create the specified controller instance.\n var ctrl = self._createController(options, injectLocals, locals);\n\n // Registering extra $destroy listeners should be avoided.\n // Only register the listener if the controller implements a $onDestroy hook.\n if (angular.isFunction(ctrl.$onDestroy)) {\n scope.$on('$destroy', function() {\n // Call the $onDestroy hook if it's present on the controller.\n angular.isFunction(ctrl.$onDestroy) && ctrl.$onDestroy();\n });\n }\n\n // Unique identifier for AngularJS Route ngView controllers.\n element.data('$ngControllerController', ctrl);\n element.children().data('$ngControllerController', ctrl);\n\n // Expose the instantiated controller to the compile data\n compileData.controller = ctrl;\n }\n\n // Invoke the AngularJS $compile link function.\n return ngLinkFn(scope);\n }\n\n return compileData;\n\n };\n\n /**\n * Creates and instantiates a new controller with the specified options.\n * @param {!Object} options Options that include the controller function or string.\n * @param {!Object} injectLocals Locals to to be provided in the controller DI.\n * @param {!Object} locals Locals to be injected to the controller.\n * @returns {!Object} Created controller instance.\n */\n MdCompilerService.prototype._createController = function(options, injectLocals, locals) {\n var ctrl = this.$controller(options.controller, injectLocals);\n\n if (options.bindToController) {\n angular.extend(ctrl, locals);\n }\n\n if (options.controllerAs) {\n injectLocals.$scope[options.controllerAs] = ctrl;\n }\n\n // Call the $onInit hook if it's present on the controller.\n angular.isFunction(ctrl.$onInit) && ctrl.$onInit();\n\n return ctrl;\n };\n\n /**\n * Fetches an element removing it from the DOM and using it temporary for the compiler.\n * Elements which were fetched will be restored after use.\n * @param {!Object} options Options to be used for the compilation.\n * @returns {{element: !JQLite, restore: !function}}\n */\n MdCompilerService.prototype._fetchContentElement = function(options) {\n var contentEl = options.contentElement;\n var restoreFn;\n\n if (angular.isString(contentEl)) {\n contentEl = document.querySelector(contentEl);\n restoreFn = createRestoreFn(contentEl);\n } else {\n contentEl = contentEl[0] || contentEl;\n\n // When the element is visible in the DOM, then we restore it at close of the dialog.\n // Otherwise it will be removed from the DOM after close.\n if (document.contains(contentEl)) {\n restoreFn = createRestoreFn(contentEl);\n } else {\n restoreFn = function() {\n if (contentEl.parentNode) {\n contentEl.parentNode.removeChild(contentEl);\n }\n };\n }\n }\n\n return {\n element: angular.element(contentEl),\n restore: restoreFn\n };\n\n function createRestoreFn(element) {\n var parent = element.parentNode;\n var nextSibling = element.nextElementSibling;\n\n return function() {\n if (!nextSibling) {\n // When the element didn't had any sibling, then it can be simply appended to the\n // parent, because it plays no role, which index it had before.\n parent.appendChild(element);\n } else {\n // When the element had a sibling, which marks the previous position of the element\n // in the DOM, we insert it correctly before the sibling, to have the same index as\n // before.\n parent.insertBefore(element, nextSibling);\n }\n };\n }\n };\n}\n\n\n})();\n(function(){\n\"use strict\";\n\n\nMdGesture.$inject = [\"$$MdGestureHandler\", \"$$rAF\", \"$timeout\", \"$mdUtil\"];\nattachToDocument.$inject = [\"$mdGesture\", \"$$MdGestureHandler\", \"$mdUtil\"];var HANDLERS = {};\n\n/**\n * The state of the current 'pointer'. The pointer represents the state of the current touch.\n * It contains normalized x and y coordinates from DOM events,\n * as well as other information abstracted from the DOM.\n */\nvar pointer, lastPointer, maxClickDistance = 6;\nvar forceSkipClickHijack = false, disableAllGestures = false;\n\n/**\n * The position of the most recent click if that click was on a label element.\n * @type {{x: number, y: number}|null}\n */\nvar lastLabelClickPos = null;\n\n/**\n * Used to attach event listeners once when multiple ng-apps are running.\n * @type {boolean}\n */\nvar isInitialized = false;\n\n/**\n * @ngdoc module\n * @name material.core.gestures\n * @description\n * AngularJS Material Gesture handling for touch devices.\n * This module replaced the usage of the HammerJS library.\n */\nangular\n .module('material.core.gestures', [])\n .provider('$mdGesture', MdGestureProvider)\n .factory('$$MdGestureHandler', MdGestureHandler)\n .run(attachToDocument);\n\n/**\n * @ngdoc service\n * @name $mdGestureProvider\n * @module material.core.gestures\n *\n * @description\n * In some scenarios on mobile devices (without jQuery), the click events should NOT be hijacked.\n * `$mdGestureProvider` is used to configure the Gesture module to ignore or skip click hijacking\n * on mobile devices.\n *\n * You can also change the max click distance, `6px` by default, if you have issues on some touch\n * screens.\n *\n * <hljs lang=\"js\">\n * app.config(function($mdGestureProvider) {\n *\n * // For mobile devices without jQuery loaded, do not\n * // intercept click events during the capture phase.\n * $mdGestureProvider.skipClickHijack();\n *\n * // If hijacking clicks, you may want to change the default click distance\n * $mdGestureProvider.setMaxClickDistance(12);\n * });\n * </hljs>\n *\n */\nfunction MdGestureProvider() { }\n\nMdGestureProvider.prototype = {\n\n /**\n * @ngdoc method\n * @name $mdGestureProvider#disableAll\n *\n * @description\n * Disable all gesture detection. This can be beneficial to application performance\n * and memory usage.\n */\n disableAll: function () {\n disableAllGestures = true;\n },\n\n // Publish access to setter to configure a variable BEFORE the\n // $mdGesture service is instantiated...\n /**\n * @ngdoc method\n * @name $mdGestureProvider#skipClickHijack\n *\n * @description\n * Tell the AngularJS Material Gesture module to skip (or ignore) click hijacking on mobile devices.\n */\n skipClickHijack: function() {\n return forceSkipClickHijack = true;\n },\n\n /**\n * @ngdoc method\n * @name $mdGestureProvider#setMaxClickDistance\n * @param clickDistance {string} Distance in pixels. I.e. `12px`.\n * @description\n * Set the max distance from the origin of the touch event to trigger touch handlers.\n */\n setMaxClickDistance: function(clickDistance) {\n maxClickDistance = parseInt(clickDistance);\n },\n\n /**\n * $get is used to build an instance of $mdGesture\n * @ngInject\n */\n $get : [\"$$MdGestureHandler\", \"$$rAF\", \"$timeout\", \"$mdUtil\", function($$MdGestureHandler, $$rAF, $timeout, $mdUtil) {\n return new MdGesture($$MdGestureHandler, $$rAF, $timeout, $mdUtil);\n }]\n};\n\n\n\n/**\n * MdGesture factory construction function\n * @ngInject\n */\nfunction MdGesture($$MdGestureHandler, $$rAF, $timeout, $mdUtil) {\n var touchActionProperty = $mdUtil.getTouchAction();\n var hasJQuery = (typeof window.jQuery !== 'undefined') && (angular.element === window.jQuery);\n\n var self = {\n handler: addHandler,\n register: register,\n isAndroid: $mdUtil.isAndroid,\n isIos: $mdUtil.isIos,\n // On mobile w/out jQuery, we normally intercept clicks. Should we skip that?\n isHijackingClicks: ($mdUtil.isIos || $mdUtil.isAndroid) && !hasJQuery && !forceSkipClickHijack\n };\n\n if (self.isHijackingClicks) {\n self.handler('click', {\n options: {\n maxDistance: maxClickDistance\n },\n onEnd: checkDistanceAndEmit('click')\n });\n\n self.handler('focus', {\n options: {\n maxDistance: maxClickDistance\n },\n onEnd: function(ev, pointer) {\n if (pointer.distance < this.state.options.maxDistance && canFocus(ev.target)) {\n this.dispatchEvent(ev, 'focus', pointer);\n ev.target.focus();\n }\n }\n });\n\n self.handler('mouseup', {\n options: {\n maxDistance: maxClickDistance\n },\n onEnd: checkDistanceAndEmit('mouseup')\n });\n\n self.handler('mousedown', {\n onStart: function(ev) {\n this.dispatchEvent(ev, 'mousedown');\n }\n });\n }\n\n function checkDistanceAndEmit(eventName) {\n return function(ev, pointer) {\n if (pointer.distance < this.state.options.maxDistance) {\n this.dispatchEvent(ev, eventName, pointer);\n }\n };\n }\n\n /**\n * Register an element to listen for a handler.\n * This allows an element to override the default options for a handler.\n * Additionally, some handlers like drag and hold only dispatch events if\n * the domEvent happens inside an element that's registered to listen for these events.\n *\n * @see GestureHandler for how overriding of default options works.\n * @example $mdGesture.register(myElement, 'drag', { minDistance: 20, horizontal: false })\n */\n function register(element, handlerName, options) {\n var handler = HANDLERS[handlerName.replace(/^\\$md./, '')];\n if (!handler) {\n throw new Error('Failed to register element with handler ' + handlerName + '. ' +\n 'Available handlers: ' + Object.keys(HANDLERS).join(', '));\n }\n return handler.registerElement(element, options);\n }\n\n /*\n * add a handler to $mdGesture. see below.\n */\n function addHandler(name, definition) {\n var handler = new $$MdGestureHandler(name);\n angular.extend(handler, definition);\n HANDLERS[name] = handler;\n\n return self;\n }\n\n /**\n * Register handlers. These listen to touch/start/move events, interpret them,\n * and dispatch gesture events depending on options & conditions. These are all\n * instances of GestureHandler.\n * @see GestureHandler\n */\n return self\n /*\n * The press handler dispatches an event on touchdown/touchend.\n * It's a simple abstraction of touch/mouse/pointer start and end.\n */\n .handler('press', {\n onStart: function (ev, pointer) {\n this.dispatchEvent(ev, '$md.pressdown');\n },\n onEnd: function (ev, pointer) {\n this.dispatchEvent(ev, '$md.pressup');\n }\n })\n\n /*\n * The hold handler dispatches an event if the user keeps their finger within\n * the same <maxDistance> area for <delay> ms.\n * The hold handler will only run if a parent of the touch target is registered\n * to listen for hold events through $mdGesture.register()\n */\n .handler('hold', {\n options: {\n maxDistance: 6,\n delay: 500\n },\n onCancel: function () {\n $timeout.cancel(this.state.timeout);\n },\n onStart: function (ev, pointer) {\n // For hold, require a parent to be registered with $mdGesture.register()\n // Because we prevent scroll events, this is necessary.\n if (!this.state.registeredParent) return this.cancel();\n\n this.state.pos = {x: pointer.x, y: pointer.y};\n this.state.timeout = $timeout(angular.bind(this, function holdDelayFn() {\n this.dispatchEvent(ev, '$md.hold');\n this.cancel(); // we're done!\n }), this.state.options.delay, false);\n },\n onMove: function (ev, pointer) {\n // Don't scroll while waiting for hold.\n // If we don't preventDefault touchmove events here, Android will assume we don't\n // want to listen to anymore touch events. It will start scrolling and stop sending\n // touchmove events.\n if (!touchActionProperty && ev.type === 'touchmove') ev.preventDefault();\n\n // If the user moves greater than <maxDistance> pixels, stop the hold timer\n // set in onStart\n var dx = this.state.pos.x - pointer.x;\n var dy = this.state.pos.y - pointer.y;\n if (Math.sqrt(dx * dx + dy * dy) > this.options.maxDistance) {\n this.cancel();\n }\n },\n onEnd: function () {\n this.onCancel();\n }\n })\n\n /*\n * The drag handler dispatches a drag event if the user holds and moves his finger greater than\n * <minDistance> px in the x or y direction, depending on options.horizontal.\n * The drag will be cancelled if the user moves his finger greater than <minDistance>*<cancelMultiplier> in\n * the perpendicular direction. Eg if the drag is horizontal and the user moves his finger <minDistance>*<cancelMultiplier>\n * pixels vertically, this handler won't consider the move part of a drag.\n */\n .handler('drag', {\n options: {\n minDistance: 6,\n horizontal: true,\n cancelMultiplier: 1.5\n },\n /**\n * @param {angular.JQLite} element where touch action styles need to be adjusted\n * @param {{horizontal: boolean}=} options object whose horizontal property can specify to\n * apply 'pan-y' or 'pan-x' touch actions.\n */\n onSetup: function(element, options) {\n if (touchActionProperty) {\n // We check for horizontal to be false, because otherwise we would overwrite the default opts.\n this.oldTouchAction = element[0].style[touchActionProperty];\n element[0].style[touchActionProperty] = options.horizontal ? 'pan-y' : 'pan-x';\n }\n },\n /**\n * @param {angular.JQLite} element where styles need to be cleaned up\n */\n onCleanup: function(element) {\n if (this.oldTouchAction) {\n element[0].style[touchActionProperty] = this.oldTouchAction;\n } else {\n element[0].style[touchActionProperty] = null;\n }\n },\n onStart: function (ev) {\n // For drag, require a parent to be registered with $mdGesture.register()\n if (!this.state.registeredParent) this.cancel();\n },\n onMove: function (ev, pointer) {\n var shouldStartDrag, shouldCancel;\n // Don't scroll while deciding if this touchmove qualifies as a drag event.\n // If we don't preventDefault touchmove events here, Android will assume we don't\n // want to listen to anymore touch events. It will start scrolling and stop sending\n // touchmove events.\n if (!touchActionProperty && ev.type === 'touchmove') ev.preventDefault();\n\n if (!this.state.dragPointer) {\n if (this.state.options.horizontal) {\n shouldStartDrag = Math.abs(pointer.distanceX) > this.state.options.minDistance;\n shouldCancel = Math.abs(pointer.distanceY) > this.state.options.minDistance * this.state.options.cancelMultiplier;\n } else {\n shouldStartDrag = Math.abs(pointer.distanceY) > this.state.options.minDistance;\n shouldCancel = Math.abs(pointer.distanceX) > this.state.options.minDistance * this.state.options.cancelMultiplier;\n }\n\n if (shouldStartDrag) {\n // Create a new pointer representing this drag, starting at this point where the drag started.\n this.state.dragPointer = makeStartPointer(ev);\n updatePointerState(ev, this.state.dragPointer);\n this.dispatchEvent(ev, '$md.dragstart', this.state.dragPointer);\n\n } else if (shouldCancel) {\n this.cancel();\n }\n } else {\n this.dispatchDragMove(ev);\n }\n },\n // Only dispatch dragmove events every frame; any more is unnecessary\n dispatchDragMove: $$rAF.throttle(function (ev) {\n // Make sure the drag didn't stop while waiting for the next frame\n if (this.state.isRunning) {\n updatePointerState(ev, this.state.dragPointer);\n this.dispatchEvent(ev, '$md.drag', this.state.dragPointer);\n }\n }),\n onEnd: function (ev, pointer) {\n if (this.state.dragPointer) {\n updatePointerState(ev, this.state.dragPointer);\n this.dispatchEvent(ev, '$md.dragend', this.state.dragPointer);\n }\n }\n })\n\n /*\n * The swipe handler will dispatch a swipe event if, on the end of a touch,\n * the velocity and distance were high enough.\n */\n .handler('swipe', {\n options: {\n minVelocity: 0.65,\n minDistance: 10\n },\n onEnd: function (ev, pointer) {\n var eventType;\n\n if (Math.abs(pointer.velocityX) > this.state.options.minVelocity &&\n Math.abs(pointer.distanceX) > this.state.options.minDistance) {\n eventType = pointer.directionX == 'left' ? '$md.swipeleft' : '$md.swiperight';\n this.dispatchEvent(ev, eventType);\n }\n else if (Math.abs(pointer.velocityY) > this.state.options.minVelocity &&\n Math.abs(pointer.distanceY) > this.state.options.minDistance) {\n eventType = pointer.directionY == 'up' ? '$md.swipeup' : '$md.swipedown';\n this.dispatchEvent(ev, eventType);\n }\n }\n });\n}\n\n/**\n * MdGestureHandler\n * A GestureHandler is an object which is able to dispatch custom dom events\n * based on native dom {touch,pointer,mouse}{start,move,end} events.\n *\n * A gesture will manage its lifecycle through the start,move,end, and cancel\n * functions, which are called by native dom events.\n *\n * A gesture has the concept of 'options' (eg. a swipe's required velocity), which can be\n * overridden by elements registering through $mdGesture.register().\n */\nfunction GestureHandler (name) {\n this.name = name;\n this.state = {};\n}\n\nfunction MdGestureHandler() {\n var hasJQuery = (typeof window.jQuery !== 'undefined') && (angular.element === window.jQuery);\n\n GestureHandler.prototype = {\n options: {},\n // jQuery listeners don't work with custom DOMEvents, so we have to dispatch events\n // differently when jQuery is loaded\n dispatchEvent: hasJQuery ? jQueryDispatchEvent : nativeDispatchEvent,\n\n // These are overridden by the registered handler\n onSetup: angular.noop,\n onCleanup: angular.noop,\n onStart: angular.noop,\n onMove: angular.noop,\n onEnd: angular.noop,\n onCancel: angular.noop,\n\n // onStart sets up a new state for the handler, which includes options from the\n // nearest registered parent element of ev.target.\n start: function (ev, pointer) {\n if (this.state.isRunning) return;\n var parentTarget = this.getNearestParent(ev.target);\n // Get the options from the nearest registered parent\n var parentTargetOptions = parentTarget && parentTarget.$mdGesture[this.name] || {};\n\n this.state = {\n isRunning: true,\n // Override the default options with the nearest registered parent's options\n options: angular.extend({}, this.options, parentTargetOptions),\n // Pass in the registered parent node to the state so the onStart listener can use\n registeredParent: parentTarget\n };\n this.onStart(ev, pointer);\n },\n move: function (ev, pointer) {\n if (!this.state.isRunning) return;\n this.onMove(ev, pointer);\n },\n end: function (ev, pointer) {\n if (!this.state.isRunning) return;\n this.state.isRunning = false;\n this.onEnd(ev, pointer);\n },\n cancel: function (ev, pointer) {\n this.onCancel(ev, pointer);\n this.state = {};\n },\n\n // Find and return the nearest parent element that has been registered to\n // listen for this handler via $mdGesture.register(element, 'handlerName').\n getNearestParent: function (node) {\n var current = node;\n while (current) {\n if ((current.$mdGesture || {})[this.name]) {\n return current;\n }\n current = current.parentNode;\n }\n return null;\n },\n\n // Called from $mdGesture.register when an element registers itself with a handler.\n // Store the options the user gave on the DOMElement itself. These options will\n // be retrieved with getNearestParent when the handler starts.\n registerElement: function (element, options) {\n var self = this;\n element[0].$mdGesture = element[0].$mdGesture || {};\n element[0].$mdGesture[this.name] = options || {};\n element.on('$destroy', onDestroy);\n\n self.onSetup(element, options || {});\n\n return onDestroy;\n\n function onDestroy() {\n delete element[0].$mdGesture[self.name];\n element.off('$destroy', onDestroy);\n\n self.onCleanup(element, options || {});\n }\n }\n };\n\n return GestureHandler;\n\n /**\n * Dispatch an event with jQuery\n * TODO: Make sure this sends bubbling events\n *\n * @param srcEvent the original DOM touch event that started this.\n * @param eventType the name of the custom event to send (eg 'click' or '$md.drag')\n * @param eventPointer the pointer object that matches this event.\n */\n function jQueryDispatchEvent(srcEvent, eventType, eventPointer) {\n eventPointer = eventPointer || pointer;\n var eventObj = new angular.element.Event(eventType);\n\n eventObj.$material = true;\n eventObj.pointer = eventPointer;\n eventObj.srcEvent = srcEvent;\n\n angular.extend(eventObj, {\n clientX: eventPointer.x,\n clientY: eventPointer.y,\n screenX: eventPointer.x,\n screenY: eventPointer.y,\n pageX: eventPointer.x,\n pageY: eventPointer.y,\n ctrlKey: srcEvent.ctrlKey,\n altKey: srcEvent.altKey,\n shiftKey: srcEvent.shiftKey,\n metaKey: srcEvent.metaKey\n });\n angular.element(eventPointer.target).trigger(eventObj);\n }\n\n /**\n * NOTE: nativeDispatchEvent is very performance sensitive.\n * @param srcEvent the original DOM touch event that started this.\n * @param eventType the name of the custom event to send (eg 'click' or '$md.drag')\n * @param eventPointer the pointer object that matches this event.\n */\n function nativeDispatchEvent(srcEvent, eventType, eventPointer) {\n eventPointer = eventPointer || pointer;\n var eventObj;\n\n if (eventType === 'click' || eventType === 'mouseup' || eventType === 'mousedown') {\n if (typeof window.MouseEvent === \"function\") {\n eventObj = new MouseEvent(eventType, {\n bubbles: true,\n cancelable: true,\n screenX: Number(srcEvent.screenX),\n screenY: Number(srcEvent.screenY),\n clientX: Number(eventPointer.x),\n clientY: Number(eventPointer.y),\n ctrlKey: srcEvent.ctrlKey,\n altKey: srcEvent.altKey,\n shiftKey: srcEvent.shiftKey,\n metaKey: srcEvent.metaKey,\n button: srcEvent.button,\n buttons: srcEvent.buttons,\n relatedTarget: srcEvent.relatedTarget || null\n });\n } else {\n eventObj = document.createEvent('MouseEvents');\n // This has been deprecated\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent\n eventObj.initMouseEvent(\n eventType, true, true, window, srcEvent.detail,\n eventPointer.x, eventPointer.y, eventPointer.x, eventPointer.y,\n srcEvent.ctrlKey, srcEvent.altKey, srcEvent.shiftKey, srcEvent.metaKey,\n srcEvent.button, srcEvent.relatedTarget || null\n );\n }\n } else {\n if (typeof window.CustomEvent === \"function\") {\n eventObj = new CustomEvent(eventType, {\n bubbles: true,\n cancelable: true,\n detail: {}\n });\n } else {\n // This has been deprecated\n // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/initCustomEvent\n eventObj = document.createEvent('CustomEvent');\n eventObj.initCustomEvent(eventType, true, true, {});\n }\n }\n eventObj.$material = true;\n eventObj.pointer = eventPointer;\n eventObj.srcEvent = srcEvent;\n eventPointer.target.dispatchEvent(eventObj);\n }\n}\n\n/**\n * Attach Gestures: hook document and check shouldHijack clicks\n * @ngInject\n */\nfunction attachToDocument($mdGesture, $$MdGestureHandler, $mdUtil) {\n if (disableAllGestures) {\n return;\n }\n\n if (!isInitialized && $mdGesture.isHijackingClicks) {\n /*\n * If hijack clicks is true, we preventDefault any click that wasn't\n * sent by AngularJS Material. This is because on older Android & iOS, a false, or 'ghost',\n * click event will be sent ~400ms after a touchend event happens.\n * The only way to know if this click is real is to prevent any normal\n * click events, and add a flag to events sent by material so we know not to prevent those.\n *\n * Two exceptions to click events that should be prevented are:\n * - click events sent by the keyboard (eg form submit)\n * - events that originate from an Ionic app\n */\n document.addEventListener('click' , clickHijacker , true);\n document.addEventListener('mouseup' , mouseInputHijacker, true);\n document.addEventListener('mousedown', mouseInputHijacker, true);\n document.addEventListener('focus' , mouseInputHijacker, true);\n\n isInitialized = true;\n }\n\n function mouseInputHijacker(ev) {\n var isKeyClick = !ev.clientX && !ev.clientY;\n\n if (\n !isKeyClick &&\n !ev.$material &&\n !ev.isIonicTap &&\n !isInputEventFromLabelClick(ev) &&\n (ev.type !== 'mousedown' || (!canFocus(ev.target) && !canFocus(document.activeElement)))\n ) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n\n /**\n * Ignore click events that don't come from AngularJS Material, Ionic, Input Label clicks,\n * or key presses that generate click events. This helps to ignore the ghost tap events on\n * older mobile browsers that get sent after a 300-400ms delay.\n * @param ev MouseEvent or modified MouseEvent with $material, pointer, and other fields\n */\n function clickHijacker(ev) {\n var isKeyClick;\n if ($mdUtil.isIos) {\n isKeyClick = angular.isDefined(ev.webkitForce) && ev.webkitForce === 0;\n } else {\n isKeyClick = ev.clientX === 0 && ev.clientY === 0;\n }\n if (!isKeyClick && !ev.$material && !ev.isIonicTap && !isInputEventFromLabelClick(ev)) {\n ev.preventDefault();\n ev.stopPropagation();\n lastLabelClickPos = null;\n } else {\n lastLabelClickPos = null;\n if (ev.target.tagName.toLowerCase() === 'label') {\n lastLabelClickPos = {x: ev.x, y: ev.y};\n }\n }\n }\n\n\n // Listen to all events to cover all platforms.\n var START_EVENTS = 'mousedown touchstart pointerdown';\n var MOVE_EVENTS = 'mousemove touchmove pointermove';\n var END_EVENTS = 'mouseup mouseleave touchend touchcancel pointerup pointercancel';\n\n angular.element(document)\n .on(START_EVENTS, gestureStart)\n .on(MOVE_EVENTS, gestureMove)\n .on(END_EVENTS, gestureEnd)\n // For testing\n .on('$$mdGestureReset', function gestureClearCache () {\n lastPointer = pointer = null;\n });\n\n /**\n * When a DOM event happens, run all registered gesture handlers' lifecycle\n * methods which match the DOM event.\n * Eg. when a 'touchstart' event happens, runHandlers('start') will call and\n * run `handler.cancel()` and `handler.start()` on all registered handlers.\n */\n function runHandlers(handlerEvent, event) {\n var handler;\n for (var name in HANDLERS) {\n handler = HANDLERS[name];\n if (handler instanceof $$MdGestureHandler) {\n\n if (handlerEvent === 'start') {\n // Run cancel to reset any handlers' state\n handler.cancel();\n }\n handler[handlerEvent](event, pointer);\n }\n }\n }\n\n /*\n * gestureStart vets if a start event is legitimate (and not part of a 'ghost click' from iOS/Android)\n * If it is legitimate, we initiate the pointer state and mark the current pointer's type\n * For example, for a touchstart event, mark the current pointer as a 'touch' pointer, so mouse events\n * won't effect it.\n */\n function gestureStart(ev) {\n // If we're already touched down, abort\n if (pointer) return;\n\n var now = +Date.now();\n\n // iOS & old android bug: after a touch event, a click event is sent 350 ms later.\n // If <400ms have passed, don't allow an event of a different type than the previous event\n if (lastPointer && !typesMatch(ev, lastPointer) && (now - lastPointer.endTime < 1500)) {\n return;\n }\n\n pointer = makeStartPointer(ev);\n\n runHandlers('start', ev);\n }\n\n /**\n * If a move event happens of the right type, update the pointer and run all the move handlers.\n * \"of the right type\": if a mousemove happens but our pointer started with a touch event, do\n * nothing.\n */\n function gestureMove(ev) {\n if (!pointer || !typesMatch(ev, pointer)) return;\n\n updatePointerState(ev, pointer);\n runHandlers('move', ev);\n }\n\n /**\n * If an end event happens of the right type, update the pointer, run endHandlers, and save the\n * pointer as 'lastPointer'.\n */\n function gestureEnd(ev) {\n if (!pointer || !typesMatch(ev, pointer)) return;\n\n updatePointerState(ev, pointer);\n pointer.endTime = +Date.now();\n\n if (ev.type !== 'pointercancel') {\n runHandlers('end', ev);\n }\n\n lastPointer = pointer;\n pointer = null;\n }\n\n}\n\n// ********************\n// Module Functions\n// ********************\n\n/*\n * Initiate the pointer. x, y, and the pointer's type.\n */\nfunction makeStartPointer(ev) {\n var point = getEventPoint(ev);\n var startPointer = {\n startTime: +Date.now(),\n target: ev.target,\n // 'p' for pointer events, 'm' for mouse, 't' for touch\n type: ev.type.charAt(0)\n };\n startPointer.startX = startPointer.x = point.pageX;\n startPointer.startY = startPointer.y = point.pageY;\n return startPointer;\n}\n\n/*\n * return whether the pointer's type matches the event's type.\n * Eg if a touch event happens but the pointer has a mouse type, return false.\n */\nfunction typesMatch(ev, pointer) {\n return ev && pointer && ev.type.charAt(0) === pointer.type;\n}\n\n/**\n * Gets whether the given event is an input event that was caused by clicking on an\n * associated label element.\n *\n * This is necessary because the browser will, upon clicking on a label element, fire an\n * *extra* click event on its associated input (if any). mdGesture is able to flag the label\n * click as with `$material` correctly, but not the second input click.\n *\n * In order to determine whether an input event is from a label click, we compare the (x, y) for\n * the event to the (x, y) for the most recent label click (which is cleared whenever a non-label\n * click occurs). Unfortunately, there are no event properties that tie the input and the label\n * together (such as relatedTarget).\n *\n * @param {MouseEvent} event\n * @returns {boolean}\n */\nfunction isInputEventFromLabelClick(event) {\n return lastLabelClickPos\n && lastLabelClickPos.x === event.x\n && lastLabelClickPos.y === event.y;\n}\n\n/*\n * Update the given pointer based upon the given DOMEvent.\n * Distance, velocity, direction, duration, etc\n */\nfunction updatePointerState(ev, pointer) {\n var point = getEventPoint(ev);\n var x = pointer.x = point.pageX;\n var y = pointer.y = point.pageY;\n\n pointer.distanceX = x - pointer.startX;\n pointer.distanceY = y - pointer.startY;\n pointer.distance = Math.sqrt(\n pointer.distanceX * pointer.distanceX + pointer.distanceY * pointer.distanceY\n );\n\n pointer.directionX = pointer.distanceX > 0 ? 'right' : pointer.distanceX < 0 ? 'left' : '';\n pointer.directionY = pointer.distanceY > 0 ? 'down' : pointer.distanceY < 0 ? 'up' : '';\n\n pointer.duration = +Date.now() - pointer.startTime;\n pointer.velocityX = pointer.distanceX / pointer.duration;\n pointer.velocityY = pointer.distanceY / pointer.duration;\n}\n\n/**\n * Normalize the point where the DOM event happened whether it's touch or mouse.\n * @returns point event obj with pageX and pageY on it.\n */\nfunction getEventPoint(ev) {\n ev = ev.originalEvent || ev; // support jQuery events\n return (ev.touches && ev.touches[0]) ||\n (ev.changedTouches && ev.changedTouches[0]) ||\n ev;\n}\n\n/** Checks whether an element can be focused. */\nfunction canFocus(element) {\n return (\n !!element &&\n element.getAttribute('tabindex') !== '-1' &&\n !element.hasAttribute('disabled') &&\n (\n element.hasAttribute('tabindex') ||\n element.hasAttribute('href') ||\n element.isContentEditable ||\n ['INPUT', 'SELECT', 'BUTTON', 'TEXTAREA', 'VIDEO', 'AUDIO'].indexOf(element.nodeName) !== -1\n )\n );\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.core.interaction\n * @description\n * User interaction detection to provide proper accessibility.\n */\nMdInteractionService.$inject = [\"$timeout\", \"$mdUtil\", \"$rootScope\"];\nangular\n .module('material.core.interaction', [])\n .service('$mdInteraction', MdInteractionService);\n\n\n/**\n * @ngdoc service\n * @name $mdInteraction\n * @module material.core.interaction\n *\n * @description\n *\n * Service which keeps track of the last interaction type and validates them for several browsers.\n * The service hooks into the document's body and listens for touch, mouse and keyboard events.\n *\n * The most recent interaction type can be retrieved by calling the `getLastInteractionType` method.\n *\n * Here is an example markup for using the interaction service.\n *\n * <hljs lang=\"js\">\n * var lastType = $mdInteraction.getLastInteractionType();\n *\n * if (lastType === 'keyboard') {\n * // We only restore the focus for keyboard users.\n * restoreFocus();\n * }\n * </hljs>\n *\n */\nfunction MdInteractionService($timeout, $mdUtil, $rootScope) {\n this.$timeout = $timeout;\n this.$mdUtil = $mdUtil;\n this.$rootScope = $rootScope;\n\n // IE browsers can also trigger pointer events, which also leads to an interaction.\n this.pointerEvent = 'MSPointerEvent' in window ? 'MSPointerDown' : 'PointerEvent' in window ? 'pointerdown' : null;\n this.bodyElement = angular.element(document.body);\n this.isBuffering = false;\n this.bufferTimeout = null;\n this.lastInteractionType = null;\n this.lastInteractionTime = null;\n this.inputHandler = this.onInputEvent.bind(this);\n this.bufferedInputHandler = this.onBufferInputEvent.bind(this);\n\n // Type Mappings for the different events\n // There will be three three interaction types\n // `keyboard`, `mouse` and `touch`\n // type `pointer` will be evaluated in `pointerMap` for IE Browser events\n this.inputEventMap = {\n 'keydown': 'keyboard',\n 'mousedown': 'mouse',\n 'mouseenter': 'mouse',\n 'touchstart': 'touch',\n 'pointerdown': 'pointer',\n 'MSPointerDown': 'pointer'\n };\n\n // IE PointerDown events will be validated in `touch` or `mouse`\n // Index numbers referenced here: https://msdn.microsoft.com/library/windows/apps/hh466130.aspx\n this.iePointerMap = {\n 2: 'touch',\n 3: 'touch',\n 4: 'mouse'\n };\n\n this.initializeEvents();\n this.$rootScope.$on('$destroy', this.deregister.bind(this));\n}\n\n/**\n * Removes all event listeners created by $mdInteration on the\n * body element.\n */\nMdInteractionService.prototype.deregister = function() {\n\n this.bodyElement.off('keydown mousedown', this.inputHandler);\n\n if ('ontouchstart' in document.documentElement) {\n this.bodyElement.off('touchstart', this.bufferedInputHandler);\n }\n\n if (this.pointerEvent) {\n this.bodyElement.off(this.pointerEvent, this.inputHandler);\n }\n\n};\n\n/**\n * Initializes the interaction service, by registering all interaction events to the\n * body element.\n */\nMdInteractionService.prototype.initializeEvents = function() {\n\n this.bodyElement.on('keydown mousedown', this.inputHandler);\n\n if ('ontouchstart' in document.documentElement) {\n this.bodyElement.on('touchstart', this.bufferedInputHandler);\n }\n\n if (this.pointerEvent) {\n this.bodyElement.on(this.pointerEvent, this.inputHandler);\n }\n\n};\n\n/**\n * Event listener for normal interaction events, which should be tracked.\n * @param event {MouseEvent|KeyboardEvent|PointerEvent|TouchEvent}\n */\nMdInteractionService.prototype.onInputEvent = function(event) {\n if (this.isBuffering) {\n return;\n }\n\n var type = this.inputEventMap[event.type];\n\n if (type === 'pointer') {\n type = this.iePointerMap[event.pointerType] || event.pointerType;\n }\n\n this.lastInteractionType = type;\n this.lastInteractionTime = this.$mdUtil.now();\n};\n\n/**\n * Event listener for interaction events which should be buffered (touch events).\n * @param event {TouchEvent}\n */\nMdInteractionService.prototype.onBufferInputEvent = function(event) {\n this.$timeout.cancel(this.bufferTimeout);\n\n this.onInputEvent(event);\n this.isBuffering = true;\n\n // The timeout of 650ms is needed to delay the touchstart, because otherwise the touch will call\n // the `onInput` function multiple times.\n this.bufferTimeout = this.$timeout(function() {\n this.isBuffering = false;\n }.bind(this), 650, false);\n\n};\n\n/**\n * @ngdoc method\n * @name $mdInteraction#getLastInteractionType\n * @description Retrieves the last interaction type triggered in body.\n * @returns {string|null} Last interaction type.\n */\nMdInteractionService.prototype.getLastInteractionType = function() {\n return this.lastInteractionType;\n};\n\n/**\n * @ngdoc method\n * @name $mdInteraction#isUserInvoked\n * @description Method to detect whether any interaction happened recently or not.\n * @param {number=} checkDelay Time to check for any interaction to have been triggered.\n * @returns {boolean} Whether there was any interaction or not.\n */\nMdInteractionService.prototype.isUserInvoked = function(checkDelay) {\n var delay = angular.isNumber(checkDelay) ? checkDelay : 15;\n\n // Check for any interaction to be within the specified check time.\n return this.lastInteractionTime >= this.$mdUtil.now() - delay;\n};\n\n})();\n(function(){\n\"use strict\";\n\nangular.module('material.core')\n .provider('$$interimElement', InterimElementProvider);\n\n/**\n * @ngdoc service\n * @name $$interimElementProvider\n * @module material.core.interimElement\n *\n * @description\n *\n * Factory that constructs `$$interimElement.$service` services.\n * Used internally in material design for elements that appear on screen temporarily.\n * The service provides a promise-like API for interacting with the temporary\n * elements.\n *\n * <hljs lang=\"js\">\n * app.service('$mdToast', function($$interimElement) {\n * var $mdToast = $$interimElement(toastDefaultOptions);\n * return $mdToast;\n * });\n * </hljs>\n *\n * @param {object=} defaultOptions Options used by default for the `show` method on the service.\n *\n * @returns {$$interimElement.$service}\n */\n\nfunction InterimElementProvider() {\n InterimElementFactory.$inject = [\"$document\", \"$q\", \"$rootScope\", \"$timeout\", \"$rootElement\", \"$animate\", \"$mdUtil\", \"$mdCompiler\", \"$mdTheming\", \"$injector\", \"$exceptionHandler\"];\n createInterimElementProvider.$get = InterimElementFactory;\n return createInterimElementProvider;\n\n /**\n * Returns a new provider which allows configuration of a new interimElement\n * service. Allows configuration of default options & methods for options,\n * as well as configuration of 'preset' methods (eg dialog.basic(): basic is a preset method)\n */\n function createInterimElementProvider(interimFactoryName) {\n factory.$inject = [\"$$interimElement\", \"$injector\"];\n var EXPOSED_METHODS = ['onHide', 'onShow', 'onRemove'];\n\n var customMethods = {};\n var providerConfig = {\n presets: {}\n };\n\n var provider = {\n setDefaults: setDefaults,\n addPreset: addPreset,\n addMethod: addMethod,\n $get: factory\n };\n\n /**\n * all interim elements will come with the 'build' preset\n */\n provider.addPreset('build', {\n methods: ['controller', 'controllerAs', 'resolve', 'multiple',\n 'template', 'templateUrl', 'themable', 'transformTemplate', 'parent', 'contentElement']\n });\n\n return provider;\n\n /**\n * Save the configured defaults to be used when the factory is instantiated\n */\n function setDefaults(definition) {\n providerConfig.optionsFactory = definition.options;\n providerConfig.methods = (definition.methods || []).concat(EXPOSED_METHODS);\n return provider;\n }\n\n /**\n * Add a method to the factory that isn't specific to any interim element operations\n */\n function addMethod(name, fn) {\n customMethods[name] = fn;\n return provider;\n }\n\n /**\n * Save the configured preset to be used when the factory is instantiated\n */\n function addPreset(name, definition) {\n definition = definition || {};\n definition.methods = definition.methods || [];\n definition.options = definition.options || function() { return {}; };\n\n if (/^cancel|hide|show$/.test(name)) {\n throw new Error(\"Preset '\" + name + \"' in \" + interimFactoryName + \" is reserved!\");\n }\n if (definition.methods.indexOf('_options') > -1) {\n throw new Error(\"Method '_options' in \" + interimFactoryName + \" is reserved!\");\n }\n providerConfig.presets[name] = {\n methods: definition.methods.concat(EXPOSED_METHODS),\n optionsFactory: definition.options,\n argOption: definition.argOption\n };\n return provider;\n }\n\n function addPresetMethod(presetName, methodName, method) {\n providerConfig.presets[presetName][methodName] = method;\n }\n\n /**\n * Create a factory that has the given methods & defaults implementing interimElement\n */\n /* @ngInject */\n function factory($$interimElement, $injector) {\n var defaultMethods;\n var defaultOptions;\n var interimElementService = $$interimElement();\n\n /*\n * publicService is what the developer will be using.\n * It has methods hide(), cancel(), show(), build(), and any other\n * presets which were set during the config phase.\n */\n var publicService = {\n hide: interimElementService.hide,\n cancel: interimElementService.cancel,\n show: showInterimElement,\n\n // Special internal method to destroy an interim element without animations\n // used when navigation changes causes a $scope.$destroy() action\n destroy : destroyInterimElement\n };\n\n\n defaultMethods = providerConfig.methods || [];\n // This must be invoked after the publicService is initialized\n defaultOptions = invokeFactory(providerConfig.optionsFactory, {});\n\n // Copy over the simple custom methods\n angular.forEach(customMethods, function(fn, name) {\n publicService[name] = fn;\n });\n\n angular.forEach(providerConfig.presets, function(definition, name) {\n var presetDefaults = invokeFactory(definition.optionsFactory, {});\n var presetMethods = (definition.methods || []).concat(defaultMethods);\n\n // Every interimElement built with a preset has a field called `$type`,\n // which matches the name of the preset.\n // Eg in preset 'confirm', options.$type === 'confirm'\n angular.extend(presetDefaults, { $type: name });\n\n // This creates a preset class which has setter methods for every\n // method given in the `.addPreset()` function, as well as every\n // method given in the `.setDefaults()` function.\n //\n // @example\n // .setDefaults({\n // methods: ['hasBackdrop', 'clickOutsideToClose', 'escapeToClose', 'targetEvent'],\n // options: dialogDefaultOptions\n // })\n // .addPreset('alert', {\n // methods: ['title', 'ok'],\n // options: alertDialogOptions\n // })\n //\n // Set values will be passed to the options when interimElement.show() is called.\n function Preset(opts) {\n this._options = angular.extend({}, presetDefaults, opts);\n }\n angular.forEach(presetMethods, function(name) {\n Preset.prototype[name] = function(value) {\n this._options[name] = value;\n return this;\n };\n });\n\n // Create shortcut method for one-linear methods\n if (definition.argOption) {\n var methodName = 'show' + name.charAt(0).toUpperCase() + name.slice(1);\n publicService[methodName] = function(arg) {\n var config = publicService[name](arg);\n return publicService.show(config);\n };\n }\n\n // eg $mdDialog.alert() will return a new alert preset\n publicService[name] = function(arg) {\n // If argOption is supplied, eg `argOption: 'content'`, then we assume\n // if the argument is not an options object then it is the `argOption` option.\n //\n // @example `$mdToast.simple('hello')` // sets options.content to hello\n // // because argOption === 'content'\n if (arguments.length && definition.argOption &&\n !angular.isObject(arg) && !angular.isArray(arg)) {\n\n return (new Preset())[definition.argOption](arg);\n\n } else {\n return new Preset(arg);\n }\n\n };\n });\n\n return publicService;\n\n /**\n *\n */\n function showInterimElement(opts) {\n // opts is either a preset which stores its options on an _options field,\n // or just an object made up of options\n opts = opts || { };\n if (opts._options) opts = opts._options;\n\n return interimElementService.show(\n angular.extend({}, defaultOptions, opts)\n );\n }\n\n /**\n * Special method to hide and destroy an interimElement WITHOUT\n * any 'leave` or hide animations ( an immediate force hide/remove )\n *\n * NOTE: This calls the onRemove() subclass method for each component...\n * which must have code to respond to `options.$destroy == true`\n */\n function destroyInterimElement(opts) {\n return interimElementService.destroy(opts);\n }\n\n /**\n * Helper to call $injector.invoke with a local of the factory name for\n * this provider.\n * If an $mdDialog is providing options for a dialog and tries to inject\n * $mdDialog, a circular dependency error will happen.\n * We get around that by manually injecting $mdDialog as a local.\n */\n function invokeFactory(factory, defaultVal) {\n var locals = {};\n locals[interimFactoryName] = publicService;\n return $injector.invoke(factory || function() { return defaultVal; }, {}, locals);\n }\n }\n }\n\n /* @ngInject */\n function InterimElementFactory($document, $q, $rootScope, $timeout, $rootElement, $animate,\n $mdUtil, $mdCompiler, $mdTheming, $injector, $exceptionHandler) {\n return function createInterimElementService() {\n var SHOW_CANCELLED = false;\n\n /**\n * @ngdoc service\n * @name $$interimElementProvider.$service\n *\n * @description\n * A service used to control inserting and removing of an element from the DOM.\n * It is used by $mdBottomSheet, $mdDialog, $mdToast, $mdMenu, $mdPanel, and $mdSelect.\n */\n var service;\n\n var showPromises = []; // Promises for the interim's which are currently opening.\n var hidePromises = []; // Promises for the interim's which are currently hiding.\n var showingInterims = []; // Interim elements which are currently showing up.\n\n // Publish instance $$interimElement service;\n return service = {\n show: show,\n hide: waitForInterim(hide),\n cancel: waitForInterim(cancel),\n destroy : destroy,\n $injector_: $injector\n };\n\n /**\n * @ngdoc method\n * @name $$interimElementProvider.$service#show\n * @kind function\n *\n * @description\n * Adds the `$interimElement` to the DOM and returns a special promise that will be resolved\n * or rejected with hide or cancel, respectively.\n *\n * @param {Object} options map of options and values\n * @returns {Promise} a Promise that will be resolved when hide() is called or rejected when\n * cancel() is called.\n */\n function show(options) {\n options = options || {};\n var interimElement = new InterimElement(options || {});\n\n // When an interim element is currently showing, we have to cancel it.\n // Just hiding it, will resolve the InterimElement's promise, the promise should be\n // rejected instead.\n var hideAction = options.multiple ? $q.resolve() : $q.all(showPromises);\n\n if (!options.multiple) {\n // Wait for all opening interim's to finish their transition.\n hideAction = hideAction.then(function() {\n // Wait for all closing and showing interim's to be completely closed.\n var promiseArray = hidePromises.concat(showingInterims.map(service.cancel));\n return $q.all(promiseArray);\n });\n }\n\n var showAction = hideAction.then(function() {\n\n return interimElement\n .show()\n .then(function () {\n showingInterims.push(interimElement);\n })\n .catch(function (reason) {\n return reason;\n })\n .finally(function() {\n showPromises.splice(showPromises.indexOf(showAction), 1);\n });\n\n });\n\n showPromises.push(showAction);\n\n // In AngularJS 1.6+, exceptions inside promises will cause a rejection. We need to handle\n // the rejection and only log it if it's an error.\n interimElement.deferred.promise.catch(function(fault) {\n if (fault instanceof Error) {\n $exceptionHandler(fault);\n }\n\n return fault;\n });\n\n // Return a promise that will be resolved when the interim\n // element is hidden or cancelled...\n return interimElement.deferred.promise;\n }\n\n /**\n * @ngdoc method\n * @name $$interimElementProvider.$service#hide\n * @kind function\n *\n * @description\n * Removes the `$interimElement` from the DOM and resolves the Promise returned from `show()`.\n *\n * @param {*} reason Data used to resolve the Promise\n * @param {object} options map of options and values\n * @returns {Promise} a Promise that will be resolved after the element has been removed\n * from the DOM.\n */\n function hide(reason, options) {\n options = options || {};\n\n if (options.closeAll) {\n // We have to make a shallow copy of the array, because otherwise the map will break.\n return $q.all(showingInterims.slice().reverse().map(closeElement));\n } else if (options.closeTo !== undefined) {\n return $q.all(showingInterims.slice(options.closeTo).map(closeElement));\n }\n\n // Hide the latest showing interim element.\n return closeElement(showingInterims[showingInterims.length - 1]);\n\n /**\n * @param {InterimElement} interim element to close\n * @returns {Promise<InterimElement>}\n */\n function closeElement(interim) {\n if (!interim) {\n return $q.when(reason);\n }\n\n var hideAction = interim\n .remove(reason, false, options || { })\n .catch(function(reason) { return reason; })\n .finally(function() {\n hidePromises.splice(hidePromises.indexOf(hideAction), 1);\n });\n\n showingInterims.splice(showingInterims.indexOf(interim), 1);\n hidePromises.push(hideAction);\n\n return interim.deferred.promise;\n }\n }\n\n /**\n * @ngdoc method\n * @name $$interimElementProvider.$service#cancel\n * @kind function\n *\n * @description\n * Removes the `$interimElement` from the DOM and rejects the Promise returned from `show()`.\n *\n * @param {*} reason Data used to resolve the Promise\n * @param {object} options map of options and values\n * @returns {Promise} Promise that will be resolved after the element has been removed\n * from the DOM.\n */\n function cancel(reason, options) {\n var interim = showingInterims.pop();\n if (!interim) {\n return $q.when(reason);\n }\n\n var cancelAction = interim\n .remove(reason, true, options || {})\n .catch(function(reason) { return reason; })\n .finally(function() {\n hidePromises.splice(hidePromises.indexOf(cancelAction), 1);\n });\n\n hidePromises.push(cancelAction);\n\n // Since AngularJS 1.6.7, promises will be logged to $exceptionHandler when the promise\n // is not handling the rejection. We create a pseudo catch handler, which will prevent the\n // promise from being logged to the $exceptionHandler.\n return interim.deferred.promise.catch(angular.noop);\n }\n\n /**\n * Creates a function to wait for at least one interim element to be available.\n * @param callbackFn Function to be used as callback\n * @returns {Function}\n */\n function waitForInterim(callbackFn) {\n return function() {\n var fnArguments = arguments;\n\n if (!showingInterims.length) {\n // When there are still interim's opening, then wait for the first interim element to\n // finish its open animation.\n if (showPromises.length) {\n return showPromises[0].finally(function () {\n return callbackFn.apply(service, fnArguments);\n });\n }\n\n return $q.when(\"No interim elements currently showing up.\");\n }\n\n return callbackFn.apply(service, fnArguments);\n };\n }\n\n /**\n * @ngdoc method\n * @name $$interimElementProvider.$service#destroy\n * @kind function\n *\n * Special method to quick-remove the interim element without running animations. This is\n * useful when the parent component has been or is being destroyed.\n *\n * Note: interim elements are in \"interim containers\".\n */\n function destroy(targetEl) {\n var interim = !targetEl ? showingInterims.shift() : null;\n\n var parentEl = angular.element(targetEl).length && angular.element(targetEl)[0].parentNode;\n\n if (parentEl) {\n // Try to find the interim in the stack which corresponds to the supplied DOM element.\n var filtered = showingInterims.filter(function(entry) {\n return entry.options.element[0] === parentEl;\n });\n\n // Note: This function might be called when the element already has been removed,\n // in which case we won't find any matches.\n if (filtered.length) {\n interim = filtered[0];\n showingInterims.splice(showingInterims.indexOf(interim), 1);\n }\n }\n\n return interim ? interim.remove(SHOW_CANCELLED, false, { '$destroy': true }) :\n $q.when(SHOW_CANCELLED);\n }\n\n /*\n * Internal Interim Element Object\n * Used internally to manage the DOM element and related data\n */\n function InterimElement(options) {\n var self, element, showAction = $q.when(true);\n\n options = configureScopeAndTransitions(options);\n\n return self = {\n options : options,\n deferred: $q.defer(),\n show : createAndTransitionIn,\n remove : transitionOutAndRemove\n };\n\n /**\n * Compile, link, and show this interim element. Use optional autoHide and transition-in\n * effects.\n * @return {Q.Promise}\n */\n function createAndTransitionIn() {\n return $q(function(resolve, reject) {\n\n // Trigger onCompiling callback before the compilation starts.\n // This is useful, when modifying options, which can be influenced by developers.\n options.onCompiling && options.onCompiling(options);\n\n compileElement(options)\n .then(function(compiledData) {\n element = linkElement(compiledData, options);\n\n // Expose the cleanup function from the compiler.\n options.cleanupElement = compiledData.cleanup;\n\n showAction = showElement(element, options, compiledData.controller)\n .then(resolve, rejectAll);\n }).catch(rejectAll);\n\n function rejectAll(fault) {\n // Force the '$md<xxx>.show()' promise to reject\n self.deferred.reject(fault);\n\n // Continue rejection propagation\n reject(fault);\n }\n });\n }\n\n /**\n * After the show process has finished/rejected:\n * - announce 'removing',\n * - perform the transition-out, and\n * - perform optional clean up scope.\n */\n function transitionOutAndRemove(response, isCancelled, opts) {\n\n // abort if the show() and compile failed\n if (!element) return $q.when(false);\n\n options = angular.extend(options || {}, opts || {});\n options.cancelAutoHide && options.cancelAutoHide();\n options.element.triggerHandler('$mdInterimElementRemove');\n\n if (options.$destroy === true) {\n\n return hideElement(options.element, options).then(function(){\n (isCancelled && rejectAll(response)) || resolveAll(response);\n });\n\n } else {\n $q.when(showAction).finally(function() {\n hideElement(options.element, options).then(function() {\n isCancelled ? rejectAll(response) : resolveAll(response);\n }, rejectAll);\n });\n\n return self.deferred.promise;\n }\n\n\n /**\n * The `show()` returns a promise that will be resolved when the interim\n * element is hidden or cancelled...\n */\n function resolveAll(response) {\n self.deferred.resolve(response);\n }\n\n /**\n * Force the '$md<xxx>.show()' promise to reject\n */\n function rejectAll(fault) {\n self.deferred.reject(fault);\n }\n }\n\n /**\n * Prepare optional isolated scope and prepare $animate with default enter and leave\n * transitions for the new element instance.\n */\n function configureScopeAndTransitions(options) {\n options = options || { };\n if (options.template) {\n options.template = $mdUtil.processTemplate(options.template);\n }\n\n return angular.extend({\n preserveScope: false,\n cancelAutoHide : angular.noop,\n scope: options.scope || $rootScope.$new(options.isolateScope),\n\n /**\n * Default usage to enable $animate to transition-in; can be easily overridden via 'options'\n */\n onShow: function transitionIn(scope, element, options) {\n return $animate.enter(element, options.parent);\n },\n\n /**\n * Default usage to enable $animate to transition-out; can be easily overridden via 'options'\n */\n onRemove: function transitionOut(scope, element) {\n // Element could be undefined if a new element is shown before\n // the old one finishes compiling.\n return element && $animate.leave(element) || $q.when();\n }\n }, options);\n\n }\n\n /**\n * Compile an element with a templateUrl, controller, and locals\n * @param {Object} options\n * @return {Q.Promise<{element: JQLite=, link: Function, locals: Object, cleanup: any=,\n * controller: Object=}>}\n */\n function compileElement(options) {\n\n var compiled = !options.skipCompile ? $mdCompiler.compile(options) : null;\n\n return compiled || $q(function (resolve) {\n resolve({\n locals: {},\n link: function () {\n return options.element;\n }\n });\n });\n }\n\n /**\n * Link an element with compiled configuration\n * @param {{element: JQLite=, link: Function, locals: Object, controller: Object=}} compileData\n * @param {Object} options\n * @return {JQLite}\n */\n function linkElement(compileData, options) {\n angular.extend(compileData.locals, options);\n\n var element = compileData.link(options.scope);\n\n // Search for parent at insertion time, if not specified\n options.element = element;\n options.parent = findParent(element, options);\n if (options.themable) $mdTheming(element);\n\n return element;\n }\n\n /**\n * Search for parent at insertion time, if not specified.\n * @param {JQLite} element\n * @param {Object} options\n * @return {JQLite}\n */\n function findParent(element, options) {\n var parent = options.parent;\n\n // Search for parent at insertion time, if not specified\n if (angular.isFunction(parent)) {\n parent = parent(options.scope, element, options);\n } else if (angular.isString(parent)) {\n parent = angular.element($document[0].querySelector(parent));\n } else {\n parent = angular.element(parent);\n }\n\n // If parent querySelector/getter function fails, or it's just null,\n // find a default.\n if (!(parent || {}).length) {\n var el;\n if ($rootElement[0] && $rootElement[0].querySelector) {\n el = $rootElement[0].querySelector(':not(svg) > body');\n }\n if (!el) el = $rootElement[0];\n if (el.nodeName === '#comment') {\n el = $document[0].body;\n }\n return angular.element(el);\n }\n\n return parent;\n }\n\n /**\n * If auto-hide is enabled, start timer and prepare cancel function\n */\n function startAutoHide() {\n var autoHideTimer, cancelAutoHide = angular.noop;\n\n if (options.hideDelay) {\n autoHideTimer = $timeout(service.hide, options.hideDelay) ;\n cancelAutoHide = function() {\n $timeout.cancel(autoHideTimer);\n };\n }\n\n // Cache for subsequent use\n options.cancelAutoHide = function() {\n cancelAutoHide();\n options.cancelAutoHide = undefined;\n };\n }\n\n /**\n * Show the element (with transitions), notify complete and start optional auto hiding\n * timer.\n * @param {JQLite} element\n * @param {Object} options\n * @param {Object} controller\n * @return {Q.Promise<JQLite>}\n */\n function showElement(element, options, controller) {\n // Trigger onShowing callback before the `show()` starts\n var notifyShowing = options.onShowing || angular.noop;\n // Trigger onComplete callback when the `show()` finishes\n var notifyComplete = options.onComplete || angular.noop;\n\n // Necessary for consistency between AngularJS 1.5 and 1.6.\n try {\n // This fourth controller parameter is used by $mdDialog in beforeShow().\n notifyShowing(options.scope, element, options, controller);\n } catch (e) {\n return $q.reject(e);\n }\n\n return $q(function (resolve, reject) {\n try {\n // Start transitionIn\n $q.when(options.onShow(options.scope, element, options))\n .then(function () {\n notifyComplete(options.scope, element, options);\n startAutoHide();\n\n resolve(element);\n }, reject);\n\n } catch (e) {\n reject(e.message);\n }\n });\n }\n\n function hideElement(element, options) {\n var announceRemoving = options.onRemoving || angular.noop;\n\n return $q(function (resolve, reject) {\n try {\n // Start transitionIn\n var action = $q.when(options.onRemove(options.scope, element, options) || true);\n\n // Trigger callback *before* the remove operation starts\n announceRemoving(element, action);\n\n if (options.$destroy) {\n // For $destroy, onRemove should be synchronous\n resolve(element);\n\n if (!options.preserveScope && options.scope) {\n // scope destroy should still be be done after the current digest is done\n action.then(function() { options.scope.$destroy(); });\n }\n } else {\n // Wait until transition-out is done\n action.then(function () {\n if (!options.preserveScope && options.scope) {\n options.scope.$destroy();\n }\n\n resolve(element);\n }, reject);\n }\n } catch (e) {\n reject(e.message);\n }\n });\n }\n\n }\n };\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n var $mdUtil, $interpolate, $log;\n\n var SUFFIXES = /(-gt)?-(sm|md|lg|print)/g;\n var WHITESPACE = /\\s+/g;\n\n var FLEX_OPTIONS = ['grow', 'initial', 'auto', 'none', 'noshrink', 'nogrow'];\n var LAYOUT_OPTIONS = ['row', 'column'];\n var ALIGNMENT_MAIN_AXIS= [\"\", \"start\", \"center\", \"end\", \"stretch\", \"space-around\", \"space-between\"];\n var ALIGNMENT_CROSS_AXIS= [\"\", \"start\", \"center\", \"end\", \"stretch\"];\n\n var config = {\n /**\n * Enable directive attribute-to-class conversions\n * Developers can use `<body md-layout-css />` to quickly\n * disable the Layout directives and prohibit the injection of Layout classNames\n */\n enabled: true,\n\n /**\n * List of mediaQuery breakpoints and associated suffixes\n * [\n * { suffix: \"sm\", mediaQuery: \"screen and (max-width: 599px)\" },\n * { suffix: \"md\", mediaQuery: \"screen and (min-width: 600px) and (max-width: 959px)\" }\n * ]\n */\n breakpoints: []\n };\n\n registerLayoutAPI(angular.module('material.core.layout', ['ng']));\n\n /**\n * registerLayoutAPI()\n *\n * The original AngularJS Material Layout solution used attribute selectors and CSS.\n *\n * ```html\n * <div layout=\"column\"> My Content </div>\n * ```\n *\n * ```css\n * [layout] {\n * box-sizing: border-box;\n * display:flex;\n * }\n * [layout=column] {\n * flex-direction : column\n * }\n * ```\n *\n * Use of attribute selectors creates significant performance impacts in some\n * browsers... mainly IE.\n *\n * This module registers directives that allow the same layout attributes to be\n * interpreted and converted to class selectors. The directive will add equivalent classes to\n * each element that contains a Layout directive.\n *\n * ```html\n * <div layout=\"column\" class=\"layout layout-column\"> My Content </div>\n * ```\n *\n * ```css\n * .layout {\n * box-sizing: border-box;\n * display:flex;\n * }\n * .layout-column {\n * flex-direction : column\n * }\n * ```\n */\n function registerLayoutAPI(module){\n var PREFIX_REGEXP = /^((?:x|data)[:\\-_])/i;\n var SPECIAL_CHARS_REGEXP = /([:\\-_]+(.))/g;\n\n // NOTE: these are also defined in constants::MEDIA_PRIORITY and constants::MEDIA\n var BREAKPOINTS = [\"\", \"xs\", \"gt-xs\", \"sm\", \"gt-sm\", \"md\", \"gt-md\", \"lg\", \"gt-lg\", \"xl\", \"print\"];\n var API_WITH_VALUES = [\"layout\", \"flex\", \"flex-order\", \"flex-offset\", \"layout-align\"];\n var API_NO_VALUES = [\"show\", \"hide\", \"layout-padding\", \"layout-margin\"];\n\n\n // Build directive registration functions for the standard Layout API... for all breakpoints.\n angular.forEach(BREAKPOINTS, function(mqb) {\n\n // Attribute directives with expected, observable value(s)\n angular.forEach(API_WITH_VALUES, function(name){\n var fullName = mqb ? name + \"-\" + mqb : name;\n module.directive(directiveNormalize(fullName), attributeWithObserve(fullName));\n });\n\n // Attribute directives with no expected value(s)\n angular.forEach(API_NO_VALUES, function(name){\n var fullName = mqb ? name + \"-\" + mqb : name;\n module.directive(directiveNormalize(fullName), attributeWithoutValue(fullName));\n });\n\n });\n\n // Register other, special directive functions for the Layout features:\n module\n .provider('$$mdLayout', function() {\n // Publish internal service for Layouts\n return {\n $get : angular.noop,\n validateAttributeValue : validateAttributeValue,\n validateAttributeUsage : validateAttributeUsage,\n /**\n * Easy way to disable/enable the Layout API.\n * When disabled, this stops all attribute-to-classname generations\n */\n disableLayouts : function(isDisabled) {\n config.enabled = (isDisabled !== true);\n }\n };\n })\n\n .directive('mdLayoutCss' , disableLayoutDirective)\n .directive('ngCloak' , buildCloakInterceptor('ng-cloak'))\n\n .directive('layoutWrap' , attributeWithoutValue('layout-wrap'))\n .directive('layoutNowrap' , attributeWithoutValue('layout-nowrap'))\n .directive('layoutNoWrap' , attributeWithoutValue('layout-no-wrap'))\n .directive('layoutFill' , attributeWithoutValue('layout-fill'))\n\n // Determine if\n .config(detectDisabledLayouts);\n\n /**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\n function directiveNormalize(name) {\n return name\n .replace(PREFIX_REGEXP, '')\n .replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n });\n }\n }\n\n\n /**\n * Detect if any of the HTML tags has a [md-layouts-disabled] attribute;\n * If yes, then immediately disable all layout API features\n *\n * Note: this attribute should be specified on either the HTML or BODY tags\n * @ngInject\n */\n function detectDisabledLayouts() {\n var isDisabled = !!document.querySelector('[md-layouts-disabled]');\n config.enabled = !isDisabled;\n }\n\n /**\n * Special directive that will disable ALL Layout conversions of layout\n * attribute(s) to classname(s).\n *\n * <link rel=\"stylesheet\" href=\"angular-material.min.css\">\n * <link rel=\"stylesheet\" href=\"angular-material.layout.css\">\n *\n * <body md-layout-css>\n * ...\n * </body>\n *\n * Note: Using md-layout-css directive requires the developer to load the Material\n * Layout Attribute stylesheet (which only uses attribute selectors):\n *\n * `angular-material.layout.css`\n *\n * Another option is to use the LayoutProvider to configure and disable the attribute\n * conversions; this would obviate the use of the `md-layout-css` directive\n */\n function disableLayoutDirective() {\n // Return a 1x-only, first-match attribute directive\n config.enabled = false;\n\n return {\n restrict : 'A',\n priority : '900'\n };\n }\n\n /**\n * Tail-hook ngCloak to delay the uncloaking while Layout transformers\n * finish processing. Eliminates flicker with Material.Layouts\n */\n function buildCloakInterceptor(className) {\n return ['$timeout', function($timeout){\n return {\n restrict : 'A',\n priority : -10, // run after normal ng-cloak\n compile : function(element) {\n if (!config.enabled) return angular.noop;\n\n // Re-add the cloak\n element.addClass(className);\n\n return function(scope, element) {\n // Wait while layout injectors configure, then uncloak\n // NOTE: $rAF does not delay enough... and this is a 1x-only event,\n // $timeout is acceptable.\n $timeout(function(){\n element.removeClass(className);\n }, 10, false);\n };\n }\n };\n }];\n }\n\n\n // *********************************************************************************\n //\n // These functions create registration functions for AngularJS Material Layout attribute\n // directives. This provides easy translation to switch AngularJS Material attribute selectors to\n // CLASS selectors and directives; which has huge performance implications for IE Browsers.\n //\n // *********************************************************************************\n\n /**\n * Creates a directive registration function where a possible dynamic attribute\n * value will be observed/watched.\n * @param {string} className attribute name; eg `layout-gt-md` with value =\"row\"\n */\n function attributeWithObserve(className) {\n\n return ['$mdUtil', '$interpolate', \"$log\", function(_$mdUtil_, _$interpolate_, _$log_) {\n $mdUtil = _$mdUtil_;\n $interpolate = _$interpolate_;\n $log = _$log_;\n\n return {\n restrict: 'A',\n compile: function(element, attr) {\n var linkFn;\n if (config.enabled) {\n // immediately replace static (non-interpolated) invalid values...\n\n validateAttributeUsage(className, attr, element, $log);\n\n validateAttributeValue(className,\n getNormalizedAttrValue(className, attr, \"\"),\n buildUpdateFn(element, className, attr)\n );\n\n linkFn = translateWithValueToCssClass;\n }\n\n // Use for postLink to account for transforms after ng-transclude.\n return linkFn || angular.noop;\n }\n };\n }];\n\n /**\n * Observe deprecated layout attributes and update the element's layout classes to match.\n */\n function translateWithValueToCssClass(scope, element, attrs) {\n var updateFn = updateClassWithValue(element, className, attrs);\n var unwatch = attrs.$observe(attrs.$normalize(className), updateFn);\n\n updateFn(getNormalizedAttrValue(className, attrs, \"\"));\n scope.$on(\"$destroy\", function() { unwatch(); });\n }\n }\n\n /**\n * Creates a registration function for AngularJS Material Layout attribute directive.\n * This is a `simple` transpose of attribute usage to class usage; where we ignore\n * any attribute value.\n */\n function attributeWithoutValue(className) {\n return ['$mdUtil', '$interpolate', \"$log\", function(_$mdUtil_, _$interpolate_, _$log_) {\n $mdUtil = _$mdUtil_;\n $interpolate = _$interpolate_;\n $log = _$log_;\n\n return {\n restrict: 'A',\n compile: function(element, attr) {\n var linkFn;\n if (config.enabled) {\n // immediately replace static (non-interpolated) invalid values...\n\n validateAttributeValue(className,\n getNormalizedAttrValue(className, attr, \"\"),\n buildUpdateFn(element, className, attr)\n );\n\n translateToCssClass(null, element);\n\n // Use for postLink to account for transforms after ng-transclude.\n linkFn = translateToCssClass;\n }\n\n return linkFn || angular.noop;\n }\n };\n }];\n\n /**\n * Add transformed class selector.\n */\n function translateToCssClass(scope, element) {\n element.addClass(className);\n }\n }\n\n /**\n * After link-phase, do NOT remove deprecated layout attribute selector.\n * Instead watch the attribute so interpolated data-bindings to layout\n * selectors will continue to be supported.\n *\n * $observe() the className and update with new class (after removing the last one)\n *\n * e.g. `layout=\"{{layoutDemo.direction}}\"` will update...\n *\n * NOTE: The value must match one of the specified styles in the CSS.\n * For example `flex-gt-md=\"{{size}}` where `scope.size == 47` will NOT work since\n * only breakpoints for 0, 5, 10, 15... 100, 33, 34, 66, 67 are defined.\n */\n function updateClassWithValue(element, className) {\n var lastClass;\n\n return function updateClassFn(newValue) {\n var value = validateAttributeValue(className, newValue || \"\");\n if (angular.isDefined(value)) {\n if (lastClass) element.removeClass(lastClass);\n lastClass = !value ? className : className + \"-\" + value.trim().replace(WHITESPACE, \"-\");\n element.addClass(lastClass);\n }\n };\n }\n\n /**\n * Centralize warnings for known flexbox issues (especially IE-related issues)\n */\n function validateAttributeUsage(className, attr, element, $log){\n var message, usage, url;\n var nodeName = element[0].nodeName.toLowerCase();\n\n switch (className.replace(SUFFIXES,\"\")) {\n case \"flex\":\n if ((nodeName === \"md-button\") || (nodeName === \"fieldset\")){\n // @see https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers\n // Use <div flex> wrapper inside (preferred) or outside\n\n usage = \"<\" + nodeName + \" \" + className + \"></\" + nodeName + \">\";\n url = \"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers\";\n message = \"Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.\";\n\n $log.warn($mdUtil.supplant(message, [usage, url]));\n }\n }\n }\n\n\n /**\n * For the Layout attribute value, validate or replace with default fallback value.\n */\n function validateAttributeValue(className, value, updateFn) {\n var origValue = value;\n\n if (!needsInterpolation(value)) {\n switch (className.replace(SUFFIXES,\"\")) {\n case 'layout' :\n if (!findIn(value, LAYOUT_OPTIONS)) {\n value = LAYOUT_OPTIONS[0]; // 'row';\n }\n break;\n\n case 'flex' :\n if (!findIn(value, FLEX_OPTIONS)) {\n if (isNaN(value)) {\n value = '';\n }\n }\n break;\n\n case 'flex-offset' :\n case 'flex-order' :\n if (!value || isNaN(+value)) {\n value = '0';\n }\n break;\n\n case 'layout-align' :\n var axis = extractAlignAxis(value);\n value = $mdUtil.supplant(\"{main}-{cross}\",axis);\n break;\n\n case 'layout-padding' :\n case 'layout-margin' :\n case 'layout-fill' :\n case 'layout-wrap' :\n case 'layout-nowrap' :\n value = '';\n break;\n }\n\n if (value !== origValue) {\n (updateFn || angular.noop)(value);\n }\n }\n\n return value ? value.trim() : \"\";\n }\n\n /**\n * Replace current attribute value with fallback value\n */\n function buildUpdateFn(element, className, attrs) {\n return function updateAttrValue(fallback) {\n if (!needsInterpolation(fallback)) {\n // Do not modify the element's attribute value; so\n // uses '<ui-layout layout=\"/api/sidebar.html\" />' will not\n // be affected. Just update the attrs value.\n attrs[attrs.$normalize(className)] = fallback;\n }\n };\n }\n\n /**\n * See if the original value has interpolation symbols:\n * e.g. flex-gt-md=\"{{triggerPoint}}\"\n */\n function needsInterpolation(value) {\n return (value || \"\").indexOf($interpolate.startSymbol()) > -1;\n }\n\n function getNormalizedAttrValue(className, attrs, defaultVal) {\n var normalizedAttr = attrs.$normalize(className);\n return attrs[normalizedAttr] ? attrs[normalizedAttr].trim().replace(WHITESPACE, \"-\") :\n defaultVal || null;\n }\n\n function findIn(item, list, replaceWith) {\n item = replaceWith && item ? item.replace(WHITESPACE, replaceWith) : item;\n\n var found = false;\n if (item) {\n list.forEach(function(it) {\n it = replaceWith ? it.replace(WHITESPACE, replaceWith) : it;\n found = found || (it === item);\n });\n }\n return found;\n }\n\n function extractAlignAxis(attrValue) {\n var axis = {\n main : \"start\",\n cross: \"stretch\"\n }, values;\n\n attrValue = (attrValue || \"\");\n\n if (attrValue.indexOf(\"-\") === 0 || attrValue.indexOf(\" \") === 0) {\n // For missing main-axis values\n attrValue = \"none\" + attrValue;\n }\n\n values = attrValue.toLowerCase().trim().replace(WHITESPACE, \"-\").split(\"-\");\n if (values.length && (values[0] === \"space\")) {\n // for main-axis values of \"space-around\" or \"space-between\"\n values = [values[0]+\"-\"+values[1],values[2]];\n }\n\n if (values.length > 0) axis.main = values[0] || axis.main;\n if (values.length > 1) axis.cross = values[1] || axis.cross;\n\n if (ALIGNMENT_MAIN_AXIS.indexOf(axis.main) < 0) axis.main = \"start\";\n if (ALIGNMENT_CROSS_AXIS.indexOf(axis.cross) < 0) axis.cross = \"stretch\";\n\n return axis;\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n/**\r\n * @ngdoc module\r\n * @name material.core.liveannouncer\r\n * @description\r\n * AngularJS Material Live Announcer to provide accessibility for Voice Readers.\r\n */\r\nMdLiveAnnouncer.$inject = [\"$timeout\"];\r\nangular\r\n .module('material.core')\r\n .service('$mdLiveAnnouncer', MdLiveAnnouncer);\r\n\r\n/**\r\n * @ngdoc service\r\n * @name $mdLiveAnnouncer\r\n * @module material.core.liveannouncer\r\n *\r\n * @description\r\n *\r\n * Service to announce messages to supported screenreaders.\r\n *\r\n * > The `$mdLiveAnnouncer` service is internally used for components to provide proper accessibility.\r\n *\r\n * <hljs lang=\"js\">\r\n * module.controller('AppCtrl', function($mdLiveAnnouncer) {\r\n * // Basic announcement (Polite Mode)\r\n * $mdLiveAnnouncer.announce('Hey Google');\r\n *\r\n * // Custom announcement (Assertive Mode)\r\n * $mdLiveAnnouncer.announce('Hey Google', 'assertive');\r\n * });\r\n * </hljs>\r\n *\r\n */\r\nfunction MdLiveAnnouncer($timeout) {\r\n /** @private @const @type {!angular.$timeout} */\r\n this._$timeout = $timeout;\r\n\r\n /** @private @const @type {!HTMLElement} */\r\n this._liveElement = this._createLiveElement();\r\n\r\n /** @private @const @type {!number} */\r\n this._announceTimeout = 100;\r\n}\r\n\r\n/**\r\n * @ngdoc method\r\n * @name $mdLiveAnnouncer#announce\r\n * @description Announces messages to supported screenreaders.\r\n * @param {string} message Message to be announced to the screenreader\r\n * @param {'off'|'polite'|'assertive'} politeness The politeness of the announcer element.\r\n */\r\nMdLiveAnnouncer.prototype.announce = function(message, politeness) {\r\n if (!politeness) {\r\n politeness = 'polite';\r\n }\r\n\r\n var self = this;\r\n\r\n self._liveElement.textContent = '';\r\n self._liveElement.setAttribute('aria-live', politeness);\r\n\r\n // This 100ms timeout is necessary for some browser + screen-reader combinations:\r\n // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.\r\n // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a\r\n // second time without clearing and then using a non-zero delay.\r\n // (using JAWS 17 at time of this writing).\r\n self._$timeout(function() {\r\n self._liveElement.textContent = message;\r\n }, self._announceTimeout, false);\r\n};\r\n\r\n/**\r\n * Creates a live announcer element, which listens for DOM changes and announces them\r\n * to the screenreaders.\r\n * @returns {!HTMLElement}\r\n * @private\r\n */\r\nMdLiveAnnouncer.prototype._createLiveElement = function() {\r\n var liveEl = document.createElement('div');\r\n\r\n liveEl.classList.add('md-visually-hidden');\r\n liveEl.setAttribute('role', 'status');\r\n liveEl.setAttribute('aria-atomic', 'true');\r\n liveEl.setAttribute('aria-live', 'polite');\r\n\r\n document.body.appendChild(liveEl);\r\n\r\n return liveEl;\r\n};\r\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc service\n * @name $$mdMeta\n * @module material.core.meta\n *\n * @description\n *\n * A provider and a service that simplifies meta tags access\n *\n * Note: This is intended only for use with dynamic meta tags such as browser color and title.\n * Tags that are only processed when the page is rendered (such as `charset`, and `http-equiv`)\n * will not work since `$$mdMeta` adds the tags after the page has already been loaded.\n *\n * ```js\n * app.config(function($$mdMetaProvider) {\n * var removeMeta = $$mdMetaProvider.setMeta('meta-name', 'content');\n * var metaValue = $$mdMetaProvider.getMeta('meta-name'); // -> 'content'\n *\n * removeMeta();\n * });\n *\n * app.controller('myController', function($$mdMeta) {\n * var removeMeta = $$mdMeta.setMeta('meta-name', 'content');\n * var metaValue = $$mdMeta.getMeta('meta-name'); // -> 'content'\n *\n * removeMeta();\n * });\n * ```\n *\n * @returns {$$mdMeta.$service}\n *\n */\nangular.module('material.core.meta', [])\n .provider('$$mdMeta', function () {\n var head = angular.element(document.head);\n var metaElements = {};\n\n /**\n * Checks if the requested element was written manually and maps it\n *\n * @param {string} name meta tag 'name' attribute value\n * @returns {boolean} returns true if there is an element with the requested name\n */\n function mapExistingElement(name) {\n if (metaElements[name]) {\n return true;\n }\n\n var element = document.getElementsByName(name)[0];\n\n if (!element) {\n return false;\n }\n\n metaElements[name] = angular.element(element);\n\n return true;\n }\n\n /**\n * @ngdoc method\n * @name $$mdMeta#setMeta\n *\n * @description\n * Creates meta element with the 'name' and 'content' attributes,\n * if the meta tag is already created than we replace the 'content' value\n *\n * @param {string} name meta tag 'name' attribute value\n * @param {string} content meta tag 'content' attribute value\n * @returns {function} remove function\n *\n */\n function setMeta(name, content) {\n mapExistingElement(name);\n\n if (!metaElements[name]) {\n var newMeta = angular.element('<meta name=\"' + name + '\" content=\"' + content + '\"/>');\n head.append(newMeta);\n metaElements[name] = newMeta;\n }\n else {\n metaElements[name].attr('content', content);\n }\n\n return function () {\n metaElements[name].attr('content', '');\n metaElements[name].remove();\n delete metaElements[name];\n };\n }\n\n /**\n * @ngdoc method\n * @name $$mdMeta#getMeta\n *\n * @description\n * Gets the 'content' attribute value of the wanted meta element\n *\n * @param {string} name meta tag 'name' attribute value\n * @returns {string} content attribute value\n */\n function getMeta(name) {\n if (!mapExistingElement(name)) {\n throw Error('$$mdMeta: could not find a meta tag with the name \\'' + name + '\\'');\n }\n\n return metaElements[name].attr('content');\n }\n\n var module = {\n setMeta: setMeta,\n getMeta: getMeta\n };\n\n return angular.extend({}, module, {\n $get: function () {\n return module;\n }\n });\n });\n})();\n(function(){\n\"use strict\";\n\n /**\n * @ngdoc module\n * @name material.core.componentRegistry\n *\n * @description\n * A component instance registration service.\n * Note: currently this as a private service in the SideNav component.\n */\n ComponentRegistry.$inject = [\"$log\", \"$q\"];\n angular.module('material.core')\n .factory('$mdComponentRegistry', ComponentRegistry);\n\n /*\n * @private\n * @ngdoc factory\n * @name ComponentRegistry\n * @module material.core.componentRegistry\n *\n */\n function ComponentRegistry($log, $q) {\n\n var self;\n var instances = [];\n var pendings = { };\n\n return self = {\n /**\n * Used to print an error when an instance for a handle isn't found.\n */\n notFoundError: function(handle, msgContext) {\n $log.error((msgContext || \"\") + 'No instance found for handle', handle);\n },\n /**\n * Return all registered instances as an array.\n */\n getInstances: function() {\n return instances;\n },\n\n /**\n * Get a registered instance.\n * @param handle the String handle to look up for a registered instance.\n */\n get: function(handle) {\n if (!isValidID(handle)) return null;\n\n var i, j, instance;\n for (i = 0, j = instances.length; i < j; i++) {\n instance = instances[i];\n if (instance.$$mdHandle === handle) {\n return instance;\n }\n }\n return null;\n },\n\n /**\n * Register an instance.\n * @param instance the instance to register\n * @param handle the handle to identify the instance under.\n */\n register: function(instance, handle) {\n if (!handle) return angular.noop;\n\n instance.$$mdHandle = handle;\n instances.push(instance);\n resolveWhen();\n\n return deregister;\n\n /**\n * Remove registration for an instance\n */\n function deregister() {\n var index = instances.indexOf(instance);\n if (index !== -1) {\n instances.splice(index, 1);\n }\n }\n\n /**\n * Resolve any pending promises for this instance\n */\n function resolveWhen() {\n var dfd = pendings[handle];\n if (dfd) {\n dfd.forEach(function (promise) {\n promise.resolve(instance);\n });\n delete pendings[handle];\n }\n }\n },\n\n /**\n * Async accessor to registered component instance\n * If not available then a promise is created to notify\n * all listeners when the instance is registered.\n */\n when : function(handle) {\n if (isValidID(handle)) {\n var deferred = $q.defer();\n var instance = self.get(handle);\n\n if (instance) {\n deferred.resolve(instance);\n } else {\n if (pendings[handle] === undefined) {\n pendings[handle] = [];\n }\n pendings[handle].push(deferred);\n }\n\n return deferred.promise;\n }\n return $q.reject(\"Invalid `md-component-id` value.\");\n }\n\n };\n\n function isValidID(handle){\n return handle && (handle !== \"\");\n }\n\n }\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc service\n * @name $mdButtonInkRipple\n * @module material.core\n *\n * @description\n * Provides ripple effects for md-button. See $mdInkRipple service for all possible configuration options.\n *\n * @param {object=} scope Scope within the current context\n * @param {object=} element The element the ripple effect should be applied to\n * @param {object=} options (Optional) Configuration options to override the default ripple configuration\n */\n\n MdButtonInkRipple.$inject = [\"$mdInkRipple\"];\n angular.module('material.core')\n .factory('$mdButtonInkRipple', MdButtonInkRipple);\n\n function MdButtonInkRipple($mdInkRipple) {\n return {\n attach: function attachRipple(scope, element, options) {\n options = angular.extend(optionsForElement(element), options);\n\n return $mdInkRipple.attach(scope, element, options);\n }\n };\n\n function optionsForElement(element) {\n if (element.hasClass('md-icon-button')) {\n return {\n isMenuItem: element.hasClass('md-menu-item'),\n fitRipple: true,\n center: true\n };\n } else {\n return {\n isMenuItem: element.hasClass('md-menu-item'),\n dimBackground: true\n };\n }\n }\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc service\n * @name $mdCheckboxInkRipple\n * @module material.core\n *\n * @description\n * Provides ripple effects for md-checkbox. See $mdInkRipple service for all possible configuration options.\n *\n * @param {object=} scope Scope within the current context\n * @param {object=} element The element the ripple effect should be applied to\n * @param {object=} options (Optional) Configuration options to override the defaultripple configuration\n */\n\n MdCheckboxInkRipple.$inject = [\"$mdInkRipple\"];\n angular.module('material.core')\n .factory('$mdCheckboxInkRipple', MdCheckboxInkRipple);\n\n function MdCheckboxInkRipple($mdInkRipple) {\n return {\n attach: attach\n };\n\n function attach(scope, element, options) {\n return $mdInkRipple.attach(scope, element, angular.extend({\n center: true,\n dimBackground: false,\n fitRipple: true\n }, options));\n }\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc service\n * @name $mdListInkRipple\n * @module material.core\n *\n * @description\n * Provides ripple effects for md-list. See $mdInkRipple service for all possible configuration options.\n *\n * @param {object=} scope Scope within the current context\n * @param {object=} element The element the ripple effect should be applied to\n * @param {object=} options (Optional) Configuration options to override the defaultripple configuration\n */\n\n MdListInkRipple.$inject = [\"$mdInkRipple\"];\n angular.module('material.core')\n .factory('$mdListInkRipple', MdListInkRipple);\n\n function MdListInkRipple($mdInkRipple) {\n return {\n attach: attach\n };\n\n function attach(scope, element, options) {\n return $mdInkRipple.attach(scope, element, angular.extend({\n center: false,\n dimBackground: true,\n outline: false,\n rippleSize: 'full'\n }, options));\n }\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.core.ripple\n * @description\n * Ripple\n */\nInkRippleCtrl.$inject = [\"$scope\", \"$element\", \"rippleOptions\", \"$window\", \"$timeout\", \"$mdUtil\", \"$mdColorUtil\"];\nInkRippleDirective.$inject = [\"$mdButtonInkRipple\", \"$mdCheckboxInkRipple\"];\nangular.module('material.core')\n .provider('$mdInkRipple', InkRippleProvider)\n .directive('mdInkRipple', InkRippleDirective)\n .directive('mdNoInk', attrNoDirective)\n .directive('mdNoBar', attrNoDirective)\n .directive('mdNoStretch', attrNoDirective);\n\nvar DURATION = 450;\n\n/**\n * @ngdoc directive\n * @name mdInkRipple\n * @module material.core.ripple\n *\n * @description\n * The `md-ink-ripple` directive allows you to specify the ripple color or if a ripple is allowed.\n *\n * @param {string|boolean} md-ink-ripple A color string `#FF0000` or boolean (`false` or `0`) for\n * preventing ripple\n *\n * @usage\n * ### String values\n * <hljs lang=\"html\">\n * <ANY md-ink-ripple=\"#FF0000\">\n * Ripples in red\n * </ANY>\n *\n * <ANY md-ink-ripple=\"false\">\n * Not rippling\n * </ANY>\n * </hljs>\n *\n * ### Interpolated values\n * <hljs lang=\"html\">\n * <ANY md-ink-ripple=\"{{ randomColor() }}\">\n * Ripples with the return value of 'randomColor' function\n * </ANY>\n *\n * <ANY md-ink-ripple=\"{{ canRipple() }}\">\n * Ripples if 'canRipple' function return value is not 'false' or '0'\n * </ANY>\n * </hljs>\n */\nfunction InkRippleDirective ($mdButtonInkRipple, $mdCheckboxInkRipple) {\n return {\n controller: angular.noop,\n link: function (scope, element, attr) {\n attr.hasOwnProperty('mdInkRippleCheckbox')\n ? $mdCheckboxInkRipple.attach(scope, element)\n : $mdButtonInkRipple.attach(scope, element);\n }\n };\n}\n\n/**\n * @ngdoc service\n * @name $mdInkRipple\n * @module material.core.ripple\n *\n * @description\n * `$mdInkRipple` is a service for adding ripples to any element.\n *\n * @usage\n * <hljs lang=\"js\">\n * app.factory('$myElementInkRipple', function($mdInkRipple) {\n * return {\n * attach: function (scope, element, options) {\n * return $mdInkRipple.attach(scope, element, angular.extend({\n * center: false,\n * dimBackground: true\n * }, options));\n * }\n * };\n * });\n *\n * app.controller('myController', function ($scope, $element, $myElementInkRipple) {\n * $scope.onClick = function (ev) {\n * $myElementInkRipple.attach($scope, angular.element(ev.target), { center: true });\n * }\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc service\n * @name $mdInkRippleProvider\n * @module material.core.ripple\n *\n * @description\n * If you want to disable ink ripples globally, for all components, you can call the\n * `disableInkRipple` method in your app's config.\n *\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function ($mdInkRippleProvider) {\n * $mdInkRippleProvider.disableInkRipple();\n * });\n * </hljs>\n */\n\nfunction InkRippleProvider () {\n var isDisabledGlobally = false;\n\n return {\n disableInkRipple: disableInkRipple,\n $get: [\"$injector\", function($injector) {\n return { attach: attach };\n\n /**\n * @ngdoc method\n * @name $mdInkRipple#attach\n *\n * @description\n * Attaching given scope, element and options to inkRipple controller\n *\n * @param {object=} scope Scope within the current context\n * @param {object=} element The element the ripple effect should be applied to\n * @param {object=} options (Optional) Configuration options to override the defaultRipple configuration\n * * `center` - Whether the ripple should start from the center of the container element\n * * `dimBackground` - Whether the background should be dimmed with the ripple color\n * * `colorElement` - The element the ripple should take its color from, defined by css property `color`\n * * `fitRipple` - Whether the ripple should fill the element\n */\n function attach (scope, element, options) {\n if (isDisabledGlobally || element.controller('mdNoInk')) return angular.noop;\n return $injector.instantiate(InkRippleCtrl, {\n $scope: scope,\n $element: element,\n rippleOptions: options\n });\n }\n }]\n };\n\n /**\n * @ngdoc method\n * @name $mdInkRippleProvider#disableInkRipple\n *\n * @description\n * A config-time method that, when called, disables ripples globally.\n */\n function disableInkRipple () {\n isDisabledGlobally = true;\n }\n}\n\n/**\n * Controller used by the ripple service in order to apply ripples\n * @ngInject\n */\nfunction InkRippleCtrl ($scope, $element, rippleOptions, $window, $timeout, $mdUtil, $mdColorUtil) {\n this.$window = $window;\n this.$timeout = $timeout;\n this.$mdUtil = $mdUtil;\n this.$mdColorUtil = $mdColorUtil;\n this.$scope = $scope;\n this.$element = $element;\n this.options = rippleOptions;\n this.mousedown = false;\n this.ripples = [];\n this.timeout = null; // Stores a reference to the most-recent ripple timeout\n this.lastRipple = null;\n\n $mdUtil.valueOnUse(this, 'container', this.createContainer);\n\n this.$element.addClass('md-ink-ripple');\n\n // attach method for unit tests\n ($element.controller('mdInkRipple') || {}).createRipple = angular.bind(this, this.createRipple);\n ($element.controller('mdInkRipple') || {}).setColor = angular.bind(this, this.color);\n\n this.bindEvents();\n}\n\n\n/**\n * Either remove or unlock any remaining ripples when the user mouses off of the element (either by\n * mouseup or mouseleave event)\n */\nfunction autoCleanup (self, cleanupFn) {\n if (self.mousedown || self.lastRipple) {\n self.mousedown = false;\n self.$mdUtil.nextTick(angular.bind(self, cleanupFn), false);\n }\n}\n\n\n/**\n * Returns the color that the ripple should be (either based on CSS or hard-coded)\n * @returns {string}\n */\nInkRippleCtrl.prototype.color = function (value) {\n var self = this;\n\n // If assigning a color value, apply it to background and the ripple color\n if (angular.isDefined(value)) {\n self._color = self._parseColor(value);\n }\n\n // If color lookup, use assigned, defined, or inherited\n return self._color || self._parseColor(self.inkRipple()) || self._parseColor(getElementColor());\n\n /**\n * Finds the color element and returns its text color for use as default ripple color\n * @returns {string}\n */\n function getElementColor () {\n var items = self.options && self.options.colorElement ? self.options.colorElement : [];\n var elem = items.length ? items[ 0 ] : self.$element[ 0 ];\n\n return elem ? self.$window.getComputedStyle(elem).color : 'rgb(0,0,0)';\n }\n};\n\n/**\n * Updating the ripple colors based on the current inkRipple value\n * or the element's computed style color\n */\nInkRippleCtrl.prototype.calculateColor = function () {\n return this.color();\n};\n\n\n/**\n * Takes a string color and converts it to RGBA format\n * @param {string} color\n * @param {number} multiplier\n * @returns {string}\n */\nInkRippleCtrl.prototype._parseColor = function parseColor (color, multiplier) {\n multiplier = multiplier || 1;\n var colorUtil = this.$mdColorUtil;\n\n if (!color) return;\n if (color.indexOf('rgba') === 0) return color.replace(/\\d?\\.?\\d*\\s*\\)\\s*$/, (0.1 * multiplier).toString() + ')');\n if (color.indexOf('rgb') === 0) return colorUtil.rgbToRgba(color);\n if (color.indexOf('#') === 0) return colorUtil.hexToRgba(color);\n\n};\n\n/**\n * Binds events to the root element for\n */\nInkRippleCtrl.prototype.bindEvents = function () {\n this.$element.on('mousedown', angular.bind(this, this.handleMousedown));\n this.$element.on('mouseup touchend', angular.bind(this, this.handleMouseup));\n this.$element.on('mouseleave', angular.bind(this, this.handleMouseup));\n this.$element.on('touchmove', angular.bind(this, this.handleTouchmove));\n};\n\n/**\n * Create a new ripple on every mousedown event from the root element\n * @param event {MouseEvent}\n */\nInkRippleCtrl.prototype.handleMousedown = function (event) {\n if (this.mousedown) return;\n\n // When jQuery is loaded, we have to get the original event\n if (event.hasOwnProperty('originalEvent')) event = event.originalEvent;\n this.mousedown = true;\n if (this.options.center) {\n this.createRipple(this.container.prop('clientWidth') / 2, this.container.prop('clientWidth') / 2);\n } else {\n\n // We need to calculate the relative coordinates if the target is a sublayer of the ripple element\n if (event.srcElement !== this.$element[0]) {\n var layerRect = this.$element[0].getBoundingClientRect();\n var layerX = event.clientX - layerRect.left;\n var layerY = event.clientY - layerRect.top;\n\n this.createRipple(layerX, layerY);\n } else {\n this.createRipple(event.offsetX, event.offsetY);\n }\n }\n};\n\n/**\n * Either remove or unlock any remaining ripples when the user mouses off of the element (either by\n * mouseup, touchend or mouseleave event)\n */\nInkRippleCtrl.prototype.handleMouseup = function () {\n this.$timeout(function () {\n autoCleanup(this, this.clearRipples);\n }.bind(this));\n};\n\n/**\n * Either remove or unlock any remaining ripples when the user mouses off of the element (by\n * touchmove)\n */\nInkRippleCtrl.prototype.handleTouchmove = function () {\n autoCleanup(this, this.deleteRipples);\n};\n\n/**\n * Cycles through all ripples and attempts to remove them.\n */\nInkRippleCtrl.prototype.deleteRipples = function () {\n for (var i = 0; i < this.ripples.length; i++) {\n this.ripples[ i ].remove();\n }\n};\n\n/**\n * Cycles through all ripples and attempts to remove them with fade.\n * Depending on logic within `fadeInComplete`, some removals will be postponed.\n */\nInkRippleCtrl.prototype.clearRipples = function () {\n for (var i = 0; i < this.ripples.length; i++) {\n this.fadeInComplete(this.ripples[ i ]);\n }\n};\n\n/**\n * Creates the ripple container element\n * @returns {*}\n */\nInkRippleCtrl.prototype.createContainer = function () {\n var container = angular.element('<div class=\"md-ripple-container\"></div>');\n this.$element.append(container);\n return container;\n};\n\nInkRippleCtrl.prototype.clearTimeout = function () {\n if (this.timeout) {\n this.$timeout.cancel(this.timeout);\n this.timeout = null;\n }\n};\n\nInkRippleCtrl.prototype.isRippleAllowed = function () {\n var element = this.$element[0];\n do {\n if (!element.tagName || element.tagName === 'BODY') break;\n\n if (element && angular.isFunction(element.hasAttribute)) {\n if (element.hasAttribute('disabled')) return false;\n if (this.inkRipple() === 'false' || this.inkRipple() === '0') return false;\n }\n\n } while (element = element.parentNode);\n return true;\n};\n\n/**\n * The attribute `md-ink-ripple` may be a static or interpolated\n * color value OR a boolean indicator (used to disable ripples)\n */\nInkRippleCtrl.prototype.inkRipple = function () {\n return this.$element.attr('md-ink-ripple');\n};\n\n/**\n * Creates a new ripple and adds it to the container. Also tracks ripple in `this.ripples`.\n * @param left\n * @param top\n */\nInkRippleCtrl.prototype.createRipple = function (left, top) {\n if (!this.isRippleAllowed()) return;\n\n var ctrl = this;\n var colorUtil = ctrl.$mdColorUtil;\n var ripple = angular.element('<div class=\"md-ripple\"></div>');\n var width = this.$element.prop('clientWidth');\n var height = this.$element.prop('clientHeight');\n var x = Math.max(Math.abs(width - left), left) * 2;\n var y = Math.max(Math.abs(height - top), top) * 2;\n var size = getSize(this.options.fitRipple, x, y);\n var color = this.calculateColor();\n\n ripple.css({\n left: left + 'px',\n top: top + 'px',\n background: 'black',\n width: size + 'px',\n height: size + 'px',\n backgroundColor: colorUtil.rgbaToRgb(color),\n borderColor: colorUtil.rgbaToRgb(color)\n });\n this.lastRipple = ripple;\n\n // we only want one timeout to be running at a time\n this.clearTimeout();\n this.timeout = this.$timeout(function () {\n ctrl.clearTimeout();\n if (!ctrl.mousedown) ctrl.fadeInComplete(ripple);\n }, DURATION * 0.35, false);\n\n if (this.options.dimBackground) this.container.css({ backgroundColor: color });\n this.container.append(ripple);\n this.ripples.push(ripple);\n ripple.addClass('md-ripple-placed');\n\n this.$mdUtil.nextTick(function () {\n\n ripple.addClass('md-ripple-scaled md-ripple-active');\n ctrl.$timeout(function () {\n ctrl.clearRipples();\n }, DURATION, false);\n\n }, false);\n\n function getSize (fit, x, y) {\n return fit\n ? Math.max(x, y)\n : Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n }\n};\n\n\n\n/**\n * After fadeIn finishes, either kicks off the fade-out animation or queues the element for removal on mouseup\n * @param ripple\n */\nInkRippleCtrl.prototype.fadeInComplete = function (ripple) {\n if (this.lastRipple === ripple) {\n if (!this.timeout && !this.mousedown) {\n this.removeRipple(ripple);\n }\n } else {\n this.removeRipple(ripple);\n }\n};\n\n/**\n * Kicks off the animation for removing a ripple\n * @param ripple {Element}\n */\nInkRippleCtrl.prototype.removeRipple = function (ripple) {\n var ctrl = this;\n var index = this.ripples.indexOf(ripple);\n if (index < 0) return;\n this.ripples.splice(this.ripples.indexOf(ripple), 1);\n ripple.removeClass('md-ripple-active');\n ripple.addClass('md-ripple-remove');\n if (this.ripples.length === 0) this.container.css({ backgroundColor: '' });\n // use a 2-second timeout in order to allow for the animation to finish\n // we don't actually care how long the animation takes\n this.$timeout(function () {\n ctrl.fadeOutComplete(ripple);\n }, DURATION, false);\n};\n\n/**\n * Removes the provided ripple from the DOM\n * @param ripple\n */\nInkRippleCtrl.prototype.fadeOutComplete = function (ripple) {\n ripple.remove();\n this.lastRipple = null;\n};\n\n/**\n * Used to create an empty directive. This is used to track flag-directives whose children may have\n * functionality based on them.\n *\n * Example: `md-no-ink` will potentially be used by all child directives.\n */\nfunction attrNoDirective () {\n return { controller: angular.noop };\n}\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc service\n * @name $mdTabInkRipple\n * @module material.core\n *\n * @description\n * Provides ripple effects for md-tabs. See $mdInkRipple service for all possible configuration options.\n *\n * @param {object=} scope Scope within the current context\n * @param {object=} element The element the ripple effect should be applied to\n * @param {object=} options (Optional) Configuration options to override the defaultripple configuration\n */\n\n MdTabInkRipple.$inject = [\"$mdInkRipple\"];\n angular.module('material.core')\n .factory('$mdTabInkRipple', MdTabInkRipple);\n\n function MdTabInkRipple($mdInkRipple) {\n return {\n attach: attach\n };\n\n function attach(scope, element, options) {\n return $mdInkRipple.attach(scope, element, angular.extend({\n center: false,\n dimBackground: true,\n outline: false,\n rippleSize: 'full'\n }, options));\n }\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\nangular.module('material.core.theming.palette', [])\n.constant('$mdColorPalette', {\n 'red': {\n '50': '#ffebee',\n '100': '#ffcdd2',\n '200': '#ef9a9a',\n '300': '#e57373',\n '400': '#ef5350',\n '500': '#f44336',\n '600': '#e53935',\n '700': '#d32f2f',\n '800': '#c62828',\n '900': '#b71c1c',\n 'A100': '#ff8a80',\n 'A200': '#ff5252',\n 'A400': '#ff1744',\n 'A700': '#d50000',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 400 500 600 A100 A200 A400',\n 'contrastStrongLightColors': '700 800 900 A700'\n },\n 'pink': {\n '50': '#fce4ec',\n '100': '#f8bbd0',\n '200': '#f48fb1',\n '300': '#f06292',\n '400': '#ec407a',\n '500': '#e91e63',\n '600': '#d81b60',\n '700': '#c2185b',\n '800': '#ad1457',\n '900': '#880e4f',\n 'A100': '#ff80ab',\n 'A200': '#ff4081',\n 'A400': '#f50057',\n 'A700': '#c51162',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 400 A100 A200 A400',\n // White on 500 does not meet the minimum 4.5 contrast ratio (at 4.34),\n // but it's worse with a dark foreground (3.61).\n 'contrastStrongLightColors': '500 600 700 800 900 A700'\n },\n 'purple': {\n '50': '#f3e5f5',\n '100': '#e1bee7',\n '200': '#ce93d8',\n '300': '#ba68c8',\n '400': '#ab47bc',\n '500': '#9c27b0',\n '600': '#8e24aa',\n '700': '#7b1fa2',\n '800': '#6a1b9a',\n '900': '#4a148c',\n 'A100': '#ea80fc',\n 'A200': '#e040fb',\n 'A400': '#d500f9',\n 'A700': '#aa00ff',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 A100 A200 A400',\n 'contrastStrongLightColors': '400 500 600 700 800 900 A700'\n },\n 'deep-purple': {\n '50': '#ede7f6',\n '100': '#d1c4e9',\n '200': '#b39ddb',\n '300': '#9575cd',\n '400': '#7e57c2',\n '500': '#673ab7',\n '600': '#5e35b1',\n '700': '#512da8',\n '800': '#4527a0',\n '900': '#311b92',\n 'A100': '#b388ff',\n 'A200': '#7c4dff',\n 'A400': '#651fff',\n 'A700': '#6200ea',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 A100',\n 'contrastStrongLightColors': '400 500 600 700 800 900 A200 A400 A700'\n },\n 'indigo': {\n '50': '#e8eaf6',\n '100': '#c5cae9',\n '200': '#9fa8da',\n '300': '#7986cb',\n '400': '#5c6bc0',\n '500': '#3f51b5',\n '600': '#3949ab',\n '700': '#303f9f',\n '800': '#283593',\n '900': '#1a237e',\n 'A100': '#8c9eff',\n 'A200': '#536dfe',\n 'A400': '#3d5afe',\n 'A700': '#304ffe',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 A100 A200',\n 'contrastStrongLightColors': '400 500 600 700 800 900 A400 A700'\n },\n 'blue': {\n '50': '#e3f2fd',\n '100': '#bbdefb',\n '200': '#90caf9',\n '300': '#64b5f6',\n '400': '#42a5f5',\n '500': '#2196f3',\n '600': '#1e88e5',\n '700': '#1976d2',\n '800': '#1565c0',\n '900': '#0d47a1',\n 'A100': '#82b1ff',\n 'A200': '#448aff',\n 'A400': '#2979ff',\n 'A700': '#2962ff',\n 'contrastDefaultColor': 'light',\n // White on A400 does not meet the minimum 4.5 contrast ratio (at 3.98),\n // but it's worse with a dark foreground (3.94).\n 'contrastDarkColors': '50 100 200 300 400 500 600 A100 A200',\n 'contrastStrongLightColors': '700 800 900 A400 A700'\n },\n 'light-blue': {\n '50': '#e1f5fe',\n '100': '#b3e5fc',\n '200': '#81d4fa',\n '300': '#4fc3f7',\n '400': '#29b6f6',\n '500': '#03a9f4',\n '600': '#039be5',\n '700': '#0288d1',\n '800': '#0277bd',\n '900': '#01579b',\n 'A100': '#80d8ff',\n 'A200': '#40c4ff',\n 'A400': '#00b0ff',\n 'A700': '#0091ea',\n 'contrastDefaultColor': 'dark',\n // Dark on 700 does not meet the minimum 4.5 contrast ratio (at 4.07),\n // but it's worse with a white foreground (3.85).\n 'contrastStrongLightColors': '800 900 A700'\n },\n 'cyan': {\n '50': '#e0f7fa',\n '100': '#b2ebf2',\n '200': '#80deea',\n '300': '#4dd0e1',\n '400': '#26c6da',\n '500': '#00bcd4',\n '600': '#00acc1',\n '700': '#0097a7',\n '800': '#00838f',\n '900': '#006064',\n 'A100': '#84ffff',\n 'A200': '#18ffff',\n 'A400': '#00e5ff',\n 'A700': '#00b8d4',\n 'contrastDefaultColor': 'dark',\n // Dark on 700 does not meet the minimum 4.5 contrast ratio (at 4.47),\n // but it's worse with a white foreground (3.5).\n 'contrastStrongLightColors': '800 900'\n },\n 'teal': {\n '50': '#e0f2f1',\n '100': '#b2dfdb',\n '200': '#80cbc4',\n '300': '#4db6ac',\n '400': '#26a69a',\n '500': '#009688',\n '600': '#00897b',\n '700': '#00796b',\n '800': '#00695c',\n '900': '#004d40',\n 'A100': '#a7ffeb',\n 'A200': '#64ffda',\n 'A400': '#1de9b6',\n 'A700': '#00bfa5',\n 'contrastDefaultColor': 'dark',\n // Dark on 500 does not meet the minimum 4.5 contrast ratio (at 4.27),\n // but it's worse with a white foreground (3.67).\n // White on 600 does not meet the minimum 4.5 contrast ratio (at 4.31),\n // but it's worse with a dark foreground (3.64).\n 'contrastStrongLightColors': '600 700 800 900'\n },\n 'green': {\n '50': '#e8f5e9',\n '100': '#c8e6c9',\n '200': '#a5d6a7',\n '300': '#81c784',\n '400': '#66bb6a',\n '500': '#4caf50',\n '600': '#43a047',\n '700': '#388e3c',\n '800': '#2e7d32',\n '900': '#1b5e20',\n 'A100': '#b9f6ca',\n 'A200': '#69f0ae',\n 'A400': '#00e676',\n 'A700': '#00c853',\n 'contrastDefaultColor': 'dark',\n // White on 700 does not meet the minimum 4.5 contrast ratio (at 4.11),\n // but it's worse with a dark foreground (3.81).\n 'contrastStrongLightColors': '700 800 900'\n },\n 'light-green': {\n '50': '#f1f8e9',\n '100': '#dcedc8',\n '200': '#c5e1a5',\n '300': '#aed581',\n '400': '#9ccc65',\n '500': '#8bc34a',\n '600': '#7cb342',\n '700': '#689f38',\n '800': '#558b2f',\n '900': '#33691e',\n 'A100': '#ccff90',\n 'A200': '#b2ff59',\n 'A400': '#76ff03',\n 'A700': '#64dd17',\n 'contrastDefaultColor': 'dark',\n 'contrastStrongLightColors': '800 900'\n },\n 'lime': {\n '50': '#f9fbe7',\n '100': '#f0f4c3',\n '200': '#e6ee9c',\n '300': '#dce775',\n '400': '#d4e157',\n '500': '#cddc39',\n '600': '#c0ca33',\n '700': '#afb42b',\n '800': '#9e9d24',\n '900': '#827717',\n 'A100': '#f4ff81',\n 'A200': '#eeff41',\n 'A400': '#c6ff00',\n 'A700': '#aeea00',\n 'contrastDefaultColor': 'dark',\n 'contrastStrongLightColors': '900'\n },\n 'yellow': {\n '50': '#fffde7',\n '100': '#fff9c4',\n '200': '#fff59d',\n '300': '#fff176',\n '400': '#ffee58',\n '500': '#ffeb3b',\n '600': '#fdd835',\n '700': '#fbc02d',\n '800': '#f9a825',\n '900': '#f57f17',\n 'A100': '#ffff8d',\n 'A200': '#ffff00',\n 'A400': '#ffea00',\n 'A700': '#ffd600',\n 'contrastDefaultColor': 'dark'\n },\n 'amber': {\n '50': '#fff8e1',\n '100': '#ffecb3',\n '200': '#ffe082',\n '300': '#ffd54f',\n '400': '#ffca28',\n '500': '#ffc107',\n '600': '#ffb300',\n '700': '#ffa000',\n '800': '#ff8f00',\n '900': '#ff6f00',\n 'A100': '#ffe57f',\n 'A200': '#ffd740',\n 'A400': '#ffc400',\n 'A700': '#ffab00',\n 'contrastDefaultColor': 'dark'\n },\n 'orange': {\n '50': '#fff3e0',\n '100': '#ffe0b2',\n '200': '#ffcc80',\n '300': '#ffb74d',\n '400': '#ffa726',\n '500': '#ff9800',\n '600': '#fb8c00',\n '700': '#f57c00',\n '800': '#ef6c00',\n '900': '#e65100',\n 'A100': '#ffd180',\n 'A200': '#ffab40',\n 'A400': '#ff9100',\n 'A700': '#ff6d00',\n 'contrastDefaultColor': 'dark',\n 'contrastStrongLightColors': '900'\n },\n 'deep-orange': {\n '50': '#fbe9e7',\n '100': '#ffccbc',\n '200': '#ffab91',\n '300': '#ff8a65',\n '400': '#ff7043',\n '500': '#ff5722',\n '600': '#f4511e',\n '700': '#e64a19',\n '800': '#d84315',\n '900': '#bf360c',\n 'A100': '#ff9e80',\n 'A200': '#ff6e40',\n 'A400': '#ff3d00',\n 'A700': '#dd2c00',\n 'contrastDefaultColor': 'dark',\n // Dark on 700 does not meet the minimum 4.5 contrast ratio (at 4.01),\n // but it's worse with a white foreground (3.91).\n // White on 800 does not meet the minimum 4.5 contrast ratio (at 4.43),\n // but it's worse with a dark foreground (3.54).\n 'contrastStrongLightColors': '800 900 A400 A700',\n },\n 'brown': {\n '50': '#efebe9',\n '100': '#d7ccc8',\n '200': '#bcaaa4',\n '300': '#a1887f',\n '400': '#8d6e63',\n '500': '#795548',\n '600': '#6d4c41',\n '700': '#5d4037',\n '800': '#4e342e',\n '900': '#3e2723',\n 'A100': '#d7ccc8',\n 'A200': '#bcaaa4',\n 'A400': '#8d6e63',\n 'A700': '#5d4037',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 A100 A200',\n 'contrastStrongLightColors': '400 500 600 700 800 900 A400 A700'\n },\n 'grey': {\n '50': '#fafafa',\n '100': '#f5f5f5',\n '200': '#eeeeee',\n '300': '#e0e0e0',\n '400': '#bdbdbd',\n '500': '#9e9e9e',\n '600': '#757575',\n '700': '#616161',\n '800': '#424242',\n '900': '#212121',\n 'A100': '#ffffff',\n 'A200': '#000000',\n 'A400': '#303030',\n 'A700': '#616161',\n 'contrastDefaultColor': 'dark',\n 'contrastLightColors': '700 800 900 A200 A400 A700',\n 'contrastStrongLightColors': '600'\n },\n 'blue-grey': {\n '50': '#eceff1',\n '100': '#cfd8dc',\n '200': '#b0bec5',\n '300': '#90a4ae',\n '400': '#78909c',\n '500': '#607d8b',\n '600': '#546e7a',\n '700': '#455a64',\n '800': '#37474f',\n '900': '#263238',\n 'A100': '#cfd8dc',\n 'A200': '#b0bec5',\n 'A400': '#78909c',\n 'A700': '#455a64',\n 'contrastDefaultColor': 'light',\n 'contrastDarkColors': '50 100 200 300 400 A100 A200 A400',\n // White on 500 does not meet the minimum 4.5 contrast ratio (at 4.37),\n // but it's worse with a dark foreground.\n 'contrastStrongLightColors': '500 600 700 800 900 A700'\n }\n});\n\n})();\n(function(){\n\"use strict\";\n\n(function(angular) {\n 'use strict';\n/**\n * @ngdoc module\n * @name material.core.theming\n * @description\n * Theming\n */\ndetectDisabledThemes.$inject = [\"$mdThemingProvider\"];\nThemingDirective.$inject = [\"$mdTheming\", \"$interpolate\", \"$parse\", \"$mdUtil\", \"$q\", \"$log\"];\nThemableDirective.$inject = [\"$mdTheming\"];\nThemingProvider.$inject = [\"$mdColorPalette\", \"$$mdMetaProvider\"];\ngenerateAllThemes.$inject = [\"$injector\", \"$mdTheming\"];\nangular.module('material.core.theming', ['material.core.theming.palette', 'material.core.meta'])\n .directive('mdTheme', ThemingDirective)\n .directive('mdThemable', ThemableDirective)\n .directive('mdThemesDisabled', disableThemesDirective)\n .provider('$mdTheming', ThemingProvider)\n .config(detectDisabledThemes)\n .run(generateAllThemes);\n\n/**\n * Detect if the HTML or the BODY tags has a [md-themes-disabled] attribute\n * If yes, then immediately disable all theme stylesheet generation and DOM injection\n */\n/**\n * @ngInject\n */\nfunction detectDisabledThemes($mdThemingProvider) {\n var isDisabled = !!document.querySelector('[md-themes-disabled]');\n $mdThemingProvider.disableTheming(isDisabled);\n}\n\n/**\n * @ngdoc service\n * @name $mdThemingProvider\n * @module material.core.theming\n *\n * @description Provider to configure the `$mdTheming` service.\n *\n * ### Default Theme\n * The `$mdThemingProvider` uses by default the following theme configuration:\n *\n * - Primary Palette: `Blue`\n * - Accent Palette: `Pink`\n * - Warn Palette: `Deep-Orange`\n * - Background Palette: `Grey`\n *\n * If you don't want to use the `md-theme` directive on the elements itself, you may want to overwrite\n * the default theme.<br/>\n * This can be done by using the following markup.\n *\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdThemingProvider) {\n * $mdThemingProvider\n * .theme('default')\n * .primaryPalette('blue')\n * .accentPalette('teal')\n * .warnPalette('red')\n * .backgroundPalette('grey');\n * });\n * </hljs>\n *\n\n * ### Dynamic Themes\n *\n * By default, if you change a theme at runtime, the `$mdTheming` service will not detect those changes.<br/>\n * If you have an application, which changes its theme on runtime, you have to enable theme watching.\n *\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdThemingProvider) {\n * // Enable theme watching.\n * $mdThemingProvider.alwaysWatchTheme(true);\n * });\n * </hljs>\n *\n * ### Custom Theme Styles\n *\n * Sometimes you may want to use your own theme styles for some custom components.<br/>\n * You are able to register your own styles by using the following markup.\n *\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdThemingProvider) {\n * // Register our custom stylesheet into the theming provider.\n * $mdThemingProvider.registerStyles(STYLESHEET);\n * });\n * </hljs>\n *\n * The `registerStyles` method only accepts strings as value, so you're actually not able to load an external\n * stylesheet file into the `$mdThemingProvider`.\n *\n * If it's necessary to load an external stylesheet, we suggest using a bundler, which supports including raw content,\n * like [raw-loader](https://github.com/webpack/raw-loader) for `webpack`.\n *\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdThemingProvider) {\n * // Register your custom stylesheet into the theming provider.\n * $mdThemingProvider.registerStyles(require('../styles/my-component.theme.css'));\n * });\n * </hljs>\n *\n * ### Browser color\n *\n * Enables browser header coloring\n * for more info please visit:\n * https://developers.google.com/web/fundamentals/design-and-ui/browser-customization/theme-color\n *\n * Options parameter: <br/>\n * `theme` - A defined theme via `$mdThemeProvider` to use the palettes from. Default is `default` theme. <br/>\n * `palette` - Can be any one of the basic material design palettes, extended defined palettes and 'primary',\n * 'accent', 'background' and 'warn'. Default is `primary`. <br/>\n * `hue` - The hue from the selected palette. Default is `800`<br/>\n *\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdThemingProvider) {\n * // Enable browser color\n * $mdThemingProvider.enableBrowserColor({\n * theme: 'myTheme', // Default is 'default'\n * palette: 'accent', // Default is 'primary', any basic material palette and extended palettes are available\n * hue: '200' // Default is '800'\n * });\n * });\n * </hljs>\n */\n\n/**\n * Some Example Valid Theming Expressions\n * =======================================\n *\n * Intention group expansion: (valid for primary, accent, warn, background)\n *\n * {{primary-100}} - grab shade 100 from the primary palette\n * {{primary-100-0.7}} - grab shade 100, apply opacity of 0.7\n * {{primary-100-contrast}} - grab shade 100's contrast color\n * {{primary-hue-1}} - grab the shade assigned to hue-1 from the primary palette\n * {{primary-hue-1-0.7}} - apply 0.7 opacity to primary-hue-1\n * {{primary-color}} - Generates .md-hue-1, .md-hue-2, .md-hue-3 with configured shades set for each hue\n * {{primary-color-0.7}} - Apply 0.7 opacity to each of the above rules\n * {{primary-contrast}} - Generates .md-hue-1, .md-hue-2, .md-hue-3 with configured contrast (ie. text) color shades set for each hue\n * {{primary-contrast-0.7}} - Apply 0.7 opacity to each of the above rules\n * {{primary-contrast-divider}} - Apply divider opacity to contrast color\n *\n * Foreground expansion: Applies rgba to black/white foreground text\n *\n * Old Foreground Expressions:\n * {{foreground-1}} - used for primary text\n * {{foreground-2}} - used for secondary text/divider\n * {{foreground-3}} - used for disabled text\n * {{foreground-4}} - used for dividers\n *\n * New Foreground Expressions:\n *\n * Apply primary text color for contrasting with default background\n * {{background-default-contrast}} - default opacity\n * {{background-default-contrast-secondary}} - opacity for secondary text\n * {{background-default-contrast-hint}} - opacity for hints and placeholders\n * {{background-default-contrast-disabled}} - opacity for disabled text\n * {{background-default-contrast-divider}} - opacity for dividers\n *\n * Apply contrast color for specific shades\n * {{background-50-contrast-icon}} - Apply contrast color for icon on background's shade 50 hue\n */\n\n// In memory generated CSS rules; registered by theme.name\nvar GENERATED = { };\n\n// In memory storage of defined themes and color palettes (both loaded by CSS, and user specified)\nvar PALETTES;\n\n// Text colors are automatically generated based on background color when not specified\n// Custom palettes can provide override colors\n// @see https://material.io/archive/guidelines/style/color.html#color-usability\nvar DARK_FOREGROUND = {\n name: 'dark',\n};\nvar LIGHT_FOREGROUND = {\n name: 'light',\n};\n\nvar DARK_SHADOW = '1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)';\nvar LIGHT_SHADOW = '';\n\nvar DARK_CONTRAST_COLOR = colorToRgbaArray('rgba(0,0,0,0.87)');\nvar LIGHT_CONTRAST_COLOR = colorToRgbaArray('rgba(255,255,255,0.87)');\nvar STRONG_LIGHT_CONTRAST_COLOR = colorToRgbaArray('rgb(255,255,255)');\n\nvar THEME_COLOR_TYPES = ['primary', 'accent', 'warn', 'background'];\nvar DEFAULT_COLOR_TYPE = 'primary';\n\n// A color in a theme will use these hues by default, if not specified by user.\nvar LIGHT_DEFAULT_HUES = {\n 'accent': {\n 'default': 'A200',\n 'hue-1': 'A100',\n 'hue-2': 'A400',\n 'hue-3': 'A700'\n },\n 'background': {\n 'default': '50',\n 'hue-1': 'A100',\n 'hue-2': '100',\n 'hue-3': '300'\n }\n};\n\nvar DARK_DEFAULT_HUES = {\n 'background': {\n 'default': 'A400',\n 'hue-1': '800',\n 'hue-2': '900',\n 'hue-3': 'A200'\n }\n};\n\n// Icon opacity values (active/inactive) from\n// https://material.io/archive/guidelines/style/color.html#color-usability\nvar DARK_CONTRAST_OPACITY = {\n 'icon': 0.54,\n 'secondary': 0.54,\n 'disabled': 0.38,\n 'hint': 0.38,\n 'divider': 0.12,\n};\n\nvar LIGHT_CONTRAST_OPACITY = {\n 'icon': 0.87,\n 'secondary': 0.7,\n 'disabled': 0.5,\n 'hint': 0.5,\n 'divider': 0.12\n};\n\n// Icon opacity values (active/inactive) from\n// https://material.io/archive/guidelines/style/color.html#color-usability\nvar STRONG_LIGHT_CONTRAST_OPACITY = {\n 'icon': 1.0,\n 'secondary': 0.7,\n 'disabled': 0.5,\n 'hint': 0.5,\n 'divider': 0.12\n};\n\nTHEME_COLOR_TYPES.forEach(function(colorType) {\n // Color types with unspecified default hues will use these default hue values\n var defaultDefaultHues = {\n 'default': '500',\n 'hue-1': '300',\n 'hue-2': '800',\n 'hue-3': 'A100'\n };\n if (!LIGHT_DEFAULT_HUES[colorType]) LIGHT_DEFAULT_HUES[colorType] = defaultDefaultHues;\n if (!DARK_DEFAULT_HUES[colorType]) DARK_DEFAULT_HUES[colorType] = defaultDefaultHues;\n});\n\nvar VALID_HUE_VALUES = [\n '50', '100', '200', '300', '400', '500', '600',\n '700', '800', '900', 'A100', 'A200', 'A400', 'A700'\n];\n\nvar themeConfig = {\n disableTheming : false, // Generate our themes at run time; also disable stylesheet DOM injection\n generateOnDemand : false, // Whether or not themes are to be generated on-demand (vs. eagerly).\n registeredStyles : [], // Custom styles registered to be used in the theming of custom components.\n nonce : null // Nonce to be added as an attribute to the generated themes style tags.\n};\n\n/**\n *\n */\nfunction ThemingProvider($mdColorPalette, $$mdMetaProvider) {\n ThemingService.$inject = [\"$rootScope\", \"$mdUtil\", \"$q\", \"$log\"];\n PALETTES = { };\n var THEMES = { };\n\n var themingProvider;\n\n var alwaysWatchTheme = false;\n var defaultTheme = 'default';\n\n // Load JS Defined Palettes\n angular.extend(PALETTES, $mdColorPalette);\n\n // Default theme defined in core.js\n\n /**\n * Adds `theme-color` and `msapplication-navbutton-color` meta tags with the color parameter\n * @param {string} color Hex value of the wanted browser color\n * @returns {function} Remove function of the meta tags\n */\n var setBrowserColor = function (color) {\n // Chrome, Firefox OS and Opera\n var removeChrome = $$mdMetaProvider.setMeta('theme-color', color);\n // Windows Phone\n var removeWindows = $$mdMetaProvider.setMeta('msapplication-navbutton-color', color);\n\n return function () {\n removeChrome();\n removeWindows();\n };\n };\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#enableBrowserColor\n * @description\n * Enables browser header coloring. For more info please visit\n * <a href=\"https://developers.google.com/web/fundamentals/design-and-ui/browser-customization/theme-color\">\n * Web Fundamentals</a>.\n * @param {object=} options Options for the browser color, which include:<br/>\n * - `theme` - `{string}`: A defined theme via `$mdThemeProvider` to use the palettes from. Default is `default` theme. <br/>\n * - `palette` - `{string}`: Can be any one of the basic material design palettes, extended defined palettes, or `primary`,\n * `accent`, `background`, and `warn`. Default is `primary`.<br/>\n * - `hue` - `{string}`: The hue from the selected palette. Default is `800`.<br/>\n * @returns {function} Function that removes the browser coloring when called.\n */\n var enableBrowserColor = function (options) {\n options = angular.isObject(options) ? options : {};\n\n var theme = options.theme || 'default';\n var hue = options.hue || '800';\n\n var palette = PALETTES[options.palette] ||\n PALETTES[THEMES[theme].colors[options.palette || 'primary'].name];\n\n var color = angular.isObject(palette[hue]) ? palette[hue].hex : palette[hue];\n if (color.substr(0, 1) !== '#') color = '#' + color;\n\n return setBrowserColor(color);\n };\n\n return themingProvider = {\n definePalette: definePalette,\n extendPalette: extendPalette,\n theme: registerTheme,\n\n /**\n * return a read-only clone of the current theme configuration\n */\n configuration : function() {\n return angular.extend({ }, themeConfig, {\n defaultTheme : defaultTheme,\n alwaysWatchTheme : alwaysWatchTheme,\n registeredStyles : [].concat(themeConfig.registeredStyles)\n });\n },\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#disableTheming\n * @description\n * An easier way to disable theming without having to use `.constant(\"$MD_THEME_CSS\",\"\");`.\n * This disables all dynamic theme style sheet generations and injections.\n * @param {boolean=} isDisabled Disable all dynamic theme style sheet generations and injections\n * if `true` or `undefined`.\n */\n disableTheming: function(isDisabled) {\n themeConfig.disableTheming = angular.isUndefined(isDisabled) || !!isDisabled;\n },\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#registerStyles\n * @param {string} styles The styles to be appended to AngularJS Material's built in theme CSS.\n */\n registerStyles: function(styles) {\n themeConfig.registeredStyles.push(styles);\n },\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#setNonce\n * @param {string} nonceValue The nonce to be added as an attribute to the theme style tags.\n * Setting a value allows the use of CSP policy without using the `'unsafe-inline'` directive.\n * The string must already be base64 encoded. You can use `btoa(string)` to do this encoding.\n * In your CSP's `style-src`, you would then add an entry for `'nonce-nonceValue'`.\n */\n setNonce: function(nonceValue) {\n themeConfig.nonce = nonceValue;\n },\n\n generateThemesOnDemand: function(onDemand) {\n themeConfig.generateOnDemand = onDemand;\n },\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#setDefaultTheme\n * @param {string} theme Default theme name to be applied to elements.\n * Default value is `default`.\n */\n setDefaultTheme: function(theme) {\n defaultTheme = theme;\n },\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#alwaysWatchTheme\n * @param {boolean} alwaysWatch Whether or not to always watch themes for changes and re-apply\n * classes when they change. Default is `false`. Enabling can reduce performance.\n */\n alwaysWatchTheme: function(alwaysWatch) {\n alwaysWatchTheme = alwaysWatch;\n },\n\n enableBrowserColor: enableBrowserColor,\n\n $get: ThemingService,\n _LIGHT_DEFAULT_HUES: LIGHT_DEFAULT_HUES,\n _DARK_DEFAULT_HUES: DARK_DEFAULT_HUES,\n _PALETTES: PALETTES,\n _THEMES: THEMES,\n _parseRules: parseRules,\n _rgba: rgba\n };\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#definePalette\n * @description\n * In the event that you need to define a custom color palette, you can use this function to\n * make it available to your theme for use in its intention groups.<br>\n * Note that you must specify all hues in the definition map.\n * @param {string} name Name of palette being defined\n * @param {object} map Palette definition that includes hue definitions and contrast colors:\n * - `'50'` - `{string}`: HEX color\n * - `'100'` - `{string}`: HEX color\n * - `'200'` - `{string}`: HEX color\n * - `'300'` - `{string}`: HEX color\n * - `'400'` - `{string}`: HEX color\n * - `'500'` - `{string}`: HEX color\n * - `'600'` - `{string}`: HEX color\n * - `'700'` - `{string}`: HEX color\n * - `'800'` - `{string}`: HEX color\n * - `'900'` - `{string}`: HEX color\n * - `'A100'` - `{string}`: HEX color\n * - `'A200'` - `{string}`: HEX color\n * - `'A400'` - `{string}`: HEX color\n * - `'A700'` - `{string}`: HEX color\n * - `'contrastDefaultColor'` - `{string}`: `light` or `dark`\n * - `'contrastDarkColors'` - `{string[]}`: Hues which should use dark contrast colors (i.e. raised button text).\n * For example: `['50', '100', '200', '300', '400', 'A100']`.\n * - `'contrastLightColors'` - `{string[]}`: Hues which should use light contrast colors (i.e. raised button text).\n * For example: `['500', '600', '700', '800', '900', 'A200', 'A400', 'A700']`.\n */\n function definePalette(name, map) {\n map = map || {};\n PALETTES[name] = checkPaletteValid(name, map);\n return themingProvider;\n }\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#extendPalette\n * @description\n * Sometimes it is easier to extend an existing color palette and then change a few properties,\n * rather than defining a whole new palette.\n * @param {string} name Name of palette being extended\n * @param {object} map Palette definition that includes optional hue definitions and contrast colors:\n * - `'50'` - `{string}`: HEX color\n * - `'100'` - `{string}`: HEX color\n * - `'200'` - `{string}`: HEX color\n * - `'300'` - `{string}`: HEX color\n * - `'400'` - `{string}`: HEX color\n * - `'500'` - `{string}`: HEX color\n * - `'600'` - `{string}`: HEX color\n * - `'700'` - `{string}`: HEX color\n * - `'800'` - `{string}`: HEX color\n * - `'900'` - `{string}`: HEX color\n * - `'A100'` - `{string}`: HEX color\n * - `'A200'` - `{string}`: HEX color\n * - `'A400'` - `{string}`: HEX color\n * - `'A700'` - `{string}`: HEX color\n * - `'contrastDefaultColor'` - `{string}`: `light` or `dark`\n * - `'contrastDarkColors'` - `{string[]}`: Hues which should use dark contrast colors (i.e. raised button text).\n * For example: `['50', '100', '200', '300', '400', 'A100']`.\n * - `'contrastLightColors'` - `{string[]}`: Hues which should use light contrast colors (i.e. raised button text).\n * For example: `['500', '600', '700', '800', '900', 'A200', 'A400', 'A700']`.\n * @returns {object} A new object which is a copy of the given palette, `name`,\n * with variables from `map` overwritten.\n */\n function extendPalette(name, map) {\n return checkPaletteValid(name, angular.extend({}, PALETTES[name] || {}, map));\n }\n\n // Make sure that palette has all required hues\n function checkPaletteValid(name, map) {\n var missingColors = VALID_HUE_VALUES.filter(function(field) {\n return !map[field];\n });\n if (missingColors.length) {\n throw new Error(\"Missing colors %1 in palette %2!\"\n .replace('%1', missingColors.join(', '))\n .replace('%2', name));\n }\n\n return map;\n }\n\n /**\n * @ngdoc method\n * @name $mdThemingProvider#theme\n * @description\n * Register a theme (which is a collection of color palettes); i.e. `warn`, `accent`,\n * `background`, and `primary`.<br>\n * Optionally inherit from an existing theme.\n * @param {string} name Name of theme being registered\n * @param {string=} inheritFrom Existing theme name to inherit from\n */\n function registerTheme(name, inheritFrom) {\n if (THEMES[name]) return THEMES[name];\n\n inheritFrom = inheritFrom || 'default';\n\n var parentTheme = typeof inheritFrom === 'string' ? THEMES[inheritFrom] : inheritFrom;\n var theme = new Theme(name);\n\n if (parentTheme) {\n angular.forEach(parentTheme.colors, function(color, colorType) {\n theme.colors[colorType] = {\n name: color.name,\n // Make sure a COPY of the hues is given to the child color,\n // not the same reference.\n hues: angular.extend({}, color.hues)\n };\n });\n }\n THEMES[name] = theme;\n\n return theme;\n }\n\n function Theme(name) {\n var self = this;\n self.name = name;\n self.colors = {};\n\n self.dark = setDark;\n setDark(false);\n\n function setDark(isDark) {\n isDark = arguments.length === 0 ? true : !!isDark;\n\n // If no change, abort\n if (isDark === self.isDark) return;\n\n self.isDark = isDark;\n\n self.foregroundPalette = self.isDark ? LIGHT_FOREGROUND : DARK_FOREGROUND;\n self.foregroundShadow = self.isDark ? DARK_SHADOW : LIGHT_SHADOW;\n\n // Light and dark themes have different default hues.\n // Go through each existing color type for this theme, and for every\n // hue value that is still the default hue value from the previous light/dark setting,\n // set it to the default hue value from the new light/dark setting.\n var newDefaultHues = self.isDark ? DARK_DEFAULT_HUES : LIGHT_DEFAULT_HUES;\n var oldDefaultHues = self.isDark ? LIGHT_DEFAULT_HUES : DARK_DEFAULT_HUES;\n angular.forEach(newDefaultHues, function(newDefaults, colorType) {\n var color = self.colors[colorType];\n var oldDefaults = oldDefaultHues[colorType];\n if (color) {\n for (var hueName in color.hues) {\n if (color.hues[hueName] === oldDefaults[hueName]) {\n color.hues[hueName] = newDefaults[hueName];\n }\n }\n }\n });\n\n return self;\n }\n\n THEME_COLOR_TYPES.forEach(function(colorType) {\n var defaultHues = (self.isDark ? DARK_DEFAULT_HUES : LIGHT_DEFAULT_HUES)[colorType];\n self[colorType + 'Palette'] = function setPaletteType(paletteName, hues) {\n var color = self.colors[colorType] = {\n name: paletteName,\n hues: angular.extend({}, defaultHues, hues)\n };\n\n Object.keys(color.hues).forEach(function(name) {\n if (!defaultHues[name]) {\n throw new Error(\"Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4\"\n .replace('%1', name)\n .replace('%2', self.name)\n .replace('%3', paletteName)\n .replace('%4', Object.keys(defaultHues).join(', '))\n );\n }\n });\n Object.keys(color.hues).map(function(key) {\n return color.hues[key];\n }).forEach(function(hueValue) {\n if (VALID_HUE_VALUES.indexOf(hueValue) === -1) {\n throw new Error(\"Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5\"\n .replace('%1', hueValue)\n .replace('%2', self.name)\n .replace('%3', colorType)\n .replace('%4', paletteName)\n .replace('%5', VALID_HUE_VALUES.join(', '))\n );\n }\n });\n return self;\n };\n });\n }\n\n /**\n * @ngdoc service\n * @name $mdTheming\n * @module material.core.theming\n * @description\n * Service that makes an element apply theming related <b>classes</b> to itself.\n *\n * For more information on the hue objects, their default values, as well as valid hue values, please visit <a ng-href=\"Theming/03_configuring_a_theme#specifying-custom-hues-for-color-intentions\">the custom hues section of Configuring a Theme</a>.\n *\n * <hljs lang=\"js\">\n * // Example component directive that we want to apply theming classes to.\n * app.directive('myFancyDirective', function($mdTheming) {\n * return {\n * restrict: 'AE',\n * link: function(scope, element, attrs) {\n * // Initialize the service using our directive's element\n * $mdTheming(element);\n *\n * $mdTheming.defineTheme('myTheme', {\n * primary: 'blue',\n * primaryHues: {\n * default: '500',\n * hue-1: '300',\n * hue-2: '900',\n * hue-3: 'A100'\n * },\n * accent: 'pink',\n * accentHues: {\n * default: '600',\n * hue-1: '300',\n * hue-2: '200',\n * hue-3: 'A500'\n * },\n * warn: 'red',\n * // It's not necessary to specify all hues in the object.\n * warnHues: {\n * default: '200',\n * hue-3: 'A100'\n * },\n * // It's not necessary to specify custom hues at all.\n * background: 'grey',\n * dark: true\n * });\n * // Your directive's custom code here.\n * }\n * };\n * });\n * </hljs>\n * @param {element=} element Element that will have theming classes applied to it.\n */\n\n /**\n * @ngdoc property\n * @name $mdTheming#THEMES\n * @description\n * Property to get all the themes defined\n * @returns {object} All the themes defined with their properties.\n */\n\n /**\n * @ngdoc property\n * @name $mdTheming#PALETTES\n * @description\n * Property to get all the palettes defined\n * @returns {object} All the palettes defined with their colors.\n */\n\n /**\n * @ngdoc method\n * @name $mdTheming#registered\n * @description\n * Determine is specified theme name is a valid, registered theme\n * @param {string} themeName the theme to check if registered\n * @returns {boolean} whether the theme is registered or not\n */\n\n /**\n * @ngdoc method\n * @name $mdTheming#defaultTheme\n * @description\n * Returns the default theme\n * @returns {string} The default theme\n */\n\n /**\n * @ngdoc method\n * @name $mdTheming#generateTheme\n * @description\n * Lazy generate themes - by default, every theme is generated when defined.\n * You can disable this in the configuration section using the\n * `$mdThemingProvider.generateThemesOnDemand(true);`\n *\n * The theme name that is passed in must match the name of the theme that was defined as part of\n * the configuration block.\n *\n * @param {string} name theme name to generate\n */\n\n /**\n * @ngdoc method\n * @name $mdTheming#setBrowserColor\n * @description\n * Enables browser header coloring. For more info please visit\n * <a href=\"https://developers.google.com/web/fundamentals/design-and-ui/browser-customization/theme-color\">\n * Web Fundamentals</a>.\n * @param {object=} options Options for the browser color, which include:<br/>\n * - `theme` - `{string}`: A defined theme via `$mdThemeProvider` to use the palettes from.\n * Default is `default` theme. <br/>\n * - `palette` - `{string}`: Can be any one of the basic material design palettes, extended\n * defined palettes, or `primary`, `accent`, `background`, and `warn`. Default is `primary`.\n * <br/>\n * - `hue` - `{string}`: The hue from the selected palette. Default is `800`.<br/>\n * @returns {function} Function that removes the browser coloring when called.\n */\n\n /**\n * @ngdoc method\n * @name $mdTheming#defineTheme\n * @description\n * Dynamically define a theme by using an options object that contains palette names.\n *\n * @param {string} name Theme name to define\n * @param {object} options Theme definition options\n *\n * Options are:<br/>\n * - `primary` - `{string}`: The name of the primary palette to use in the theme.<br/>\n * - `primaryHues` - `{object=}`: Override hues for primary palette.<br/>\n * - `accent` - `{string}`: The name of the accent palette to use in the theme.<br/>\n * - `accentHues` - `{object=}`: Override hues for accent palette.<br/>\n * - `warn` - `{string}`: The name of the warn palette to use in the theme.<br/>\n * - `warnHues` - `{object=}`: Override hues for warn palette.<br/>\n * - `background` - `{string}`: The name of the background palette to use in the theme.<br/>\n * - `backgroundHues` - `{object=}`: Override hues for background palette.<br/>\n * - `dark` - `{boolean}`: Indicates if it's a dark theme.<br/>\n * @returns {Promise<string>} A resolved promise with the new theme name.\n */\n\n /* @ngInject */\n function ThemingService($rootScope, $mdUtil, $q, $log) {\n // Allow us to be invoked via a linking function signature.\n var applyTheme = function (scope, el) {\n if (el === undefined) { el = scope; scope = undefined; }\n if (scope === undefined) { scope = $rootScope; }\n applyTheme.inherit(el, el);\n };\n\n Object.defineProperty(applyTheme, 'THEMES', {\n get: function () {\n return angular.extend({}, THEMES);\n }\n });\n Object.defineProperty(applyTheme, 'PALETTES', {\n get: function () {\n return angular.extend({}, PALETTES);\n }\n });\n Object.defineProperty(applyTheme, 'ALWAYS_WATCH', {\n get: function () {\n return alwaysWatchTheme;\n }\n });\n applyTheme.inherit = inheritTheme;\n applyTheme.registered = registered;\n applyTheme.defaultTheme = function() { return defaultTheme; };\n applyTheme.generateTheme = function(name) { generateTheme(THEMES[name], name, themeConfig.nonce); };\n applyTheme.defineTheme = function(name, options) {\n options = options || {};\n\n var theme = registerTheme(name);\n\n if (options.primary) {\n theme.primaryPalette(options.primary, options.primaryHues);\n }\n if (options.accent) {\n theme.accentPalette(options.accent, options.accentHues);\n }\n if (options.warn) {\n theme.warnPalette(options.warn, options.warnHues);\n }\n if (options.background) {\n theme.backgroundPalette(options.background, options.backgroundHues);\n }\n if (options.dark){\n theme.dark();\n }\n\n this.generateTheme(name);\n\n return $q.resolve(name);\n };\n applyTheme.setBrowserColor = enableBrowserColor;\n\n return applyTheme;\n\n /**\n * Determine is specified theme name is a valid, registered theme\n */\n function registered(themeName) {\n if (themeName === undefined || themeName === '') return true;\n return applyTheme.THEMES[themeName] !== undefined;\n }\n\n /**\n * Get theme name for the element, then update with Theme CSS class\n */\n function inheritTheme (el, parent) {\n var ctrl = parent.controller('mdTheme') || el.data('$mdThemeController');\n var scope = el.scope();\n\n updateThemeClass(lookupThemeName());\n\n if (ctrl) {\n var watchTheme = alwaysWatchTheme ||\n ctrl.$shouldWatch ||\n $mdUtil.parseAttributeBoolean(el.attr('md-theme-watch'));\n\n if (watchTheme || ctrl.isAsyncTheme) {\n var clearNameWatcher = function () {\n if (unwatch) {\n unwatch();\n unwatch = undefined;\n }\n };\n\n var unwatch = ctrl.registerChanges(function(name) {\n updateThemeClass(name);\n\n if (!watchTheme) {\n clearNameWatcher();\n }\n });\n\n if (scope) {\n scope.$on('$destroy', clearNameWatcher);\n } else {\n el.on('$destroy', clearNameWatcher);\n }\n }\n }\n\n /**\n * Find the theme name from the parent controller or element data\n */\n function lookupThemeName() {\n // As a few components (dialog) add their controllers later, we should also watch for a controller init.\n return ctrl && ctrl.$mdTheme || (defaultTheme === 'default' ? '' : defaultTheme);\n }\n\n /**\n * Remove old theme class and apply a new one\n * NOTE: if not a valid theme name, then the current name is not changed\n */\n function updateThemeClass(theme) {\n if (!theme) return;\n if (!registered(theme)) {\n $log.warn('Attempted to use unregistered theme \\'' + theme + '\\'. ' +\n 'Register it with $mdThemingProvider.theme().');\n }\n\n var oldTheme = el.data('$mdThemeName');\n if (oldTheme) el.removeClass('md-' + oldTheme +'-theme');\n el.addClass('md-' + theme + '-theme');\n el.data('$mdThemeName', theme);\n if (ctrl) {\n el.data('$mdThemeController', ctrl);\n }\n }\n }\n\n }\n}\n\nfunction ThemingDirective($mdTheming, $interpolate, $parse, $mdUtil, $q, $log) {\n return {\n priority: 101, // has to be more than 100 to be before interpolation (issue on IE)\n link: {\n pre: function(scope, el, attrs) {\n var registeredCallbacks = [];\n\n var startSymbol = $interpolate.startSymbol();\n var endSymbol = $interpolate.endSymbol();\n\n var theme = attrs.mdTheme.trim();\n\n var hasInterpolation =\n theme.substr(0, startSymbol.length) === startSymbol &&\n theme.lastIndexOf(endSymbol) === theme.length - endSymbol.length;\n\n var oneTimeOperator = '::';\n var oneTimeBind = attrs.mdTheme\n .split(startSymbol).join('')\n .split(endSymbol).join('')\n .trim()\n .substr(0, oneTimeOperator.length) === oneTimeOperator;\n\n var getTheme = function () {\n var interpolation = $interpolate(attrs.mdTheme)(scope);\n return $parse(interpolation)(scope) || interpolation;\n };\n\n var ctrl = {\n isAsyncTheme: angular.isFunction(getTheme()) || angular.isFunction(getTheme().then),\n registerChanges: function (cb, context) {\n if (context) {\n cb = angular.bind(context, cb);\n }\n\n registeredCallbacks.push(cb);\n\n return function () {\n var index = registeredCallbacks.indexOf(cb);\n\n if (index > -1) {\n registeredCallbacks.splice(index, 1);\n }\n };\n },\n $setTheme: function (theme) {\n if (!$mdTheming.registered(theme)) {\n $log.warn('attempted to use unregistered theme \\'' + theme + '\\'');\n }\n\n ctrl.$mdTheme = theme;\n\n // Iterating backwards to support unregistering during iteration\n // http://stackoverflow.com/a/9882349/890293\n // we don't use `reverse()` of array because it mutates the array and we don't want it\n // to get re-indexed\n for (var i = registeredCallbacks.length; i--;) {\n registeredCallbacks[i](theme);\n }\n },\n $shouldWatch: $mdUtil.parseAttributeBoolean(el.attr('md-theme-watch')) ||\n $mdTheming.ALWAYS_WATCH ||\n (hasInterpolation && !oneTimeBind)\n };\n\n el.data('$mdThemeController', ctrl);\n\n var setParsedTheme = function (theme) {\n if (typeof theme === 'string') {\n return ctrl.$setTheme(theme);\n }\n\n $q.when(angular.isFunction(theme) ? theme() : theme)\n .then(function(name) {\n ctrl.$setTheme(name);\n });\n };\n\n setParsedTheme(getTheme());\n\n var unwatch = scope.$watch(getTheme, function(theme) {\n if (theme) {\n setParsedTheme(theme);\n\n if (!ctrl.$shouldWatch) {\n unwatch();\n }\n }\n });\n }\n }\n };\n}\n\n/**\n * Special directive that will disable ALL runtime Theme style generation and DOM injection\n *\n * <link rel=\"stylesheet\" href=\"angular-material.min.css\">\n * <link rel=\"stylesheet\" href=\"angular-material.themes.css\">\n *\n * <body md-themes-disabled>\n * ...\n * </body>\n *\n * Note: Using md-themes-css directive requires the developer to load external\n * theme stylesheets; e.g. custom themes from Material-Tools:\n *\n * `angular-material.themes.css`\n *\n * Another option is to use the ThemingProvider to configure and disable the attribute\n * conversions; this would obviate the use of the `md-themes-css` directive\n *\n */\nfunction disableThemesDirective() {\n themeConfig.disableTheming = true;\n\n // Return a 1x-only, first-match attribute directive\n return {\n restrict : 'A',\n priority : '900'\n };\n}\n\nfunction ThemableDirective($mdTheming) {\n return $mdTheming;\n}\n\nfunction parseRules(theme, colorType, rules) {\n checkValidPalette(theme, colorType);\n\n rules = rules.replace(/THEME_NAME/g, theme.name);\n var themeNameRegex = new RegExp('\\\\.md-' + theme.name + '-theme', 'g');\n // Matches '{{ primary-color }}', etc\n var hueRegex = new RegExp('([\\'\"])?{{\\\\s*([a-zA-Z]+)-?(color|default)?-?(contrast)?-?((?:\\\\d\\\\.?\\\\d*)|(?:[a-zA-Z]+))?\\\\s*}}([\"\\'])?','g');\n var simpleVariableRegex = /'?\"?{{\\s*([a-zA-Z]+)-(A?\\d+|hue-[0-3]|shadow|default)-?(contrast)?-?((?:\\d\\.?\\d*)|(?:[a-zA-Z]+))?\\s*}}'?\"?/g;\n var defaultBgHue = theme.colors['background'].hues['default'];\n var defaultBgContrastType = PALETTES[theme.colors['background'].name][defaultBgHue].contrastType;\n\n // find and replace simple variables where we use a specific hue, not an entire palette\n // eg. \"{{primary-100}}\"\n // \\(' + THEME_COLOR_TYPES.join('\\|') + '\\)'\n rules = rules.replace(simpleVariableRegex, function(match, colorType, hue, contrast, opacity) {\n var regexColorType = colorType;\n if (colorType === 'foreground') {\n if (hue === 'shadow') {\n return theme.foregroundShadow;\n } else if (theme.foregroundPalette[hue]) {\n // Use user defined palette number (ie: foreground-2)\n return rgba(colorToRgbaArray(theme.foregroundPalette[hue]));\n } else if (theme.foregroundPalette['1']){\n return rgba(colorToRgbaArray(theme.foregroundPalette['1']));\n }\n // Default to background-default-contrast-{opacity}\n colorType = 'background';\n contrast = 'contrast';\n if (!opacity && hue) {\n // Convert references to legacy hues to opacities (i.e. foreground-4 to *-divider)\n switch (hue) {\n // hue-1 uses default opacity\n case '2':\n opacity = 'secondary';\n break;\n case '3':\n opacity = 'disabled';\n break;\n case '4':\n opacity = 'divider';\n }\n }\n hue = 'default';\n }\n\n // `default` is also accepted as a hue-value, because the background palettes are\n // using it as a name for the default hue.\n if (hue.indexOf('hue') === 0 || hue === 'default') {\n hue = theme.colors[colorType].hues[hue];\n }\n\n var colorDetails = (PALETTES[ theme.colors[colorType].name ][hue] || '');\n\n // If user has specified a foreground color, use those\n if (colorType === 'background' && contrast && regexColorType !== 'foreground' &&\n colorDetails.contrastType === defaultBgContrastType) {\n // Don't process if colorType was changed\n switch (opacity) {\n case 'secondary':\n case 'icon':\n if (theme.foregroundPalette['2']) {\n return rgba(colorToRgbaArray(theme.foregroundPalette['2']));\n }\n break;\n case 'disabled':\n case 'hint':\n if (theme.foregroundPalette['3']) {\n return rgba(colorToRgbaArray(theme.foregroundPalette['3']));\n }\n break;\n case 'divider':\n if (theme.foregroundPalette['4']) {\n return rgba(colorToRgbaArray(theme.foregroundPalette['4']));\n }\n break;\n default:\n if (theme.foregroundPalette['1']) {\n return rgba(colorToRgbaArray(theme.foregroundPalette['1']));\n }\n break;\n }\n }\n\n if (contrast && opacity) {\n opacity = colorDetails.opacity[opacity] || opacity;\n }\n\n return rgba(colorDetails[contrast ? 'contrast' : 'value'], opacity);\n });\n\n var generatedRules = [];\n\n // For each type, generate rules for each hue (ie. default, md-hue-1, md-hue-2, md-hue-3)\n angular.forEach(['default', 'hue-1', 'hue-2', 'hue-3'], function(hueName) {\n var newRule = rules\n .replace(hueRegex, function(match, _, matchedColorType, hueType, contrast, opacity) {\n var color = theme.colors[matchedColorType];\n var palette = PALETTES[color.name];\n var hueValue = color.hues[hueName];\n if (contrast && opacity) {\n opacity = palette[hueValue].opacity[opacity] || opacity;\n }\n return rgba(palette[hueValue][hueType === 'color' ? 'value' : 'contrast'], opacity);\n });\n if (hueName !== 'default') {\n newRule = newRule.replace(themeNameRegex, '.md-' + theme.name + '-theme.md-' + hueName);\n }\n\n // Don't apply a selector rule to the default theme, making it easier to override\n // styles of the base-component\n if (theme.name === 'default') {\n var themeRuleRegex = /((?:\\s|>|\\.|\\w|-|:|\\(|\\)|\\[|]|\"|'|=)*)\\.md-default-theme((?:\\s|>|\\.|\\w|-|:|\\(|\\)|\\[|]|\"|'|=)*)/g;\n\n newRule = newRule.replace(themeRuleRegex, function(match, start, end) {\n return match + ', ' + start + end;\n });\n }\n generatedRules.push(newRule);\n });\n\n return generatedRules;\n}\n\nvar rulesByType = {};\n\n// Generate our themes at run time given the state of THEMES and PALETTES\nfunction generateAllThemes($injector, $mdTheming) {\n var head = document.head;\n var firstChild = head ? head.firstElementChild : null;\n var themeCss = !themeConfig.disableTheming && $injector.has('$MD_THEME_CSS') ? $injector.get('$MD_THEME_CSS') : '';\n\n // Append our custom registered styles to the theme stylesheet.\n themeCss += themeConfig.registeredStyles.join('');\n\n if (!firstChild) return;\n if (themeCss.length === 0) return; // no rules, so no point in running this expensive task\n\n // Expose contrast colors for palettes to ensure that text is always readable\n angular.forEach(PALETTES, sanitizePalette);\n\n // MD_THEME_CSS is a string generated by the build process that includes all the themeable\n // components as templates\n\n // Break the CSS into individual rules\n var rules = splitCss(themeCss).map(function(rule) {\n return rule.trim();\n });\n\n THEME_COLOR_TYPES.forEach(function(type) {\n rulesByType[type] = '';\n });\n\n // Sort the rules based on type, allowing us to do color substitution on a per-type basis\n rules.forEach(function(rule) {\n // First: test that if the rule has '.md-accent', it goes into the accent set of rules\n for (var i = 0, type; type = THEME_COLOR_TYPES[i]; i++) {\n if (rule.indexOf('.md-' + type) > -1) {\n return rulesByType[type] += rule;\n }\n }\n\n // If no eg 'md-accent' class is found, try to just find 'accent' in the rule and guess from\n // there\n for (i = 0; type = THEME_COLOR_TYPES[i]; i++) {\n if (rule.indexOf(type) > -1) {\n return rulesByType[type] += rule;\n }\n }\n\n // Default to the primary array\n return rulesByType[DEFAULT_COLOR_TYPE] += rule;\n });\n\n // If themes are being generated on-demand, quit here. The user will later manually\n // call generateTheme to do this on a theme-by-theme basis.\n if (themeConfig.generateOnDemand) return;\n\n angular.forEach($mdTheming.THEMES, function(theme) {\n if (!GENERATED[theme.name] && !($mdTheming.defaultTheme() !== 'default' && theme.name === 'default')) {\n generateTheme(theme, theme.name, themeConfig.nonce);\n }\n });\n\n\n // *************************\n // Internal functions\n // *************************\n\n /**\n * The user specifies a 'default' contrast color as either light or dark, then explicitly lists\n * which hues are the opposite contrast (eg. A100 has dark, A200 has light).\n * @param {!object} palette to sanitize\n */\n function sanitizePalette(palette) {\n var defaultContrast = palette.contrastDefaultColor;\n var lightColors = palette.contrastLightColors || [];\n var strongLightColors = palette.contrastStrongLightColors || [];\n var darkColors = palette.contrastDarkColors || [];\n\n // These colors are provided as space-separated lists\n if (typeof lightColors === 'string') lightColors = lightColors.split(' ');\n if (typeof strongLightColors === 'string') strongLightColors = strongLightColors.split(' ');\n if (typeof darkColors === 'string') darkColors = darkColors.split(' ');\n\n // Cleanup after ourselves\n delete palette.contrastDefaultColor;\n delete palette.contrastLightColors;\n delete palette.contrastStrongLightColors;\n delete palette.contrastDarkColors;\n\n /**\n * @param {string} hueName\n * @return {'dark'|'light'|'strongLight'}\n */\n function getContrastType(hueName) {\n if (defaultContrast === 'light' ? darkColors.indexOf(hueName) !== -1 :\n (lightColors.indexOf(hueName) === -1 && strongLightColors.indexOf(hueName) === -1)) {\n return 'dark';\n }\n if (strongLightColors.indexOf(hueName) !== -1) {\n return 'strongLight';\n }\n return 'light';\n }\n\n /**\n * @param {'dark'|'light'|'strongLight'} contrastType\n * @return {[number, number, number]} [red, green, blue] array\n */\n function getContrastColor(contrastType) {\n switch (contrastType) {\n default:\n case 'strongLight':\n return STRONG_LIGHT_CONTRAST_COLOR;\n case 'light':\n return LIGHT_CONTRAST_COLOR;\n case 'dark':\n return DARK_CONTRAST_COLOR;\n }\n }\n\n /**\n * @param {'dark'|'light'|'strongLight'} contrastType\n * @return {{secondary: number, divider: number, hint: number, icon: number, disabled: number}}\n */\n function getOpacityValues(contrastType) {\n switch (contrastType) {\n default:\n case 'strongLight':\n return STRONG_LIGHT_CONTRAST_OPACITY;\n case 'light':\n return LIGHT_CONTRAST_OPACITY;\n case 'dark':\n return DARK_CONTRAST_OPACITY;\n }\n }\n // Change { 'A100': '#fffeee' } to { 'A100': { value: '#fffeee', contrast:DARK_CONTRAST_COLOR }\n angular.forEach(palette, function(hueValue, hueName) {\n if (angular.isObject(hueValue)) return; // Already converted\n // Map everything to rgb colors\n var rgbValue = colorToRgbaArray(hueValue);\n if (!rgbValue) {\n throw new Error(\"Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.\"\n .replace('%1', hueValue)\n .replace('%2', palette.name)\n .replace('%3', hueName));\n }\n\n var contrastType = getContrastType(hueName);\n palette[hueName] = {\n hex: palette[hueName],\n value: rgbValue,\n contrastType: contrastType,\n contrast: getContrastColor(contrastType),\n opacity: getOpacityValues(contrastType)\n };\n });\n }\n\n /**\n * @param {string} themeCss\n * @returns {[]} a string representing a CSS file that is split, producing an array with a rule\n * at each index.\n */\n function splitCss(themeCss) {\n var result = [];\n var currentRule = '';\n var openedCurlyBrackets = 0;\n var closedCurlyBrackets = 0;\n\n for (var i = 0; i < themeCss.length; i++) {\n var character = themeCss.charAt(i);\n\n // Check for content in quotes\n if (character === '\\'' || character === '\"') {\n // Append text in quotes to current rule\n var textInQuotes = themeCss.substring(i, themeCss.indexOf(character, i + 1));\n currentRule += textInQuotes;\n\n // Jump to the closing quote char\n i += textInQuotes.length;\n } else {\n currentRule += character;\n\n if (character === '}') {\n closedCurlyBrackets++;\n if (closedCurlyBrackets === openedCurlyBrackets) {\n closedCurlyBrackets = 0;\n openedCurlyBrackets = 0;\n result.push(currentRule);\n currentRule = '';\n }\n } else if (character === '{') {\n openedCurlyBrackets++;\n }\n }\n }\n // Add comments added after last valid rule.\n if (currentRule !== '') {\n result.push(currentRule);\n }\n\n return result;\n }\n}\n\nfunction generateTheme(theme, name, nonce) {\n var head = document.head;\n var firstChild = head ? head.firstElementChild : null;\n\n if (!GENERATED[name]) {\n // For each theme, use the color palettes specified for\n // `primary`, `warn` and `accent` to generate CSS rules.\n THEME_COLOR_TYPES.forEach(function(colorType) {\n var styleStrings = parseRules(theme, colorType, rulesByType[colorType]);\n while (styleStrings.length) {\n var styleContent = styleStrings.shift();\n if (styleContent) {\n var style = document.createElement('style');\n style.setAttribute('md-theme-style', '');\n if (nonce) {\n style.setAttribute('nonce', nonce);\n }\n style.appendChild(document.createTextNode(styleContent));\n head.insertBefore(style, firstChild);\n }\n }\n });\n\n GENERATED[theme.name] = true;\n }\n\n}\n\n\nfunction checkValidPalette(theme, colorType) {\n // If theme attempts to use a palette that doesnt exist, throw error\n if (!PALETTES[ (theme.colors[colorType] || {}).name ]) {\n throw new Error(\n \"You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3\"\n .replace('%1', theme.name)\n .replace('%2', colorType)\n .replace('%3', Object.keys(PALETTES).join(', '))\n );\n }\n}\n\n/**\n * @param {string} clr rbg or rgba color\n * @return {number[]|undefined} [red, green, blue] array if it can be computed\n */\nfunction colorToRgbaArray(clr) {\n if (angular.isArray(clr) && clr.length === 3) return clr;\n if (/^rgb/.test(clr)) {\n return clr.replace(/(^\\s*rgba?\\(|\\)\\s*$)/g, '').split(',').map(function(value, i) {\n return i === 3 ? parseFloat(value) : parseInt(value, 10);\n });\n }\n if (clr.charAt(0) === '#') clr = clr.substring(1);\n if (!/^([a-fA-F0-9]{3}){1,2}$/g.test(clr)) return;\n\n var dig = clr.length / 3;\n var red = clr.substr(0, dig);\n var grn = clr.substr(dig, dig);\n var blu = clr.substr(dig * 2);\n if (dig === 1) {\n red += red;\n grn += grn;\n blu += blu;\n }\n return [parseInt(red, 16), parseInt(grn, 16), parseInt(blu, 16)];\n}\n\nfunction rgba(rgbArray, opacity) {\n if (!rgbArray) return \"rgb('0,0,0')\";\n\n if (rgbArray.length === 4) {\n rgbArray = angular.copy(rgbArray);\n opacity ? rgbArray.pop() : opacity = rgbArray.pop();\n }\n return opacity && (typeof opacity == 'number' || (typeof opacity == 'string' && opacity.length)) ?\n 'rgba(' + rgbArray.join(',') + ',' + opacity + ')' :\n 'rgb(' + rgbArray.join(',') + ')';\n}\n\n\n})(window.angular);\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.autocomplete\n */\n/*\n * @see js folder for autocomplete implementation\n */\nangular.module('material.components.autocomplete', [\n 'material.core',\n 'material.components.icon',\n 'material.components.virtualRepeat'\n]);\n\n})();\n(function(){\n\"use strict\";\n\n\nMdAutocompleteCtrl.$inject = [\"$scope\", \"$element\", \"$mdUtil\", \"$mdConstant\", \"$mdTheming\", \"$window\", \"$animate\", \"$rootElement\", \"$attrs\", \"$q\", \"$log\", \"$mdLiveAnnouncer\"];angular\n .module('material.components.autocomplete')\n .controller('MdAutocompleteCtrl', MdAutocompleteCtrl);\n\nvar ITEM_HEIGHT = 48,\n MAX_ITEMS = 5,\n MENU_PADDING = 8,\n INPUT_PADDING = 2, // Padding provided by `md-input-container`\n MODE_STANDARD = 'standard',\n MODE_VIRTUAL = 'virtual';\n\nfunction MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming, $window,\n $animate, $rootElement, $attrs, $q, $log, $mdLiveAnnouncer) {\n\n // Internal Variables.\n var ctrl = this,\n itemParts = $scope.itemsExpr.split(/ in /i),\n itemExpr = itemParts[ 1 ],\n elements = null,\n cache = {},\n noBlur = false,\n selectedItemWatchers = [],\n hasFocus = false,\n fetchesInProgress = 0,\n enableWrapScroll = null,\n inputModelCtrl = null,\n debouncedOnResize = $mdUtil.debounce(onWindowResize),\n mode = MODE_VIRTUAL; // default\n\n /**\n * The root document element. This is used for attaching a top-level click handler to\n * close the options panel when a click outside said panel occurs. We use `documentElement`\n * instead of body because, when scrolling is disabled, some browsers consider the body element\n * to be completely off the screen and propagate events directly to the html element.\n * @type {!Object} angular.JQLite\n */\n ctrl.documentElement = angular.element(document.documentElement);\n\n // Public Exported Variables with handlers\n defineProperty('hidden', handleHiddenChange, true);\n\n // Public Exported Variables\n ctrl.scope = $scope;\n ctrl.parent = $scope.$parent;\n ctrl.itemName = itemParts[0];\n ctrl.matches = [];\n ctrl.loading = false;\n ctrl.hidden = true;\n ctrl.index = -1;\n ctrl.activeOption = null;\n ctrl.id = $mdUtil.nextUid();\n ctrl.isDisabled = null;\n ctrl.isRequired = null;\n ctrl.isReadonly = null;\n ctrl.hasNotFound = false;\n ctrl.selectedMessage = $scope.selectedMessage || 'selected';\n ctrl.noMatchMessage = $scope.noMatchMessage || 'There are no matches available.';\n ctrl.singleMatchMessage = $scope.singleMatchMessage || 'There is 1 match available.';\n ctrl.multipleMatchStartMessage = $scope.multipleMatchStartMessage || 'There are ';\n ctrl.multipleMatchEndMessage = $scope.multipleMatchEndMessage || ' matches available.';\n ctrl.defaultEscapeOptions = 'clear';\n\n // Public Exported Methods\n ctrl.keydown = keydown;\n ctrl.blur = blur;\n ctrl.focus = focus;\n ctrl.clear = clearValue;\n ctrl.select = select;\n ctrl.listEnter = onListEnter;\n ctrl.listLeave = onListLeave;\n ctrl.focusInput = focusInputElement;\n ctrl.getCurrentDisplayValue = getCurrentDisplayValue;\n ctrl.registerSelectedItemWatcher = registerSelectedItemWatcher;\n ctrl.unregisterSelectedItemWatcher = unregisterSelectedItemWatcher;\n ctrl.notFoundVisible = notFoundVisible;\n ctrl.loadingIsVisible = loadingIsVisible;\n ctrl.positionDropdown = positionDropdown;\n\n /**\n * Report types to be used for the $mdLiveAnnouncer\n * @enum {number} Unique flag id.\n */\n var ReportType = {\n Count: 1,\n Selected: 2\n };\n\n return init();\n\n // initialization methods\n\n /**\n * Initialize the controller, setup watchers, gather elements\n */\n function init () {\n\n $mdUtil.initOptionalProperties($scope, $attrs, {\n searchText: '',\n selectedItem: null,\n clearButton: false,\n disableVirtualRepeat: false,\n });\n\n $mdTheming($element);\n configureWatchers();\n $mdUtil.nextTick(function () {\n\n gatherElements();\n moveDropdown();\n\n // Touch devices often do not send a click event on tap. We still want to focus the input\n // and open the options pop-up in these cases.\n $element.on('touchstart', focusInputElement);\n\n // Forward all focus events to the input element when autofocus is enabled\n if ($scope.autofocus) {\n $element.on('focus', focusInputElement);\n }\n if ($scope.inputAriaDescribedBy) {\n elements.input.setAttribute('aria-describedby', $scope.inputAriaDescribedBy);\n }\n if (!$scope.floatingLabel) {\n if ($scope.inputAriaLabel) {\n elements.input.setAttribute('aria-label', $scope.inputAriaLabel);\n } else if ($scope.inputAriaLabelledBy) {\n elements.input.setAttribute('aria-labelledby', $scope.inputAriaLabelledBy);\n } else if ($scope.placeholder) {\n // If no aria-label or aria-labelledby references are defined, then just label using the\n // placeholder.\n elements.input.setAttribute('aria-label', $scope.placeholder);\n }\n }\n });\n }\n\n function updateModelValidators() {\n if (!$scope.requireMatch || !inputModelCtrl) return;\n\n inputModelCtrl.$setValidity('md-require-match', !!$scope.selectedItem || !$scope.searchText);\n }\n\n /**\n * Calculates the dropdown's position and applies the new styles to the menu element\n * @returns {*}\n */\n function positionDropdown () {\n if (!elements) {\n return $mdUtil.nextTick(positionDropdown, false, $scope);\n }\n\n var dropdownHeight = ($scope.dropdownItems || MAX_ITEMS) * ITEM_HEIGHT;\n var hrect = elements.wrap.getBoundingClientRect(),\n vrect = elements.snap.getBoundingClientRect(),\n root = elements.root.getBoundingClientRect(),\n top = vrect.bottom - root.top,\n bot = root.bottom - vrect.top,\n left = hrect.left - root.left,\n width = hrect.width,\n offset = getVerticalOffset(),\n position = $scope.dropdownPosition,\n styles, enoughBottomSpace, enoughTopSpace;\n var bottomSpace = root.bottom - vrect.bottom - MENU_PADDING + $mdUtil.getViewportTop();\n var topSpace = vrect.top - MENU_PADDING;\n\n // Automatically determine dropdown placement based on available space in viewport.\n if (!position) {\n enoughTopSpace = topSpace > dropdownHeight;\n enoughBottomSpace = bottomSpace > dropdownHeight;\n if (enoughBottomSpace) {\n position = 'bottom';\n } else if (enoughTopSpace) {\n position = 'top';\n } else {\n position = topSpace > bottomSpace ? 'top' : 'bottom';\n }\n }\n // Adjust the width to account for the padding provided by `md-input-container`\n if ($attrs.mdFloatingLabel) {\n left += INPUT_PADDING;\n width -= INPUT_PADDING * 2;\n }\n styles = {\n left: left + 'px',\n minWidth: width + 'px',\n maxWidth: Math.max(hrect.right - root.left, root.right - hrect.left) - MENU_PADDING + 'px'\n };\n\n if (position === 'top') {\n styles.top = 'auto';\n styles.bottom = bot + 'px';\n styles.maxHeight = Math.min(dropdownHeight, topSpace) + 'px';\n } else {\n bottomSpace = root.bottom - hrect.bottom - MENU_PADDING + $mdUtil.getViewportTop();\n\n styles.top = (top - offset) + 'px';\n styles.bottom = 'auto';\n styles.maxHeight = Math.min(dropdownHeight, bottomSpace) + 'px';\n }\n\n elements.$.scrollContainer.css(styles);\n $mdUtil.nextTick(correctHorizontalAlignment, false, $scope);\n\n /**\n * Calculates the vertical offset for floating label examples to account for ngMessages\n * @returns {number}\n */\n function getVerticalOffset () {\n var offset = 0;\n var inputContainer = $element.find('md-input-container');\n if (inputContainer.length) {\n var input = inputContainer.find('input');\n offset = inputContainer.prop('offsetHeight');\n offset -= input.prop('offsetTop');\n offset -= input.prop('offsetHeight');\n // add in the height left up top for the floating label text\n offset += inputContainer.prop('offsetTop');\n }\n return offset;\n }\n\n /**\n * Makes sure that the menu doesn't go off of the screen on either side.\n */\n function correctHorizontalAlignment () {\n var dropdown = elements.scrollContainer.getBoundingClientRect(),\n styles = {};\n if (dropdown.right > root.right) {\n styles.left = (hrect.right - dropdown.width) + 'px';\n }\n elements.$.scrollContainer.css(styles);\n }\n }\n\n /**\n * Moves the dropdown menu to the body tag in order to avoid z-index and overflow issues.\n */\n function moveDropdown () {\n if (!elements.$.root.length) return;\n $mdTheming(elements.$.scrollContainer);\n elements.$.scrollContainer.detach();\n elements.$.root.append(elements.$.scrollContainer);\n if ($animate.pin) $animate.pin(elements.$.scrollContainer, $rootElement);\n }\n\n /**\n * Sends focus to the input element.\n */\n function focusInputElement () {\n elements.input.focus();\n }\n\n /**\n * Update the activeOption based on the selected item in the listbox.\n * The activeOption is used in the template to set the aria-activedescendant attribute, which\n * enables screen readers to properly handle visual focus within the listbox and announce the\n * item's place in the list. I.e. \"List item 3 of 50\". Anytime that `ctrl.index` changes, this\n * function needs to be called to update the activeOption.\n */\n function updateActiveOption() {\n var selectedOption = elements.scroller.querySelector('.selected');\n if (selectedOption) {\n ctrl.activeOption = selectedOption.id;\n } else {\n ctrl.activeOption = null;\n }\n }\n\n /**\n * Sets up any watchers used by autocomplete\n */\n function configureWatchers () {\n var wait = parseInt($scope.delay, 10) || 0;\n\n $attrs.$observe('disabled', function (value) { ctrl.isDisabled = $mdUtil.parseAttributeBoolean(value, false); });\n $attrs.$observe('required', function (value) { ctrl.isRequired = $mdUtil.parseAttributeBoolean(value, false); });\n $attrs.$observe('readonly', function (value) { ctrl.isReadonly = $mdUtil.parseAttributeBoolean(value, false); });\n\n $scope.$watch('searchText', wait ? $mdUtil.debounce(handleSearchText, wait) : handleSearchText);\n $scope.$watch('selectedItem', selectedItemChange);\n\n angular.element($window).on('resize', debouncedOnResize);\n\n $scope.$on('$destroy', cleanup);\n }\n\n /**\n * Removes any events or leftover elements created by this controller\n */\n function cleanup () {\n if (!ctrl.hidden) {\n $mdUtil.enableScrolling();\n }\n\n angular.element($window).off('resize', debouncedOnResize);\n\n if (elements){\n var items = ['ul', 'scroller', 'scrollContainer', 'input'];\n angular.forEach(items, function(key){\n elements.$[key].remove();\n });\n }\n }\n\n /**\n * Event handler to be called whenever the window resizes.\n */\n function onWindowResize() {\n if (!ctrl.hidden) {\n positionDropdown();\n }\n }\n\n /**\n * Gathers all of the elements needed for this controller\n */\n function gatherElements () {\n\n var snapWrap = gatherSnapWrap();\n\n elements = {\n main: $element[0],\n scrollContainer: $element[0].querySelector('.md-virtual-repeat-container, .md-standard-list-container'),\n scroller: $element[0].querySelector('.md-virtual-repeat-scroller, .md-standard-list-scroller'),\n ul: $element.find('ul')[0],\n input: $element.find('input')[0],\n wrap: snapWrap.wrap,\n snap: snapWrap.snap,\n root: document.body,\n };\n\n elements.li = elements.ul.getElementsByTagName('li');\n elements.$ = getAngularElements(elements);\n mode = elements.scrollContainer.classList.contains('md-standard-list-container') ? MODE_STANDARD : MODE_VIRTUAL;\n inputModelCtrl = elements.$.input.controller('ngModel');\n }\n\n /**\n * Gathers the snap and wrap elements\n *\n */\n function gatherSnapWrap() {\n var element;\n var value;\n for (element = $element; element.length; element = element.parent()) {\n value = element.attr('md-autocomplete-snap');\n if (angular.isDefined(value)) break;\n }\n\n if (element.length) {\n return {\n snap: element[0],\n wrap: (value.toLowerCase() === 'width') ? element[0] : $element.find('md-autocomplete-wrap')[0]\n };\n }\n\n var wrap = $element.find('md-autocomplete-wrap')[0];\n return {\n snap: wrap,\n wrap: wrap\n };\n }\n\n /**\n * Gathers angular-wrapped versions of each element\n * @param elements\n * @returns {{}}\n */\n function getAngularElements (elements) {\n var obj = {};\n for (var key in elements) {\n if (elements.hasOwnProperty(key)) obj[ key ] = angular.element(elements[ key ]);\n }\n return obj;\n }\n\n // event/change handlers\n\n /**\n * @param {Event} $event\n */\n function preventDefault($event) {\n $event.preventDefault();\n }\n\n /**\n * @param {Event} $event\n */\n function stopPropagation($event) {\n $event.stopPropagation();\n }\n\n /**\n * Handles changes to the `hidden` property.\n * @param {boolean} hidden true to hide the options pop-up, false to show it.\n * @param {boolean} oldHidden the previous value of hidden\n */\n function handleHiddenChange (hidden, oldHidden) {\n var scrollContainerElement;\n\n if (elements) {\n scrollContainerElement = angular.element(elements.scrollContainer);\n }\n if (!hidden && oldHidden) {\n positionDropdown();\n\n // Report in polite mode, because the screen reader should finish the default description of\n // the input element.\n reportMessages(true, ReportType.Count | ReportType.Selected);\n\n if (elements) {\n $mdUtil.disableScrollAround(elements.scrollContainer);\n enableWrapScroll = disableElementScrollEvents(elements.wrap);\n if ($mdUtil.isIos) {\n ctrl.documentElement.on('touchend', handleTouchOutsidePanel);\n if (scrollContainerElement) {\n scrollContainerElement.on('touchstart touchmove touchend', stopPropagation);\n }\n }\n ctrl.index = getDefaultIndex();\n $mdUtil.nextTick(function() {\n updateActiveOption();\n updateScroll();\n });\n }\n } else if (hidden && !oldHidden) {\n if ($mdUtil.isIos) {\n ctrl.documentElement.off('touchend', handleTouchOutsidePanel);\n if (scrollContainerElement) {\n scrollContainerElement.off('touchstart touchmove touchend', stopPropagation);\n }\n }\n $mdUtil.enableScrolling();\n\n if (enableWrapScroll) {\n enableWrapScroll();\n enableWrapScroll = null;\n }\n }\n }\n\n /**\n * Handling touch events that bubble up to the document is required for closing the dropdown\n * panel on touch outside of the options pop-up panel on iOS.\n * @param {Event} $event\n */\n function handleTouchOutsidePanel($event) {\n ctrl.hidden = true;\n // iOS does not blur the pop-up for touches on the scroll mask, so we have to do it.\n doBlur(true);\n }\n\n /**\n * Disables scrolling for a specific element.\n * @param {!string|!DOMElement} element to disable scrolling\n * @return {Function} function to call to re-enable scrolling for the element\n */\n function disableElementScrollEvents(element) {\n var elementToDisable = angular.element(element);\n elementToDisable.on('wheel touchmove', preventDefault);\n\n return function() {\n elementToDisable.off('wheel touchmove', preventDefault);\n };\n }\n\n /**\n * When the user mouses over the dropdown menu, ignore blur events.\n */\n function onListEnter () {\n noBlur = true;\n }\n\n /**\n * When the user's mouse leaves the menu, blur events may hide the menu again.\n */\n function onListLeave () {\n if (!hasFocus && !ctrl.hidden) elements.input.focus();\n noBlur = false;\n ctrl.hidden = shouldHide();\n }\n\n /**\n * Handles changes to the selected item.\n * @param selectedItem\n * @param previousSelectedItem\n */\n function selectedItemChange (selectedItem, previousSelectedItem) {\n\n updateModelValidators();\n\n if (selectedItem) {\n getDisplayValue(selectedItem).then(function (val) {\n $scope.searchText = val;\n handleSelectedItemChange(selectedItem, previousSelectedItem);\n });\n } else if (previousSelectedItem && $scope.searchText) {\n getDisplayValue(previousSelectedItem).then(function(displayValue) {\n // Clear the searchText, when the selectedItem is set to null.\n // Do not clear the searchText, when the searchText isn't matching with the previous\n // selected item.\n if (angular.isString($scope.searchText)\n && displayValue.toString().toLowerCase() === $scope.searchText.toLowerCase()) {\n $scope.searchText = '';\n }\n });\n }\n\n if (selectedItem !== previousSelectedItem) {\n announceItemChange();\n }\n }\n\n /**\n * Use the user-defined expression to announce changes each time a new item is selected\n */\n function announceItemChange () {\n angular.isFunction($scope.itemChange) &&\n $scope.itemChange(getItemAsNameVal($scope.selectedItem));\n }\n\n /**\n * Use the user-defined expression to announce changes each time the search text is changed\n */\n function announceTextChange () {\n angular.isFunction($scope.textChange) && $scope.textChange();\n }\n\n /**\n * Calls any external watchers listening for the selected item. Used in conjunction with\n * `registerSelectedItemWatcher`.\n * @param selectedItem\n * @param previousSelectedItem\n */\n function handleSelectedItemChange (selectedItem, previousSelectedItem) {\n selectedItemWatchers.forEach(function (watcher) {\n watcher(selectedItem, previousSelectedItem);\n });\n }\n\n /**\n * Register a function to be called when the selected item changes.\n * @param cb\n */\n function registerSelectedItemWatcher (cb) {\n if (selectedItemWatchers.indexOf(cb) === -1) {\n selectedItemWatchers.push(cb);\n }\n }\n\n /**\n * Unregister a function previously registered for selected item changes.\n * @param cb\n */\n function unregisterSelectedItemWatcher (cb) {\n var i = selectedItemWatchers.indexOf(cb);\n if (i !== -1) {\n selectedItemWatchers.splice(i, 1);\n }\n }\n\n /**\n * Handles changes to the searchText property.\n * @param {string} searchText\n * @param {string} previousSearchText\n */\n function handleSearchText (searchText, previousSearchText) {\n ctrl.index = getDefaultIndex();\n\n // do nothing on init\n if (searchText === previousSearchText) return;\n\n updateModelValidators();\n\n getDisplayValue($scope.selectedItem).then(function (val) {\n // clear selected item if search text no longer matches it\n if (searchText !== val) {\n $scope.selectedItem = null;\n\n // trigger change event if available\n if (searchText !== previousSearchText) {\n announceTextChange();\n }\n\n // cancel results if search text is not long enough\n if (!isMinLengthMet()) {\n ctrl.matches = [];\n\n setLoading(false);\n reportMessages(true, ReportType.Count);\n\n } else {\n handleQuery();\n }\n }\n });\n\n }\n\n /**\n * Handles input blur event, determines if the dropdown should hide.\n * @param {Event=} $event\n */\n function blur($event) {\n hasFocus = false;\n\n if (!noBlur) {\n ctrl.hidden = shouldHide();\n evalAttr('ngBlur', { $event: $event });\n } else if (angular.isObject($event)) {\n $event.stopImmediatePropagation();\n }\n }\n\n /**\n * Force blur on input element\n * @param {boolean} forceBlur\n */\n function doBlur(forceBlur) {\n if (forceBlur) {\n noBlur = false;\n hasFocus = false;\n }\n elements.input.blur();\n }\n\n /**\n * Handles input focus event, determines if the dropdown should show.\n */\n function focus($event) {\n hasFocus = true;\n\n if (isSearchable() && isMinLengthMet()) {\n handleQuery();\n }\n\n ctrl.hidden = shouldHide();\n\n evalAttr('ngFocus', { $event: $event });\n }\n\n /**\n * Handles keyboard input.\n * @param event\n */\n function keydown (event) {\n switch (event.keyCode) {\n case $mdConstant.KEY_CODE.DOWN_ARROW:\n if (ctrl.loading || hasSelection()) return;\n event.stopPropagation();\n event.preventDefault();\n ctrl.index = ctrl.index + 1 > ctrl.matches.length - 1 ? 0 : Math.min(ctrl.index + 1, ctrl.matches.length - 1);\n $mdUtil.nextTick(updateActiveOption);\n updateScroll();\n break;\n case $mdConstant.KEY_CODE.UP_ARROW:\n if (ctrl.loading || hasSelection()) return;\n event.stopPropagation();\n event.preventDefault();\n ctrl.index = ctrl.index - 1 < 0 ? ctrl.matches.length - 1 : Math.max(0, ctrl.index - 1);\n $mdUtil.nextTick(updateActiveOption);\n updateScroll();\n break;\n case $mdConstant.KEY_CODE.TAB:\n // If we hit tab, assume that we've left the list so it will close\n onListLeave();\n\n if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return;\n select(ctrl.index);\n break;\n case $mdConstant.KEY_CODE.ENTER:\n if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return;\n if (hasSelection()) return;\n event.stopImmediatePropagation();\n event.preventDefault();\n select(ctrl.index);\n break;\n case $mdConstant.KEY_CODE.ESCAPE:\n event.preventDefault(); // Prevent browser from always clearing input\n if (!shouldProcessEscape()) return;\n event.stopPropagation();\n\n clearSelectedItem();\n if ($scope.searchText && hasEscapeOption('clear')) {\n clearSearchText();\n }\n\n // Manually hide (needed for mdNotFound support)\n ctrl.hidden = true;\n\n if (hasEscapeOption('blur')) {\n // Force the component to blur if they hit escape\n doBlur(true);\n }\n\n break;\n default:\n }\n }\n\n // getters\n\n /**\n * Returns the minimum length needed to display the dropdown.\n * @returns {*}\n */\n function getMinLength () {\n return angular.isNumber($scope.minLength) ? $scope.minLength : 1;\n }\n\n /**\n * Returns the display value for an item.\n * @param {*} item\n * @returns {*}\n */\n function getDisplayValue (item) {\n return $q.when(getItemText(item) || item).then(function(itemText) {\n if (itemText && !angular.isString(itemText)) {\n $log.warn('md-autocomplete: Could not resolve display value to a string. ' +\n 'Please check the `md-item-text` attribute.');\n }\n\n return itemText;\n });\n\n /**\n * Getter function to invoke user-defined expression (in the directive)\n * to convert your object to a single string.\n * @param {*} item\n * @returns {string|null}\n */\n function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }\n }\n\n /**\n * Returns the locals object for compiling item templates.\n * @param {*} item\n * @returns {Object|undefined}\n */\n function getItemAsNameVal (item) {\n if (!item) {\n return undefined;\n }\n\n var locals = {};\n if (ctrl.itemName) {\n locals[ ctrl.itemName ] = item;\n }\n\n return locals;\n }\n\n /**\n * Returns the default index based on whether or not autoselect is enabled.\n * @returns {number} 0 if autoselect is enabled, -1 if not.\n */\n function getDefaultIndex () {\n return $scope.autoselect ? 0 : -1;\n }\n\n /**\n * Sets the loading parameter and updates the hidden state.\n * @param value {boolean} Whether or not the component is currently loading.\n */\n function setLoading(value) {\n if (ctrl.loading !== value) {\n ctrl.loading = value;\n }\n\n // Always refresh the hidden variable as something else might have changed\n ctrl.hidden = shouldHide();\n }\n\n /**\n * Determines if the menu should be hidden.\n * @returns {boolean} true if the menu should be hidden\n */\n function shouldHide () {\n return !shouldShow();\n }\n\n /**\n * Determines whether the autocomplete is able to query within the current state.\n * @returns {boolean} true if the query can be run\n */\n function isSearchable() {\n if (ctrl.loading && !hasMatches()) {\n // No query when query is in progress.\n return false;\n } else if (hasSelection()) {\n // No query if there is already a selection\n return false;\n }\n else if (!hasFocus) {\n // No query if the input does not have focus\n return false;\n }\n return true;\n }\n\n /**\n * @returns {boolean} if the escape keydown should be processed, return true.\n * Otherwise return false.\n */\n function shouldProcessEscape() {\n return hasEscapeOption('blur') || !ctrl.hidden || ctrl.loading || hasEscapeOption('clear') && $scope.searchText;\n }\n\n /**\n * @param {string} option check if this option is set\n * @returns {boolean} if the specified escape option is set, return true. Return false otherwise.\n */\n function hasEscapeOption(option) {\n if (!angular.isString($scope.escapeOptions)) {\n return ctrl.defaultEscapeOptions.indexOf(option) !== -1;\n } else {\n return $scope.escapeOptions.toLowerCase().indexOf(option) !== -1;\n }\n }\n\n /**\n * Determines if the menu should be shown.\n * @returns {boolean} true if the menu should be shown\n */\n function shouldShow() {\n if (ctrl.isReadonly) {\n // Don't show if read only is set\n return false;\n } else if (!isSearchable()) {\n // Don't show if a query is in progress, there is already a selection,\n // or the input is not focused.\n return false;\n }\n return (isMinLengthMet() && hasMatches()) || notFoundVisible();\n }\n\n /**\n * @returns {boolean} true if the search text has matches.\n */\n function hasMatches() {\n return ctrl.matches.length ? true : false;\n }\n\n /**\n * @returns {boolean} true if the autocomplete has a valid selection.\n */\n function hasSelection() {\n return ctrl.scope.selectedItem ? true : false;\n }\n\n /**\n * @returns {boolean} true if the loading indicator is, or should be, visible.\n */\n function loadingIsVisible() {\n return ctrl.loading && !hasSelection();\n }\n\n /**\n * @returns {*} the display value of the current item.\n */\n function getCurrentDisplayValue () {\n return getDisplayValue(ctrl.matches[ ctrl.index ]);\n }\n\n /**\n * Determines if the minimum length is met by the search text.\n * @returns {*} true if the minimum length is met by the search text\n */\n function isMinLengthMet () {\n return ($scope.searchText || '').length >= getMinLength();\n }\n\n // actions\n\n /**\n * Defines a public property with a handler and a default value.\n * @param {string} key\n * @param {Function} handler function\n * @param {*} defaultValue default value\n */\n function defineProperty (key, handler, defaultValue) {\n Object.defineProperty(ctrl, key, {\n get: function () { return defaultValue; },\n set: function (newValue) {\n var oldValue = defaultValue;\n defaultValue = newValue;\n handler(newValue, oldValue);\n }\n });\n }\n\n /**\n * Selects the item at the given index.\n * @param {number} index to select\n */\n function select (index) {\n // force form to update state for validation\n $mdUtil.nextTick(function () {\n getDisplayValue(ctrl.matches[ index ]).then(function (val) {\n var ngModel = elements.$.input.controller('ngModel');\n $mdLiveAnnouncer.announce(val + ' ' + ctrl.selectedMessage, 'assertive');\n ngModel.$setViewValue(val);\n ngModel.$render();\n }).finally(function () {\n $scope.selectedItem = ctrl.matches[ index ];\n setLoading(false);\n });\n }, false);\n }\n\n /**\n * Clears the searchText value and selected item.\n * @param {Event} $event\n */\n function clearValue ($event) {\n if ($event) {\n $event.stopPropagation();\n }\n clearSelectedItem();\n clearSearchText();\n }\n\n /**\n * Clears the selected item\n */\n function clearSelectedItem () {\n // Reset our variables\n ctrl.index = -1;\n $mdUtil.nextTick(updateActiveOption);\n ctrl.matches = [];\n }\n\n /**\n * Clears the searchText value\n */\n function clearSearchText () {\n // Set the loading to true so we don't see flashes of content.\n // The flashing will only occur when an async request is running.\n // So the loading process will stop when the results had been retrieved.\n setLoading(true);\n\n $scope.searchText = '';\n\n // Normally, triggering the change / input event is unnecessary, because the browser detects it properly.\n // But some browsers are not detecting it properly, which means that we have to trigger the event.\n // Using the `input` is not working properly, because for example IE11 is not supporting the `input` event.\n // The `change` event is a good alternative and is supported by all supported browsers.\n var eventObj = document.createEvent('CustomEvent');\n eventObj.initCustomEvent('change', true, true, { value: '' });\n elements.input.dispatchEvent(eventObj);\n\n // For some reason, firing the above event resets the value of $scope.searchText if\n // $scope.searchText has a space character at the end, so we blank it one more time and then\n // focus.\n elements.input.blur();\n $scope.searchText = '';\n elements.input.focus();\n }\n\n /**\n * Fetches the results for the provided search text.\n * @param searchText\n */\n function fetchResults (searchText) {\n var items = $scope.$parent.$eval(itemExpr),\n term = searchText.toLowerCase(),\n isList = angular.isArray(items),\n isPromise = !!items.then; // Every promise should contain a `then` property\n\n if (isList) onResultsRetrieved(items);\n else if (isPromise) handleAsyncResults(items);\n\n function handleAsyncResults(items) {\n if (!items) return;\n\n items = $q.when(items);\n fetchesInProgress++;\n setLoading(true);\n\n $mdUtil.nextTick(function () {\n items\n .then(onResultsRetrieved)\n .finally(function(){\n if (--fetchesInProgress === 0) {\n setLoading(false);\n }\n });\n },true, $scope);\n }\n\n function onResultsRetrieved(matches) {\n cache[term] = matches;\n\n // Just cache the results if the request is now outdated.\n // The request becomes outdated, when the new searchText has changed during the result fetching.\n if ((searchText || '') !== ($scope.searchText || '')) {\n return;\n }\n\n handleResults(matches);\n }\n }\n\n\n /**\n * Reports given message types to supported screen readers.\n * @param {boolean} isPolite Whether the announcement should be polite.\n * @param {!number} types Message flags to be reported to the screen reader.\n */\n function reportMessages(isPolite, types) {\n var politeness = isPolite ? 'polite' : 'assertive';\n var messages = [];\n\n if (types & ReportType.Selected && ctrl.index !== -1) {\n messages.push(getCurrentDisplayValue());\n }\n\n if (types & ReportType.Count) {\n messages.push($q.resolve(getCountMessage()));\n }\n\n $q.all(messages).then(function(data) {\n $mdLiveAnnouncer.announce(data.join(' '), politeness);\n });\n }\n\n /**\n * @returns {string} the ARIA message for how many results match the current query.\n */\n function getCountMessage () {\n switch (ctrl.matches.length) {\n case 0:\n return ctrl.noMatchMessage;\n case 1:\n return ctrl.singleMatchMessage;\n default:\n return ctrl.multipleMatchStartMessage + ctrl.matches.length + ctrl.multipleMatchEndMessage;\n }\n }\n\n /**\n * Makes sure that the focused element is within view.\n */\n function updateScroll () {\n if (!elements.li[0]) return;\n if (mode === MODE_STANDARD) {\n updateStandardScroll();\n } else {\n updateVirtualScroll();\n }\n }\n\n function updateVirtualScroll() {\n // elements in virtual scroll have consistent heights\n var optionHeight = elements.li[0].offsetHeight,\n top = optionHeight * Math.max(0, ctrl.index),\n bottom = top + optionHeight,\n containerHeight = elements.scroller.clientHeight,\n scrollTop = elements.scroller.scrollTop;\n\n if (top < scrollTop) {\n scrollTo(top);\n } else if (bottom > scrollTop + containerHeight) {\n scrollTo(bottom - containerHeight);\n }\n }\n\n function updateStandardScroll() {\n // elements in standard scroll have variable heights\n var selected = elements.li[Math.max(0, ctrl.index)];\n var containerHeight = elements.scrollContainer.offsetHeight,\n top = selected && selected.offsetTop || 0,\n bottom = top + selected.clientHeight,\n scrollTop = elements.scrollContainer.scrollTop;\n\n if (top < scrollTop) {\n scrollTo(top);\n } else if (bottom > scrollTop + containerHeight) {\n scrollTo(bottom - containerHeight);\n }\n }\n\n function isPromiseFetching() {\n return fetchesInProgress !== 0;\n }\n\n function scrollTo (offset) {\n if (mode === MODE_STANDARD) {\n elements.scrollContainer.scrollTop = offset;\n } else {\n elements.$.scrollContainer.controller('mdVirtualRepeatContainer').scrollTo(offset);\n }\n }\n\n function notFoundVisible () {\n var textLength = (ctrl.scope.searchText || '').length;\n\n return ctrl.hasNotFound && !hasMatches() && (!ctrl.loading || isPromiseFetching()) && textLength >= getMinLength() && (hasFocus || noBlur) && !hasSelection();\n }\n\n /**\n * Starts the query to gather the results for the current searchText. Attempts to return cached\n * results first, then forwards the process to `fetchResults` if necessary.\n */\n function handleQuery () {\n var searchText = $scope.searchText || '';\n var term = searchText.toLowerCase();\n\n // If caching is enabled and the current searchText is stored in the cache\n if (!$scope.noCache && cache[term]) {\n // The results should be handled as same as a normal un-cached request does.\n handleResults(cache[term]);\n } else {\n fetchResults(searchText);\n }\n\n ctrl.hidden = shouldHide();\n }\n\n /**\n * Handles the retrieved results by showing them in the autocompletes dropdown.\n * @param results Retrieved results\n */\n function handleResults(results) {\n ctrl.matches = results;\n ctrl.hidden = shouldHide();\n\n // If loading is in progress, then we'll end the progress. This is needed for example,\n // when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.\n if (ctrl.loading) setLoading(false);\n\n if ($scope.selectOnMatch) selectItemOnMatch();\n\n positionDropdown();\n reportMessages(true, ReportType.Count);\n }\n\n /**\n * If there is only one matching item and the search text matches its display value exactly,\n * automatically select that item. Note: This function is only called if the user uses the\n * `md-select-on-match` flag.\n */\n function selectItemOnMatch () {\n var searchText = $scope.searchText,\n matches = ctrl.matches,\n item = matches[ 0 ];\n if (matches.length === 1) getDisplayValue(item).then(function (displayValue) {\n var isMatching = searchText === displayValue;\n if ($scope.matchInsensitive && !isMatching) {\n isMatching = searchText.toLowerCase() === displayValue.toLowerCase();\n }\n\n if (isMatching) {\n select(0);\n }\n });\n }\n\n /**\n * Evaluates an attribute expression against the parent scope.\n * @param {String} attr Name of the attribute to be evaluated.\n * @param {Object?} locals Properties to be injected into the evaluation context.\n */\n function evalAttr(attr, locals) {\n if ($attrs[attr]) {\n $scope.$parent.$eval($attrs[attr], locals || {});\n }\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdAutocomplete.$inject = [\"$$mdSvgRegistry\"];angular\n .module('material.components.autocomplete')\n .directive('mdAutocomplete', MdAutocomplete);\n\n/**\n * @ngdoc directive\n * @name mdAutocomplete\n * @module material.components.autocomplete\n *\n * @description\n * `<md-autocomplete>` is a special input component with a drop-down of all possible matches to a\n * custom query. This component allows you to provide real-time suggestions as the user types\n * in the input area.\n *\n * To start, you will need to specify the required parameters and provide a template for your\n * results. The content inside `md-autocomplete` will be treated as a template.\n *\n * In more complex cases, you may want to include other content such as a message to display when\n * no matches were found. You can do this by wrapping your template in `md-item-template` and\n * adding a tag for `md-not-found`. An example of this is shown below.\n *\n * To reset the displayed value you must clear both values for `md-search-text` and\n * `md-selected-item`.\n *\n * ### Validation\n *\n * You can use `ng-messages` to include validation the same way that you would normally validate;\n * however, if you want to replicate a standard input with a floating label, you will have to\n * do the following:\n *\n * - Make sure that your template is wrapped in `md-item-template`\n * - Add your `ng-messages` code inside of `md-autocomplete`\n * - Add your validation properties to `md-autocomplete` (ie. `required`)\n * - Add a `name` to `md-autocomplete` (to be used on the generated `input`)\n *\n * There is an example below of how this should look.\n *\n * ### Snapping Drop-Down\n *\n * You can cause the autocomplete drop-down to snap to an ancestor element by applying the\n * `md-autocomplete-snap` attribute to that element. You can also snap to the width of\n * the `md-autocomplete-snap` element by setting the attribute's value to `width`\n * (ie. `md-autocomplete-snap=\"width\"`).\n *\n * ### Notes\n *\n * **Autocomplete Dropdown Items Rendering**\n *\n * The `md-autocomplete` uses the the <a ng-href=\"api/directive/mdVirtualRepeat\">\n * mdVirtualRepeat</a> directive for displaying the results inside of the dropdown.<br/>\n *\n * > When encountering issues regarding the item template please take a look at the\n * <a ng-href=\"api/directive/mdVirtualRepeatContainer\">VirtualRepeatContainer</a> documentation.\n *\n * **Autocomplete inside of a Virtual Repeat**\n *\n * When using the `md-autocomplete` directive inside of a\n * <a ng-href=\"api/directive/mdVirtualRepeatContainer\">VirtualRepeatContainer</a> the dropdown items\n * might not update properly, because caching of the results is enabled by default.\n *\n * The autocomplete will then show invalid dropdown items, because the Virtual Repeat only updates\n * the scope bindings rather than re-creating the `md-autocomplete`. This means that the previous\n * cached results will be used.\n *\n * > To avoid such problems, ensure that the autocomplete does not cache any results via\n * `md-no-cache=\"true\"`:\n *\n * <hljs lang=\"html\">\n * <md-autocomplete\n * md-no-cache=\"true\"\n * md-selected-item=\"selectedItem\"\n * md-items=\"item in items\"\n * md-search-text=\"searchText\"\n * md-item-text=\"item.display\">\n * <span>{{ item.display }}</span>\n * </md-autocomplete>\n * </hljs>\n *\n *\n * @param {expression} md-items An expression in the format of `item in results` to iterate over\n * matches for your search.<br/><br/>\n * The `results` expression can be also a function, which returns the results synchronously\n * or asynchronously (per Promise).\n * @param {expression=} md-selected-item-change An expression to be run each time a new item is\n * selected.\n * @param {expression=} md-search-text-change An expression to be run each time the search text\n * updates.\n * @param {expression=} md-search-text A model to bind the search query text to.\n * @param {object=} md-selected-item A model to bind the selected item to.\n * @param {expression=} md-item-text An expression that will convert your object to a single string.\n * @param {string=} placeholder Placeholder text that will be forwarded to the input.\n * @param {boolean=} md-no-cache Disables the internal caching that happens in autocomplete.\n * @param {boolean=} ng-disabled Determines whether or not to disable the input field.\n * @param {boolean=} md-require-match When set to true, the autocomplete will add a validator,\n * which will evaluate to false, when no item is currently selected.\n * @param {number=} md-min-length Specifies the minimum length of text before autocomplete will\n * make suggestions.\n * @param {number=} md-delay Specifies the amount of time (in milliseconds) to wait before looking\n * for results.\n * @param {boolean=} md-clear-button Whether the clear button for the autocomplete input should show\n * up or not. When `md-floating-label` is set, defaults to false, defaults to true otherwise.\n * @param {boolean=} md-autofocus If true, the autocomplete will be automatically focused when a\n * `$mdDialog`, `$mdBottomsheet` or `$mdSidenav`, which contains the autocomplete, is opening.\n * <br/><br/>\n * Also the autocomplete will immediately focus the input element.\n * @param {boolean=} md-no-asterisk When present, asterisk will not be appended to the floating\n * label.\n * @param {boolean=} md-autoselect If set to true, the first item will be automatically selected\n * in the dropdown upon open.\n * @param {string=} md-input-name The name attribute given to the input element to be used with\n * FormController.\n * @param {string=} md-menu-class This class will be applied to the dropdown menu for styling.\n * @param {string=} md-menu-container-class This class will be applied to the parent container\n * of the dropdown panel.\n * @param {string=} md-input-class This will be applied to the input for styling. This attribute\n * is only valid when a `md-floating-label` is defined.\n * @param {string=} md-floating-label This will add a floating label to autocomplete and wrap it in\n * `md-input-container`.\n * @param {string=} md-select-on-focus When present the input's text will be automatically selected\n * on focus.\n * @param {string=} md-input-id An ID to be added to the input element.\n * @param {number=} md-input-minlength The minimum length for the input's value for validation.\n * @param {number=} md-input-maxlength The maximum length for the input's value for validation.\n * @param {boolean=} md-select-on-match When set, autocomplete will automatically select\n * the item if the search text is an exact match. <br/><br/>\n * An exact match is when only one match is displayed.\n * @param {boolean=} md-match-case-insensitive When set and using `md-select-on-match`, autocomplete\n * will select on case-insensitive match.\n * @param {string=} md-escape-options Override escape key logic. Default is `clear`.<br/>\n * Options: `blur`, `clear`, `none`.\n * @param {string=} md-dropdown-items Specifies the maximum amount of items to be shown in\n * the dropdown.<br/><br/>\n * When the dropdown doesn't fit into the viewport, the dropdown will shrink\n * as much as possible.\n * @param {string=} md-dropdown-position Overrides the default dropdown position. Options: `top`,\n * `bottom`.\n * @param {string=} input-aria-describedby A space-separated list of element IDs. This should\n * contain the IDs of any elements that describe this autocomplete. Screen readers will read the\n * content of these elements at the end of announcing that the autocomplete has been selected\n * and describing its current state. The descriptive elements do not need to be visible on the\n * page.\n * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use case\n * is that this would contain the ID of a `<label>` element that is associated with this\n * autocomplete. This will only have affect when `md-floating-label` is not defined.<br><br>\n * For `<label id=\"state\">US State</label>`, you would set this to\n * `input-aria-labelledby=\"state\"`.\n * @param {string=} input-aria-label A label that will be applied to the autocomplete's input.\n * This will be announced by screen readers before the placeholder.\n * This will only have affect when `md-floating-label` is not defined. If you define both\n * `input-aria-label` and `input-aria-labelledby`, then `input-aria-label` will take precedence.\n * @param {string=} md-selected-message Attribute to specify the text that the screen reader will\n * announce after a value is selected. Default is: \"selected\". If `Alaska` is selected in the\n * options panel, it will read \"Alaska selected\". You will want to override this when your app\n * runs in a non-English locale.\n * @param {string=} md-no-match-message Attribute to specify the text that the screen reader will\n * announce after a query returns no matching results.\n * Default is: \"There are no matches available.\". You will want to override this when your app\n * runs in a non-English locale.\n * @param {string=} md-single-match-message Attribute to specify the text that the screen reader\n * will announce after a query returns a single matching result.\n * Default is: \"There is 1 match available.\". You will want to override this when your app\n * runs in a non-English locale.\n * @param {string=} md-multiple-match-start-message Attribute to specify the text that the screen\n * reader will announce after a query returns multiple matching results. The number of matching\n * results will be read after this text. Default is: \"There are \". You will want to override this\n * when your app runs in a non-English locale.\n * @param {string=} md-multiple-match-end-message Attribute to specify the text that the screen\n * reader will announce after a query returns multiple matching results. The number of matching\n * results will be read before this text. Default is: \" matches available.\". You will want to\n * override this when your app runs in a non-English locale.\n * @param {boolean=} ng-trim If set to false, the search text will be not trimmed automatically.\n * Defaults to true.\n * @param {string=} ng-pattern Adds the pattern validator to the ngModel of the search text.\n * See the [ngPattern Directive](https://docs.angularjs.org/api/ng/directive/ngPattern)\n * for more details.\n * @param {string=} md-mode Specify the repeat mode for suggestion lists. Acceptable values include\n * `virtual` (md-virtual-repeat) and `standard` (ng-repeat). See the\n * `Specifying Repeat Mode` example for mode details. Default is `virtual`.\n *\n * @usage\n * ### Basic Example\n * <hljs lang=\"html\">\n * <md-autocomplete\n * md-selected-item=\"selectedItem\"\n * md-search-text=\"searchText\"\n * md-items=\"item in getMatches(searchText)\"\n * md-item-text=\"item.display\">\n * <span md-highlight-text=\"searchText\">{{item.display}}</span>\n * </md-autocomplete>\n * </hljs>\n *\n * ### Example with \"not found\" message\n * <hljs lang=\"html\">\n * <md-autocomplete\n * md-selected-item=\"selectedItem\"\n * md-search-text=\"searchText\"\n * md-items=\"item in getMatches(searchText)\"\n * md-item-text=\"item.display\">\n * <md-item-template>\n * <span md-highlight-text=\"searchText\">{{item.display}}</span>\n * </md-item-template>\n * <md-not-found>\n * No matches found.\n * </md-not-found>\n * </md-autocomplete>\n * </hljs>\n *\n * In this example, our code utilizes `md-item-template` and `md-not-found` to specify the\n * different parts that make up our component.\n *\n * ### Clear button for the input\n * By default, the clear button is displayed when there is input. This aligns with the spec's\n * [Search Pattern](https://material.io/archive/guidelines/patterns/search.html#search-in-app-search).\n * In floating label mode, when `md-floating-label=\"My Label\"` is applied, the clear button is not\n * displayed by default (see the spec's\n * [Autocomplete Text Field](https://material.io/archive/guidelines/components/text-fields.html#text-fields-layout)).\n *\n * Nevertheless, developers are able to explicitly toggle the clear button for all autocomplete\n * components with `md-clear-button`.\n *\n * <hljs lang=\"html\">\n * <md-autocomplete ... md-clear-button=\"true\"></md-autocomplete>\n * <md-autocomplete ... md-clear-button=\"false\"></md-autocomplete>\n * </hljs>\n *\n * In previous versions, the clear button was always hidden when the component was disabled.\n * This changed in `1.1.5` to give the developer control of this behavior. This example\n * will hide the clear button only when the component is disabled.\n *\n * <hljs lang=\"html\">\n * <md-autocomplete ... ng-disabled=\"disabled\" md-clear-button=\"!disabled\"></md-autocomplete>\n * </hljs>\n *\n * ### Example with validation\n * <hljs lang=\"html\">\n * <form name=\"autocompleteForm\">\n * <md-autocomplete\n * required\n * md-input-name=\"autocomplete\"\n * md-selected-item=\"selectedItem\"\n * md-search-text=\"searchText\"\n * md-items=\"item in getMatches(searchText)\"\n * md-item-text=\"item.display\">\n * <md-item-template>\n * <span md-highlight-text=\"searchText\">{{item.display}}</span>\n * </md-item-template>\n * <div ng-messages=\"autocompleteForm.autocomplete.$error\">\n * <div ng-message=\"required\">This field is required</div>\n * </div>\n * </md-autocomplete>\n * </form>\n * </hljs>\n *\n * In this example, our code utilizes `md-item-template` and `ng-messages` to specify\n * input validation for the field.\n *\n * ### Asynchronous Results\n * The autocomplete items expression also supports promises, which will resolve with the query\n * results.\n *\n * <hljs lang=\"js\">\n * function AppController($scope, $http) {\n * $scope.query = function(searchText) {\n * return $http\n * .get(BACKEND_URL + '/items/' + searchText)\n * .then(function(data) {\n * // Map the response object to the data object.\n * return data;\n * });\n * };\n * }\n * </hljs>\n *\n * <hljs lang=\"html\">\n * <md-autocomplete\n * md-selected-item=\"selectedItem\"\n * md-search-text=\"searchText\"\n * md-items=\"item in query(searchText)\">\n * <md-item-template>\n * <span md-highlight-text=\"searchText\">{{item}}</span>\n * </md-item-template>\n * </md-autocomplete>\n * </hljs>\n *\n * ### Specifying Repeat Mode\n * You can use `md-mode` to specify whether to use standard or virtual lists for\n * rendering autocomplete options.\n * The `md-mode` accepts two values:\n * - `virtual` (default) Uses `md-virtual-repeat` to render list items. Virtual\n * mode requires you to have consistent heights for all suggestions.\n * - `standard` uses `ng-repeat` to render list items. This allows you to have\n * options of varying heights.\n *\n * Note that using 'standard' mode will require you to address any list\n * performance issues (e.g. pagination) separately within your application.\n *\n * <hljs lang=\"html\">\n * <md-autocomplete\n * md-selected-item=\"selectedItem\"\n * md-search-text=\"searchText\"\n * md-items=\"item in getMatches(searchText)\"\n * md-item-text=\"item.display\"\n * md-mode=\"standard\">\n * <span md-highlight-text=\"searchText\">{{item.display}}</span>\n * </md-autocomplete>\n * </hljs>\n */\nfunction MdAutocomplete ($$mdSvgRegistry) {\n var REPEAT_STANDARD = 'standard';\n var REPEAT_VIRTUAL = 'virtual';\n var REPEAT_MODES = [REPEAT_STANDARD, REPEAT_VIRTUAL];\n\n /** get a valid repeat mode from an md-mode attribute string. */\n function getRepeatMode(modeStr) {\n if (!modeStr) { return REPEAT_VIRTUAL; }\n modeStr = modeStr.toLowerCase();\n return REPEAT_MODES.indexOf(modeStr) > -1 ? modeStr : REPEAT_VIRTUAL;\n }\n\n return {\n controller: 'MdAutocompleteCtrl',\n controllerAs: '$mdAutocompleteCtrl',\n scope: {\n inputName: '@mdInputName',\n inputMinlength: '@mdInputMinlength',\n inputMaxlength: '@mdInputMaxlength',\n searchText: '=?mdSearchText',\n selectedItem: '=?mdSelectedItem',\n itemsExpr: '@mdItems',\n itemText: '&mdItemText',\n placeholder: '@placeholder',\n inputAriaDescribedBy: '@?inputAriaDescribedby',\n inputAriaLabelledBy: '@?inputAriaLabelledby',\n inputAriaLabel: '@?inputAriaLabel',\n noCache: '=?mdNoCache',\n requireMatch: '=?mdRequireMatch',\n selectOnMatch: '=?mdSelectOnMatch',\n matchInsensitive: '=?mdMatchCaseInsensitive',\n itemChange: '&?mdSelectedItemChange',\n textChange: '&?mdSearchTextChange',\n minLength: '=?mdMinLength',\n delay: '=?mdDelay',\n autofocus: '=?mdAutofocus',\n floatingLabel: '@?mdFloatingLabel',\n autoselect: '=?mdAutoselect',\n menuClass: '@?mdMenuClass',\n menuContainerClass: '@?mdMenuContainerClass',\n inputClass: '@?mdInputClass',\n inputId: '@?mdInputId',\n escapeOptions: '@?mdEscapeOptions',\n dropdownItems: '=?mdDropdownItems',\n dropdownPosition: '@?mdDropdownPosition',\n clearButton: '=?mdClearButton',\n selectedMessage: '@?mdSelectedMessage',\n noMatchMessage: '@?mdNoMatchMessage',\n singleMatchMessage: '@?mdSingleMatchMessage',\n multipleMatchStartMessage: '@?mdMultipleMatchStartMessage',\n multipleMatchEndMessage: '@?mdMultipleMatchEndMessage',\n mdMode: '=?mdMode'\n },\n compile: function(tElement, tAttrs) {\n var attributes = ['md-select-on-focus', 'md-no-asterisk', 'ng-trim', 'ng-pattern'];\n var input = tElement.find('input');\n\n attributes.forEach(function(attribute) {\n var attrValue = tAttrs[tAttrs.$normalize(attribute)];\n\n if (attrValue !== null) {\n input.attr(attribute, attrValue);\n }\n });\n\n return function(scope, element, attrs, ctrl) {\n // Retrieve the state of using a md-not-found template by using our attribute, which will\n // be added to the element in the template function.\n ctrl.hasNotFound = !!element.attr('md-has-not-found');\n\n // By default the inset autocomplete should show the clear button when not explicitly\n // overwritten or in floating label mode.\n if (!angular.isDefined(attrs.mdClearButton) && !scope.floatingLabel) {\n scope.clearButton = true;\n }\n\n scope.mdMode = getRepeatMode(attrs.mdMode);\n\n // Stop click events from bubbling up to the document and triggering a flicker of the\n // options panel while still supporting ng-click to be placed on md-autocomplete.\n element.on('click touchstart touchend', function(event) {\n event.stopPropagation();\n });\n };\n },\n template: function (element, attr) {\n var noItemsTemplate = getNoItemsTemplate(),\n itemTemplate = getItemTemplate(),\n leftover = element.html(),\n tabindex = attr.tabindex;\n\n // Set our attribute for the link function above which runs later.\n // We will set an attribute, because otherwise the stored variables will be trashed when\n // removing the element is hidden while retrieving the template. For example when using ngIf.\n if (noItemsTemplate) element.attr('md-has-not-found', true);\n\n // Always set our tabindex of the autocomplete directive to -1, because our input\n // will hold the actual tabindex.\n element.attr('tabindex', '-1');\n\n return '\\\n <md-autocomplete-wrap\\\n ng-class=\"{ \\'md-whiteframe-z1\\': !floatingLabel, \\\n \\'md-menu-showing\\': !$mdAutocompleteCtrl.hidden, \\\n \\'md-show-clear-button\\': !!clearButton }\">\\\n ' + getInputElement() + '\\\n ' + getClearButton() + '\\\n <md-progress-linear\\\n class=\"' + (attr.mdFloatingLabel ? 'md-inline' : '') + '\"\\\n ng-if=\"$mdAutocompleteCtrl.loadingIsVisible()\"\\\n md-mode=\"indeterminate\"></md-progress-linear>\\\n ' + getContainer(attr.mdMenuContainerClass, attr.mdMode) + '\\\n <ul class=\"md-autocomplete-suggestions\"\\\n ng-class=\"::menuClass\"\\\n id=\"ul-{{$mdAutocompleteCtrl.id}}\"\\\n ng-mouseup=\"$mdAutocompleteCtrl.focusInput()\"\\\n role=\"listbox\">\\\n <li class=\"md-autocomplete-suggestion\" ' + getRepeatType(attr.mdMode) + ' =\"item in $mdAutocompleteCtrl.matches\"\\\n ng-class=\"{ selected: $index === $mdAutocompleteCtrl.index }\"\\\n ng-attr-id=\"{{\\'md-option-\\' + $mdAutocompleteCtrl.id + \\'-\\' + $index}}\"\\\n ng-click=\"$mdAutocompleteCtrl.select($index)\"\\\n role=\"option\"\\\n aria-setsize=\"{{$mdAutocompleteCtrl.matches.length}}\"\\\n aria-posinset=\"{{$index+1}}\"\\\n aria-selected=\"{{$index === $mdAutocompleteCtrl.index ? true : false}}\" \\\n md-extra-name=\"$mdAutocompleteCtrl.itemName\">\\\n ' + itemTemplate + '\\\n </li>' + noItemsTemplate + '\\\n </ul>\\\n ' + getContainerClosingTags(attr.mdMode) + '\\\n </md-autocomplete-wrap>';\n\n function getItemTemplate() {\n var templateTag = element.find('md-item-template').detach(),\n html = templateTag.length ? templateTag.html() : element.html();\n if (!templateTag.length) element.empty();\n return '<md-autocomplete-parent-scope md-autocomplete-replace>' + html +\n '</md-autocomplete-parent-scope>';\n }\n\n function getNoItemsTemplate() {\n var templateTag = element.find('md-not-found').detach(),\n template = templateTag.length ? templateTag.html() : '';\n return template\n ? '<li ng-if=\"$mdAutocompleteCtrl.notFoundVisible()\" class=\"md-autocomplete-suggestion\"\\\n md-autocomplete-parent-scope>' + template + '</li>'\n : '';\n }\n\n function getContainer(menuContainerClass, repeatMode) {\n // prepend a space if needed\n menuContainerClass = menuContainerClass ? ' ' + menuContainerClass : '';\n\n if (isVirtualRepeatDisabled(repeatMode)) {\n return '\\\n <div \\\n ng-hide=\"$mdAutocompleteCtrl.hidden\"\\\n class=\"md-standard-list-container md-autocomplete-suggestions-container md-whiteframe-z1' + menuContainerClass + '\"\\\n ng-class=\"{ \\'md-not-found\\': $mdAutocompleteCtrl.notFoundVisible() }\"\\\n ng-mouseenter=\"$mdAutocompleteCtrl.listEnter()\"\\\n ng-mouseleave=\"$mdAutocompleteCtrl.listLeave()\"\\\n role=\"presentation\">\\\n <div class=\"md-standard-list-scroller\" role=\"presentation\">';\n }\n\n return '\\\n <md-virtual-repeat-container\\\n md-auto-shrink\\\n md-auto-shrink-min=\"1\"\\\n ng-hide=\"$mdAutocompleteCtrl.hidden\"\\\n class=\"md-virtual-repeat-container md-autocomplete-suggestions-container md-whiteframe-z1' + menuContainerClass + '\"\\\n ng-class=\"{ \\'md-not-found\\': $mdAutocompleteCtrl.notFoundVisible() }\"\\\n ng-mouseenter=\"$mdAutocompleteCtrl.listEnter()\"\\\n ng-mouseleave=\"$mdAutocompleteCtrl.listLeave()\"\\\n role=\"presentation\">';\n }\n\n function getContainerClosingTags(repeatMode) {\n return isVirtualRepeatDisabled(repeatMode) ?\n ' </div>\\\n </div>\\\n </div>' : '</md-virtual-repeat-container>';\n }\n\n function getRepeatType(repeatMode) {\n return isVirtualRepeatDisabled(repeatMode) ?\n 'ng-repeat' : 'md-virtual-repeat';\n }\n\n function isVirtualRepeatDisabled(repeatMode) {\n // ensure we have a valid repeat mode\n var correctedRepeatMode = getRepeatMode(repeatMode);\n return correctedRepeatMode !== REPEAT_VIRTUAL;\n }\n\n function getInputElement () {\n if (attr.mdFloatingLabel) {\n return '\\\n <md-input-container ng-if=\"floatingLabel\">\\\n <label>{{floatingLabel}}</label>\\\n <input type=\"text\"\\\n ' + (tabindex != null ? 'tabindex=\"' + tabindex + '\"' : '') + '\\\n id=\"{{inputId || \\'fl-input-\\' + $mdAutocompleteCtrl.id}}\"\\\n name=\"{{inputName || \\'fl-input-\\' + $mdAutocompleteCtrl.id }}\"\\\n ng-class=\"::inputClass\"\\\n autocomplete=\"off\"\\\n ng-required=\"$mdAutocompleteCtrl.isRequired\"\\\n ng-readonly=\"$mdAutocompleteCtrl.isReadonly\"\\\n ng-minlength=\"inputMinlength\"\\\n ng-maxlength=\"inputMaxlength\"\\\n ng-disabled=\"$mdAutocompleteCtrl.isDisabled\"\\\n ng-model=\"$mdAutocompleteCtrl.scope.searchText\"\\\n ng-model-options=\"{ allowInvalid: true }\"\\\n ng-mousedown=\"$mdAutocompleteCtrl.focusInput()\"\\\n ng-keydown=\"$mdAutocompleteCtrl.keydown($event)\"\\\n ng-blur=\"$mdAutocompleteCtrl.blur($event)\"\\\n ng-focus=\"$mdAutocompleteCtrl.focus($event)\"\\\n aria-label=\"{{floatingLabel}}\"\\\n ng-attr-aria-autocomplete=\"{{$mdAutocompleteCtrl.isDisabled ? undefined : \\'list\\'}}\"\\\n ng-attr-role=\"{{$mdAutocompleteCtrl.isDisabled ? undefined : \\'combobox\\'}}\"\\\n aria-haspopup=\"{{!$mdAutocompleteCtrl.isDisabled}}\"\\\n aria-expanded=\"{{!$mdAutocompleteCtrl.hidden}}\"\\\n ng-attr-aria-owns=\"{{$mdAutocompleteCtrl.hidden || $mdAutocompleteCtrl.isDisabled ? undefined : \\'ul-\\' + $mdAutocompleteCtrl.id}}\"\\\n ng-attr-aria-activedescendant=\"{{!$mdAutocompleteCtrl.hidden && $mdAutocompleteCtrl.activeOption ? $mdAutocompleteCtrl.activeOption : undefined}}\">\\\n <div md-autocomplete-parent-scope md-autocomplete-replace>' + leftover + '</div>\\\n </md-input-container>';\n } else {\n return '\\\n <input type=\"text\"\\\n ' + (tabindex != null ? 'tabindex=\"' + tabindex + '\"' : '') + '\\\n id=\"{{inputId || \\'input-\\' + $mdAutocompleteCtrl.id}}\"\\\n name=\"{{inputName || \\'input-\\' + $mdAutocompleteCtrl.id }}\"\\\n ng-class=\"::inputClass\"\\\n ng-if=\"!floatingLabel\"\\\n autocomplete=\"off\"\\\n ng-required=\"$mdAutocompleteCtrl.isRequired\"\\\n ng-disabled=\"$mdAutocompleteCtrl.isDisabled\"\\\n ng-readonly=\"$mdAutocompleteCtrl.isReadonly\"\\\n ng-minlength=\"inputMinlength\"\\\n ng-maxlength=\"inputMaxlength\"\\\n ng-model=\"$mdAutocompleteCtrl.scope.searchText\"\\\n ng-mousedown=\"$mdAutocompleteCtrl.focusInput()\"\\\n ng-keydown=\"$mdAutocompleteCtrl.keydown($event)\"\\\n ng-blur=\"$mdAutocompleteCtrl.blur($event)\"\\\n ng-focus=\"$mdAutocompleteCtrl.focus($event)\"\\\n placeholder=\"{{placeholder}}\"\\\n aria-label=\"{{placeholder}}\"\\\n ng-attr-aria-autocomplete=\"{{$mdAutocompleteCtrl.isDisabled ? undefined : \\'list\\'}}\"\\\n ng-attr-role=\"{{$mdAutocompleteCtrl.isDisabled ? undefined : \\'combobox\\'}}\"\\\n aria-haspopup=\"{{!$mdAutocompleteCtrl.isDisabled}}\"\\\n aria-expanded=\"{{!$mdAutocompleteCtrl.hidden}}\"\\\n ng-attr-aria-owns=\"{{$mdAutocompleteCtrl.hidden || $mdAutocompleteCtrl.isDisabled ? undefined : \\'ul-\\' + $mdAutocompleteCtrl.id}}\"\\\n ng-attr-aria-activedescendant=\"{{!$mdAutocompleteCtrl.hidden && $mdAutocompleteCtrl.activeOption ? $mdAutocompleteCtrl.activeOption : undefined}}\">';\n }\n }\n\n function getClearButton() {\n return '' +\n '<button ' +\n 'type=\"button\" ' +\n 'aria-label=\"Clear Input\" ' +\n 'tabindex=\"0\" ' +\n 'ng-if=\"clearButton && $mdAutocompleteCtrl.scope.searchText\" ' +\n 'ng-click=\"$mdAutocompleteCtrl.clear($event)\">' +\n '<md-icon md-svg-src=\"' + $$mdSvgRegistry.mdClose + '\"></md-icon>' +\n '</button>';\n }\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdAutocompleteItemScopeDirective.$inject = [\"$compile\", \"$mdUtil\"];angular\n .module('material.components.autocomplete')\n .directive('mdAutocompleteParentScope', MdAutocompleteItemScopeDirective);\n\nfunction MdAutocompleteItemScopeDirective($compile, $mdUtil) {\n return {\n restrict: 'AE',\n compile: compile,\n terminal: true,\n transclude: 'element'\n };\n\n function compile(tElement, tAttr, transclude) {\n return function postLink(scope, element, attr) {\n var ctrl = scope.$mdAutocompleteCtrl;\n var newScope = ctrl.parent.$new();\n var itemName = ctrl.itemName;\n\n // Watch for changes to our scope's variables and copy them to the new scope\n watchVariable('$index', '$index');\n watchVariable('item', itemName);\n\n // Ensure that $digest calls on our scope trigger $digest on newScope.\n connectScopes();\n\n // Link the element against newScope.\n transclude(newScope, function(clone) {\n element.after(clone);\n });\n\n /**\n * Creates a watcher for variables that are copied from the parent scope\n * @param variable\n * @param alias\n */\n function watchVariable(variable, alias) {\n newScope[alias] = scope[variable];\n\n scope.$watch(variable, function(value) {\n $mdUtil.nextTick(function() {\n newScope[alias] = value;\n });\n });\n }\n\n /**\n * Creates watchers on scope and newScope that ensure that for any\n * $digest of scope, newScope is also $digested.\n */\n function connectScopes() {\n var scopeDigesting = false;\n var newScopeDigesting = false;\n\n scope.$watch(function() {\n if (newScopeDigesting || scopeDigesting) {\n return;\n }\n\n scopeDigesting = true;\n scope.$$postDigest(function() {\n if (!newScopeDigesting) {\n newScope.$digest();\n }\n\n scopeDigesting = newScopeDigesting = false;\n });\n });\n\n newScope.$watch(function() {\n newScopeDigesting = true;\n });\n }\n };\n }\n}\n})();\n(function(){\n\"use strict\";\n\n\nMdHighlightCtrl.$inject = [\"$scope\", \"$element\", \"$attrs\", \"$mdUtil\"];angular\n .module('material.components.autocomplete')\n .controller('MdHighlightCtrl', MdHighlightCtrl);\n\nfunction MdHighlightCtrl ($scope, $element, $attrs, $mdUtil) {\n this.$scope = $scope;\n this.$element = $element;\n this.$attrs = $attrs;\n this.$mdUtil = $mdUtil;\n\n // Cache the Regex to avoid rebuilding each time.\n this.regex = null;\n}\n\nMdHighlightCtrl.prototype.init = function(unsafeTermFn, unsafeContentFn) {\n\n this.flags = this.$attrs.mdHighlightFlags || '';\n\n this.unregisterFn = this.$scope.$watch(function($scope) {\n return {\n term: unsafeTermFn($scope),\n contentText: unsafeContentFn($scope)\n };\n }.bind(this), this.onRender.bind(this), true);\n\n this.$element.on('$destroy', this.unregisterFn);\n};\n\n/**\n * Triggered once a new change has been recognized and the highlighted\n * text needs to be updated.\n */\nMdHighlightCtrl.prototype.onRender = function(state, prevState) {\n\n var contentText = state.contentText;\n\n /* Update the regex if it's outdated, because we don't want to rebuilt it constantly. */\n if (this.regex === null || state.term !== prevState.term) {\n this.regex = this.createRegex(state.term, this.flags);\n }\n\n /* If a term is available apply the regex to the content */\n if (state.term) {\n this.applyRegex(contentText);\n } else {\n this.$element.text(contentText);\n }\n\n};\n\n/**\n * Decomposes the specified text into different tokens (whether match or not).\n * Breaking down the string guarantees proper XSS protection due to the native browser\n * escaping of unsafe text.\n */\nMdHighlightCtrl.prototype.applyRegex = function(text) {\n var tokens = this.resolveTokens(text);\n\n this.$element.empty();\n\n tokens.forEach(function (token) {\n\n if (token.isMatch) {\n var tokenEl = angular.element('<span class=\"highlight\">').text(token.text);\n\n this.$element.append(tokenEl);\n } else {\n this.$element.append(document.createTextNode(token));\n }\n\n }.bind(this));\n\n};\n\n /**\n * Decomposes the specified text into different tokens by running the regex against the text.\n */\nMdHighlightCtrl.prototype.resolveTokens = function(string) {\n var tokens = [];\n var lastIndex = 0;\n\n // Use replace here, because it supports global and single regular expressions at same time.\n string.replace(this.regex, function(match, index) {\n appendToken(lastIndex, index);\n\n tokens.push({\n text: match,\n isMatch: true\n });\n\n lastIndex = index + match.length;\n });\n\n // Append the missing text as a token.\n appendToken(lastIndex);\n\n return tokens;\n\n function appendToken(from, to) {\n var targetText = string.slice(from, to);\n targetText && tokens.push(targetText);\n }\n};\n\n/** Creates a regex for the specified text with the given flags. */\nMdHighlightCtrl.prototype.createRegex = function(term, flags) {\n var startFlag = '', endFlag = '';\n var regexTerm = this.$mdUtil.sanitize(term);\n\n if (flags.indexOf('^') >= 0) startFlag = '^';\n if (flags.indexOf('$') >= 0) endFlag = '$';\n\n return new RegExp(startFlag + regexTerm + endFlag, flags.replace(/[$^]/g, ''));\n};\n\n})();\n(function(){\n\"use strict\";\n\n\nMdHighlight.$inject = [\"$interpolate\", \"$parse\"];angular\n .module('material.components.autocomplete')\n .directive('mdHighlightText', MdHighlight);\n\n/**\n * @ngdoc directive\n * @name mdHighlightText\n * @module material.components.autocomplete\n *\n * @description\n * The `md-highlight-text` directive allows you to specify text that should be highlighted within\n * an element. Highlighted text will be wrapped in `<span class=\"highlight\"></span>` which can\n * be styled through CSS. Please note that child elements may not be used with this directive.\n *\n * @param {string} md-highlight-text A model to be searched for\n * @param {string=} md-highlight-flags A list of flags (loosely based on JavaScript RexExp flags).\n * #### **Supported flags**:\n * - `g`: Find all matches within the provided text\n * - `i`: Ignore case when searching for matches\n * - `$`: Only match if the text ends with the search term\n * - `^`: Only match if the text begins with the search term\n *\n * @usage\n * <hljs lang=\"html\">\n * <input placeholder=\"Enter a search term...\" ng-model=\"searchTerm\" type=\"text\" />\n * <ul>\n * <li ng-repeat=\"result in results\" md-highlight-text=\"searchTerm\" md-highlight-flags=\"i\">\n * {{result.text}}\n * </li>\n * </ul>\n * </hljs>\n */\n\nfunction MdHighlight ($interpolate, $parse) {\n return {\n terminal: true,\n controller: 'MdHighlightCtrl',\n compile: function mdHighlightCompile(tElement, tAttr) {\n var termExpr = $parse(tAttr.mdHighlightText);\n var unsafeContentExpr = $interpolate(tElement.html());\n\n return function mdHighlightLink(scope, element, attr, ctrl) {\n ctrl.init(termExpr, unsafeContentExpr);\n };\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n/*\n * @ngdoc module\n * @name material.components.backdrop\n * @description Backdrop\n */\n\n/**\n * @ngdoc directive\n * @name mdBackdrop\n * @module material.components.backdrop\n *\n * @restrict E\n *\n * @description\n * `<md-backdrop>` is a backdrop element used by other components, such as dialog and bottom sheet.\n * Apply class `opaque` to make the backdrop use the theme backdrop color.\n *\n */\n\nangular\n .module('material.components.backdrop', ['material.core'])\n .directive('mdBackdrop', [\"$mdTheming\", \"$mdUtil\", \"$animate\", \"$rootElement\", \"$window\", \"$log\", \"$$rAF\", \"$document\", function BackdropDirective($mdTheming, $mdUtil, $animate, $rootElement, $window, $log, $$rAF, $document) {\n var ERROR_CSS_POSITION = '<md-backdrop> may not work properly in a scrolled, static-positioned parent container.';\n\n return {\n restrict: 'E',\n link: postLink\n };\n\n function postLink(scope, element, attrs) {\n // backdrop may be outside the $rootElement, tell ngAnimate to animate regardless\n if ($animate.pin) $animate.pin(element, $rootElement);\n\n var bodyStyles;\n\n $$rAF(function() {\n // If body scrolling has been disabled using mdUtil.disableBodyScroll(),\n // adjust the 'backdrop' height to account for the fixed 'body' top offset.\n // Note that this can be pretty expensive and is better done inside the $$rAF.\n bodyStyles = $window.getComputedStyle($document[0].body);\n\n if (bodyStyles.position === 'fixed') {\n var resizeHandler = $mdUtil.debounce(function(){\n bodyStyles = $window.getComputedStyle($document[0].body);\n resize();\n }, 60, null, false);\n\n resize();\n angular.element($window).on('resize', resizeHandler);\n\n scope.$on('$destroy', function() {\n angular.element($window).off('resize', resizeHandler);\n });\n }\n\n // Often $animate.enter() is used to append the backDrop element\n // so let's wait until $animate is done...\n var parent = element.parent();\n\n if (parent.length) {\n if (parent[0].nodeName === 'BODY') {\n element.css('position', 'fixed');\n }\n\n var styles = $window.getComputedStyle(parent[0]);\n\n if (styles.position === 'static') {\n // backdrop uses position:absolute and will not work properly with parent position:static (default)\n $log.warn(ERROR_CSS_POSITION);\n }\n\n // Only inherit the parent if the backdrop has a parent.\n $mdTheming.inherit(element, parent);\n }\n });\n\n function resize() {\n var viewportHeight = parseInt(bodyStyles.height, 10) + Math.abs(parseInt(bodyStyles.top, 10));\n element.css('height', viewportHeight + 'px');\n }\n }\n\n }]);\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.bottomSheet\n * @description\n * BottomSheet\n */\nMdBottomSheetDirective.$inject = [\"$mdBottomSheet\"];\nMdBottomSheetProvider.$inject = [\"$$interimElementProvider\"];\nangular\n .module('material.components.bottomSheet', [\n 'material.core',\n 'material.components.backdrop'\n ])\n .directive('mdBottomSheet', MdBottomSheetDirective)\n .provider('$mdBottomSheet', MdBottomSheetProvider);\n\n/* @ngInject */\nfunction MdBottomSheetDirective($mdBottomSheet) {\n return {\n restrict: 'E',\n link : function postLink(scope, element) {\n element.addClass('_md'); // private md component indicator for styling\n\n // When navigation force destroys an interimElement, then\n // listen and $destroy() that interim instance...\n scope.$on('$destroy', function() {\n $mdBottomSheet.destroy();\n });\n }\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $mdBottomSheet\n * @module material.components.bottomSheet\n *\n * @description\n * `$mdBottomSheet` opens a bottom sheet over the app and provides a simple promise API.\n *\n * ## Restrictions\n *\n * - The bottom sheet's template must have an outer `<md-bottom-sheet>` element.\n * - Add the `md-grid` class to the bottom sheet for a grid layout.\n * - Add the `md-list` class to the bottom sheet for a list layout.\n *\n * @usage\n * <hljs lang=\"html\">\n * <div ng-controller=\"MyController\">\n * <md-button ng-click=\"openBottomSheet()\">\n * Open a Bottom Sheet!\n * </md-button>\n * </div>\n * </hljs>\n * <hljs lang=\"js\">\n * var app = angular.module('app', ['ngMaterial']);\n * app.controller('MyController', function($scope, $mdBottomSheet) {\n * $scope.openBottomSheet = function() {\n * $mdBottomSheet.show({\n * template: '<md-bottom-sheet>' +\n * 'Hello! <md-button ng-click=\"closeBottomSheet()\">Close</md-button>' +\n * '</md-bottom-sheet>'\n * })\n *\n * // Fires when the hide() method is used\n * .then(function() {\n * console.log('You clicked the button to close the bottom sheet!');\n * })\n *\n * // Fires when the cancel() method is used\n * .catch(function() {\n * console.log('You hit escape or clicked the backdrop to close.');\n * });\n * };\n *\n * $scope.closeBottomSheet = function($scope, $mdBottomSheet) {\n * $mdBottomSheet.hide();\n * }\n *\n * });\n * </hljs>\n *\n * ### Custom Presets\n * Developers are also able to create their own preset, which can be easily used without repeating\n * their options each time.\n *\n * <hljs lang=\"js\">\n * $mdBottomSheetProvider.addPreset('testPreset', {\n * options: function() {\n * return {\n * template:\n * '<md-bottom-sheet>' +\n * 'This is a custom preset' +\n * '</md-bottom-sheet>',\n * controllerAs: 'bottomSheet',\n * bindToController: true,\n * clickOutsideToClose: true,\n * escapeToClose: true\n * };\n * }\n * });\n * </hljs>\n *\n * After you create your preset during the config phase, you can easily access it.\n *\n * <hljs lang=\"js\">\n * $mdBottomSheet.show(\n * $mdBottomSheet.testPreset()\n * );\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdBottomSheet#show\n *\n * @description\n * Show a bottom sheet with the specified options.\n *\n * <em><b>Note:</b> You should <b>always</b> provide a `.catch()` method in case the user hits the\n * `esc` key or clicks the background to close. In this case, the `cancel()` method will\n * automatically be called on the bottom sheet which will `reject()` the promise. See the @usage\n * section above for an example.\n *\n * Newer versions of Angular will throw a `Possibly unhandled rejection` exception if you forget\n * this.</em>\n *\n * @param {Object} optionsOrPreset Either provide an `$mdBottomSheetPreset` defined during the\n * config phase or an options object, with the following properties:\n *\n * - `templateUrl` - `{string=}`: The url of an html template file that will\n * be used as the content of the bottom sheet. Restrictions: the template must\n * have an outer `md-bottom-sheet` element.\n * - `template` - `{string=}`: Same as templateUrl, except this is an actual\n * template string.\n * - `scope` - `{Object=}`: the scope to link the template / controller to. If none is specified,\n * it will create a new child scope. This scope will be destroyed when the bottom sheet is\n * removed unless `preserveScope` is set to true.\n * - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed.\n * Default is false\n * - `controller` - `{string=}`: The controller to associate with this bottom sheet.\n * - `locals` - `{string=}`: An object containing key/value pairs. The keys will be used as names\n * of values to inject into the controller. For example, `locals: {three: 3}` would inject\n * `three` into the controller with the value of 3.\n * - `clickOutsideToClose` - `{boolean=}`: Whether the user can click outside the bottom sheet to\n * close it. Default true.\n * - `bindToController` - `{boolean=}`: When set to true, the locals will be bound to the\n * controller instance and available in it's $onInit function.\n * - `disableBackdrop` - `{boolean=}`: When set to true, the bottomsheet will not show a backdrop.\n * - `escapeToClose` - `{boolean=}`: Whether the user can press escape to close the bottom sheet.\n * Default true.\n * - `isLockedOpen` - `{boolean=}`: Disables all default ways of closing the bottom sheet.\n * **Note:** this will override the `clickOutsideToClose` and `escapeToClose` options, leaving\n * only the `hide` and `cancel` methods as ways of closing the bottom sheet. Defaults to false.\n * - `resolve` - `{Object=}`: Similar to locals, except it takes promises as values\n * and the bottom sheet will not open until the promises resolve.\n * - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope.\n * - `parent` - `{element=}`: The element to append the bottom sheet to. The `parent` may be a\n * `function`, `string`, `Object`, or null. Defaults to appending to the body of the root element\n * (or the root element) of the application.\n * e.g. angular.element(document.getElementById('content')) or \"#content\"\n * - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the bottom sheet is\n * open. Default true.\n *\n * @returns {promise} A promise that can be resolved with `$mdBottomSheet.hide()` or\n * rejected with `$mdBottomSheet.cancel()`.\n */\n\n/**\n * @ngdoc method\n * @name $mdBottomSheet#hide\n *\n * @description\n * Hide the existing bottom sheet and resolve the promise returned from\n * `$mdBottomSheet.show()`. This call will close the most recently opened/current bottom sheet (if\n * any).\n *\n * <em><b>Note:</b> Use a `.then()` on your `.show()` to handle this callback.</em>\n *\n * @param {*=} response An argument for the resolved promise.\n *\n */\n\n/**\n * @ngdoc method\n * @name $mdBottomSheet#cancel\n *\n * @description\n * Hide the existing bottom sheet and reject the promise returned from\n * `$mdBottomSheet.show()`.\n *\n * <em><b>Note:</b> Use a `.catch()` on your `.show()` to handle this callback.</em>\n *\n * @param {*=} response An argument for the rejected promise.\n *\n */\n\nfunction MdBottomSheetProvider($$interimElementProvider) {\n // how fast we need to flick down to close the sheet, pixels/ms\n bottomSheetDefaults.$inject = [\"$animate\", \"$mdConstant\", \"$mdUtil\", \"$mdTheming\", \"$mdBottomSheet\", \"$rootElement\", \"$mdGesture\", \"$log\"];\n var CLOSING_VELOCITY = 0.5;\n var PADDING = 80; // same as css\n\n return $$interimElementProvider('$mdBottomSheet')\n .setDefaults({\n methods: ['disableParentScroll', 'escapeToClose', 'clickOutsideToClose'],\n options: bottomSheetDefaults\n });\n\n /* @ngInject */\n function bottomSheetDefaults($animate, $mdConstant, $mdUtil, $mdTheming, $mdBottomSheet, $rootElement,\n $mdGesture, $log) {\n var backdrop;\n\n return {\n themable: true,\n onShow: onShow,\n onRemove: onRemove,\n disableBackdrop: false,\n escapeToClose: true,\n clickOutsideToClose: true,\n disableParentScroll: true,\n isLockedOpen: false\n };\n\n function onShow(scope, element, options) {\n element = $mdUtil.extractElementByName(element, 'md-bottom-sheet');\n\n // prevent tab focus or click focus on the bottom-sheet container\n element.attr('tabindex', '-1');\n\n // Once the md-bottom-sheet has `ng-cloak` applied on his template the opening animation will not work properly.\n // This is a very common problem, so we have to notify the developer about this.\n if (element.hasClass('ng-cloak')) {\n var message = '$mdBottomSheet: using `<md-bottom-sheet ng-cloak>` will affect the bottom-sheet opening animations.';\n $log.warn(message, element[0]);\n }\n\n if (options.isLockedOpen) {\n options.clickOutsideToClose = false;\n options.escapeToClose = false;\n } else {\n options.cleanupGestures = registerGestures(element, options.parent);\n }\n\n if (!options.disableBackdrop) {\n // Add a backdrop that will close on click\n backdrop = $mdUtil.createBackdrop(scope, \"md-bottom-sheet-backdrop md-opaque\");\n\n // Prevent mouse focus on backdrop; ONLY programmatic focus allowed.\n // This allows clicks on backdrop to propagate to the $rootElement and\n // ESC key events to be detected properly.\n backdrop[0].tabIndex = -1;\n\n if (options.clickOutsideToClose) {\n backdrop.on('click', function() {\n $mdUtil.nextTick($mdBottomSheet.cancel, true);\n });\n }\n\n $mdTheming.inherit(backdrop, options.parent);\n\n $animate.enter(backdrop, options.parent, null);\n }\n\n $mdTheming.inherit(element, options.parent);\n\n if (options.disableParentScroll) {\n options.restoreScroll = $mdUtil.disableScrollAround(element, options.parent);\n }\n\n return $animate.enter(element, options.parent, backdrop)\n .then(function() {\n var focusable = $mdUtil.findFocusTarget(element) || angular.element(\n element[0].querySelector('button') ||\n element[0].querySelector('a') ||\n element[0].querySelector($mdUtil.prefixer('ng-click', true))\n ) || backdrop;\n\n if (options.escapeToClose) {\n options.rootElementKeyupCallback = function(e) {\n if (e.keyCode === $mdConstant.KEY_CODE.ESCAPE) {\n $mdUtil.nextTick($mdBottomSheet.cancel, true);\n }\n };\n\n $rootElement.on('keyup', options.rootElementKeyupCallback);\n focusable && focusable.focus();\n }\n });\n\n }\n\n function onRemove(scope, element, options) {\n if (!options.disableBackdrop) $animate.leave(backdrop);\n\n return $animate.leave(element).then(function() {\n if (options.disableParentScroll) {\n options.restoreScroll();\n delete options.restoreScroll;\n }\n\n options.cleanupGestures && options.cleanupGestures();\n });\n }\n\n /**\n * Adds the drag gestures to the bottom sheet.\n * @param {JQLite} element where CSS transitions will be applied\n * @param {JQLite} parent used for registering gesture listeners\n * @return {Function} function that removes gesture listeners that were set up by\n * registerGestures()\n */\n function registerGestures(element, parent) {\n var deregister = $mdGesture.register(parent, 'drag', { horizontal: false });\n parent.on('$md.dragstart', onDragStart)\n .on('$md.drag', onDrag)\n .on('$md.dragend', onDragEnd);\n\n return function cleanupGestures() {\n deregister();\n parent.off('$md.dragstart', onDragStart);\n parent.off('$md.drag', onDrag);\n parent.off('$md.dragend', onDragEnd);\n };\n\n function onDragStart() {\n // Disable transitions on transform so that it feels fast\n element.css($mdConstant.CSS.TRANSITION_DURATION, '0ms');\n }\n\n function onDrag(ev) {\n var transform = ev.pointer.distanceY;\n if (transform < 5) {\n // Slow down drag when trying to drag up, and stop after PADDING\n transform = Math.max(-PADDING, transform / 2);\n }\n element.css($mdConstant.CSS.TRANSFORM, 'translate3d(0,' + (PADDING + transform) + 'px,0)');\n }\n\n function onDragEnd(ev) {\n if (ev.pointer.distanceY > 0 &&\n (ev.pointer.distanceY > 20 || Math.abs(ev.pointer.velocityY) > CLOSING_VELOCITY)) {\n var distanceRemaining = element.prop('offsetHeight') - ev.pointer.distanceY;\n var transitionDuration = Math.min(distanceRemaining / ev.pointer.velocityY * 0.75, 500);\n element.css($mdConstant.CSS.TRANSITION_DURATION, transitionDuration + 'ms');\n $mdUtil.nextTick($mdBottomSheet.cancel, true);\n } else {\n element.css($mdConstant.CSS.TRANSITION_DURATION, '');\n element.css($mdConstant.CSS.TRANSFORM, '');\n }\n }\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.button\n * @description\n *\n * Button\n */\nMdButtonDirective.$inject = [\"$mdButtonInkRipple\", \"$mdTheming\", \"$mdAria\", \"$mdInteraction\"];\nMdAnchorDirective.$inject = [\"$mdTheming\"];\nangular\n .module('material.components.button', ['material.core'])\n .directive('mdButton', MdButtonDirective)\n .directive('a', MdAnchorDirective);\n\n\n/**\n * @private\n * @restrict E\n *\n * @description\n * `a` is an anchor directive used to inherit theme colors for md-primary, md-accent, etc.\n *\n * @usage\n *\n * <hljs lang=\"html\">\n * <md-content md-theme=\"myTheme\">\n * <a href=\"#chapter1\" class=\"md-accent\"></a>\n * </md-content>\n * </hljs>\n */\nfunction MdAnchorDirective($mdTheming) {\n return {\n restrict : 'E',\n link : function postLink(scope, element) {\n // Make sure to inherit theme so stand-alone anchors\n // support theme colors for md-primary, md-accent, etc.\n $mdTheming(element);\n }\n };\n}\n\n\n/**\n * @ngdoc directive\n * @name mdButton\n * @module material.components.button\n *\n * @restrict E\n *\n * @description\n * `<md-button>` is a button directive with optional ink ripples (default enabled).\n *\n * If you supply a `href` or `ng-href` attribute, it will become an `<a>` element. Otherwise, it\n * will become a `<button>` element. As per the\n * [Material Design specifications](https://material.google.com/style/color.html#color-color-palette)\n * the FAB button background is filled with the accent color [by default]. The primary color palette\n * may be used with the `md-primary` class.\n *\n * Developers can also change the color palette of the button, by using the following classes\n * - `md-primary`\n * - `md-accent`\n * - `md-warn`\n *\n * See for example\n *\n * <hljs lang=\"html\">\n * <md-button class=\"md-primary\">Primary Button</md-button>\n * </hljs>\n *\n * Button can be also raised, which means that they will use the current color palette to fill the button.\n *\n * <hljs lang=\"html\">\n * <md-button class=\"md-accent md-raised\">Raised and Accent Button</md-button>\n * </hljs>\n *\n * It is also possible to disable the focus effect on the button, by using the following markup.\n *\n * <hljs lang=\"html\">\n * <md-button class=\"md-no-focus\">No Focus Style</md-button>\n * </hljs>\n *\n * @param {string=} aria-label Adds alternative text to button for accessibility, useful for icon buttons.\n * If no default text is found, a warning will be logged.\n * @param {boolean=} md-no-ink If present, disable ink ripple effects.\n * @param {string=} md-ripple-size Overrides the default ripple size logic. Options: `full`, `partial`, `auto`.\n * @param {expression=} ng-disabled Disable the button when the expression is truthy.\n * @param {expression=} ng-blur Expression evaluated when focus is removed from the button.\n *\n * @usage\n *\n * Regular buttons:\n *\n * <hljs lang=\"html\">\n * <md-button> Flat Button </md-button>\n * <md-button href=\"http://google.com\"> Flat link </md-button>\n * <md-button class=\"md-raised\"> Raised Button </md-button>\n * <md-button ng-disabled=\"true\"> Disabled Button </md-button>\n * <md-button>\n * <md-icon md-svg-src=\"your/icon.svg\"></md-icon>\n * Register Now\n * </md-button>\n * </hljs>\n *\n * FAB buttons:\n *\n * <hljs lang=\"html\">\n * <md-button class=\"md-fab\" aria-label=\"FAB\">\n * <md-icon md-svg-src=\"your/icon.svg\"></md-icon>\n * </md-button>\n * <!-- mini-FAB -->\n * <md-button class=\"md-fab md-mini\" aria-label=\"Mini FAB\">\n * <md-icon md-svg-src=\"your/icon.svg\"></md-icon>\n * </md-button>\n * <!-- Button with SVG Icon -->\n * <md-button class=\"md-icon-button\" aria-label=\"Custom Icon Button\">\n * <md-icon md-svg-icon=\"path/to/your.svg\"></md-icon>\n * </md-button>\n * </hljs>\n */\nfunction MdButtonDirective($mdButtonInkRipple, $mdTheming, $mdAria, $mdInteraction) {\n\n return {\n restrict: 'EA',\n replace: true,\n transclude: true,\n template: getTemplate,\n link: postLink\n };\n\n function isAnchor(attr) {\n return angular.isDefined(attr.href) || angular.isDefined(attr.ngHref) || angular.isDefined(attr.ngLink) || angular.isDefined(attr.uiSref);\n }\n\n function getTemplate(element, attr) {\n if (isAnchor(attr)) {\n return '<a class=\"md-button\" ng-transclude></a>';\n } else {\n // If buttons don't have type=\"button\", they will submit forms automatically.\n var btnType = (typeof attr.type === 'undefined') ? 'button' : attr.type;\n return '<button class=\"md-button\" type=\"' + btnType + '\" ng-transclude></button>';\n }\n }\n\n function postLink(scope, element, attr) {\n $mdTheming(element);\n $mdButtonInkRipple.attach(scope, element);\n\n // Use async expect to support possible bindings in the button label\n $mdAria.expectWithoutText(element, 'aria-label');\n\n // For anchor elements, we have to set tabindex manually when the element is disabled.\n // We don't do this for md-nav-bar anchors as the component manages its own tabindex values.\n if (isAnchor(attr) && angular.isDefined(attr.ngDisabled) &&\n !element.hasClass('_md-nav-button')) {\n scope.$watch(attr.ngDisabled, function(isDisabled) {\n element.attr('tabindex', isDisabled ? -1 : 0);\n });\n }\n\n // disabling click event when disabled is true\n element.on('click', function(e){\n if (attr.disabled === true) {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n });\n\n if (!element.hasClass('md-no-focus')) {\n\n element.on('focus', function() {\n\n // Only show the focus effect when being focused through keyboard interaction or programmatically\n if (!$mdInteraction.isUserInvoked() || $mdInteraction.getLastInteractionType() === 'keyboard') {\n element.addClass('md-focused');\n }\n\n });\n\n element.on('blur', function() {\n element.removeClass('md-focused');\n });\n }\n\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.card\n *\n * @description\n * Card components.\n */\nmdCardDirective.$inject = [\"$mdTheming\"];\nangular.module('material.components.card', [\n 'material.core'\n ])\n .directive('mdCard', mdCardDirective);\n\n\n/**\n * @ngdoc directive\n * @name mdCard\n * @module material.components.card\n *\n * @restrict E\n *\n * @description\n * The `<md-card>` directive is a container element used within `<md-content>` containers.\n *\n * An image included as a direct descendant will fill the card's width. If you want to avoid this,\n * you can add the `md-image-no-fill` class to the parent element. The `<md-card-content>`\n * container will wrap text content and provide padding. An `<md-card-footer>` element can be\n * optionally included to put content flush against the bottom edge of the card.\n *\n * Action buttons can be included in an `<md-card-actions>` element, similar to `<md-dialog-actions>`.\n * You can then position buttons using layout attributes.\n *\n * Card is built with:\n * * `<md-card-header>` - Header for the card, holds avatar, text and squared image\n * - `<md-card-avatar>` - Card avatar\n * - `md-user-avatar` - Class for user image\n * - `<md-icon>`\n * - `<md-card-header-text>` - Contains elements for the card description\n * - `md-title` - Class for the card title\n * - `md-subhead` - Class for the card sub header\n * * `<img>` - Image for the card\n * * `<md-card-title>` - Card content title\n * - `<md-card-title-text>`\n * - `md-headline` - Class for the card content title\n * - `md-subhead` - Class for the card content sub header\n * - `<md-card-title-media>` - Squared image within the title\n * - `md-media-sm` - Class for small image\n * - `md-media-md` - Class for medium image\n * - `md-media-lg` - Class for large image\n * - `md-media-xl` - Class for extra large image\n * * `<md-card-content>` - Card content\n * * `<md-card-actions>` - Card actions\n * - `<md-card-icon-actions>` - Icon actions\n *\n * Cards have constant width and variable heights; where the maximum height is limited to what can\n * fit within a single view on a platform, but it can temporarily expand as needed.\n *\n * @usage\n * ### Card with optional footer\n * <hljs lang=\"html\">\n * <md-card>\n * <img src=\"card-image.png\" class=\"md-card-image\" alt=\"image caption\">\n * <md-card-content>\n * <h2>Card headline</h2>\n * <p>Card content</p>\n * </md-card-content>\n * <md-card-footer>\n * Card footer\n * </md-card-footer>\n * </md-card>\n * </hljs>\n *\n * ### Card with actions\n * <hljs lang=\"html\">\n * <md-card>\n * <img src=\"card-image.png\" class=\"md-card-image\" alt=\"image caption\">\n * <md-card-content>\n * <h2>Card headline</h2>\n * <p>Card content</p>\n * </md-card-content>\n * <md-card-actions layout=\"row\" layout-align=\"end center\">\n * <md-button>Action 1</md-button>\n * <md-button>Action 2</md-button>\n * </md-card-actions>\n * </md-card>\n * </hljs>\n *\n * ### Card with header, image, title actions and content\n * <hljs lang=\"html\">\n * <md-card>\n * <md-card-header>\n * <md-card-avatar>\n * <img class=\"md-user-avatar\" src=\"avatar.png\"/>\n * </md-card-avatar>\n * <md-card-header-text>\n * <span class=\"md-title\">Title</span>\n * <span class=\"md-subhead\">Sub header</span>\n * </md-card-header-text>\n * </md-card-header>\n * <img ng-src=\"card-image.png\" class=\"md-card-image\" alt=\"image caption\">\n * <md-card-title>\n * <md-card-title-text>\n * <span class=\"md-headline\">Card headline</span>\n * <span class=\"md-subhead\">Card subheader</span>\n * </md-card-title-text>\n * </md-card-title>\n * <md-card-actions layout=\"row\" layout-align=\"start center\">\n * <md-button>Action 1</md-button>\n * <md-button>Action 2</md-button>\n * <md-card-icon-actions>\n * <md-button class=\"md-icon-button\" aria-label=\"icon\">\n * <md-icon md-svg-icon=\"icon\"></md-icon>\n * </md-button>\n * </md-card-icon-actions>\n * </md-card-actions>\n * <md-card-content>\n * <p>\n * Card content\n * </p>\n * </md-card-content>\n * </md-card>\n * </hljs>\n */\nfunction mdCardDirective($mdTheming) {\n return {\n restrict: 'E',\n link: function ($scope, $element, attr) {\n $element.addClass('_md'); // private md component indicator for styling\n $mdTheming($element);\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.checkbox\n * @description Checkbox module!\n */\nMdCheckboxDirective.$inject = [\"inputDirective\", \"$mdAria\", \"$mdConstant\", \"$mdTheming\", \"$mdUtil\", \"$mdInteraction\"];\nangular\n .module('material.components.checkbox', ['material.core'])\n .directive('mdCheckbox', MdCheckboxDirective);\n\n/**\n * @ngdoc directive\n * @name mdCheckbox\n * @module material.components.checkbox\n * @restrict E\n *\n * @description\n * The checkbox directive is used like the normal\n * [angular checkbox](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D).\n *\n * As per the [Material Design spec](https://material.io/archive/guidelines/style/color.html#color-color-palette)\n * the checkbox is in the accent color by default. The primary color palette may be used with\n * the `md-primary` class.\n *\n * @param {expression} ng-model Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ng-true-value The value to which the expression should be set when selected.\n * @param {expression=} ng-false-value The value to which the expression should be set when not\n * selected.\n * @param {expression=} ng-change Expression to be executed when the model value changes.\n * @param {boolean=} md-no-ink If present, disable ink ripple effects.\n * @param {string=} aria-label Adds label to checkbox for accessibility.\n * Defaults to checkbox's text. If no default text is found, a warning will be logged.\n * @param {expression=} md-indeterminate This determines when the checkbox should be rendered as\n * 'indeterminate'. If a truthy expression or no value is passed in the checkbox renders in the\n * md-indeterminate state. If falsy expression is passed in it just looks like a normal unchecked\n * checkbox. The indeterminate, checked, and unchecked states are mutually exclusive. A box\n * cannot be in any two states at the same time. Adding the 'md-indeterminate' attribute\n * overrides any checked/unchecked rendering logic. When using the 'md-indeterminate' attribute\n * use 'ng-checked' to define rendering logic instead of using 'ng-model'.\n * @param {expression=} ng-checked If this expression evaluates as truthy, the 'md-checked' css\n * class is added to the checkbox and it will appear checked.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-checkbox ng-model=\"isChecked\" aria-label=\"Finished?\">\n * Finished ?\n * </md-checkbox>\n *\n * <md-checkbox md-no-ink ng-model=\"hasInk\" aria-label=\"No Ink Effects\">\n * No Ink Effects\n * </md-checkbox>\n *\n * <md-checkbox ng-disabled=\"true\" ng-model=\"isDisabled\" aria-label=\"Disabled\">\n * Disabled\n * </md-checkbox>\n *\n * </hljs>\n *\n */\nfunction MdCheckboxDirective(inputDirective, $mdAria, $mdConstant, $mdTheming, $mdUtil, $mdInteraction) {\n inputDirective = inputDirective[0];\n\n return {\n restrict: 'E',\n transclude: true,\n require: ['^?mdInputContainer', '?ngModel', '?^form'],\n priority: $mdConstant.BEFORE_NG_ARIA,\n template:\n '<div class=\"md-container\" md-ink-ripple md-ink-ripple-checkbox>' +\n '<div class=\"md-icon\"></div>' +\n '</div>' +\n '<div ng-transclude class=\"md-label\"></div>',\n compile: compile\n };\n\n // **********************************************************\n // Private Methods\n // **********************************************************\n\n function compile (tElement, tAttrs) {\n tAttrs.$set('tabindex', tAttrs.tabindex || '0');\n tAttrs.$set('type', 'checkbox');\n tAttrs.$set('role', tAttrs.type);\n tElement.addClass('md-auto-horizontal-margin');\n\n return {\n pre: function(scope, element) {\n // Attach a click handler during preLink, in order to immediately stop propagation\n // (especially for ng-click) when the checkbox is disabled.\n element.on('click', function(e) {\n if (this.hasAttribute('disabled')) {\n e.stopImmediatePropagation();\n }\n });\n },\n post: postLink\n };\n\n function postLink(scope, element, attr, ctrls) {\n var isIndeterminate;\n var containerCtrl = ctrls[0];\n var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel();\n var formCtrl = ctrls[2];\n var labelHasLink = element.find('a').length > 0;\n\n // The original component structure is not accessible when the checkbox's label contains a link.\n // In order to keep backwards compatibility, we're only changing the structure of the component\n // when we detect a link within the label. Using a span after the md-checkbox and attaching it\n // via aria-labelledby allows screen readers to find and work with the link within the label.\n if (labelHasLink) {\n var labelId = 'label-' + $mdUtil.nextUid();\n attr.$set('aria-labelledby', labelId);\n\n var label = element.children()[1];\n // Use jQLite here since ChildNode.remove() is not supported in IE11.\n angular.element(label).remove();\n label.removeAttribute('ng-transclude');\n label.className = 'md-checkbox-link-label';\n label.setAttribute('id', labelId);\n element.after(label);\n // Make sure that clicking on the label still causes the checkbox to be toggled, when appropriate.\n var externalLabel = element.next();\n externalLabel.on('click', listener);\n }\n\n if (containerCtrl) {\n var isErrorGetter = containerCtrl.isErrorGetter || function() {\n return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (formCtrl && formCtrl.$submitted));\n };\n\n containerCtrl.input = element;\n\n scope.$watch(isErrorGetter, containerCtrl.setInvalid);\n }\n\n $mdTheming(element);\n\n // Redirect focus events to the root element, because IE11 is always focusing the container element instead\n // of the md-checkbox element. This causes issues when using ngModelOptions: `updateOnBlur`\n element.children().on('focus', function() {\n element.focus();\n });\n\n if ($mdUtil.parseAttributeBoolean(attr.mdIndeterminate)) {\n setIndeterminateState();\n scope.$watch(attr.mdIndeterminate, setIndeterminateState);\n }\n\n if (attr.ngChecked) {\n scope.$watch(scope.$eval.bind(scope, attr.ngChecked), function(value) {\n ngModelCtrl.$setViewValue(value);\n ngModelCtrl.$render();\n });\n }\n\n $$watchExpr('ngDisabled', 'tabindex', {\n true: '-1',\n false: attr.tabindex\n });\n\n // Don't emit a warning when the label has a link within it. In that case we'll use\n // aria-labelledby to point to another span that should be read as the label.\n if (!labelHasLink) {\n $mdAria.expectWithText(element, 'aria-label');\n }\n\n // Reuse the original input[type=checkbox] directive from AngularJS core.\n // This is a bit hacky as we need our own event listener and own render\n // function.\n inputDirective.link.pre(scope, {\n on: angular.noop,\n 0: {}\n }, attr, [ngModelCtrl]);\n\n element.on('click', listener)\n .on('keypress', keypressHandler)\n .on('focus', function() {\n if ($mdInteraction.getLastInteractionType() === 'keyboard') {\n element.addClass('md-focused');\n }\n })\n .on('blur', function() {\n element.removeClass('md-focused');\n });\n\n ngModelCtrl.$render = render;\n\n function $$watchExpr(expr, htmlAttr, valueOpts) {\n if (attr[expr]) {\n scope.$watch(attr[expr], function(val) {\n if (valueOpts[val]) {\n element.attr(htmlAttr, valueOpts[val]);\n }\n });\n }\n }\n\n /**\n * @param {KeyboardEvent} ev 'keypress' event to handle\n */\n function keypressHandler(ev) {\n var keyCode = ev.which || ev.keyCode;\n var submit, form;\n\n ev.preventDefault();\n switch (keyCode) {\n case $mdConstant.KEY_CODE.SPACE:\n element.addClass('md-focused');\n listener(ev);\n break;\n case $mdConstant.KEY_CODE.ENTER:\n // Match the behavior of the native <input type=\"checkbox\">.\n // When the enter key is pressed while focusing a native checkbox inside a form,\n // the browser will trigger a `click` on the first non-disabled submit button/input\n // in the form. Note that this is different from text inputs, which\n // will directly submit the form without needing a submit button/input to be present.\n form = $mdUtil.getClosest(ev.target, 'form');\n if (form) {\n submit = form.querySelector('button[type=\"submit\"]:enabled, input[type=\"submit\"]:enabled');\n if (submit) {\n submit.click();\n }\n }\n break;\n }\n }\n\n function listener(ev) {\n // skipToggle boolean is used by the switch directive to prevent the click event\n // when releasing the drag. There will be always a click if releasing the drag over the checkbox.\n // If the click came from a link in the checkbox, don't toggle the value.\n // We want the link to be opened without changing the value in this case.\n if (element[0].hasAttribute('disabled') || scope.skipToggle || ev.target.tagName === 'A') {\n return;\n }\n\n scope.$apply(function() {\n // Toggle the checkbox value...\n var viewValue = attr.ngChecked && attr.ngClick ? attr.checked : !ngModelCtrl.$viewValue;\n\n ngModelCtrl.$setViewValue(viewValue, ev && ev.type);\n ngModelCtrl.$render();\n });\n }\n\n function render() {\n // Cast the $viewValue to a boolean since it could be undefined\n var checked = !!ngModelCtrl.$viewValue && !isIndeterminate;\n element.toggleClass('md-checked', checked);\n if (!isIndeterminate) {\n if (checked) {\n element.attr('aria-checked', 'true');\n } else {\n element.attr('aria-checked', 'false');\n }\n }\n }\n\n /**\n * @param {string=} newValue\n */\n function setIndeterminateState(newValue) {\n isIndeterminate = newValue !== false;\n if (isIndeterminate) {\n element.attr('aria-checked', 'mixed');\n }\n element.toggleClass('md-indeterminate', isIndeterminate);\n ngModelCtrl.$render();\n }\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.chips\n */\n/*\n * @see js folder for chips implementation\n */\nangular.module('material.components.chips', [\n 'material.core',\n 'material.components.autocomplete'\n]);\n\n})();\n(function(){\n\"use strict\";\n\n\nMdChipCtrl.$inject = [\"$scope\", \"$element\", \"$mdConstant\", \"$timeout\", \"$mdUtil\"];angular\n .module('material.components.chips')\n .controller('MdChipCtrl', MdChipCtrl);\n\n/**\n * Controller for the MdChip component. Responsible for handling keyboard\n * events and editing the chip if needed.\n *\n * @param $scope\n * @param $element\n * @param $mdConstant\n * @param $timeout\n * @param $mdUtil\n * @constructor\n */\nfunction MdChipCtrl ($scope, $element, $mdConstant, $timeout, $mdUtil) {\n /**\n * @type {$scope}\n */\n this.$scope = $scope;\n\n /**\n * @type {$element}\n */\n this.$element = $element;\n\n /**\n * @type {$mdConstant}\n */\n this.$mdConstant = $mdConstant;\n\n /**\n * @type {$timeout}\n */\n this.$timeout = $timeout;\n\n /**\n * @type {$mdUtil}\n */\n this.$mdUtil = $mdUtil;\n\n /**\n * @type {boolean}\n */\n this.isEditing = false;\n\n /**\n * @type {MdChipsCtrl}\n */\n this.parentController = undefined;\n\n /**\n * @type {boolean}\n */\n this.enableChipEdit = false;\n}\n\n\n/**\n * @param {MdChipsCtrl} controller\n */\nMdChipCtrl.prototype.init = function(controller) {\n this.parentController = controller;\n this.enableChipEdit = this.parentController.enableChipEdit;\n\n if (this.enableChipEdit) {\n this.$element.on('keydown', this.chipKeyDown.bind(this));\n this.$element.on('dblclick', this.chipMouseDoubleClick.bind(this));\n this.getChipContent().addClass('_md-chip-content-edit-is-enabled');\n }\n};\n\n\n/**\n * @return {Object} first element with the md-chip-content class\n */\nMdChipCtrl.prototype.getChipContent = function() {\n var chipContents = this.$element[0].getElementsByClassName('md-chip-content');\n return angular.element(chipContents[0]);\n};\n\n\n/**\n * When editing the chip, if the user modifies the existing contents, we'll get a span back and\n * need to ignore text elements as they only contain blank space.\n * `children()` ignores text elements.\n *\n * When editing the chip, if the user deletes the contents and then enters some new content\n * we'll only get a text element back.\n * @return {Object} jQuery object representing the content element of the chip\n */\nMdChipCtrl.prototype.getContentElement = function() {\n var contentElement = angular.element(this.getChipContent().children()[0]);\n if (!contentElement || contentElement.length === 0) {\n contentElement = angular.element(this.getChipContent().contents()[0]);\n }\n return contentElement;\n};\n\n\n/**\n * @return {number} index of this chip\n */\nMdChipCtrl.prototype.getChipIndex = function() {\n return parseInt(this.$element.attr('index'));\n};\n\n\n/**\n * Update the chip's contents, focus the chip if it's selected, and exit edit mode.\n * If the contents were updated to be empty, remove the chip and re-focus the input element.\n */\nMdChipCtrl.prototype.goOutOfEditMode = function() {\n if (!this.isEditing) {\n return;\n }\n\n this.isEditing = false;\n this.$element.removeClass('_md-chip-editing');\n this.getChipContent()[0].contentEditable = 'false';\n var chipIndex = this.getChipIndex();\n\n var content = this.getContentElement().text();\n if (content) {\n this.parentController.updateChipContents(chipIndex, content);\n\n this.$mdUtil.nextTick(function() {\n if (this.parentController.selectedChip === chipIndex) {\n this.parentController.focusChip(chipIndex);\n }\n }.bind(this));\n } else {\n this.parentController.removeChipAndFocusInput(chipIndex);\n }\n};\n\n\n/**\n * Given an HTML element. Selects contents of it.\n * @param {Element} node\n */\nMdChipCtrl.prototype.selectNodeContents = function(node) {\n var range, selection;\n if (document.body.createTextRange) {\n range = document.body.createTextRange();\n range.moveToElementText(node);\n range.select();\n } else if (window.getSelection) {\n selection = window.getSelection();\n range = document.createRange();\n range.selectNodeContents(node);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n};\n\n\n/**\n * Presents an input element to edit the contents of the chip.\n */\nMdChipCtrl.prototype.goInEditMode = function() {\n this.isEditing = true;\n this.$element.addClass('_md-chip-editing');\n this.getChipContent()[0].contentEditable = 'true';\n this.getChipContent().on('blur', function() {\n this.goOutOfEditMode();\n }.bind(this));\n\n this.selectNodeContents(this.getChipContent()[0]);\n};\n\n\n/**\n * Handles the keydown event on the chip element. If enable-chip-edit attribute is\n * set to true, space or enter keys can trigger going into edit mode. Enter can also\n * trigger submitting if the chip is already being edited.\n * @param {KeyboardEvent} event\n */\nMdChipCtrl.prototype.chipKeyDown = function(event) {\n if (!this.isEditing &&\n (event.keyCode === this.$mdConstant.KEY_CODE.ENTER ||\n event.keyCode === this.$mdConstant.KEY_CODE.SPACE)) {\n event.preventDefault();\n this.goInEditMode();\n } else if (this.isEditing && event.keyCode === this.$mdConstant.KEY_CODE.ENTER) {\n event.preventDefault();\n this.goOutOfEditMode();\n }\n};\n\n\n/**\n * Enter edit mode if we're not already editing and the enable-chip-edit attribute is enabled.\n */\nMdChipCtrl.prototype.chipMouseDoubleClick = function() {\n if (this.enableChipEdit && !this.isEditing) {\n this.goInEditMode();\n }\n};\n\n})();\n(function(){\n\"use strict\";\n\n\nMdChip.$inject = [\"$mdTheming\", \"$mdUtil\", \"$compile\", \"$timeout\"];angular\n .module('material.components.chips')\n .directive('mdChip', MdChip);\n\n/**\n * @ngdoc directive\n * @name mdChip\n * @module material.components.chips\n *\n * @description\n * `<md-chip>` is a component used within `<md-chips>`. It is responsible for rendering an\n * individual chip.\n *\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-chips>\n * <md-chip>{{$chip}}</md-chip>\n * </md-chips>\n * </hljs>\n *\n */\n\n/**\n * MDChip Directive Definition\n *\n * @param $mdTheming\n * @param $mdUtil\n * @param $compile\n * @param $timeout\n * @ngInject\n */\nfunction MdChip($mdTheming, $mdUtil, $compile, $timeout) {\n return {\n restrict: 'E',\n require: ['^?mdChips', 'mdChip'],\n link: postLink,\n controller: 'MdChipCtrl'\n };\n\n function postLink(scope, element, attr, ctrls) {\n var chipsController = ctrls.shift();\n var chipController = ctrls.shift();\n var chipContentElement = angular.element(element[0].querySelector('.md-chip-content'));\n\n $mdTheming(element);\n\n if (chipsController) {\n chipController.init(chipsController);\n\n // When a chip is blurred, make sure to unset (or reset) the selected chip so that tabbing\n // through elements works properly\n chipContentElement.on('blur', function() {\n chipsController.resetSelectedChip();\n chipsController.$scope.$applyAsync();\n });\n }\n\n // Use $timeout to ensure we run AFTER the element has been added to the DOM so we can focus it.\n $timeout(function() {\n if (!chipsController) {\n return;\n }\n\n if (chipsController.shouldFocusLastChip) {\n chipsController.focusLastChipThenInput();\n }\n });\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdChipRemove.$inject = [\"$timeout\"];angular\n .module('material.components.chips')\n .directive('mdChipRemove', MdChipRemove);\n\n/**\n * @ngdoc directive\n * @name mdChipRemove\n * @restrict A\n * @module material.components.chips\n *\n * @description\n * Indicates that the associated element should be used as the delete button template for all chips.\n * The associated element must be a child of `md-chips`.\n *\n * The provided button template will be appended to each chip and will remove the associated chip\n * on click.\n *\n * The button is not styled or themed based on the theme set on the `md-chips` component. A theme\n * class and custom icon can be specified in your template.\n *\n * You can also specify the `type` of the button in your template.\n *\n * @usage\n * ### With Standard Chips\n * <hljs lang=\"html\">\n * <md-chips ...>\n * <button md-chip-remove type=\"button\" aria-label=\"Remove {{$chip}}\">\n * <md-icon md-svg-icon=\"md-cancel\"></md-icon>\n * </button>\n * </md-chips>\n * </hljs>\n *\n * ### With Object Chips\n * <hljs lang=\"html\">\n * <md-chips ...>\n * <button md-chip-remove type=\"button\" aria-label=\"Remove {{$chip.name}}\">\n * <md-icon md-svg-icon=\"md-cancel\"></md-icon>\n * </button>\n * </md-chips>\n * </hljs>\n */\n\n\n/**\n * MdChipRemove Directive Definition.\n *\n * @param $timeout\n * @returns {{restrict: string, require: string[], link: Function, scope: boolean}}\n * @constructor\n */\nfunction MdChipRemove ($timeout) {\n return {\n restrict: 'A',\n require: '^mdChips',\n scope: false,\n link: postLink\n };\n\n function postLink(scope, element, attr, ctrl) {\n element.on('click', function() {\n scope.$apply(function() {\n ctrl.removeChip(scope.$$replacedScope.$index);\n });\n });\n\n // Child elements aren't available until after a $timeout tick as they are hidden by an\n // `ng-if`. see http://goo.gl/zIWfuw\n $timeout(function() {\n element.attr({ 'tabindex': '-1', 'aria-hidden': 'true' });\n element.find('button').attr('tabindex', '-1');\n });\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdChipTransclude.$inject = [\"$compile\"];angular\n .module('material.components.chips')\n .directive('mdChipTransclude', MdChipTransclude);\n\nfunction MdChipTransclude ($compile) {\n return {\n restrict: 'EA',\n terminal: true,\n link: link,\n scope: false\n };\n function link (scope, element, attr) {\n var ctrl = scope.$parent.$mdChipsCtrl,\n newScope = ctrl.parent.$new(false, ctrl.parent);\n newScope.$$replacedScope = scope;\n newScope.$chip = scope.$chip;\n newScope.$index = scope.$index;\n newScope.$mdChipsCtrl = ctrl;\n\n var newHtml = ctrl.$scope.$eval(attr.mdChipTransclude);\n\n element.html(newHtml);\n $compile(element.contents())(newScope);\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * The default chip append delay.\n *\n * @type {number}\n */\nMdChipsCtrl.$inject = [\"$scope\", \"$attrs\", \"$mdConstant\", \"$log\", \"$element\", \"$timeout\", \"$mdUtil\", \"$mdLiveAnnouncer\", \"$exceptionHandler\"];\nvar DEFAULT_CHIP_APPEND_DELAY = 300;\n\nangular\n .module('material.components.chips')\n .controller('MdChipsCtrl', MdChipsCtrl);\n\n/**\n * Controller for the MdChips component. Responsible for adding to and\n * removing from the list of chips, marking chips as selected, and binding to\n * the models of various input components.\n *\n * @param $scope\n * @param $attrs\n * @param $mdConstant\n * @param $log\n * @param $element\n * @param $timeout\n * @param $mdUtil\n * @param $mdLiveAnnouncer\n * @param $exceptionHandler\n * @constructor\n */\nfunction MdChipsCtrl ($scope, $attrs, $mdConstant, $log, $element, $timeout, $mdUtil,\n $mdLiveAnnouncer, $exceptionHandler) {\n /** @type {Function} **/\n this.$timeout = $timeout;\n\n /** @type {Object} */\n this.$mdConstant = $mdConstant;\n\n /** @type {angular.$scope} */\n this.$scope = $scope;\n\n /** @type {angular.$scope} */\n this.parent = $scope.$parent;\n\n /** @type {$mdUtil} */\n this.$mdUtil = $mdUtil;\n\n /** @type {$log} */\n this.$log = $log;\n\n /** @type {$mdLiveAnnouncer} */\n this.$mdLiveAnnouncer = $mdLiveAnnouncer;\n\n /** @type {$exceptionHandler} */\n this.$exceptionHandler = $exceptionHandler;\n\n /** @type {$element} */\n this.$element = $element;\n\n /** @type {$attrs} */\n this.$attrs = $attrs;\n\n /** @type {angular.NgModelController} */\n this.ngModelCtrl = null;\n\n /** @type {angular.NgModelController} */\n this.userInputNgModelCtrl = null;\n\n /** @type {MdAutocompleteCtrl} */\n this.autocompleteCtrl = null;\n\n /** @type {Element} */\n this.userInputElement = null;\n\n /** @type {Array.<Object>} */\n this.items = [];\n\n /** @type {number} */\n this.selectedChip = -1;\n\n /** @type {string} */\n this.enableChipEdit = $mdUtil.parseAttributeBoolean($attrs.mdEnableChipEdit);\n\n /** @type {string} */\n this.addOnBlur = $mdUtil.parseAttributeBoolean($attrs.mdAddOnBlur);\n\n /**\n * The class names to apply to the autocomplete or input.\n * @type {string}\n */\n this.inputClass = '';\n\n /**\n * The text to be used as the aria-label for the input.\n * @type {string}\n */\n this.inputAriaLabel = 'Chips input.';\n\n /**\n * Label text to describe the chips container. Used to give context and instructions to screen\n * reader users when the chips container is selected.\n * @type {string}\n */\n this.containerHint = 'Chips container. Use arrow keys to select chips.';\n\n /**\n * Label text to describe the chips container when it is empty. Used to give context and\n * instructions to screen reader users when the chips container is selected and it contains\n * no chips.\n * @type {string}\n */\n this.containerEmptyHint =\n 'Chips container. Enter the text area, then type text, and press enter to add a chip.';\n\n /**\n * Hidden hint text for how to delete a chip. Used to give context to screen readers.\n * @type {string}\n */\n this.deleteHint = 'Press delete to remove this chip.';\n\n /**\n * Hidden label for the delete button. Used to give context to screen readers.\n * @type {string}\n */\n this.deleteButtonLabel = 'Remove';\n\n /**\n * Model used by the input element.\n * @type {string}\n */\n this.chipBuffer = '';\n\n /**\n * Whether to use the transformChip expression to transform the chip buffer\n * before appending it to the list.\n * @type {boolean}\n */\n this.useTransformChip = false;\n\n /**\n * Whether to use the onAdd expression to notify of chip additions.\n * @type {boolean}\n */\n this.useOnAdd = false;\n\n /**\n * Whether to use the onRemove expression to notify of chip removals.\n * @type {boolean}\n */\n this.useOnRemove = false;\n\n /**\n * The ID of the chips wrapper which is used to build unique IDs for the chips and the aria-owns\n * attribute.\n *\n * Defaults to '_md-chips-wrapper-' plus a unique number.\n *\n * @type {string}\n */\n this.wrapperId = '';\n\n /**\n * Array of unique numbers which will be auto-generated any time the items change, and is used to\n * create unique IDs for the aria-owns attribute.\n *\n * @type {Array<number>}\n */\n this.contentIds = [];\n\n /**\n * The index of the chip that should have it's `tabindex` property set to `0` so it is selectable\n * via the keyboard.\n *\n * @type {number|null}\n */\n this.ariaTabIndex = null;\n\n /**\n * After appending a chip, the chip will be focused for this number of milliseconds before the\n * input is refocused.\n *\n * **Note:** This is **required** for compatibility with certain screen readers in order for\n * them to properly allow keyboard access.\n *\n * @type {number}\n */\n this.chipAppendDelay = DEFAULT_CHIP_APPEND_DELAY;\n\n /**\n * Collection of functions to call to un-register watchers\n *\n * @type {Array}\n */\n this.deRegister = [];\n\n /**\n * The screen reader will announce the chip content followed by this message when a chip is added.\n * @type {string}\n */\n this.addedMessage = 'added';\n\n /**\n * The screen reader will announce the chip content followed by this message when a chip is\n * removed.\n * @type {string}\n */\n this.removedMessage = 'removed';\n\n this.init();\n}\n\n/**\n * Initializes variables and sets up watchers\n */\nMdChipsCtrl.prototype.init = function() {\n var ctrl = this;\n\n // Set the wrapper ID\n this.wrapperId = '_md-chips-wrapper-' + this.$mdUtil.nextUid();\n\n // If we're using static chips, then we need to initialize a few things.\n if (!this.$element.attr('ng-model')) {\n this.setupStaticChips();\n }\n\n // Setup a watcher which manages the role and aria-owns attributes.\n // This is never called for static chips since items is not defined.\n this.deRegister.push(\n this.$scope.$watchCollection('$mdChipsCtrl.items', function() {\n // Make sure our input and wrapper have the correct ARIA attributes\n ctrl.setupInputAria();\n ctrl.setupWrapperAria();\n })\n );\n\n this.deRegister.push(\n this.$attrs.$observe('mdChipAppendDelay', function(newValue) {\n ctrl.chipAppendDelay = parseInt(newValue) || DEFAULT_CHIP_APPEND_DELAY;\n })\n );\n};\n\n/**\n * Destructor for cleanup\n */\nMdChipsCtrl.prototype.$onDestroy = function $onDestroy() {\n var $destroyFn;\n while (($destroyFn = this.deRegister.pop())) {\n $destroyFn.call(this);\n }\n};\n\n/**\n * If we have an input, ensure it has the appropriate ARIA attributes.\n */\nMdChipsCtrl.prototype.setupInputAria = function() {\n var input = this.$element.find('input');\n\n // If we have no input, just return\n if (!input) {\n return;\n }\n\n input.attr('role', 'textbox');\n input.attr('aria-multiline', true);\n if (this.inputAriaDescribedBy) {\n input.attr('aria-describedby', this.inputAriaDescribedBy);\n }\n if (this.inputAriaLabelledBy) {\n input.attr('aria-labelledby', this.inputAriaLabelledBy);\n input.removeAttr('aria-label');\n } else {\n input.attr('aria-label', this.inputAriaLabel);\n }\n};\n\n/**\n * Ensure our wrapper has the appropriate ARIA attributes.\n */\nMdChipsCtrl.prototype.setupWrapperAria = function() {\n var ctrl = this,\n wrapper = this.$element.find('md-chips-wrap');\n\n if (this.items && this.items.length) {\n // Dynamically add the listbox role on every change because it must be removed when there are\n // no items.\n wrapper.attr('role', 'listbox');\n\n // Generate some random (but unique) IDs for each chip\n this.contentIds = this.items.map(function() {\n return ctrl.wrapperId + '-chip-' + ctrl.$mdUtil.nextUid();\n });\n\n // Use the contentIDs above to generate the aria-owns attribute\n wrapper.attr('aria-owns', this.contentIds.join(' '));\n wrapper.attr('aria-label', this.containerHint);\n } else {\n // If we have no items, then the role and aria-owns attributes MUST be removed\n wrapper.removeAttr('role');\n wrapper.removeAttr('aria-owns');\n wrapper.attr('aria-label', this.containerEmptyHint);\n }\n};\n\n/**\n * Apply specific roles and aria attributes for static chips\n */\nMdChipsCtrl.prototype.setupStaticChips = function() {\n var ctrl = this, i, staticChips;\n var wrapper = this.$element.find('md-chips-wrap');\n\n this.$timeout(function() {\n wrapper.attr('role', 'list');\n staticChips = wrapper[0].children;\n for (i = 0; i < staticChips.length; i++) {\n staticChips[i].setAttribute('role', 'listitem');\n staticChips[i].setAttribute('aria-setsize', staticChips.length);\n }\n if (ctrl.inputAriaDescribedBy) {\n wrapper.attr('aria-describedby', ctrl.inputAriaDescribedBy);\n }\n if (ctrl.inputAriaLabelledBy) {\n wrapper.attr('aria-labelledby', ctrl.inputAriaLabelledBy);\n wrapper.removeAttr('aria-label');\n } else {\n wrapper.attr('aria-label', ctrl.inputAriaLabel);\n }\n }, 10);\n};\n\n/**\n * Handles the keydown event on the input element: by default <enter> appends\n * the buffer to the chip list, while backspace removes the last chip in the\n * list if the current buffer is empty.\n * @param {jQuery.Event|KeyboardEvent} event\n */\nMdChipsCtrl.prototype.inputKeydown = function(event) {\n var chipBuffer = this.getChipBuffer();\n\n // If we have an autocomplete, and it handled the event, we have nothing to do\n if (this.autocompleteCtrl && event.isDefaultPrevented && event.isDefaultPrevented()) {\n return;\n }\n\n if (event.keyCode === this.$mdConstant.KEY_CODE.BACKSPACE) {\n // Only select and focus the previous chip, if the current caret position of the\n // input element is at the beginning.\n if (this.getCursorPosition(event.target) !== 0) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (this.items.length) {\n this.selectAndFocusChipSafe(this.items.length - 1);\n }\n\n return;\n }\n\n // By default <enter> appends the buffer to the chip list.\n if (!this.separatorKeys || this.separatorKeys.length < 1) {\n this.separatorKeys = [this.$mdConstant.KEY_CODE.ENTER];\n }\n\n // Support additional separator key codes in an array of `md-separator-keys`.\n if (this.separatorKeys.indexOf(event.keyCode) !== -1) {\n if ((this.autocompleteCtrl && this.requireMatch) || !chipBuffer) return;\n event.preventDefault();\n\n // Only append the chip and reset the chip buffer if the max chips limit isn't reached.\n if (this.hasMaxChipsReached()) return;\n\n this.appendChip(chipBuffer.trim());\n this.resetChipBuffer();\n\n return false;\n }\n};\n\n/**\n * Returns the cursor position of the specified input element.\n * @param {HTMLInputElement} element relevant input element\n * @returns {Number} Cursor Position of the input.\n */\nMdChipsCtrl.prototype.getCursorPosition = function(element) {\n /*\n * Figure out whether the current input for the chips buffer is valid for using\n * the selectionStart / end property to retrieve the cursor position.\n * Some browsers do not allow the use of those attributes, on different input types.\n */\n try {\n if (element.selectionStart === element.selectionEnd) {\n return element.selectionStart;\n }\n } catch (e) {\n if (!element.value) {\n return 0;\n }\n }\n};\n\n\n/**\n * Updates the content of the chip at given index\n * @param {number} chipIndex\n * @param {string} chipContents\n */\nMdChipsCtrl.prototype.updateChipContents = function(chipIndex, chipContents) {\n if (chipIndex >= 0 && chipIndex < this.items.length) {\n this.items[chipIndex] = chipContents;\n this.updateNgModel(true);\n }\n};\n\n\n/**\n * @return {boolean} true if a chip is currently being edited. False otherwise.\n */\nMdChipsCtrl.prototype.isEditingChip = function() {\n return !!this.$element[0].querySelector('._md-chip-editing');\n};\n\n/**\n * @param {string|Object} chip contents of a single chip\n * @returns {boolean} true if the chip is an Object, false otherwise.\n * @private\n */\nMdChipsCtrl.prototype._isChipObject = function(chip) {\n return angular.isObject(chip);\n};\n\n/**\n * @returns {boolean} true if chips can be removed, false otherwise.\n */\nMdChipsCtrl.prototype.isRemovable = function() {\n // Return false if we have static chips\n if (!this.ngModelCtrl) {\n return false;\n }\n\n return this.readonly ? this.removable :\n angular.isDefined(this.removable) ? this.removable : true;\n};\n\n/**\n * Handles the keydown event on the chip elements: backspace removes the selected chip, arrow\n * keys switch which chip is active.\n * @param {KeyboardEvent} event\n */\nMdChipsCtrl.prototype.chipKeydown = function (event) {\n if (this.getChipBuffer()) return;\n if (this.isEditingChip()) return;\n\n switch (event.keyCode) {\n case this.$mdConstant.KEY_CODE.BACKSPACE:\n case this.$mdConstant.KEY_CODE.DELETE:\n if (this.selectedChip < 0) return;\n event.preventDefault();\n // Cancel the delete action only after the event cancel. Otherwise the page will go back.\n if (!this.isRemovable()) return;\n this.removeAndSelectAdjacentChip(this.selectedChip, event);\n break;\n case this.$mdConstant.KEY_CODE.LEFT_ARROW:\n event.preventDefault();\n // By default, allow selection of -1 which will focus the input; if we're readonly, don't go\n // below 0.\n if (this.selectedChip < 0 || (this.readonly && this.selectedChip === 0)) {\n this.selectedChip = this.items.length;\n }\n if (this.items.length) this.selectAndFocusChipSafe(this.selectedChip - 1);\n break;\n case this.$mdConstant.KEY_CODE.RIGHT_ARROW:\n event.preventDefault();\n this.selectAndFocusChipSafe(this.selectedChip + 1);\n break;\n case this.$mdConstant.KEY_CODE.ESCAPE:\n case this.$mdConstant.KEY_CODE.TAB:\n if (this.selectedChip < 0) return;\n event.preventDefault();\n this.onFocus();\n break;\n }\n};\n\n/**\n * Get the input's placeholder - uses `placeholder` when list is empty and `secondary-placeholder`\n * when the list is non-empty. If `secondary-placeholder` is not provided, `placeholder` is used\n * always.\n * @returns {string}\n */\nMdChipsCtrl.prototype.getPlaceholder = function() {\n // Allow `secondary-placeholder` to be blank.\n var useSecondary = (this.items && this.items.length &&\n (this.secondaryPlaceholder === '' || this.secondaryPlaceholder));\n return useSecondary ? this.secondaryPlaceholder : this.placeholder;\n};\n\n/**\n * Removes chip at {@code index} and selects the adjacent chip.\n * @param {number} index adjacent chip to select\n * @param {Event=} event\n */\nMdChipsCtrl.prototype.removeAndSelectAdjacentChip = function(index, event) {\n var self = this;\n var selIndex = self.getAdjacentChipIndex(index);\n var wrap = this.$element[0].querySelector('md-chips-wrap');\n var chip = this.$element[0].querySelector('md-chip[index=\"' + index + '\"]');\n\n self.removeChip(index, event);\n\n // The double-timeout is currently necessary to ensure that the DOM has finalized and the select()\n // will find the proper chip since the selection is index-based.\n //\n // TODO: Investigate calling from within chip $scope.$on('$destroy') to reduce/remove timeouts\n self.$timeout(function() {\n self.$timeout(function() {\n self.selectAndFocusChipSafe(selIndex);\n });\n });\n};\n\n/**\n * Sets the selected chip index to -1.\n */\nMdChipsCtrl.prototype.resetSelectedChip = function() {\n this.selectedChip = -1;\n this.ariaTabIndex = null;\n};\n\n/**\n * Gets the index of an adjacent chip to select after deletion. Adjacency is\n * determined as the next chip in the list, unless the target chip is the\n * last in the list, then it is the chip immediately preceding the target. If\n * there is only one item in the list, -1 is returned (select none).\n * The number returned is the index to select AFTER the target has been removed.\n * If the current chip is not selected, then -1 is returned to select none.\n * @param {number} index\n * @returns {number}\n */\nMdChipsCtrl.prototype.getAdjacentChipIndex = function(index) {\n var len = this.items.length - 1;\n return (len === 0) ? -1 :\n (index === len) ? index - 1 : index;\n};\n\n/**\n * Append the contents of the buffer to the chip list. This method will first\n * call out to the md-transform-chip method, if provided.\n * @param {string} newChip chip buffer contents that will be used to create the new chip\n */\nMdChipsCtrl.prototype.appendChip = function(newChip) {\n this.shouldFocusLastChip = !this.addOnBlur;\n if (this.useTransformChip && this.transformChip) {\n var transformedChip = this.transformChip({'$chip': newChip});\n\n // Check to make sure the chip is defined before assigning it, otherwise, we'll just assume\n // they want the string version.\n if (angular.isDefined(transformedChip)) {\n newChip = transformedChip;\n }\n }\n\n // If items contains an identical object to newChip, do not append\n if (angular.isObject(newChip)) {\n var identical = this.items.some(function(item) {\n return angular.equals(newChip, item);\n });\n if (identical) return;\n }\n\n // Check for a null (but not undefined), or existing chip and cancel appending\n if (newChip == null || this.items.indexOf(newChip) + 1) return;\n\n // Append the new chip onto our list\n var length = this.items.push(newChip);\n var index = length - 1;\n\n this.updateNgModel();\n\n // Tell screen reader users that the chip was successfully added.\n // TODO add a way for developers to specify which field of the object should be announced here.\n var chipContent = angular.isObject(newChip) ? '' : newChip;\n this.$mdLiveAnnouncer.announce(chipContent + ' ' + this.addedMessage, 'assertive');\n\n // If the md-on-add attribute is specified, send a chip addition event\n if (this.useOnAdd && this.onAdd) {\n this.onAdd({ '$chip': newChip, '$index': index });\n }\n};\n\n/**\n * Sets whether to use the md-transform-chip expression. This expression is\n * bound to scope and controller in {@code MdChipsDirective} as\n * {@code transformChip}. Due to the nature of directive scope bindings, the\n * controller cannot know on its own/from the scope whether an expression was\n * actually provided.\n */\nMdChipsCtrl.prototype.useTransformChipExpression = function() {\n this.useTransformChip = true;\n};\n\n/**\n * Sets whether to use the md-on-add expression. This expression is\n * bound to scope and controller in {@code MdChipsDirective} as\n * {@code onAdd}. Due to the nature of directive scope bindings, the\n * controller cannot know on its own/from the scope whether an expression was\n * actually provided.\n */\nMdChipsCtrl.prototype.useOnAddExpression = function() {\n this.useOnAdd = true;\n};\n\n/**\n * Sets whether to use the md-on-remove expression. This expression is\n * bound to scope and controller in {@code MdChipsDirective} as\n * {@code onRemove}. Due to the nature of directive scope bindings, the\n * controller cannot know on its own/from the scope whether an expression was\n * actually provided.\n */\nMdChipsCtrl.prototype.useOnRemoveExpression = function() {\n this.useOnRemove = true;\n};\n\n/**\n * Sets whether to use the md-on-select expression. This expression is\n * bound to scope and controller in {@code MdChipsDirective} as\n * {@code onSelect}. Due to the nature of directive scope bindings, the\n * controller cannot know on its own/from the scope whether an expression was\n * actually provided.\n */\nMdChipsCtrl.prototype.useOnSelectExpression = function() {\n this.useOnSelect = true;\n};\n\n/**\n * Gets the input buffer. The input buffer can be the model bound to the\n * default input item {@code this.chipBuffer}, the {@code selectedItem}\n * model of an {@code md-autocomplete}, or, through some magic, the model\n * bound to any input or text area element found within a\n * {@code md-input-container} element.\n * @return {string} the input buffer\n */\nMdChipsCtrl.prototype.getChipBuffer = function() {\n var chipBuffer = !this.userInputElement ? this.chipBuffer :\n this.userInputNgModelCtrl ? this.userInputNgModelCtrl.$viewValue :\n this.userInputElement[0].value;\n\n // Ensure that the chip buffer is always a string. For example, the input element buffer\n // might be falsy.\n return angular.isString(chipBuffer) ? chipBuffer : '';\n};\n\n/**\n * Resets the input buffer for either the internal input or user provided input element.\n */\nMdChipsCtrl.prototype.resetChipBuffer = function() {\n if (this.userInputElement) {\n if (this.userInputNgModelCtrl) {\n this.userInputNgModelCtrl.$setViewValue('');\n this.userInputNgModelCtrl.$render();\n } else {\n this.userInputElement[0].value = '';\n }\n } else {\n this.chipBuffer = '';\n }\n};\n\n/**\n * @returns {boolean} true if the max chips limit has been reached, false otherwise.\n */\nMdChipsCtrl.prototype.hasMaxChipsReached = function() {\n if (angular.isString(this.maxChips)) {\n this.maxChips = parseInt(this.maxChips, 10) || 0;\n }\n\n return this.maxChips > 0 && this.items.length >= this.maxChips;\n};\n\n/**\n * Updates the validity properties for the ngModel.\n *\n * TODO add the md-max-chips validator to this.ngModelCtrl.validators so that the validation will\n * be performed automatically.\n */\nMdChipsCtrl.prototype.validateModel = function() {\n this.ngModelCtrl.$setValidity('md-max-chips', !this.hasMaxChipsReached());\n this.ngModelCtrl.$validate(); // rerun any registered validators\n};\n\n/**\n * Function to handle updating the model, validation, and change notification when a chip\n * is added, removed, or changed.\n * @param {boolean=} skipValidation true to skip calling validateModel()\n */\nMdChipsCtrl.prototype.updateNgModel = function(skipValidation) {\n if (!skipValidation) {\n this.validateModel();\n }\n // This will trigger ng-change to fire, even in cases where $setViewValue() would not.\n angular.forEach(this.ngModelCtrl.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch (e) {\n this.$exceptionHandler(e);\n }\n });\n};\n\n/**\n * Removes the chip at the given index.\n * @param {number} index of chip to remove\n * @param {Event=} event optionally passed to the onRemove callback\n */\nMdChipsCtrl.prototype.removeChip = function(index, event) {\n var removed = this.items.splice(index, 1);\n\n this.updateNgModel();\n this.ngModelCtrl.$setDirty();\n\n // Tell screen reader users that the chip was successfully removed.\n // TODO add a way for developers to specify which field of the object should be announced here.\n var chipContent = angular.isObject(removed[0]) ? '' : removed[0];\n this.$mdLiveAnnouncer.announce(chipContent + ' ' + this.removedMessage, 'assertive');\n\n if (removed && removed.length && this.useOnRemove && this.onRemove) {\n this.onRemove({ '$chip': removed[0], '$index': index, '$event': event });\n }\n};\n\n/**\n * @param {number} index location of chip to remove\n * @param {Event=} $event\n */\nMdChipsCtrl.prototype.removeChipAndFocusInput = function (index, $event) {\n this.removeChip(index, $event);\n\n if (this.autocompleteCtrl) {\n // Always hide the autocomplete dropdown before focusing the autocomplete input.\n // Wait for the input to move horizontally, because the chip was removed.\n // This can lead to an incorrect dropdown position.\n this.autocompleteCtrl.hidden = true;\n this.$mdUtil.nextTick(this.onFocus.bind(this));\n } else {\n this.onFocus();\n }\n\n};\n/**\n * Selects the chip at `index`,\n * @param {number} index location of chip to select and focus\n */\nMdChipsCtrl.prototype.selectAndFocusChipSafe = function(index) {\n // If we have no chips, or are asked to select a chip before the first, just focus the input\n if (!this.items.length || index === -1) {\n return this.focusInput();\n }\n\n // If we are asked to select a chip greater than the number of chips...\n if (index >= this.items.length) {\n if (this.readonly) {\n // If we are readonly, jump back to the start (because we have no input)\n index = 0;\n } else {\n // If we are not readonly, we should attempt to focus the input\n return this.onFocus();\n }\n }\n\n index = Math.max(index, 0);\n index = Math.min(index, this.items.length - 1);\n\n this.selectChip(index);\n this.focusChip(index);\n};\n\n/**\n * Focus last chip, then focus the input. This is needed for screen reader support.\n */\nMdChipsCtrl.prototype.focusLastChipThenInput = function() {\n var ctrl = this;\n\n ctrl.shouldFocusLastChip = false;\n\n ctrl.focusChip(this.items.length - 1);\n\n ctrl.$timeout(function() {\n ctrl.focusInput();\n }, ctrl.chipAppendDelay);\n};\n\n/**\n * Focus the input element.\n */\nMdChipsCtrl.prototype.focusInput = function() {\n this.selectChip(-1);\n this.onFocus();\n};\n\n/**\n * Marks the chip at the given index as selected.\n * @param {number} index location of chip to select\n */\nMdChipsCtrl.prototype.selectChip = function(index) {\n if (index >= -1 && index <= this.items.length) {\n this.selectedChip = index;\n\n // Fire the onSelect if provided\n if (this.useOnSelect && this.onSelect) {\n this.onSelect({'$chip': this.items[index] });\n }\n } else {\n this.$log.warn('Selected Chip index out of bounds; ignoring.');\n }\n};\n\n/**\n * Call {@code focus()} on the chip at {@code index}\n * @param {number} index location of chip to focus\n */\nMdChipsCtrl.prototype.focusChip = function(index) {\n var chipContent = this.$element[0].querySelector(\n 'md-chip[index=\"' + index + '\"] .md-chip-content'\n );\n\n this.ariaTabIndex = index;\n\n chipContent.focus();\n};\n\n/**\n * Configures the required interactions with the ngModel Controller.\n * Specifically, set {@code this.items} to the {@code NgModelController#$viewValue}.\n * @param {NgModelController} ngModelCtrl\n */\nMdChipsCtrl.prototype.configureNgModel = function(ngModelCtrl) {\n this.ngModelCtrl = ngModelCtrl;\n\n var self = this;\n\n // in chips the meaning of $isEmpty changes\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n\n ngModelCtrl.$render = function() {\n // model is updated. do something.\n self.items = self.ngModelCtrl.$viewValue;\n };\n};\n\nMdChipsCtrl.prototype.onFocus = function () {\n var input = this.$element[0].querySelector('input');\n input && input.focus();\n this.resetSelectedChip();\n};\n\nMdChipsCtrl.prototype.onInputFocus = function () {\n this.inputHasFocus = true;\n\n // Make sure we have the appropriate ARIA attributes\n this.setupInputAria();\n\n // Make sure we don't have any chips selected\n this.resetSelectedChip();\n};\n\nMdChipsCtrl.prototype.onInputBlur = function () {\n this.inputHasFocus = false;\n\n if (this.shouldAddOnBlur()) {\n this.appendChip(this.getChipBuffer().trim());\n this.resetChipBuffer();\n }\n};\n\n/**\n * Configure event bindings on input element.\n * @param {angular.element} inputElement\n */\nMdChipsCtrl.prototype.configureInput = function configureInput(inputElement) {\n // Find the NgModelCtrl for the input element\n var ngModelCtrl = inputElement.controller('ngModel');\n var ctrl = this;\n\n if (ngModelCtrl) {\n\n // sync touched-state from inner input to chips-element\n this.deRegister.push(\n this.$scope.$watch(\n function() {\n return ngModelCtrl.$touched;\n },\n function(isTouched) {\n isTouched && ctrl.ngModelCtrl.$setTouched();\n }\n )\n );\n\n // sync dirty-state from inner input to chips-element\n this.deRegister.push(\n this.$scope.$watch(\n function() {\n return ngModelCtrl.$dirty;\n },\n function(isDirty) {\n isDirty && ctrl.ngModelCtrl.$setDirty();\n }\n )\n );\n }\n};\n\n/**\n * Configure event bindings on a user-provided input element.\n * @param {angular.element} inputElement\n */\nMdChipsCtrl.prototype.configureUserInput = function(inputElement) {\n this.userInputElement = inputElement;\n\n // Find the NgModelCtrl for the input element\n var ngModelCtrl = inputElement.controller('ngModel');\n // `.controller` will look in the parent as well.\n if (ngModelCtrl !== this.ngModelCtrl) {\n this.userInputNgModelCtrl = ngModelCtrl;\n }\n\n var scope = this.$scope;\n var ctrl = this;\n\n // Run all of the events using evalAsync because a focus may fire a blur in the same digest loop\n var scopeApplyFn = function(event, fn) {\n scope.$evalAsync(angular.bind(ctrl, fn, event));\n };\n\n // Bind to keydown and focus events of input\n inputElement\n .attr({ tabindex: 0 })\n .on('keydown', function(event) { scopeApplyFn(event, ctrl.inputKeydown); })\n .on('focus', function(event) { scopeApplyFn(event, ctrl.onInputFocus); })\n .on('blur', function(event) { scopeApplyFn(event, ctrl.onInputBlur); });\n};\n\n/**\n * @param {MdAutocompleteCtrl} ctrl controller from the autocomplete component\n */\nMdChipsCtrl.prototype.configureAutocomplete = function(ctrl) {\n if (ctrl) {\n this.autocompleteCtrl = ctrl;\n // Update the default container empty hint when we're inside of an autocomplete.\n if (!this.$element.attr('container-empty-hint')) {\n this.containerEmptyHint = 'Chips container with autocompletion. Enter the text area, ' +\n 'type text to search, and then use the up and down arrow keys to select an option. ' +\n 'Press enter to add the selected option as a chip.';\n this.setupWrapperAria();\n }\n\n ctrl.registerSelectedItemWatcher(angular.bind(this, function (item) {\n if (item) {\n // Only append the chip and reset the chip buffer if the max chips limit isn't reached.\n if (this.hasMaxChipsReached()) return;\n\n this.appendChip(item);\n this.resetChipBuffer();\n }\n }));\n\n this.$element.find('input')\n .on('focus',angular.bind(this, this.onInputFocus))\n .on('blur', angular.bind(this, this.onInputBlur));\n }\n};\n\n/**\n * @returns {boolean} Whether the current chip buffer should be added on input blur or not.\n */\nMdChipsCtrl.prototype.shouldAddOnBlur = function() {\n\n // Update the custom ngModel validators from the chips component.\n this.validateModel();\n\n var chipBuffer = this.getChipBuffer().trim();\n // If the model value is empty and required is set on the element, then the model will be invalid.\n // In that case, we still want to allow adding the chip. The main (but not only) case we want\n // to disallow is adding a chip on blur when md-max-chips validation fails.\n var isModelValid = this.ngModelCtrl.$isEmpty(this.ngModelCtrl.$modelValue) ||\n this.ngModelCtrl.$valid;\n var isAutocompleteShowing = this.autocompleteCtrl && !this.autocompleteCtrl.hidden;\n\n if (this.userInputNgModelCtrl) {\n isModelValid = isModelValid && this.userInputNgModelCtrl.$valid;\n }\n\n return this.addOnBlur && !this.requireMatch && chipBuffer && isModelValid &&\n !isAutocompleteShowing;\n};\n\n/**\n * @returns {boolean} true if the input or a chip is focused. False otherwise.\n */\nMdChipsCtrl.prototype.hasFocus = function () {\n return this.inputHasFocus || this.selectedChip >= 0;\n};\n\n/**\n * @param {number} index location of content id\n * @returns {number} unique id for the aria-owns attribute\n */\nMdChipsCtrl.prototype.contentIdFor = function(index) {\n return this.contentIds[index];\n};\n\n})();\n(function(){\n\"use strict\";\n\n \n MdChips.$inject = [\"$mdTheming\", \"$mdUtil\", \"$compile\", \"$log\", \"$timeout\", \"$$mdSvgRegistry\"];angular\n .module('material.components.chips')\n .directive('mdChips', MdChips);\n\n /**\n * @ngdoc directive\n * @name mdChips\n * @module material.components.chips\n *\n * @description\n * `<md-chips>` is an input component for building lists of strings or objects. The list items are\n * displayed as 'chips'. This component can make use of an `<input>` element or an\n * `<md-autocomplete>` element.\n *\n * ### Custom templates\n * A custom template may be provided to render the content of each chip. This is achieved by\n * specifying an `<md-chip-template>` element containing the custom content as a child of\n * `<md-chips>`.\n *\n * Note: Any attributes on\n * `<md-chip-template>` will be dropped as only the innerHTML is used for the chip template. The\n * variables `$chip` and `$index` are available in the scope of `<md-chip-template>`, representing\n * the chip object and its index in the list of chips, respectively.\n * To override the chip delete control, include an element (ideally a button) with the attribute\n * `md-chip-remove`. A click listener to remove the chip will be added automatically. The element\n * is also placed as a sibling to the chip content (on which there are also click listeners) to\n * avoid a nested ng-click situation.\n *\n * <!-- Note: We no longer want to include this in the site docs; but it should remain here for\n * future developers and those looking at the documentation.\n *\n * <h3> Pending Features </h3>\n * <ul style=\"padding-left:20px;\">\n *\n * <ul>Style\n * <li>Colors for hover, press states (ripple?).</li>\n * </ul>\n *\n * <ul>Validation\n * <li>allow a validation callback</li>\n * <li>highlighting style for invalid chips</li>\n * </ul>\n *\n * <ul>Item mutation\n * <li>Support `\n * <md-chip-edit>` template, show/hide the edit element on tap/click? double tap/double\n * click?\n * </li>\n * </ul>\n *\n * <ul>Truncation and Disambiguation (?)\n * <li>Truncate chip text where possible, but do not truncate entries such that two are\n * indistinguishable.</li>\n * </ul>\n *\n * <ul>Drag and Drop\n * <li>Drag and drop chips between related `<md-chips>` elements.\n * </li>\n * </ul>\n * </ul>\n *\n * //-->\n *\n * Sometimes developers want to limit the amount of possible chips.<br/>\n * You can specify the maximum amount of chips by using the following markup.\n *\n * <hljs lang=\"html\">\n * <md-chips\n * ng-model=\"myItems\"\n * placeholder=\"Add an item\"\n * md-max-chips=\"5\">\n * </md-chips>\n * </hljs>\n *\n * In some cases, you have an autocomplete inside of the `md-chips`.<br/>\n * When the maximum amount of chips has been reached, you can also disable the autocomplete\n * selection.<br/>\n * Here is an example markup.\n *\n * <hljs lang=\"html\">\n * <md-chips ng-model=\"myItems\" md-max-chips=\"5\">\n * <md-autocomplete ng-hide=\"myItems.length > 5\" ...></md-autocomplete>\n * </md-chips>\n * </hljs>\n *\n * ### Accessibility\n *\n * The `md-chips` component supports keyboard and screen reader users since Version 1.1.2. In\n * order to achieve this, we modified the chips behavior to select newly appended chips for\n * `300ms` before re-focusing the input and allowing the user to type.\n *\n * For most users, this delay is small enough that it will not be noticeable but allows certain\n * screen readers to function properly (JAWS and NVDA in particular).\n *\n * We introduced a new `md-chip-append-delay` option to allow developers to better control this\n * behavior.\n *\n * Please refer to the documentation of this option (below) for more information.\n *\n * @param {expression} ng-model Assignable AngularJS expression to be data-bound to the list of\n * chips. The expression should evaluate to a `string` or `Object` Array. The type of this\n * array should align with the return value of `md-transform-chip`.\n * @param {expression=} ng-change AngularJS expression to be executed on chip addition, removal,\n * or content change.\n * @param {string=} placeholder Placeholder text that will be forwarded to the input.\n * @param {string=} secondary-placeholder Placeholder text that will be forwarded to the input,\n * displayed when there is at least one item in the list\n * @param {boolean=} md-removable Enables or disables the deletion of chips through the\n * removal icon or the Delete/Backspace key. Defaults to true.\n * @param {boolean=} readonly Disables list manipulation (deleting or adding list items), hiding\n * the input and delete buttons. If no `ng-model` is provided, the chips will automatically be\n * marked as readonly.<br/><br/>\n * When `md-removable` is not defined, the `md-remove` behavior will be overwritten and\n * disabled.\n * @param {boolean=} md-enable-chip-edit Set this to `\"true\"` to enable editing of chip contents.\n * The user can go into edit mode by pressing the `space` or `enter` keys, or by double\n * clicking on the chip. Chip editing is only supported for chips using the basic template.\n * **Note:** This attribute is only evaluated once; it is not watched.\n * @param {boolean=} ng-required Whether ng-model is allowed to be empty or not.\n * @param {number=} md-max-chips The maximum number of chips allowed to add through user input.\n * <br/><br/>The validation property `md-max-chips` can be used when the max chips\n * amount is reached.\n * @param {boolean=} md-add-on-blur When set to `\"true\"`, the remaining text inside of the input\n * will be converted into a new chip on blur.\n * **Note:** This attribute is only evaluated once; it is not watched.\n * @param {expression} md-transform-chip An expression of form `myFunction($chip)` that when\n * called expects one of the following return values:\n * - an object representing the `$chip` input string\n * - `undefined` to simply add the `$chip` input string, or\n * - `null` to prevent the chip from being appended\n * @param {expression=} md-on-add An expression which will be called when a chip has been\n * added with `$chip` and `$index` available as parameters.\n * @param {expression=} md-on-remove An expression which will be called when a chip has been\n * removed with `$chip`, `$index`, and `$event` available as parameters.\n * @param {expression=} md-on-select An expression which will be called when a chip is selected.\n * @param {boolean=} md-require-match If true, and the chips template contains an autocomplete,\n * only allow selection of pre-defined chips (i.e. you cannot add new ones).\n * @param {string=} md-input-class This class will be applied to the child input for custom\n * styling. If you are using an `md-autocomplete`, then you need to put this attribute on the\n * `md-autocomplete` rather than the `md-chips`.\n * @param {string=} input-aria-describedby A space-separated list of element IDs. This should\n * contain the IDs of any elements that describe this autocomplete. Screen readers will read\n * the content of these elements at the end of announcing that the chips input has been\n * selected and describing its current state. The descriptive elements do not need to be\n * visible on the page.\n * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use\n * case is that this would contain the ID of a `<label>` element that is associated with these\n * chips.<br><br>\n * For `<label id=\"state\">US State</label>`, you would set this to\n * `input-aria-labelledby=\"state\"`.\n * @param {string=} input-aria-label A string read by screen readers to identify the input.\n * For static chips, this will be applied to the chips container.\n * @param {string=} container-hint A string read by screen readers informing users of how to\n * navigate the chips when there are chips. Only applies when `ng-model` is defined.\n * @param {string=} container-empty-hint A string read by screen readers informing users of how to\n * add chips when there are no chips. You will want to use this to override the default when\n * in a non-English locale. Only applies when `ng-model` is defined.\n * @param {string=} delete-hint A string read by screen readers instructing users that pressing\n * the delete key will remove the chip. You will want to use this to override the default when\n * in a non-English locale.\n * @param {string=} delete-button-label Text for the `aria-label` of the button with the\n * `md-chip-remove` class. If the chip is an Object, then this will be the only text in the\n * label. Otherwise, this is prepended to the string representation of the chip. Defaults to\n * \"Remove\", which would be \"Remove Apple\" for a chip that contained the string \"Apple\".\n * You will want to use this to override the default when in a non-English locale.\n * @param {string=} md-removed-message Screen readers will announce this message following the\n * chips contents. The default is `\"removed\"`. If a chip with the content of \"Apple\" was\n * removed, the screen reader would read \"Apple removed\". You will want to use this to override\n * the default when in a non-English locale.\n * @param {string=} md-added-message Screen readers will announce this message following the\n * chips contents. The default is `\"added\"`. If a chip with the content of \"Apple\" was\n * created, the screen reader would read \"Apple added\". You will want to use this to override\n * the default when in a non-English locale.\n * @param {expression=} md-separator-keys An array of key codes used to separate chips.\n * @param {string=} md-chip-append-delay The number of milliseconds that the component will select\n * a newly appended chip before allowing a user to type into the input. This is **necessary**\n * for keyboard accessibility for screen readers. It defaults to 300ms and any number less than\n * 300 can cause issues with screen readers (particularly JAWS and sometimes NVDA).\n *\n * _Available since Version 1.1.2._\n *\n * **Note:** You can safely set this to `0` in one of the following two instances:\n *\n * 1. You are targeting an iOS or Safari-only application (where users would use VoiceOver) or\n * only ChromeVox users.\n *\n * 2. If you have utilized the `md-separator-keys` to disable the `enter` keystroke in\n * favor of another one (such as `,` or `;`).\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-chips\n * ng-model=\"myItems\"\n * placeholder=\"Add an item\"\n * readonly=\"isReadOnly\">\n * </md-chips>\n * </hljs>\n *\n * <h3>Validation</h3>\n * When using [ngMessages](https://docs.angularjs.org/api/ngMessages), you can show errors based\n * on our custom validators.\n * <hljs lang=\"html\">\n * <form name=\"userForm\">\n * <md-chips\n * name=\"fruits\"\n * ng-model=\"myItems\"\n * placeholder=\"Add an item\"\n * md-max-chips=\"5\">\n * </md-chips>\n * <div ng-messages=\"userForm.fruits.$error\" ng-if=\"userForm.$dirty\">\n * <div ng-message=\"md-max-chips\">You reached the maximum amount of chips</div>\n * </div>\n * </form>\n * </hljs>\n *\n */\n\n // TODO add a way for developers to specify which field of the object should used in the\n // aria-label.\n var MD_CHIPS_TEMPLATE = '\\\n <md-chips-wrap\\\n id=\"{{$mdChipsCtrl.wrapperId}}\"\\\n tabindex=\"{{$mdChipsCtrl.readonly ? 0 : -1}}\"\\\n ng-keydown=\"$mdChipsCtrl.chipKeydown($event)\"\\\n ng-class=\"{ \\'md-focused\\': $mdChipsCtrl.hasFocus(), \\\n \\'md-readonly\\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly,\\\n \\'md-removable\\': $mdChipsCtrl.isRemovable() }\"\\\n class=\"md-chips\">\\\n <md-chip ng-repeat=\"$chip in $mdChipsCtrl.items\"\\\n index=\"{{$index}}\" \\\n ng-class=\"{\\'md-focused\\': $mdChipsCtrl.selectedChip == $index, \\'md-readonly\\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}\">\\\n <div class=\"md-chip-content\"\\\n tabindex=\"{{$mdChipsCtrl.ariaTabIndex === $index ? 0 : -1}}\"\\\n id=\"{{$mdChipsCtrl.contentIdFor($index)}}\"\\\n role=\"option\"\\\n aria-selected=\"{{$mdChipsCtrl.selectedChip === $index}}\"\\\n aria-setsize=\"{{$mdChipsCtrl.items.length}}\"\\\n aria-posinset=\"{{$index+1}}\"\\\n ng-click=\"!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)\"\\\n aria-label=\"{{$mdChipsCtrl._isChipObject($chip) ? \\'\\' : $chip + \\'. \\'}}{{$mdChipsCtrl.isRemovable() ? \\'\\' + $mdChipsCtrl.deleteHint : \\'\\'}}\" \\\n ng-focus=\"!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)\"\\\n md-chip-transclude=\"$mdChipsCtrl.chipContentsTemplate\"></div>\\\n <div ng-if=\"$mdChipsCtrl.isRemovable()\"\\\n class=\"md-chip-remove-container\"\\\n tabindex=\"-1\"\\\n md-chip-transclude=\"$mdChipsCtrl.chipRemoveTemplate\"></div>\\\n </md-chip>\\\n <div class=\"md-chip-input-container\" ng-if=\"!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl\">\\\n <div md-chip-transclude=\"$mdChipsCtrl.chipInputTemplate\"></div>\\\n </div>\\\n </md-chips-wrap>';\n\n var CHIP_INPUT_TEMPLATE = '\\\n <input\\\n class=\"md-input{{ $mdChipsCtrl.inputClass ? \\' \\' + $mdChipsCtrl.inputClass: \\'\\'}}\"\\\n tabindex=\"0\"\\\n aria-label=\"{{$mdChipsCtrl.inputAriaLabel}}\"\\\n placeholder=\"{{$mdChipsCtrl.getPlaceholder()}}\"\\\n ng-model=\"$mdChipsCtrl.chipBuffer\"\\\n ng-focus=\"$mdChipsCtrl.onInputFocus()\"\\\n ng-blur=\"$mdChipsCtrl.onInputBlur()\"\\\n ng-keydown=\"$mdChipsCtrl.inputKeydown($event)\">';\n\n var CHIP_DEFAULT_TEMPLATE = '\\\n <span>{{$chip}}</span>';\n\n var CHIP_REMOVE_TEMPLATE = '\\\n <button\\\n class=\"md-chip-remove\"\\\n ng-if=\"$mdChipsCtrl.isRemovable()\"\\\n ng-click=\"$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index, $event)\"\\\n type=\"button\"\\\n tabindex=\"-1\"\\\n aria-label=\"{{$mdChipsCtrl.deleteButtonLabel}}{{$mdChipsCtrl._isChipObject($chip) ? \\'\\' : \\' \\' + $chip}}\">\\\n <md-icon md-svg-src=\"{{$mdChipsCtrl.mdCloseIcon}}\" aria-hidden=\"true\"></md-icon>\\\n </button>';\n\n /**\n * MDChips Directive Definition\n */\n function MdChips ($mdTheming, $mdUtil, $compile, $log, $timeout, $$mdSvgRegistry) {\n // Run our templates through $mdUtil.processTemplate() to allow custom start/end symbols\n var templates = getTemplates();\n\n return {\n template: function(element, attrs) {\n // Clone the element into an attribute. By prepending the attribute\n // name with '$', AngularJS won't write it into the DOM. The cloned\n // element propagates to the link function via the attrs argument,\n // where various contained-elements can be consumed.\n attrs['$mdUserTemplate'] = element.clone();\n return templates.chips;\n },\n require: ['mdChips'],\n restrict: 'E',\n controller: 'MdChipsCtrl',\n controllerAs: '$mdChipsCtrl',\n bindToController: true,\n compile: compile,\n scope: {\n readonly: '=?readonly',\n removable: '=?mdRemovable',\n placeholder: '@?',\n secondaryPlaceholder: '@?',\n maxChips: '@?mdMaxChips',\n transformChip: '&mdTransformChip',\n onAdd: '&?mdOnAdd',\n onRemove: '&?mdOnRemove',\n addedMessage: '@?mdAddedMessage',\n removedMessage: '@?mdRemovedMessage',\n onSelect: '&?mdOnSelect',\n inputClass: '@?mdInputClass',\n inputAriaDescribedBy: '@?inputAriaDescribedby',\n inputAriaLabelledBy: '@?inputAriaLabelledby',\n inputAriaLabel: '@?',\n containerHint: '@?',\n containerEmptyHint: '@?',\n deleteHint: '@?',\n deleteButtonLabel: '@?',\n separatorKeys: '=?mdSeparatorKeys',\n requireMatch: '=?mdRequireMatch',\n chipAppendDelayString: '@?mdChipAppendDelay',\n ngChange: '&?'\n }\n };\n\n /**\n * Builds the final template for `md-chips` and returns the postLink function.\n *\n * Building the template involves 3 key components:\n * static chips\n * chip template\n * input control\n *\n * If no `ng-model` is provided, only the static chip work needs to be done.\n *\n * If no user-passed `md-chip-template` exists, the default template is used. This resulting\n * template is appended to the chip content element.\n *\n * The remove button may be overridden by passing an element with an md-chip-remove attribute.\n *\n * If an `input` or `md-autocomplete` element is provided by the caller, it is set aside for\n * transclusion later. The transclusion happens in `postLink` as the parent scope is required.\n * If no user input is provided, a default one is appended to the input container node in the\n * template.\n *\n * Static Chips (i.e. `md-chip` elements passed from the caller) are gathered and set aside for\n * transclusion in the `postLink` function.\n *\n *\n * @param element\n * @param attr\n * @returns {Function}\n */\n function compile(element, attr) {\n // Grab the user template from attr and reset the attribute to null.\n var userTemplate = attr['$mdUserTemplate'];\n attr['$mdUserTemplate'] = null;\n\n var chipTemplate = getTemplateByQuery('md-chips>md-chip-template');\n\n var chipRemoveSelector = $mdUtil\n .prefixer()\n .buildList('md-chip-remove')\n .map(function(attr) {\n return 'md-chips>*[' + attr + ']';\n })\n .join(',');\n\n // Set the chip remove, chip contents and chip input templates. The link function will put\n // them on the scope for transclusion later.\n var chipRemoveTemplate = getTemplateByQuery(chipRemoveSelector) || templates.remove,\n chipContentsTemplate = chipTemplate || templates.default,\n chipInputTemplate = getTemplateByQuery('md-chips>md-autocomplete')\n || getTemplateByQuery('md-chips>input')\n || templates.input,\n staticChips = userTemplate.find('md-chip');\n\n // Warn of malformed template. See #2545\n if (userTemplate[0].querySelector('md-chip-template>*[md-chip-remove]')) {\n $log.warn('invalid placement of md-chip-remove within md-chip-template.');\n }\n\n function getTemplateByQuery (query) {\n if (!attr.ngModel) return;\n var element = userTemplate[0].querySelector(query);\n return element && element.outerHTML;\n }\n\n /**\n * Configures controller and transcludes.\n */\n return function postLink(scope, element, attrs, controllers) {\n $mdUtil.initOptionalProperties(scope, attr);\n\n $mdTheming(element);\n var mdChipsCtrl = controllers[0];\n if (chipTemplate) {\n // Chip editing functionality assumes we are using the default chip template.\n mdChipsCtrl.enableChipEdit = false;\n }\n\n mdChipsCtrl.chipContentsTemplate = chipContentsTemplate;\n mdChipsCtrl.chipRemoveTemplate = chipRemoveTemplate;\n mdChipsCtrl.chipInputTemplate = chipInputTemplate;\n\n mdChipsCtrl.mdCloseIcon = $$mdSvgRegistry.mdCancel;\n\n element\n .attr({ tabindex: -1 })\n .on('focus', function () { mdChipsCtrl.onFocus(); })\n .on('click', function () {\n if (!mdChipsCtrl.readonly && mdChipsCtrl.selectedChip === -1) {\n mdChipsCtrl.onFocus();\n }\n });\n\n if (attr.ngModel) {\n mdChipsCtrl.configureNgModel(element.controller('ngModel'));\n\n // If an `md-transform-chip` attribute was set, tell the controller to use the expression\n // before appending chips.\n if (attrs.mdTransformChip) mdChipsCtrl.useTransformChipExpression();\n\n // If an `md-on-add` attribute was set, tell the controller to use the expression\n // when adding chips.\n if (attrs.mdOnAdd) mdChipsCtrl.useOnAddExpression();\n\n // If an `md-on-remove` attribute was set, tell the controller to use the expression\n // when removing chips.\n if (attrs.mdOnRemove) mdChipsCtrl.useOnRemoveExpression();\n\n // If an `md-on-select` attribute was set, tell the controller to use the expression\n // when selecting chips.\n if (attrs.mdOnSelect) mdChipsCtrl.useOnSelectExpression();\n\n // The md-autocomplete and input elements won't be compiled until after this directive\n // is complete (due to their nested nature). Wait a tick before looking for them to\n // configure the controller.\n if (chipInputTemplate !== templates.input) {\n // The autocomplete will not appear until the readonly attribute is not true (i.e.\n // false or undefined), so we have to watch the readonly and then on the next tick\n // after the chip transclusion has run, we can configure the autocomplete and user\n // input.\n scope.$watch('$mdChipsCtrl.readonly', function(readonly) {\n if (!readonly) {\n\n $mdUtil.nextTick(function(){\n\n if (chipInputTemplate.indexOf('<md-autocomplete') === 0) {\n var autocompleteEl = element.find('md-autocomplete');\n mdChipsCtrl.configureAutocomplete(autocompleteEl.controller('mdAutocomplete'));\n }\n\n mdChipsCtrl.configureUserInput(element.find('input'));\n });\n }\n });\n }\n\n // At the next tick, if we find an input, make sure it has the md-input class\n $mdUtil.nextTick(function() {\n var input = element.find('input');\n\n if (input) {\n mdChipsCtrl.configureInput(input);\n input.toggleClass('md-input', true);\n }\n });\n }\n\n // Compile with the parent's scope and prepend any static chips to the wrapper.\n if (staticChips.length > 0) {\n var compiledStaticChips = $compile(staticChips.clone())(scope.$parent);\n $timeout(function() { element.find('md-chips-wrap').prepend(compiledStaticChips); });\n }\n };\n }\n\n function getTemplates() {\n return {\n chips: $mdUtil.processTemplate(MD_CHIPS_TEMPLATE),\n input: $mdUtil.processTemplate(CHIP_INPUT_TEMPLATE),\n default: $mdUtil.processTemplate(CHIP_DEFAULT_TEMPLATE),\n remove: $mdUtil.processTemplate(CHIP_REMOVE_TEMPLATE)\n };\n }\n }\n\n})();\n(function(){\n\"use strict\";\n\n\nMdContactChipsCtrl.$inject = [\"$attrs\", \"$element\", \"$timeout\"];angular\n .module('material.components.chips')\n .controller('MdContactChipsCtrl', MdContactChipsCtrl);\n\n/**\n * Controller for the MdContactChips component\n * @constructor\n */\nfunction MdContactChipsCtrl ($attrs, $element, $timeout) {\n /** @type {$element} */\n this.$element = $element;\n\n /** @type {$attrs} */\n this.$attrs = $attrs;\n\n /** @type {Function} */\n this.$timeout = $timeout;\n\n /** @type {Object} */\n this.selectedItem = null;\n\n /** @type {string} */\n this.searchText = '';\n\n /**\n * Collection of functions to call to un-register watchers\n * @type {Array}\n */\n this.deRegister = [];\n\n this.init();\n}\n\nMdContactChipsCtrl.prototype.init = function() {\n var ctrl = this;\n var deRegister = this.deRegister;\n var element = this.$element;\n\n // Setup a watcher which manages chips a11y messages and autocomplete aria.\n // Timeout required to allow the child elements to be compiled.\n this.$timeout(function() {\n deRegister.push(\n element.find('md-chips').controller('mdChips').$scope.$watchCollection('$mdChipsCtrl.items', function() {\n // Make sure our input and wrapper have the correct ARIA attributes\n ctrl.setupChipsAria();\n ctrl.setupAutocompleteAria();\n })\n );\n });\n};\n\nMdContactChipsCtrl.prototype.setupChipsAria = function() {\n var chips = this.$element.find('md-chips');\n var chipsCtrl = chips.controller('mdChips');\n\n // Configure MdChipsCtrl\n if (this.removedMessage) {\n chipsCtrl.removedMessage = this.removedMessage;\n }\n if (this.containerHint) {\n chipsCtrl.containerHint = this.containerHint;\n }\n if (this.containerEmptyHint) {\n // Apply attribute to avoid the hint being overridden by MdChipsCtrl.configureAutocomplete()\n chips.attr('container-empty-hint', this.containerEmptyHint);\n chipsCtrl.containerEmptyHint = this.containerEmptyHint;\n }\n if (this.deleteHint) {\n chipsCtrl.deleteHint = this.deleteHint;\n }\n if (this.inputAriaLabel) {\n chipsCtrl.inputAriaLabel = this.inputAriaLabel;\n }\n if (this.inputClass) {\n chipsCtrl.inputClass = this.inputClass;\n }\n};\n\nMdContactChipsCtrl.prototype.setupAutocompleteAria = function() {\n var autocompleteInput = this.$element.find('md-chips-wrap').find('md-autocomplete').find('input');\n\n // Set attributes on the input of the md-autocomplete\n if (this.inputAriaDescribedBy) {\n autocompleteInput.attr('aria-describedby', this.inputAriaDescribedBy);\n }\n if (this.inputAriaLabelledBy) {\n autocompleteInput.removeAttr('aria-label');\n autocompleteInput.attr('aria-labelledby', this.inputAriaLabelledBy);\n }\n};\n\nMdContactChipsCtrl.prototype.queryContact = function(searchText) {\n return this.contactQuery({'$query': searchText});\n};\n\nMdContactChipsCtrl.prototype.inputKeydown = function(event) {\n if (!this.separatorKeys || this.separatorKeys.indexOf(event.keyCode) < 0) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n var autocompleteCtrl = angular.element(event.target).controller('mdAutocomplete');\n autocompleteCtrl.select(autocompleteCtrl.index);\n};\n\nMdContactChipsCtrl.prototype.itemName = function(item) {\n return item[this.contactName];\n};\n\n/**\n * Destructor for cleanup\n */\nMdContactChipsCtrl.prototype.$onDestroy = function $onDestroy() {\n var $destroyFn;\n while (($destroyFn = this.deRegister.pop())) {\n $destroyFn.call(this);\n }\n};\n\n})();\n(function(){\n\"use strict\";\n\n\nMdContactChips.$inject = [\"$mdTheming\", \"$mdUtil\"];angular\n .module('material.components.chips')\n .directive('mdContactChips', MdContactChips);\n\n/**\n * @ngdoc directive\n * @name mdContactChips\n * @module material.components.chips\n *\n * @description\n * `<md-contact-chips>` is an input component based on `md-chips` and makes use of an\n * `md-autocomplete` element. The component allows the caller to supply a query expression which\n * returns a list of possible contacts. The user can select one of these and add it to the list of\n * chips.\n *\n * You may also use the <a ng-href=\"api/directive/mdHighlightText\">md-highlight-flags</a> attribute\n * along with its parameters to control the appearance of the matched text inside of the contacts'\n * autocomplete popup.\n *\n * @param {expression} ng-model Assignable AngularJS expression to be data-bound to the list of\n * contact chips. The expression should evaluate to an `Object` Array.\n * @param {expression=} ng-change AngularJS expression to be executed on chip addition, removal,\n * or content change.\n * @param {string=} placeholder Placeholder text that will be forwarded to the input.\n * @param {string=} secondary-placeholder Placeholder text that will be forwarded to the input,\n * displayed when there is at least on item in the list\n * @param {expression} md-contacts An expression expected to return contacts matching the search\n * test, `$query`. If this expression involves a promise, a loading bar is displayed while\n * waiting for it to resolve.\n * @param {string} md-contact-name The field name of the contact object representing the\n * contact's name.\n * @param {string} md-contact-email The field name of the contact object representing the\n * contact's email address.\n * @param {string} md-contact-image The field name of the contact object representing the\n * contact's image.\n * @param {number=} md-max-chips The maximum number of chips allowed to add through user input.\n * <br/><br/>The validation property `md-max-chips` can be used when the max chips\n * amount is reached.\n * @param {number=} md-min-length Specifies the minimum length of text before autocomplete will\n * make suggestions\n * @param {string=} md-input-class This class will be applied to the child `md-autocomplete` for\n * custom styling.\n * @param {string=} input-aria-describedby A space-separated list of element IDs. This should\n * contain the IDs of any elements that describe this autocomplete. Screen readers will read\n * the content of these elements at the end of announcing that the chips input has been\n * selected and describing its current state. The descriptive elements do not need to be\n * visible on the page.\n * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use\n * case is that this would contain the ID of a `<label>` element that is associated with these\n * chips.<br><br>\n * For `<label id=\"state\">US State</label>`, you would set this to\n * `input-aria-labelledby=\"state\"`.\n * @param {string=} input-aria-label A string read by screen readers to identify the input.\n * For static chips, this will be applied to the chips container.\n * @param {string=} container-hint A string read by screen readers informing users of how to\n * navigate the chips when there are chips.\n * @param {string=} container-empty-hint A string read by screen readers informing users of how to\n * add chips when there are no chips. You will want to use this to override the default when\n * in a non-English locale.\n * @param {string=} delete-hint A string read by screen readers instructing users that pressing\n * the delete key will remove the chip. You will want to use this to override the default when\n * in a non-English locale.\n * @param {string=} md-removed-message Screen readers will announce this message following the\n * chips contents. The default is `\"removed\"`. If a chip with the content of \"Apple\" was\n * removed, the screen reader would read \"Apple removed\". You will want to use this to override\n * the default when in a non-English locale.\n *\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-contact-chips\n * ng-model=\"ctrl.contacts\"\n * md-contacts=\"ctrl.querySearch($query)\"\n * md-contact-name=\"name\"\n * md-contact-image=\"image\"\n * md-contact-email=\"email\"\n * placeholder=\"To\">\n * </md-contact-chips>\n * </hljs>\n *\n */\n\n\nvar MD_CONTACT_CHIPS_TEMPLATE = '\\\n <md-chips class=\"md-contact-chips\"\\\n ng-model=\"$mdContactChipsCtrl.contacts\"\\\n ng-change=\"$mdContactChipsCtrl.ngChange($mdContactChipsCtrl.contacts)\"\\\n md-require-match=\"$mdContactChipsCtrl.requireMatch\"\\\n md-max-chips=\"{{$mdContactChipsCtrl.maxChips}}\"\\\n md-chip-append-delay=\"{{$mdContactChipsCtrl.chipAppendDelay}}\"\\\n md-separator-keys=\"$mdContactChipsCtrl.separatorKeys\"\\\n md-autocomplete-snap>\\\n <md-autocomplete\\\n md-menu-class=\"md-contact-chips-suggestions\"\\\n md-selected-item=\"$mdContactChipsCtrl.selectedItem\"\\\n md-search-text=\"$mdContactChipsCtrl.searchText\"\\\n md-items=\"item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)\"\\\n md-item-text=\"$mdContactChipsCtrl.itemName(item)\"\\\n md-no-cache=\"true\"\\\n md-min-length=\"$mdContactChipsCtrl.minLength\"\\\n md-autoselect\\\n ng-attr-md-input-class=\"{{$mdContactChipsCtrl.inputClass}}\"\\\n ng-keydown=\"$mdContactChipsCtrl.inputKeydown($event)\"\\\n placeholder=\"{{$mdContactChipsCtrl.contacts.length === 0 ?\\\n $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}\">\\\n <div class=\"md-contact-suggestion\">\\\n <img \\\n ng-src=\"{{item[$mdContactChipsCtrl.contactImage]}}\"\\\n alt=\"{{item[$mdContactChipsCtrl.contactName]}}\"\\\n ng-if=\"item[$mdContactChipsCtrl.contactImage]\" />\\\n <span class=\"md-contact-name\" md-highlight-text=\"$mdContactChipsCtrl.searchText\"\\\n md-highlight-flags=\"{{$mdContactChipsCtrl.highlightFlags}}\">\\\n {{item[$mdContactChipsCtrl.contactName]}}\\\n </span>\\\n <span class=\"md-contact-email\" >{{item[$mdContactChipsCtrl.contactEmail]}}</span>\\\n </div>\\\n </md-autocomplete>\\\n <md-chip-template>\\\n <div class=\"md-contact-avatar\">\\\n <img \\\n ng-src=\"{{$chip[$mdContactChipsCtrl.contactImage]}}\"\\\n alt=\"{{$chip[$mdContactChipsCtrl.contactName]}}\"\\\n ng-if=\"$chip[$mdContactChipsCtrl.contactImage]\" />\\\n </div>\\\n <div class=\"md-contact-name\">\\\n {{$chip[$mdContactChipsCtrl.contactName]}}\\\n </div>\\\n </md-chip-template>\\\n </md-chips>';\n\n\n/**\n * MDContactChips Directive Definition\n *\n * @param $mdTheming\n * @param $mdUtil\n * @returns {*}\n * @ngInject\n */\nfunction MdContactChips($mdTheming, $mdUtil) {\n return {\n template: function(element, attrs) {\n return MD_CONTACT_CHIPS_TEMPLATE;\n },\n restrict: 'E',\n controller: 'MdContactChipsCtrl',\n controllerAs: '$mdContactChipsCtrl',\n bindToController: true,\n compile: compile,\n scope: {\n contactQuery: '&mdContacts',\n placeholder: '@?',\n secondaryPlaceholder: '@?',\n contactName: '@mdContactName',\n contactImage: '@mdContactImage',\n contactEmail: '@mdContactEmail',\n contacts: '=ngModel',\n ngChange: '&?',\n requireMatch: '=?mdRequireMatch',\n minLength: '=?mdMinLength',\n maxChips: '=?mdMaxChips',\n highlightFlags: '@?mdHighlightFlags',\n chipAppendDelay: '@?mdChipAppendDelay',\n separatorKeys: '=?mdSeparatorKeys',\n removedMessage: '@?mdRemovedMessage',\n inputClass: '@?mdInputClass',\n inputAriaDescribedBy: '@?inputAriaDescribedby',\n inputAriaLabelledBy: '@?inputAriaLabelledby',\n inputAriaLabel: '@?',\n containerHint: '@?',\n containerEmptyHint: '@?',\n deleteHint: '@?'\n }\n };\n\n function compile(element, attr) {\n return function postLink(scope, element, attrs, controllers) {\n var contactChipsController = controllers;\n\n $mdUtil.initOptionalProperties(scope, attr);\n $mdTheming(element);\n\n element.attr('tabindex', '-1');\n\n attrs.$observe('mdChipAppendDelay', function(newValue) {\n contactChipsController.chipAppendDelay = newValue;\n });\n };\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n(function () {\n \"use strict\";\n\n /**\n * Use a RegExp to check if the `md-colors=\"<expression>\"` is static string\n * or one that should be observed and dynamically interpolated.\n */\n MdColorsDirective.$inject = [\"$mdColors\", \"$mdUtil\", \"$log\", \"$parse\"];\n MdColorsService.$inject = [\"$mdTheming\", \"$mdUtil\", \"$log\"];\n var STATIC_COLOR_EXPRESSION = /^{((\\s|,)*?[\"'a-zA-Z-]+?\\s*?:\\s*?(['\"])[a-zA-Z0-9-.]*(['\"]))+\\s*}$/;\n var colorPalettes = null;\n\n /**\n * @ngdoc module\n * @name material.components.colors\n *\n * @description\n * Define $mdColors service and a `md-colors=\"\"` attribute directive\n */\n angular\n .module('material.components.colors', ['material.core'])\n .directive('mdColors', MdColorsDirective)\n .service('$mdColors', MdColorsService);\n\n /**\n * @ngdoc service\n * @name $mdColors\n * @module material.components.colors\n *\n * @description\n * By default, defining a theme does not make its colors available for applying to non AngularJS\n * Material elements. The `$mdColors` service is used by the `md-color` directive to convert a\n * set of color expressions to RGBA values and then apply those values to the element as CSS\n * property values.\n *\n * @usage\n * Getting a color based on a theme\n *\n * <hljs lang=\"js\">\n * angular.controller('myCtrl', function ($mdColors) {\n * var color = $mdColors.getThemeColor('myTheme-primary-900-0.5');\n * ...\n * });\n * </hljs>\n *\n * Applying a color from a palette to an element\n * <hljs lang=\"js\">\n * app.directive('myDirective', function($mdColors) {\n * return {\n * ...\n * link: function (scope, elem) {\n * $mdColors.applyThemeColors(elem, {color: 'red-A200-0.2'});\n * }\n * }\n * });\n * </hljs>\n */\n function MdColorsService($mdTheming, $mdUtil, $log) {\n colorPalettes = colorPalettes || Object.keys($mdTheming.PALETTES);\n\n // Publish service instance\n return {\n applyThemeColors: applyThemeColors,\n getThemeColor: getThemeColor,\n hasTheme: hasTheme\n };\n\n // ********************************************\n // Internal Methods\n // ********************************************\n\n /**\n * @ngdoc method\n * @name $mdColors#applyThemeColors\n *\n * @description\n * Lookup a set of colors by hue, theme, and palette, then apply those colors\n * with the provided opacity (via `rgba()`) to the specified CSS property.\n *\n * @param {angular.element} element the element to apply the styles to\n * @param {Object} colorExpression Keys are CSS properties and values are strings representing\n * the `theme-palette-hue-opacity` of the desired color. For example:\n * `{'color': 'red-A200-0.3', 'background-color': 'myTheme-primary-700-0.8'}`. Theme, hue, and\n * opacity are optional.\n */\n function applyThemeColors(element, colorExpression) {\n try {\n if (colorExpression) {\n // Assign the calculate RGBA color values directly as inline CSS\n element.css(interpolateColors(colorExpression));\n }\n } catch (e) {\n $log.error(e.message);\n }\n }\n\n /**\n * @ngdoc method\n * @name $mdColors#getThemeColor\n *\n * @description\n * Get a parsed RGBA color using a string representing the `theme-palette-hue-opacity` of the\n * desired color.\n *\n * @param {string} expression color expression like `'red-A200-0.3'` or\n * `'myTheme-primary-700-0.8'`. Theme, hue, and opacity are optional.\n * @returns {string} a CSS color value like `rgba(211, 47, 47, 0.8)`\n */\n function getThemeColor(expression) {\n var color = extractColorOptions(expression);\n\n return parseColor(color);\n }\n\n /**\n * Return the parsed color\n * @param {{hue: *, theme: any, palette: *, opacity: (*|string|number)}} color hash map of color\n * definitions\n * @param {boolean=} contrast whether use contrast color for foreground. Defaults to false.\n * @returns {string} rgba color string\n */\n function parseColor(color, contrast) {\n contrast = contrast || false;\n var rgbValues = $mdTheming.PALETTES[color.palette][color.hue];\n\n rgbValues = contrast ? rgbValues.contrast : rgbValues.value;\n\n return $mdUtil.supplant('rgba({0}, {1}, {2}, {3})',\n [rgbValues[0], rgbValues[1], rgbValues[2], rgbValues[3] || color.opacity]\n );\n }\n\n /**\n * Convert the color expression into an object with scope-interpolated values\n * Then calculate the rgba() values based on the theme color parts\n * @param {Object} themeColors json object, keys are css properties and values are string of\n * the wanted color, for example: `{color: 'red-A200-0.3'}`.\n * @return {Object} Hashmap of CSS properties with associated `rgba()` string values\n */\n function interpolateColors(themeColors) {\n var rgbColors = {};\n\n var hasColorProperty = themeColors.hasOwnProperty('color');\n\n angular.forEach(themeColors, function (value, key) {\n var color = extractColorOptions(value);\n var hasBackground = key.indexOf('background') > -1;\n\n rgbColors[key] = parseColor(color);\n if (hasBackground && !hasColorProperty) {\n rgbColors.color = parseColor(color, true);\n }\n });\n\n return rgbColors;\n }\n\n /**\n * Check if expression has defined theme\n * For instance:\n * 'myTheme-primary' => true\n * 'red-800' => false\n * @param {string} expression color expression like 'red-800', 'red-A200-0.3',\n * 'myTheme-primary', or 'myTheme-primary-400'\n * @return {boolean} true if the expression has a theme part, false otherwise.\n */\n function hasTheme(expression) {\n return angular.isDefined($mdTheming.THEMES[expression.split('-')[0]]);\n }\n\n /**\n * For the evaluated expression, extract the color parts into a hash map\n * @param {string} expression color expression like 'red-800', 'red-A200-0.3',\n * 'myTheme-primary', or 'myTheme-primary-400'\n * @returns {{hue: *, theme: any, palette: *, opacity: (*|string|number)}}\n */\n function extractColorOptions(expression) {\n var parts = expression.split('-');\n var hasTheme = angular.isDefined($mdTheming.THEMES[parts[0]]);\n var theme = hasTheme ? parts.splice(0, 1)[0] : $mdTheming.defaultTheme();\n\n return {\n theme: theme,\n palette: extractPalette(parts, theme),\n hue: extractHue(parts, theme),\n opacity: parts[2] || 1\n };\n }\n\n /**\n * Calculate the theme palette name\n * @param {Array} parts\n * @param {string} theme name\n * @return {string}\n */\n function extractPalette(parts, theme) {\n // If the next section is one of the palettes we assume it's a two word palette\n // Two word palette can be also written in camelCase, forming camelCase to dash-case\n\n var isTwoWord = parts.length > 1 && colorPalettes.indexOf(parts[1]) !== -1;\n var palette = parts[0].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n\n if (isTwoWord) palette = parts[0] + '-' + parts.splice(1, 1);\n\n if (colorPalettes.indexOf(palette) === -1) {\n // If the palette is not in the palette list it's one of primary/accent/warn/background\n var scheme = $mdTheming.THEMES[theme].colors[palette];\n if (!scheme) {\n throw new Error($mdUtil.supplant(\n 'mdColors: couldn\\'t find \\'{palette}\\' in the palettes.',\n {palette: palette}));\n }\n palette = scheme.name;\n }\n\n return palette;\n }\n\n /**\n * @param {Array} parts\n * @param {string} theme name\n * @return {*}\n */\n function extractHue(parts, theme) {\n var themeColors = $mdTheming.THEMES[theme].colors;\n\n if (parts[1] === 'hue') {\n var hueNumber = parseInt(parts.splice(2, 1)[0], 10);\n\n if (hueNumber < 1 || hueNumber > 3) {\n throw new Error($mdUtil.supplant(\n 'mdColors: \\'hue-{hueNumber}\\' is not a valid hue, can be only \\'hue-1\\', \\'hue-2\\' and \\'hue-3\\'',\n {hueNumber: hueNumber}));\n }\n parts[1] = 'hue-' + hueNumber;\n\n if (!(parts[0] in themeColors)) {\n throw new Error($mdUtil.supplant(\n 'mdColors: \\'hue-x\\' can only be used with [{availableThemes}], but was used with \\'{usedTheme}\\'',\n {\n availableThemes: Object.keys(themeColors).join(', '),\n usedTheme: parts[0]\n }));\n }\n\n return themeColors[parts[0]].hues[parts[1]];\n }\n\n return parts[1] || themeColors[parts[0] in themeColors ? parts[0] : 'primary'].hues['default'];\n }\n }\n\n /**\n * @ngdoc directive\n * @name mdColors\n * @module material.components.colors\n *\n * @restrict A\n *\n * @description\n * `mdColors` directive will apply the theme-based color expression as RGBA CSS style values.\n *\n * The format will be similar to the colors defined in the Sass files:\n *\n * ## `[?theme]-[palette]-[?hue]-[?opacity]`\n * - [theme] - default value is the default theme\n * - [palette] - can be either palette name or primary/accent/warn/background\n * - [hue] - default is 500 (hue-x can be used with primary/accent/warn/background)\n * - [opacity] - default is 1\n *\n *\n * > `?` indicates optional parameter\n *\n * @usage\n * <hljs lang=\"html\">\n * <div md-colors=\"{background: 'myTheme-accent-900-0.43'}\">\n * <div md-colors=\"{color: 'red-A100', 'border-color': 'primary-600'}\">\n * <span>Color demo</span>\n * </div>\n * </div>\n * </hljs>\n *\n * The `mdColors` directive will automatically watch for changes in the expression if it recognizes\n * an interpolation expression or a function. For performance options, you can use `::` prefix to\n * the `md-colors` expression to indicate a one-time data binding.\n *\n * <hljs lang=\"html\">\n * <md-card md-colors=\"::{background: '{{theme}}-primary-700'}\">\n * </md-card>\n * </hljs>\n */\n function MdColorsDirective($mdColors, $mdUtil, $log, $parse) {\n return {\n restrict: 'A',\n require: ['^?mdTheme'],\n compile: function (tElem, tAttrs) {\n var shouldWatch = shouldColorsWatch();\n\n return function (scope, element, attrs, ctrl) {\n var mdThemeController = ctrl[0];\n\n var lastColors = {};\n\n /**\n * @param {string=} theme\n * @return {Object} colors found in the specified theme\n */\n var parseColors = function (theme) {\n if (typeof theme !== 'string') {\n theme = '';\n }\n\n if (!attrs.mdColors) {\n attrs.mdColors = '{}';\n }\n\n /**\n * Json.parse() does not work because the keys are not quoted;\n * use $parse to convert to a hash map\n */\n var colors = $parse(attrs.mdColors)(scope);\n\n /**\n * If mdTheme is defined higher up the DOM tree,\n * we add mdTheme's theme to the colors which don't specify a theme.\n *\n * @example\n * <hljs lang=\"html\">\n * <div md-theme=\"myTheme\">\n * <div md-colors=\"{background: 'primary-600'}\">\n * <span md-colors=\"{background: 'mySecondTheme-accent-200'}\">Color demo</span>\n * </div>\n * </div>\n * </hljs>\n *\n * 'primary-600' will be changed to 'myTheme-primary-600',\n * but 'mySecondTheme-accent-200' will not be changed since it has a theme defined.\n */\n if (mdThemeController) {\n Object.keys(colors).forEach(function (prop) {\n var color = colors[prop];\n if (!$mdColors.hasTheme(color)) {\n colors[prop] = (theme || mdThemeController.$mdTheme) + '-' + color;\n }\n });\n }\n\n cleanElement(colors);\n\n return colors;\n };\n\n /**\n * @param {Object} colors\n */\n var cleanElement = function (colors) {\n if (!angular.equals(colors, lastColors)) {\n var keys = Object.keys(lastColors);\n\n if (lastColors.background && !keys.color) {\n keys.push('color');\n }\n\n keys.forEach(function (key) {\n element.css(key, '');\n });\n }\n\n lastColors = colors;\n };\n\n /**\n * Registering for mgTheme changes and asking mdTheme controller run our callback whenever\n * a theme changes.\n */\n var unregisterChanges = angular.noop;\n\n if (mdThemeController) {\n unregisterChanges = mdThemeController.registerChanges(function (theme) {\n $mdColors.applyThemeColors(element, parseColors(theme));\n });\n }\n\n scope.$on('$destroy', function () {\n unregisterChanges();\n });\n\n try {\n if (shouldWatch) {\n scope.$watch(parseColors, angular.bind(this,\n $mdColors.applyThemeColors, element\n ), true);\n }\n else {\n $mdColors.applyThemeColors(element, parseColors());\n }\n\n }\n catch (e) {\n $log.error(e.message);\n }\n\n };\n\n /**\n * @return {boolean}\n */\n function shouldColorsWatch() {\n // Simulate 1x binding and mark mdColorsWatch == false\n var rawColorExpression = tAttrs.mdColors;\n var bindOnce = rawColorExpression.indexOf('::') > -1;\n var isStatic = bindOnce ? true : STATIC_COLOR_EXPRESSION.test(tAttrs.mdColors);\n\n // Remove it for the postLink...\n tAttrs.mdColors = rawColorExpression.replace('::', '');\n\n var hasWatchAttr = angular.isDefined(tAttrs.mdColorsWatch);\n\n return (bindOnce || isStatic) ? false :\n hasWatchAttr ? $mdUtil.parseAttributeBoolean(tAttrs.mdColorsWatch) : true;\n }\n }\n };\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.content\n *\n * @description\n * Scrollable content\n */\nmdContentDirective.$inject = [\"$mdTheming\"];\nangular.module('material.components.content', [\n 'material.core'\n])\n .directive('mdContent', mdContentDirective);\n\n/**\n * @ngdoc directive\n * @name mdContent\n * @module material.components.content\n *\n * @restrict E\n *\n * @description\n *\n * The `<md-content>` directive is a container element useful for scrollable content. It achieves\n * this by setting the CSS `overflow` property to `auto` so that content can properly scroll.\n *\n * In general, `<md-content>` components are not designed to be nested inside one another. If\n * possible, it is better to make them siblings. This often results in a better user experience as\n * having nested scrollbars may confuse the user.\n *\n * ## Troubleshooting\n *\n * In some cases, you may wish to apply the `md-no-momentum` class to ensure that Safari's\n * momentum scrolling is disabled. Momentum scrolling can cause flickering issues while scrolling\n * SVG icons and some other components.\n *\n * Additionally, we now also offer the `md-no-flicker` class which can be applied to any element\n * and uses a Webkit-specific filter of `blur(0px)` that forces GPU rendering of all elements\n * inside (which eliminates the flicker on iOS devices).\n *\n * _<b>Note:</b> Forcing an element to render on the GPU can have unintended side-effects, especially\n * related to the z-index of elements. Please use with caution and only on the elements needed._\n *\n * @usage\n *\n * Add the `[layout-padding]` attribute to make the content padded.\n *\n * <hljs lang=\"html\">\n * <md-content layout-padding>\n * Lorem ipsum dolor sit amet, ne quod novum mei.\n * </md-content>\n * </hljs>\n */\n\nfunction mdContentDirective($mdTheming) {\n return {\n restrict: 'E',\n controller: ['$scope', '$element', ContentController],\n link: function(scope, element) {\n element.addClass('_md'); // private md component indicator for styling\n\n $mdTheming(element);\n scope.$broadcast('$mdContentLoaded', element);\n\n iosScrollFix(element[0]);\n }\n };\n\n function ContentController($scope, $element) {\n this.$scope = $scope;\n this.$element = $element;\n }\n}\n\nfunction iosScrollFix(node) {\n // IOS FIX:\n // If we scroll where there is no more room for the webview to scroll,\n // by default the webview itself will scroll up and down, this looks really\n // bad. So if we are scrolling to the very top or bottom, add/subtract one\n angular.element(node).on('$md.pressdown', function(ev) {\n // Only touch events\n if (ev.pointer.type !== 't') return;\n // Don't let a child content's touchstart ruin it for us.\n if (ev.$materialScrollFixed) return;\n ev.$materialScrollFixed = true;\n\n if (node.scrollTop === 0) {\n node.scrollTop = 1;\n } else if (node.scrollHeight === node.scrollTop + node.offsetHeight) {\n node.scrollTop -= 1;\n }\n });\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.datepicker\n * @description Module for the datepicker component.\n */\n\nangular.module('material.components.datepicker', [\n 'material.core',\n 'material.components.icon',\n 'material.components.virtualRepeat'\n]);\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc directive\n * @name mdCalendar\n * @module material.components.datepicker\n *\n * @param {Date} ng-model The component's model. Should be a Date object.\n * @param {Object=} ng-model-options Allows tuning of the way in which `ng-model` is being\n * updated. Also allows for a timezone to be specified.\n * <a href=\"https://docs.angularjs.org/api/ng/directive/ngModelOptions#usage\">Read more at the\n * ngModelOptions docs.</a>\n * @param {Date=} md-min-date Expression representing the minimum date.\n * @param {Date=} md-max-date Expression representing the maximum date.\n * @param {(function(Date): boolean)=} md-date-filter Function expecting a date and returning a\n * boolean whether it can be selected in \"day\" mode or not.\n * @param {(function(Date): boolean)=} md-month-filter Function expecting a date and returning a\n * boolean whether it can be selected in \"month\" mode or not.\n * @param {String=} md-current-view Current view of the calendar. Can be either \"month\" or \"year\".\n * @param {String=} md-mode Restricts the user to only selecting a value from a particular view.\n * This option can be used if the user is only supposed to choose from a certain date type\n * (e.g. only selecting the month). Can be either \"month\" or \"day\". **Note** that this will\n * overwrite the `md-current-view` value.\n *\n * @description\n * `<md-calendar>` is a component that renders a calendar that can be used to select a date.\n * It is a part of the `<md-datepicker>` pane, however it can also be used on it's own.\n *\n * @usage\n *\n * <hljs lang=\"html\">\n * <md-calendar ng-model=\"birthday\"></md-calendar>\n * </hljs>\n */\n CalendarCtrl.$inject = [\"$element\", \"$scope\", \"$$mdDateUtil\", \"$mdUtil\", \"$mdConstant\", \"$mdTheming\", \"$$rAF\", \"$attrs\", \"$mdDateLocale\", \"$filter\", \"$document\"];\n calendarDirective.$inject = [\"inputDirective\"];\n angular.module('material.components.datepicker')\n .directive('mdCalendar', calendarDirective);\n\n // TODO(jelbourn): Mac Cmd + left / right == Home / End\n // TODO(jelbourn): Refactor month element creation to use cloneNode (performance).\n // TODO(jelbourn): Define virtual scrolling constants (compactness) users can override.\n // TODO(jelbourn): Animated month transition on ng-model change (virtual-repeat)\n // TODO(jelbourn): Scroll snapping (virtual repeat)\n // TODO(jelbourn): Remove superfluous row from short months (virtual-repeat)\n // TODO(jelbourn): Month headers stick to top when scrolling.\n // TODO(jelbourn): Previous month opacity is lowered when partially scrolled out of view.\n // TODO(jelbourn): Support md-calendar standalone on a page (as a tabstop w/ aria-live\n // announcement and key handling).\n // TODO Read-only calendar (not just date-picker).\n\n function calendarDirective(inputDirective) {\n return {\n template: function(tElement, tAttr) {\n // This allows the calendar to work, without a datepicker. This ensures that the virtual\n // repeater scrolls to the proper place on load by deferring the execution until the next\n // digest. It's necessary only if the calendar is used without a datepicker, otherwise it's\n // already wrapped in an ngIf.\n var extraAttrs = tAttr.hasOwnProperty('ngIf') ? '' : 'ng-if=\"calendarCtrl.isInitialized\"';\n return '' +\n '<div ng-switch=\"calendarCtrl.currentView\" ' + extraAttrs + '>' +\n '<md-calendar-year ng-switch-when=\"year\"></md-calendar-year>' +\n '<md-calendar-month ng-switch-default></md-calendar-month>' +\n '</div>';\n },\n scope: {\n minDate: '=mdMinDate',\n maxDate: '=mdMaxDate',\n dateFilter: '=mdDateFilter',\n monthFilter: '=mdMonthFilter',\n\n // These need to be prefixed, because Angular resets\n // any changes to the value due to bindToController.\n _mode: '@mdMode',\n _currentView: '@mdCurrentView'\n },\n require: ['ngModel', 'mdCalendar'],\n controller: CalendarCtrl,\n controllerAs: 'calendarCtrl',\n bindToController: true,\n link: function(scope, element, attrs, controllers) {\n var ngModelCtrl = controllers[0];\n var mdCalendarCtrl = controllers[1];\n mdCalendarCtrl.configureNgModel(ngModelCtrl, inputDirective);\n }\n };\n }\n\n /**\n * Occasionally the hideVerticalScrollbar method might read an element's\n * width as 0, because it hasn't been laid out yet. This value will be used\n * as a fallback, in order to prevent scenarios where the element's width\n * would otherwise have been set to 0. This value is the \"usual\" width of a\n * calendar within a floating calendar pane.\n */\n var FALLBACK_WIDTH = 340;\n\n /** Next identifier for calendar instance. */\n var nextUniqueId = 0;\n\n /** Maps the `md-mode` values to their corresponding calendar views. */\n var MODE_MAP = {\n day: 'month',\n month: 'year'\n };\n\n /**\n * Controller for the mdCalendar component.\n * @ngInject @constructor\n */\n function CalendarCtrl($element, $scope, $$mdDateUtil, $mdUtil, $mdConstant, $mdTheming, $$rAF,\n $attrs, $mdDateLocale, $filter, $document) {\n $mdTheming($element);\n\n /**\n * @final\n * @type {!JQLite}\n */\n this.$element = $element;\n\n /**\n * @final\n * @type {!angular.Scope}\n */\n this.$scope = $scope;\n\n /**\n * @final\n * @type {!angular.$attrs} Current attributes object for the element\n */\n this.$attrs = $attrs;\n\n /** @final */\n this.dateUtil = $$mdDateUtil;\n\n /** @final */\n this.$mdUtil = $mdUtil;\n\n /** @final */\n this.keyCode = $mdConstant.KEY_CODE;\n\n /** @final */\n this.$$rAF = $$rAF;\n\n /** @final */\n this.$mdDateLocale = $mdDateLocale;\n\n /** @final The built-in Angular date filter. */\n this.ngDateFilter = $filter('date');\n\n /**\n * @final\n * @type {Date}\n */\n this.today = this.dateUtil.createDateAtMidnight();\n\n /** @type {!ngModel.NgModelController} */\n this.ngModelCtrl = undefined;\n\n /** @type {string} Class applied to the selected date cell. */\n this.SELECTED_DATE_CLASS = 'md-calendar-selected-date';\n\n /** @type {string} Class applied to the cell for today. */\n this.TODAY_CLASS = 'md-calendar-date-today';\n\n /** @type {string} Class applied to the focused cell. */\n this.FOCUSED_DATE_CLASS = 'md-focus';\n\n /**\n * @final\n * @type {number} Unique ID for this calendar instance.\n */\n this.id = nextUniqueId++;\n\n /**\n * The date that is currently focused or showing in the calendar. This will initially be set\n * to the ng-model value if set, otherwise to today. It will be updated as the user navigates\n * to other months. The cell corresponding to the displayDate does not necessarily always have\n * focus in the document (such as for cases when the user is scrolling the calendar).\n * @type {Date}\n */\n this.displayDate = null;\n\n /**\n * Allows restricting the calendar to only allow selecting a month or a day.\n * @type {'month'|'day'|null}\n */\n this.mode = null;\n\n /**\n * The selected date. Keep track of this separately from the ng-model value so that we\n * can know, when the ng-model value changes, what the previous value was before it's updated\n * in the component's UI.\n *\n * @type {Date}\n */\n this.selectedDate = null;\n\n /**\n * The first date that can be rendered by the calendar. The default is taken\n * from the mdDateLocale provider and is limited by the mdMinDate.\n * @type {Date}\n */\n this.firstRenderableDate = null;\n\n /**\n * The last date that can be rendered by the calendar. The default comes\n * from the mdDateLocale provider and is limited by the maxDate.\n * @type {Date}\n */\n this.lastRenderableDate = null;\n\n /**\n * Used to toggle initialize the root element in the next digest.\n * @type {boolean}\n */\n this.isInitialized = false;\n\n /**\n * Cache for the width of the element without a scrollbar. Used to hide the scrollbar later on\n * and to avoid extra reflows when switching between views.\n * @type {number}\n */\n this.width = 0;\n\n /**\n * Caches the width of the scrollbar in order to be used when hiding it and to avoid extra reflows.\n * @type {number}\n */\n this.scrollbarWidth = 0;\n\n /**\n * @type {boolean} set to true if the calendar is being used \"standalone\" (outside of a\n * md-datepicker).\n */\n this.standaloneMode = false;\n\n // Unless the user specifies so, the calendar should not be a tab stop.\n // This is necessary because ngAria might add a tabindex to anything with an ng-model\n // (based on whether or not the user has turned that particular feature on/off).\n if (!$attrs.tabindex) {\n $element.attr('tabindex', '-1');\n }\n\n var boundKeyHandler = angular.bind(this, this.handleKeyEvent);\n\n // If use the md-calendar directly in the body without datepicker,\n // handleKeyEvent will disable other inputs on the page.\n // So only apply the handleKeyEvent on the body when the md-calendar inside datepicker,\n // otherwise apply on the calendar element only.\n\n var handleKeyElement;\n if ($element.parent().hasClass('md-datepicker-calendar')) {\n handleKeyElement = angular.element($document[0].body);\n } else {\n this.standaloneMode = true;\n handleKeyElement = $element;\n }\n\n // Bind the keydown handler to the body, in order to handle cases where the focused\n // element gets removed from the DOM and stops propagating click events.\n handleKeyElement.on('keydown', boundKeyHandler);\n\n $scope.$on('$destroy', function() {\n handleKeyElement.off('keydown', boundKeyHandler);\n });\n\n // For AngularJS 1.4 and older, where there are no lifecycle hooks but bindings are pre-assigned,\n // manually call the $onInit hook.\n if (angular.version.major === 1 && angular.version.minor <= 4) {\n this.$onInit();\n }\n }\n\n /**\n * AngularJS Lifecycle hook for newer AngularJS versions.\n * Bindings are not guaranteed to have been assigned in the controller, but they are in the\n * $onInit hook.\n */\n CalendarCtrl.prototype.$onInit = function() {\n /**\n * The currently visible calendar view. Note the prefix on the scope value,\n * which is necessary, because the datepicker seems to reset the real one value if the\n * calendar is open, but the `currentView` on the datepicker's scope is empty.\n * @type {String}\n */\n if (this._mode && MODE_MAP.hasOwnProperty(this._mode)) {\n this.currentView = MODE_MAP[this._mode];\n this.mode = this._mode;\n } else {\n this.currentView = this._currentView || 'month';\n this.mode = null;\n }\n\n if (this.minDate && this.minDate > this.$mdDateLocale.firstRenderableDate) {\n this.firstRenderableDate = this.minDate;\n } else {\n this.firstRenderableDate = this.$mdDateLocale.firstRenderableDate;\n }\n\n if (this.maxDate && this.maxDate < this.$mdDateLocale.lastRenderableDate) {\n this.lastRenderableDate = this.maxDate;\n } else {\n this.lastRenderableDate = this.$mdDateLocale.lastRenderableDate;\n }\n };\n\n /**\n * Sets up the controller's reference to ngModelController.\n * @param {!ngModel.NgModelController} ngModelCtrl Instance of the ngModel controller.\n * @param {Object} inputDirective Config for AngularJS's `input` directive.\n */\n CalendarCtrl.prototype.configureNgModel = function(ngModelCtrl, inputDirective) {\n var self = this;\n self.ngModelCtrl = ngModelCtrl;\n\n // The component needs to be [type=\"date\"] in order to be picked up by AngularJS.\n this.$attrs.$set('type', 'date');\n\n // Invoke the `input` directive link function, adding a stub for the element.\n // This allows us to re-use AngularJS' logic for setting the timezone via ng-model-options.\n // It works by calling the link function directly which then adds the proper `$parsers` and\n // `$formatters` to the NgModelController.\n inputDirective[0].link.pre(this.$scope, {\n on: angular.noop,\n val: angular.noop,\n 0: {}\n }, this.$attrs, [ngModelCtrl]);\n\n ngModelCtrl.$render = function() {\n var value = this.$viewValue, convertedDate;\n\n // In the case where a conversion is needed, the $viewValue here will be a string like\n // \"2020-05-10\" instead of a Date object.\n if (!self.dateUtil.isValidDate(value)) {\n convertedDate = self.dateUtil.removeLocalTzAndReparseDate(new Date(value));\n if (self.dateUtil.isValidDate(convertedDate)) {\n value = convertedDate;\n }\n }\n\n // Notify the child scopes of any changes.\n self.$scope.$broadcast('md-calendar-parent-changed', value);\n\n // Set up the selectedDate if it hasn't been already.\n if (!self.selectedDate) {\n self.selectedDate = value;\n }\n\n // Also set up the displayDate.\n if (!self.displayDate) {\n self.displayDate = self.selectedDate || self.today;\n }\n };\n\n self.$mdUtil.nextTick(function() {\n self.isInitialized = true;\n });\n };\n\n /**\n * Sets the ng-model value for the calendar and emits a change event.\n * @param {Date} date new value for the calendar\n */\n CalendarCtrl.prototype.setNgModelValue = function(date) {\n var timezone = this.$mdUtil.getModelOption(this.ngModelCtrl, 'timezone');\n var value = this.dateUtil.createDateAtMidnight(date);\n this.focusDate(value);\n this.$scope.$emit('md-calendar-change', value);\n // Using the timezone when the offset is negative (GMT+X) causes the previous day to be\n // selected here. This check avoids that.\n if (timezone == null || value.getTimezoneOffset() < 0) {\n this.ngModelCtrl.$setViewValue(this.ngDateFilter(value, 'yyyy-MM-dd'), 'default');\n } else {\n this.ngModelCtrl.$setViewValue(this.ngDateFilter(value, 'yyyy-MM-dd', timezone), 'default');\n }\n this.ngModelCtrl.$render();\n return value;\n };\n\n /**\n * Sets the current view that should be visible in the calendar\n * @param {string} newView View name to be set.\n * @param {number|Date} time Date object or a timestamp for the new display date.\n */\n CalendarCtrl.prototype.setCurrentView = function(newView, time) {\n var self = this;\n\n self.$mdUtil.nextTick(function() {\n self.currentView = newView;\n\n if (time) {\n self.displayDate = angular.isDate(time) ? time : new Date(time);\n }\n });\n };\n\n /**\n * Focus the cell corresponding to the given date.\n * @param {Date=} date The date to be focused.\n */\n CalendarCtrl.prototype.focusDate = function(date) {\n if (this.dateUtil.isValidDate(date)) {\n var previousFocus = this.$element[0].querySelector('.' + this.FOCUSED_DATE_CLASS);\n if (previousFocus) {\n previousFocus.classList.remove(this.FOCUSED_DATE_CLASS);\n }\n\n var cellId = this.getDateId(date, this.currentView);\n var cell = document.getElementById(cellId);\n if (cell) {\n cell.classList.add(this.FOCUSED_DATE_CLASS);\n cell.focus();\n this.displayDate = date;\n }\n } else {\n var rootElement = this.$element[0].querySelector('[ng-switch]');\n\n if (rootElement) {\n rootElement.focus();\n }\n }\n };\n\n /**\n * Highlights a date cell on the calendar and changes the selected date.\n * @param {Date=} date Date to be marked as selected.\n */\n CalendarCtrl.prototype.changeSelectedDate = function(date) {\n var selectedDateClass = this.SELECTED_DATE_CLASS;\n var prevDateCell = this.$element[0].querySelector('.' + selectedDateClass);\n\n // Remove the selected class from the previously selected date, if any.\n if (prevDateCell) {\n prevDateCell.classList.remove(selectedDateClass);\n prevDateCell.setAttribute('aria-selected', 'false');\n }\n\n // Apply the select class to the new selected date if it is set.\n if (date) {\n var dateCell = document.getElementById(this.getDateId(date, this.currentView));\n if (dateCell) {\n dateCell.classList.add(selectedDateClass);\n dateCell.setAttribute('aria-selected', 'true');\n }\n }\n\n this.selectedDate = date;\n };\n\n /**\n * Normalizes the key event into an action name. The action will be broadcast\n * to the child controllers.\n * @param {KeyboardEvent} event\n * @returns {string} The action that should be taken, or null if the key\n * does not match a calendar shortcut.\n */\n CalendarCtrl.prototype.getActionFromKeyEvent = function(event) {\n var keyCode = this.keyCode;\n\n switch (event.which) {\n case keyCode.ENTER: return 'select';\n\n case keyCode.RIGHT_ARROW: return 'move-right';\n case keyCode.LEFT_ARROW: return 'move-left';\n\n case keyCode.DOWN_ARROW: return event.metaKey ? 'move-page-down' : 'move-row-down';\n case keyCode.UP_ARROW: return event.metaKey ? 'move-page-up' : 'move-row-up';\n\n case keyCode.PAGE_DOWN: return 'move-page-down';\n case keyCode.PAGE_UP: return 'move-page-up';\n\n case keyCode.HOME: return 'start';\n case keyCode.END: return 'end';\n\n default: return null;\n }\n };\n\n /**\n * Handles a key event in the calendar with the appropriate action.\n * The action will either\n * - select the focused date\n * - navigate to focus a new date\n * - emit a md-calendar-close event if in a md-datepicker panel\n * - emit a md-calendar-parent-action\n * - delegate to normal tab order if the TAB key is pressed in standalone mode\n * @param {KeyboardEvent} event\n */\n CalendarCtrl.prototype.handleKeyEvent = function(event) {\n var self = this;\n\n this.$scope.$apply(function() {\n // Capture escape and emit back up so that a wrapping component\n // (such as a date-picker) can decide to close.\n if (event.which === self.keyCode.ESCAPE ||\n (event.which === self.keyCode.TAB && !self.standaloneMode)) {\n self.$scope.$emit('md-calendar-close');\n\n if (event.which === self.keyCode.TAB) {\n event.preventDefault();\n }\n\n return;\n } else if (event.which === self.keyCode.TAB && self.standaloneMode) {\n // delegate to the normal tab order if the TAB key is pressed in standalone mode\n return;\n }\n\n // Broadcast the action that any child controllers should take.\n var action = self.getActionFromKeyEvent(event);\n if (action) {\n event.preventDefault();\n event.stopPropagation();\n self.$scope.$broadcast('md-calendar-parent-action', action);\n }\n });\n };\n\n /**\n * Hides the vertical scrollbar on the calendar scroller of a child controller by\n * setting the width on the calendar scroller and the `overflow: hidden` wrapper\n * around the scroller, and then setting a padding-right on the scroller equal\n * to the width of the browser's scrollbar.\n *\n * This will cause a reflow.\n *\n * @param {object} childCtrl The child controller whose scrollbar should be hidden.\n */\n CalendarCtrl.prototype.hideVerticalScrollbar = function(childCtrl) {\n var self = this;\n var element = childCtrl.$element[0];\n var scrollMask = element.querySelector('.md-calendar-scroll-mask');\n\n if (self.width > 0) {\n setWidth();\n } else {\n self.$$rAF(function() {\n var scroller = childCtrl.calendarScroller;\n\n self.scrollbarWidth = scroller.offsetWidth - scroller.clientWidth;\n self.width = element.querySelector('table').offsetWidth;\n setWidth();\n });\n }\n\n function setWidth() {\n var width = self.width || FALLBACK_WIDTH;\n var scrollbarWidth = self.scrollbarWidth;\n var scroller = childCtrl.calendarScroller;\n\n scrollMask.style.width = width + 'px';\n scroller.style.width = (width + scrollbarWidth) + 'px';\n scroller.style.paddingRight = scrollbarWidth + 'px';\n }\n };\n\n /**\n * Gets an identifier for a date unique to the calendar instance for internal\n * purposes. Not to be displayed.\n * @param {Date} date The date for which the id is being generated\n * @param {string} namespace Namespace for the id. (month, year etc.)\n * @returns {string}\n */\n CalendarCtrl.prototype.getDateId = function(date, namespace) {\n if (!namespace) {\n throw new Error('A namespace for the date id has to be specified.');\n }\n\n return [\n 'md',\n this.id,\n namespace,\n date.getFullYear(),\n date.getMonth(),\n date.getDate()\n ].join('-');\n };\n\n /**\n * Util to trigger an extra digest on a parent scope, in order to to ensure that\n * any child virtual repeaters have updated. This is necessary, because the virtual\n * repeater doesn't update the $index the first time around since the content isn't\n * in place yet. The case, in which this is an issue, is when the repeater has less\n * than a page of content (e.g. a month or year view has a min or max date).\n */\n CalendarCtrl.prototype.updateVirtualRepeat = function() {\n var scope = this.$scope;\n var virtualRepeatResizeListener = scope.$on('$md-resize-enable', function() {\n if (!scope.$$phase) {\n scope.$apply();\n }\n\n virtualRepeatResizeListener();\n });\n };\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n CalendarMonthCtrl.$inject = [\"$element\", \"$scope\", \"$animate\", \"$q\", \"$$mdDateUtil\", \"$mdDateLocale\"];\n angular.module('material.components.datepicker')\n .directive('mdCalendarMonth', calendarDirective);\n\n /**\n * Height of one calendar month tbody. This must be made known to the virtual-repeat and is\n * subsequently used for scrolling to specific months.\n */\n var TBODY_HEIGHT = 265;\n\n /**\n * Height of a calendar month with a single row. This is needed to calculate the offset for\n * rendering an extra month in virtual-repeat that only contains one row.\n */\n var TBODY_SINGLE_ROW_HEIGHT = 45;\n\n /** Private directive that represents a list of months inside the calendar. */\n function calendarDirective() {\n return {\n template:\n '<table aria-hidden=\"true\" class=\"md-calendar-day-header\"><thead></thead></table>' +\n '<div class=\"md-calendar-scroll-mask\">' +\n '<md-virtual-repeat-container class=\"md-calendar-scroll-container\" ' +\n 'md-offset-size=\"' + (TBODY_SINGLE_ROW_HEIGHT - TBODY_HEIGHT) + '\">' +\n '<table role=\"grid\" tabindex=\"0\" class=\"md-calendar\" aria-readonly=\"true\">' +\n '<tbody ' +\n 'md-calendar-month-body ' +\n 'role=\"rowgroup\" ' +\n 'md-virtual-repeat=\"i in monthCtrl.items\" ' +\n 'md-month-offset=\"$index\" ' +\n 'class=\"md-calendar-month\" ' +\n 'md-start-index=\"monthCtrl.getSelectedMonthIndex()\" ' +\n 'md-item-size=\"' + TBODY_HEIGHT + '\">' +\n\n // The <tr> ensures that the <tbody> will always have the\n // proper height, even if it's empty. If it's content is\n // compiled, the <tr> will be overwritten.\n '<tr aria-hidden=\"true\" md-force-height=\"\\'' + TBODY_HEIGHT + 'px\\'\"></tr>' +\n '</tbody>' +\n '</table>' +\n '</md-virtual-repeat-container>' +\n '</div>',\n require: ['^^mdCalendar', 'mdCalendarMonth'],\n controller: CalendarMonthCtrl,\n controllerAs: 'monthCtrl',\n bindToController: true,\n link: function(scope, element, attrs, controllers) {\n var calendarCtrl = controllers[0];\n var monthCtrl = controllers[1];\n monthCtrl.initialize(calendarCtrl);\n }\n };\n }\n\n /**\n * Controller for the calendar month component.\n * @ngInject @constructor\n */\n function CalendarMonthCtrl($element, $scope, $animate, $q,\n $$mdDateUtil, $mdDateLocale) {\n\n /** @final {!angular.JQLite} */\n this.$element = $element;\n\n /** @final {!angular.Scope} */\n this.$scope = $scope;\n\n /** @final {!angular.$animate} */\n this.$animate = $animate;\n\n /** @final {!angular.$q} */\n this.$q = $q;\n\n /** @final */\n this.dateUtil = $$mdDateUtil;\n\n /** @final */\n this.dateLocale = $mdDateLocale;\n\n /** @final {HTMLElement} */\n this.calendarScroller = $element[0].querySelector('.md-virtual-repeat-scroller');\n\n /** @type {boolean} */\n this.isInitialized = false;\n\n /** @type {boolean} */\n this.isMonthTransitionInProgress = false;\n\n var self = this;\n\n /**\n * Handles a click event on a date cell.\n * Created here so that every cell can use the same function instance.\n * @this {HTMLTableCellElement} The cell that was clicked.\n */\n this.cellClickHandler = function() {\n var timestamp = $$mdDateUtil.getTimestampFromNode(this);\n self.$scope.$apply(function() {\n // The timestamp has to be converted to a valid date.\n self.calendarCtrl.setNgModelValue(new Date(timestamp));\n });\n };\n\n /**\n * Handles click events on the month headers. Switches\n * the calendar to the year view.\n * @this {HTMLTableCellElement} The cell that was clicked.\n */\n this.headerClickHandler = function() {\n self.calendarCtrl.setCurrentView('year', $$mdDateUtil.getTimestampFromNode(this));\n };\n }\n\n /** Initialization **/\n\n /**\n * Initialize the controller by saving a reference to the calendar and\n * setting up the object that will be iterated by the virtual repeater.\n */\n CalendarMonthCtrl.prototype.initialize = function(calendarCtrl) {\n /**\n * Dummy array-like object for virtual-repeat to iterate over. The length is the total\n * number of months that can be viewed. We add 2 months: one to include the current month\n * and one for the last dummy month.\n *\n * This is shorter than ideal because of a (potential) Firefox bug\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1181658.\n */\n\n this.items = {\n length: this.dateUtil.getMonthDistance(\n calendarCtrl.firstRenderableDate,\n calendarCtrl.lastRenderableDate\n ) + 2\n };\n\n this.calendarCtrl = calendarCtrl;\n this.attachScopeListeners();\n calendarCtrl.updateVirtualRepeat();\n\n // Fire the initial render, since we might have missed it the first time it fired.\n calendarCtrl.ngModelCtrl && calendarCtrl.ngModelCtrl.$render();\n };\n\n /**\n * Gets the \"index\" of the currently selected date as it would be in the virtual-repeat.\n * @returns {number} the \"index\" of the currently selected date\n */\n CalendarMonthCtrl.prototype.getSelectedMonthIndex = function() {\n var calendarCtrl = this.calendarCtrl;\n\n return this.dateUtil.getMonthDistance(\n calendarCtrl.firstRenderableDate,\n calendarCtrl.displayDate || calendarCtrl.selectedDate || calendarCtrl.today\n );\n };\n\n /**\n * Change the date that is being shown in the calendar. If the given date is in a different\n * month, the displayed month will be transitioned.\n * @param {Date} date\n */\n CalendarMonthCtrl.prototype.changeDisplayDate = function(date) {\n // Initialization is deferred until this function is called because we want to reflect\n // the starting value of ngModel.\n if (!this.isInitialized) {\n this.buildWeekHeader();\n this.calendarCtrl.hideVerticalScrollbar(this);\n this.isInitialized = true;\n return this.$q.when();\n }\n\n // If trying to show an invalid date or a transition is in progress, do nothing.\n if (!this.dateUtil.isValidDate(date) || this.isMonthTransitionInProgress) {\n return this.$q.when();\n }\n\n this.isMonthTransitionInProgress = true;\n var animationPromise = this.animateDateChange(date);\n\n this.calendarCtrl.displayDate = date;\n\n var self = this;\n animationPromise.then(function() {\n self.isMonthTransitionInProgress = false;\n });\n\n return animationPromise;\n };\n\n /**\n * Animates the transition from the calendar's current month to the given month.\n * @param {Date} date\n * @returns {angular.$q.Promise} The animation promise.\n */\n CalendarMonthCtrl.prototype.animateDateChange = function(date) {\n if (this.dateUtil.isValidDate(date)) {\n var monthDistance = this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate, date);\n this.calendarScroller.scrollTop = monthDistance * TBODY_HEIGHT;\n }\n\n return this.$q.when();\n };\n\n /**\n * Builds and appends a day-of-the-week header to the calendar.\n * This should only need to be called once during initialization.\n */\n CalendarMonthCtrl.prototype.buildWeekHeader = function() {\n var firstDayOfWeek = this.dateLocale.firstDayOfWeek;\n var shortDays = this.dateLocale.shortDays;\n\n var row = document.createElement('tr');\n for (var i = 0; i < 7; i++) {\n var th = document.createElement('th');\n th.textContent = shortDays[(i + firstDayOfWeek) % 7];\n row.appendChild(th);\n }\n\n this.$element.find('thead').append(row);\n };\n\n /**\n * Attaches listeners for the scope events that are broadcast by the calendar.\n */\n CalendarMonthCtrl.prototype.attachScopeListeners = function() {\n var self = this;\n\n self.$scope.$on('md-calendar-parent-changed', function(event, value) {\n self.calendarCtrl.changeSelectedDate(value);\n self.changeDisplayDate(value);\n });\n\n self.$scope.$on('md-calendar-parent-action', angular.bind(this, this.handleKeyEvent));\n };\n\n /**\n * Handles the month-specific keyboard interactions.\n * @param {Object} event Scope event object passed by the calendar.\n * @param {String} action Action, corresponding to the key that was pressed.\n */\n CalendarMonthCtrl.prototype.handleKeyEvent = function(event, action) {\n var calendarCtrl = this.calendarCtrl;\n var displayDate = calendarCtrl.displayDate;\n\n if (action === 'select') {\n calendarCtrl.setNgModelValue(displayDate);\n } else {\n var date = null;\n var dateUtil = this.dateUtil;\n\n switch (action) {\n case 'move-right': date = dateUtil.incrementDays(displayDate, 1); break;\n case 'move-left': date = dateUtil.incrementDays(displayDate, -1); break;\n\n case 'move-page-down': date = dateUtil.incrementMonths(displayDate, 1); break;\n case 'move-page-up': date = dateUtil.incrementMonths(displayDate, -1); break;\n\n case 'move-row-down': date = dateUtil.incrementDays(displayDate, 7); break;\n case 'move-row-up': date = dateUtil.incrementDays(displayDate, -7); break;\n\n case 'start': date = dateUtil.getFirstDateOfMonth(displayDate); break;\n case 'end': date = dateUtil.getLastDateOfMonth(displayDate); break;\n }\n\n if (date) {\n date = this.dateUtil.clampDate(date, calendarCtrl.minDate, calendarCtrl.maxDate);\n\n this.changeDisplayDate(date).then(function() {\n calendarCtrl.focusDate(date);\n });\n }\n }\n };\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n mdCalendarMonthBodyDirective.$inject = [\"$compile\", \"$$mdSvgRegistry\"];\n CalendarMonthBodyCtrl.$inject = [\"$element\", \"$$mdDateUtil\", \"$mdDateLocale\"];\n angular.module('material.components.datepicker')\n .directive('mdCalendarMonthBody', mdCalendarMonthBodyDirective);\n\n /**\n * Private directive consumed by md-calendar-month. Having this directive lets the calender use\n * md-virtual-repeat and also cleanly separates the month DOM construction functions from\n * the rest of the calendar controller logic.\n * @ngInject\n */\n function mdCalendarMonthBodyDirective($compile, $$mdSvgRegistry) {\n var ARROW_ICON = $compile('<md-icon md-svg-src=\"' +\n $$mdSvgRegistry.mdTabsArrow + '\"></md-icon>')({})[0];\n\n return {\n require: ['^^mdCalendar', '^^mdCalendarMonth', 'mdCalendarMonthBody'],\n scope: { offset: '=mdMonthOffset' },\n controller: CalendarMonthBodyCtrl,\n controllerAs: 'mdMonthBodyCtrl',\n bindToController: true,\n link: function(scope, element, attrs, controllers) {\n var calendarCtrl = controllers[0];\n var monthCtrl = controllers[1];\n var monthBodyCtrl = controllers[2];\n\n monthBodyCtrl.calendarCtrl = calendarCtrl;\n monthBodyCtrl.monthCtrl = monthCtrl;\n monthBodyCtrl.arrowIcon = ARROW_ICON.cloneNode(true);\n\n // The virtual-repeat re-uses the same DOM elements, so there are only a limited number\n // of repeated items that are linked, and then those elements have their bindings updated.\n // Since the months are not generated by bindings, we simply regenerate the entire thing\n // when the binding (offset) changes.\n scope.$watch(function() { return monthBodyCtrl.offset; }, function(offset) {\n if (angular.isNumber(offset)) {\n monthBodyCtrl.generateContent();\n }\n });\n }\n };\n }\n\n /**\n * Controller for a single calendar month.\n * @ngInject @constructor\n */\n function CalendarMonthBodyCtrl($element, $$mdDateUtil, $mdDateLocale) {\n /**\n * @final\n * @type {!JQLite}\n */\n this.$element = $element;\n\n /** @final */\n this.dateUtil = $$mdDateUtil;\n\n /** @final */\n this.dateLocale = $mdDateLocale;\n\n /** @type {Object} Reference to the month view. */\n this.monthCtrl = null;\n\n /** @type {Object} Reference to the calendar. */\n this.calendarCtrl = null;\n\n /**\n * Number of months from the start of the month \"items\" that the currently rendered month\n * occurs. Set via angular data binding.\n * @type {number|null}\n */\n this.offset = null;\n\n /**\n * Date cell to focus after appending the month to the document.\n * @type {HTMLElement}\n */\n this.focusAfterAppend = null;\n }\n\n /** Generate and append the content for this month to the directive element. */\n CalendarMonthBodyCtrl.prototype.generateContent = function() {\n var date = this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate, this.offset);\n\n this.$element\n .empty()\n .append(this.buildCalendarForMonth(date));\n\n if (this.focusAfterAppend) {\n this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS);\n this.focusAfterAppend = null;\n }\n };\n\n /**\n * Creates a single cell to contain a date in the calendar with all appropriate\n * attributes and classes added. If a date is given, the cell content will be set\n * based on the date.\n * @param {Date=} opt_date\n * @returns {HTMLElement}\n */\n CalendarMonthBodyCtrl.prototype.buildDateCell = function(opt_date) {\n var monthCtrl = this.monthCtrl;\n var calendarCtrl = this.calendarCtrl;\n\n // TODO(jelbourn): cloneNode is likely a faster way of doing this.\n var cell = document.createElement('td');\n cell.tabIndex = -1;\n cell.classList.add('md-calendar-date');\n cell.setAttribute('role', 'gridcell');\n\n if (opt_date) {\n cell.setAttribute('tabindex', '-1');\n cell.setAttribute('aria-label', this.dateLocale.longDateFormatter(opt_date));\n cell.id = calendarCtrl.getDateId(opt_date, 'month');\n\n // Use `data-timestamp` attribute because IE10 does not support the `dataset` property.\n cell.setAttribute('data-timestamp', opt_date.getTime());\n\n // TODO(jelourn): Doing these comparisons for class addition during generation might be slow.\n // It may be better to finish the construction and then query the node and add the class.\n if (this.dateUtil.isSameDay(opt_date, calendarCtrl.today)) {\n cell.classList.add(calendarCtrl.TODAY_CLASS);\n }\n\n if (this.dateUtil.isValidDate(calendarCtrl.selectedDate) &&\n this.dateUtil.isSameDay(opt_date, calendarCtrl.selectedDate)) {\n cell.classList.add(calendarCtrl.SELECTED_DATE_CLASS);\n cell.setAttribute('aria-selected', 'true');\n }\n\n var cellText = this.dateLocale.dates[opt_date.getDate()];\n\n if (this.isDateEnabled(opt_date)) {\n // Add a indicator for select, hover, and focus states.\n var selectionIndicator = document.createElement('span');\n selectionIndicator.classList.add('md-calendar-date-selection-indicator');\n selectionIndicator.textContent = cellText;\n cell.appendChild(selectionIndicator);\n cell.addEventListener('click', monthCtrl.cellClickHandler);\n\n if (calendarCtrl.displayDate && this.dateUtil.isSameDay(opt_date, calendarCtrl.displayDate)) {\n this.focusAfterAppend = cell;\n }\n } else {\n cell.classList.add('md-calendar-date-disabled');\n cell.textContent = cellText;\n }\n }\n\n return cell;\n };\n\n /**\n * Check whether date is in range and enabled\n * @param {Date=} opt_date\n * @return {boolean} Whether the date is enabled.\n */\n CalendarMonthBodyCtrl.prototype.isDateEnabled = function(opt_date) {\n return this.dateUtil.isDateWithinRange(opt_date,\n this.calendarCtrl.minDate, this.calendarCtrl.maxDate) &&\n (!angular.isFunction(this.calendarCtrl.dateFilter)\n || this.calendarCtrl.dateFilter(opt_date));\n };\n\n /**\n * Builds a `tr` element for the calendar grid.\n * @param rowNumber The week number within the month.\n * @returns {HTMLElement}\n */\n CalendarMonthBodyCtrl.prototype.buildDateRow = function(rowNumber) {\n var row = document.createElement('tr');\n row.setAttribute('role', 'row');\n\n // Because of an NVDA bug (with Firefox), the row needs an aria-label in order\n // to prevent the entire row being read aloud when the user moves between rows.\n // See http://community.nvda-project.org/ticket/4643.\n row.setAttribute('aria-label', this.dateLocale.weekNumberFormatter(rowNumber));\n\n return row;\n };\n\n /**\n * Builds the <tbody> content for the given date's month.\n * @param {Date=} opt_dateInMonth\n * @returns {DocumentFragment} A document fragment containing the <tr> elements.\n */\n CalendarMonthBodyCtrl.prototype.buildCalendarForMonth = function(opt_dateInMonth) {\n var date = this.dateUtil.isValidDate(opt_dateInMonth) ? opt_dateInMonth : new Date();\n\n var firstDayOfMonth = this.dateUtil.getFirstDateOfMonth(date);\n var firstDayOfTheWeek = this.getLocaleDay_(firstDayOfMonth);\n var numberOfDaysInMonth = this.dateUtil.getNumberOfDaysInMonth(date);\n\n // Store rows for the month in a document fragment so that we can append them all at once.\n var monthBody = document.createDocumentFragment();\n\n var rowNumber = 1;\n var row = this.buildDateRow(rowNumber);\n monthBody.appendChild(row);\n\n // If this is the final month in the list of items, only the first week should render,\n // so we should return immediately after the first row is complete and has been\n // attached to the body.\n var isFinalMonth = this.offset === this.monthCtrl.items.length - 1;\n\n // Add a label for the month. If the month starts on a Sun/Mon/Tues, the month label\n // goes on a row above the first of the month. Otherwise, the month label takes up the first\n // two cells of the first row.\n var blankCellOffset = 0;\n var monthLabelCell = document.createElement('td');\n var monthLabelCellContent = document.createElement('span');\n var calendarCtrl = this.calendarCtrl;\n\n monthLabelCellContent.textContent = this.dateLocale.monthHeaderFormatter(date);\n monthLabelCell.appendChild(monthLabelCellContent);\n monthLabelCell.classList.add('md-calendar-month-label');\n // If the entire month is after the max date, render the label as a disabled state.\n if (calendarCtrl.maxDate && firstDayOfMonth > calendarCtrl.maxDate) {\n monthLabelCell.classList.add('md-calendar-month-label-disabled');\n // If the user isn't supposed to be able to change views, render the\n // label as usual, but disable the clicking functionality.\n } else if (!calendarCtrl.mode) {\n monthLabelCell.addEventListener('click', this.monthCtrl.headerClickHandler);\n monthLabelCell.setAttribute('data-timestamp', firstDayOfMonth.getTime());\n monthLabelCell.setAttribute('aria-label', this.dateLocale.monthFormatter(date));\n monthLabelCell.classList.add('md-calendar-label-clickable');\n monthLabelCell.appendChild(this.arrowIcon.cloneNode(true));\n }\n\n if (firstDayOfTheWeek <= 2) {\n monthLabelCell.setAttribute('colspan', '7');\n\n var monthLabelRow = this.buildDateRow();\n monthLabelRow.appendChild(monthLabelCell);\n monthBody.insertBefore(monthLabelRow, row);\n\n if (isFinalMonth) {\n return monthBody;\n }\n } else {\n blankCellOffset = 3;\n monthLabelCell.setAttribute('colspan', '3');\n row.appendChild(monthLabelCell);\n }\n\n // Add a blank cell for each day of the week that occurs before the first of the month.\n // For example, if the first day of the month is a Tuesday, add blank cells for Sun and Mon.\n // The blankCellOffset is needed in cases where the first N cells are used by the month label.\n for (var i = blankCellOffset; i < firstDayOfTheWeek; i++) {\n row.appendChild(this.buildDateCell());\n }\n\n // Add a cell for each day of the month, keeping track of the day of the week so that\n // we know when to start a new row.\n var dayOfWeek = firstDayOfTheWeek;\n var iterationDate = firstDayOfMonth;\n for (var d = 1; d <= numberOfDaysInMonth; d++) {\n // If we've reached the end of the week, start a new row.\n if (dayOfWeek === 7) {\n // We've finished the first row, so we're done if this is the final month.\n if (isFinalMonth) {\n return monthBody;\n }\n dayOfWeek = 0;\n rowNumber++;\n row = this.buildDateRow(rowNumber);\n monthBody.appendChild(row);\n }\n\n iterationDate.setDate(d);\n var cell = this.buildDateCell(iterationDate);\n row.appendChild(cell);\n\n dayOfWeek++;\n }\n\n // Ensure that the last row of the month has 7 cells.\n while (row.childNodes.length < 7) {\n row.appendChild(this.buildDateCell());\n }\n\n // Ensure that all months have 6 rows. This is necessary for now because the virtual-repeat\n // requires that all items have exactly the same height.\n while (monthBody.childNodes.length < 6) {\n var whitespaceRow = this.buildDateRow();\n for (var j = 0; j < 7; j++) {\n whitespaceRow.appendChild(this.buildDateCell());\n }\n monthBody.appendChild(whitespaceRow);\n }\n\n return monthBody;\n };\n\n /**\n * Gets the day-of-the-week index for a date for the current locale.\n * @private\n * @param {Date} date\n * @returns {number} The column index of the date in the calendar.\n */\n CalendarMonthBodyCtrl.prototype.getLocaleDay_ = function(date) {\n return (date.getDay() + (7 - this.dateLocale.firstDayOfWeek)) % 7;\n };\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n CalendarYearCtrl.$inject = [\"$element\", \"$scope\", \"$animate\", \"$q\", \"$$mdDateUtil\", \"$mdUtil\"];\n angular.module('material.components.datepicker')\n .directive('mdCalendarYear', calendarDirective);\n\n /**\n * Height of one calendar year tbody. This must be made known to the virtual-repeat and is\n * subsequently used for scrolling to specific years.\n */\n var TBODY_HEIGHT = 88;\n\n /** Private component, representing a list of years in the calendar. */\n function calendarDirective() {\n return {\n template:\n '<div class=\"md-calendar-scroll-mask\">' +\n '<md-virtual-repeat-container class=\"md-calendar-scroll-container\">' +\n '<table role=\"grid\" tabindex=\"0\" class=\"md-calendar\" aria-readonly=\"true\">' +\n '<tbody ' +\n 'md-calendar-year-body ' +\n 'role=\"rowgroup\" ' +\n 'md-virtual-repeat=\"i in yearCtrl.items\" ' +\n 'md-year-offset=\"$index\" class=\"md-calendar-year\" ' +\n 'md-start-index=\"yearCtrl.getFocusedYearIndex()\" ' +\n 'md-item-size=\"' + TBODY_HEIGHT + '\">' +\n // The <tr> ensures that the <tbody> will have the proper\n // height, even though it may be empty.\n '<tr aria-hidden=\"true\" md-force-height=\"\\'' + TBODY_HEIGHT + 'px\\'\"></tr>' +\n '</tbody>' +\n '</table>' +\n '</md-virtual-repeat-container>' +\n '</div>',\n require: ['^^mdCalendar', 'mdCalendarYear'],\n controller: CalendarYearCtrl,\n controllerAs: 'yearCtrl',\n bindToController: true,\n link: function(scope, element, attrs, controllers) {\n var calendarCtrl = controllers[0];\n var yearCtrl = controllers[1];\n yearCtrl.initialize(calendarCtrl);\n }\n };\n }\n\n /**\n * Controller for the mdCalendar component.\n * @ngInject @constructor\n */\n function CalendarYearCtrl($element, $scope, $animate, $q, $$mdDateUtil, $mdUtil) {\n\n /** @final {!angular.JQLite} */\n this.$element = $element;\n\n /** @final {!angular.Scope} */\n this.$scope = $scope;\n\n /** @final {!angular.$animate} */\n this.$animate = $animate;\n\n /** @final {!angular.$q} */\n this.$q = $q;\n\n /** @final */\n this.dateUtil = $$mdDateUtil;\n\n /** @final {HTMLElement} */\n this.calendarScroller = $element[0].querySelector('.md-virtual-repeat-scroller');\n\n /** @type {boolean} */\n this.isInitialized = false;\n\n /** @type {boolean} */\n this.isMonthTransitionInProgress = false;\n\n /** @final */\n this.$mdUtil = $mdUtil;\n\n var self = this;\n\n /**\n * Handles a click event on a date cell.\n * Created here so that every cell can use the same function instance.\n * @this {HTMLTableCellElement} The cell that was clicked.\n */\n this.cellClickHandler = function() {\n self.onTimestampSelected($$mdDateUtil.getTimestampFromNode(this));\n };\n }\n\n /**\n * Initialize the controller by saving a reference to the calendar and\n * setting up the object that will be iterated by the virtual repeater.\n */\n CalendarYearCtrl.prototype.initialize = function(calendarCtrl) {\n /**\n * Dummy array-like object for virtual-repeat to iterate over. The length is the total\n * number of years that can be viewed. We add 1 extra in order to include the current year.\n */\n\n this.items = {\n length: this.dateUtil.getYearDistance(\n calendarCtrl.firstRenderableDate,\n calendarCtrl.lastRenderableDate\n ) + 1\n };\n\n this.calendarCtrl = calendarCtrl;\n this.attachScopeListeners();\n calendarCtrl.updateVirtualRepeat();\n\n // Fire the initial render, since we might have missed it the first time it fired.\n calendarCtrl.ngModelCtrl && calendarCtrl.ngModelCtrl.$render();\n };\n\n /**\n * Gets the \"index\" of the currently selected date as it would be in the virtual-repeat.\n * @returns {number}\n */\n CalendarYearCtrl.prototype.getFocusedYearIndex = function() {\n var calendarCtrl = this.calendarCtrl;\n\n return this.dateUtil.getYearDistance(\n calendarCtrl.firstRenderableDate,\n calendarCtrl.displayDate || calendarCtrl.selectedDate || calendarCtrl.today\n );\n };\n\n /**\n * Change the date that is highlighted in the calendar.\n * @param {Date} date\n */\n CalendarYearCtrl.prototype.changeDate = function(date) {\n // Initialization is deferred until this function is called because we want to reflect\n // the starting value of ngModel.\n if (!this.isInitialized) {\n this.calendarCtrl.hideVerticalScrollbar(this);\n this.isInitialized = true;\n return this.$q.when();\n } else if (this.dateUtil.isValidDate(date) && !this.isMonthTransitionInProgress) {\n var self = this;\n var animationPromise = this.animateDateChange(date);\n\n self.isMonthTransitionInProgress = true;\n self.calendarCtrl.displayDate = date;\n\n return animationPromise.then(function() {\n self.isMonthTransitionInProgress = false;\n });\n }\n };\n\n /**\n * Animates the transition from the calendar's current month to the given month.\n * @param {Date} date\n * @returns {angular.$q.Promise} The animation promise.\n */\n CalendarYearCtrl.prototype.animateDateChange = function(date) {\n if (this.dateUtil.isValidDate(date)) {\n var monthDistance = this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate, date);\n this.calendarScroller.scrollTop = monthDistance * TBODY_HEIGHT;\n }\n\n return this.$q.when();\n };\n\n /**\n * Handles the year-view-specific keyboard interactions.\n * @param {Object} event Scope event object passed by the calendar.\n * @param {String} action Action, corresponding to the key that was pressed.\n */\n CalendarYearCtrl.prototype.handleKeyEvent = function(event, action) {\n var self = this;\n var calendarCtrl = self.calendarCtrl;\n var displayDate = calendarCtrl.displayDate;\n\n if (action === 'select') {\n self.changeDate(displayDate).then(function() {\n self.onTimestampSelected(displayDate);\n });\n } else {\n var date = null;\n var dateUtil = self.dateUtil;\n\n switch (action) {\n case 'move-right': date = dateUtil.incrementMonths(displayDate, 1); break;\n case 'move-left': date = dateUtil.incrementMonths(displayDate, -1); break;\n\n case 'move-row-down': date = dateUtil.incrementMonths(displayDate, 6); break;\n case 'move-row-up': date = dateUtil.incrementMonths(displayDate, -6); break;\n }\n\n if (date) {\n var min = calendarCtrl.minDate ? dateUtil.getFirstDateOfMonth(calendarCtrl.minDate) : null;\n var max = calendarCtrl.maxDate ? dateUtil.getFirstDateOfMonth(calendarCtrl.maxDate) : null;\n date = dateUtil.getFirstDateOfMonth(self.dateUtil.clampDate(date, min, max));\n\n self.changeDate(date).then(function() {\n calendarCtrl.focusDate(date);\n });\n }\n }\n };\n\n /**\n * Attaches listeners for the scope events that are broadcast by the calendar.\n */\n CalendarYearCtrl.prototype.attachScopeListeners = function() {\n var self = this;\n\n self.$scope.$on('md-calendar-parent-changed', function(event, value) {\n self.calendarCtrl.changeSelectedDate(value ? self.dateUtil.getFirstDateOfMonth(value) : value);\n self.changeDate(value);\n });\n\n self.$scope.$on('md-calendar-parent-action', angular.bind(self, self.handleKeyEvent));\n };\n\n /**\n * Handles the behavior when a date is selected. Depending on the `mode`\n * of the calendar, this can either switch back to the calendar view or\n * set the model value.\n * @param {number} timestamp The selected timestamp.\n */\n CalendarYearCtrl.prototype.onTimestampSelected = function(timestamp) {\n var calendarCtrl = this.calendarCtrl;\n\n if (calendarCtrl.mode) {\n this.$mdUtil.nextTick(function() {\n // The timestamp has to be converted to a valid date.\n calendarCtrl.setNgModelValue(new Date(timestamp));\n });\n } else {\n calendarCtrl.setCurrentView('month', timestamp);\n }\n };\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n CalendarYearBodyCtrl.$inject = [\"$element\", \"$$mdDateUtil\", \"$mdDateLocale\"];\n angular.module('material.components.datepicker')\n .directive('mdCalendarYearBody', mdCalendarYearDirective);\n\n /**\n * Private component, consumed by the md-calendar-year, which separates the DOM construction logic\n * and allows for the year view to use md-virtual-repeat.\n */\n function mdCalendarYearDirective() {\n return {\n require: ['^^mdCalendar', '^^mdCalendarYear', 'mdCalendarYearBody'],\n scope: { offset: '=mdYearOffset' },\n controller: CalendarYearBodyCtrl,\n controllerAs: 'mdYearBodyCtrl',\n bindToController: true,\n link: function(scope, element, attrs, controllers) {\n var calendarCtrl = controllers[0];\n var yearCtrl = controllers[1];\n var yearBodyCtrl = controllers[2];\n\n yearBodyCtrl.calendarCtrl = calendarCtrl;\n yearBodyCtrl.yearCtrl = yearCtrl;\n\n scope.$watch(function() { return yearBodyCtrl.offset; }, function(offset) {\n if (angular.isNumber(offset)) {\n yearBodyCtrl.generateContent();\n }\n });\n }\n };\n }\n\n /**\n * Controller for a single year.\n * @ngInject @constructor\n */\n function CalendarYearBodyCtrl($element, $$mdDateUtil, $mdDateLocale) {\n /**\n * @final\n * @type {!JQLite}\n */\n this.$element = $element;\n\n /** @final */\n this.dateUtil = $$mdDateUtil;\n\n /** @final */\n this.dateLocale = $mdDateLocale;\n\n /** @type {Object} Reference to the calendar. */\n this.calendarCtrl = null;\n\n /** @type {Object} Reference to the year view. */\n this.yearCtrl = null;\n\n /**\n * Number of months from the start of the month \"items\" that the currently rendered month\n * occurs. Set via angular data binding.\n * @type {number|null}\n */\n this.offset = null;\n\n /**\n * Date cell to focus after appending the month to the document.\n * @type {HTMLElement}\n */\n this.focusAfterAppend = null;\n }\n\n /** Generate and append the content for this year to the directive element. */\n CalendarYearBodyCtrl.prototype.generateContent = function() {\n var date = this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate, this.offset);\n\n this.$element\n .empty()\n .append(this.buildCalendarForYear(date));\n\n if (this.focusAfterAppend) {\n this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS);\n this.focusAfterAppend = null;\n }\n };\n\n /**\n * Creates a single cell to contain a year in the calendar.\n * @param {number} year Four-digit year.\n * @param {number} month Zero-indexed month.\n * @returns {HTMLElement}\n */\n CalendarYearBodyCtrl.prototype.buildMonthCell = function(year, month) {\n var calendarCtrl = this.calendarCtrl;\n var yearCtrl = this.yearCtrl;\n var cell = this.buildBlankCell();\n\n // Represent this month/year as a date.\n var firstOfMonth = new Date(year, month, 1);\n cell.setAttribute('aria-label', this.dateLocale.monthFormatter(firstOfMonth));\n cell.id = calendarCtrl.getDateId(firstOfMonth, 'year');\n\n // Use `data-timestamp` attribute because IE10 does not support the `dataset` property.\n cell.setAttribute('data-timestamp', String(firstOfMonth.getTime()));\n\n if (this.dateUtil.isSameMonthAndYear(firstOfMonth, calendarCtrl.today)) {\n cell.classList.add(calendarCtrl.TODAY_CLASS);\n }\n\n if (this.dateUtil.isValidDate(calendarCtrl.selectedDate) &&\n this.dateUtil.isSameMonthAndYear(firstOfMonth, calendarCtrl.selectedDate)) {\n cell.classList.add(calendarCtrl.SELECTED_DATE_CLASS);\n cell.setAttribute('aria-selected', 'true');\n }\n\n var cellText = this.dateLocale.shortMonths[month];\n\n if (this.dateUtil.isMonthWithinRange(\n firstOfMonth, calendarCtrl.minDate, calendarCtrl.maxDate) &&\n (!angular.isFunction(calendarCtrl.monthFilter) ||\n calendarCtrl.monthFilter(firstOfMonth))) {\n var selectionIndicator = document.createElement('span');\n selectionIndicator.classList.add('md-calendar-date-selection-indicator');\n selectionIndicator.textContent = cellText;\n cell.appendChild(selectionIndicator);\n cell.addEventListener('click', yearCtrl.cellClickHandler);\n\n if (calendarCtrl.displayDate &&\n this.dateUtil.isSameMonthAndYear(firstOfMonth, calendarCtrl.displayDate)) {\n this.focusAfterAppend = cell;\n }\n } else {\n cell.classList.add('md-calendar-date-disabled');\n cell.textContent = cellText;\n }\n\n return cell;\n };\n\n /**\n * Builds a blank cell.\n * @return {HTMLElement}\n */\n CalendarYearBodyCtrl.prototype.buildBlankCell = function() {\n var cell = document.createElement('td');\n cell.tabIndex = -1;\n cell.classList.add('md-calendar-date');\n cell.setAttribute('role', 'gridcell');\n\n cell.setAttribute('tabindex', '-1');\n return cell;\n };\n\n /**\n * Builds the <tbody> content for the given year.\n * @param {Date} date Date for which the content should be built.\n * @returns {DocumentFragment} A document fragment containing the months within the year.\n */\n CalendarYearBodyCtrl.prototype.buildCalendarForYear = function(date) {\n // Store rows for the month in a document fragment so that we can append them all at once.\n var year = date.getFullYear();\n var yearBody = document.createDocumentFragment();\n\n var monthCell, i;\n // First row contains label and Jan-Jun.\n var firstRow = document.createElement('tr');\n var labelCell = document.createElement('td');\n labelCell.className = 'md-calendar-month-label';\n labelCell.textContent = String(year);\n firstRow.appendChild(labelCell);\n\n for (i = 0; i < 6; i++) {\n firstRow.appendChild(this.buildMonthCell(year, i));\n }\n yearBody.appendChild(firstRow);\n\n // Second row contains a blank cell and Jul-Dec.\n var secondRow = document.createElement('tr');\n secondRow.appendChild(this.buildBlankCell());\n for (i = 6; i < 12; i++) {\n secondRow.appendChild(this.buildMonthCell(year, i));\n }\n yearBody.appendChild(secondRow);\n\n return yearBody;\n };\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc service\n * @name $mdDateLocaleProvider\n * @module material.components.datepicker\n *\n * @description\n * The `$mdDateLocaleProvider` is the provider that creates the `$mdDateLocale` service.\n * This provider that allows the user to specify messages, formatters, and parsers for date\n * internationalization. The `$mdDateLocale` service itself is consumed by AngularJS Material\n * components that deal with dates\n * (i.e. <a ng-href=\"api/directive/mdDatepicker\">mdDatepicker</a>).\n *\n * @property {Array<string>} months Array of month names (in order).\n * @property {Array<string>} shortMonths Array of abbreviated month names.\n * @property {Array<string>} days Array of the days of the week (in order).\n * @property {Array<string>} shortDays Array of abbreviated days of the week.\n * @property {Array<string>} dates Array of dates of the month. Only necessary for locales\n * using a numeral system other than [1, 2, 3...].\n * @property {Array<string>} firstDayOfWeek The first day of the week. Sunday = 0, Monday = 1,\n * etc.\n * @property {function(string): Date} parseDate Function that converts a date string to a Date\n * object (the date portion).\n * @property {function(Date, string): string} formatDate Function to format a date object to a\n * string. The datepicker directive also provides the time zone, if it was specified.\n * @property {function(Date): string} monthHeaderFormatter Function that returns the label for\n * a month given a date.\n * @property {function(Date): string} monthFormatter Function that returns the full name of a month\n * for a given date.\n * @property {function(number): string} weekNumberFormatter Function that returns a label for\n * a week given the week number.\n * @property {function(Date): string} longDateFormatter Function that formats a date into a long\n * `aria-label` that is read by the screen reader when the focused date changes.\n * @property {string} msgCalendar Translation of the label \"Calendar\" for the current locale.\n * @property {string} msgOpenCalendar Translation of the button label \"Open calendar\" for the\n * current locale.\n * @property {Date} firstRenderableDate The date from which the datepicker calendar will begin\n * rendering. Note that this will be ignored if a minimum date is set.\n * Defaults to January 1st 1880.\n * @property {Date} lastRenderableDate The last date that will be rendered by the datepicker\n * calendar. Note that this will be ignored if a maximum date is set.\n * Defaults to January 1st 2130.\n * @property {function(string): boolean} isDateComplete Function to determine whether a string\n * makes sense to be parsed to a `Date` object. Returns `true` if the date appears to be complete\n * and parsing should occur. By default, this checks for 3 groups of text or numbers separated\n * by delimiters. This means that by default, date strings must include a month, day, and year\n * to be parsed and for the model to be updated.\n *\n * @usage\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdDateLocaleProvider) {\n *\n * // Example of a French localization.\n * $mdDateLocaleProvider.months = ['janvier', 'février', 'mars', ...];\n * $mdDateLocaleProvider.shortMonths = ['janv', 'févr', 'mars', ...];\n * $mdDateLocaleProvider.days = ['dimanche', 'lundi', 'mardi', ...];\n * $mdDateLocaleProvider.shortDays = ['Di', 'Lu', 'Ma', ...];\n *\n * // Can change week display to start on Monday.\n * $mdDateLocaleProvider.firstDayOfWeek = 1;\n *\n * // Optional.\n * $mdDateLocaleProvider.dates = [1, 2, 3, 4, 5, 6, ...];\n *\n * // Example uses moment.js to parse and format dates.\n * $mdDateLocaleProvider.parseDate = function(dateString) {\n * var m = moment(dateString, 'L', true);\n * return m.isValid() ? m.toDate() : new Date(NaN);\n * };\n *\n * $mdDateLocaleProvider.formatDate = function(date) {\n * var m = moment(date);\n * return m.isValid() ? m.format('L') : '';\n * };\n *\n * // Allow only a day and month to be specified.\n * // This is required if using the 'M/D' format with moment.js.\n * $mdDateLocaleProvider.isDateComplete = function(dateString) {\n * dateString = dateString.trim();\n *\n * // Look for two chunks of content (either numbers or text) separated by delimiters.\n * var re = /^(([a-zA-Z]{3,}|[0-9]{1,4})([ .,]+|[/-]))([a-zA-Z]{3,}|[0-9]{1,4})/;\n * return re.test(dateString);\n * };\n *\n * $mdDateLocaleProvider.monthHeaderFormatter = function(date) {\n * return myShortMonths[date.getMonth()] + ' ' + date.getFullYear();\n * };\n *\n * // In addition to date display, date components also need localized messages\n * // for aria-labels for screen-reader users.\n *\n * $mdDateLocaleProvider.weekNumberFormatter = function(weekNumber) {\n * return 'Semaine ' + weekNumber;\n * };\n *\n * $mdDateLocaleProvider.msgCalendar = 'Calendrier';\n * $mdDateLocaleProvider.msgOpenCalendar = 'Ouvrir le calendrier';\n *\n * // You can also set when your calendar begins and ends.\n * $mdDateLocaleProvider.firstRenderableDate = new Date(1776, 6, 4);\n * $mdDateLocaleProvider.lastRenderableDate = new Date(2012, 11, 21);\n * });\n * </hljs>\n *\n */\n angular.module('material.components.datepicker').config([\"$provide\", function($provide) {\n // TODO(jelbourn): Assert provided values are correctly formatted. Need assertions.\n\n /** @constructor */\n function DateLocaleProvider() {\n /** Array of full month names. E.g., ['January', 'February', ...] */\n this.months = null;\n\n /** Array of abbreviated month names. E.g., ['Jan', 'Feb', ...] */\n this.shortMonths = null;\n\n /** Array of full day of the week names. E.g., ['Monday', 'Tuesday', ...] */\n this.days = null;\n\n /** Array of abbreviated dat of the week names. E.g., ['M', 'T', ...] */\n this.shortDays = null;\n\n /** Array of dates of a month (1 - 31). Characters might be different in some locales. */\n this.dates = null;\n\n /** Index of the first day of the week. 0 = Sunday, 1 = Monday, etc. */\n this.firstDayOfWeek = 0;\n\n /**\n * Function that converts the date portion of a Date to a string.\n * @type {(function(Date): string)}\n */\n this.formatDate = null;\n\n /**\n * Function that converts a date string to a Date object (the date portion)\n * @type {function(string): Date}\n */\n this.parseDate = null;\n\n /**\n * Function that formats a Date into a month header string.\n * @type {function(Date): string}\n */\n this.monthHeaderFormatter = null;\n\n /**\n * Function that formats a week number into a label for the week.\n * @type {function(number): string}\n */\n this.weekNumberFormatter = null;\n\n /**\n * Function that formats a date into a long aria-label that is read\n * when the focused date changes.\n * @type {function(Date): string}\n */\n this.longDateFormatter = null;\n\n /**\n * Function to determine whether a string makes sense to be\n * parsed to a Date object.\n * @type {function(string): boolean}\n */\n this.isDateComplete = null;\n\n /**\n * ARIA label for the calendar \"dialog\" used in the datepicker.\n * @type {string}\n */\n this.msgCalendar = '';\n\n /**\n * ARIA label for the datepicker's \"Open calendar\" buttons.\n * @type {string}\n */\n this.msgOpenCalendar = '';\n }\n\n /**\n * Factory function that returns an instance of the dateLocale service.\n * @ngInject\n * @param $locale\n * @param $filter\n * @returns {DateLocale}\n */\n DateLocaleProvider.prototype.$get = function($locale, $filter) {\n /**\n * Default date-to-string formatting function.\n * @param {!Date} date\n * @param {string=} timezone\n * @returns {string}\n */\n function defaultFormatDate(date, timezone) {\n if (!date) {\n return '';\n }\n\n // All of the dates created through ng-material *should* be set to midnight.\n // If we encounter a date where the localeTime shows at 11pm instead of midnight,\n // we have run into an issue with DST where we need to increment the hour by one:\n // var d = new Date(1992, 9, 8, 0, 0, 0);\n // d.toLocaleString(); // == \"10/7/1992, 11:00:00 PM\"\n var localeTime = date.toLocaleTimeString();\n var formatDate = date;\n if (date.getHours() === 0 &&\n (localeTime.indexOf('11:') !== -1 || localeTime.indexOf('23:') !== -1)) {\n formatDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 1, 0, 0);\n }\n\n return $filter('date')(formatDate, 'M/d/yyyy', timezone);\n }\n\n /**\n * Default string-to-date parsing function.\n * @param {string|number} dateString\n * @returns {!Date}\n */\n function defaultParseDate(dateString) {\n return new Date(dateString);\n }\n\n /**\n * Default function to determine whether a string makes sense to be\n * parsed to a Date object.\n *\n * This is very permissive and is just a basic check to ensure that\n * things like single integers aren't able to be parsed into dates.\n * @param {string} dateString\n * @returns {boolean}\n */\n function defaultIsDateComplete(dateString) {\n dateString = dateString.trim();\n\n // Looks for three chunks of content (either numbers or text) separated\n // by delimiters.\n var re = /^(([a-zA-Z]{3,}|[0-9]{1,4})([ .,]+|[/-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;\n return re.test(dateString);\n }\n\n /**\n * Default date-to-string formatter to get a month header.\n * @param {!Date} date\n * @returns {string}\n */\n function defaultMonthHeaderFormatter(date) {\n return service.shortMonths[date.getMonth()] + ' ' + date.getFullYear();\n }\n\n /**\n * Default formatter for a month.\n * @param {!Date} date\n * @returns {string}\n */\n function defaultMonthFormatter(date) {\n return service.months[date.getMonth()] + ' ' + date.getFullYear();\n }\n\n /**\n * Default week number formatter.\n * @param number\n * @returns {string}\n */\n function defaultWeekNumberFormatter(number) {\n return 'Week ' + number;\n }\n\n /**\n * Default formatter for date cell aria-labels.\n * @param {!Date} date\n * @returns {string}\n */\n function defaultLongDateFormatter(date) {\n // Example: 'Thursday June 18 2015'\n return [\n service.days[date.getDay()],\n service.months[date.getMonth()],\n service.dates[date.getDate()],\n date.getFullYear()\n ].join(' ');\n }\n\n // The default \"short\" day strings are the first character of each day,\n // e.g., \"Monday\" => \"M\".\n var defaultShortDays = $locale.DATETIME_FORMATS.SHORTDAY.map(function(day) {\n return day.substring(0, 1);\n });\n\n // The default dates are simply the numbers 1 through 31.\n var defaultDates = Array(32);\n for (var i = 1; i <= 31; i++) {\n defaultDates[i] = i;\n }\n\n // Default ARIA messages are in English (US).\n var defaultMsgCalendar = 'Calendar';\n var defaultMsgOpenCalendar = 'Open calendar';\n\n // Default start/end dates that are rendered in the calendar.\n var defaultFirstRenderableDate = new Date(1880, 0, 1);\n var defaultLastRendereableDate = new Date(defaultFirstRenderableDate.getFullYear() + 250, 0, 1);\n\n var service = {\n months: this.months || $locale.DATETIME_FORMATS.MONTH,\n shortMonths: this.shortMonths || $locale.DATETIME_FORMATS.SHORTMONTH,\n days: this.days || $locale.DATETIME_FORMATS.DAY,\n shortDays: this.shortDays || defaultShortDays,\n dates: this.dates || defaultDates,\n firstDayOfWeek: this.firstDayOfWeek || 0,\n formatDate: this.formatDate || defaultFormatDate,\n parseDate: this.parseDate || defaultParseDate,\n isDateComplete: this.isDateComplete || defaultIsDateComplete,\n monthHeaderFormatter: this.monthHeaderFormatter || defaultMonthHeaderFormatter,\n monthFormatter: this.monthFormatter || defaultMonthFormatter,\n weekNumberFormatter: this.weekNumberFormatter || defaultWeekNumberFormatter,\n longDateFormatter: this.longDateFormatter || defaultLongDateFormatter,\n msgCalendar: this.msgCalendar || defaultMsgCalendar,\n msgOpenCalendar: this.msgOpenCalendar || defaultMsgOpenCalendar,\n firstRenderableDate: this.firstRenderableDate || defaultFirstRenderableDate,\n lastRenderableDate: this.lastRenderableDate || defaultLastRendereableDate\n };\n\n return service;\n };\n DateLocaleProvider.prototype.$get.$inject = [\"$locale\", \"$filter\"];\n\n $provide.provider('$mdDateLocale', new DateLocaleProvider());\n }]);\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * Utility for performing date calculations to facilitate operation of the calendar and\n * datepicker.\n */\n angular.module('material.components.datepicker').factory('$$mdDateUtil', [\"$mdDateLocale\", function($mdDateLocale) {\n return {\n getFirstDateOfMonth: getFirstDateOfMonth,\n getNumberOfDaysInMonth: getNumberOfDaysInMonth,\n getDateInNextMonth: getDateInNextMonth,\n getDateInPreviousMonth: getDateInPreviousMonth,\n isInNextMonth: isInNextMonth,\n isInPreviousMonth: isInPreviousMonth,\n getDateMidpoint: getDateMidpoint,\n isSameMonthAndYear: isSameMonthAndYear,\n getWeekOfMonth: getWeekOfMonth,\n incrementDays: incrementDays,\n incrementMonths: incrementMonths,\n getLastDateOfMonth: getLastDateOfMonth,\n isSameDay: isSameDay,\n getMonthDistance: getMonthDistance,\n isValidDate: isValidDate,\n setDateTimeToMidnight: setDateTimeToMidnight,\n createDateAtMidnight: createDateAtMidnight,\n isDateWithinRange: isDateWithinRange,\n incrementYears: incrementYears,\n getYearDistance: getYearDistance,\n clampDate: clampDate,\n getTimestampFromNode: getTimestampFromNode,\n isMonthWithinRange: isMonthWithinRange,\n removeLocalTzAndReparseDate: removeLocalTzAndReparseDate\n };\n\n /**\n * Gets the first day of the month for the given date's month.\n * @param {Date} date\n * @returns {Date}\n */\n function getFirstDateOfMonth(date) {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n }\n\n /**\n * Gets the number of days in the month for the given date's month.\n * @param date\n * @returns {number}\n */\n function getNumberOfDaysInMonth(date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();\n }\n\n /**\n * Get an arbitrary date in the month after the given date's month.\n * @param date\n * @returns {Date}\n */\n function getDateInNextMonth(date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 1);\n }\n\n /**\n * Get an arbitrary date in the month before the given date's month.\n * @param date\n * @returns {Date}\n */\n function getDateInPreviousMonth(date) {\n return new Date(date.getFullYear(), date.getMonth() - 1, 1);\n }\n\n /**\n * Gets whether two dates have the same month and year.\n * @param {Date} d1\n * @param {Date} d2\n * @returns {boolean}\n */\n function isSameMonthAndYear(d1, d2) {\n return d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth();\n }\n\n /**\n * Gets whether two dates are the same day (not not necessarily the same time).\n * @param {Date} d1\n * @param {Date} d2\n * @returns {boolean}\n */\n function isSameDay(d1, d2) {\n return d1.getDate() == d2.getDate() && isSameMonthAndYear(d1, d2);\n }\n\n /**\n * Gets whether a date is in the month immediately after some date.\n * @param {Date} startDate The date from which to compare.\n * @param {Date} endDate The date to check.\n * @returns {boolean}\n */\n function isInNextMonth(startDate, endDate) {\n var nextMonth = getDateInNextMonth(startDate);\n return isSameMonthAndYear(nextMonth, endDate);\n }\n\n /**\n * Gets whether a date is in the month immediately before some date.\n * @param {Date} startDate The date from which to compare.\n * @param {Date} endDate The date to check.\n * @returns {boolean}\n */\n function isInPreviousMonth(startDate, endDate) {\n var previousMonth = getDateInPreviousMonth(startDate);\n return isSameMonthAndYear(endDate, previousMonth);\n }\n\n /**\n * Gets the midpoint between two dates.\n * @param {Date} d1\n * @param {Date} d2\n * @returns {Date}\n */\n function getDateMidpoint(d1, d2) {\n return createDateAtMidnight((d1.getTime() + d2.getTime()) / 2);\n }\n\n /**\n * Gets the week of the month that a given date occurs in.\n * @param {Date} date\n * @returns {number} Index of the week of the month (zero-based).\n */\n function getWeekOfMonth(date) {\n var firstDayOfMonth = getFirstDateOfMonth(date);\n return Math.floor((firstDayOfMonth.getDay() + date.getDate() - 1) / 7);\n }\n\n /**\n * Gets a new date incremented by the given number of days. Number of days can be negative.\n * @param {Date} date\n * @param {number} numberOfDays\n * @returns {Date}\n */\n function incrementDays(date, numberOfDays) {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + numberOfDays);\n }\n\n /**\n * Gets a new date incremented by the given number of months. Number of months can be negative.\n * If the date of the given month does not match the target month, the date will be set to the\n * last day of the month.\n * @param {Date} date\n * @param {number} numberOfMonths\n * @returns {Date}\n */\n function incrementMonths(date, numberOfMonths) {\n // If the same date in the target month does not actually exist, the Date object will\n // automatically advance *another* month by the number of missing days.\n // For example, if you try to go from Jan. 30 to Feb. 30, you'll end up on March 2.\n // So, we check if the month overflowed and go to the last day of the target month instead.\n var dateInTargetMonth = new Date(date.getFullYear(), date.getMonth() + numberOfMonths, 1);\n var numberOfDaysInMonth = getNumberOfDaysInMonth(dateInTargetMonth);\n if (numberOfDaysInMonth < date.getDate()) {\n dateInTargetMonth.setDate(numberOfDaysInMonth);\n } else {\n dateInTargetMonth.setDate(date.getDate());\n }\n\n return dateInTargetMonth;\n }\n\n /**\n * Get the integer distance between two months. This *only* considers the month and year\n * portion of the Date instances.\n *\n * @param {Date} start\n * @param {Date} end\n * @returns {number} Number of months between `start` and `end`. If `end` is before `start`\n * chronologically, this number will be negative.\n */\n function getMonthDistance(start, end) {\n return (12 * (end.getFullYear() - start.getFullYear())) + (end.getMonth() - start.getMonth());\n }\n\n /**\n * Gets the last day of the month for the given date.\n * @param {Date} date\n * @returns {Date}\n */\n function getLastDateOfMonth(date) {\n return new Date(date.getFullYear(), date.getMonth(), getNumberOfDaysInMonth(date));\n }\n\n /**\n * Checks whether a date is valid.\n * @param {Date} date\n * @return {boolean} Whether the date is a valid Date.\n */\n function isValidDate(date) {\n return date && date.getTime && !isNaN(date.getTime());\n }\n\n /**\n * Sets a date's time to midnight.\n * @param {Date} date\n */\n function setDateTimeToMidnight(date) {\n if (isValidDate(date)) {\n date.setHours(0, 0, 0, 0);\n }\n }\n\n /**\n * Creates a date with the time set to midnight.\n * Drop-in replacement for two forms of the Date constructor via opt_value.\n * @param {number|Date=} opt_value Leave undefined for a Date representing now. Or use a\n * single value representing the number of seconds since the Unix Epoch or a Date object.\n * @return {Date} New date with time set to midnight.\n */\n function createDateAtMidnight(opt_value) {\n var date;\n if (angular.isDate(opt_value)) {\n date = opt_value;\n } else if (angular.isNumber(opt_value)) {\n date = new Date(opt_value);\n } else {\n date = new Date();\n }\n setDateTimeToMidnight(date);\n return date;\n }\n\n /**\n * Checks if a date is within a min and max range, ignoring the time component.\n * If minDate or maxDate are not dates, they are ignored.\n * @param {Date} date\n * @param {Date} minDate\n * @param {Date} maxDate\n */\n function isDateWithinRange(date, minDate, maxDate) {\n var dateAtMidnight = createDateAtMidnight(date);\n var minDateAtMidnight = isValidDate(minDate) ? createDateAtMidnight(minDate) : null;\n var maxDateAtMidnight = isValidDate(maxDate) ? createDateAtMidnight(maxDate) : null;\n return (!minDateAtMidnight || minDateAtMidnight <= dateAtMidnight) &&\n (!maxDateAtMidnight || maxDateAtMidnight >= dateAtMidnight);\n }\n\n /**\n * Gets a new date incremented by the given number of years. Number of years can be negative.\n * See `incrementMonths` for notes on overflow for specific dates.\n * @param {Date} date\n * @param {number} numberOfYears\n * @returns {Date}\n */\n function incrementYears(date, numberOfYears) {\n return incrementMonths(date, numberOfYears * 12);\n }\n\n /**\n * Get the integer distance between two years. This *only* considers the year portion of the\n * Date instances.\n *\n * @param {Date} start\n * @param {Date} end\n * @returns {number} Number of months between `start` and `end`. If `end` is before `start`\n * chronologically, this number will be negative.\n */\n function getYearDistance(start, end) {\n return end.getFullYear() - start.getFullYear();\n }\n\n /**\n * Clamps a date between a minimum and a maximum date.\n * @param {Date} date Date to be clamped\n * @param {Date=} minDate Minimum date\n * @param {Date=} maxDate Maximum date\n * @return {Date}\n */\n function clampDate(date, minDate, maxDate) {\n var boundDate = date;\n if (minDate && date < minDate) {\n boundDate = new Date(minDate.getTime());\n }\n if (maxDate && date > maxDate) {\n boundDate = new Date(maxDate.getTime());\n }\n return boundDate;\n }\n\n /**\n * Extracts and parses the timestamp from a DOM node.\n * @param {HTMLElement} node Node from which the timestamp will be extracted.\n * @return {number} Time since epoch.\n */\n function getTimestampFromNode(node) {\n if (node && node.hasAttribute('data-timestamp')) {\n return Number(node.getAttribute('data-timestamp'));\n }\n }\n\n /**\n * Checks if a month is within a min and max range, ignoring the date and time components.\n * If minDate or maxDate are not dates, they are ignored.\n * @param {Date} date\n * @param {Date} minDate\n * @param {Date} maxDate\n */\n function isMonthWithinRange(date, minDate, maxDate) {\n var month = date.getMonth();\n var year = date.getFullYear();\n\n return (!minDate || minDate.getFullYear() < year || minDate.getMonth() <= month) &&\n (!maxDate || maxDate.getFullYear() > year || maxDate.getMonth() >= month);\n }\n\n /**\n * @param {Date} value date in local timezone\n * @return {Date} date with local timezone offset removed\n */\n function removeLocalTzAndReparseDate(value) {\n var dateValue, formattedDate;\n // Remove the local timezone offset before calling formatDate.\n dateValue = new Date(value.getTime() + 60000 * value.getTimezoneOffset());\n formattedDate = $mdDateLocale.formatDate(dateValue);\n // parseDate only works with a date formatted by formatDate when using Moment validation.\n return $mdDateLocale.parseDate(formattedDate);\n }\n }]);\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n // TODO(jelbourn): forward more attributes to the internal input (required, autofocus, etc.)\n // TODO(jelbourn): something better for mobile (calendar panel takes up entire screen?)\n // TODO(jelbourn): input behavior (masking? auto-complete?)\n\n DatePickerCtrl.$inject = [\"$scope\", \"$element\", \"$attrs\", \"$window\", \"$mdConstant\", \"$mdTheming\", \"$mdUtil\", \"$mdDateLocale\", \"$$mdDateUtil\", \"$$rAF\", \"$filter\", \"$timeout\"];\n datePickerDirective.$inject = [\"$$mdSvgRegistry\", \"$mdUtil\", \"$mdAria\", \"inputDirective\"];\n angular.module('material.components.datepicker')\n .directive('mdDatepicker', datePickerDirective);\n\n /**\n * @ngdoc directive\n * @name mdDatepicker\n * @module material.components.datepicker\n *\n * @param {Date} ng-model The component's model. Expects either a JavaScript Date object or a\n * value that can be parsed into one (e.g. a ISO 8601 string).\n * @param {Object=} ng-model-options Allows tuning of the way in which `ng-model` is being\n * updated. Also allows for a timezone to be specified.\n * <a href=\"https://docs.angularjs.org/api/ng/directive/ngModelOptions#usage\">\n * Read more at the ngModelOptions docs.</a>\n * @param {expression=} ng-change Expression evaluated when the model value changes.\n * @param {expression=} ng-focus Expression evaluated when the input is focused or the calendar\n * is opened.\n * @param {expression=} ng-blur Expression evaluated when focus is removed from the input or the\n * calendar is closed.\n * @param {boolean=} ng-disabled Whether the datepicker is disabled.\n * @param {boolean=} ng-required Whether a value is required for the datepicker.\n * @param {Date=} md-min-date Expression representing a min date (inclusive).\n * @param {Date=} md-max-date Expression representing a max date (inclusive).\n * @param {(function(Date): boolean)=} md-date-filter Function expecting a date and returning a\n * boolean whether it can be selected in \"day\" mode or not. Returning false will also trigger a\n * `filtered` model validation error.\n * @param {(function(Date): boolean)=} md-month-filter Function expecting a date and returning a\n * boolean whether it can be selected in \"month\" mode or not. Returning false will also trigger a\n * `filtered` model validation error.\n * @param {string=} md-placeholder The date input placeholder value.\n * @param {string=} md-open-on-focus When present, the calendar will be opened when the input\n * is focused.\n * @param {Boolean=} md-is-open Expression that can be used to open the datepicker's calendar\n * on-demand.\n * @param {string=} md-current-view Default open view of the calendar pane. Can be either\n * \"month\" or \"year\".\n * @param {string=} md-mode Restricts the user to only selecting a value from a particular view.\n * This option can be used if the user is only supposed to choose from a certain date type\n * (e.g. only selecting the month).\n * Can be either \"month\" or \"day\". **Note** that this will overwrite the `md-current-view` value.\n * @param {string=} md-hide-icons Determines which datepicker icons should be hidden. Note that\n * this may cause the datepicker to not align properly with other components.\n * **Use at your own risk.** Possible values are:\n * * `\"all\"` - Hides all icons.\n * * `\"calendar\"` - Only hides the calendar icon.\n * * `\"triangle\"` - Only hides the triangle icon.\n * @param {Object=} md-date-locale Allows for the values from the `$mdDateLocaleProvider` to be\n * overwritten on a per-element basis (e.g. `msgOpenCalendar` can be overwritten with\n * `md-date-locale=\"{ msgOpenCalendar: 'Open a special calendar' }\"`).\n * @param {string=} input-aria-describedby A space-separated list of element IDs. This should\n * contain the IDs of any elements that describe this datepicker. Screen readers will read the\n * content of these elements at the end of announcing that the datepicker has been selected\n * and describing its current state. The descriptive elements do not need to be visible on the\n * page.\n * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use\n * case is that this would contain the ID of a `<label>` element should be associated with this\n * datepicker. This is necessary when using `md-datepicker` inside of an `md-input-container`\n * with a `<label>`.<br><br>\n * For `<label id=\"start-date\">Start Date</label>`, you would set this to\n * `input-aria-labelledby=\"start-date\"`.\n *\n * @description\n * `<md-datepicker>` is a component used to select a single date.\n * For information on how to configure internationalization for the date picker,\n * see <a ng-href=\"api/service/$mdDateLocaleProvider\">$mdDateLocaleProvider</a>.\n *\n * This component supports\n * [ngMessages](https://docs.angularjs.org/api/ngMessages/directive/ngMessages).\n * Supported attributes are:\n * * `required`: whether a required date is not set.\n * * `mindate`: whether the selected date is before the minimum allowed date.\n * * `maxdate`: whether the selected date is after the maximum allowed date.\n * * `debounceInterval`: ms to delay input processing (since last debounce reset);\n * default value 500ms\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-datepicker ng-model=\"birthday\"></md-datepicker>\n * </hljs>\n *\n */\n\n function datePickerDirective($$mdSvgRegistry, $mdUtil, $mdAria, inputDirective) {\n return {\n template: function(tElement, tAttrs) {\n // Buttons are not in the tab order because users can open the calendar via keyboard\n // interaction on the text input, and multiple tab stops for one component (picker)\n // may be confusing.\n var hiddenIcons = tAttrs.mdHideIcons;\n var inputAriaDescribedby = tAttrs.inputAriaDescribedby;\n var inputAriaLabelledby = tAttrs.inputAriaLabelledby;\n var ariaLabelValue = tAttrs.ariaLabel || tAttrs.mdPlaceholder;\n var ngModelOptions = tAttrs.ngModelOptions;\n\n var calendarButton = (hiddenIcons === 'all' || hiddenIcons === 'calendar') ? '' :\n '<md-button class=\"md-datepicker-button md-icon-button\" type=\"button\" ' +\n 'tabindex=\"-1\" aria-hidden=\"true\" ' +\n 'ng-click=\"ctrl.openCalendarPane($event)\">' +\n '<md-icon class=\"md-datepicker-calendar-icon\" aria-label=\"md-calendar\" ' +\n 'md-svg-src=\"' + $$mdSvgRegistry.mdCalendar + '\"></md-icon>' +\n '</md-button>';\n\n var triangleButton = '';\n\n if (hiddenIcons !== 'all' && hiddenIcons !== 'triangle') {\n triangleButton = '' +\n '<md-button type=\"button\" md-no-ink ' +\n 'class=\"md-datepicker-triangle-button md-icon-button\" ' +\n 'ng-click=\"ctrl.openCalendarPane($event)\" ' +\n 'aria-label=\"{{::ctrl.locale.msgOpenCalendar}}\">' +\n '<div class=\"md-datepicker-expand-triangle\"></div>' +\n '</md-button>';\n\n tElement.addClass(HAS_TRIANGLE_ICON_CLASS);\n }\n\n return calendarButton +\n '<div class=\"md-datepicker-input-container\" ng-class=\"{\\'md-datepicker-focused\\': ctrl.isFocused}\">' +\n '<input ' +\n (ariaLabelValue ? 'aria-label=\"' + ariaLabelValue + '\" ' : '') +\n (inputAriaDescribedby ? 'aria-describedby=\"' + inputAriaDescribedby + '\" ' : '') +\n (inputAriaLabelledby ? 'aria-labelledby=\"' + inputAriaLabelledby + '\" ' : '') +\n 'class=\"md-datepicker-input\" ' +\n 'aria-haspopup=\"dialog\" ' +\n 'ng-focus=\"ctrl.setFocused(true)\" ' +\n 'ng-blur=\"ctrl.setFocused(false)\"> ' +\n triangleButton +\n '</div>' +\n\n // This pane will be detached from here and re-attached to the document body.\n '<div class=\"md-datepicker-calendar-pane md-whiteframe-z1\" id=\"{{::ctrl.calendarPaneId}}\">' +\n '<div class=\"md-datepicker-input-mask\">' +\n '<div class=\"md-datepicker-input-mask-opaque\"></div>' +\n '</div>' +\n '<div class=\"md-datepicker-calendar\">' +\n '<md-calendar role=\"dialog\" aria-label=\"{{::ctrl.locale.msgCalendar}}\" ' +\n 'md-current-view=\"{{::ctrl.currentView}}\" ' +\n 'md-mode=\"{{::ctrl.mode}}\" ' +\n 'md-min-date=\"ctrl.minDate\" ' +\n 'md-max-date=\"ctrl.maxDate\" ' +\n 'md-date-filter=\"ctrl.dateFilter\" ' +\n 'md-month-filter=\"ctrl.monthFilter\" ' +\n (ngModelOptions ? 'ng-model-options=\"' + ngModelOptions + '\" ' : '') +\n 'ng-model=\"ctrl.date\" ng-if=\"ctrl.isCalendarOpen\">' +\n '</md-calendar>' +\n '</div>' +\n '</div>';\n },\n require: ['ngModel', 'mdDatepicker', '?^mdInputContainer', '?^form'],\n scope: {\n minDate: '=mdMinDate',\n maxDate: '=mdMaxDate',\n placeholder: '@mdPlaceholder',\n currentView: '@mdCurrentView',\n mode: '@mdMode',\n dateFilter: '=mdDateFilter',\n monthFilter: '=mdMonthFilter',\n isOpen: '=?mdIsOpen',\n debounceInterval: '=mdDebounceInterval',\n dateLocale: '=mdDateLocale'\n },\n controller: DatePickerCtrl,\n controllerAs: 'ctrl',\n bindToController: true,\n link: function(scope, element, attr, controllers) {\n var ngModelCtrl = controllers[0];\n var mdDatePickerCtrl = controllers[1];\n var mdInputContainer = controllers[2];\n var parentForm = controllers[3];\n var mdNoAsterisk = $mdUtil.parseAttributeBoolean(attr.mdNoAsterisk);\n\n mdDatePickerCtrl.configureNgModel(ngModelCtrl, mdInputContainer, inputDirective);\n\n if (mdInputContainer) {\n // We need to move the spacer after the datepicker itself,\n // because md-input-container adds it after the\n // md-datepicker-input by default. The spacer gets wrapped in a\n // div, because it floats and gets aligned next to the datepicker.\n // There are easier ways of working around this with CSS (making the\n // datepicker 100% wide, change the `display` etc.), however they\n // break the alignment with any other form controls.\n var spacer = element[0].querySelector('.md-errors-spacer');\n\n if (spacer) {\n element.after(angular.element('<div>').append(spacer));\n }\n\n mdInputContainer.setHasPlaceholder(attr.mdPlaceholder);\n mdInputContainer.input = element;\n mdInputContainer.element\n .addClass(INPUT_CONTAINER_CLASS)\n .toggleClass(HAS_CALENDAR_ICON_CLASS,\n attr.mdHideIcons !== 'calendar' && attr.mdHideIcons !== 'all');\n\n if (!mdInputContainer.label) {\n $mdAria.expect(element, 'aria-label', attr.mdPlaceholder);\n } else if (!mdNoAsterisk) {\n attr.$observe('required', function(value) {\n mdInputContainer.label.toggleClass('md-required', !!value);\n });\n }\n\n scope.$watch(mdInputContainer.isErrorGetter || function() {\n return ngModelCtrl.$invalid && (ngModelCtrl.$touched ||\n (parentForm && parentForm.$submitted));\n }, mdInputContainer.setInvalid);\n } else if (parentForm) {\n // If invalid, highlights the input when the parent form is submitted.\n var parentSubmittedWatcher = scope.$watch(function() {\n return parentForm.$submitted;\n }, function(isSubmitted) {\n if (isSubmitted) {\n mdDatePickerCtrl.updateErrorState();\n parentSubmittedWatcher();\n }\n });\n }\n }\n };\n }\n\n /** Additional offset for the input's `size` attribute, which is updated based on its content. */\n var EXTRA_INPUT_SIZE = 3;\n\n /** Class applied to the container if the date is invalid. */\n var INVALID_CLASS = 'md-datepicker-invalid';\n\n /** Class applied to the datepicker when it's open. */\n var OPEN_CLASS = 'md-datepicker-open';\n\n /** Class applied to the md-input-container, if a datepicker is placed inside it */\n var INPUT_CONTAINER_CLASS = '_md-datepicker-floating-label';\n\n /** Class to be applied when the calendar icon is enabled. */\n var HAS_CALENDAR_ICON_CLASS = '_md-datepicker-has-calendar-icon';\n\n /** Class to be applied when the triangle icon is enabled. */\n var HAS_TRIANGLE_ICON_CLASS = '_md-datepicker-has-triangle-icon';\n\n /** Default time in ms to debounce input event by. */\n var DEFAULT_DEBOUNCE_INTERVAL = 500;\n\n /**\n * Height of the calendar pane used to check if the pane is going outside the boundary of\n * the viewport. See calendar.scss for how $md-calendar-height is computed; an extra 20px is\n * also added to space the pane away from the exact edge of the screen.\n *\n * This is computed statically now, but can be changed to be measured if the circumstances\n * of calendar sizing are changed.\n */\n var CALENDAR_PANE_HEIGHT = 368;\n\n /**\n * Width of the calendar pane used to check if the pane is going outside the boundary of\n * the viewport. See calendar.scss for how $md-calendar-width is computed; an extra 20px is\n * also added to space the pane away from the exact edge of the screen.\n *\n * This is computed statically now, but can be changed to be measured if the circumstances\n * of calendar sizing are changed.\n */\n var CALENDAR_PANE_WIDTH = 360;\n\n /** Used for checking whether the current user agent is on iOS or Android. */\n var IS_MOBILE_REGEX = /ipad|iphone|ipod|android/i;\n\n /**\n * Controller for md-datepicker.\n *\n * @ngInject @constructor\n */\n function DatePickerCtrl($scope, $element, $attrs, $window, $mdConstant, $mdTheming, $mdUtil,\n $mdDateLocale, $$mdDateUtil, $$rAF, $filter, $timeout) {\n\n /** @final */\n this.$window = $window;\n\n /** @final */\n this.dateUtil = $$mdDateUtil;\n\n /** @final */\n this.$mdConstant = $mdConstant;\n\n /** @final */\n this.$mdUtil = $mdUtil;\n\n /** @final */\n this.$$rAF = $$rAF;\n\n /** @final */\n this.$mdDateLocale = $mdDateLocale;\n\n /** @final */\n this.$timeout = $timeout;\n\n /**\n * The root document element. This is used for attaching a top-level click handler to\n * close the calendar panel when a click outside said panel occurs. We use `documentElement`\n * instead of body because, when scrolling is disabled, some browsers consider the body element\n * to be completely off the screen and propagate events directly to the html element.\n * @type {!JQLite}\n */\n this.documentElement = angular.element(document.documentElement);\n\n /** @type {!ngModel.NgModelController} */\n this.ngModelCtrl = null;\n\n /** @type {HTMLInputElement} */\n this.inputElement = $element[0].querySelector('input');\n\n /**\n * @final\n * @type {!JQLite}\n */\n this.ngInputElement = angular.element(this.inputElement);\n\n /** @type {HTMLElement} */\n this.inputContainer = $element[0].querySelector('.md-datepicker-input-container');\n\n /** @type {HTMLElement} Floating calendar pane. */\n this.calendarPane = $element[0].querySelector('.md-datepicker-calendar-pane');\n\n /** @type {HTMLElement} Calendar icon button. */\n this.calendarButton = $element[0].querySelector('.md-datepicker-button');\n\n /**\n * Element covering everything but the input in the top of the floating calendar pane.\n * @type {!JQLite}\n */\n this.inputMask = angular.element($element[0].querySelector('.md-datepicker-input-mask-opaque'));\n\n /**\n * @final\n * @type {!JQLite}\n */\n this.$element = $element;\n\n /**\n * @final\n * @type {!angular.Attributes}\n */\n this.$attrs = $attrs;\n\n /**\n * @final\n * @type {!angular.Scope}\n */\n this.$scope = $scope;\n\n /**\n * This holds the model that will be used by the calendar.\n * @type {Date|null|undefined}\n */\n this.date = null;\n\n /** @type {boolean} */\n this.isFocused = false;\n\n /** @type {boolean} */\n this.isDisabled = undefined;\n this.setDisabled($element[0].disabled || angular.isString($attrs.disabled));\n\n /** @type {boolean} Whether the date-picker's calendar pane is open. */\n this.isCalendarOpen = false;\n\n /** @type {boolean} Whether the calendar should open when the input is focused. */\n this.openOnFocus = $attrs.hasOwnProperty('mdOpenOnFocus');\n\n /** @type {Object} Instance of the mdInputContainer controller */\n this.mdInputContainer = null;\n\n /**\n * Element from which the calendar pane was opened. Keep track of this so that we can return\n * focus to it when the pane is closed.\n * @type {HTMLElement}\n */\n this.calendarPaneOpenedFrom = null;\n\n /** @type {String} Unique id for the calendar pane. */\n this.calendarPaneId = 'md-date-pane-' + $mdUtil.nextUid();\n\n /** Pre-bound click handler is saved so that the event listener can be removed. */\n this.bodyClickHandler = angular.bind(this, this.handleBodyClick);\n\n /**\n * Name of the event that will trigger a close. Necessary to sniff the browser, because\n * the resize event doesn't make sense on mobile and can have a negative impact since it\n * triggers whenever the browser zooms in on a focused input.\n */\n this.windowEventName = IS_MOBILE_REGEX.test(\n navigator.userAgent || navigator.vendor || window.opera\n ) ? 'orientationchange' : 'resize';\n\n /** Pre-bound close handler so that the event listener can be removed. */\n this.windowEventHandler = $mdUtil.debounce(angular.bind(this, this.closeCalendarPane), 100);\n\n /** Pre-bound handler for the window blur event. Allows for it to be removed later. */\n this.windowBlurHandler = angular.bind(this, this.handleWindowBlur);\n\n /** The built-in AngularJS date filter. */\n this.ngDateFilter = $filter('date');\n\n /** @type {Number} Extra margin for the left side of the floating calendar pane. */\n this.leftMargin = 20;\n\n /** @type {Number} Extra margin for the top of the floating calendar. Gets determined on the first open. */\n this.topMargin = null;\n\n // Unless the user specifies so, the datepicker should not be a tab stop.\n // This is necessary because ngAria might add a tabindex to anything with an ng-model\n // (based on whether or not the user has turned that particular feature on/off).\n if ($attrs.tabindex) {\n this.ngInputElement.attr('tabindex', $attrs.tabindex);\n $attrs.$set('tabindex', null);\n } else {\n $attrs.$set('tabindex', '-1');\n }\n\n $attrs.$set('aria-owns', this.calendarPaneId);\n\n $mdTheming($element);\n $mdTheming(angular.element(this.calendarPane));\n\n var self = this;\n\n $scope.$on('$destroy', function() {\n self.detachCalendarPane();\n });\n\n if ($attrs.mdIsOpen) {\n $scope.$watch('ctrl.isOpen', function(shouldBeOpen) {\n if (shouldBeOpen) {\n self.openCalendarPane({\n target: self.inputElement\n });\n } else {\n self.closeCalendarPane();\n }\n });\n }\n\n // For AngularJS 1.4 and older, where there are no lifecycle hooks but bindings are\n // pre-assigned, manually call the $onInit hook.\n if (angular.version.major === 1 && angular.version.minor <= 4) {\n this.$onInit();\n }\n }\n\n /**\n * AngularJS Lifecycle hook for newer AngularJS versions.\n * Bindings are not guaranteed to have been assigned in the controller, but they are in the\n * $onInit hook.\n */\n DatePickerCtrl.prototype.$onInit = function() {\n\n /**\n * Holds locale-specific formatters, parsers, labels etc. Allows\n * the user to override specific ones from the $mdDateLocale provider.\n * @type {!Object}\n */\n this.locale = this.dateLocale ? angular.extend({}, this.$mdDateLocale, this.dateLocale)\n : this.$mdDateLocale;\n\n this.installPropertyInterceptors();\n this.attachChangeListeners();\n this.attachInteractionListeners();\n };\n\n /**\n * Sets up the controller's reference to ngModelController and\n * applies AngularJS's `input[type=\"date\"]` directive.\n * @param {!angular.NgModelController} ngModelCtrl Instance of the ngModel controller.\n * @param {Object} mdInputContainer Instance of the mdInputContainer controller.\n * @param {Object} inputDirective Config for AngularJS's `input` directive.\n */\n DatePickerCtrl.prototype.configureNgModel = function(ngModelCtrl, mdInputContainer, inputDirective) {\n this.ngModelCtrl = ngModelCtrl;\n this.mdInputContainer = mdInputContainer;\n\n // The input needs to be [type=\"date\"] in order to be picked up by AngularJS.\n this.$attrs.$set('type', 'date');\n\n // Invoke the `input` directive link function, adding a stub for the element.\n // This allows us to re-use AngularJS's logic for setting the timezone via ng-model-options.\n // It works by calling the link function directly which then adds the proper `$parsers` and\n // `$formatters` to the ngModel controller.\n inputDirective[0].link.pre(this.$scope, {\n on: angular.noop,\n val: angular.noop,\n 0: {}\n }, this.$attrs, [ngModelCtrl]);\n\n var self = this;\n\n // Responds to external changes to the model value.\n self.ngModelCtrl.$formatters.push(function(value) {\n var parsedValue = angular.isDefined(value) ? value : null;\n\n if (!(value instanceof Date)) {\n parsedValue = Date.parse(value);\n\n // `parsedValue` is the time since epoch if valid or `NaN` if invalid.\n if (!isNaN(parsedValue) && angular.isNumber(parsedValue)) {\n value = new Date(parsedValue);\n }\n\n if (value && !(value instanceof Date)) {\n throw Error(\n 'The ng-model for md-datepicker must be a Date instance or a value ' +\n 'that can be parsed into a date. Currently the model is of type: ' + typeof value\n );\n }\n }\n\n self.onExternalChange(value);\n\n return value;\n });\n\n // Responds to external error state changes (e.g. ng-required based on another input).\n ngModelCtrl.$viewChangeListeners.unshift(angular.bind(this, this.updateErrorState));\n\n // Forwards any events from the input to the root element. This is necessary to get `updateOn`\n // working for events that don't bubble (e.g. 'blur') since AngularJS binds the handlers to\n // the `<md-datepicker>`.\n var updateOn = self.$mdUtil.getModelOption(ngModelCtrl, 'updateOn');\n\n if (updateOn) {\n this.ngInputElement.on(\n updateOn,\n angular.bind(this.$element, this.$element.triggerHandler, updateOn)\n );\n }\n };\n\n /**\n * Attach event listeners for both the text input and the md-calendar.\n * Events are used instead of ng-model so that updates don't infinitely update the other\n * on a change. This should also be more performant than using a $watch.\n */\n DatePickerCtrl.prototype.attachChangeListeners = function() {\n var self = this;\n\n self.$scope.$on('md-calendar-change', function(event, date) {\n self.setModelValue(date);\n self.onExternalChange(date);\n self.closeCalendarPane();\n });\n\n self.ngInputElement.on('input', angular.bind(self, self.resizeInputElement));\n\n var debounceInterval = angular.isDefined(this.debounceInterval) ?\n this.debounceInterval : DEFAULT_DEBOUNCE_INTERVAL;\n self.ngInputElement.on('input', self.$mdUtil.debounce(self.handleInputEvent,\n debounceInterval, self));\n };\n\n /** Attach event listeners for user interaction. */\n DatePickerCtrl.prototype.attachInteractionListeners = function() {\n var self = this;\n var $scope = this.$scope;\n var keyCodes = this.$mdConstant.KEY_CODE;\n\n // Add event listener through angular so that we can triggerHandler in unit tests.\n self.ngInputElement.on('keydown', function(event) {\n if (event.altKey && event.keyCode === keyCodes.DOWN_ARROW) {\n self.openCalendarPane(event);\n $scope.$digest();\n }\n });\n\n if (self.openOnFocus) {\n self.ngInputElement.on('focus', angular.bind(self, self.openCalendarPane));\n self.ngInputElement.on('click', function(event) {\n event.stopPropagation();\n });\n self.ngInputElement.on('pointerdown',function(event) {\n if (event.target && event.target.setPointerCapture) {\n event.target.setPointerCapture(event.pointerId);\n }\n });\n\n angular.element(self.$window).on('blur', self.windowBlurHandler);\n\n $scope.$on('$destroy', function() {\n angular.element(self.$window).off('blur', self.windowBlurHandler);\n });\n }\n\n $scope.$on('md-calendar-close', function() {\n self.closeCalendarPane();\n });\n };\n\n /**\n * Capture properties set to the date-picker and imperatively handle internal changes.\n * This is done to avoid setting up additional $watches.\n */\n DatePickerCtrl.prototype.installPropertyInterceptors = function() {\n var self = this;\n\n if (this.$attrs.ngDisabled) {\n // The expression is to be evaluated against the directive element's scope and not\n // the directive's isolate scope.\n var scope = this.$scope.$parent;\n\n if (scope) {\n scope.$watch(this.$attrs.ngDisabled, function(isDisabled) {\n self.setDisabled(isDisabled);\n });\n }\n }\n\n Object.defineProperty(this, 'placeholder', {\n get: function() { return self.inputElement.placeholder; },\n set: function(value) { self.inputElement.placeholder = value || ''; }\n });\n };\n\n /**\n * Sets whether the date-picker is disabled.\n * @param {boolean} isDisabled\n */\n DatePickerCtrl.prototype.setDisabled = function(isDisabled) {\n this.isDisabled = isDisabled;\n this.inputElement.disabled = isDisabled;\n\n if (this.calendarButton) {\n this.calendarButton.disabled = isDisabled;\n }\n };\n\n /**\n * Sets the custom ngModel.$error flags to be consumed by ngMessages. Flags are:\n * - mindate: whether the selected date is before the minimum date.\n * - maxdate: whether the selected flag is after the maximum date.\n * - filtered: whether the selected date is allowed by the custom filtering function.\n * - valid: whether the entered text input is a valid date\n *\n * The 'required' flag is handled automatically by ngModel.\n *\n * @param {Date=} opt_date Date to check. If not given, defaults to the datepicker's model value.\n */\n DatePickerCtrl.prototype.updateErrorState = function(opt_date) {\n var date;\n if (opt_date) {\n date = new Date(opt_date.valueOf());\n } else {\n if (angular.isString(this.ngModelCtrl.$modelValue)) {\n date = new Date(this.ngModelCtrl.$modelValue);\n } else {\n date = angular.copy(this.ngModelCtrl.$modelValue);\n }\n }\n\n // Clear any existing errors to get rid of anything that's no longer relevant.\n this.clearErrorState();\n\n if (this.dateUtil.isValidDate(date)) {\n // Force all dates to midnight in order to ignore the time portion.\n date = this.dateUtil.createDateAtMidnight(date);\n\n if (this.dateUtil.isValidDate(this.minDate)) {\n var minDate = this.dateUtil.createDateAtMidnight(this.minDate);\n this.ngModelCtrl.$setValidity('mindate', date >= minDate);\n }\n\n if (this.dateUtil.isValidDate(this.maxDate)) {\n var maxDate = this.dateUtil.createDateAtMidnight(this.maxDate);\n this.ngModelCtrl.$setValidity('maxdate', date <= maxDate);\n }\n\n if (angular.isFunction(this.dateFilter)) {\n this.ngModelCtrl.$setValidity('filtered', this.dateFilter(date));\n }\n\n if (angular.isFunction(this.monthFilter)) {\n this.ngModelCtrl.$setValidity('filtered', this.monthFilter(date));\n }\n } else {\n // The date is seen as \"not a valid date\" if there is *something* set\n // (i.e.., not null or undefined), but that something isn't a valid date.\n this.ngModelCtrl.$setValidity('valid', date == null);\n }\n\n var input = this.inputElement.value;\n var parsedDate = this.locale.parseDate(input);\n\n if (!this.isInputValid(input, parsedDate) && this.ngModelCtrl.$valid) {\n this.ngModelCtrl.$setValidity('valid', date == null);\n }\n\n angular.element(this.inputContainer).toggleClass(INVALID_CLASS,\n this.ngModelCtrl.$invalid && (this.ngModelCtrl.$touched || this.ngModelCtrl.$submitted));\n };\n\n /**\n * Check to see if the input is valid, as the validation should fail if the model is invalid.\n *\n * @param {string} inputString\n * @param {Date} parsedDate\n * @return {boolean} Whether the input is valid\n */\n DatePickerCtrl.prototype.isInputValid = function (inputString, parsedDate) {\n return inputString === '' || (\n this.dateUtil.isValidDate(parsedDate) &&\n this.locale.isDateComplete(inputString) &&\n this.isDateEnabled(parsedDate)\n );\n };\n\n /** Clears any error flags set by `updateErrorState`. */\n DatePickerCtrl.prototype.clearErrorState = function() {\n this.inputContainer.classList.remove(INVALID_CLASS);\n ['mindate', 'maxdate', 'filtered', 'valid'].forEach(function(field) {\n this.ngModelCtrl.$setValidity(field, true);\n }, this);\n };\n\n /** Resizes the input element based on the size of its content. */\n DatePickerCtrl.prototype.resizeInputElement = function() {\n this.inputElement.size = this.inputElement.value.length + EXTRA_INPUT_SIZE;\n };\n\n /**\n * Sets the model value if the user input is a valid date.\n * Adds an invalid class to the input element if not.\n */\n DatePickerCtrl.prototype.handleInputEvent = function() {\n var inputString = this.inputElement.value;\n var parsedDate = inputString ? this.locale.parseDate(inputString) : null;\n this.dateUtil.setDateTimeToMidnight(parsedDate);\n\n // An input string is valid if it is either empty (representing no date)\n // or if it parses to a valid date that the user is allowed to select.\n var isValidInput = this.isInputValid(inputString, parsedDate);\n\n // The datepicker's model is only updated when there is a valid input.\n if (isValidInput) {\n this.setModelValue(parsedDate);\n this.date = parsedDate;\n }\n\n this.updateErrorState(parsedDate);\n };\n\n /**\n * Check whether date is in range and enabled\n * @param {Date=} opt_date\n * @return {boolean} Whether the date is enabled.\n */\n DatePickerCtrl.prototype.isDateEnabled = function(opt_date) {\n return this.dateUtil.isDateWithinRange(opt_date, this.minDate, this.maxDate) &&\n (!angular.isFunction(this.dateFilter) || this.dateFilter(opt_date)) &&\n (!angular.isFunction(this.monthFilter) || this.monthFilter(opt_date));\n };\n\n /** Position and attach the floating calendar to the document. */\n DatePickerCtrl.prototype.attachCalendarPane = function() {\n var calendarPane = this.calendarPane;\n var body = document.body;\n\n calendarPane.style.transform = '';\n this.$element.addClass(OPEN_CLASS);\n this.mdInputContainer && this.mdInputContainer.element.addClass(OPEN_CLASS);\n angular.element(body).addClass('md-datepicker-is-showing');\n\n var elementRect = this.inputContainer.getBoundingClientRect();\n var bodyRect = body.getBoundingClientRect();\n\n if (!this.topMargin || this.topMargin < 0) {\n this.topMargin =\n (this.inputMask.parent().prop('clientHeight')\n - this.ngInputElement.prop('clientHeight')) / 2;\n }\n\n // Check to see if the calendar pane would go off the screen. If so, adjust position\n // accordingly to keep it within the viewport.\n var paneTop = elementRect.top - bodyRect.top - this.topMargin;\n var paneLeft = elementRect.left - bodyRect.left - this.leftMargin;\n\n // If ng-material has disabled body scrolling (for example, if a dialog is open),\n // then it's possible that the already-scrolled body has a negative top/left. In this case,\n // we want to treat the \"real\" top as (0 - bodyRect.top). In a normal scrolling situation,\n // though, the top of the viewport should just be the body's scroll position.\n var viewportTop = (bodyRect.top < 0 && document.body.scrollTop === 0) ?\n -bodyRect.top :\n document.body.scrollTop;\n\n var viewportLeft = (bodyRect.left < 0 && document.body.scrollLeft === 0) ?\n -bodyRect.left :\n document.body.scrollLeft;\n\n var viewportBottom = viewportTop + this.$window.innerHeight;\n var viewportRight = viewportLeft + this.$window.innerWidth;\n\n // Creates an overlay with a hole the same size as element. We remove a pixel or two\n // on each end to make it overlap slightly. The overlay's background is added in\n // the theme in the form of a box-shadow with a huge spread.\n this.inputMask.css({\n position: 'absolute',\n left: this.leftMargin + 'px',\n top: this.topMargin + 'px',\n width: (elementRect.width - 1) + 'px',\n height: (elementRect.height - 2) + 'px'\n });\n\n // If the right edge of the pane would be off the screen and shifting it left by the\n // difference would not go past the left edge of the screen. If the calendar pane is too\n // big to fit on the screen at all, move it to the left of the screen and scale the entire\n // element down to fit.\n if (paneLeft + CALENDAR_PANE_WIDTH > viewportRight) {\n if (viewportRight - CALENDAR_PANE_WIDTH > 0) {\n paneLeft = viewportRight - CALENDAR_PANE_WIDTH;\n } else {\n paneLeft = viewportLeft;\n var scale = this.$window.innerWidth / CALENDAR_PANE_WIDTH;\n calendarPane.style.transform = 'scale(' + scale + ')';\n }\n\n calendarPane.classList.add('md-datepicker-pos-adjusted');\n }\n\n // If the bottom edge of the pane would be off the screen and shifting it up by the\n // difference would not go past the top edge of the screen.\n if (paneTop + CALENDAR_PANE_HEIGHT > viewportBottom &&\n viewportBottom - CALENDAR_PANE_HEIGHT > viewportTop) {\n paneTop = viewportBottom - CALENDAR_PANE_HEIGHT;\n calendarPane.classList.add('md-datepicker-pos-adjusted');\n }\n\n calendarPane.style.left = paneLeft + 'px';\n calendarPane.style.top = paneTop + 'px';\n document.body.appendChild(calendarPane);\n\n // Add CSS class after one frame to trigger open animation.\n this.$$rAF(function() {\n calendarPane.classList.add('md-pane-open');\n });\n };\n\n /** Detach the floating calendar pane from the document. */\n DatePickerCtrl.prototype.detachCalendarPane = function() {\n this.$element.removeClass(OPEN_CLASS);\n this.mdInputContainer && this.mdInputContainer.element.removeClass(OPEN_CLASS);\n angular.element(document.body).removeClass('md-datepicker-is-showing');\n this.calendarPane.classList.remove('md-pane-open');\n this.calendarPane.classList.remove('md-datepicker-pos-adjusted');\n\n if (this.isCalendarOpen) {\n this.$mdUtil.enableScrolling();\n }\n\n if (this.calendarPane.parentNode) {\n // Use native DOM removal because we do not want any of the\n // angular state of this element to be disposed.\n this.calendarPane.parentNode.removeChild(this.calendarPane);\n }\n };\n\n /**\n * Open the floating calendar pane.\n * @param {MouseEvent|KeyboardEvent|{target: HTMLInputElement}} event\n */\n DatePickerCtrl.prototype.openCalendarPane = function(event) {\n if (!this.isCalendarOpen && !this.isDisabled && !this.inputFocusedOnWindowBlur) {\n this.isCalendarOpen = this.isOpen = true;\n this.calendarPaneOpenedFrom = event.target;\n\n // Because the calendar pane is attached directly to the body, it is possible that the\n // rest of the component (input, etc) is in a different scrolling container, such as\n // an md-content. This means that, if the container is scrolled, the pane would remain\n // stationary. To remedy this, we disable scrolling while the calendar pane is open, which\n // also matches the native behavior for things like `<select>` on Mac and Windows.\n this.$mdUtil.disableScrollAround(this.calendarPane);\n\n this.attachCalendarPane();\n this.focusCalendar();\n this.evalAttr('ngFocus');\n\n // Attach click listener inside of a timeout because, if this open call was triggered by a\n // click, we don't want it to be immediately propagated up to the body and handled.\n var self = this;\n this.$mdUtil.nextTick(function() {\n // Use 'touchstart` in addition to click in order to work on iOS Safari, where click\n // events aren't propagated under most circumstances.\n // See http://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n self.documentElement.on('click touchstart', self.bodyClickHandler);\n }, false);\n\n window.addEventListener(this.windowEventName, this.windowEventHandler);\n } else if (this.inputFocusedOnWindowBlur) {\n this.resetInputFocused();\n }\n };\n\n /** Close the floating calendar pane. */\n DatePickerCtrl.prototype.closeCalendarPane = function() {\n if (this.isCalendarOpen) {\n var self = this;\n\n self.detachCalendarPane();\n self.ngModelCtrl.$setTouched();\n self.evalAttr('ngBlur');\n\n self.documentElement.off('click touchstart', self.bodyClickHandler);\n window.removeEventListener(self.windowEventName, self.windowEventHandler);\n\n self.calendarPaneOpenedFrom.focus();\n self.calendarPaneOpenedFrom = null;\n\n if (self.openOnFocus) {\n // Ensures that all focus events have fired before resetting\n // the calendar. Prevents the calendar from reopening immediately\n // in IE when md-open-on-focus is set. Also it needs to trigger\n // a digest, in order to prevent issues where the calendar wasn't\n // showing up on the next open.\n self.$timeout(reset);\n } else {\n reset();\n }\n }\n\n function reset() {\n self.isCalendarOpen = self.isOpen = false;\n }\n };\n\n /** Gets the controller instance for the calendar in the floating pane. */\n DatePickerCtrl.prototype.getCalendarCtrl = function() {\n return angular.element(this.calendarPane.querySelector('md-calendar')).controller('mdCalendar');\n };\n\n /** Focus the calendar in the floating pane. */\n DatePickerCtrl.prototype.focusCalendar = function() {\n // Use a timeout in order to allow the calendar to be rendered, as it is gated behind an ng-if.\n var self = this;\n this.$mdUtil.nextTick(function() {\n self.getCalendarCtrl().focusDate(self.date);\n }, false);\n };\n\n /**\n * Sets whether the input is currently focused.\n * @param {boolean} isFocused\n */\n DatePickerCtrl.prototype.setFocused = function(isFocused) {\n if (!isFocused) {\n this.ngModelCtrl.$setTouched();\n }\n\n // The ng* expressions shouldn't be evaluated when mdOpenOnFocus is on,\n // because they also get called when the calendar is opened/closed.\n if (!this.openOnFocus) {\n this.evalAttr(isFocused ? 'ngFocus' : 'ngBlur');\n }\n\n this.isFocused = isFocused;\n };\n\n /**\n * Handles a click on the document body when the floating calendar pane is open.\n * Closes the floating calendar pane if the click is not inside of it.\n * @param {MouseEvent} event\n */\n DatePickerCtrl.prototype.handleBodyClick = function(event) {\n if (this.isCalendarOpen) {\n var isInCalendar = this.$mdUtil.getClosest(event.target, 'md-calendar');\n\n if (!isInCalendar) {\n this.closeCalendarPane();\n }\n\n this.$scope.$digest();\n }\n };\n\n /**\n * Handles the event when the user navigates away from the current tab. Keeps track of\n * whether the input was focused when the event happened, in order to prevent the calendar\n * from re-opening.\n */\n DatePickerCtrl.prototype.handleWindowBlur = function() {\n this.inputFocusedOnWindowBlur = document.activeElement === this.inputElement;\n };\n\n /**\n * Reset the flag inputFocusedOnWindowBlur to default state, to permit user to open calendar\n * again when he back to tab with calendar focused.\n */\n DatePickerCtrl.prototype.resetInputFocused = function() {\n this.inputFocusedOnWindowBlur = false;\n };\n\n /**\n * Evaluates an attribute expression against the parent scope.\n * @param {String} attr Name of the attribute to be evaluated.\n */\n DatePickerCtrl.prototype.evalAttr = function(attr) {\n if (this.$attrs[attr]) {\n this.$scope.$parent.$eval(this.$attrs[attr]);\n }\n };\n\n /**\n * Sets the ng-model value by first converting the date object into a string. Converting it\n * is necessary, in order to pass AngularJS's `input[type=\"date\"]` validations. AngularJS turns\n * the value into a Date object afterwards, before setting it on the model.\n * @param {Date=} value Date to be set as the model value.\n */\n DatePickerCtrl.prototype.setModelValue = function(value) {\n var timezone = this.$mdUtil.getModelOption(this.ngModelCtrl, 'timezone');\n // Using the timezone when the offset is negative (GMT+X) causes the previous day to be\n // set as the model value here. This check avoids that.\n if (timezone == null || value == null || value.getTimezoneOffset() < 0) {\n this.ngModelCtrl.$setViewValue(this.ngDateFilter(value, 'yyyy-MM-dd'), 'default');\n } else {\n this.ngModelCtrl.$setViewValue(this.ngDateFilter(value, 'yyyy-MM-dd', timezone), 'default');\n }\n };\n\n /**\n * Updates the datepicker when a model change occurred externally.\n * @param {Date=} value Value that was set to the model.\n */\n DatePickerCtrl.prototype.onExternalChange = function(value) {\n var self = this;\n var timezone = this.$mdUtil.getModelOption(this.ngModelCtrl, 'timezone');\n\n // Update the model used by the calendar.\n if (this.dateUtil.isValidDate(value) && timezone != null && value.getTimezoneOffset() >= 0) {\n this.date = this.dateUtil.removeLocalTzAndReparseDate(value);\n } else {\n this.date = value;\n }\n // Using the timezone when the offset is negative (GMT+X) causes the previous day to be\n // used here. This check avoids that.\n if (timezone == null || value == null || value.getTimezoneOffset() < 0) {\n this.inputElement.value = this.locale.formatDate(value);\n } else {\n this.inputElement.value = this.locale.formatDate(value, timezone);\n }\n this.mdInputContainer && this.mdInputContainer.setHasValue(!!value);\n this.resizeInputElement();\n // This is often called from the $formatters section of the $validators pipeline.\n // In that case, we need to delay to let $render and $validate run, so that the checks for\n // error state are accurate.\n this.$mdUtil.nextTick(function() {self.updateErrorState();}, false, self.$scope);\n };\n})();\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.dialog\n */\nMdDialogDirective.$inject = [\"$$rAF\", \"$mdTheming\", \"$mdDialog\"];\nMdDialogProvider.$inject = [\"$$interimElementProvider\"];\nangular\n .module('material.components.dialog', [\n 'material.core',\n 'material.components.backdrop'\n ])\n .directive('mdDialog', MdDialogDirective)\n .provider('$mdDialog', MdDialogProvider);\n\n/**\n * @ngdoc directive\n * @name mdDialog\n * @module material.components.dialog\n *\n * @restrict E\n *\n * @description\n * `<md-dialog>` - The dialog's template must be inside this element.\n *\n * Inside, use an `<md-dialog-content>` element for the dialog's content, and use\n * an `<md-dialog-actions>` element for the dialog's actions.\n *\n * ## CSS\n * - `.md-dialog-content` - class that sets the padding on the content as the spec file\n *\n * ## Notes\n * - If you specify an `id` for the `<md-dialog>`, the `<md-dialog-content>` will have the same `id`\n * prefixed with `dialogContent_`.\n *\n * @usage\n * ### Dialog template\n * <hljs lang=\"html\">\n * <md-dialog aria-label=\"List dialog\">\n * <md-dialog-content>\n * <md-list>\n * <md-list-item ng-repeat=\"item in items\">\n * <p>Number {{item}}</p>\n * </md-list-item>\n * </md-list>\n * </md-dialog-content>\n * <md-dialog-actions>\n * <md-button ng-click=\"closeDialog()\" class=\"md-primary\">Close Dialog</md-button>\n * </md-dialog-actions>\n * </md-dialog>\n * </hljs>\n */\nfunction MdDialogDirective($$rAF, $mdTheming, $mdDialog) {\n return {\n restrict: 'E',\n link: function(scope, element) {\n element.addClass('_md'); // private md component indicator for styling\n\n $mdTheming(element);\n $$rAF(function() {\n var images;\n var content = element[0].querySelector('md-dialog-content');\n\n if (content) {\n images = content.getElementsByTagName('img');\n addOverflowClass();\n // delayed image loading may impact scroll height, check after images are loaded\n angular.element(images).on('load', addOverflowClass);\n }\n\n scope.$on('$destroy', function() {\n $mdDialog.destroy(element);\n });\n\n /**\n *\n */\n function addOverflowClass() {\n element.toggleClass('md-content-overflow', content.scrollHeight > content.clientHeight);\n }\n\n\n });\n }\n };\n}\n\n/**\n * @ngdoc service\n * @name $mdDialog\n * @module material.components.dialog\n *\n * @description\n * `$mdDialog` opens a dialog over the app to inform users about critical information or require\n * them to make decisions. There are two approaches for setup: a simple promise API\n * and regular object syntax.\n *\n * ## Restrictions\n *\n * - The dialog is always given an isolate scope.\n * - The dialog's template must have an outer `<md-dialog>` element.\n * Inside, use an `<md-dialog-content>` element for the dialog's content, and use\n * an `<md-dialog-actions>` element for the dialog's actions.\n * - Dialogs must cover the entire application to keep interactions inside of them.\n * Use the `parent` option to change where dialogs are appended.\n *\n * ## Sizing\n * - Complex dialogs can be sized with `flex=\"percentage\"`, i.e. `flex=\"66\"`.\n * - Default max-width is 80% of the `rootElement` or `parent`.\n *\n * ## CSS\n * - `.md-dialog-content` - class that sets the padding on the content as the spec file\n *\n * @usage\n * <hljs lang=\"html\">\n * <div ng-app=\"demoApp\" ng-controller=\"AppController as ctrl\">\n * <div>\n * <md-button ng-click=\"ctrl.showAlert()\" class=\"md-raised md-warn\">\n * Basic Alert!\n * </md-button>\n * </div>\n * <div>\n * <md-button ng-click=\"ctrl.showDialog($event)\" class=\"md-raised\">\n * Custom Dialog\n * </md-button>\n * </div>\n * </div>\n * </hljs>\n *\n * ### JavaScript: object syntax\n * <hljs lang=\"js\">\n * (function(angular, undefined) {\n * \"use strict\";\n *\n * angular\n * .module('demoApp', ['ngMaterial'])\n * .controller('AppCtrl', AppController);\n *\n * function AppController($mdDialog) {\n * var alert;\n * var ctrl = this;\n * ctrl.showAlert = showAlert;\n * ctrl.showDialog = showDialog;\n * ctrl.items = [1, 2, 3];\n *\n * // Internal method\n * function showAlert() {\n * alert = $mdDialog.alert({\n * title: 'Attention',\n * textContent: 'This is an example of how simple dialogs can be!',\n * ok: 'Close'\n * });\n *\n * $mdDialog\n * .show( alert )\n * .finally(function() {\n * alert = undefined;\n * });\n * }\n *\n * function showDialog($event) {\n * var parentEl = angular.element(document.body);\n * $mdDialog.show({\n * parent: parentEl,\n * targetEvent: $event,\n * template:\n * '<md-dialog aria-label=\"List dialog\">' +\n * ' <md-dialog-content>'+\n * ' <md-list>'+\n * ' <md-list-item ng-repeat=\"item in ctrl.items\">'+\n * ' <p>Number {{item}}</p>' +\n * ' </md-item>'+\n * ' </md-list>'+\n * ' </md-dialog-content>' +\n * ' <md-dialog-actions>' +\n * ' <md-button ng-click=\"ctrl.closeDialog()\" class=\"md-primary\">' +\n * ' Close Dialog' +\n * ' </md-button>' +\n * ' </md-dialog-actions>' +\n * '</md-dialog>',\n * locals: {\n * items: ctrl.items\n * },\n * controller: DialogController\n * controllerAs: 'ctrl'\n * });\n * function DialogController($mdDialog) {\n * this.closeDialog = function() {\n * $mdDialog.hide();\n * }\n * }\n * }\n * }\n * })(angular);\n * </hljs>\n *\n * ### Multiple Dialogs\n * Using the `multiple` option for the `$mdDialog` service allows developers to show multiple\n * dialogs at the same time.\n *\n * <hljs lang=\"js\">\n * // From plain options\n * $mdDialog.show({\n * multiple: true\n * });\n *\n * // From a dialog preset\n * $mdDialog.show(\n * $mdDialog\n * .alert()\n * .multiple(true)\n * );\n *\n * </hljs>\n *\n * ### Pre-Rendered Dialogs\n * By using the `contentElement` option, it is possible to use an already existing element in the\n * DOM.\n *\n * > Pre-rendered dialogs will be not linked to any scope and will not instantiate any new\n * > controller.<br/>\n * > You can manually link the elements to a scope or instantiate a controller from the template\n * > (using `ng-controller`).\n *\n * <hljs lang=\"js\">\n * function showPrerenderedDialog() {\n * $mdDialog.show({\n * contentElement: '#myStaticDialog',\n * parent: angular.element(document.body)\n * });\n * }\n * </hljs>\n *\n * When using a string as value, `$mdDialog` will automatically query the DOM for the specified CSS\n * selector.\n *\n * <hljs lang=\"html\">\n * <div style=\"visibility: hidden\">\n * <div class=\"md-dialog-container\" id=\"myStaticDialog\">\n * <md-dialog>\n * This is a pre-rendered dialog.\n * </md-dialog>\n * </div>\n * </div>\n * </hljs>\n *\n * **Notice**: It is important, to use the `.md-dialog-container` as the content element, otherwise\n * the dialog will not show up.\n *\n * It also possible to use a DOM element for the `contentElement` option.\n * - `contentElement: document.querySelector('#myStaticDialog')`\n * - `contentElement: angular.element(TEMPLATE)`\n *\n * When using a `template` as content element, it will be not compiled upon open.\n * This allows you to compile the element yourself and use it each time the dialog opens.\n *\n * ### Custom Presets\n * Developers are also able to create their own preset, which can be used without repeating\n * their options each time.\n *\n * <hljs lang=\"js\">\n * $mdDialogProvider.addPreset('testPreset', {\n * options: function() {\n * return {\n * template:\n * '<md-dialog>' +\n * 'This is a custom preset' +\n * '</md-dialog>',\n * controllerAs: 'dialog',\n * bindToController: true,\n * clickOutsideToClose: true,\n * escapeToClose: true\n * };\n * }\n * });\n * </hljs>\n *\n * After creating your preset in the `config` phase, you can access it.\n *\n * <hljs lang=\"js\">\n * $mdDialog.show(\n * $mdDialog.testPreset()\n * );\n * </hljs>\n *\n * ### JavaScript: promise API syntax, custom dialog template\n *\n * <hljs lang=\"js\">\n * (function(angular, undefined) {\n * \"use strict\";\n *\n * angular\n * .module('demoApp', ['ngMaterial'])\n * .controller('EmployeeController', EmployeeController)\n * .controller('GreetingController', GreetingController);\n *\n * // Fictitious Employee Editor to show how to use simple and complex dialogs.\n *\n * function EmployeeController($mdDialog) {\n * var alert;\n * var ctrl = this;\n *\n * ctrl.showAlert = showAlert;\n * ctrl.showGreeting = showCustomGreeting;\n *\n * ctrl.hasAlert = function() { return !!alert };\n * ctrl.userName = ctrl.userName || 'Bobby';\n *\n * // Dialog #1 - Show simple alert dialog and cache reference to dialog instance\n *\n * function showAlert() {\n * alert = $mdDialog.alert()\n * .title('Attention, ' + ctrl.userName)\n * .textContent('This is an example of how simple dialogs can be!')\n * .ok('Close');\n *\n * $mdDialog\n * .show(alert)\n * .finally(function() {\n * alert = undefined;\n * });\n * }\n *\n * // Dialog #2 - Demonstrate more complex dialogs construction and popup.\n *\n * function showCustomGreeting($event) {\n * $mdDialog.show({\n * targetEvent: $event,\n * template:\n * '<md-dialog>' +\n * ' <md-dialog-content>Hello {{ ctrl.employee }}!</md-dialog-content>' +\n * ' <md-dialog-actions>' +\n * ' <md-button ng-click=\"ctrl.closeDialog()\" class=\"md-primary\">' +\n * ' Close Greeting' +\n * ' </md-button>' +\n * ' </md-dialog-actions>' +\n * '</md-dialog>',\n * controller: GreetingController,\n * controllerAs: 'ctrl',\n * onComplete: afterShowAnimation,\n * locals: { employee: ctrl.userName }\n * });\n *\n * // When the 'enter' animation finishes...\n * function afterShowAnimation(scope, element, options) {\n * // post-show code here: DOM element focus, etc.\n * }\n * }\n * }\n *\n * // Greeting controller used with the 'showCustomGreeting()' custom dialog\n * function GreetingController($mdDialog, $log) {\n * var ctrl = this;\n * this.$log = $log;\n *\n * ctrl.closeDialog = function() {\n * // Hides the most recent dialog shown.\n * // No specific dialog instance reference is needed.\n * $mdDialog.hide();\n * };\n * }\n *\n * GreetingController.prototype.$onInit = function() {\n * // Assigned from the locals options passed to $mdDialog.show.\n * this.$log.log('Employee Name: ', ctrl.employee);\n * };\n *\n * })(angular);\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdDialog#alert\n *\n * @description\n * Builds a preconfigured dialog with the specified message.\n *\n * @returns {Object} a dialog preset with the chainable configuration methods:\n *\n * - `title(string)` - Sets the alert title.\n * - `textContent(string)` - Sets the alert message.\n * - `htmlContent(string)` - Sets the alert message as HTML. Requires the `ngSanitize`\n * module to be loaded. HTML is not run through AngularJS' compiler.\n * - `ok(string)` - Sets the alert \"Okay\" button text.\n * - `theme(string)` - Sets the theme of the alert dialog.\n * - `targetEvent(DOMClickEvent=)` - A click's event object. When passed in as an\n * option, the location of the click will be used as the starting point for the opening\n * animation of the the dialog.\n */\n\n/**\n * @ngdoc method\n * @name $mdDialog#confirm\n *\n * @description\n * Builds a preconfigured dialog with the specified message. You can call show and the promise\n * returned will be resolved if the user clicks the confirm action on the dialog. The promise will\n * be rejected if the user clicks the cancel action or dismisses the dialog.\n *\n * @returns {Object} a dialog preset with the chainable configuration methods:\n *\n * Additionally, it supports the following methods:\n *\n * - `title(string)` - Sets the confirm title.\n * - `textContent(string)` - Sets the confirm message.\n * - `htmlContent(string)` - Sets the confirm message as HTML. Requires the `ngSanitize`\n * module to be loaded. HTML is not run through AngularJS' compiler.\n * - `ok(string)` - Sets the confirm \"Okay\" button text.\n * - `cancel(string)` - Sets the confirm \"Cancel\" button text.\n * - `theme(string)` - Sets the theme of the confirm dialog.\n * - `targetEvent(DOMClickEvent=)` - A click's event object. When passed in as an\n * option, the location of the click will be used as the starting point for the opening\n * animation of the the dialog.\n */\n\n/**\n * @ngdoc method\n * @name $mdDialog#prompt\n *\n * @description\n * Builds a preconfigured dialog with the specified message and input box. You can call show and the\n * promise returned will be resolved, if the user clicks the prompt action on the dialog, passing\n * the input value as the first argument. The promise will be rejected if the user clicks the cancel\n * action or dismisses the dialog.\n *\n * @returns {Object} a dialog preset with the chainable configuration methods:\n *\n * Additionally, it supports the following methods:\n *\n * - `title(string)` - Sets the prompt title.\n * - `textContent(string)` - Sets the prompt message.\n * - `htmlContent(string)` - Sets the prompt message as HTML. Requires the `ngSanitize`\n * module to be loaded. HTML is not run through AngularJS' compiler.\n * - `placeholder(string)` - Sets the placeholder text for the input.\n * - `required(boolean)` - Sets the input required value.\n * - `initialValue(string)` - Sets the initial value for the prompt input.\n * - `ok(string)` - Sets the prompt \"Okay\" button text.\n * - `cancel(string)` - Sets the prompt \"Cancel\" button text.\n * - `theme(string)` - Sets the theme of the prompt dialog.\n * - `targetEvent(DOMClickEvent=)` - A click's event object. When passed in as an\n * option, the location of the click will be used as the starting point for the opening\n * animation of the the dialog.\n */\n\n/**\n * @ngdoc method\n * @name $mdDialog#show\n *\n * @description\n * Show a dialog with the specified options.\n *\n * @param {Object} optionsOrPreset Either provide a dialog preset returned from `alert()`,\n * `prompt()`, or `confirm()`; or an options object with the following properties:\n * - `templateUrl` - `{string=}`: The url of a template that will be used as the content\n * of the dialog.\n * - `template` - `{string=}`: HTML template to show in the dialog. This **must** be trusted HTML\n * with respect to AngularJS' [$sce service](https://docs.angularjs.org/api/ng/service/$sce).\n * This template should **never** be constructed with any kind of user input or user data.\n * - `contentElement` - `{string|Element}`: Instead of using a template, which will be compiled\n * each time a dialog opens, you can also use a DOM element.<br/>\n * * When specifying an element, which is present on the DOM, `$mdDialog` will temporary fetch\n * the element into the dialog and restores it at the old DOM position upon close.\n * * When specifying a string, the string be used as a CSS selector, to lookup for the element\n * in the DOM.\n * - `autoWrap` - `{boolean=}`: Whether or not to automatically wrap the template with a\n * `<md-dialog>` tag if one is not provided. Defaults to true. Can be disabled if you provide a\n * custom dialog directive.\n * - `targetEvent` - `{DOMClickEvent=}`: A click's event object. When passed in as an option,\n * the location of the click will be used as the starting point for the opening animation\n * of the the dialog.\n * - `openFrom` - `{string|Element|Object}`: The query selector, DOM element or the Rect object\n * that is used to determine the bounds (top, left, height, width) from which the Dialog will\n * originate.\n * - `closeTo` - `{string|Element|Object}`: The query selector, DOM element or the Rect object\n * that is used to determine the bounds (top, left, height, width) to which the Dialog will\n * target.\n * - `scope` - `{Object=}`: the scope to link the template / controller to. If none is specified,\n * it will create a new isolate scope.\n * This scope will be destroyed when the dialog is removed unless `preserveScope` is set to\n * true.\n * - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed.\n * Default is false\n * - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the dialog is open.\n * Default true.\n * - `hasBackdrop` - `{boolean=}`: Whether there should be an opaque backdrop behind the dialog.\n * Default true.\n * - `clickOutsideToClose` - `{boolean=}`: Whether the user can click outside the dialog to\n * close it. Default false.\n * - `escapeToClose` - `{boolean=}`: Whether the user can press escape to close the dialog.\n * Default true.\n * - `focusOnOpen` - `{boolean=}`: An option to override focus behavior on open. Only disable if\n * focusing some other way, as focus management is required for dialogs to be accessible.\n * Defaults to true.\n * - `controller` - `{Function|string=}`: The controller to associate with the dialog. The\n * controller will be injected with the local `$mdDialog`, which passes along a scope for the\n * dialog.\n * - `locals` - `{Object=}`: An object containing key/value pairs. The keys will be used as names\n * of values to inject into the controller. For example, `locals: {three: 3}` would inject\n * `three` into the controller, with the value 3. If `bindToController` is true, they will be\n * copied to the controller instead.\n * - `bindToController` - `bool`: bind the locals to the controller, instead of passing them in.\n * - `resolve` - `{Function=}`: Similar to locals, except it takes as values functions that return\n * promises, and the dialog will not open until all of the promises resolve.\n * - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope.\n * - `parent` - `{element=}`: The element to append the dialog to. Defaults to appending\n * to the root element of the application.\n * - `onShowing` - `Function(scope, element, options: Object=, controller: Object)=`: Callback\n * function used to notify the show() animation is starting.\n * - `onComplete` - `Function(scope, element, options: Object=)=`: Callback function used to\n * notify when the show() animation is finished.\n * - `onRemoving` - `Function(element, removePromise)`: Callback function used to announce the\n * close/hide() action is starting. This allows developers to run custom animations\n * in parallel with the close animations.\n * - `fullscreen` `{boolean=}`: An option to toggle whether the dialog should show in fullscreen\n * or not. Defaults to `false`.\n * - `multiple` `{boolean=}`: An option to allow this dialog to display over one that's currently\n * open.\n * @returns {Promise} A promise that can be resolved with `$mdDialog.hide()` or\n * rejected with `$mdDialog.cancel()`.\n */\n\n/**\n * @ngdoc method\n * @name $mdDialog#hide\n *\n * @description\n * Hide an existing dialog and resolve the promise returned from `$mdDialog.show()`.\n *\n * @param {*=} response An argument for the resolved promise.\n *\n * @returns {promise} A promise that is resolved when the dialog has been closed.\n */\n\n/**\n * @ngdoc method\n * @name $mdDialog#cancel\n *\n * @description\n * Hide an existing dialog and reject the promise returned from `$mdDialog.show()`.\n *\n * @param {*=} response An argument for the rejected promise.\n *\n * @returns {promise} A promise that is resolved when the dialog has been closed.\n */\n\nfunction MdDialogProvider($$interimElementProvider) {\n // Elements to capture and redirect focus when the user presses tab at the dialog boundary.\n MdDialogController.$inject = [\"$mdDialog\", \"$mdConstant\"];\n dialogDefaultOptions.$inject = [\"$mdDialog\", \"$mdAria\", \"$mdUtil\", \"$mdConstant\", \"$animate\", \"$document\", \"$window\", \"$rootElement\", \"$log\", \"$injector\", \"$mdTheming\", \"$interpolate\", \"$mdInteraction\"];\n var topFocusTrap, bottomFocusTrap;\n var removeFocusTrap;\n\n return $$interimElementProvider('$mdDialog')\n .setDefaults({\n methods: ['disableParentScroll', 'hasBackdrop', 'clickOutsideToClose', 'escapeToClose',\n 'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen', 'multiple'],\n options: dialogDefaultOptions\n })\n .addPreset('alert', {\n methods: ['title', 'htmlContent', 'textContent', 'ariaLabel', 'ok', 'theme',\n 'css'],\n options: advancedDialogOptions\n })\n .addPreset('confirm', {\n methods: ['title', 'htmlContent', 'textContent', 'ariaLabel', 'ok', 'cancel',\n 'theme', 'css'],\n options: advancedDialogOptions\n })\n .addPreset('prompt', {\n methods: ['title', 'htmlContent', 'textContent', 'initialValue', 'placeholder', 'ariaLabel',\n 'ok', 'cancel', 'theme', 'css', 'required'],\n options: advancedDialogOptions\n });\n\n /* @ngInject */\n function advancedDialogOptions() {\n return {\n template: [\n '<md-dialog md-theme=\"{{ dialog.theme || dialog.defaultTheme }}\" aria-label=\"{{ dialog.ariaLabel }}\" ng-class=\"dialog.css\">',\n ' <md-dialog-content class=\"md-dialog-content\" role=\"document\" tabIndex=\"-1\">',\n ' <h2 class=\"md-title\">{{ dialog.title }}</h2>',\n ' <div ng-if=\"::dialog.mdHtmlContent\" class=\"md-dialog-content-body\" ',\n ' ng-bind-html=\"::dialog.mdHtmlContent\"></div>',\n ' <div ng-if=\"::!dialog.mdHtmlContent\" class=\"md-dialog-content-body\">',\n ' <p>{{::dialog.mdTextContent}}</p>',\n ' </div>',\n ' <md-input-container md-no-float ng-if=\"::dialog.$type == \\'prompt\\'\" class=\"md-prompt-input-container\">',\n ' <input ng-keypress=\"dialog.keypress($event)\" md-autofocus ng-model=\"dialog.result\" ' +\n ' placeholder=\"{{::dialog.placeholder}}\" ng-required=\"dialog.required\">',\n ' </md-input-container>',\n ' </md-dialog-content>',\n ' <md-dialog-actions>',\n ' <md-button ng-if=\"dialog.$type === \\'confirm\\' || dialog.$type === \\'prompt\\'\"' +\n ' ng-click=\"dialog.abort()\" class=\"md-primary md-cancel-button\">',\n ' {{ dialog.cancel }}',\n ' </md-button>',\n ' <md-button ng-click=\"dialog.hide()\" class=\"md-primary md-confirm-button\" md-autofocus=\"dialog.$type===\\'alert\\'\"' +\n ' ng-disabled=\"dialog.required && !dialog.result\">',\n ' {{ dialog.ok }}',\n ' </md-button>',\n ' </md-dialog-actions>',\n '</md-dialog>'\n ].join('').replace(/\\s\\s+/g, ''),\n controller: MdDialogController,\n controllerAs: 'dialog',\n bindToController: true,\n };\n }\n\n /**\n * Controller for the md-dialog interim elements\n * @ngInject\n */\n function MdDialogController($mdDialog, $mdConstant) {\n // For compatibility with AngularJS 1.6+, we should always use the $onInit hook in\n // interimElements. The $mdCompiler simulates the $onInit hook for all versions.\n this.$onInit = function() {\n var isPrompt = this.$type === 'prompt';\n\n if (isPrompt && this.initialValue) {\n this.result = this.initialValue;\n }\n\n this.hide = function() {\n $mdDialog.hide(isPrompt ? this.result : true);\n };\n this.abort = function() {\n $mdDialog.cancel();\n };\n this.keypress = function($event) {\n var invalidPrompt = isPrompt && this.required && !angular.isDefined(this.result);\n\n if ($event.keyCode === $mdConstant.KEY_CODE.ENTER && !invalidPrompt) {\n $mdDialog.hide(this.result);\n }\n };\n };\n }\n\n /* @ngInject */\n function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document,\n $window, $rootElement, $log, $injector, $mdTheming, $interpolate,\n $mdInteraction) {\n return {\n hasBackdrop: true,\n isolateScope: true,\n onCompiling: beforeCompile,\n onShow: onShow,\n onShowing: beforeShow,\n onRemove: onRemove,\n clickOutsideToClose: false,\n escapeToClose: true,\n targetEvent: null,\n closeTo: null,\n openFrom: null,\n focusOnOpen: true,\n disableParentScroll: true,\n autoWrap: true,\n fullscreen: false,\n transformTemplate: function(template, options) {\n // Make the dialog container focusable, because otherwise the focus will be always\n // redirected to an element outside of the container, and the focus trap won't work.\n // Also the tabindex is needed for the `escapeToClose` functionality, because\n // the keyDown event can't be triggered when the focus is outside of the container.\n var startSymbol = $interpolate.startSymbol();\n var endSymbol = $interpolate.endSymbol();\n var theme = startSymbol + (options.themeWatch ? '' : '::') + 'theme' + endSymbol;\n var themeAttr = (options.hasTheme) ? 'md-theme=\"'+theme+'\"': '';\n return '<div class=\"md-dialog-container\" tabindex=\"-1\" ' + themeAttr + '>' + validatedTemplate(template) + '</div>';\n\n /**\n * The specified template should contain a <md-dialog> wrapper element....\n */\n function validatedTemplate(template) {\n if (options.autoWrap && !/<\\/md-dialog>/g.test(template)) {\n return '<md-dialog>' + (template || '') + '</md-dialog>';\n } else {\n return template || '';\n }\n }\n }\n };\n\n function beforeCompile(options) {\n // Automatically apply the theme, if the user didn't specify a theme explicitly.\n // Those option changes need to be done, before the compilation has started, because otherwise\n // the option changes will be not available in the $mdCompilers locales.\n options.defaultTheme = $mdTheming.defaultTheme();\n\n detectTheming(options);\n }\n\n function beforeShow(scope, element, options, controller) {\n\n if (controller) {\n var mdHtmlContent = controller.htmlContent || options.htmlContent || '';\n var mdTextContent = controller.textContent || options.textContent || '';\n\n if (mdHtmlContent && !$injector.has('$sanitize')) {\n throw Error('The ngSanitize module must be loaded in order to use htmlContent.');\n }\n\n if (mdHtmlContent && mdTextContent) {\n throw Error('md-dialog cannot have both `htmlContent` and `textContent`');\n }\n\n // Only assign the content if nothing throws, otherwise it'll still be compiled.\n controller.mdHtmlContent = mdHtmlContent;\n controller.mdTextContent = mdTextContent;\n }\n }\n\n /** Show method for dialogs */\n function onShow(scope, element, options) {\n angular.element($document[0].body).addClass('md-dialog-is-showing');\n\n var dialogElement = element.find('md-dialog');\n\n // Once a dialog has `ng-cloak` applied on his template the dialog animation will not work\n // properly. This is a very common problem, so we have to notify the developer about this.\n if (dialogElement.hasClass('ng-cloak')) {\n var message =\n '$mdDialog: using `<md-dialog ng-cloak>` will affect the dialog opening animations.';\n $log.warn(message, element[0]);\n }\n\n captureParentAndFromToElements(options);\n configureAria(dialogElement, options);\n showBackdrop(scope, element, options);\n activateListeners(element, options);\n\n return dialogPopIn(element, options)\n .then(function() {\n lockScreenReader(element, options);\n focusOnOpen();\n });\n\n /**\n * For alerts, focus on content... otherwise focus on the close button (or equivalent)\n */\n function focusOnOpen() {\n if (options.focusOnOpen) {\n var target = $mdUtil.findFocusTarget(element) || findCloseButton() || dialogElement;\n target.focus();\n }\n\n /**\n * If no element with class dialog-close, try to find the last\n * button child in md-dialog-actions and assume it is a close button.\n *\n * If we find no actions at all, log a warning to the console.\n */\n function findCloseButton() {\n return element[0].querySelector('.dialog-close, md-dialog-actions button:last-child');\n }\n }\n }\n\n /**\n * Remove function for all dialogs\n */\n function onRemove(scope, element, options) {\n options.deactivateListeners();\n options.unlockScreenReader();\n options.hideBackdrop(options.$destroy);\n\n // Remove the focus traps that we added earlier for keeping focus within the dialog.\n if (removeFocusTrap) {\n removeFocusTrap();\n removeFocusTrap = null;\n }\n\n // For navigation $destroy events, do a quick, non-animated removal,\n // but for normal closes (from clicks, etc) animate the removal\n return options.$destroy ? detachAndClean() : animateRemoval().then(detachAndClean);\n\n /**\n * For normal closes, animate the removal.\n * For forced closes (like $destroy events), skip the animations\n */\n function animateRemoval() {\n return dialogPopOut(element, options);\n }\n\n /**\n * Detach the element\n */\n function detachAndClean() {\n angular.element($document[0].body).removeClass('md-dialog-is-showing');\n\n // Reverse the container stretch if using a content element.\n if (options.contentElement) {\n options.reverseContainerStretch();\n }\n\n // Exposed cleanup function from the $mdCompiler.\n options.cleanupElement();\n\n // Restores the focus to the origin element if the last interaction upon opening was a keyboard.\n if (!options.$destroy && options.originInteraction === 'keyboard') {\n options.origin.focus();\n }\n }\n }\n\n function detectTheming(options) {\n // Once the user specifies a targetEvent, we will automatically try to find the correct\n // nested theme.\n var targetEl;\n if (options.targetEvent && options.targetEvent.target) {\n targetEl = angular.element(options.targetEvent.target);\n }\n\n var themeCtrl = targetEl && targetEl.controller('mdTheme');\n\n options.hasTheme = (!!themeCtrl);\n\n if (!options.hasTheme) {\n return;\n }\n\n options.themeWatch = themeCtrl.$shouldWatch;\n\n var theme = options.theme || themeCtrl.$mdTheme;\n\n if (theme) {\n options.scope.theme = theme;\n }\n\n var unwatch = themeCtrl.registerChanges(function (newTheme) {\n options.scope.theme = newTheme;\n\n if (!options.themeWatch) {\n unwatch();\n }\n });\n }\n\n /**\n * Capture originator/trigger/from/to element information (if available)\n * and the parent container for the dialog; defaults to the $rootElement\n * unless overridden in the options.parent\n */\n function captureParentAndFromToElements(options) {\n options.origin = angular.extend({\n element: null,\n bounds: null,\n focus: angular.noop\n }, options.origin || {});\n\n options.parent = getDomElement(options.parent, $rootElement);\n options.closeTo = getBoundingClientRect(getDomElement(options.closeTo));\n options.openFrom = getBoundingClientRect(getDomElement(options.openFrom));\n\n if (options.targetEvent) {\n options.origin = getBoundingClientRect(options.targetEvent.target, options.origin);\n options.originInteraction = $mdInteraction.getLastInteractionType();\n }\n\n\n /**\n * Identify the bounding RECT for the target element\n *\n */\n function getBoundingClientRect (element, orig) {\n var source = angular.element((element || {}));\n if (source && source.length) {\n // Compute and save the target element's bounding rect, so that if the\n // element is hidden when the dialog closes, we can shrink the dialog\n // back to the same position it expanded from.\n //\n // Checking if the source is a rect object or a DOM element\n var bounds = {top:0,left:0,height:0,width:0};\n var hasFn = angular.isFunction(source[0].getBoundingClientRect);\n\n return angular.extend(orig || {}, {\n element : hasFn ? source : undefined,\n bounds : hasFn ? source[0].getBoundingClientRect() : angular.extend({}, bounds, source[0]),\n focus : angular.bind(source, source.focus),\n });\n }\n }\n\n /**\n * If the specifier is a simple string selector, then query for\n * the DOM element.\n */\n function getDomElement(element, defaultElement) {\n if (angular.isString(element)) {\n element = $document[0].querySelector(element);\n }\n\n // If we have a reference to a raw dom element, always wrap it in jqLite\n return angular.element(element || defaultElement);\n }\n\n }\n\n /**\n * Listen for escape keys and outside clicks to auto close\n */\n function activateListeners(element, options) {\n var window = angular.element($window);\n var onWindowResize = $mdUtil.debounce(function() {\n stretchDialogContainerToViewport(element, options);\n }, 60);\n\n var removeListeners = [];\n var smartClose = function() {\n // Only 'confirm' dialogs have a cancel button... escape/clickOutside will\n // cancel or fallback to hide.\n var closeFn = (options.$type === 'alert') ? $mdDialog.hide : $mdDialog.cancel;\n $mdUtil.nextTick(closeFn, true);\n };\n\n if (options.escapeToClose) {\n var parentTarget = options.parent;\n var keyHandlerFn = function(ev) {\n if (ev.keyCode === $mdConstant.KEY_CODE.ESCAPE) {\n ev.stopImmediatePropagation();\n ev.preventDefault();\n\n smartClose();\n }\n };\n\n // Add keydown listeners\n element.on('keydown', keyHandlerFn);\n parentTarget.on('keydown', keyHandlerFn);\n\n // Queue remove listeners function\n removeListeners.push(function() {\n element.off('keydown', keyHandlerFn);\n parentTarget.off('keydown', keyHandlerFn);\n });\n }\n\n // Register listener to update dialog on window resize\n window.on('resize', onWindowResize);\n\n removeListeners.push(function() {\n window.off('resize', onWindowResize);\n });\n\n if (options.clickOutsideToClose) {\n var target = element;\n var sourceElem;\n\n // Keep track of the element on which the mouse originally went down\n // so that we can only close the backdrop when the 'click' started on it.\n // A simple 'click' handler does not work,\n // it sets the target object as the element the mouse went down on.\n var mousedownHandler = function(ev) {\n sourceElem = ev.target;\n };\n\n // We check if our original element and the target is the backdrop\n // because if the original was the backdrop and the target was inside the dialog\n // we don't want to dialog to close.\n var mouseupHandler = function(ev) {\n if (sourceElem === target[0] && ev.target === target[0]) {\n ev.stopPropagation();\n ev.preventDefault();\n\n smartClose();\n }\n };\n\n // Add listeners\n target.on('mousedown', mousedownHandler);\n target.on('mouseup', mouseupHandler);\n\n // Queue remove listeners function\n removeListeners.push(function() {\n target.off('mousedown', mousedownHandler);\n target.off('mouseup', mouseupHandler);\n });\n }\n\n // Attach specific `remove` listener handler\n options.deactivateListeners = function() {\n removeListeners.forEach(function(removeFn) {\n removeFn();\n });\n options.deactivateListeners = null;\n };\n }\n\n /**\n * Show modal backdrop element...\n */\n function showBackdrop(scope, element, options) {\n\n if (options.disableParentScroll) {\n // !! DO this before creating the backdrop; since disableScrollAround()\n // configures the scroll offset; which is used by mdBackDrop postLink()\n options.restoreScroll = $mdUtil.disableScrollAround(element, options.parent);\n }\n\n if (options.hasBackdrop) {\n options.backdrop = $mdUtil.createBackdrop(scope, \"md-dialog-backdrop md-opaque\");\n $animate.enter(options.backdrop, options.parent);\n }\n\n /**\n * Hide modal backdrop element...\n */\n options.hideBackdrop = function hideBackdrop($destroy) {\n if (options.backdrop) {\n if ($destroy) {\n options.backdrop.remove();\n } else {\n $animate.leave(options.backdrop);\n }\n }\n\n if (options.disableParentScroll) {\n options.restoreScroll && options.restoreScroll();\n delete options.restoreScroll;\n }\n\n options.hideBackdrop = null;\n };\n }\n\n /**\n * Inject ARIA-specific attributes appropriate for Dialogs\n */\n function configureAria(element, options) {\n\n var role = (options.$type === 'alert') ? 'alertdialog' : 'dialog';\n var dialogContent = element.find('md-dialog-content');\n var existingDialogId = element.attr('id');\n var dialogContentId = 'dialogContent_' + (existingDialogId || $mdUtil.nextUid());\n\n element.attr({\n 'role': role,\n 'tabIndex': '-1'\n });\n\n if (dialogContent.length === 0) {\n dialogContent = element;\n // If the dialog element already had an ID, don't clobber it.\n if (existingDialogId) {\n dialogContentId = existingDialogId;\n }\n }\n\n dialogContent.attr('id', dialogContentId);\n element.attr('aria-describedby', dialogContentId);\n\n if (options.ariaLabel) {\n $mdAria.expect(element, 'aria-label', options.ariaLabel);\n }\n else {\n $mdAria.expectAsync(element, 'aria-label', function() {\n // If dialog title is specified, set aria-label with it\n // See https://github.com/angular/material/issues/10582\n if (options.title) {\n return options.title;\n } else {\n var words = dialogContent.text().split(/\\s+/);\n if (words.length > 3) words = words.slice(0, 3).concat('...');\n return words.join(' ');\n }\n });\n }\n\n // Set up elements before and after the dialog content to capture focus and\n // redirect back into the dialog.\n topFocusTrap = document.createElement('div');\n topFocusTrap.classList.add('md-dialog-focus-trap');\n topFocusTrap.tabIndex = 0;\n\n bottomFocusTrap = topFocusTrap.cloneNode(false);\n\n /**\n * When focus is about to move out of the end of the dialog, we intercept it and redirect it\n * back to the md-dialog element.\n * When focus is about to move out of the start of the dialog, we intercept it and redirect it\n * back to the last focusable element in the md-dialog.\n * @param {FocusEvent} event\n */\n var focusHandler = function(event) {\n if (event.target && event.target.nextSibling &&\n event.target.nextSibling.nodeName === 'MD-DIALOG') {\n var lastFocusableElement = $mdUtil.getLastTabbableElement(element[0]);\n if (angular.isElement(lastFocusableElement)) {\n lastFocusableElement.focus();\n }\n } else {\n element.focus();\n }\n };\n\n topFocusTrap.addEventListener('focus', focusHandler);\n bottomFocusTrap.addEventListener('focus', focusHandler);\n\n removeFocusTrap = function () {\n topFocusTrap.removeEventListener('focus', focusHandler);\n bottomFocusTrap.removeEventListener('focus', focusHandler);\n\n if (topFocusTrap && topFocusTrap.parentNode) {\n topFocusTrap.parentNode.removeChild(topFocusTrap);\n }\n\n if (bottomFocusTrap && bottomFocusTrap.parentNode) {\n bottomFocusTrap.parentNode.removeChild(bottomFocusTrap);\n }\n };\n\n // The top focus trap inserted immediately before the md-dialog element (as a sibling).\n // The bottom focus trap is inserted immediately after the md-dialog element (as a sibling).\n element[0].parentNode.insertBefore(topFocusTrap, element[0]);\n element.after(bottomFocusTrap);\n }\n\n /**\n * Prevents screen reader interaction behind modal window on swipe interfaces.\n */\n function lockScreenReader(element, options) {\n var isHidden = true;\n\n // get raw DOM node\n walkDOM(element[0]);\n\n options.unlockScreenReader = function () {\n isHidden = false;\n walkDOM(element[0]);\n\n options.unlockScreenReader = null;\n };\n\n /**\n * Get all of an element's parent elements up the DOM tree.\n * @param {Node & ParentNode} element the element to start from\n * @return {Element[]} The parent elements\n */\n function getParents(element) {\n var parents = [];\n while (element.parentNode) {\n if (element === document.body) {\n return parents;\n }\n var children = element.parentNode.children;\n for (var i = 0; i < children.length; i++) {\n // skip over child if it is an ascendant of the dialog\n // a script or style tag, or a live region.\n if (element !== children[i] &&\n !isNodeOneOf(children[i], ['SCRIPT', 'STYLE']) &&\n !children[i].hasAttribute('aria-live')) {\n parents.push(children[i]);\n }\n }\n element = element.parentNode;\n }\n return parents;\n }\n\n /**\n * Walk DOM to apply or remove aria-hidden on sibling nodes and parent sibling nodes.\n * @param {Element} element the element to start from when walking up the DOM\n * @returns {void}\n */\n function walkDOM(element) {\n var elements = getParents(element);\n for (var i = 0; i < elements.length; i++) {\n elements[i].setAttribute('aria-hidden', isHidden);\n }\n }\n }\n\n /**\n * Ensure the dialog container fill-stretches to the viewport.\n * @param {JQLite} container dialog container\n * @param {Object} options\n * @returns {function(): void} function that reverts the modified styles\n */\n function stretchDialogContainerToViewport(container, options) {\n var isFixed = $window.getComputedStyle($document[0].body).position === 'fixed';\n var backdrop = options.backdrop ? $window.getComputedStyle(options.backdrop[0]) : null;\n var height = backdrop ?\n Math.min($document[0].body.clientHeight, Math.ceil(Math.abs(parseInt(backdrop.height, 10))))\n : 0;\n\n var previousStyles = {\n top: container.css('top'),\n height: container.css('height')\n };\n\n // If the body is fixed, determine the distance to the viewport in relative from the parent.\n var parentTop = Math.abs(options.parent[0].getBoundingClientRect().top);\n\n container.css({\n top: (isFixed ? parentTop : 0) + 'px',\n height: height ? height + 'px' : '100%'\n });\n\n return function() {\n // Reverts the modified styles back to the previous values.\n // This is needed for contentElements, which should have the same styles after close\n // as before.\n container.css(previousStyles);\n };\n }\n\n /**\n * Dialog open and pop-in animation.\n * @param {JQLite} container dialog container\n * @param {Object} options\n * @returns {*}\n */\n function dialogPopIn(container, options) {\n // Add the `md-dialog-container` to the DOM\n options.parent.append(container);\n options.reverseContainerStretch = stretchDialogContainerToViewport(container, options);\n\n var dialogEl = container.find('md-dialog');\n var animator = $mdUtil.dom.animator;\n var buildTranslateToOrigin = animator.calculateZoomToOrigin;\n var translateOptions = {transitionInClass: 'md-transition-in', transitionOutClass: 'md-transition-out'};\n var from = animator.toTransformCss(buildTranslateToOrigin(dialogEl, options.openFrom || options.origin));\n var to = animator.toTransformCss(\"\"); // defaults to center display (or parent or $rootElement)\n\n dialogEl.toggleClass('md-dialog-fullscreen', !!options.fullscreen);\n\n return animator\n .translate3d(dialogEl, from, to, translateOptions)\n .then(function(animateReversal) {\n\n // Build a reversal translate function synced to this translation...\n options.reverseAnimate = function() {\n delete options.reverseAnimate;\n\n if (options.closeTo) {\n // Using the opposite classes to create a close animation to the closeTo element\n translateOptions = {transitionInClass: 'md-transition-out', transitionOutClass: 'md-transition-in'};\n from = to;\n to = animator.toTransformCss(buildTranslateToOrigin(dialogEl, options.closeTo));\n\n return animator\n .translate3d(dialogEl, from, to,translateOptions);\n }\n\n return animateReversal(\n to = animator.toTransformCss(\n // in case the origin element has moved or is hidden,\n // let's recalculate the translateCSS\n buildTranslateToOrigin(dialogEl, options.origin)\n )\n );\n };\n\n // Function to revert the generated animation styles on the dialog element.\n // Useful when using a contentElement instead of a template.\n options.clearAnimate = function() {\n delete options.clearAnimate;\n\n // Remove the transition classes, added from $animateCSS, since those can't be removed\n // by reversely running the animator.\n dialogEl.removeClass([\n translateOptions.transitionOutClass,\n translateOptions.transitionInClass\n ].join(' '));\n\n // Run the animation reversely to remove the previous added animation styles.\n return animator.translate3d(dialogEl, to, animator.toTransformCss(''), {});\n };\n\n return true;\n });\n }\n\n /**\n * Dialog close and pop-out animation.\n * @param {JQLite} container dialog container\n * @param {Object} options\n * @returns {*}\n */\n function dialogPopOut(container, options) {\n return options.reverseAnimate().then(function() {\n if (options.contentElement) {\n // When we use a contentElement, we want the element to be the same as before.\n // That means, that we have to clear all the animation properties, like transform.\n options.clearAnimate();\n }\n });\n }\n\n /**\n * Utility function to filter out raw DOM nodes.\n * @param {Node} elem\n * @param {string[]} nodeTypeArray\n * @returns {boolean}\n */\n function isNodeOneOf(elem, nodeTypeArray) {\n return nodeTypeArray.indexOf(elem.nodeName) !== -1;\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.divider\n * @description Divider module!\n */\nMdDividerDirective.$inject = [\"$mdTheming\"];\nangular.module('material.components.divider', [\n 'material.core'\n])\n .directive('mdDivider', MdDividerDirective);\n\n/**\n * @ngdoc directive\n * @name mdDivider\n * @module material.components.divider\n * @restrict E\n *\n * @description\n * Dividers group and separate content within lists and page layouts using strong visual and spatial distinctions. This divider is a thin rule, lightweight enough to not distract the user from content.\n *\n * @param {boolean=} md-inset Add this attribute to activate the inset divider style.\n * @usage\n * <hljs lang=\"html\">\n * <md-divider></md-divider>\n *\n * <md-divider md-inset></md-divider>\n * </hljs>\n *\n */\nfunction MdDividerDirective($mdTheming) {\n return {\n restrict: 'E',\n link: $mdTheming\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc module\n * @name material.components.fabActions\n */\n MdFabActionsDirective.$inject = [\"$mdUtil\"];\n angular\n .module('material.components.fabActions', ['material.core'])\n .directive('mdFabActions', MdFabActionsDirective);\n\n /**\n * @ngdoc directive\n * @name mdFabActions\n * @module material.components.fabActions\n *\n * @restrict E\n *\n * @description\n * The `<md-fab-actions>` directive is used inside of a `<md-fab-speed-dial>` or\n * `<md-fab-toolbar>` directive to mark an element (or elements) as the actions and setup the\n * proper event listeners.\n *\n * @usage\n * See the `<md-fab-speed-dial>` or `<md-fab-toolbar>` directives for example usage.\n */\n function MdFabActionsDirective($mdUtil) {\n return {\n restrict: 'E',\n\n require: ['^?mdFabSpeedDial', '^?mdFabToolbar'],\n\n compile: function(element, attributes) {\n var children = element.children();\n var actionItemButtons;\n var hasNgRepeat = $mdUtil.prefixer().hasAttribute(children, 'ng-repeat');\n\n // Action item buttons should not be in the tab order when the speed dial is closed.\n actionItemButtons = element.find('md-button');\n angular.forEach(actionItemButtons, function(button) {\n button.setAttribute('tabindex', -1);\n });\n\n // Support both ng-repeat and static content\n if (hasNgRepeat) {\n children.addClass('md-fab-action-item');\n } else {\n // Wrap every child in a new div and add a class that we can scale/fling independently\n children.wrap('<div class=\"md-fab-action-item\">');\n }\n }\n };\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n MdFabController.$inject = [\"$scope\", \"$element\", \"$animate\", \"$mdUtil\", \"$mdConstant\", \"$timeout\"];\n angular.module('material.components.fabShared', ['material.core'])\n .controller('MdFabController', MdFabController);\n\n function MdFabController($scope, $element, $animate, $mdUtil, $mdConstant, $timeout) {\n var ctrl = this;\n var initialAnimationAttempts = 0;\n\n // NOTE: We use async eval(s) below to avoid conflicts with any existing digest loops\n\n ctrl.open = function() {\n $scope.$evalAsync(\"ctrl.isOpen = true\");\n };\n\n ctrl.close = function() {\n // Async eval to avoid conflicts with existing digest loops\n $scope.$evalAsync(\"ctrl.isOpen = false\");\n\n // Focus the trigger when the element closes so users can still tab to the next item\n $element.find('md-fab-trigger')[0].focus();\n };\n\n // Toggle the open/close state when the trigger is clicked\n ctrl.toggle = function() {\n $scope.$evalAsync(\"ctrl.isOpen = !ctrl.isOpen\");\n };\n\n /*\n * AngularJS Lifecycle hook for newer AngularJS versions.\n * Bindings are not guaranteed to have been assigned in the controller, but they are in the\n * $onInit hook.\n */\n ctrl.$onInit = function() {\n setupDefaults();\n setupListeners();\n setupWatchers();\n\n fireInitialAnimations();\n };\n\n // For AngularJS 1.4 and older, where there are no lifecycle hooks but bindings are pre-assigned,\n // manually call the $onInit hook.\n if (angular.version.major === 1 && angular.version.minor <= 4) {\n this.$onInit();\n }\n\n function setupDefaults() {\n // Set the default direction to 'down' if none is specified\n ctrl.direction = ctrl.direction || 'down';\n\n // Set the default to be closed\n ctrl.isOpen = ctrl.isOpen || false;\n\n // Start the keyboard interaction at the first action\n resetActionIndex();\n\n // Add an animations waiting class so we know not to run\n $element.addClass('md-animations-waiting');\n }\n\n function setupListeners() {\n var eventTypes = [\n 'click', 'focusin', 'focusout'\n ];\n\n // Add our listeners\n angular.forEach(eventTypes, function(eventType) {\n $element.on(eventType, parseEvents);\n });\n\n // Remove our listeners when destroyed\n $scope.$on('$destroy', function() {\n angular.forEach(eventTypes, function(eventType) {\n $element.off(eventType, parseEvents);\n });\n\n // remove any attached keyboard handlers in case element is removed while\n // speed dial is open\n disableKeyboard();\n });\n }\n\n var closeTimeout;\n\n /**\n * @param {MouseEvent} event\n */\n function parseEvents(event) {\n // If the event is a click, just handle it\n if (event.type == 'click') {\n handleItemClick(event);\n }\n\n // If we focusout, set a timeout to close the element\n if (event.type == 'focusout' && !closeTimeout) {\n closeTimeout = $timeout(function() {\n ctrl.close();\n }, 100, false);\n }\n\n // If we see a focusin and there is a timeout about to run, cancel it so we stay open\n if (event.type == 'focusin' && closeTimeout) {\n $timeout.cancel(closeTimeout);\n closeTimeout = null;\n }\n }\n\n function resetActionIndex() {\n ctrl.currentActionIndex = -1;\n }\n\n function setupWatchers() {\n // Watch for changes to the direction and update classes/attributes\n $scope.$watch('ctrl.direction', function(newDir, oldDir) {\n // Add the appropriate classes so we can target the direction in the CSS\n $animate.removeClass($element, 'md-' + oldDir);\n $animate.addClass($element, 'md-' + newDir);\n\n // Reset the action index since it may have changed\n resetActionIndex();\n });\n\n var trigger, actions;\n\n // Watch for changes to md-open\n $scope.$watch('ctrl.isOpen', function(isOpen) {\n // Reset the action index since it may have changed\n resetActionIndex();\n\n // We can't get the trigger/actions outside of the watch because the component hasn't been\n // linked yet, so we wait until the first watch fires to cache them.\n if (!trigger || !actions) {\n trigger = getTriggerElement();\n actions = getActionsElement();\n }\n\n if (isOpen) {\n enableKeyboard();\n } else {\n disableKeyboard();\n }\n\n var toAdd = isOpen ? 'md-is-open' : '';\n var toRemove = isOpen ? '' : 'md-is-open';\n\n // Set the proper ARIA attributes\n trigger.attr('aria-haspopup', true);\n trigger.attr('aria-expanded', isOpen);\n actions.attr('aria-hidden', !isOpen);\n\n // Animate the CSS classes\n $animate.setClass($element, toAdd, toRemove);\n });\n }\n\n function fireInitialAnimations() {\n // If the element is actually visible on the screen\n if ($element[0].scrollHeight > 0) {\n // Fire our animation\n $animate.addClass($element, '_md-animations-ready').then(function() {\n // Remove the waiting class\n $element.removeClass('md-animations-waiting');\n });\n }\n\n // Otherwise, try for up to 1 second before giving up\n else if (initialAnimationAttempts < 10) {\n $timeout(fireInitialAnimations, 100);\n\n // Increment our counter\n initialAnimationAttempts = initialAnimationAttempts + 1;\n }\n }\n\n function enableKeyboard() {\n $element.on('keydown', keyPressed);\n\n // On the next tick, setup a check for outside clicks; we do this on the next tick to avoid\n // clicks/touches that result in the isOpen attribute changing (e.g. a bound radio button)\n $mdUtil.nextTick(function() {\n angular.element(document).on('click touchend', checkForOutsideClick);\n });\n }\n\n function disableKeyboard() {\n $element.off('keydown', keyPressed);\n angular.element(document).off('click touchend', checkForOutsideClick);\n }\n\n function checkForOutsideClick(event) {\n if (event.target) {\n var closestTrigger = $mdUtil.getClosest(event.target, 'md-fab-trigger');\n var closestActions = $mdUtil.getClosest(event.target, 'md-fab-actions');\n\n if (!closestTrigger && !closestActions) {\n ctrl.close();\n }\n }\n }\n\n /**\n * @param {KeyboardEvent} event\n * @returns {boolean}\n */\n function keyPressed(event) {\n switch (event.which) {\n case $mdConstant.KEY_CODE.ESCAPE: ctrl.close(); event.preventDefault(); return false;\n case $mdConstant.KEY_CODE.LEFT_ARROW: doKeyLeft(event); return false;\n case $mdConstant.KEY_CODE.UP_ARROW: doKeyUp(event); return false;\n case $mdConstant.KEY_CODE.RIGHT_ARROW: doKeyRight(event); return false;\n case $mdConstant.KEY_CODE.DOWN_ARROW: doKeyDown(event); return false;\n case $mdConstant.KEY_CODE.TAB: doShift(event); return false;\n }\n }\n\n function doActionPrev(event) {\n focusAction(event, -1);\n }\n\n function doActionNext(event) {\n focusAction(event, 1);\n }\n\n function focusAction(event, direction) {\n var actions = getActionsElement()[0].querySelectorAll('.md-fab-action-item');\n var previousActionIndex = ctrl.currentActionIndex;\n\n // Increment/decrement the counter with restrictions\n ctrl.currentActionIndex = ctrl.currentActionIndex + direction;\n ctrl.currentActionIndex = Math.min(actions.length - 1, ctrl.currentActionIndex);\n ctrl.currentActionIndex = Math.max(0, ctrl.currentActionIndex);\n\n // Let Tab and Shift+Tab escape if we're trying to move past the start/end.\n if (event.which !== $mdConstant.KEY_CODE.TAB ||\n previousActionIndex !== ctrl.currentActionIndex) {\n // Focus the element\n var focusElement = angular.element(actions[ctrl.currentActionIndex]).children()[0];\n focusElement.focus();\n\n // Make sure the event doesn't bubble and cause something else\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n function doKeyLeft(event) {\n if (ctrl.direction === 'left') {\n doActionNext(event);\n } else {\n doActionPrev(event);\n }\n }\n\n function doKeyUp(event) {\n if (ctrl.direction === 'down') {\n doActionPrev(event);\n } else {\n doActionNext(event);\n }\n }\n\n function doKeyRight(event) {\n if (ctrl.direction === 'left') {\n doActionPrev(event);\n } else {\n doActionNext(event);\n }\n }\n\n function doKeyDown(event) {\n if (ctrl.direction === 'up') {\n doActionPrev(event);\n } else {\n doActionNext(event);\n }\n }\n\n function doShift(event) {\n if (event.shiftKey) {\n doActionPrev(event);\n } else {\n doActionNext(event);\n }\n }\n\n /**\n * @param {Node} element\n * @returns {Node|null}\n */\n function getClosestButton(element) {\n return $mdUtil.getClosest(element, 'button') || $mdUtil.getClosest(element, 'md-button');\n }\n\n /**\n * @param {Node} element\n * @returns {Node|null}\n */\n function getClosestTrigger(element) {\n return $mdUtil.getClosest(element, 'md-fab-trigger');\n }\n\n /**\n * @param {Node} element\n * @returns {Node|null}\n */\n function getClosestAction(element) {\n return $mdUtil.getClosest(element, 'md-fab-actions');\n }\n\n /**\n * @param {MouseEvent|FocusEvent} event\n */\n function handleItemClick(event) {\n var closestButton = event.target ? getClosestButton(event.target) : null;\n\n // Check that the button in the trigger is not disabled\n if (closestButton && !closestButton.disabled) {\n if (getClosestTrigger(event.target)) {\n ctrl.toggle();\n }\n }\n\n if (getClosestAction(event.target)) {\n ctrl.close();\n }\n }\n\n function getTriggerElement() {\n return $element.find('md-fab-trigger');\n }\n\n function getActionsElement() {\n return $element.find('md-fab-actions');\n }\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * The duration of the CSS animation in milliseconds.\n *\n * @type {number}\n */\n MdFabSpeedDialFlingAnimation.$inject = [\"$timeout\"];\n MdFabSpeedDialScaleAnimation.$inject = [\"$timeout\"];\n var cssAnimationDuration = 300;\n\n /**\n * @ngdoc module\n * @name material.components.fabSpeedDial\n */\n angular\n // Declare our module\n .module('material.components.fabSpeedDial', [\n 'material.core',\n 'material.components.fabShared',\n 'material.components.fabActions'\n ])\n\n // Register our directive\n .directive('mdFabSpeedDial', MdFabSpeedDialDirective)\n\n // Register our custom animations\n .animation('.md-fling', MdFabSpeedDialFlingAnimation)\n .animation('.md-scale', MdFabSpeedDialScaleAnimation)\n\n // Register a service for each animation so that we can easily inject them into unit tests\n .service('mdFabSpeedDialFlingAnimation', MdFabSpeedDialFlingAnimation)\n .service('mdFabSpeedDialScaleAnimation', MdFabSpeedDialScaleAnimation);\n\n /**\n * @ngdoc directive\n * @name mdFabSpeedDial\n * @module material.components.fabSpeedDial\n *\n * @restrict E\n *\n * @description\n * The `<md-fab-speed-dial>` directive is used to present a series of popup elements (usually\n * `<md-button>`s) for quick access to common actions.\n *\n * There are currently two animations available by applying one of the following classes to\n * the component:\n *\n * - `md-fling` - The speed dial items appear from underneath the trigger and move into their\n * appropriate positions.\n * - `md-scale` - The speed dial items appear in their proper places by scaling from 0% to 100%.\n *\n * You may also easily position the trigger by applying one one of the following classes to the\n * `<md-fab-speed-dial>` element:\n * - `md-fab-top-left`\n * - `md-fab-top-right`\n * - `md-fab-bottom-left`\n * - `md-fab-bottom-right`\n *\n * These CSS classes use `position: absolute`, so you need to ensure that the container element\n * also uses `position: absolute` or `position: relative` in order for them to work.\n *\n * Additionally, you may use the standard `ng-mouseenter` and `ng-mouseleave` directives to\n * open or close the speed dial. However, if you wish to allow users to hover over the empty\n * space where the actions will appear, you must also add the `md-hover-full` class to the speed\n * dial element. Without this, the hover effect will only occur on top of the trigger.\n *\n * See the demos for more information.\n *\n * ## Troubleshooting\n *\n * If your speed dial shows the closing animation upon launch, you may need to use `ng-cloak` on\n * the parent container to ensure that it is only visible once ready. We have plans to remove this\n * necessity in the future.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-fab-speed-dial md-direction=\"up\" class=\"md-fling\">\n * <md-fab-trigger>\n * <md-button aria-label=\"Add...\"><md-icon md-svg-src=\"/img/icons/plus.svg\"></md-icon></md-button>\n * </md-fab-trigger>\n *\n * <md-fab-actions>\n * <md-button aria-label=\"Add User\">\n * <md-icon md-svg-src=\"/img/icons/user.svg\"></md-icon>\n * </md-button>\n *\n * <md-button aria-label=\"Add Group\">\n * <md-icon md-svg-src=\"/img/icons/group.svg\"></md-icon>\n * </md-button>\n * </md-fab-actions>\n * </md-fab-speed-dial>\n * </hljs>\n *\n * @param {string} md-direction From which direction you would like the speed dial to appear\n * relative to the trigger element.\n * @param {expression=} md-open Programmatically control whether or not the speed-dial is visible.\n */\n function MdFabSpeedDialDirective() {\n return {\n restrict: 'E',\n\n scope: {\n direction: '@?mdDirection',\n isOpen: '=?mdOpen'\n },\n\n bindToController: true,\n controller: 'MdFabController',\n controllerAs: 'ctrl',\n\n link: FabSpeedDialLink\n };\n\n function FabSpeedDialLink(scope, element) {\n // Prepend an element to hold our CSS variables so we can use them in the animations below\n element.prepend('<div class=\"_md-css-variables\"></div>');\n }\n }\n\n function MdFabSpeedDialFlingAnimation($timeout) {\n function delayDone(done) { $timeout(done, cssAnimationDuration, false); }\n\n function runAnimation(element) {\n // Don't run if we are still waiting and we are not ready\n if (element.hasClass('md-animations-waiting') && !element.hasClass('_md-animations-ready')) {\n return;\n }\n\n var el = element[0];\n var ctrl = element.controller('mdFabSpeedDial');\n var items = el.querySelectorAll('.md-fab-action-item');\n\n // Grab our trigger element\n var triggerElement = el.querySelector('md-fab-trigger');\n\n // Grab our element which stores CSS variables\n var variablesElement = el.querySelector('._md-css-variables');\n\n // Setup JS variables based on our CSS variables\n var startZIndex = parseInt(window.getComputedStyle(variablesElement).zIndex);\n\n // Always reset the items to their natural position/state\n angular.forEach(items, function(item, index) {\n var styles = item.style;\n\n styles.transform = styles.webkitTransform = '';\n styles.transitionDelay = '';\n styles.opacity = ctrl.isOpen ? 1 : 0;\n\n // Make the items closest to the trigger have the highest z-index\n styles.zIndex = (items.length - index) + startZIndex;\n });\n\n // Set the trigger to be above all of the actions so they disappear behind it.\n triggerElement.style.zIndex = startZIndex + items.length + 1;\n\n // If the control is closed, hide the items behind the trigger\n if (!ctrl.isOpen) {\n angular.forEach(items, function(item, index) {\n var newPosition, axis;\n var styles = item.style;\n\n // Make sure to account for differences in the dimensions of the trigger verses the items\n // so that we can properly center everything; this helps hide the item's shadows behind\n // the trigger.\n var triggerItemHeightOffset = (triggerElement.clientHeight - item.clientHeight) / 2;\n var triggerItemWidthOffset = (triggerElement.clientWidth - item.clientWidth) / 2;\n\n switch (ctrl.direction) {\n case 'up':\n newPosition = (item.scrollHeight * (index + 1) + triggerItemHeightOffset);\n axis = 'Y';\n break;\n case 'down':\n newPosition = -(item.scrollHeight * (index + 1) + triggerItemHeightOffset);\n axis = 'Y';\n break;\n case 'left':\n newPosition = (item.scrollWidth * (index + 1) + triggerItemWidthOffset);\n axis = 'X';\n break;\n case 'right':\n newPosition = -(item.scrollWidth * (index + 1) + triggerItemWidthOffset);\n axis = 'X';\n break;\n }\n\n var newTranslate = 'translate' + axis + '(' + newPosition + 'px)';\n\n styles.transform = styles.webkitTransform = newTranslate;\n });\n }\n }\n\n return {\n addClass: function(element, className, done) {\n if (element.hasClass('md-fling')) {\n runAnimation(element);\n delayDone(done);\n } else {\n done();\n }\n },\n removeClass: function(element, className, done) {\n runAnimation(element);\n delayDone(done);\n }\n };\n }\n\n function MdFabSpeedDialScaleAnimation($timeout) {\n function delayDone(done) { $timeout(done, cssAnimationDuration, false); }\n\n var delay = 65;\n\n function runAnimation(element) {\n var el = element[0];\n var ctrl = element.controller('mdFabSpeedDial');\n var items = el.querySelectorAll('.md-fab-action-item');\n\n // Grab our element which stores CSS variables\n var variablesElement = el.querySelector('._md-css-variables');\n\n // Setup JS variables based on our CSS variables\n var startZIndex = parseInt(window.getComputedStyle(variablesElement).zIndex);\n\n // Always reset the items to their natural position/state\n angular.forEach(items, function(item, index) {\n var styles = item.style,\n offsetDelay = index * delay;\n\n styles.opacity = ctrl.isOpen ? 1 : 0;\n styles.transform = styles.webkitTransform = ctrl.isOpen ? 'scale(1)' : 'scale(0)';\n styles.transitionDelay = (ctrl.isOpen ? offsetDelay : (items.length - offsetDelay)) + 'ms';\n\n // Make the items closest to the trigger have the highest z-index\n styles.zIndex = (items.length - index) + startZIndex;\n });\n }\n\n return {\n addClass: function(element, className, done) {\n runAnimation(element);\n delayDone(done);\n },\n\n removeClass: function(element, className, done) {\n runAnimation(element);\n delayDone(done);\n }\n };\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n(function() {\n 'use strict';\n\n /**\n * @ngdoc module\n * @name material.components.fabToolbar\n */\n angular\n // Declare our module\n .module('material.components.fabToolbar', [\n 'material.core',\n 'material.components.fabShared',\n 'material.components.fabActions'\n ])\n\n // Register our directive\n .directive('mdFabToolbar', MdFabToolbarDirective)\n\n // Register our custom animations\n .animation('.md-fab-toolbar', MdFabToolbarAnimation)\n\n // Register a service for the animation so that we can easily inject it into unit tests\n .service('mdFabToolbarAnimation', MdFabToolbarAnimation);\n\n /**\n * @ngdoc directive\n * @name mdFabToolbar\n * @module material.components.fabToolbar\n *\n * @restrict E\n *\n * @description\n *\n * The `<md-fab-toolbar>` directive is used to present a toolbar of elements (usually `<md-button>`s)\n * for quick access to common actions when a floating action button is activated (via click or\n * keyboard navigation).\n *\n * You may also easily position the trigger by applying one one of the following classes to the\n * `<md-fab-toolbar>` element:\n * - `md-fab-top-left`\n * - `md-fab-top-right`\n * - `md-fab-bottom-left`\n * - `md-fab-bottom-right`\n *\n * These CSS classes use `position: absolute`, so you need to ensure that the container element\n * also uses `position: absolute` or `position: relative` in order for them to work.\n *\n * @usage\n *\n * <hljs lang=\"html\">\n * <md-fab-toolbar md-direction='left'>\n * <md-fab-trigger>\n * <md-button aria-label=\"Add...\"><md-icon md-svg-src=\"/img/icons/plus.svg\"></md-icon></md-button>\n * </md-fab-trigger>\n *\n * <md-toolbar>\n * <md-fab-actions>\n * <md-button aria-label=\"Add User\">\n * <md-icon md-svg-src=\"/img/icons/user.svg\"></md-icon>\n * </md-button>\n *\n * <md-button aria-label=\"Add Group\">\n * <md-icon md-svg-src=\"/img/icons/group.svg\"></md-icon>\n * </md-button>\n * </md-fab-actions>\n * </md-toolbar>\n * </md-fab-toolbar>\n * </hljs>\n *\n * @param {string} md-direction From which direction you would like the toolbar items to appear\n * relative to the trigger element. Supports `left` and `right` directions.\n * @param {expression=} md-open Programmatically control whether or not the toolbar is visible.\n */\n function MdFabToolbarDirective() {\n return {\n restrict: 'E',\n transclude: true,\n template: '<div class=\"md-fab-toolbar-wrapper\">' +\n ' <div class=\"md-fab-toolbar-content\" ng-transclude></div>' +\n '</div>',\n\n scope: {\n direction: '@?mdDirection',\n isOpen: '=?mdOpen'\n },\n\n bindToController: true,\n controller: 'MdFabController',\n controllerAs: 'ctrl',\n\n link: link\n };\n\n function link(scope, element, attributes) {\n // Add the base class for animations\n element.addClass('md-fab-toolbar');\n\n // Prepend the background element to the trigger's button\n element.find('md-fab-trigger').find('button')\n .prepend('<div class=\"md-fab-toolbar-background\"></div>');\n }\n }\n\n function MdFabToolbarAnimation() {\n\n function runAnimation(element, className, done) {\n // If no className was specified, don't do anything\n if (!className) {\n return;\n }\n\n var el = element[0];\n var ctrl = element.controller('mdFabToolbar');\n\n // Grab the relevant child elements\n var backgroundElement = el.querySelector('.md-fab-toolbar-background');\n var triggerElement = el.querySelector('md-fab-trigger button');\n var toolbarElement = el.querySelector('md-toolbar');\n var iconElement = el.querySelector('md-fab-trigger button md-icon');\n var actions = element.find('md-fab-actions').children();\n\n // If we have both elements, use them to position the new background\n if (triggerElement && backgroundElement) {\n // Get our variables\n var color = window.getComputedStyle(triggerElement).getPropertyValue('background-color');\n var width = el.offsetWidth;\n var height = el.offsetHeight;\n\n // Make it twice as big as it should be since we scale from the center\n var scale = 2 * (width / triggerElement.offsetWidth);\n\n // Set some basic styles no matter what animation we're doing\n backgroundElement.style.backgroundColor = color;\n backgroundElement.style.borderRadius = width + 'px';\n\n // If we're open\n if (ctrl.isOpen) {\n // Turn on toolbar pointer events when closed\n toolbarElement.style.pointerEvents = 'inherit';\n\n backgroundElement.style.width = triggerElement.offsetWidth + 'px';\n backgroundElement.style.height = triggerElement.offsetHeight + 'px';\n backgroundElement.style.transform = 'scale(' + scale + ')';\n\n // Set the next close animation to have the proper delays\n backgroundElement.style.transitionDelay = '0ms';\n iconElement && (iconElement.style.transitionDelay = '.3s');\n\n // Apply a transition delay to actions\n angular.forEach(actions, function(action, index) {\n action.style.transitionDelay = (actions.length - index) * 25 + 'ms';\n });\n } else {\n // Turn off toolbar pointer events when closed\n toolbarElement.style.pointerEvents = 'none';\n\n // Scale it back down to the trigger's size\n backgroundElement.style.transform = 'scale(1)';\n\n // Reset the position\n backgroundElement.style.top = '0';\n\n if (element.hasClass('md-right')) {\n backgroundElement.style.left = '0';\n backgroundElement.style.right = null;\n }\n\n if (element.hasClass('md-left')) {\n backgroundElement.style.right = '0';\n backgroundElement.style.left = null;\n }\n\n // Set the next open animation to have the proper delays\n backgroundElement.style.transitionDelay = '200ms';\n iconElement && (iconElement.style.transitionDelay = '0ms');\n\n // Apply a transition delay to actions\n angular.forEach(actions, function(action, index) {\n action.style.transitionDelay = 200 + (index * 25) + 'ms';\n });\n }\n }\n }\n\n return {\n addClass: function(element, className, done) {\n runAnimation(element, className, done);\n done();\n },\n\n removeClass: function(element, className, done) {\n runAnimation(element, className, done);\n done();\n }\n };\n }\n})();\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.gridList\n */\nGridListController.$inject = [\"$mdUtil\"];\nGridLayoutFactory.$inject = [\"$mdUtil\"];\nGridListDirective.$inject = [\"$interpolate\", \"$mdConstant\", \"$mdGridLayout\", \"$mdMedia\", \"$mdUtil\"];\nGridTileDirective.$inject = [\"$mdMedia\"];\nangular.module('material.components.gridList', ['material.core'])\n .directive('mdGridList', GridListDirective)\n .directive('mdGridTile', GridTileDirective)\n .directive('mdGridTileFooter', GridTileCaptionDirective)\n .directive('mdGridTileHeader', GridTileCaptionDirective)\n .factory('$mdGridLayout', GridLayoutFactory);\n\n/**\n * @ngdoc directive\n * @name mdGridList\n * @module material.components.gridList\n * @restrict E\n * @description\n * Grid lists are an alternative to standard list views. Grid lists are distinct\n * from grids used for layouts and other visual presentations.\n *\n * A grid list is best suited to presenting a homogenous data type, typically\n * images, and is optimized for visual comprehension and differentiating between\n * like data types.\n *\n * A grid list is a continuous element consisting of tessellated, regular\n * subdivisions called cells that contain tiles (`md-grid-tile`).\n *\n * <img src=\"//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7OVlEaXZ5YmU1Xzg/components_grids_usage2.png\"\n * style=\"width: 300px; height: auto; margin-right: 16px;\" alt=\"Concept of grid explained visually\">\n * <img src=\"//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7VGhsOE5idWlJWXM/components_grids_usage3.png\"\n * style=\"width: 300px; height: auto;\" alt=\"Grid concepts legend\">\n *\n * Cells are arrayed vertically and horizontally within the grid.\n *\n * Tiles hold content and can span one or more cells vertically or horizontally.\n *\n * ### Responsive Attributes\n *\n * The `md-grid-list` directive supports \"responsive\" attributes, which allow\n * different `md-cols`, `md-gutter` and `md-row-height` values depending on the\n * currently matching media query.\n *\n * In order to set a responsive attribute, first define the fallback value with\n * the standard attribute name, then add additional attributes with the\n * following convention: `{base-attribute-name}-{media-query-name}=\"{value}\"`\n * (ie. `md-cols-lg=\"8\"`)\n *\n * @param {number} md-cols Number of columns in the grid.\n * @param {string} md-row-height One of\n * <ul>\n * <li>CSS length - Fixed height rows (eg. `8px` or `1rem`)</li>\n * <li>`{width}:{height}` - Ratio of width to height (eg.\n * `md-row-height=\"16:9\"`)</li>\n * <li>`\"fit\"` - Height will be determined by subdividing the available\n * height by the number of rows</li>\n * </ul>\n * @param {string=} md-gutter The amount of space between tiles in CSS units\n * (default 1px)\n * @param {expression=} md-on-layout Expression to evaluate after layout. Event\n * object is available as `$event`, and contains performance information.\n *\n * @usage\n * Basic:\n * <hljs lang=\"html\">\n * <md-grid-list md-cols=\"5\" md-gutter=\"1em\" md-row-height=\"4:3\">\n * <md-grid-tile></md-grid-tile>\n * </md-grid-list>\n * </hljs>\n *\n * Fixed-height rows:\n * <hljs lang=\"html\">\n * <md-grid-list md-cols=\"4\" md-row-height=\"200px\" ...>\n * <md-grid-tile></md-grid-tile>\n * </md-grid-list>\n * </hljs>\n *\n * Fit rows:\n * <hljs lang=\"html\">\n * <md-grid-list md-cols=\"4\" md-row-height=\"fit\" style=\"height: 400px;\" ...>\n * <md-grid-tile></md-grid-tile>\n * </md-grid-list>\n * </hljs>\n *\n * Using responsive attributes:\n * <hljs lang=\"html\">\n * <md-grid-list\n * md-cols-sm=\"2\"\n * md-cols-md=\"4\"\n * md-cols-lg=\"8\"\n * md-cols-gt-lg=\"12\"\n * ...>\n * <md-grid-tile></md-grid-tile>\n * </md-grid-list>\n * </hljs>\n */\nfunction GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia, $mdUtil) {\n return {\n restrict: 'E',\n controller: GridListController,\n scope: {\n mdOnLayout: '&'\n },\n link: postLink\n };\n\n function postLink(scope, element, attrs, ctrl) {\n element.addClass('_md'); // private md component indicator for styling\n\n // Apply semantics\n element.attr('role', 'list');\n\n // Provide the controller with a way to trigger layouts.\n ctrl.layoutDelegate = layoutDelegate;\n\n var invalidateLayout = angular.bind(ctrl, ctrl.invalidateLayout),\n unwatchAttrs = watchMedia();\n scope.$on('$destroy', unwatchMedia);\n\n /**\n * Watches for changes in media, invalidating layout as necessary.\n */\n function watchMedia() {\n for (var mediaName in $mdConstant.MEDIA) {\n $mdMedia(mediaName); // initialize\n $mdMedia.getQuery($mdConstant.MEDIA[mediaName])\n .addListener(invalidateLayout);\n }\n return $mdMedia.watchResponsiveAttributes(\n ['md-cols', 'md-row-height', 'md-gutter'], attrs, layoutIfMediaMatch);\n }\n\n function unwatchMedia() {\n ctrl.layoutDelegate = angular.noop;\n\n unwatchAttrs();\n for (var mediaName in $mdConstant.MEDIA) {\n $mdMedia.getQuery($mdConstant.MEDIA[mediaName])\n .removeListener(invalidateLayout);\n }\n }\n\n /**\n * Performs grid layout if the provided mediaName matches the currently\n * active media type.\n */\n function layoutIfMediaMatch(mediaName) {\n if (mediaName == null) {\n // TODO(shyndman): It would be nice to only layout if we have\n // instances of attributes using this media type\n ctrl.invalidateLayout();\n } else if ($mdMedia(mediaName)) {\n ctrl.invalidateLayout();\n }\n }\n\n var lastLayoutProps;\n\n /**\n * Invokes the layout engine, and uses its results to lay out our\n * tile elements.\n *\n * @param {boolean} tilesInvalidated Whether tiles have been\n * added/removed/moved since the last layout. This is to avoid situations\n * where tiles are replaced with properties identical to their removed\n * counterparts.\n */\n function layoutDelegate(tilesInvalidated) {\n var tiles = getTileElements();\n var props = {\n tileSpans: getTileSpans(tiles),\n colCount: getColumnCount(),\n rowMode: getRowMode(),\n rowHeight: getRowHeight(),\n gutter: getGutter()\n };\n\n if (!tilesInvalidated && angular.equals(props, lastLayoutProps)) {\n return;\n }\n\n var performance =\n $mdGridLayout(props.colCount, props.tileSpans, tiles)\n .map(function(tilePositions, rowCount) {\n return {\n grid: {\n element: element,\n style: getGridStyle(props.colCount, rowCount,\n props.gutter, props.rowMode, props.rowHeight)\n },\n tiles: tilePositions.map(function(ps, i) {\n return {\n element: angular.element(tiles[i]),\n style: getTileStyle(ps.position, ps.spans,\n props.colCount, rowCount,\n props.gutter, props.rowMode, props.rowHeight)\n };\n })\n };\n })\n .reflow()\n .performance();\n\n // Report layout\n scope.mdOnLayout({\n $event: {\n performance: performance\n }\n });\n\n lastLayoutProps = props;\n }\n\n // Use $interpolate to do some simple string interpolation as a convenience.\n\n var startSymbol = $interpolate.startSymbol();\n var endSymbol = $interpolate.endSymbol();\n\n // Returns an expression wrapped in the interpolator's start and end symbols.\n function expr(exprStr) {\n return startSymbol + exprStr + endSymbol;\n }\n\n // The amount of space a single 1x1 tile would take up (either width or height), used as\n // a basis for other calculations. This consists of taking the base size percent (as would be\n // if evenly dividing the size between cells), and then subtracting the size of one gutter.\n // However, since there are no gutters on the edges, each tile only uses a fration\n // (gutterShare = numGutters / numCells) of the gutter size. (Imagine having one gutter per\n // tile, and then breaking up the extra gutter on the edge evenly among the cells).\n var UNIT = $interpolate(expr('share') + '% - (' + expr('gutter') + ' * ' + expr('gutterShare') + ')');\n\n // The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n var POSITION = $interpolate('calc((' + expr('unit') + ' + ' + expr('gutter') + ') * ' + expr('offset') + ')');\n\n // The actual size of a tile, e.g., width or height, taking rowSpan or colSpan into account.\n // This is computed by multiplying the base unit by the rowSpan/colSpan, and then adding back\n // in the space that the gutter would normally have used (which was already accounted for in\n // the base unit calculation).\n var DIMENSION = $interpolate('calc((' + expr('unit') + ') * ' + expr('span') + ' + (' + expr('span') + ' - 1) * ' + expr('gutter') + ')');\n\n /**\n * Gets the styles applied to a tile element described by the given parameters.\n * @param {{row: number, col: number}} position The row and column indices of the tile.\n * @param {{row: number, col: number}} spans The rowSpan and colSpan of the tile.\n * @param {number} colCount The number of columns.\n * @param {number} rowCount The number of rows.\n * @param {string} gutter The amount of space between tiles. This will be something like\n * '5px' or '2em'.\n * @param {string} rowMode The row height mode. Can be one of:\n * 'fixed': all rows have a fixed size, given by rowHeight,\n * 'ratio': row height defined as a ratio to width, or\n * 'fit': fit to the grid-list element height, divinding evenly among rows.\n * @param {string|number} rowHeight The height of a row. This is only used for 'fixed' mode and\n * for 'ratio' mode. For 'ratio' mode, this is the *ratio* of width-to-height (e.g., 0.75).\n * @returns {Object} Map of CSS properties to be applied to the style element. Will define\n * values for top, left, width, height, marginTop, and paddingTop.\n */\n function getTileStyle(position, spans, colCount, rowCount, gutter, rowMode, rowHeight) {\n // TODO(shyndman): There are style caching opportunities here.\n\n // Percent of the available horizontal space that one column takes up.\n var hShare = (1 / colCount) * 100;\n\n // Fraction of the gutter size that each column takes up.\n var hGutterShare = (colCount - 1) / colCount;\n\n // Base horizontal size of a column.\n var hUnit = UNIT({share: hShare, gutterShare: hGutterShare, gutter: gutter});\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n var style = (!$mdUtil.isRtl(attrs)) ? {\n left: POSITION({ unit: hUnit, offset: position.col, gutter: gutter }),\n width: DIMENSION({ unit: hUnit, span: spans.col, gutter: gutter }),\n // resets\n paddingTop: '',\n marginTop: '',\n top: '',\n height: ''\n } : {\n right: POSITION({ unit: hUnit, offset: position.col, gutter: gutter }),\n width: DIMENSION({ unit: hUnit, span: spans.col, gutter: gutter }),\n // resets\n paddingTop: '',\n marginTop: '',\n top: '',\n height: ''\n };\n\n switch (rowMode) {\n case 'fixed':\n // In fixed mode, simply use the given rowHeight.\n style.top = POSITION({ unit: rowHeight, offset: position.row, gutter: gutter });\n style.height = DIMENSION({ unit: rowHeight, span: spans.row, gutter: gutter });\n break;\n\n case 'ratio':\n // Percent of the available vertical space that one row takes up. Here, rowHeight holds\n // the ratio value. For example, if the width:height ratio is 4:3, rowHeight = 1.333.\n var vShare = hShare / rowHeight;\n\n // Base veritcal size of a row.\n var vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter });\n\n // padidngTop and marginTop are used to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied to the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n style.paddingTop = DIMENSION({ unit: vUnit, span: spans.row, gutter: gutter});\n style.marginTop = POSITION({ unit: vUnit, offset: position.row, gutter: gutter });\n break;\n\n case 'fit':\n // Fraction of the gutter size that each column takes up.\n var vGutterShare = (rowCount - 1) / rowCount;\n\n // Percent of the available vertical space that one row takes up.\n vShare = (1 / rowCount) * 100;\n\n // Base vertical size of a row.\n vUnit = UNIT({share: vShare, gutterShare: vGutterShare, gutter: gutter});\n\n style.top = POSITION({unit: vUnit, offset: position.row, gutter: gutter});\n style.height = DIMENSION({unit: vUnit, span: spans.row, gutter: gutter});\n break;\n }\n\n return style;\n }\n\n function getGridStyle(colCount, rowCount, gutter, rowMode, rowHeight) {\n var style = {};\n\n switch (rowMode) {\n case 'fixed':\n style.height = DIMENSION({ unit: rowHeight, span: rowCount, gutter: gutter });\n style.paddingBottom = '';\n break;\n\n case 'ratio':\n // rowHeight is width / height\n var hGutterShare = colCount === 1 ? 0 : (colCount - 1) / colCount,\n hShare = (1 / colCount) * 100,\n vShare = hShare * (1 / rowHeight),\n vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter });\n\n style.height = '';\n style.paddingBottom = DIMENSION({ unit: vUnit, span: rowCount, gutter: gutter});\n break;\n\n case 'fit':\n // noop, as the height is user set\n break;\n }\n\n return style;\n }\n\n function getTileElements() {\n return [].filter.call(element.children(), function(ele) {\n return ele.tagName == 'MD-GRID-TILE' && !ele.$$mdDestroyed;\n });\n }\n\n /**\n * Gets an array of objects containing the rowspan and colspan for each tile.\n * @returns {Array<{row: number, col: number}>}\n */\n function getTileSpans(tileElements) {\n return [].map.call(tileElements, function(ele) {\n var ctrl = angular.element(ele).controller('mdGridTile');\n return {\n row: parseInt(\n $mdMedia.getResponsiveAttribute(ctrl.$attrs, 'md-rowspan'), 10) || 1,\n col: parseInt(\n $mdMedia.getResponsiveAttribute(ctrl.$attrs, 'md-colspan'), 10) || 1\n };\n });\n }\n\n function getColumnCount() {\n var colCount = parseInt($mdMedia.getResponsiveAttribute(attrs, 'md-cols'), 10);\n if (isNaN(colCount)) {\n throw 'md-grid-list: md-cols attribute was not found, or contained a non-numeric value';\n }\n return colCount;\n }\n\n function getGutter() {\n return applyDefaultUnit($mdMedia.getResponsiveAttribute(attrs, 'md-gutter') || 1);\n }\n\n function getRowHeight() {\n var rowHeight = $mdMedia.getResponsiveAttribute(attrs, 'md-row-height');\n if (!rowHeight) {\n throw 'md-grid-list: md-row-height attribute was not found';\n }\n\n switch (getRowMode()) {\n case 'fixed':\n return applyDefaultUnit(rowHeight);\n case 'ratio':\n var whRatio = rowHeight.split(':');\n return parseFloat(whRatio[0]) / parseFloat(whRatio[1]);\n case 'fit':\n return 0; // N/A\n }\n }\n\n function getRowMode() {\n var rowHeight = $mdMedia.getResponsiveAttribute(attrs, 'md-row-height');\n if (!rowHeight) {\n throw 'md-grid-list: md-row-height attribute was not found';\n }\n\n if (rowHeight == 'fit') {\n return 'fit';\n } else if (rowHeight.indexOf(':') !== -1) {\n return 'ratio';\n } else {\n return 'fixed';\n }\n }\n\n function applyDefaultUnit(val) {\n return /\\D$/.test(val) ? val : val + 'px';\n }\n }\n}\n\n/* @ngInject */\nfunction GridListController($mdUtil) {\n this.layoutInvalidated = false;\n this.tilesInvalidated = false;\n this.$timeout_ = $mdUtil.nextTick;\n this.layoutDelegate = angular.noop;\n}\n\nGridListController.prototype = {\n invalidateTiles: function() {\n this.tilesInvalidated = true;\n this.invalidateLayout();\n },\n\n invalidateLayout: function() {\n if (this.layoutInvalidated) {\n return;\n }\n this.layoutInvalidated = true;\n this.$timeout_(angular.bind(this, this.layout));\n },\n\n layout: function() {\n try {\n this.layoutDelegate(this.tilesInvalidated);\n } finally {\n this.layoutInvalidated = false;\n this.tilesInvalidated = false;\n }\n }\n};\n\n\n/* @ngInject */\nfunction GridLayoutFactory($mdUtil) {\n var defaultAnimator = GridTileAnimator;\n\n /**\n * Set the reflow animator callback\n */\n GridLayout.animateWith = function(customAnimator) {\n defaultAnimator = !angular.isFunction(customAnimator) ? GridTileAnimator : customAnimator;\n };\n\n return GridLayout;\n\n /**\n * Publish layout function\n */\n function GridLayout(colCount, tileSpans) {\n var self, layoutInfo, gridStyles, layoutTime, mapTime, reflowTime;\n\n layoutTime = $mdUtil.time(function() {\n layoutInfo = calculateGridFor(colCount, tileSpans);\n });\n\n return self = {\n\n /**\n * An array of objects describing each tile's position in the grid.\n */\n layoutInfo: function() {\n return layoutInfo;\n },\n\n /**\n * Maps grid positioning to an element and a set of styles using the\n * provided updateFn.\n */\n map: function(updateFn) {\n mapTime = $mdUtil.time(function() {\n var info = self.layoutInfo();\n gridStyles = updateFn(info.positioning, info.rowCount);\n });\n return self;\n },\n\n /**\n * Default animator simply sets the element.css( <styles> ). An alternate\n * animator can be provided as an argument. The function has the following\n * signature:\n *\n * function({grid: {element: JQLite, style: Object}, tiles: Array<{element: JQLite, style: Object}>)\n */\n reflow: function(animatorFn) {\n reflowTime = $mdUtil.time(function() {\n var animator = animatorFn || defaultAnimator;\n animator(gridStyles.grid, gridStyles.tiles);\n });\n return self;\n },\n\n /**\n * Timing for the most recent layout run.\n */\n performance: function() {\n return {\n tileCount: tileSpans.length,\n layoutTime: layoutTime,\n mapTime: mapTime,\n reflowTime: reflowTime,\n totalTime: layoutTime + mapTime + reflowTime\n };\n }\n };\n }\n\n /**\n * Default Gridlist animator simple sets the css for each element;\n * NOTE: any transitions effects must be manually set in the CSS.\n * e.g.\n *\n * md-grid-tile {\n * transition: all 700ms ease-out 50ms;\n * }\n *\n */\n function GridTileAnimator(grid, tiles) {\n grid.element.css(grid.style);\n tiles.forEach(function(t) {\n t.element.css(t.style);\n });\n }\n\n /**\n * Calculates the positions of tiles.\n *\n * The algorithm works as follows:\n * An Array<Number> with length colCount (spaceTracker) keeps track of\n * available tiling positions, where elements of value 0 represents an\n * empty position. Space for a tile is reserved by finding a sequence of\n * 0s with length <= than the tile's colspan. When such a space has been\n * found, the occupied tile positions are incremented by the tile's\n * rowspan value, as these positions have become unavailable for that\n * many rows.\n *\n * If the end of a row has been reached without finding space for the\n * tile, spaceTracker's elements are each decremented by 1 to a minimum\n * of 0. Rows are searched in this fashion until space is found.\n */\n function calculateGridFor(colCount, tileSpans) {\n var curCol = 0,\n curRow = 0,\n spaceTracker = newSpaceTracker();\n\n return {\n positioning: tileSpans.map(function(spans, i) {\n return {\n spans: spans,\n position: reserveSpace(spans, i)\n };\n }),\n rowCount: curRow + Math.max.apply(Math, spaceTracker)\n };\n\n function reserveSpace(spans, i) {\n if (spans.col > colCount) {\n throw 'md-grid-list: Tile at position ' + i + ' has a colspan ' +\n '(' + spans.col + ') that exceeds the column count ' +\n '(' + colCount + ')';\n }\n\n var start = 0,\n end = 0;\n\n // TODO(shyndman): This loop isn't strictly necessary if you can\n // determine the minimum number of rows before a space opens up. To do\n // this, recognize that you've iterated across an entire row looking for\n // space, and if so fast-forward by the minimum rowSpan count. Repeat\n // until the required space opens up.\n while (end - start < spans.col) {\n if (curCol >= colCount) {\n nextRow();\n continue;\n }\n\n start = spaceTracker.indexOf(0, curCol);\n if (start === -1 || (end = findEnd(start + 1)) === -1) {\n start = end = 0;\n nextRow();\n continue;\n }\n\n curCol = end + 1;\n }\n\n adjustRow(start, spans.col, spans.row);\n curCol = start + spans.col;\n\n return {\n col: start,\n row: curRow\n };\n }\n\n function nextRow() {\n curCol = 0;\n curRow++;\n adjustRow(0, colCount, -1); // Decrement row spans by one\n }\n\n function adjustRow(from, cols, by) {\n for (var i = from; i < from + cols; i++) {\n spaceTracker[i] = Math.max(spaceTracker[i] + by, 0);\n }\n }\n\n function findEnd(start) {\n var i;\n for (i = start; i < spaceTracker.length; i++) {\n if (spaceTracker[i] !== 0) {\n return i;\n }\n }\n\n if (i === spaceTracker.length) {\n return i;\n }\n }\n\n function newSpaceTracker() {\n var tracker = [];\n for (var i = 0; i < colCount; i++) {\n tracker.push(0);\n }\n return tracker;\n }\n }\n}\n\n/**\n * @ngdoc directive\n * @name mdGridTile\n * @module material.components.gridList\n * @restrict E\n * @description\n * Tiles contain the content of an `md-grid-list`. They span one or more grid\n * cells vertically or horizontally, and use `md-grid-tile-{footer,header}` to\n * display secondary content.\n *\n * ### Responsive Attributes\n *\n * The `md-grid-tile` directive supports \"responsive\" attributes, which allow\n * different `md-rowspan` and `md-colspan` values depending on the currently\n * matching media query.\n *\n * In order to set a responsive attribute, first define the fallback value with\n * the standard attribute name, then add additional attributes with the\n * following convention: `{base-attribute-name}-{media-query-name}=\"{value}\"`\n * (ie. `md-colspan-sm=\"4\"`)\n *\n * @param {number=} md-colspan The number of columns to span (default 1). Cannot\n * exceed the number of columns in the grid. Supports interpolation.\n * @param {number=} md-rowspan The number of rows to span (default 1). Supports\n * interpolation.\n *\n * @usage\n * With header:\n * <hljs lang=\"html\">\n * <md-grid-tile>\n * <md-grid-tile-header>\n * <h3>This is a header</h3>\n * </md-grid-tile-header>\n * </md-grid-tile>\n * </hljs>\n *\n * With footer:\n * <hljs lang=\"html\">\n * <md-grid-tile>\n * <md-grid-tile-footer>\n * <h3>This is a footer</h3>\n * </md-grid-tile-footer>\n * </md-grid-tile>\n * </hljs>\n *\n * Spanning multiple rows/columns:\n * <hljs lang=\"html\">\n * <md-grid-tile md-colspan=\"2\" md-rowspan=\"3\">\n * </md-grid-tile>\n * </hljs>\n *\n * Responsive attributes:\n * <hljs lang=\"html\">\n * <md-grid-tile md-colspan=\"1\" md-colspan-sm=\"3\" md-colspan-md=\"5\">\n * </md-grid-tile>\n * </hljs>\n */\nfunction GridTileDirective($mdMedia) {\n return {\n restrict: 'E',\n require: '^mdGridList',\n template: '<figure ng-transclude></figure>',\n transclude: true,\n scope: {},\n // Simple controller that exposes attributes to the grid directive\n controller: [\"$attrs\", function($attrs) {\n this.$attrs = $attrs;\n }],\n link: postLink\n };\n\n function postLink(scope, element, attrs, gridCtrl) {\n // Apply semantics\n element.attr('role', 'listitem');\n\n // If our colspan or rowspan changes, trigger a layout\n var unwatchAttrs = $mdMedia.watchResponsiveAttributes(['md-colspan', 'md-rowspan'],\n attrs, angular.bind(gridCtrl, gridCtrl.invalidateLayout));\n\n // Tile registration/deregistration\n gridCtrl.invalidateTiles();\n scope.$on('$destroy', function() {\n // Mark the tile as destroyed so it is no longer considered in layout,\n // even if the DOM element sticks around (like during a leave animation)\n element[0].$$mdDestroyed = true;\n unwatchAttrs();\n gridCtrl.invalidateLayout();\n });\n\n if (angular.isDefined(scope.$parent.$index)) {\n scope.$watch(function() { return scope.$parent.$index; },\n function indexChanged(newIdx, oldIdx) {\n if (newIdx === oldIdx) {\n return;\n }\n gridCtrl.invalidateTiles();\n });\n }\n }\n}\n\n\nfunction GridTileCaptionDirective() {\n return {\n template: '<figcaption ng-transclude></figcaption>',\n transclude: true\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.icon\n * @description\n * Icon\n */\nangular.module('material.components.icon', ['material.core']);\n\n})();\n(function(){\n\"use strict\";\n\nangular\n .module('material.components.icon')\n .directive('mdIcon', ['$mdIcon', '$mdTheming', '$mdAria', '$sce', mdIconDirective]);\n\n/**\n * @ngdoc directive\n * @name mdIcon\n * @module material.components.icon\n *\n * @restrict E\n *\n * @description\n * The `md-icon` directive makes it easier to use vector-based icons in your app (as opposed to\n * raster-based icons types like PNG). The directive supports both icon fonts and SVG icons.\n *\n * Icons should be considered view-only elements that should not be used directly as buttons; instead nest a `<md-icon>`\n * inside a `md-button` to add hover and click features.\n *\n * ### Icon fonts\n * Icon fonts are a technique in which you use a font where the glyphs in the font are\n * your icons instead of text. Benefits include a straightforward way to bundle everything into a\n * single HTTP request, simple scaling, easy color changing, and more.\n *\n * `md-icon` lets you consume an icon font by letting you reference specific icons in that font\n * by name rather than character code.\n *\n * When using font-icons, developers must follow three (3) simple steps:\n *\n * <ol>\n * <li>Load the font library. e.g.<br/>\n * `<link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">`\n * </li>\n * <li>\n * Use either (a) font-icon class names or (b) a fontset and a font ligature to render the font glyph by\n * using its textual name _or_ numerical character reference. Note that `material-icons` is the default fontset when\n * none is specified.\n * </li>\n * <li> Use any of the following templates: <br/>\n * <ul>\n * <li>`<md-icon md-font-icon=\"classname\"></md-icon>`</li>\n * <li>`<md-icon md-font-set=\"font library classname or alias\">textual_name</md-icon>`</li>\n * <li>`<md-icon> numerical_character_reference </md-icon>`</li>\n * <li>`<md-icon ng_bind=\"'textual_name'\"></md-icon>`</li>\n * <li>`<md-icon ng-bind=\"scopeVariable\"></md-icon>`</li>\n * </ul>\n * </li>\n * </ol>\n *\n * Full details for these steps can be found in the\n * <a href=\"http://google.github.io/material-design-icons/#icon-font-for-the-web\" target=\"_blank\">\n * Material Design Icon font for the web docs</a>.\n *\n * You can browse and search the Material Design icon style <code>.material-icons</code>\n * in the <a href=\"https://material.io/tools/icons/\" target=\"_blank\">Material Design Icons tool</a>.\n *\n * ### SVG\n * For SVGs, the problem with using `<img>` or a CSS `background-image` is that you can't take\n * advantage of some SVG features, such as styling specific parts of the icon with CSS or SVG\n * animation.\n *\n * `md-icon` makes it easier to use SVG icons by *inlining* the SVG into an `<svg>` element in the\n * document. The most straightforward way of referencing an SVG icon is via URL, just like a\n * traditional `<img>`. `$mdIconProvider`, as a convenience, lets you _name_ an icon so you can\n * reference it by name instead of URL throughout your templates.\n *\n * Additionally, you may not want to make separate HTTP requests for every icon, so you can bundle\n * your SVG icons together and pre-load them with `$mdIconProvider` as an icon set. An icon set can\n * also be given a name, which acts as a namespace for individual icons, so you can reference them\n * like `\"social:cake\"`.\n *\n * When using SVGs, both external SVGs (via URLs) or sets of SVGs (from icon sets) can be\n * easily loaded and used.\n *\n * ### Localization\n *\n * Because an `md-icon` element's text content is not intended to be translated, it is recommended\n * to declare the text content for an `md-icon` element in its start tag. Instead of using the HTML\n * text content, consider using `ng-bind` with a scope variable or literal string.\n *\n * Examples:\n *\n * <ul>\n * <li>`<md-icon ng-bind=\"myIconVariable\"></md-icon>`</li>\n * <li>`<md-icon ng-bind=\"'menu'\"></md-icon>`\n * </ul>\n *\n * <h2 id=\"material_design_icons\">Material Design Icons tool</h2>\n * Using the Material Design Icons tool, developers can easily and quickly search for a specific\n * open source Material Design icon. The search is in the top left. Below search, you can select\n * from the new icon themes or filter by icon category.\n *\n * <a href=\"https://material.io/tools/icons/\" target=\"_blank\" style=\"border-bottom:none;\">\n * <img src=\"https://user-images.githubusercontent.com/3506071/41942584-ef0695d0-796d-11e8-9436-44f25023a111.png\"\n * aria-label=\"Material Design Icons tool\" style=\"max-width:95%\">\n * </a>\n *\n * <div class=\"md-caption\" style=\"text-align: center; margin-bottom: 24px\">\n * Click on the image above to open the\n * <a href=\"https://material.io/tools/icons/\" target=\"_blank\">Material Design Icons tool</a>.\n * </div>\n *\n * Click on any icon, then click on the \"Selected Icon\" chevron to see the slide-up\n * information panel with details regarding a SVG download and information on the font-icon's\n * textual name. This panel also allows you to select a black on transparent or white on transparent\n * icon and to change the icon size. These settings only affect the downloaded icons.\n *\n * @param {string} md-font-icon String name of CSS icon associated with the font-face will be used\n * to render the icon. Requires the fonts and the named CSS styles to be preloaded.\n * @param {string} md-font-set CSS style name associated with the font library; which will be assigned as\n * the class for the font-icon ligature. This value may also be an alias that is used to lookup the classname;\n * internally use `$mdIconProvider.fontSet(<alias>)` to determine the style name.\n * @param {string} md-svg-src String URL (or expression) used to load, cache, and display an\n * external SVG.\n * @param {string} md-svg-icon md-svg-icon String name used for lookup of the icon from the internal cache;\n * interpolated strings or expressions may also be used. Specific set names can be used with\n * the syntax `<set name>:<icon name>`.<br/><br/>\n * To use icon sets, developers are required to pre-register the sets using the `$mdIconProvider` service.\n * @param {string=} aria-label Labels the icon for accessibility. If an empty string is provided,\n * the icon will be hidden from the accessibility layer with `aria-hidden=\"true\"`. If there is no\n * `aria-label` attribute on the icon, we check the following, in order: the `alt` attribute, the\n * `aria-label` from the parent element, the icon's `md-font-icon` or `md-svg-icon` string, and the\n * text content inside `<md-icon></md-icon>`. If none of these have any text, the icon is hidden\n * from the accessibility layer with `aria-hidden=\"true\"`.\n * @param {string=} alt Labels the icon for accessibility. If an empty string is provided and the\n * icon has no `aria-label`, then the icon will be hidden from accessibility layer with\n * `aria-hidden=\"true\"`.\n *\n * @usage\n * When using SVGs:\n * <hljs lang=\"html\">\n *\n *<!-- Icon ID; may contain optional icon set prefix.\n * Icons must be registered using $mdIconProvider. -->\n *<md-icon md-svg-icon=\"social:android\" aria-label=\"android \" ></md-icon>\n *\n *<!-- Icon urls; may be preloaded in templateCache -->\n *<md-icon md-svg-src=\"/android.svg\" aria-label=\"android \" ></md-icon>\n *<md-icon md-svg-src=\"{{ getAndroid() }}\" aria-label=\"android \" ></md-icon>\n *\n * </hljs>\n *\n * Use the <code>$mdIconProvider</code> to configure your application with\n * SVG icon sets.\n *\n * <hljs lang=\"js\">\n * angular.module('appSvgIconSets', ['ngMaterial'])\n * .controller('DemoCtrl', function($scope) {})\n * .config(function($mdIconProvider) {\n * $mdIconProvider\n * .iconSet('social', 'img/icons/sets/social-icons.svg', 24)\n * .defaultIconSet('img/icons/sets/core-icons.svg', 24);\n * });\n * </hljs>\n *\n *\n * When using Font Icons with classnames:\n * <hljs lang=\"html\">\n *\n * <md-icon md-font-icon=\"android\" aria-label=\"android\" ></md-icon>\n * <md-icon class=\"icon_home\" aria-label=\"Home\"></md-icon>\n *\n * </hljs>\n *\n * When using Material Font Icons with ligatures:\n * <hljs lang=\"html\">\n * <!--\n * For Material Design Icons\n * The class '.material-icons' is auto-added if a style has NOT been specified\n * since `material-icons` is the default fontset. So your markup:\n * -->\n * <md-icon> face </md-icon>\n * <!-- becomes this at runtime: -->\n * <md-icon md-font-set=\"material-icons\"> face </md-icon>\n * <!-- If the fontset does not support ligature names, then we need to use the ligature unicode.-->\n * <md-icon>  </md-icon>\n * <!-- The class '.material-icons' must be manually added if other styles are also specified-->\n * <md-icon class=\"material-icons md-light md-48\"> face </md-icon>\n * </hljs>\n *\n * When using other Font-Icon libraries:\n *\n * <hljs lang=\"js\">\n * // Specify a font-icon style alias\n * angular.config(function($mdIconProvider) {\n * $mdIconProvider.fontSet('md', 'material-icons');\n * });\n * </hljs>\n *\n * <hljs lang=\"html\">\n * <md-icon md-font-set=\"md\">favorite</md-icon>\n * </hljs>\n *\n */\nfunction mdIconDirective($mdIcon, $mdTheming, $mdAria, $sce) {\n\n return {\n restrict: 'E',\n link : postLink\n };\n\n\n /**\n * Directive postLink\n * Supports embedded SVGs, font-icons, & external SVGs.\n * @param {IScope} scope\n * @param {JQLite} element\n * @param {IAttributes} attr\n */\n function postLink(scope, element, attr) {\n $mdTheming(element);\n var lastFontIcon = attr.mdFontIcon;\n var lastFontSet = $mdIcon.fontSet(attr.mdFontSet);\n\n prepareForFontIcon();\n\n attr.$observe('mdFontIcon', fontIconChanged);\n attr.$observe('mdFontSet', fontIconChanged);\n\n /* Provide a default accessibility role of img */\n if (!attr.role) {\n $mdAria.expect(element, 'role', 'img');\n /* manually update attr variable */\n attr.role = 'img';\n }\n\n // If the aria-label is explicitly set to the empty string, then hide this element from the\n // accessibility layer.\n if (element[0].hasAttribute('aria-label') && attr.ariaLabel === '') {\n element.attr('aria-hidden', true);\n }\n\n /* Don't process ARIA if already valid */\n if (attr.role === \"img\" && !attr.ariaHidden && !$mdAria.hasAriaLabel(element)) {\n // If the developer signals to hide this icon from the accessibility layer, do so.\n if (element[0].hasAttribute('alt') && attr.alt === '') {\n element.attr('aria-hidden', true);\n } else if (attr.alt) {\n /* Use the alt text for the aria-label by default, if available. */\n $mdAria.expect(element, 'aria-label', attr.alt);\n } else if ($mdAria.parentHasAriaLabel(element, 2)) {\n /* Parent has ARIA so we will assume it will describe the icon. */\n $mdAria.expect(element, 'aria-hidden', 'true');\n } else if (attr.mdFontIcon || attr.mdSvgIcon || element.text()) {\n /* Use icon name or node's text content as the aria-label */\n $mdAria.expect(element, 'aria-label', attr.mdFontIcon || attr.mdSvgIcon || element.text());\n } else {\n /* No label found, hide this icon from the accessibility layer */\n $mdAria.expect(element, 'aria-hidden', 'true');\n }\n }\n\n var attrName = attr.$normalize(attr.$attr.mdSvgIcon || attr.$attr.mdSvgSrc || '');\n if (attrName) {\n // Use either pre-configured SVG or URL source, respectively.\n attr.$observe(attrName, function(attrVal) {\n element.empty();\n if (attrVal) {\n $mdIcon(attrVal)\n .then(function(svg) {\n element.empty();\n element.append(svg);\n });\n }\n });\n }\n\n function prepareForFontIcon() {\n if (!attr.mdSvgIcon && !attr.mdSvgSrc) {\n if (attr.mdFontIcon) {\n element.addClass('md-font ' + attr.mdFontIcon);\n }\n\n element.addClass(lastFontSet);\n }\n }\n\n function fontIconChanged() {\n if (!attr.mdSvgIcon && !attr.mdSvgSrc) {\n if (attr.mdFontIcon) {\n element.removeClass(lastFontIcon);\n element.addClass(attr.mdFontIcon);\n\n lastFontIcon = attr.mdFontIcon;\n }\n\n var fontSet = $mdIcon.fontSet(attr.mdFontSet);\n\n if (lastFontSet !== fontSet) {\n element.removeClass(lastFontSet);\n element.addClass(fontSet);\n\n lastFontSet = fontSet;\n }\n }\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n \nMdIconService.$inject = [\"config\", \"$templateRequest\", \"$q\", \"$log\", \"$mdUtil\", \"$sce\"];angular\n .module('material.components.icon')\n .constant('$$mdSvgRegistry', {\n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0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+',\n 'mdToggleArrow': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==',\n 'mdCalendar': 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg==',\n 'mdChecked': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik05IDE2LjE3TDQuODMgMTJsLTEuNDIgMS40MUw5IDE5IDIxIDdsLTEuNDEtMS40MXoiLz48L2c+PC9zdmc+'\n })\n .provider('$mdIcon', MdIconProvider);\n\n/**\n * @ngdoc service\n * @name $mdIconProvider\n * @module material.components.icon\n *\n * @description\n * `$mdIconProvider` is used only to register icon IDs with URLs. These configuration features allow\n * icons and icon sets to be pre-registered and associated with source URLs **before** the\n * `<md-icon />` directives are compiled.\n *\n * If using font-icons, the developer is responsible for loading the fonts.\n *\n * If using SVGs, loading of the actual svg files are deferred to on-demand requests and are loaded\n * internally by the `$mdIcon` service using the `$templateRequest` service. When an SVG is\n * requested by name/ID, the `$mdIcon` service searches its registry for the associated source URL;\n * that URL is used to on-demand load and parse the SVG dynamically.\n *\n * The `$templateRequest` service expects the icons source to be loaded over trusted URLs.<br/>\n * This means, when loading icons from an external URL, you have to trust the URL in the\n * `$sceDelegateProvider`.\n *\n * <hljs lang=\"js\">\n * app.config(function($sceDelegateProvider) {\n * $sceDelegateProvider.trustedResourceUrlList([\n * // Adding 'self' to the allow-list, will allow requests from the current origin.\n * 'self',\n * // Using double asterisks here, will allow all URLs to load.\n * // However, we recommend only specifying the given domain you want to allow.\n * '**'\n * ]);\n * });\n * </hljs>\n *\n * Read more about the [$sceDelegateProvider](https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider).\n *\n * **Notice:** Most font-icon libraries do not support ligatures (for example `fontawesome`).<br/>\n * In such cases you are not able to use the icon's ligature name - Like so:\n *\n * <hljs lang=\"html\">\n * <md-icon md-font-set=\"fa\">fa-bell</md-icon>\n * </hljs>\n *\n * You should instead use the given unicode, instead of the ligature name.\n *\n * <p ng-hide=\"true\"> ##// Notice we can't use a hljs element here, because the characters will be escaped.</p>\n * ```html\n * <md-icon md-font-set=\"fa\"></md-icon>\n * ```\n *\n * All unicode ligatures are prefixed with the `&#x` string.\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n *\n * // Configure URLs for icons specified by [set:]id.\n * $mdIconProvider\n * .defaultFontSet( 'fa' ) // This sets our default fontset className.\n * .defaultIconSet('my/app/icons.svg') // Register a default set of SVG icons\n * .iconSet('social', 'my/app/social.svg') // Register a named icon set of SVGs\n * .icon('android', 'my/app/android.svg') // Register a specific icon (by name)\n * .icon('work:chair', 'my/app/chair.svg'); // Register icon in a specific set\n * });\n * </hljs>\n *\n * SVG icons and icon sets can be easily pre-loaded and cached using either (a) a build process or\n * (b) a runtime **startup** process (shown below):\n *\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n *\n * // Register a default set of SVG icon definitions\n * $mdIconProvider.defaultIconSet('my/app/icons.svg')\n * })\n * .run(function($templateRequest) {\n *\n * // Pre-fetch icons sources by URL and cache in the $templateCache...\n * // subsequent $templateRequest calls will look there first.\n * var urls = [ 'imy/app/icons.svg', 'img/icons/android.svg'];\n *\n * angular.forEach(urls, function(url) {\n * $templateRequest(url);\n * });\n * });\n *\n * </hljs>\n *\n * > <b>Note:</b> The loaded SVG data is subsequently cached internally for future requests.\n */\n\n/**\n * @ngdoc method\n * @name $mdIconProvider#icon\n *\n * @description\n * Register a source URL for a specific icon name; the name may include optional 'icon set' name\n * prefix. These icons will later be retrieved from the cache using `$mdIcon(<icon name>)`.\n *\n * @param {string} id Icon name/id used to register the icon\n * @param {string} url specifies the external location for the data file. Used internally by\n * `$templateRequest` to load the data or as part of the lookup in `$templateCache` if pre-loading\n * was configured.\n * @param {number=} viewBoxSize Sets the width and height the icon's viewBox.\n * It is ignored for icons with an existing viewBox. Default size is 24.\n *\n * @returns {obj} an `$mdIconProvider` reference; used to support method call chains for the API\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n *\n * // Configure URLs for icons specified by [set:]id.\n * $mdIconProvider\n * .icon('android', 'my/app/android.svg') // Register a specific icon (by name)\n * .icon('work:chair', 'my/app/chair.svg'); // Register icon in a specific set\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdIconProvider#iconSet\n *\n * @description\n * Register a source URL for a 'named' set of icons; group of SVG definitions where each definition\n * has an icon id. Individual icons can be subsequently retrieved from this cached set using\n * `$mdIcon(<icon set name>:<icon name>)`\n *\n * @param {string} id Icon name/id used to register the iconset\n * @param {string} url specifies the external location for the data file. Used internally by\n * `$templateRequest` to load the data or as part of the lookup in `$templateCache` if pre-loading\n * was configured.\n * @param {number=} viewBoxSize Sets the width and height of the viewBox of all icons in the set.\n * It is ignored for icons with an existing viewBox. All icons in the icon set should be the same size.\n * Default value is 24.\n *\n * @returns {obj} an `$mdIconProvider` reference; used to support method call chains for the API\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n *\n * // Configure URLs for icons specified by [set:]id.\n * $mdIconProvider\n * .iconSet('social', 'my/app/social.svg'); // Register a named icon set\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdIconProvider#defaultIconSet\n *\n * @description\n * Register a source URL for the default 'named' set of icons. Unless explicitly registered,\n * subsequent lookups of icons will fail over to search this 'default' icon set.\n * Icon can be retrieved from this cached, default set using `$mdIcon(<name>)`\n *\n * @param {string} url specifies the external location for the data file. Used internally by\n * `$templateRequest` to load the data or as part of the lookup in `$templateCache` if pre-loading\n * was configured.\n * @param {number=} viewBoxSize Sets the width and height of the viewBox of all icons in the set.\n * It is ignored for icons with an existing viewBox. All icons in the icon set should be the same\n * size. Default value is 24.\n *\n * @returns {Object} an `$mdIconProvider` reference; used to support method call chains for the API\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n *\n * // Configure URLs for icons specified by [set:]id.\n * $mdIconProvider\n * .defaultIconSet('my/app/social.svg'); // Register a default icon set\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdIconProvider#defaultFontSet\n *\n * @description\n * When using Font-Icons, AngularJS Material assumes the the Material Design icons will be used and\n * automatically configures the default `font-set == 'material-icons'`. Note that the font-set\n * references the font-icon library class style that should be applied to the `<md-icon>`.\n *\n * Configuring the default means that the attributes\n * `md-font-set=\"material-icons\"` or `class=\"material-icons\"` do not need to be explicitly declared\n * on the `<md-icon>` markup.\n *\n * For example:<br/>\n * `<md-icon>face</md-icon>` will render as `<span class=\"material-icons\">face</span>`,<br/>\n * and<br/>\n * `<md-icon md-font-set=\"fa\">face</md-icon>` will render as `<span class=\"fa\">face</span>`\n *\n * @param {string} name Name of the font-library style that should be applied to the md-icon DOM\n * element.\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n * $mdIconProvider.defaultFontSet('fa');\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdIconProvider#fontSet\n *\n * @description\n * When using a font-set for `<md-icon>` you must specify the correct font classname in the\n * `md-font-set` attribute. If the font-set className is really long, your markup may become\n * cluttered... an easy solution is to define an `alias` for your font-set:\n *\n * @param {string} alias Alias name of the specified font-set.\n * @param {string} className Name of the class for the font-set.\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n * // In this case, we set an alias for the `material-icons` font-set.\n * $mdIconProvider.fontSet('md', 'material-icons');\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdIconProvider#defaultViewBoxSize\n *\n * @description\n * While `<md-icon>` markup can also be styled with sizing CSS, this method configures\n * the default width **and** height used for all icons; unless overridden by specific CSS.\n * The default sizing is (`24px`, `24px`).\n * @param {number=} viewBoxSize Sets the width and height of the viewBox for an icon or an icon set.\n * All icons in a set should be the same size. The default value is 24.\n *\n * @returns {Object} an `$mdIconProvider` reference; used to support method call chains for the API\n *\n * @usage\n * <hljs lang=\"js\">\n * app.config(function($mdIconProvider) {\n *\n * // Configure URLs for icons specified by [set:]id.\n * $mdIconProvider\n * .defaultViewBoxSize(36); // Register a default icon size (width == height)\n * });\n * </hljs>\n */\n\nvar config = {\n defaultViewBoxSize: 24,\n defaultFontSet: 'material-icons',\n fontSets: []\n};\n\nfunction MdIconProvider() {\n}\n\nMdIconProvider.prototype = {\n icon: function(id, url, viewBoxSize) {\n if (id.indexOf(':') == -1) id = '$default:' + id;\n\n config[id] = new ConfigurationItem(url, viewBoxSize);\n return this;\n },\n\n iconSet: function(id, url, viewBoxSize) {\n config[id] = new ConfigurationItem(url, viewBoxSize);\n return this;\n },\n\n defaultIconSet: function(url, viewBoxSize) {\n var setName = '$default';\n\n if (!config[setName]) {\n config[setName] = new ConfigurationItem(url, viewBoxSize);\n }\n\n config[setName].viewBoxSize = viewBoxSize || config.defaultViewBoxSize;\n\n return this;\n },\n\n defaultViewBoxSize: function(viewBoxSize) {\n config.defaultViewBoxSize = viewBoxSize;\n return this;\n },\n\n /**\n * Register an alias name associated with a font-icon library style ;\n */\n fontSet: function fontSet(alias, className) {\n config.fontSets.push({\n alias: alias,\n fontSet: className || alias\n });\n return this;\n },\n\n /**\n * Specify a default style name associated with a font-icon library\n * fallback to Material Icons.\n *\n */\n defaultFontSet: function defaultFontSet(className) {\n config.defaultFontSet = !className ? '' : className;\n return this;\n },\n\n defaultIconSize: function defaultIconSize(iconSize) {\n config.defaultIconSize = iconSize;\n return this;\n },\n\n $get: ['$templateRequest', '$q', '$log', '$mdUtil', '$sce', function($templateRequest, $q, $log, $mdUtil, $sce) {\n return MdIconService(config, $templateRequest, $q, $log, $mdUtil, $sce);\n }]\n};\n\n /**\n * Configuration item stored in the Icon registry; used for lookups\n * to load if not already cached in the `loaded` cache\n * @param {string} url\n * @param {=number} viewBoxSize\n * @constructor\n */\n function ConfigurationItem(url, viewBoxSize) {\n this.url = url;\n this.viewBoxSize = viewBoxSize || config.defaultViewBoxSize;\n }\n\n/**\n * @ngdoc service\n * @name $mdIcon\n * @module material.components.icon\n *\n * @description\n * The `$mdIcon` service is a function used to lookup SVG icons.\n *\n * @param {string} id Query value for a unique Id or URL. If the argument is a URL, then the service will retrieve the icon element\n * from its internal cache or load the icon and cache it first. If the value is not a URL-type string, then an ID lookup is\n * performed. The Id may be a unique icon ID or may include an iconSet ID prefix.\n *\n * For the **id** query to work properly, this means that all id-to-URL mappings must have been previously configured\n * using the `$mdIconProvider`.\n *\n * @returns {angular.$q.Promise} A promise that gets resolved to a clone of the initial SVG DOM element; which was\n * created from the SVG markup in the SVG data file. If an error occurs (e.g. the icon cannot be found) the promise\n * will get rejected.\n *\n * @usage\n * <hljs lang=\"js\">\n * function SomeDirective($mdIcon) {\n *\n * // See if the icon has already been loaded, if not then lookup the icon from the\n * // registry cache, load and cache it for future requests.\n * // NOTE: Non-URL queries require configuration with $mdIconProvider.\n * $mdIcon('android').then(function(iconEl) { element.append(iconEl); });\n * $mdIcon('work:chair').then(function(iconEl) { element.append(iconEl); });\n *\n * // Load and cache the external SVG using a URL.\n * $mdIcon('img/icons/android.svg').then(function(iconEl) {\n * element.append(iconEl);\n * });\n * };\n * </hljs>\n *\n * > <b>Note:</b> The `<md-icon>` directive internally uses the `$mdIcon` service to query, load,\n * and instantiate SVG DOM elements.\n */\n\n/* @ngInject */\nfunction MdIconService(config, $templateRequest, $q, $log, $mdUtil, $sce) {\n var iconCache = {};\n var svgCache = {};\n var urlRegex = /[-\\w@:%+.~#?&//=]{2,}\\.[a-z]{2,4}\\b(\\/[-\\w@:%+.~#?&//=]*)?/i;\n var dataUrlRegex = /^data:image\\/svg\\+xml[\\s*;\\w\\-=]*?(base64)?,(.*)$/i;\n\n Icon.prototype = {clone: cloneSVG, prepare: prepareAndStyle};\n getIcon.fontSet = findRegisteredFontSet;\n\n // Publish service...\n return getIcon;\n\n /**\n * Actual $mdIcon service is essentially a lookup function\n * @param {*} id $sce trust wrapper over a URL string, URL, icon registry id, or icon set id\n * @returns {angular.$q.Promise}\n */\n function getIcon(id) {\n id = id || '';\n\n // If the \"id\" provided is not a string, the only other valid value is a $sce trust wrapper\n // over a URL string. If the value is not trusted, this will intentionally throw an error\n // because the user is attempted to use an unsafe URL, potentially opening themselves up\n // to an XSS attack.\n if (!angular.isString(id)) {\n id = $sce.getTrustedUrl(id);\n }\n\n // If already loaded and cached, use a clone of the cached icon.\n // Otherwise either load by URL, or lookup in the registry and then load by URL, and cache.\n\n if (iconCache[id]) {\n return $q.when(transformClone(iconCache[id]));\n }\n\n if (urlRegex.test(id) || dataUrlRegex.test(id)) {\n return loadByURL(id).then(cacheIcon(id));\n }\n\n if (id.indexOf(':') === -1) {\n id = '$default:' + id;\n }\n\n var load = config[id] ? loadByID : loadFromIconSet;\n return load(id)\n .then(cacheIcon(id));\n }\n\n /**\n * Lookup a registered fontSet style using its alias.\n * @param {string} alias used to lookup the alias in the array of fontSets\n * @returns {*} matching fontSet or the defaultFontSet if that alias does not match\n */\n function findRegisteredFontSet(alias) {\n var useDefault = angular.isUndefined(alias) || !(alias && alias.length);\n if (useDefault) {\n return config.defaultFontSet;\n }\n\n var result = alias;\n angular.forEach(config.fontSets, function(fontSet) {\n if (fontSet.alias === alias) {\n result = fontSet.fontSet || result;\n }\n });\n\n return result;\n }\n\n /**\n * @param {!Icon} cacheElement cached icon from the iconCache\n * @returns {Icon} cloned Icon element with unique ids\n */\n function transformClone(cacheElement) {\n var clone = cacheElement.clone();\n var newUid = $mdUtil.nextUid();\n var cacheSuffix, svgUrlQuerySelector, i, xlinkHrefValue;\n // These are SVG attributes that can reference element ids.\n var svgUrlAttributes = [\n 'clip-path', 'color-profile', 'cursor', 'fill', 'filter', 'href', 'marker-start',\n 'marker-mid', 'marker-end', 'mask', 'stroke', 'style', 'vector-effect'\n ];\n var isIeSvg = clone.innerHTML === undefined;\n\n // Verify that the newUid only contains a number and not some XSS content.\n if (!isFinite(Number(newUid))) {\n throw new Error('Unsafe and unexpected non-number result from $mdUtil.nextUid().');\n }\n cacheSuffix = '_cache' + newUid;\n\n // For each cached icon, we need to modify the id attributes and references.\n // This is needed because SVG ids are treated as normal DOM ids and should not be duplicated on\n // the page.\n if (clone.id) {\n clone.id += cacheSuffix;\n }\n\n // Do as much as possible with querySelectorAll as it provides much greater performance\n // than RegEx against serialized DOM.\n angular.forEach(clone.querySelectorAll('[id]'), function(descendantElem) {\n svgUrlQuerySelector = '';\n for (i = 0; i < svgUrlAttributes.length; i++) {\n svgUrlQuerySelector += '[' + svgUrlAttributes[i] + '=\"url(#' + descendantElem.id + ')\"]';\n if (i + 1 < svgUrlAttributes.length) {\n svgUrlQuerySelector += ', ';\n }\n }\n // Append the cacheSuffix to references of the element's id within url(#id) calls.\n angular.forEach(clone.querySelectorAll(svgUrlQuerySelector), function(refItem) {\n updateSvgIdReferences(descendantElem, refItem, isIeSvg, newUid);\n });\n // Handle usages of url(#id) in the SVG's stylesheets\n angular.forEach(clone.querySelectorAll('style'), function(refItem) {\n updateSvgIdReferences(descendantElem, refItem, isIeSvg, newUid);\n });\n\n // Update ids referenced by the deprecated (in SVG v2) xlink:href XML attribute. The now\n // preferred href attribute is handled above. However, this non-standard XML namespaced\n // attribute cannot be handled in the same way. Explanation of this query selector here:\n // https://stackoverflow.com/q/23034283/633107.\n angular.forEach(clone.querySelectorAll('[*|href]:not([href])'), function(refItem) {\n xlinkHrefValue = refItem.getAttribute('xlink:href');\n if (xlinkHrefValue) {\n xlinkHrefValue = xlinkHrefValue.replace(\"#\" + descendantElem.id, \"#\" + descendantElem.id + cacheSuffix);\n refItem.setAttribute('xlink:href', xlinkHrefValue);\n }\n });\n\n descendantElem.id += cacheSuffix;\n });\n\n return clone;\n }\n\n /**\n * @param {Element} referencedElement element w/ id that needs to be updated\n * @param {Element} referencingElement element that references the original id\n * @param {boolean} isIeSvg true if we're dealing with an SVG in IE11, false otherwise\n * @param {string} newUid the cache id to add as part of the cache suffix\n */\n function updateSvgIdReferences(referencedElement, referencingElement, isIeSvg, newUid) {\n var svgElement, cacheSuffix;\n\n // Verify that the newUid only contains a number and not some XSS content.\n if (!isFinite(Number(newUid))) {\n throw new Error('Unsafe and unexpected non-number result for newUid.');\n }\n cacheSuffix = '_cache' + newUid;\n\n // outerHTML of SVG elements is not supported by IE11\n if (isIeSvg) {\n svgElement = $mdUtil.getOuterHTML(referencingElement);\n svgElement = svgElement.replace(\"url(#\" + referencedElement.id + \")\",\n \"url(#\" + referencedElement.id + cacheSuffix + \")\");\n referencingElement.textContent = angular.element(svgElement)[0].innerHTML;\n } else {\n // This use of outerHTML should be safe from XSS attack since we are only injecting the\n // cacheSuffix with content from $mdUtil.nextUid which we verify is a finite number above.\n referencingElement.outerHTML = referencingElement.outerHTML.replace(\n \"url(#\" + referencedElement.id + \")\",\n \"url(#\" + referencedElement.id + cacheSuffix + \")\");\n }\n }\n\n /**\n * Prepare and cache the loaded icon for the specified `id`.\n * @param {string} id icon cache id\n * @returns {function(*=): *}\n */\n function cacheIcon(id) {\n\n return function updateCache(icon) {\n iconCache[id] = isIcon(icon) ? icon : new Icon(icon, config[id]);\n\n return transformClone(iconCache[id]);\n };\n }\n\n /**\n * Lookup the configuration in the registry, if !registered throw an error\n * otherwise load the icon [on-demand] using the registered URL.\n * @param {string} id icon registry id\n * @returns {angular.$q.Promise}\n */\n function loadByID(id) {\n var iconConfig = config[id];\n return loadByURL(iconConfig.url).then(function(icon) {\n return new Icon(icon, iconConfig);\n });\n }\n\n /**\n * Loads the file as XML and uses querySelector( <id> ) to find the desired node...\n * @param {string} id icon id in icon set\n * @returns {angular.$q.Promise}\n */\n function loadFromIconSet(id) {\n var setName = id.substring(0, id.lastIndexOf(':')) || '$default';\n var iconSetConfig = config[setName];\n\n return !iconSetConfig ? announceIdNotFound(id) : loadByURL(iconSetConfig.url).then(extractFromSet);\n\n function extractFromSet(set) {\n var iconName = id.slice(id.lastIndexOf(':') + 1);\n var icon = set.querySelector('#' + iconName);\n return icon ? new Icon(icon, iconSetConfig) : announceIdNotFound(id);\n }\n\n function announceIdNotFound(id) {\n var msg = 'icon ' + id + ' not found';\n $log.warn(msg);\n\n return $q.reject(msg || id);\n }\n }\n\n /**\n * Load the icon by URL (may use the $templateCache).\n * Extract the data for later conversion to Icon\n * @param {string} url icon URL\n * @returns {angular.$q.Promise}\n */\n function loadByURL(url) {\n /* Load the icon from embedded data URL. */\n function loadByDataUrl(url) {\n var results = dataUrlRegex.exec(url);\n var isBase64 = /base64/i.test(url);\n var data = isBase64 ? window.atob(results[2]) : results[2];\n\n return $q.when(angular.element(data)[0]);\n }\n\n /* Load the icon by URL using HTTP. */\n function loadByHttpUrl(url) {\n return $q(function(resolve, reject) {\n // Catch HTTP or generic errors not related to incorrect icon IDs.\n var announceAndReject = function(err) {\n var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);\n $log.warn(msg);\n reject(err);\n },\n extractSvg = function(response) {\n if (!svgCache[url]) {\n svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');\n }\n resolve(svgCache[url]);\n };\n\n $templateRequest(url, true).then(extractSvg, announceAndReject);\n });\n }\n\n return dataUrlRegex.test(url)\n ? loadByDataUrl(url)\n : loadByHttpUrl(url);\n }\n\n /**\n * Check target signature to see if it is an Icon instance.\n * @param {Icon|Element} target\n * @returns {boolean} true if the specified target is an Icon object, false otherwise.\n */\n function isIcon(target) {\n return angular.isDefined(target.element) && angular.isDefined(target.config);\n }\n\n /**\n * Define the Icon class\n * @param {Element} el\n * @param {=ConfigurationItem} config\n * @constructor\n */\n function Icon(el, config) {\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>.\n if (el && el.tagName.toLowerCase() === 'symbol') {\n var viewbox = el.getAttribute('viewBox');\n // // Check if innerHTML is supported as IE11 does not support innerHTML on SVG elements.\n if (el.innerHTML) {\n el = angular.element('<svg xmlns=\"http://www.w3.org/2000/svg\">')\n .html(el.innerHTML)[0];\n } else {\n el = angular.element('<svg xmlns=\"http://www.w3.org/2000/svg\">')\n .append($mdUtil.getInnerHTML(el))[0];\n }\n if (viewbox) el.setAttribute('viewBox', viewbox);\n }\n\n if (el && el.tagName.toLowerCase() !== 'svg') {\n el = angular.element(\n '<svg xmlns=\"http://www.w3.org/2000/svg\">').append(el.cloneNode(true))[0];\n }\n\n // Inject the namespace if not available...\n if (!el.getAttribute('xmlns')) {\n el.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n }\n\n this.element = el;\n this.config = config;\n this.prepare();\n }\n\n /**\n * Prepare the DOM element that will be cached in the\n * loaded iconCache store.\n */\n function prepareAndStyle() {\n var viewBoxSize = this.config ? this.config.viewBoxSize : config.defaultViewBoxSize;\n angular.forEach({\n 'fit': '',\n 'height': '100%',\n 'width': '100%',\n 'preserveAspectRatio': 'xMidYMid meet',\n 'viewBox': this.element.getAttribute('viewBox') || ('0 0 ' + viewBoxSize + ' ' + viewBoxSize),\n 'focusable': false // Disable IE11s default behavior to make SVGs focusable\n }, function(val, attr) {\n this.element.setAttribute(attr, val);\n }, this);\n }\n\n /**\n * Clone the Icon DOM element.\n */\n function cloneSVG() {\n // If the element or any of its children have a style attribute, then a CSP policy without\n // 'unsafe-inline' in the style-src directive, will result in a violation.\n return this.element.cloneNode(true);\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.input\n */\nmdInputContainerDirective.$inject = [\"$mdTheming\", \"$parse\", \"$$rAF\"];\ninputTextareaDirective.$inject = [\"$mdUtil\", \"$window\", \"$mdAria\", \"$timeout\", \"$mdGesture\"];\nmdMaxlengthDirective.$inject = [\"$animate\", \"$mdUtil\"];\nplaceholderDirective.$inject = [\"$compile\"];\nngMessageDirective.$inject = [\"$mdUtil\"];\nmdSelectOnFocusDirective.$inject = [\"$document\", \"$timeout\"];\nmdInputInvalidMessagesAnimation.$inject = [\"$$AnimateRunner\", \"$animateCss\", \"$mdUtil\"];\nngMessagesAnimation.$inject = [\"$$AnimateRunner\", \"$animateCss\", \"$mdUtil\"];\nngMessageAnimation.$inject = [\"$$AnimateRunner\", \"$animateCss\", \"$mdUtil\", \"$log\"];\nvar inputModule = angular.module('material.components.input', [\n 'material.core'\n ])\n .directive('mdInputContainer', mdInputContainerDirective)\n .directive('label', labelDirective)\n .directive('input', inputTextareaDirective)\n .directive('textarea', inputTextareaDirective)\n .directive('mdMaxlength', mdMaxlengthDirective)\n .directive('placeholder', placeholderDirective)\n .directive('ngMessages', ngMessagesDirective)\n .directive('ngMessage', ngMessageDirective)\n .directive('ngMessageExp', ngMessageDirective)\n .directive('mdSelectOnFocus', mdSelectOnFocusDirective)\n\n .animation('.md-input-invalid', mdInputInvalidMessagesAnimation)\n .animation('.md-input-messages-animation', ngMessagesAnimation)\n .animation('.md-input-message-animation', ngMessageAnimation);\n\n// If we are running inside of tests; expose some extra services so that we can test them\nif (window._mdMocksIncluded) {\n inputModule.service('$$mdInput', function() {\n return {\n // special accessor to internals... useful for testing\n messages: {\n getElement : getMessagesElement\n }\n };\n })\n\n // Register a service for each animation so that we can easily inject them into unit tests\n .service('mdInputInvalidAnimation', mdInputInvalidMessagesAnimation)\n .service('mdInputMessagesAnimation', ngMessagesAnimation)\n .service('mdInputMessageAnimation', ngMessageAnimation);\n}\n\n/**\n * @ngdoc directive\n * @name mdInputContainer\n * @module material.components.input\n *\n * @restrict E\n *\n * @description\n * `<md-input-container>` is the parent of any input or textarea element. It can also optionally\n * wrap `<md-select>` elements so that they will be formatted for use in a form.\n *\n * Input and textarea elements will not behave properly unless the md-input-container parent is\n * provided.\n *\n * A single `<md-input-container>` should contain only one `<input>` or `<md-select>` element,\n * otherwise it will throw an error.\n *\n * <b>Exception:</b> Hidden inputs (`<input type=\"hidden\" />`) are ignored and will not throw an\n * error, so you may combine these with other inputs.\n *\n * <b>Note:</b> When using `ngMessages` with your input element, make sure the message and container\n * elements are *block* elements, otherwise animations applied to the messages will not look as\n * intended. Either use a `div` and apply the `ng-message` and `ng-messages` classes respectively,\n * or use the `md-block` class on your element.\n *\n * @param {expression=} md-is-error When the given expression evaluates to `true`, the input\n * container will go into the error state. Defaults to erroring if the input has been touched and\n * is invalid.\n * @param {boolean=} md-no-float When present, `placeholder` attributes on the input will not be\n * converted to floating labels.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-input-container>\n * <label>Username</label>\n * <input type=\"text\" ng-model=\"user.name\">\n * </md-input-container>\n *\n * <md-input-container>\n * <label>Description</label>\n * <textarea ng-model=\"user.description\"></textarea>\n * </md-input-container>\n *\n * <md-input-container>\n * <md-select ng-model=\"user.state\" placeholder=\"State of Residence\">\n * <md-option ng-value=\"state\" ng-repeat=\"state in states\">{{ state }}</md-option>\n * </md-select>\n * </md-input-container>\n * </hljs>\n *\n * <h3>When disabling floating labels</h3>\n * <hljs lang=\"html\">\n * <md-input-container md-no-float>\n * <input type=\"text\" placeholder=\"Non-Floating Label\">\n * </md-input-container>\n * </hljs>\n *\n * <h3>Aligning Form Elements</h3>\n * Wrap your form elements with the `md-inline-form` class in order to align them horizontally\n * within a form.\n *\n * <hljs lang=\"html\">\n * <form class=\"md-inline-form\">\n * <md-input-container>\n * <label>Username</label>\n * <input type=\"text\" ng-model=\"user.name\">\n * </md-input-container>\n *\n * <md-input-container>\n * <label>Description</label>\n * <textarea ng-model=\"user.description\"></textarea>\n * </md-input-container>\n *\n * <md-input-container>\n * <label>State of Residence</label>\n * <md-select ng-model=\"user.state\">\n * <md-option ng-value=\"state\" ng-repeat=\"state in states\">{{ state }}</md-option>\n * </md-select>\n * </md-input-container>\n *\n * <md-input-container>\n * <label>Enter date</label>\n * <md-datepicker ng-model=\"user.submissionDate\"></md-datepicker>\n * </md-input-container>\n *\n * <md-input-container>\n * <md-checkbox ng-model=\"user.licenseAccepted\">\n * I agree to the license terms.\n * </md-checkbox>\n * </md-input-container>\n * </form>\n * </hljs>\n */\nfunction mdInputContainerDirective($mdTheming, $parse, $$rAF) {\n\n ContainerCtrl.$inject = [\"$scope\", \"$element\", \"$attrs\", \"$animate\"];\n var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT', 'MD-SELECT'];\n\n var LEFT_SELECTORS = INPUT_TAGS.reduce(function(selectors, isel) {\n return selectors.concat(['md-icon ~ ' + isel, '.md-icon ~ ' + isel]);\n }, []).join(\",\");\n\n var RIGHT_SELECTORS = INPUT_TAGS.reduce(function(selectors, isel) {\n return selectors.concat([isel + ' ~ md-icon', isel + ' ~ .md-icon']);\n }, []).join(\",\");\n\n return {\n restrict: 'E',\n compile: compile,\n controller: ContainerCtrl\n };\n\n function compile(tElement) {\n // Check for both a left & right icon\n var hasLeftIcon = tElement[0].querySelector(LEFT_SELECTORS);\n var hasRightIcon = tElement[0].querySelector(RIGHT_SELECTORS);\n\n return function postLink(scope, element) {\n $mdTheming(element);\n\n if (hasLeftIcon || hasRightIcon) {\n // When accessing the element's contents synchronously, they may not be defined yet because\n // of the use of ng-if. If we wait one frame, then the element should be there if the ng-if\n // resolves to true.\n $$rAF(function() {\n // Handle the case where the md-icon element is initially hidden via ng-if from #9529.\n // We don't want to preserve the space for the icon in the case of ng-if, like we do for\n // ng-show.\n // Note that we can't use the same selectors from above because the elements are no longer\n // siblings for textareas at this point due to the insertion of the md-resize-wrapper.\n var iconNotRemoved = element[0].querySelector('md-icon') ||\n element[0].querySelector('.md-icon');\n if (hasLeftIcon && iconNotRemoved) {\n element.addClass('md-icon-left');\n }\n if (hasRightIcon && iconNotRemoved) {\n element.addClass('md-icon-right');\n }\n });\n }\n };\n }\n\n function ContainerCtrl($scope, $element, $attrs, $animate) {\n var self = this;\n\n $element.addClass('md-auto-horizontal-margin');\n\n self.isErrorGetter = $attrs.mdIsError && $parse($attrs.mdIsError);\n\n self.delegateClick = function() {\n self.input.focus();\n };\n self.element = $element;\n self.setFocused = function(isFocused) {\n $element.toggleClass('md-input-focused', !!isFocused);\n };\n self.setHasValue = function(hasValue) {\n $element.toggleClass('md-input-has-value', !!hasValue);\n };\n self.setHasPlaceholder = function(hasPlaceholder) {\n $element.toggleClass('md-input-has-placeholder', !!hasPlaceholder);\n };\n self.setInvalid = function(isInvalid) {\n if (isInvalid) {\n $animate.addClass($element, 'md-input-invalid');\n } else {\n $animate.removeClass($element, 'md-input-invalid');\n }\n };\n $scope.$watch(function() {\n return self.label && self.input;\n }, function(hasLabelAndInput) {\n if (hasLabelAndInput && !self.label.attr('for')) {\n self.label.attr('for', self.input.attr('id'));\n }\n });\n }\n}\n\nfunction labelDirective() {\n return {\n restrict: 'E',\n require: '^?mdInputContainer',\n link: function(scope, element, attr, containerCtrl) {\n if (!containerCtrl || attr.mdNoFloat || element.hasClass('md-container-ignore')) return;\n\n containerCtrl.label = element;\n scope.$on('$destroy', function() {\n containerCtrl.label = null;\n });\n }\n };\n}\n\n/**\n * @ngdoc directive\n * @name mdInput\n * @restrict E\n * @module material.components.input\n *\n * @description\n * You can use any `<input>` or `<textarea>` element as a child of an `<md-input-container>`. This\n * allows you to build complex forms for data entry.\n *\n * When the input is required and uses a floating label, then the label will automatically contain\n * an asterisk (`*`).<br/>\n * This behavior can be disabled by using the `md-no-asterisk` attribute.\n *\n * @param {number=} md-maxlength The maximum number of characters allowed in this input. If this is\n * specified, a character counter will be shown underneath the input.<br/><br/>\n * The purpose of **`md-maxlength`** is exactly to show the max length counter text. If you don't\n * want the counter text and only need \"plain\" validation, you can use the \"simple\" `ng-maxlength`\n * or maxlength attributes.<br/><br/>\n * @param {boolean=} ng-trim If set to false, the input text will be not trimmed automatically.\n * Defaults to true.\n * @param {string=} aria-label Aria-label is required when no label is present. A warning message\n * will be logged in the console if not present.\n * @param {string=} placeholder An alternative approach to using aria-label when the label is not\n * PRESENT. The placeholder text is copied to the aria-label attribute.\n * @param {boolean=} md-no-autogrow When present, textareas will not grow automatically.\n * @param {boolean=} md-no-asterisk When present, an asterisk will not be appended to the inputs\n * floating label.\n * @param {boolean=} md-no-resize Disables the textarea resize handle.\n * @param {number=} max-rows The maximum amount of rows for a textarea.\n * @param {boolean=} md-detect-hidden When present, textareas will be sized properly when they are\n * revealed after being hidden. This is off by default for performance reasons because it\n * guarantees a reflow every digest cycle.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-input-container>\n * <label>Color</label>\n * <input type=\"text\" ng-model=\"color\" required md-maxlength=\"10\">\n * </md-input-container>\n * </hljs>\n *\n * <h3>With Errors</h3>\n *\n * `md-input-container` also supports errors using the standard `ng-messages` directives and\n * animates the messages when they become visible using from the `ngEnter`/`ngLeave` events or\n * the `ngShow`/`ngHide` events.\n *\n * By default, the messages will be hidden until the input is in an error state. This is based off\n * of the `md-is-error` expression of the `md-input-container`. This gives the user a chance to\n * fill out the form before the errors become visible.\n *\n * <hljs lang=\"html\">\n * <form name=\"colorForm\">\n * <md-input-container>\n * <label>Favorite Color</label>\n * <input name=\"favoriteColor\" ng-model=\"favoriteColor\" required>\n * <div ng-messages=\"colorForm.favoriteColor.$error\">\n * <div ng-message=\"required\">This is required!</div>\n * </div>\n * </md-input-container>\n * </form>\n * </hljs>\n *\n * We automatically disable this auto-hiding functionality if you provide any of the following\n * visibility directives on the `ng-messages` container:\n *\n * - `ng-if`\n * - `ng-show`/`ng-hide`\n * - `ng-switch-when`/`ng-switch-default`\n *\n * You can also disable this functionality manually by adding the `md-auto-hide=\"false\"` expression\n * to the `ng-messages` container. This may be helpful if you always want to see the error messages\n * or if you are building your own visibility directive.\n *\n * _<b>Note:</b> The `md-auto-hide` attribute is a static string that is only checked upon\n * initialization of the `ng-messages` directive to see if it equals the string `false`._\n *\n * <hljs lang=\"html\">\n * <form name=\"userForm\">\n * <md-input-container>\n * <label>Last Name</label>\n * <input name=\"lastName\" ng-model=\"lastName\" required md-maxlength=\"10\" minlength=\"4\">\n * <div ng-messages=\"userForm.lastName.$error\" ng-show=\"userForm.lastName.$dirty\">\n * <div ng-message=\"required\">This is required!</div>\n * <div ng-message=\"md-maxlength\">That's too long!</div>\n * <div ng-message=\"minlength\">That's too short!</div>\n * </div>\n * </md-input-container>\n * <md-input-container>\n * <label>Biography</label>\n * <textarea name=\"bio\" ng-model=\"biography\" required md-maxlength=\"150\"></textarea>\n * <div ng-messages=\"userForm.bio.$error\" ng-show=\"userForm.bio.$dirty\">\n * <div ng-message=\"required\">This is required!</div>\n * <div ng-message=\"md-maxlength\">That's too long!</div>\n * </div>\n * </md-input-container>\n * <md-input-container>\n * <input aria-label='title' ng-model='title'>\n * </md-input-container>\n * <md-input-container>\n * <input placeholder='title' ng-model='title'>\n * </md-input-container>\n * </form>\n * </hljs>\n *\n * <h3>Notes</h3>\n *\n * - Requires [ngMessages](https://docs.angularjs.org/api/ngMessages).\n * - Behaves like the [AngularJS input directive](https://docs.angularjs.org/api/ng/directive/input).\n *\n * The `md-input` and `md-input-container` directives use very specific positioning to achieve the\n * error animation effects. Therefore, it is *not* advised to use the Layout system inside of the\n * `<md-input-container>` tags. Instead, use relative or absolute positioning.\n *\n *\n * <h3>Textarea directive</h3>\n * The `textarea` element within a `md-input-container` has the following specific behavior:\n * - By default the `textarea` grows as the user types. This can be disabled via the `md-no-autogrow`\n * attribute.\n * - If a `textarea` has the `rows` attribute, it will treat the `rows` as the minimum height and will\n * continue growing as the user types. For example a textarea with `rows=\"3\"` will be 3 lines of text\n * high initially. If no rows are specified, the directive defaults to 1.\n * - The textarea's height gets set on initialization, as well as while the user is typing. In certain situations\n * (e.g. while animating) the directive might have been initialized, before the element got it's final height. In\n * those cases, you can trigger a resize manually by broadcasting a `md-resize-textarea` event on the scope.\n * - If you want a `textarea` to stop growing at a certain point, you can specify the `max-rows` attribute.\n * - The textarea's bottom border acts as a handle which users can drag, in order to resize the element vertically.\n * Once the user has resized a `textarea`, the autogrowing functionality becomes disabled. If you don't want a\n * `textarea` to be resizeable by the user, you can add the `md-no-resize` attribute.\n */\n\nfunction inputTextareaDirective($mdUtil, $window, $mdAria, $timeout, $mdGesture) {\n return {\n restrict: 'E',\n require: ['^?mdInputContainer', '?ngModel', '?^form'],\n link: postLink\n };\n\n function postLink(scope, element, attr, ctrls) {\n\n var containerCtrl = ctrls[0];\n var hasNgModel = !!ctrls[1];\n var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel();\n var parentForm = ctrls[2];\n var isReadonly = angular.isDefined(attr.readonly);\n var mdNoAsterisk = $mdUtil.parseAttributeBoolean(attr.mdNoAsterisk);\n var tagName = element[0].tagName.toLowerCase();\n\n\n if (!containerCtrl) return;\n if (attr.type === 'hidden') {\n element.attr('aria-hidden', 'true');\n return;\n } else if (containerCtrl.input) {\n if (containerCtrl.input[0].contains(element[0])) {\n return;\n } else {\n throw new Error(\"<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!\");\n }\n }\n containerCtrl.input = element;\n\n setupAttributeWatchers();\n\n // Add an error spacer div after our input to provide space for the char counter and any ng-messages\n var errorsSpacer = angular.element('<div class=\"md-errors-spacer\">');\n element.after(errorsSpacer);\n\n var placeholderText = angular.isString(attr.placeholder) ? attr.placeholder.trim() : '';\n if (!containerCtrl.label && !placeholderText.length) {\n $mdAria.expect(element, 'aria-label');\n }\n\n element.addClass('md-input');\n if (!element.attr('id')) {\n element.attr('id', 'input_' + $mdUtil.nextUid());\n }\n\n // This works around a Webkit issue where number inputs, placed in a flexbox, that have\n // a `min` and `max` will collapse to about 1/3 of their proper width. Please check #7349\n // for more info. Also note that we don't override the `step` if the user has specified it,\n // in order to prevent some unexpected behaviour.\n if (tagName === 'input' && attr.type === 'number' && attr.min && attr.max && !attr.step) {\n element.attr('step', 'any');\n } else if (tagName === 'textarea') {\n setupTextarea();\n }\n\n // If the input doesn't have an ngModel, it may have a static value. For that case,\n // we have to do one initial check to determine if the container should be in the\n // \"has a value\" state.\n if (!hasNgModel) {\n inputCheckValue();\n }\n\n var isErrorGetter = containerCtrl.isErrorGetter || function() {\n return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (parentForm && parentForm.$submitted));\n };\n\n scope.$watch(isErrorGetter, containerCtrl.setInvalid);\n\n // When the developer uses the ngValue directive for the input, we have to observe the attribute, because\n // AngularJS's ngValue directive is just setting the `value` attribute.\n if (attr.ngValue) {\n attr.$observe('value', inputCheckValue);\n }\n\n ngModelCtrl.$parsers.push(ngModelPipelineCheckValue);\n ngModelCtrl.$formatters.push(ngModelPipelineCheckValue);\n\n element.on('input', inputCheckValue);\n\n if (!isReadonly) {\n element\n .on('focus', function(ev) {\n $mdUtil.nextTick(function() {\n containerCtrl.setFocused(true);\n });\n })\n .on('blur', function(ev) {\n $mdUtil.nextTick(function() {\n containerCtrl.setFocused(false);\n inputCheckValue();\n });\n });\n }\n\n scope.$on('$destroy', function() {\n containerCtrl.setFocused(false);\n containerCtrl.setHasValue(false);\n containerCtrl.input = null;\n });\n\n /** Gets run through ngModel's pipeline and set the `has-value` class on the container. */\n function ngModelPipelineCheckValue(arg) {\n containerCtrl.setHasValue(!ngModelCtrl.$isEmpty(arg));\n return arg;\n }\n\n function setupAttributeWatchers() {\n if (containerCtrl.label) {\n attr.$observe('required', function (value) {\n // We don't need to parse the required value, it's always a boolean because of AngularJS'\n // required directive.\n if (containerCtrl.label) {\n containerCtrl.label.toggleClass('md-required', value && !mdNoAsterisk);\n }\n });\n }\n }\n\n function inputCheckValue() {\n // An input's value counts if its length > 0,\n // or if the input's validity state says it has bad input (eg string in a number input)\n containerCtrl.setHasValue(element.val().length > 0 || (element[0].validity || {}).badInput);\n }\n\n function setupTextarea() {\n var isAutogrowing = !attr.hasOwnProperty('mdNoAutogrow');\n\n attachResizeHandle();\n\n if (!isAutogrowing) return;\n\n // Can't check if height was or not explicity set,\n // so rows attribute will take precedence if present\n var minRows = attr.hasOwnProperty('rows') ? parseInt(attr.rows) : NaN;\n var maxRows = attr.hasOwnProperty('maxRows') ? parseInt(attr.maxRows) : NaN;\n var scopeResizeListener = scope.$on('md-resize-textarea', growTextarea);\n var lineHeight = null;\n var node = element[0];\n\n // This timeout is necessary, because the browser needs a little bit\n // of time to calculate the `clientHeight` and `scrollHeight`.\n $timeout(function() {\n $mdUtil.nextTick(growTextarea);\n }, 10, false);\n\n // We could leverage ngModel's $parsers here, however it\n // isn't reliable, because AngularJS trims the input by default,\n // which means that growTextarea won't fire when newlines and\n // spaces are added.\n element.on('input', growTextarea);\n\n // We should still use the $formatters, because they fire when\n // the value was changed from outside the textarea.\n if (hasNgModel) {\n ngModelCtrl.$formatters.push(formattersListener);\n }\n\n if (!minRows) {\n element.attr('rows', 1);\n }\n\n angular.element($window).on('resize', growTextarea);\n scope.$on('$destroy', disableAutogrow);\n\n function growTextarea() {\n // temporarily disables element's flex so its height 'runs free'\n element\n .attr('rows', 1)\n .css('height', 'auto')\n .addClass('md-no-flex');\n\n var height = getHeight();\n\n if (!lineHeight) {\n // offsetHeight includes padding which can throw off our value\n var originalPadding = element[0].style.padding || '';\n lineHeight = element.css('padding', 0).prop('offsetHeight');\n element[0].style.padding = originalPadding;\n }\n\n if (minRows && lineHeight) {\n height = Math.max(height, lineHeight * minRows);\n }\n\n if (maxRows && lineHeight) {\n var maxHeight = lineHeight * maxRows;\n\n if (maxHeight < height) {\n element.attr('md-no-autogrow', '');\n height = maxHeight;\n } else {\n element.removeAttr('md-no-autogrow');\n }\n }\n\n if (lineHeight) {\n element.attr('rows', Math.round(height / lineHeight));\n }\n\n element\n .css('height', height + 'px')\n .removeClass('md-no-flex');\n }\n\n function getHeight() {\n var offsetHeight = node.offsetHeight;\n var line = node.scrollHeight - offsetHeight;\n return offsetHeight + Math.max(line, 0);\n }\n\n function formattersListener(value) {\n $mdUtil.nextTick(growTextarea);\n return value;\n }\n\n function disableAutogrow() {\n if (!isAutogrowing) return;\n\n isAutogrowing = false;\n angular.element($window).off('resize', growTextarea);\n scopeResizeListener && scopeResizeListener();\n element\n .attr('md-no-autogrow', '')\n .off('input', growTextarea);\n\n if (hasNgModel) {\n var listenerIndex = ngModelCtrl.$formatters.indexOf(formattersListener);\n\n if (listenerIndex > -1) {\n ngModelCtrl.$formatters.splice(listenerIndex, 1);\n }\n }\n }\n\n function attachResizeHandle() {\n if (attr.hasOwnProperty('mdNoResize')) return;\n\n var handle = angular.element('<div class=\"md-resize-handle\"></div>');\n var isDragging = false;\n var dragStart = null;\n var startHeight = 0;\n var container = containerCtrl.element;\n var dragGestureHandler = $mdGesture.register(handle, 'drag', { horizontal: false });\n\n\n element.wrap('<div class=\"md-resize-wrapper\">').after(handle);\n handle.on('mousedown', onMouseDown);\n\n container\n .on('$md.dragstart', onDragStart)\n .on('$md.drag', onDrag)\n .on('$md.dragend', onDragEnd);\n\n scope.$on('$destroy', function() {\n handle\n .off('mousedown', onMouseDown)\n .remove();\n\n container\n .off('$md.dragstart', onDragStart)\n .off('$md.drag', onDrag)\n .off('$md.dragend', onDragEnd);\n\n dragGestureHandler();\n handle = null;\n container = null;\n dragGestureHandler = null;\n });\n\n function onMouseDown(ev) {\n ev.preventDefault();\n isDragging = true;\n dragStart = ev.clientY;\n startHeight = parseFloat(element.css('height')) || element.prop('offsetHeight');\n }\n\n function onDragStart(ev) {\n if (!isDragging) return;\n ev.preventDefault();\n disableAutogrow();\n container.addClass('md-input-resized');\n }\n\n function onDrag(ev) {\n if (!isDragging) return;\n\n element.css('height', (startHeight + ev.pointer.distanceY) + 'px');\n }\n\n function onDragEnd(ev) {\n if (!isDragging) return;\n isDragging = false;\n container.removeClass('md-input-resized');\n }\n }\n\n // Attach a watcher to detect when the textarea gets shown.\n if (attr.hasOwnProperty('mdDetectHidden')) {\n\n var handleHiddenChange = function() {\n var wasHidden = false;\n\n return function() {\n var isHidden = node.offsetHeight === 0;\n\n if (isHidden === false && wasHidden === true) {\n growTextarea();\n }\n\n wasHidden = isHidden;\n };\n }();\n\n // Check every digest cycle whether the visibility of the textarea has changed.\n // Queue up to run after the digest cycle is complete.\n scope.$watch(function() {\n $mdUtil.nextTick(handleHiddenChange, false);\n return true;\n });\n }\n }\n }\n}\n\nfunction mdMaxlengthDirective($animate, $mdUtil) {\n return {\n restrict: 'A',\n require: ['ngModel', '^mdInputContainer'],\n link: postLink\n };\n\n function postLink(scope, element, attr, ctrls) {\n var maxlength = parseInt(attr.mdMaxlength);\n if (isNaN(maxlength)) maxlength = -1;\n var ngModelCtrl = ctrls[0];\n var containerCtrl = ctrls[1];\n var charCountEl, errorsSpacer;\n var ngTrim = angular.isDefined(attr.ngTrim) ? $mdUtil.parseAttributeBoolean(attr.ngTrim) : true;\n var isPasswordInput = attr.type === 'password';\n\n scope.$watch(attr.mdMaxlength, function(value) {\n maxlength = value;\n });\n\n ngModelCtrl.$validators['md-maxlength'] = function(modelValue, viewValue) {\n if (!angular.isNumber(maxlength) || maxlength < 0) {\n return true;\n }\n\n // We always update the char count, when the modelValue has changed.\n // Using the $validators for triggering the update works very well.\n renderCharCount();\n\n var elementVal = element.val() || viewValue;\n if (elementVal === undefined || elementVal === null) {\n elementVal = '';\n }\n elementVal = ngTrim && !isPasswordInput && angular.isString(elementVal) ? elementVal.trim() : elementVal;\n // Force the value into a string since it may be a number,\n // which does not have a length property.\n return String(elementVal).length <= maxlength;\n };\n\n /**\n * Override the default NgModelController $isEmpty check to take ng-trim, password inputs,\n * etc. into account.\n * @param value {*} the input's value\n * @returns {boolean} true if the input's value should be considered empty, false otherwise\n */\n ngModelCtrl.$isEmpty = function(value) {\n return calculateInputValueLength(value) === 0;\n };\n\n // Wait until the next tick to ensure that the input has setup the errors spacer where we will\n // append our counter\n $mdUtil.nextTick(function() {\n errorsSpacer = angular.element(containerCtrl.element[0].querySelector('.md-errors-spacer'));\n charCountEl = angular.element('<div class=\"md-char-counter\">');\n\n // Append our character counter inside the errors spacer\n errorsSpacer.append(charCountEl);\n\n attr.$observe('ngTrim', function (value) {\n ngTrim = angular.isDefined(value) ? $mdUtil.parseAttributeBoolean(value) : true;\n });\n\n scope.$watch(attr.mdMaxlength, function(value) {\n if (angular.isNumber(value) && value > 0) {\n if (!charCountEl.parent().length) {\n $animate.enter(charCountEl, errorsSpacer);\n }\n renderCharCount();\n } else {\n $animate.leave(charCountEl);\n }\n });\n });\n\n /**\n * Calculate the input value's length after coercing it to a string\n * and trimming it if appropriate.\n * @param value {*} the input's value\n * @returns {number} calculated length of the input's value\n */\n function calculateInputValueLength(value) {\n value = ngTrim && !isPasswordInput && angular.isString(value) ? value.trim() : value;\n if (value === undefined || value === null) {\n value = '';\n }\n return String(value).length;\n }\n\n function renderCharCount() {\n // If we have not been initialized or appended to the body yet; do not render.\n if (!charCountEl || !charCountEl.parent()) {\n return;\n }\n // Force the value into a string since it may be a number,\n // which does not have a length property.\n charCountEl.text(calculateInputValueLength(element.val()) + ' / ' + maxlength);\n }\n }\n}\n\nfunction placeholderDirective($compile) {\n return {\n restrict: 'A',\n require: '^^?mdInputContainer',\n priority: 200,\n link: {\n // Note that we need to do this in the pre-link, as opposed to the post link, if we want to\n // support data bindings in the placeholder. This is necessary, because we have a case where\n // we transfer the placeholder value to the `<label>` and we remove it from the original `<input>`.\n // If we did this in the post-link, AngularJS would have set up the observers already and would be\n // re-adding the attribute, even though we removed it from the element.\n pre: preLink\n }\n };\n\n function preLink(scope, element, attr, inputContainer) {\n // If there is no input container, just return\n if (!inputContainer) return;\n\n var label = inputContainer.element.find('label');\n var noFloat = inputContainer.element.attr('md-no-float');\n\n // If we have a label, or they specify the md-no-float attribute, just return\n if ((label && label.length) || noFloat === '' || scope.$eval(noFloat)) {\n // Add a placeholder class so we can target it in the CSS\n inputContainer.setHasPlaceholder(true);\n return;\n }\n\n // md-select handles placeholders on it's own\n if (element[0].nodeName !== 'MD-SELECT') {\n // Move the placeholder expression to the label\n var newLabel = angular.element(\n '<label ng-click=\"delegateClick()\" tabindex=\"-1\" aria-hidden=\"true\">' + attr.placeholder +\n '</label>');\n\n // Note that we unset it via `attr`, in order to get AngularJS\n // to remove any observers that it might have set up. Otherwise\n // the attribute will be added on the next digest.\n attr.$set('placeholder', null);\n\n // We need to compile the label manually in case it has any bindings.\n // A gotcha here is that we first add the element to the DOM and we compile\n // it later. This is necessary, because if we compile the element beforehand,\n // it won't be able to find the `mdInputContainer` controller.\n inputContainer.element\n .addClass('md-icon-float')\n .prepend(newLabel);\n\n $compile(newLabel)(scope);\n }\n }\n}\n\n/**\n * @ngdoc directive\n * @name mdSelectOnFocus\n * @module material.components.input\n *\n * @restrict A\n *\n * @description\n * The `md-select-on-focus` directive allows you to automatically select the element's input text on focus.\n *\n * <h3>Notes</h3>\n * - The use of `md-select-on-focus` is restricted to `<input>` and `<textarea>` elements.\n *\n * @usage\n * <h3>Using with an Input</h3>\n * <hljs lang=\"html\">\n *\n * <md-input-container>\n * <label>Auto Select</label>\n * <input type=\"text\" md-select-on-focus>\n * </md-input-container>\n * </hljs>\n *\n * <h3>Using with a Textarea</h3>\n * <hljs lang=\"html\">\n *\n * <md-input-container>\n * <label>Auto Select</label>\n * <textarea md-select-on-focus>This text will be selected on focus.</textarea>\n * </md-input-container>\n *\n * </hljs>\n */\nfunction mdSelectOnFocusDirective($document, $timeout) {\n\n return {\n restrict: 'A',\n link: postLink\n };\n\n function postLink(scope, element, attr) {\n if (element[0].nodeName !== 'INPUT' && element[0].nodeName !== \"TEXTAREA\") return;\n\n var preventMouseUp = false;\n\n element\n .on('focus', onFocus)\n .on('mouseup', onMouseUp);\n\n scope.$on('$destroy', function() {\n element\n .off('focus', onFocus)\n .off('mouseup', onMouseUp);\n });\n\n function onFocus() {\n preventMouseUp = true;\n\n $timeout(function() {\n\n // Use HTMLInputElement#select to fix firefox select issues.\n // The debounce is here for Edge's sake, otherwise the selection doesn't work.\n // Since focus may already have been lost on the input (and because `select()`\n // will re-focus), make sure the element is still active before applying.\n if ($document[0].activeElement === element[0]) {\n element[0].select();\n }\n\n // This should be reset from inside the `focus`, because the event might\n // have originated from something different than a click, e.g. a keyboard event.\n preventMouseUp = false;\n }, 1, false);\n }\n\n // Prevents the default action of the first `mouseup` after a focus.\n // This is necessary, because browsers fire a `mouseup` right after the element\n // has been focused. In some browsers (Firefox in particular) this can clear the\n // selection. There are examples of the problem in issue #7487.\n function onMouseUp(event) {\n if (preventMouseUp) {\n event.preventDefault();\n }\n }\n }\n}\n\nvar visibilityDirectives = ['ngIf', 'ngShow', 'ngHide', 'ngSwitchWhen', 'ngSwitchDefault'];\nfunction ngMessagesDirective() {\n return {\n restrict: 'EA',\n link: postLink,\n\n // This is optional because we don't want target *all* ngMessage instances, just those inside of\n // mdInputContainer.\n require: '^^?mdInputContainer'\n };\n\n function postLink(scope, element, attrs, inputContainer) {\n // If we are not a child of an input container, don't do anything\n if (!inputContainer) return;\n\n // Add our animation class\n element.toggleClass('md-input-messages-animation', true);\n\n // Add our md-auto-hide class to automatically hide/show messages when container is invalid\n element.toggleClass('md-auto-hide', true);\n\n // If we see some known visibility directives, remove the md-auto-hide class\n if (attrs.mdAutoHide == 'false' || hasVisibiltyDirective(attrs)) {\n element.toggleClass('md-auto-hide', false);\n }\n }\n\n function hasVisibiltyDirective(attrs) {\n return visibilityDirectives.some(function(attr) {\n return attrs[attr];\n });\n }\n}\n\nfunction ngMessageDirective($mdUtil) {\n return {\n restrict: 'EA',\n compile: compile,\n priority: 100\n };\n\n function compile(tElement) {\n if (!isInsideInputContainer(tElement)) {\n\n // When the current element is inside of a document fragment, then we need to check for an input-container\n // in the postLink, because the element will be later added to the DOM and is currently just in a temporary\n // fragment, which causes the input-container check to fail.\n if (isInsideFragment()) {\n return function (scope, element) {\n if (isInsideInputContainer(element)) {\n // Inside of the postLink function, a ngMessage directive will be a comment element, because it's\n // currently hidden. To access the shown element, we need to use the element from the compile function.\n initMessageElement(tElement);\n }\n };\n }\n } else {\n initMessageElement(tElement);\n }\n\n function isInsideFragment() {\n var nextNode = tElement[0];\n while (nextNode = nextNode.parentNode) {\n if (nextNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n return true;\n }\n }\n return false;\n }\n\n function isInsideInputContainer(element) {\n return !!$mdUtil.getClosest(element, \"md-input-container\");\n }\n\n function initMessageElement(element) {\n // Add our animation class\n element.toggleClass('md-input-message-animation', true);\n }\n }\n}\n\nvar $$AnimateRunner, $animateCss, $mdUtil;\n\nfunction mdInputInvalidMessagesAnimation($$AnimateRunner, $animateCss, $mdUtil) {\n saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);\n\n return {\n addClass: function(element, className, done) {\n showInputMessages(element, done);\n }\n\n // NOTE: We do not need the removeClass method, because the message ng-leave animation will fire\n };\n}\n\nfunction ngMessagesAnimation($$AnimateRunner, $animateCss, $mdUtil) {\n saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);\n\n return {\n enter: function(element, done) {\n showInputMessages(element, done);\n },\n\n leave: function(element, done) {\n hideInputMessages(element, done);\n },\n\n addClass: function(element, className, done) {\n if (className == \"ng-hide\") {\n hideInputMessages(element, done);\n } else {\n done();\n }\n },\n\n removeClass: function(element, className, done) {\n if (className == \"ng-hide\") {\n showInputMessages(element, done);\n } else {\n done();\n }\n }\n };\n}\n\nfunction ngMessageAnimation($$AnimateRunner, $animateCss, $mdUtil, $log) {\n saveSharedServices($$AnimateRunner, $animateCss, $mdUtil, $log);\n\n return {\n enter: function(element, done) {\n var animator = showMessage(element);\n\n animator.start().done(done);\n },\n\n leave: function(element, done) {\n var animator = hideMessage(element);\n\n animator.start().done(done);\n }\n };\n}\n\nfunction showInputMessages(element, done) {\n var animators = [], animator;\n var messages = getMessagesElement(element);\n var children = messages.children();\n\n if (messages.length == 0 || children.length == 0) {\n done();\n return;\n }\n\n angular.forEach(children, function(child) {\n animator = showMessage(angular.element(child));\n\n animators.push(animator.start());\n });\n\n $$AnimateRunner.all(animators, done);\n}\n\nfunction hideInputMessages(element, done) {\n var animators = [], animator;\n var messages = getMessagesElement(element);\n var children = messages.children();\n\n if (messages.length == 0 || children.length == 0) {\n done();\n return;\n }\n\n angular.forEach(children, function(child) {\n animator = hideMessage(angular.element(child));\n\n animators.push(animator.start());\n });\n\n $$AnimateRunner.all(animators, done);\n}\n\nfunction showMessage(element) {\n var height = parseInt(window.getComputedStyle(element[0]).height);\n var topMargin = parseInt(window.getComputedStyle(element[0]).marginTop);\n\n var messages = getMessagesElement(element);\n var container = getInputElement(element);\n\n // Check to see if the message is already visible so we can skip\n var alreadyVisible = (topMargin > -height);\n\n // If we have the md-auto-hide class, the md-input-invalid animation will fire, so we can skip\n if (alreadyVisible || (messages.hasClass('md-auto-hide') && !container.hasClass('md-input-invalid'))) {\n return $animateCss(element, {});\n }\n\n return $animateCss(element, {\n event: 'enter',\n structural: true,\n from: {\"opacity\": 0, \"margin-top\": -height + \"px\"},\n to: {\"opacity\": 1, \"margin-top\": \"0\"},\n duration: 0.3\n });\n}\n\nfunction hideMessage(element) {\n var height = element[0].offsetHeight;\n var styles = window.getComputedStyle(element[0]);\n\n // If we are already hidden, just return an empty animation\n if (parseInt(styles.opacity) === 0) {\n return $animateCss(element, {});\n }\n\n // Otherwise, animate\n return $animateCss(element, {\n event: 'leave',\n structural: true,\n from: {\"opacity\": 1, \"margin-top\": 0},\n to: {\"opacity\": 0, \"margin-top\": -height + \"px\"},\n duration: 0.3\n });\n}\n\nfunction getInputElement(element) {\n var inputContainer = element.controller('mdInputContainer');\n\n return inputContainer.element;\n}\n\nfunction getMessagesElement(element) {\n // If we ARE the messages element, just return ourself\n if (element.hasClass('md-input-messages-animation')) {\n return element;\n }\n\n // If we are a ng-message element, we need to traverse up the DOM tree\n if (element.hasClass('md-input-message-animation')) {\n return angular.element($mdUtil.getClosest(element, function(node) {\n return node.classList.contains('md-input-messages-animation');\n }));\n }\n\n // Otherwise, we can traverse down\n return angular.element(element[0].querySelector('.md-input-messages-animation'));\n}\n\nfunction saveSharedServices(_$$AnimateRunner_, _$animateCss_, _$mdUtil_) {\n $$AnimateRunner = _$$AnimateRunner_;\n $animateCss = _$animateCss_;\n $mdUtil = _$mdUtil_;\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.list\n * @description\n * List module\n */\nMdListController.$inject = [\"$scope\", \"$element\", \"$mdListInkRipple\"];\nmdListDirective.$inject = [\"$mdTheming\"];\nmdListItemDirective.$inject = [\"$mdAria\", \"$mdConstant\", \"$mdUtil\", \"$timeout\"];\nangular.module('material.components.list', [\n 'material.core'\n])\n .controller('MdListController', MdListController)\n .directive('mdList', mdListDirective)\n .directive('mdListItem', mdListItemDirective);\n\n/**\n * @ngdoc directive\n * @name mdList\n * @module material.components.list\n *\n * @restrict E\n *\n * @description\n * The `<md-list>` directive is a list container for 1..n `<md-list-item>` tags.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-list>\n * <md-list-item class=\"md-2-line\" ng-repeat=\"item in todos\">\n * <md-checkbox ng-model=\"item.done\"></md-checkbox>\n * <div class=\"md-list-item-text\">\n * <h3>{{item.title}}</h3>\n * <p>{{item.description}}</p>\n * </div>\n * </md-list-item>\n * </md-list>\n * </hljs>\n */\n\nfunction mdListDirective($mdTheming) {\n return {\n restrict: 'E',\n compile: function(tEl) {\n tEl[0].setAttribute('role', 'list');\n return $mdTheming;\n }\n };\n}\n/**\n * @ngdoc directive\n * @name mdListItem\n * @module material.components.list\n *\n * @restrict E\n *\n * @description\n * A `md-list-item` element can be used to represent some information in a row.<br/>\n *\n * @usage\n * ### Single Row Item\n * <hljs lang=\"html\">\n * <md-list-item>\n * <span>Single Row Item</span>\n * </md-list-item>\n * </hljs>\n *\n * ### Multiple Lines\n * By using the following markup, you will be able to have two lines inside of one `md-list-item`.\n *\n * <hljs lang=\"html\">\n * <md-list-item class=\"md-2-line\">\n * <div class=\"md-list-item-text\" layout=\"column\">\n * <p>First Line</p>\n * <p>Second Line</p>\n * </div>\n * </md-list-item>\n * </hljs>\n *\n * It is also possible to have three lines inside of one list item.\n *\n * <hljs lang=\"html\">\n * <md-list-item class=\"md-3-line\">\n * <div class=\"md-list-item-text\" layout=\"column\">\n * <p>First Line</p>\n * <p>Second Line</p>\n * <p>Third Line</p>\n * </div>\n * </md-list-item>\n * </hljs>\n *\n * ### Secondary Items\n * Secondary items are elements which will be aligned at the end of the `md-list-item`.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <span>Single Row Item</span>\n * <md-button class=\"md-secondary\">\n * Secondary Button\n * </md-button>\n * </md-list-item>\n * </hljs>\n *\n * It also possible to have multiple secondary items inside of one `md-list-item`.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <span>Single Row Item</span>\n * <md-button class=\"md-secondary\">First Button</md-button>\n * <md-button class=\"md-secondary\">Second Button</md-button>\n * </md-list-item>\n * </hljs>\n *\n * ### Proxy Item\n * Proxies are elements, which will execute their specific action on click<br/>\n * Currently supported proxy items are\n * - `md-checkbox` (Toggle)\n * - `md-switch` (Toggle)\n * - `md-menu` (Open)\n *\n * This means, when using a supported proxy item inside of `md-list-item`, the list item will\n * automatically become clickable and executes the associated action of the proxy element on click.\n *\n * It is possible to disable this behavior by applying the `md-no-proxy` class to the list item.\n *\n * <hljs lang=\"html\">\n * <md-list-item class=\"md-no-proxy\">\n * <span>No Proxy List</span>\n * <md-checkbox class=\"md-secondary\"></md-checkbox>\n * </md-list-item>\n * </hljs>\n *\n * Here are a few examples of proxy elements inside of a list item.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <span>First Line</span>\n * <md-checkbox class=\"md-secondary\"></md-checkbox>\n * </md-list-item>\n * </hljs>\n *\n * The `md-checkbox` element will be automatically detected as a proxy element and will toggle on\n * click.\n *\n * If not provided, an `aria-label` will be applied using the text of the list item.\n * In this case, the following will be applied to the `md-checkbox`:\n * `aria-label=\"Toggle First Line\"`.\n * When localizing your application, you should supply a localized `aria-label`.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <span>First Line</span>\n * <md-switch class=\"md-secondary\"></md-switch>\n * </md-list-item>\n * </hljs>\n *\n * The recognized `md-switch` will toggle its state, when the user clicks on the `md-list-item`.\n *\n * It is also possible to have a `md-menu` inside of a `md-list-item`.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <p>Click anywhere to fire the secondary action</p>\n * <md-menu class=\"md-secondary\">\n * <md-button class=\"md-icon-button\">\n * <md-icon md-svg-icon=\"communication:message\"></md-icon>\n * </md-button>\n * <md-menu-content width=\"4\">\n * <md-menu-item>\n * <md-button>\n * Redial\n * </md-button>\n * </md-menu-item>\n * <md-menu-item>\n * <md-button>\n * Check voicemail\n * </md-button>\n * </md-menu-item>\n * <md-menu-divider></md-menu-divider>\n * <md-menu-item>\n * <md-button>\n * Notifications\n * </md-button>\n * </md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </md-list-item>\n * </hljs>\n *\n * The menu will automatically open, when the users clicks on the `md-list-item`.<br/>\n *\n * If the developer didn't specify any position mode on the menu, the `md-list-item` will\n * automatically detect the position mode and apply it to the `md-menu`.\n *\n * ### Avatars\n * Sometimes you may want to have avatars inside of the `md-list-item `.<br/>\n * You are able to create an optimized icon for the list item, by applying the `.md-avatar` class on\n * the `<img>` element.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <img src=\"my-avatar.png\" class=\"md-avatar\">\n * <span>Alan Turing</span>\n * </hljs>\n *\n * When using `<md-icon>` for an avatar, you have to use the `.md-avatar-icon` class.\n *\n * <hljs lang=\"html\">\n * <md-list-item>\n * <md-icon class=\"md-avatar-icon\" md-svg-icon=\"social:person\"></md-icon>\n * <span>Timothy Kopra</span>\n * </md-list-item>\n * </hljs>\n *\n * In cases where you have a `md-list-item`, which doesn't have an avatar,\n * but you want to align it with the other avatar items, you need to use the `.md-offset` class.\n *\n * <hljs lang=\"html\">\n * <md-list-item class=\"md-offset\">\n * <span>Jon Doe</span>\n * </md-list-item>\n * </hljs>\n *\n * ### DOM modification\n * The `md-list-item` component automatically detects if the list item should be clickable.\n *\n * ---\n * If the `md-list-item` is clickable, we wrap all content inside of a `<div>` and create\n * an overlaying button, which will will execute the given actions (like `ng-href`, `ng-click`).\n *\n * We create an overlaying button, instead of wrapping all content inside of the button,\n * because otherwise some elements may not be clickable inside of the button.\n *\n * ---\n * When using a secondary item inside of your list item, the `md-list-item` component will\n * automatically create a secondary container at the end of the `md-list-item`, which contains all\n * secondary items.\n *\n * The secondary item container is not static, because that would cause issues with the overflow\n * of the list item.\n */\nfunction mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {\n var proxiedTypes = ['md-checkbox', 'md-switch', 'md-menu'];\n return {\n restrict: 'E',\n controller: 'MdListController',\n\n compile: function(tElement, tAttrs) {\n\n // Check for proxy controls (no ng-click on parent, and a control inside)\n var secondaryItems = tElement[0].querySelectorAll('.md-secondary');\n var hasProxiedElement;\n var proxyElement;\n var itemContainer = tElement;\n\n tElement[0].setAttribute('role', 'listitem');\n\n if (tAttrs.ngClick || tAttrs.ngDblclick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {\n wrapIn('button');\n } else if (!tElement.hasClass('md-no-proxy')) {\n\n for (var i = 0, type; i < proxiedTypes.length; ++i) {\n proxyElement = tElement[0].querySelector(proxiedTypes[i]);\n if (proxyElement !== null) {\n hasProxiedElement = true;\n break;\n }\n }\n\n if (hasProxiedElement) {\n wrapIn('div');\n } else {\n tElement.addClass('md-no-proxy');\n }\n }\n\n wrapSecondaryItems();\n setupToggleAria();\n\n if (hasProxiedElement && proxyElement.nodeName === \"MD-MENU\") {\n setupProxiedMenu();\n }\n\n function setupToggleAria() {\n var toggleTypes = ['md-switch', 'md-checkbox'];\n var toggle;\n\n for (var i = 0, toggleType; i < toggleTypes.length; ++i) {\n toggle = tElement.find(toggleTypes[i])[0];\n if (toggle) {\n if (!toggle.hasAttribute('aria-label')) {\n var labelElement = tElement.find('p')[0];\n if (!labelElement) {\n labelElement = tElement.find('span')[0];\n }\n if (!labelElement) return;\n toggle.setAttribute('aria-label', 'Toggle ' + labelElement.textContent);\n }\n }\n }\n }\n\n function setupProxiedMenu() {\n var menuEl = angular.element(proxyElement);\n\n var isEndAligned = menuEl.parent().hasClass('md-secondary-container') ||\n proxyElement.parentNode.firstElementChild !== proxyElement;\n\n var xAxisPosition = 'left';\n\n if (isEndAligned) {\n // When the proxy item is aligned at the end of the list, we have to set the origin to the end.\n xAxisPosition = 'right';\n }\n\n // Set the position mode / origin of the proxied menu.\n if (!menuEl.attr('md-position-mode')) {\n menuEl.attr('md-position-mode', xAxisPosition + ' target');\n }\n\n // Apply menu open binding to menu button\n var menuOpenButton = menuEl.children().eq(0);\n if (!hasClickEvent(menuOpenButton[0])) {\n menuOpenButton.attr('ng-click', '$mdMenu.open($event)');\n }\n\n if (!menuOpenButton.attr('aria-label')) {\n menuOpenButton.attr('aria-label', 'Open List Menu');\n }\n }\n\n /**\n * @param {'div'|'button'} type\n */\n function wrapIn(type) {\n if (type === 'div') {\n itemContainer = angular.element('<div class=\"md-no-style md-list-item-inner\">');\n itemContainer.append(tElement.contents());\n tElement.addClass('md-proxy-focus');\n } else {\n // Element which holds the default list-item content.\n itemContainer = angular.element(\n '<div class=\"md-button md-no-style\">' +\n ' <div class=\"md-list-item-inner\"></div>' +\n '</div>'\n );\n\n // Button which shows ripple and executes primary action.\n var buttonWrap = angular.element('<md-button class=\"md-no-style\"></md-button>');\n\n moveAttributes(tElement[0], buttonWrap[0]);\n\n // If there is no aria-label set on the button (previously copied over if present)\n // we determine the label from the content and copy it to the button.\n if (!buttonWrap.attr('aria-label')) {\n buttonWrap.attr('aria-label', $mdAria.getText(tElement));\n\n // If we set the button's aria-label to the text content, then make the content hidden\n // from screen readers so that it isn't read/traversed twice.\n var listItemInner = itemContainer[0].querySelector('.md-list-item-inner');\n if (listItemInner) {\n listItemInner.setAttribute('aria-hidden', 'true');\n }\n }\n\n // We allow developers to specify the `md-no-focus` class, to disable the focus style\n // on the button executor. Once more classes should be forwarded, we should probably make\n // the class forward more generic.\n if (tElement.hasClass('md-no-focus')) {\n buttonWrap.addClass('md-no-focus');\n }\n\n // Append the button wrap before our list-item content, because it will overlay in\n // relative.\n itemContainer.prepend(buttonWrap);\n itemContainer.children().eq(1).append(tElement.contents());\n\n tElement.addClass('_md-button-wrap');\n }\n\n tElement[0].setAttribute('tabindex', '-1');\n tElement.append(itemContainer);\n }\n\n function wrapSecondaryItems() {\n var secondaryItemsWrapper = angular.element('<div class=\"md-secondary-container\">');\n\n angular.forEach(secondaryItems, function(secondaryItem) {\n wrapSecondaryItem(secondaryItem, secondaryItemsWrapper);\n });\n\n itemContainer.append(secondaryItemsWrapper);\n }\n\n /**\n * @param {HTMLElement} secondaryItem\n * @param {HTMLDivElement} container\n */\n function wrapSecondaryItem(secondaryItem, container) {\n // If the current secondary item is not a button, but contains a ng-click attribute,\n // the secondary item will be automatically wrapped inside of a button.\n if (secondaryItem && !isButton(secondaryItem) && secondaryItem.hasAttribute('ng-click')) {\n\n $mdAria.expect(secondaryItem, 'aria-label');\n var buttonWrapper = angular.element('<md-button class=\"md-secondary md-icon-button\">');\n\n // Move the attributes from the secondary item to the generated button.\n // We also support some additional attributes from the secondary item,\n // because some developers may use a ngIf, ngHide, ngShow on their item.\n moveAttributes(secondaryItem, buttonWrapper[0], ['ng-if', 'ng-hide', 'ng-show']);\n\n secondaryItem.setAttribute('tabindex', '-1');\n buttonWrapper.append(secondaryItem);\n\n secondaryItem = buttonWrapper[0];\n }\n\n if (secondaryItem &&\n (!hasClickEvent(secondaryItem) ||\n (!tAttrs.ngClick && isProxiedElement(secondaryItem)))) {\n // In this case we remove the secondary class, so we can identify it later, when searching\n // for the proxy items.\n angular.element(secondaryItem).removeClass('md-secondary');\n }\n\n tElement.addClass('md-with-secondary');\n container.append(secondaryItem);\n }\n\n /**\n * Moves attributes from a source element to the destination element.\n * By default, the function will copy the most necessary attributes, supported\n * by the button executor for clickable list items.\n * @param {Element} source Element with the specified attributes\n * @param {Element} destination Element which will receive the attributes\n * @param {string|string[]} extraAttrs Additional attributes, which will be moved over\n */\n function moveAttributes(source, destination, extraAttrs) {\n var copiedAttrs = $mdUtil.prefixer([\n 'ng-if', 'ng-click', 'ng-dblclick', 'aria-label', 'ng-disabled', 'ui-sref',\n 'href', 'ng-href', 'rel', 'target', 'ng-attr-ui-sref', 'ui-sref-opts', 'download'\n ]);\n\n if (extraAttrs) {\n copiedAttrs = copiedAttrs.concat($mdUtil.prefixer(extraAttrs));\n }\n\n angular.forEach(copiedAttrs, function(attr) {\n if (source.hasAttribute(attr)) {\n destination.setAttribute(attr, source.getAttribute(attr));\n source.removeAttribute(attr);\n }\n });\n }\n\n /**\n * @param {HTMLElement} element\n * @return {boolean} true if the element has one of the proxied tags, false otherwise\n */\n function isProxiedElement(element) {\n return proxiedTypes.indexOf(element.nodeName.toLowerCase()) !== -1;\n }\n\n /**\n * @param {HTMLElement} element\n * @return {boolean} true if the element is a button or md-button, false otherwise\n */\n function isButton(element) {\n var nodeName = element.nodeName.toUpperCase();\n\n return nodeName === \"MD-BUTTON\" || nodeName === \"BUTTON\";\n }\n\n /**\n * @param {Element} element\n * @return {boolean} true if the element has an ng-click attribute, false otherwise\n */\n function hasClickEvent(element) {\n var attr = element.attributes;\n for (var i = 0; i < attr.length; i++) {\n if (tAttrs.$normalize(attr[i].name) === 'ngClick') {\n return true;\n }\n }\n return false;\n }\n\n return postLink;\n\n function postLink($scope, $element, $attr, ctrl) {\n $element.addClass('_md'); // private md component indicator for styling\n\n var proxies = [],\n firstElement = $element[0].firstElementChild,\n isButtonWrap = $element.hasClass('_md-button-wrap'),\n clickChild = isButtonWrap ? firstElement.firstElementChild : firstElement,\n hasClick = clickChild && hasClickEvent(clickChild),\n noProxies = $element.hasClass('md-no-proxy');\n\n computeProxies();\n computeClickable();\n\n if (proxies.length) {\n angular.forEach(proxies, function(proxy) {\n proxy = angular.element(proxy);\n\n $scope.mouseActive = false;\n proxy.on('mousedown', function() {\n $scope.mouseActive = true;\n $timeout(function() {\n $scope.mouseActive = false;\n }, 100);\n })\n .on('focus', function() {\n if ($scope.mouseActive === false) { $element.addClass('md-focused'); }\n proxy.on('blur', function proxyOnBlur() {\n $element.removeClass('md-focused');\n proxy.off('blur', proxyOnBlur);\n });\n });\n });\n }\n\n function computeProxies() {\n if (firstElement && firstElement.children && !hasClick && !noProxies) {\n\n angular.forEach(proxiedTypes, function(type) {\n // All elements which are not capable of being used as a proxy have the .md-secondary\n // class applied. These items were identified in the secondary wrap function.\n angular.forEach(firstElement.querySelectorAll(type + ':not(.md-secondary)'), function(child) {\n proxies.push(child);\n });\n });\n }\n }\n\n function computeClickable() {\n if (proxies.length === 1 || hasClick) {\n $element.addClass('md-clickable');\n\n if (!hasClick) {\n ctrl.attachRipple($scope, angular.element($element[0].querySelector('.md-no-style')));\n }\n }\n }\n\n /**\n * @param {MouseEvent} event\n * @return {boolean}\n */\n function isEventFromControl(event) {\n var forbiddenControls = ['md-slider'];\n var eventBubblePath = $mdUtil.getEventPath(event);\n\n // If there is no bubble path, then the event was not bubbled.\n if (!eventBubblePath || eventBubblePath.length === 0) {\n return forbiddenControls.indexOf(event.target.tagName.toLowerCase()) !== -1;\n }\n\n // We iterate the event bubble path up and check for a possible component.\n // Our maximum index to search, is the list item root.\n var maxPath = eventBubblePath.indexOf($element.children()[0]);\n\n for (var i = 0; i < maxPath; i++) {\n if (forbiddenControls.indexOf(eventBubblePath[i].tagName.toLowerCase()) !== -1) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {KeyboardEvent} keypressEvent\n */\n var clickChildKeypressListener = function(keypressEvent) {\n if (keypressEvent.target.nodeName !== 'INPUT' &&\n keypressEvent.target.nodeName !== 'TEXTAREA' &&\n !keypressEvent.target.isContentEditable) {\n var keyCode = keypressEvent.which || keypressEvent.keyCode;\n if (keyCode === $mdConstant.KEY_CODE.SPACE) {\n if (clickChild) {\n clickChild.click();\n keypressEvent.preventDefault();\n keypressEvent.stopPropagation();\n }\n }\n }\n };\n\n if (!hasClick && !proxies.length) {\n clickChild && clickChild.addEventListener('keypress', clickChildKeypressListener);\n }\n\n $element.off('click');\n $element.off('keypress');\n // Disable ng-aria's \"helpful\" keydown event that causes our ng-click handlers to be called\n // twice.\n $element.off('keydown');\n\n if (proxies.length === 1 && clickChild) {\n $element.children().eq(0).on('click', function(clickEvent) {\n // When the event is coming from a control and it should not trigger the proxied element\n // then we are skipping.\n if (isEventFromControl(clickEvent)) return;\n\n var parentButton = $mdUtil.getClosest(clickEvent.target, 'BUTTON');\n if (!parentButton && clickChild.contains(clickEvent.target)) {\n angular.forEach(proxies, function(proxy) {\n if (clickEvent.target !== proxy && !proxy.contains(clickEvent.target)) {\n if (proxy.nodeName === 'MD-MENU') {\n proxy = proxy.children[0];\n }\n angular.element(proxy).triggerHandler('click');\n }\n });\n }\n });\n }\n\n $scope.$on('$destroy', function () {\n clickChild && clickChild.removeEventListener('keypress', clickChildKeypressListener);\n });\n }\n }\n };\n}\n\n/*\n * @private\n * @ngdoc controller\n * @name MdListController\n * @module material.components.list\n */\nfunction MdListController($scope, $element, $mdListInkRipple) {\n var ctrl = this;\n ctrl.attachRipple = attachRipple;\n\n function attachRipple (scope, element) {\n var options = {};\n $mdListInkRipple.attach(scope, element, options);\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.menu\n */\n\nangular.module('material.components.menu', [\n 'material.core',\n 'material.components.backdrop'\n]);\n\n})();\n(function(){\n\"use strict\";\n\n\n\nMenuController.$inject = [\"$mdMenu\", \"$attrs\", \"$element\", \"$scope\", \"$mdUtil\", \"$timeout\", \"$rootScope\", \"$q\", \"$log\"];\nangular\n .module('material.components.menu')\n .controller('mdMenuCtrl', MenuController);\n\n/**\n * @ngInject\n */\nfunction MenuController($mdMenu, $attrs, $element, $scope, $mdUtil, $timeout, $rootScope, $q, $log) {\n\n var prefixer = $mdUtil.prefixer();\n var menuContainer;\n var self = this;\n var triggerElement;\n\n this.nestLevel = parseInt($attrs.mdNestLevel, 10) || 0;\n\n /**\n * Called by our linking fn to provide access to the menu-content\n * element removed during link\n */\n this.init = function init(setMenuContainer, opts) {\n opts = opts || {};\n menuContainer = setMenuContainer;\n\n // Default element for ARIA attributes has the ngClick or ngMouseenter expression\n triggerElement = $element[0].querySelector(prefixer.buildSelector(['ng-click', 'ng-mouseenter']));\n triggerElement.setAttribute('aria-expanded', 'false');\n\n this.isInMenuBar = opts.isInMenuBar;\n this.mdMenuBarCtrl = opts.mdMenuBarCtrl;\n this.nestedMenus = $mdUtil.nodesToArray(menuContainer[0].querySelectorAll('.md-nested-menu'));\n\n menuContainer.on('$mdInterimElementRemove', function() {\n self.isOpen = false;\n $mdUtil.nextTick(function(){ self.onIsOpenChanged(self.isOpen);});\n });\n $mdUtil.nextTick(function(){ self.onIsOpenChanged(self.isOpen);});\n\n var menuContainerId = 'menu_container_' + $mdUtil.nextUid();\n menuContainer.attr('id', menuContainerId);\n angular.element(triggerElement).attr({\n 'aria-owns': menuContainerId,\n 'aria-haspopup': 'true'\n });\n\n $scope.$on('$destroy', angular.bind(this, function() {\n this.disableHoverListener();\n $mdMenu.destroy();\n }));\n\n menuContainer.on('$destroy', function() {\n $mdMenu.destroy();\n });\n };\n\n var openMenuTimeout, menuItems, deregisterScopeListeners = [];\n this.enableHoverListener = function() {\n deregisterScopeListeners.push($rootScope.$on('$mdMenuOpen', function(event, el) {\n if (menuContainer[0].contains(el[0])) {\n self.currentlyOpenMenu = el.controller('mdMenu');\n self.isAlreadyOpening = false;\n self.currentlyOpenMenu.registerContainerProxy(self.triggerContainerProxy.bind(self));\n }\n }));\n deregisterScopeListeners.push($rootScope.$on('$mdMenuClose', function(event, el) {\n if (menuContainer[0].contains(el[0])) {\n self.currentlyOpenMenu = undefined;\n }\n }));\n menuItems = angular.element($mdUtil.nodesToArray(menuContainer[0].children[0].children));\n menuItems.on('mouseenter', self.handleMenuItemHover);\n menuItems.on('mouseleave', self.handleMenuItemMouseLeave);\n };\n\n this.disableHoverListener = function() {\n while (deregisterScopeListeners.length) {\n deregisterScopeListeners.shift()();\n }\n menuItems && menuItems.off('mouseenter', self.handleMenuItemHover);\n menuItems && menuItems.off('mouseleave', self.handleMenuItemMouseLeave);\n };\n\n this.handleMenuItemHover = function(event) {\n if (self.isAlreadyOpening) return;\n var nestedMenu = (\n event.target.querySelector('md-menu')\n || $mdUtil.getClosest(event.target, 'MD-MENU')\n );\n openMenuTimeout = $timeout(function() {\n if (nestedMenu) {\n nestedMenu = angular.element(nestedMenu).controller('mdMenu');\n }\n\n if (self.currentlyOpenMenu && self.currentlyOpenMenu != nestedMenu) {\n var closeTo = self.nestLevel + 1;\n self.currentlyOpenMenu.close(true, { closeTo: closeTo });\n self.isAlreadyOpening = !!nestedMenu;\n nestedMenu && nestedMenu.open();\n } else if (nestedMenu && !nestedMenu.isOpen && nestedMenu.open) {\n self.isAlreadyOpening = !!nestedMenu;\n nestedMenu && nestedMenu.open();\n }\n }, nestedMenu ? 100 : 250);\n var focusableTarget = event.currentTarget.querySelector('.md-button:not([disabled])');\n focusableTarget && focusableTarget.focus();\n };\n\n this.handleMenuItemMouseLeave = function() {\n if (openMenuTimeout) {\n $timeout.cancel(openMenuTimeout);\n openMenuTimeout = undefined;\n }\n };\n\n\n /**\n * Uses the $mdMenu interim element service to open the menu contents\n */\n this.open = function openMenu(ev) {\n ev && ev.stopPropagation();\n ev && ev.preventDefault();\n if (self.isOpen) return;\n self.enableHoverListener();\n self.isOpen = true;\n $mdUtil.nextTick(function(){ self.onIsOpenChanged(self.isOpen);});\n triggerElement = triggerElement || (ev ? ev.target : $element[0]);\n triggerElement.setAttribute('aria-expanded', 'true');\n $scope.$emit('$mdMenuOpen', $element);\n $mdMenu.show({\n scope: $scope,\n mdMenuCtrl: self,\n nestLevel: self.nestLevel,\n element: menuContainer,\n target: triggerElement,\n preserveElement: true,\n parent: 'body'\n }).finally(function() {\n triggerElement.setAttribute('aria-expanded', 'false');\n self.disableHoverListener();\n });\n };\n\n this.onIsOpenChanged = function(isOpen) {\n if (isOpen) {\n menuContainer.attr('aria-hidden', 'false');\n $element[0].classList.add('md-open');\n angular.forEach(self.nestedMenus, function(el) {\n el.classList.remove('md-open');\n });\n } else {\n menuContainer.attr('aria-hidden', 'true');\n $element[0].classList.remove('md-open');\n }\n $scope.$mdMenuIsOpen = self.isOpen;\n };\n\n this.focusMenuContainer = function focusMenuContainer() {\n var focusTarget = menuContainer[0]\n .querySelector(prefixer.buildSelector(['md-menu-focus-target', 'md-autofocus']));\n\n if (!focusTarget) focusTarget = menuContainer[0].querySelector('.md-button:not([disabled])');\n focusTarget.focus();\n };\n\n this.registerContainerProxy = function registerContainerProxy(handler) {\n this.containerProxy = handler;\n };\n\n this.triggerContainerProxy = function triggerContainerProxy(ev) {\n this.containerProxy && this.containerProxy(ev);\n };\n\n this.destroy = function() {\n return self.isOpen ? $mdMenu.destroy() : $q.when(false);\n };\n\n // Use the $mdMenu interim element service to close the menu contents\n this.close = function closeMenu(skipFocus, closeOpts) {\n if (!self.isOpen) return;\n self.isOpen = false;\n $mdUtil.nextTick(function(){ self.onIsOpenChanged(self.isOpen);});\n\n var eventDetails = angular.extend({}, closeOpts, { skipFocus: skipFocus });\n $scope.$emit('$mdMenuClose', $element, eventDetails);\n $mdMenu.hide(null, closeOpts);\n\n if (!skipFocus) {\n var el = self.restoreFocusTo || $element.find('button')[0];\n if (el instanceof angular.element) el = el[0];\n if (el) el.focus();\n }\n };\n\n /**\n * Build a nice object out of our string attribute which specifies the\n * target mode for left and top positioning\n */\n this.positionMode = function positionMode() {\n var attachment = ($attrs.mdPositionMode || 'target').split(' ');\n\n // If attachment is a single item, duplicate it for our second value.\n // ie. 'target' -> 'target target'\n if (attachment.length === 1) {\n attachment.push(attachment[0]);\n }\n\n return {\n left: attachment[0],\n top: attachment[1]\n };\n };\n\n /**\n * Build a nice object out of our string attribute which specifies\n * the offset of top and left in pixels.\n */\n this.offsets = function offsets() {\n var position = ($attrs.mdOffset || '0 0').split(' ').map(parseFloat);\n if (position.length === 2) {\n return {\n left: position[0],\n top: position[1]\n };\n } else if (position.length === 1) {\n return {\n top: position[0],\n left: position[0]\n };\n } else {\n throw Error('Invalid offsets specified. Please follow format <x, y> or <n>');\n }\n };\n\n // Functionality that is exposed in the view.\n $scope.$mdMenu = {\n open: this.open,\n close: this.close\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc directive\n * @name mdMenu\n * @module material.components.menu\n * @restrict E\n * @description\n *\n * Menus are elements that open when clicked. They are useful for displaying\n * additional options within the context of an action.\n *\n * Every `md-menu` must specify exactly two child elements. The first element is what is\n * left in the DOM and is used to open the menu. This element is called the trigger element.\n * The trigger element's scope has access to `$mdMenu.open($event)`\n * which it may call to open the menu. By passing $event as argument, the\n * corresponding event is stopped from propagating up the DOM-tree. Similarly, `$mdMenu.close()`\n * can be used to close the menu.\n *\n * The second element is the `md-menu-content` element which represents the\n * contents of the menu when it is open. Typically this will contain `md-menu-item`s,\n * but you can do custom content as well.\n *\n * <hljs lang=\"html\">\n * <md-menu>\n * <!-- Trigger element is a md-button with an icon -->\n * <md-button ng-click=\"$mdMenu.open($event)\" class=\"md-icon-button\" aria-label=\"Open sample menu\">\n * <md-icon md-svg-icon=\"call:phone\"></md-icon>\n * </md-button>\n * <md-menu-content>\n * <md-menu-item><md-button ng-click=\"doSomething()\">Do Something</md-button></md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </hljs>\n\n * ## Sizing Menus\n *\n * The width of the menu when it is open may be specified by specifying a `width`\n * attribute on the `md-menu-content` element.\n * See the [Material Design Spec](https://material.io/archive/guidelines/components/menus.html#menus-simple-menus)\n * for more information.\n *\n * ## Menu Density\n *\n * You can use dense menus by adding the `md-dense` class to the `md-menu-content` element.\n * This reduces the height of menu items, their top and bottom padding, and default font size.\n * Without the `md-dense` class, we use the \"mobile\" height of `48px`. With the `md-dense` class,\n * we use the \"desktop\" height of `32px`. We do not support the \"dense desktop\" option in the spec,\n * which uses a height of `24px`, at this time.\n * See the [Menu Specs](https://material.io/archive/guidelines/components/menus.html#menus-specs)\n * section of the Material Design Spec for more information.\n *\n * ## Aligning Menus\n *\n * When a menu opens, it is important that the content aligns with the trigger element.\n * Failure to align menus can result in jarring experiences for users as content\n * suddenly shifts. To help with this, `md-menu` provides several APIs to help\n * with alignment.\n *\n * ### Target Mode\n *\n * By default, `md-menu` will attempt to align the `md-menu-content` by aligning\n * designated child elements in both the trigger and the menu content.\n *\n * To specify the alignment element in the `trigger` you can use the `md-menu-origin`\n * attribute on a child element. If no `md-menu-origin` is specified, the `md-menu`\n * will be used as the origin element.\n *\n * Similarly, the `md-menu-content` may specify a `md-menu-align-target` for a\n * `md-menu-item` to specify the node that it should try and align with.\n *\n * In this example code, we specify an icon to be our origin element, and an\n * icon in our menu content to be our alignment target. This ensures that both\n * icons are aligned when the menu opens.\n *\n * <hljs lang=\"html\">\n * <md-menu>\n * <md-button ng-click=\"$mdMenu.open($event)\" class=\"md-icon-button\" aria-label=\"Open some menu\">\n * <md-icon md-menu-origin md-svg-icon=\"call:phone\"></md-icon>\n * </md-button>\n * <md-menu-content>\n * <md-menu-item>\n * <md-button ng-click=\"doSomething()\" aria-label=\"Do something\">\n * <md-icon md-menu-align-target md-svg-icon=\"call:phone\"></md-icon>\n * Do Something\n * </md-button>\n * </md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </hljs>\n *\n * ### Position Mode\n *\n * We can specify the origin of the menu by using the `md-position-mode` attribute.\n * This attribute allows specifying the positioning by the `x` and `y` axes.\n *\n * The default mode is `target target`. This mode uses the left and top edges of the origin element\n * to position the menu in LTR layouts. The `x` axis modes will adjust when in RTL layouts.\n *\n * Sometimes you want to specify alignment from the right side of a origin element. For example,\n * if we have a menu on the right side a toolbar, we may want to right align our menu content.\n * We can use `target-right target` to specify a right-oriented alignment target.\n * There is a working example of this in the Menu Position Modes demo.\n *\n * #### Horizontal Positioning Options\n * - `target`\n * - `target-left`\n * - `target-right`\n * - `cascade`\n * - `right`\n * - `left`\n *\n * #### Vertical Positioning Options\n * - `target`\n * - `cascade`\n * - `bottom`\n *\n * ### Menu Offsets\n *\n * It is sometimes unavoidable to need to have a deeper level of control for\n * the positioning of a menu to ensure perfect alignment. `md-menu` provides\n * the `md-offset` attribute to allow pixel-level specificity when adjusting\n * menu positioning.\n *\n * This offset is provided in the format of `x y` or `n` where `n` will be used\n * in both the `x` and `y` axis.\n * For example, to move a menu by `2px` down from the top, we can use:\n *\n * <hljs lang=\"html\">\n * <md-menu md-offset=\"0 2\">\n * <!-- menu-content -->\n * </md-menu>\n * </hljs>\n *\n * Specifying `md-offset=\"2 2\"` would shift the menu two pixels down and two pixels to the right.\n *\n * ### Auto Focus\n * By default, when a menu opens, `md-menu` focuses the first button in the menu content.\n *\n * Sometimes you would like to focus another menu item instead of the first.<br/>\n * This can be done by applying the `md-autofocus` directive on the given element.\n *\n * <hljs lang=\"html\">\n * <md-menu-item>\n * <md-button md-autofocus ng-click=\"doSomething()\">\n * Auto Focus\n * </md-button>\n * </md-menu-item>\n * </hljs>\n *\n *\n * ### Preventing close\n *\n * Sometimes you would like to be able to click on a menu item without having the menu\n * close. To do this, AngularJS Material exposes the `md-prevent-menu-close` attribute which\n * can be added to a button inside a menu to stop the menu from automatically closing.\n * You can then close the menu either by using `$mdMenu.close()` in the template,\n * or programmatically by injecting `$mdMenu` and calling `$mdMenu.hide()`.\n *\n * <hljs lang=\"html\">\n * <md-menu-content ng-mouseleave=\"$mdMenu.close()\">\n * <md-menu-item>\n * <md-button ng-click=\"doSomething()\" aria-label=\"Do something\" md-prevent-menu-close=\"md-prevent-menu-close\">\n * <md-icon md-menu-align-target md-svg-icon=\"call:phone\"></md-icon>\n * Do Something\n * </md-button>\n * </md-menu-item>\n * </md-menu-content>\n * </hljs>\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-menu>\n * <md-button ng-click=\"$mdMenu.open($event)\" class=\"md-icon-button\">\n * <md-icon md-svg-icon=\"call:phone\"></md-icon>\n * </md-button>\n * <md-menu-content>\n * <md-menu-item><md-button ng-click=\"doSomething()\">Do Something</md-button></md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </hljs>\n *\n * @param {string=} md-position-mode Specify pre-defined position modes for the `x` and `y` axes.\n * The default modes are `target target`. This positions the origin of the menu using the left and top edges\n * of the origin element in LTR layouts.<br>\n * #### Valid modes for horizontal positioning\n * - `target`\n * - `target-left`\n * - `target-right`\n * - `cascade`\n * - `right`\n * - `left`<br>\n * #### Valid modes for vertical positioning\n * - `target`\n * - `cascade`\n * - `bottom`\n * @param {string=} md-offset An offset to apply to the dropdown on opening, after positioning.\n * Defined as `x` and `y` pixel offset values in the form of `x y`.<br>\n * The default value is `0 0`.\n */\nMenuDirective.$inject = [\"$mdUtil\"];\nangular\n .module('material.components.menu')\n .directive('mdMenu', MenuDirective);\n\n/**\n * @ngInject\n */\nfunction MenuDirective($mdUtil) {\n var INVALID_PREFIX = 'Invalid HTML for md-menu: ';\n return {\n restrict: 'E',\n require: ['mdMenu', '?^mdMenuBar'],\n controller: 'mdMenuCtrl', // empty function to be built by link\n scope: true,\n compile: compile\n };\n\n function compile(templateElement) {\n templateElement.addClass('md-menu');\n\n var triggerEl = templateElement.children()[0];\n var prefixer = $mdUtil.prefixer();\n\n if (!prefixer.hasAttribute(triggerEl, 'ng-click')) {\n triggerEl = triggerEl\n .querySelector(prefixer.buildSelector(['ng-click', 'ng-mouseenter'])) || triggerEl;\n }\n\n var isButtonTrigger = triggerEl.nodeName === 'MD-BUTTON' || triggerEl.nodeName === 'BUTTON';\n\n if (triggerEl && isButtonTrigger && !triggerEl.hasAttribute('type')) {\n triggerEl.setAttribute('type', 'button');\n }\n\n if (!triggerEl) {\n throw Error(INVALID_PREFIX + 'Expected the menu to have a trigger element.');\n }\n\n if (templateElement.children().length !== 2) {\n throw Error(INVALID_PREFIX + 'Expected two children elements. The second element must have a `md-menu-content` element.');\n }\n\n // Default element for ARIA attributes has the ngClick or ngMouseenter expression\n triggerEl && triggerEl.setAttribute('aria-haspopup', 'true');\n\n var nestedMenus = templateElement[0].querySelectorAll('md-menu');\n var nestingDepth = parseInt(templateElement[0].getAttribute('md-nest-level'), 10) || 0;\n if (nestedMenus) {\n angular.forEach($mdUtil.nodesToArray(nestedMenus), function(menuEl) {\n if (!menuEl.hasAttribute('md-position-mode')) {\n menuEl.setAttribute('md-position-mode', 'cascade');\n }\n menuEl.classList.add('_md-nested-menu');\n menuEl.setAttribute('md-nest-level', nestingDepth + 1);\n });\n }\n return link;\n }\n\n function link(scope, element, attr, ctrls) {\n var mdMenuCtrl = ctrls[0];\n var isInMenuBar = !!ctrls[1];\n var mdMenuBarCtrl = ctrls[1];\n // Move everything into a md-menu-container and pass it to the controller\n var menuContainer = angular.element('<div class=\"_md md-open-menu-container md-whiteframe-z2\"></div>');\n var menuContents = element.children()[1];\n\n element.addClass('_md'); // private md component indicator for styling\n\n if (!menuContents.hasAttribute('role')) {\n menuContents.setAttribute('role', 'menu');\n }\n menuContainer.append(menuContents);\n\n element.on('$destroy', function() {\n menuContainer.remove();\n });\n\n element.append(menuContainer);\n menuContainer[0].style.display = 'none';\n mdMenuCtrl.init(menuContainer, { isInMenuBar: isInMenuBar, mdMenuBarCtrl: mdMenuBarCtrl });\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMenuProvider.$inject = [\"$$interimElementProvider\"];angular\n .module('material.components.menu')\n .provider('$mdMenu', MenuProvider);\n\n/**\n * Interim element provider for the menu.\n * Handles behavior for a menu while it is open, including:\n * - handling animating the menu opening/closing\n * - handling key/mouse events on the menu element\n * - handling enabling/disabling scroll while the menu is open\n * - handling redrawing during resizes and orientation changes\n *\n */\n\nfunction MenuProvider($$interimElementProvider) {\n menuDefaultOptions.$inject = [\"$mdUtil\", \"$mdTheming\", \"$mdConstant\", \"$document\", \"$window\", \"$q\", \"$$rAF\", \"$animateCss\", \"$animate\", \"$log\"];\n var MENU_EDGE_MARGIN = 8;\n\n return $$interimElementProvider('$mdMenu')\n .setDefaults({\n methods: ['target'],\n options: menuDefaultOptions\n });\n\n /* @ngInject */\n function menuDefaultOptions($mdUtil, $mdTheming, $mdConstant, $document, $window, $q, $$rAF,\n $animateCss, $animate, $log) {\n\n var prefixer = $mdUtil.prefixer();\n var animator = $mdUtil.dom.animator;\n\n return {\n parent: 'body',\n onShow: onShow,\n onRemove: onRemove,\n hasBackdrop: true,\n disableParentScroll: true,\n skipCompile: true,\n preserveScope: true,\n multiple: true,\n themable: true\n };\n\n /**\n * Show modal backdrop element...\n * @returns {function(): void} A function that removes this backdrop\n */\n function showBackdrop(scope, element, options) {\n if (options.nestLevel) return angular.noop;\n\n // If we are not within a dialog...\n if (options.disableParentScroll && !$mdUtil.getClosest(options.target, 'MD-DIALOG')) {\n // !! DO this before creating the backdrop; since disableScrollAround()\n // configures the scroll offset; which is used by mdBackDrop postLink()\n options.restoreScroll = $mdUtil.disableScrollAround(options.element, options.parent);\n } else {\n options.disableParentScroll = false;\n }\n\n if (options.hasBackdrop) {\n options.backdrop = $mdUtil.createBackdrop(scope, \"md-menu-backdrop md-click-catcher\");\n\n $animate.enter(options.backdrop, options.backdropParent || $document[0].body);\n }\n\n /**\n * Hide and destroys the backdrop created by showBackdrop()\n */\n return function hideBackdrop() {\n if (options.backdrop) options.backdrop.remove();\n if (options.disableParentScroll) options.restoreScroll();\n };\n }\n\n /**\n * Removing the menu element from the DOM and remove all associated event listeners\n * and backdrop\n */\n function onRemove(scope, element, opts) {\n opts.cleanupInteraction();\n opts.cleanupBackdrop();\n opts.cleanupResizing();\n opts.hideBackdrop();\n\n // Before the menu is closing remove the clickable class.\n element.removeClass('md-clickable');\n\n // For navigation $destroy events, do a quick, non-animated removal,\n // but for normal closes (from clicks, etc) animate the removal\n\n return (opts.$destroy === true) ? detachAndClean() : animateRemoval().then(detachAndClean);\n\n /**\n * For normal closes, animate the removal.\n * For forced closes (like $destroy events), skip the animations\n */\n function animateRemoval() {\n return $animateCss(element, {addClass: 'md-leave'}).start();\n }\n\n /**\n * Detach the element\n */\n function detachAndClean() {\n element.removeClass('md-active');\n detachElement(element, opts);\n opts.alreadyOpen = false;\n }\n\n }\n\n /**\n * Inserts and configures the staged Menu element into the DOM, positioning it,\n * and wiring up various interaction events\n */\n function onShow(scope, element, opts) {\n sanitizeAndConfigure(opts);\n\n if (opts.menuContentEl[0]) {\n // Inherit the theme from the target element.\n $mdTheming.inherit(opts.menuContentEl, opts.target);\n } else {\n $log.warn(\n '$mdMenu: Menu elements should always contain a `md-menu-content` element,' +\n 'otherwise interactivity features will not work properly.',\n element\n );\n }\n\n // Register various listeners to move menu on resize/orientation change\n opts.cleanupResizing = startRepositioningOnResize();\n opts.hideBackdrop = showBackdrop(scope, element, opts);\n\n // Return the promise for when our menu is done animating in\n return showMenu()\n .then(function(response) {\n opts.alreadyOpen = true;\n opts.cleanupInteraction = activateInteraction();\n opts.cleanupBackdrop = setupBackdrop();\n\n // Since the menu finished its animation, mark the menu as clickable.\n element.addClass('md-clickable');\n\n return response;\n });\n\n /**\n * Place the menu into the DOM and call positioning related functions\n */\n function showMenu() {\n opts.parent.append(element);\n element[0].style.display = '';\n\n return $q(function(resolve) {\n var position = calculateMenuPosition(element, opts);\n\n element.removeClass('md-leave');\n\n // Animate the menu scaling, and opacity [from its position origin (default == top-left)]\n // to normal scale.\n $animateCss(element, {\n addClass: 'md-active',\n from: animator.toCss(position),\n to: animator.toCss({transform: ''})\n })\n .start()\n .then(resolve);\n\n });\n }\n\n /**\n * Check for valid opts and set some useful defaults\n */\n function sanitizeAndConfigure() {\n if (!opts.target) {\n throw Error(\n '$mdMenu.show() expected a target to animate from in options.target'\n );\n }\n angular.extend(opts, {\n alreadyOpen: false,\n isRemoved: false,\n target: angular.element(opts.target), // make sure it's not a naked DOM node\n parent: angular.element(opts.parent),\n menuContentEl: angular.element(element[0].querySelector('md-menu-content'))\n });\n }\n\n /**\n * Configure various resize listeners for screen changes\n */\n function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n };\n }\n\n /**\n * Sets up the backdrop and listens for click elements.\n * Once the backdrop will be clicked, the menu will automatically close.\n * @returns {!Function} Function to remove the backdrop.\n */\n function setupBackdrop() {\n if (!opts.backdrop) return angular.noop;\n\n opts.backdrop.on('click', onBackdropClick);\n\n return function() {\n opts.backdrop.off('click', onBackdropClick);\n };\n }\n\n /**\n * Function to be called whenever the backdrop is clicked.\n * @param {!MouseEvent} event\n */\n function onBackdropClick(event) {\n event.preventDefault();\n event.stopPropagation();\n\n scope.$apply(function() {\n opts.mdMenuCtrl.close(true, { closeAll: true });\n });\n }\n\n /**\n * Activate interaction on the menu. Resolves the focus target and closes the menu on\n * escape or option click.\n * @returns {!Function} Function to deactivate the interaction listeners.\n */\n function activateInteraction() {\n if (!opts.menuContentEl[0]) return angular.noop;\n\n // Wire up keyboard listeners.\n // - Close on escape,\n // - focus next item on down arrow,\n // - focus prev item on up\n opts.menuContentEl.on('keydown', onMenuKeyDown);\n opts.menuContentEl[0].addEventListener('click', captureClickListener, true);\n\n // kick off initial focus in the menu on the first enabled element\n var focusTarget = opts.menuContentEl[0]\n .querySelector(prefixer.buildSelector(['md-menu-focus-target', 'md-autofocus']));\n\n if (!focusTarget) {\n var childrenLen = opts.menuContentEl[0].children.length;\n for (var childIndex = 0; childIndex < childrenLen; childIndex++) {\n var child = opts.menuContentEl[0].children[childIndex];\n focusTarget = child.querySelector('.md-button:not([disabled])');\n if (focusTarget) {\n break;\n }\n // Need to check the attribute as well since this might be a custom element whose\n // disabled property is undefined.\n if (child.firstElementChild && !child.firstElementChild.disabled &&\n !child.firstElementChild.getAttribute('disabled')) {\n focusTarget = child.firstElementChild;\n break;\n }\n }\n }\n\n focusTarget && focusTarget.focus();\n\n return function cleanupInteraction() {\n opts.menuContentEl.off('keydown', onMenuKeyDown);\n opts.menuContentEl[0].removeEventListener('click', captureClickListener, true);\n };\n\n // ************************************\n // internal functions\n // ************************************\n\n function onMenuKeyDown(ev) {\n var handled;\n switch (ev.keyCode) {\n case $mdConstant.KEY_CODE.ESCAPE:\n if (opts.nestLevel) {\n opts.mdMenuCtrl.close();\n } else {\n opts.mdMenuCtrl.close(false, { closeAll: true });\n }\n handled = true;\n break;\n case $mdConstant.KEY_CODE.TAB:\n opts.mdMenuCtrl.close(false, { closeAll: true });\n // Don't prevent default or stop propagation on this event as we want tab\n // to move the focus to the next focusable element on the page.\n handled = false;\n break;\n case $mdConstant.KEY_CODE.UP_ARROW:\n if (!focusMenuItem(ev, opts.menuContentEl, opts, -1) && !opts.nestLevel) {\n opts.mdMenuCtrl.triggerContainerProxy(ev);\n }\n handled = true;\n break;\n case $mdConstant.KEY_CODE.DOWN_ARROW:\n if (!focusMenuItem(ev, opts.menuContentEl, opts, 1) && !opts.nestLevel) {\n opts.mdMenuCtrl.triggerContainerProxy(ev);\n }\n handled = true;\n break;\n case $mdConstant.KEY_CODE.LEFT_ARROW:\n if (opts.nestLevel) {\n opts.mdMenuCtrl.close();\n } else {\n opts.mdMenuCtrl.triggerContainerProxy(ev);\n }\n handled = true;\n break;\n case $mdConstant.KEY_CODE.RIGHT_ARROW:\n var parentMenu = $mdUtil.getClosest(ev.target, 'MD-MENU');\n if (parentMenu && parentMenu != opts.parent[0]) {\n ev.target.click();\n } else {\n opts.mdMenuCtrl.triggerContainerProxy(ev);\n }\n handled = true;\n break;\n }\n if (handled) {\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n function onBackdropClick(e) {\n e.preventDefault();\n e.stopPropagation();\n scope.$apply(function() {\n opts.mdMenuCtrl.close(true, { closeAll: true });\n });\n }\n\n // Close menu on menu item click, if said menu-item is not disabled\n function captureClickListener(e) {\n var target = e.target;\n // Traverse up the event until we get to the menuContentEl to see if\n // there is an ng-click and that the ng-click is not disabled\n do {\n if (target == opts.menuContentEl[0]) return;\n if ((hasAnyAttribute(target, ['ng-click', 'ng-href', 'ui-sref']) ||\n target.nodeName == 'BUTTON' || target.nodeName == 'MD-BUTTON') && !hasAnyAttribute(target, ['md-prevent-menu-close'])) {\n var closestMenu = $mdUtil.getClosest(target, 'MD-MENU');\n if (!target.hasAttribute('disabled') && (!closestMenu || closestMenu == opts.parent[0])) {\n close();\n }\n break;\n }\n } while (target = target.parentNode);\n\n function close() {\n scope.$apply(function() {\n opts.mdMenuCtrl.close(true, { closeAll: true });\n });\n }\n\n function hasAnyAttribute(target, attrs) {\n if (!target) return false;\n\n for (var i = 0, attr; attr = attrs[i]; ++i) {\n if (prefixer.hasAttribute(target, attr)) {\n return true;\n }\n }\n\n return false;\n }\n }\n\n }\n }\n\n /**\n * Takes a keypress event and focuses the next/previous menu\n * item from the emitting element\n * @param {event} e - The origin keypress event\n * @param {angular.element} menuEl - The menu element\n * @param {object} opts - The interim element options for the mdMenu\n * @param {number} direction - The direction to move in (+1 = next, -1 = prev)\n */\n function focusMenuItem(e, menuEl, opts, direction) {\n var currentItem = $mdUtil.getClosest(e.target, 'MD-MENU-ITEM');\n\n var items = $mdUtil.nodesToArray(menuEl[0].children);\n var currentIndex = items.indexOf(currentItem);\n\n // Traverse through our elements in the specified direction (+/-1) and try to\n // focus them until we find one that accepts focus\n var didFocus;\n for (var i = currentIndex + direction; i >= 0 && i < items.length; i = i + direction) {\n var focusTarget = items[i].querySelector('.md-button');\n didFocus = attemptFocus(focusTarget);\n if (didFocus) {\n break;\n }\n }\n return didFocus;\n }\n\n /**\n * Attempts to focus an element. Checks whether that element is the currently\n * focused element after attempting.\n * @param {HTMLElement} el - the element to attempt focus on\n * @returns {boolean} - whether the element was successfully focused\n */\n function attemptFocus(el) {\n if (el && el.getAttribute('tabindex') != -1) {\n el.focus();\n return ($document[0].activeElement == el);\n }\n }\n\n /**\n * Use browser to remove this element without triggering a $destroy event\n */\n function detachElement(element, opts) {\n if (!opts.preserveElement) {\n if (toNode(element).parentNode === toNode(opts.parent)) {\n toNode(opts.parent).removeChild(toNode(element));\n }\n } else {\n toNode(element).style.display = 'none';\n }\n }\n\n /**\n * Computes menu position and sets the style on the menu container\n * @param {HTMLElement} el - the menu container element\n * @param {object} opts - the interim element options object\n */\n function calculateMenuPosition(el, opts) {\n\n var containerNode = el[0],\n openMenuNode = el[0].firstElementChild,\n openMenuNodeRect = openMenuNode.getBoundingClientRect(),\n boundryNode = $document[0].body,\n boundryNodeRect = boundryNode.getBoundingClientRect();\n\n var menuStyle = $window.getComputedStyle(openMenuNode);\n\n var originNode = opts.target[0].querySelector(prefixer.buildSelector('md-menu-origin')) || opts.target[0],\n originNodeRect = originNode.getBoundingClientRect();\n\n var bounds = {\n left: boundryNodeRect.left + MENU_EDGE_MARGIN,\n top: Math.max(boundryNodeRect.top, 0) + MENU_EDGE_MARGIN,\n bottom: Math.max(boundryNodeRect.bottom, Math.max(boundryNodeRect.top, 0) + boundryNodeRect.height) - MENU_EDGE_MARGIN,\n right: boundryNodeRect.right - MENU_EDGE_MARGIN\n };\n\n var alignTarget, alignTargetRect = { top:0, left : 0, right:0, bottom:0 }, existingOffsets = { top:0, left : 0, right:0, bottom:0 };\n var positionMode = opts.mdMenuCtrl.positionMode();\n\n if (positionMode.top === 'target' || positionMode.left === 'target' || positionMode.left === 'target-right') {\n alignTarget = firstVisibleChild();\n if (alignTarget) {\n // TODO: Allow centering on an arbitrary node, for now center on first menu-item's child\n alignTarget = alignTarget.firstElementChild || alignTarget;\n alignTarget = alignTarget.querySelector(prefixer.buildSelector('md-menu-align-target')) || alignTarget;\n alignTargetRect = alignTarget.getBoundingClientRect();\n\n existingOffsets = {\n top: parseFloat(containerNode.style.top || 0),\n left: parseFloat(containerNode.style.left || 0)\n };\n }\n }\n\n var position = {};\n var transformOrigin = 'top ';\n\n switch (positionMode.top) {\n case 'target':\n position.top = existingOffsets.top + originNodeRect.top - alignTargetRect.top;\n break;\n case 'cascade':\n position.top = originNodeRect.top - parseFloat(menuStyle.paddingTop) - originNode.style.top;\n break;\n case 'bottom':\n position.top = originNodeRect.top + originNodeRect.height;\n break;\n default:\n throw new Error('Invalid target mode \"' + positionMode.top + '\" specified for md-menu on Y axis.');\n }\n\n var rtl = $mdUtil.isRtl(el);\n\n switch (positionMode.left) {\n case 'target':\n position.left = existingOffsets.left + originNodeRect.left - alignTargetRect.left;\n transformOrigin += rtl ? 'right' : 'left';\n break;\n case 'target-left':\n position.left = originNodeRect.left;\n transformOrigin += 'left';\n break;\n case 'target-right':\n position.left = originNodeRect.right - openMenuNodeRect.width + (openMenuNodeRect.right - alignTargetRect.right);\n transformOrigin += 'right';\n break;\n case 'cascade':\n var willFitRight = rtl ? (originNodeRect.left - openMenuNodeRect.width) < bounds.left : (originNodeRect.right + openMenuNodeRect.width) < bounds.right;\n position.left = willFitRight ? originNodeRect.right - originNode.style.left : originNodeRect.left - originNode.style.left - openMenuNodeRect.width;\n transformOrigin += willFitRight ? 'left' : 'right';\n break;\n case 'right':\n if (rtl) {\n position.left = originNodeRect.right - originNodeRect.width;\n transformOrigin += 'left';\n } else {\n position.left = originNodeRect.right - openMenuNodeRect.width;\n transformOrigin += 'right';\n }\n break;\n case 'left':\n if (rtl) {\n position.left = originNodeRect.right - openMenuNodeRect.width;\n transformOrigin += 'right';\n } else {\n position.left = originNodeRect.left;\n transformOrigin += 'left';\n }\n break;\n default:\n throw new Error('Invalid target mode \"' + positionMode.left + '\" specified for md-menu on X axis.');\n }\n\n var offsets = opts.mdMenuCtrl.offsets();\n position.top += offsets.top;\n position.left += offsets.left;\n\n clamp(position);\n\n var scaleX = Math.round(100 * Math.min(originNodeRect.width / containerNode.offsetWidth, 1.0)) / 100;\n var scaleY = Math.round(100 * Math.min(originNodeRect.height / containerNode.offsetHeight, 1.0)) / 100;\n\n return {\n top: Math.round(position.top),\n left: Math.round(position.left),\n // Animate a scale out if we aren't just repositioning\n transform: !opts.alreadyOpen ? $mdUtil.supplant('scale({0},{1})', [scaleX, scaleY]) : undefined,\n transformOrigin: transformOrigin\n };\n\n /**\n * Clamps the repositioning of the menu within the confines of\n * bounding element (often the screen/body)\n */\n function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }\n\n /**\n * Gets the first visible child in the openMenuNode\n * Necessary incase menu nodes are being dynamically hidden\n */\n function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') {\n return openMenuNode.children[i];\n }\n }\n }\n }\n }\n function toNode(el) {\n if (el instanceof angular.element) {\n el = el[0];\n }\n return el;\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.menuBar\n */\n\nangular.module('material.components.menuBar', [\n 'material.core',\n 'material.components.icon',\n 'material.components.menu'\n]);\n\n})();\n(function(){\n\"use strict\";\n\n\nMenuBarController.$inject = [\"$scope\", \"$rootScope\", \"$element\", \"$attrs\", \"$mdConstant\", \"$document\", \"$mdUtil\", \"$timeout\"];\nangular\n .module('material.components.menuBar')\n .controller('MenuBarController', MenuBarController);\n\nvar BOUND_MENU_METHODS = ['handleKeyDown', 'handleMenuHover', 'scheduleOpenHoveredMenu', 'cancelScheduledOpen'];\n\n/**\n * @ngInject\n */\nfunction MenuBarController($scope, $rootScope, $element, $attrs, $mdConstant, $document, $mdUtil, $timeout) {\n this.$element = $element;\n this.$attrs = $attrs;\n this.$mdConstant = $mdConstant;\n this.$mdUtil = $mdUtil;\n this.$document = $document;\n this.$scope = $scope;\n this.$rootScope = $rootScope;\n this.$timeout = $timeout;\n\n var self = this;\n angular.forEach(BOUND_MENU_METHODS, function(methodName) {\n self[methodName] = angular.bind(self, self[methodName]);\n });\n}\n\nMenuBarController.prototype.init = function() {\n var $element = this.$element;\n var $mdUtil = this.$mdUtil;\n var $scope = this.$scope;\n\n var self = this;\n var deregisterFns = [];\n $element.on('keydown', this.handleKeyDown);\n this.parentToolbar = $mdUtil.getClosest($element, 'MD-TOOLBAR');\n\n deregisterFns.push(this.$rootScope.$on('$mdMenuOpen', function(event, el) {\n if (self.getMenus().indexOf(el[0]) != -1) {\n $element[0].classList.add('md-open');\n el[0].classList.add('md-open');\n self.currentlyOpenMenu = el.controller('mdMenu');\n self.currentlyOpenMenu.registerContainerProxy(self.handleKeyDown);\n self.enableOpenOnHover();\n }\n }));\n\n deregisterFns.push(this.$rootScope.$on('$mdMenuClose', function(event, el, opts) {\n var rootMenus = self.getMenus();\n if (rootMenus.indexOf(el[0]) != -1) {\n $element[0].classList.remove('md-open');\n el[0].classList.remove('md-open');\n }\n\n var ctrl = angular.element(el[0]).controller('mdMenu');\n if (ctrl.isInMenuBar && ctrl.mdMenuBarCtrl === self) {\n var parentMenu = el[0];\n while (parentMenu && rootMenus.indexOf(parentMenu) == -1) {\n parentMenu = $mdUtil.getClosest(parentMenu, 'MD-MENU', true);\n }\n if (parentMenu) {\n if (!opts.skipFocus) parentMenu.querySelector('button:not([disabled])').focus();\n self.currentlyOpenMenu = undefined;\n }\n self.disableOpenOnHover();\n self.setKeyboardMode(true);\n }\n }));\n\n $scope.$on('$destroy', function() {\n self.disableOpenOnHover();\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n });\n\n\n this.setKeyboardMode(true);\n};\n\nMenuBarController.prototype.setKeyboardMode = function(enabled) {\n if (enabled) this.$element[0].classList.add('md-keyboard-mode');\n else this.$element[0].classList.remove('md-keyboard-mode');\n};\n\nMenuBarController.prototype.enableOpenOnHover = function() {\n if (this.openOnHoverEnabled) return;\n\n var self = this;\n\n self.openOnHoverEnabled = true;\n\n if (self.parentToolbar) {\n self.parentToolbar.classList.add('md-has-open-menu');\n\n // Needs to be on the next tick so it doesn't close immediately.\n self.$mdUtil.nextTick(function() {\n angular.element(self.parentToolbar).on('click', self.handleParentClick);\n }, false);\n }\n\n angular\n .element(self.getMenus())\n .on('mouseenter', self.handleMenuHover);\n};\n\nMenuBarController.prototype.handleMenuHover = function(e) {\n this.setKeyboardMode(false);\n if (this.openOnHoverEnabled) {\n this.scheduleOpenHoveredMenu(e);\n }\n};\n\nMenuBarController.prototype.disableOpenOnHover = function() {\n if (!this.openOnHoverEnabled) return;\n\n this.openOnHoverEnabled = false;\n\n if (this.parentToolbar) {\n this.parentToolbar.classList.remove('md-has-open-menu');\n angular.element(this.parentToolbar).off('click', this.handleParentClick);\n }\n\n angular\n .element(this.getMenus())\n .off('mouseenter', this.handleMenuHover);\n};\n\nMenuBarController.prototype.scheduleOpenHoveredMenu = function(e) {\n var menuEl = angular.element(e.currentTarget);\n var menuCtrl = menuEl.controller('mdMenu');\n this.setKeyboardMode(false);\n this.scheduleOpenMenu(menuCtrl);\n};\n\nMenuBarController.prototype.scheduleOpenMenu = function(menuCtrl) {\n var self = this;\n var $timeout = this.$timeout;\n if (menuCtrl != self.currentlyOpenMenu) {\n $timeout.cancel(self.pendingMenuOpen);\n self.pendingMenuOpen = $timeout(function() {\n self.pendingMenuOpen = undefined;\n if (self.currentlyOpenMenu) {\n self.currentlyOpenMenu.close(true, { closeAll: true });\n }\n menuCtrl.open();\n }, 200, false);\n }\n};\n\nMenuBarController.prototype.handleKeyDown = function(e) {\n var keyCodes = this.$mdConstant.KEY_CODE;\n var currentMenu = this.currentlyOpenMenu;\n var wasOpen = currentMenu && currentMenu.isOpen;\n this.setKeyboardMode(true);\n var handled, newMenu, newMenuCtrl;\n switch (e.keyCode) {\n case keyCodes.DOWN_ARROW:\n if (currentMenu) {\n currentMenu.focusMenuContainer();\n } else {\n this.openFocusedMenu();\n }\n handled = true;\n break;\n case keyCodes.UP_ARROW:\n currentMenu && currentMenu.close();\n handled = true;\n break;\n case keyCodes.LEFT_ARROW:\n newMenu = this.focusMenu(-1);\n if (wasOpen) {\n newMenuCtrl = angular.element(newMenu).controller('mdMenu');\n this.scheduleOpenMenu(newMenuCtrl);\n }\n handled = true;\n break;\n case keyCodes.RIGHT_ARROW:\n newMenu = this.focusMenu(+1);\n if (wasOpen) {\n newMenuCtrl = angular.element(newMenu).controller('mdMenu');\n this.scheduleOpenMenu(newMenuCtrl);\n }\n handled = true;\n break;\n }\n if (handled) {\n e && e.preventDefault && e.preventDefault();\n e && e.stopImmediatePropagation && e.stopImmediatePropagation();\n }\n};\n\nMenuBarController.prototype.focusMenu = function(direction) {\n var menus = this.getMenus();\n var focusedIndex = this.getFocusedMenuIndex();\n\n if (focusedIndex == -1) { focusedIndex = this.getOpenMenuIndex(); }\n\n var changed = false;\n\n if (focusedIndex == -1) { focusedIndex = 0; changed = true; }\n else if (\n direction < 0 && focusedIndex > 0 ||\n direction > 0 && focusedIndex < menus.length - direction\n ) {\n focusedIndex += direction;\n changed = true;\n }\n if (changed) {\n menus[focusedIndex].querySelector('button').focus();\n return menus[focusedIndex];\n }\n};\n\nMenuBarController.prototype.openFocusedMenu = function() {\n var menu = this.getFocusedMenu();\n menu && angular.element(menu).controller('mdMenu').open();\n};\n\nMenuBarController.prototype.getMenus = function() {\n var $element = this.$element;\n return this.$mdUtil.nodesToArray($element[0].children)\n .filter(function(el) { return el.nodeName == 'MD-MENU'; });\n};\n\nMenuBarController.prototype.getFocusedMenu = function() {\n return this.getMenus()[this.getFocusedMenuIndex()];\n};\n\nMenuBarController.prototype.getFocusedMenuIndex = function() {\n var $mdUtil = this.$mdUtil;\n var focusedEl = $mdUtil.getClosest(\n this.$document[0].activeElement,\n 'MD-MENU'\n );\n if (!focusedEl) return -1;\n\n var focusedIndex = this.getMenus().indexOf(focusedEl);\n return focusedIndex;\n};\n\nMenuBarController.prototype.getOpenMenuIndex = function() {\n var menus = this.getMenus();\n for (var i = 0; i < menus.length; ++i) {\n if (menus[i].classList.contains('md-open')) return i;\n }\n return -1;\n};\n\nMenuBarController.prototype.handleParentClick = function(event) {\n var openMenu = this.querySelector('md-menu.md-open');\n\n if (openMenu && !openMenu.contains(event.target)) {\n angular.element(openMenu).controller('mdMenu').close(true, {\n closeAll: true\n });\n }\n};\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc directive\n * @name mdMenuBar\n * @module material.components.menuBar\n * @restrict E\n * @description\n *\n * Menu bars are containers that hold multiple menus. They change the behavior and appearance\n * of the `md-menu` directive to behave similar to an operating system provided menu.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-menu-bar>\n * <md-menu>\n * <button ng-click=\"$mdMenu.open()\">\n * File\n * </button>\n * <md-menu-content>\n * <md-menu-item>\n * <md-button ng-click=\"ctrl.sampleAction('share', $event)\">\n * Share...\n * </md-button>\n * </md-menu-item>\n * <md-menu-divider></md-menu-divider>\n * <md-menu-item>\n * <md-menu-item>\n * <md-menu>\n * <md-button ng-click=\"$mdMenu.open()\">New</md-button>\n * <md-menu-content>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Document', $event)\">Document</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Spreadsheet', $event)\">Spreadsheet</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Presentation', $event)\">Presentation</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Form', $event)\">Form</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Drawing', $event)\">Drawing</md-button></md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </md-menu-bar>\n * </hljs>\n *\n * ## Menu Bar Controls\n *\n * You may place `md-menu-item`s that function as controls within menu bars.\n * There are two modes that are exposed via the `type` attribute of the `md-menu-item`.\n * `type=\"checkbox\"` will function as a boolean control for the `ng-model` attribute of the\n * `md-menu-item`. `type=\"radio\"` will function like a radio button, setting the `ngModel`\n * to the `string` value of the `value` attribute. If you need non-string values, you can use\n * `ng-value` to provide an expression (this is similar to how angular's native `input[type=radio]`\n * works.\n *\n * If you want either to disable closing the opened menu when clicked, you can add the\n * `md-prevent-menu-close` attribute to the `md-menu-item`. The attribute will be forwarded to the\n * `button` element that is generated.\n *\n * <hljs lang=\"html\">\n * <md-menu-bar>\n * <md-menu>\n * <button ng-click=\"$mdMenu.open()\">\n * Sample Menu\n * </button>\n * <md-menu-content>\n * <md-menu-item type=\"checkbox\" ng-model=\"settings.allowChanges\" md-prevent-menu-close>\n * Allow changes\n * </md-menu-item>\n * <md-menu-divider></md-menu-divider>\n * <md-menu-item type=\"radio\" ng-model=\"settings.mode\" ng-value=\"1\">Mode 1</md-menu-item>\n * <md-menu-item type=\"radio\" ng-model=\"settings.mode\" ng-value=\"2\">Mode 2</md-menu-item>\n * <md-menu-item type=\"radio\" ng-model=\"settings.mode\" ng-value=\"3\">Mode 3</md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </md-menu-bar>\n * </hljs>\n *\n *\n * ### Nesting Menus\n *\n * Menus may be nested within menu bars. This is commonly called cascading menus.\n * To nest a menu place the nested menu inside the content of the `md-menu-item`.\n * <hljs lang=\"html\">\n * <md-menu-item>\n * <md-menu>\n * <button ng-click=\"$mdMenu.open()\">New</md-button>\n * <md-menu-content>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Document', $event)\">Document</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Spreadsheet', $event)\">Spreadsheet</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Presentation', $event)\">Presentation</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Form', $event)\">Form</md-button></md-menu-item>\n * <md-menu-item><md-button ng-click=\"ctrl.sampleAction('New Drawing', $event)\">Drawing</md-button></md-menu-item>\n * </md-menu-content>\n * </md-menu>\n * </md-menu-item>\n * </hljs>\n *\n */\n\nMenuBarDirective.$inject = [\"$mdUtil\", \"$mdTheming\"];\nangular\n .module('material.components.menuBar')\n .directive('mdMenuBar', MenuBarDirective);\n\n/* @ngInject */\nfunction MenuBarDirective($mdUtil, $mdTheming) {\n return {\n restrict: 'E',\n require: 'mdMenuBar',\n controller: 'MenuBarController',\n\n compile: function compile(templateEl, templateAttrs) {\n if (!templateAttrs.ariaRole) {\n templateEl[0].setAttribute('role', 'menubar');\n }\n angular.forEach(templateEl[0].children, function(menuEl) {\n if (menuEl.nodeName == 'MD-MENU') {\n if (!menuEl.hasAttribute('md-position-mode')) {\n menuEl.setAttribute('md-position-mode', 'left bottom');\n\n // Since we're in the compile function and actual `md-buttons` are not compiled yet,\n // we need to query for possible `md-buttons` as well.\n menuEl.querySelector('button, a, md-button').setAttribute('role', 'menuitem');\n }\n var contentEls = $mdUtil.nodesToArray(menuEl.querySelectorAll('md-menu-content'));\n angular.forEach(contentEls, function(contentEl) {\n contentEl.classList.add('md-menu-bar-menu');\n contentEl.classList.add('md-dense');\n if (!contentEl.hasAttribute('width')) {\n contentEl.setAttribute('width', 5);\n }\n });\n }\n });\n\n // Mark the child menu items that they're inside a menu bar. This is necessary,\n // because mnMenuItem has special behaviour during compilation, depending on\n // whether it is inside a mdMenuBar. We can usually figure this out via the DOM,\n // however if a directive that uses documentFragment is applied to the child (e.g. ngRepeat),\n // the element won't have a parent and won't compile properly.\n templateEl.find('md-menu-item').addClass('md-in-menu-bar');\n\n return function postLink(scope, el, attr, ctrl) {\n el.addClass('_md'); // private md component indicator for styling\n $mdTheming(scope, el);\n ctrl.init();\n };\n }\n };\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nangular\n .module('material.components.menuBar')\n .directive('mdMenuDivider', MenuDividerDirective);\n\n\nfunction MenuDividerDirective() {\n return {\n restrict: 'E',\n compile: function(templateEl, templateAttrs) {\n if (!templateAttrs.role) {\n templateEl[0].setAttribute('role', 'separator');\n }\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMenuItemController.$inject = [\"$scope\", \"$element\", \"$attrs\"];\nangular\n .module('material.components.menuBar')\n .controller('MenuItemController', MenuItemController);\n\n\n/**\n * @ngInject\n */\nfunction MenuItemController($scope, $element, $attrs) {\n this.$element = $element;\n this.$attrs = $attrs;\n this.$scope = $scope;\n}\n\nMenuItemController.prototype.init = function(ngModel) {\n var $element = this.$element;\n var $attrs = this.$attrs;\n\n this.ngModel = ngModel;\n if ($attrs.type == 'checkbox' || $attrs.type == 'radio') {\n this.mode = $attrs.type;\n this.iconEl = $element[0].children[0];\n this.buttonEl = $element[0].children[1];\n if (ngModel) {\n // Clear ngAria set attributes\n this.initClickListeners();\n }\n }\n};\n\n// ngAria auto sets attributes on a menu-item with a ngModel.\n// We don't want this because our content (buttons) get the focus\n// and set their own aria attributes appropritately. Having both\n// breaks NVDA / JAWS. This undeoes ngAria's attrs.\nMenuItemController.prototype.clearNgAria = function() {\n var el = this.$element[0];\n var clearAttrs = ['role', 'tabindex', 'aria-invalid', 'aria-checked'];\n angular.forEach(clearAttrs, function(attr) {\n el.removeAttribute(attr);\n });\n};\n\nMenuItemController.prototype.initClickListeners = function() {\n var self = this;\n var ngModel = this.ngModel;\n var $scope = this.$scope;\n var $attrs = this.$attrs;\n var $element = this.$element;\n var mode = this.mode;\n\n this.handleClick = angular.bind(this, this.handleClick);\n\n var icon = this.iconEl;\n var button = angular.element(this.buttonEl);\n var handleClick = this.handleClick;\n\n $attrs.$observe('disabled', setDisabled);\n setDisabled($attrs.disabled);\n\n ngModel.$render = function render() {\n self.clearNgAria();\n if (isSelected()) {\n icon.style.display = '';\n button.attr('aria-checked', 'true');\n } else {\n icon.style.display = 'none';\n button.attr('aria-checked', 'false');\n }\n };\n\n $scope.$$postDigest(ngModel.$render);\n\n function isSelected() {\n if (mode == 'radio') {\n var val = $attrs.ngValue ? $scope.$eval($attrs.ngValue) : $attrs.value;\n return ngModel.$modelValue == val;\n } else {\n return ngModel.$modelValue;\n }\n }\n\n function setDisabled(disabled) {\n if (disabled) {\n button.off('click', handleClick);\n } else {\n button.on('click', handleClick);\n }\n }\n};\n\nMenuItemController.prototype.handleClick = function(e) {\n var mode = this.mode;\n var ngModel = this.ngModel;\n var $attrs = this.$attrs;\n var newVal;\n if (mode == 'checkbox') {\n newVal = !ngModel.$modelValue;\n } else if (mode == 'radio') {\n newVal = $attrs.ngValue ? this.$scope.$eval($attrs.ngValue) : $attrs.value;\n }\n ngModel.$setViewValue(newVal);\n ngModel.$render();\n};\n\n})();\n(function(){\n\"use strict\";\n\n\nMenuItemDirective.$inject = [\"$mdUtil\", \"$mdConstant\", \"$$mdSvgRegistry\"];\nangular\n .module('material.components.menuBar')\n .directive('mdMenuItem', MenuItemDirective);\n\n /* @ngInject */\nfunction MenuItemDirective($mdUtil, $mdConstant, $$mdSvgRegistry) {\n return {\n controller: 'MenuItemController',\n require: ['mdMenuItem', '?ngModel'],\n priority: $mdConstant.BEFORE_NG_ARIA,\n compile: function(templateEl, templateAttrs) {\n var type = templateAttrs.type;\n var inMenuBarClass = 'md-in-menu-bar';\n\n // Note: This allows us to show the `check` icon for the md-menu-bar items.\n // The `md-in-menu-bar` class is set by the mdMenuBar directive.\n if ((type === 'checkbox' || type === 'radio') && templateEl.hasClass(inMenuBarClass)) {\n var text = templateEl[0].textContent;\n var buttonEl = angular.element('<md-button type=\"button\"></md-button>');\n var iconTemplate = '<md-icon md-svg-src=\"' + $$mdSvgRegistry.mdChecked + '\"></md-icon>';\n\n buttonEl.html(text);\n buttonEl.attr('tabindex', '0');\n\n if (angular.isDefined(templateAttrs.mdPreventMenuClose)) {\n buttonEl.attr('md-prevent-menu-close', templateAttrs.mdPreventMenuClose);\n }\n\n templateEl.html('');\n templateEl.append(angular.element(iconTemplate));\n templateEl.append(buttonEl);\n templateEl.addClass('md-indent').removeClass(inMenuBarClass);\n\n setDefault('role', type === 'checkbox' ? 'menuitemcheckbox' : 'menuitemradio', buttonEl);\n moveAttrToButton('ng-disabled');\n\n } else {\n setDefault('role', 'menuitem', templateEl[0].querySelector('md-button, button, a'));\n }\n\n\n return function(scope, el, attrs, ctrls) {\n var ctrl = ctrls[0];\n var ngModel = ctrls[1];\n ctrl.init(ngModel);\n };\n\n function setDefault(attr, val, el) {\n el = el || templateEl;\n if (el instanceof angular.element) {\n el = el[0];\n }\n if (!el.hasAttribute(attr)) {\n el.setAttribute(attr, val);\n }\n }\n\n function moveAttrToButton(attribute) {\n var attributes = $mdUtil.prefixer(attribute);\n\n angular.forEach(attributes, function(attr) {\n if (templateEl[0].hasAttribute(attr)) {\n var val = templateEl[0].getAttribute(attr);\n buttonEl[0].setAttribute(attr, val);\n templateEl[0].removeAttribute(attr);\n }\n });\n }\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.navBar\n */\nMdNavBar.$inject = [\"$mdAria\", \"$mdTheming\", \"$window\", \"$mdUtil\"];\nMdNavBarController.$inject = [\"$element\", \"$scope\", \"$timeout\", \"$mdConstant\"];\nMdNavItem.$inject = [\"$mdAria\", \"$$rAF\", \"$mdUtil\", \"$window\"];\nMdNavItemController.$inject = [\"$element\"];\nangular.module('material.components.navBar', ['material.core'])\n .controller('MdNavBarController', MdNavBarController)\n .directive('mdNavBar', MdNavBar)\n .controller('MdNavItemController', MdNavItemController)\n .directive('mdNavItem', MdNavItem);\n\n/**\n * @ngdoc directive\n * @name mdNavBar\n * @module material.components.navBar\n *\n * @restrict E\n *\n * @description\n * The `<md-nav-bar>` directive renders a list of material tabs that can be used\n * for top-level page navigation. Unlike `<md-tabs>`, it has no concept of a tab\n * body and no bar pagination.\n *\n * Because it deals with page navigation, certain routing concepts are built-in.\n * Route changes via `ng-href`, `ui-sref`, or `ng-click` events are supported.\n * Alternatively, the user could simply watch the value of `md-selected-nav-item`\n * (`currentNavItem` in the below example) for changes.\n *\n * Accessibility functionality is implemented as a\n * <a href=\"https://www.w3.org/TR/wai-aria-1.0/complete#tablist\">\n * tablist</a> with\n * <a href=\"https://www.w3.org/TR/wai-aria-1.0/complete#tab\">tabs</a>.\n * We've kept the `role=\"navigation\"` on the `<nav>`, for backwards compatibility, even though\n * it is not required in the\n * <a href=\"https://www.w3.org/TR/wai-aria-practices/#aria_lh_navigation\">\n * latest Working Group Note from December 2017</a>.\n *\n * <h3>Keyboard Navigation</h3>\n * - `Tab`/`Shift+Tab` moves the focus to the next/previous interactive element on the page\n * - `Enter`/`Space` selects the focused nav item and navigates to display the item's contents\n * - `Right`/`Down` moves focus to the next nav item, wrapping at the end\n * - `Left`/`Up` moves focus to the previous nav item, wrapping at the end\n * - `Home`/`End` moves the focus to the first/last nav item\n *\n * @param {string=} md-selected-nav-item The name of the current tab; this must\n * match the `name` attribute of `<md-nav-item>`.\n * @param {boolean=} md-no-ink-bar If set to true, the ink bar will be hidden.\n * @param {string=} nav-bar-aria-label An `aria-label` applied to the `md-nav-bar`'s tablist\n * for accessibility.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-nav-bar md-selected-nav-item=\"currentNavItem\">\n * <md-nav-item md-nav-click=\"goto('page1')\" name=\"page1\">\n * Page One\n * </md-nav-item>\n * <md-nav-item md-nav-href=\"#page2\" name=\"page3\">Page Two</md-nav-item>\n * <md-nav-item md-nav-sref=\"page3\" name=\"page2\">Page Three</md-nav-item>\n * <md-nav-item\n * md-nav-sref=\"app.page4\"\n * sref-opts=\"{reload: true, notify: true}\"\n * name=\"page4\">\n * Page Four\n * </md-nav-item>\n * </md-nav-bar>\n *</hljs>\n * <hljs lang=\"js\">\n * (function() {\n * 'use strict';\n *\n * $rootScope.$on('$routeChangeSuccess', function(event, current) {\n * $scope.currentLink = getCurrentLinkFromRoute(current);\n * });\n * });\n * </hljs>\n */\n/**\n * @param $mdAria\n * @param $mdTheming\n * @param $window\n * @param $mdUtil\n * @constructor\n * @ngInject\n */\nfunction MdNavBar($mdAria, $mdTheming, $window, $mdUtil) {\n return {\n restrict: 'E',\n transclude: true,\n controller: MdNavBarController,\n controllerAs: 'ctrl',\n bindToController: true,\n scope: {\n 'mdSelectedNavItem': '=?',\n 'mdNoInkBar': '=?',\n 'navBarAriaLabel': '@?',\n },\n template:\n '<div class=\"md-nav-bar\">' +\n '<nav role=\"navigation\">' +\n '<ul class=\"_md-nav-bar-list\" ng-transclude role=\"tablist\" ' +\n 'ng-focus=\"ctrl.onFocus()\" ' + // Deprecated but kept for now in order to not break tests\n 'aria-label=\"{{ctrl.navBarAriaLabel}}\">' +\n '</ul>' +\n '</nav>' +\n '<md-nav-ink-bar ng-hide=\"ctrl.mdNoInkBar\"></md-nav-ink-bar>' +\n '</div>',\n link: function(scope, element, attrs, ctrl) {\n\n ctrl.width = $window.innerWidth;\n\n function onResize() {\n if (ctrl.width !== $window.innerWidth) {\n ctrl.updateSelectedTabInkBar();\n ctrl.width = $window.innerWidth;\n scope.$digest();\n }\n }\n\n function cleanUp() {\n angular.element($window).off('resize', onResize);\n }\n\n angular.element($window).on('resize', $mdUtil.debounce(onResize, 300));\n scope.$on('$destroy', cleanUp);\n\n $mdTheming(element);\n if (!ctrl.navBarAriaLabel) {\n $mdAria.expectAsync(element, 'aria-label', angular.noop);\n }\n },\n };\n}\n\n/**\n * Controller for the nav-bar component.\n * Accessibility functionality is implemented as a tablist\n * (https://www.w3.org/TR/wai-aria-1.0/complete#tablist) and\n * tabs (https://www.w3.org/TR/wai-aria-1.0/complete#tab).\n *\n * @param {!JQLite} $element\n * @param {!IScope} $scope\n * @param {!ITimeoutService} $timeout\n * @param {!Object} $mdConstant\n * @constructor\n * @final\n * @ngInject\n */\nfunction MdNavBarController($element, $scope, $timeout, $mdConstant) {\n // Injected variables\n /**\n * @private @const\n * @type {!ITimeoutService}\n */\n this._$timeout = $timeout;\n\n /**\n * @private @const\n * @type {!IScope}\n */\n this._$scope = $scope;\n\n /**\n * @private @const\n * @type {!Object}\n */\n this._$mdConstant = $mdConstant;\n\n // Data-bound variables.\n /** @type {?string} */\n this.mdSelectedNavItem;\n\n /** @type {?string} */\n this.navBarAriaLabel;\n\n // State variables.\n /** @type {?HTMLElement} */\n this._navBarEl = $element[0];\n\n /** @type {?JQLite} */\n this._inkbar;\n\n var self = this;\n // need to wait for transcluded content to be available\n var deregisterTabWatch = this._$scope.$watch(function() {\n return self._navBarEl.querySelectorAll('._md-nav-button').length;\n },\n function(newLength) {\n if (newLength > 0) {\n self._initTabs();\n deregisterTabWatch();\n }\n });\n}\n\n/**\n * Initializes the tab components once they exist.\n * @private\n */\nMdNavBarController.prototype._initTabs = function() {\n this._inkbar = angular.element(this._navBarEl.querySelector('md-nav-ink-bar'));\n\n var self = this;\n this._$timeout(function() {\n self._updateTabs(self.mdSelectedNavItem, null);\n });\n\n this._$scope.$watch('ctrl.mdSelectedNavItem', function(newValue, oldValue) {\n // Wait a digest before update tabs for products doing\n // anything dynamic in the template.\n self._$timeout(function() {\n self._updateTabs(newValue, oldValue);\n });\n });\n};\n\n/**\n * Set the current tab to be selected.\n * @param {string|undefined} newValue New current tab name.\n * @param {string|undefined|null} oldValue Previous tab name.\n * @private\n */\nMdNavBarController.prototype._updateTabs = function(newValue, oldValue) {\n var self = this;\n var tabs = this._getTabs();\n var sameTab = newValue === oldValue;\n\n // this._getTabs can return null if nav-bar has not yet been initialized\n if (!tabs) return;\n\n var newIndex = -1;\n var newTab = this._getTabByName(newValue);\n var oldTab = this._getTabByName(oldValue);\n\n if (oldTab) {\n oldTab.setSelected(false);\n }\n\n if (newTab) {\n newTab.setSelected(true);\n newIndex = tabs.indexOf(newTab);\n }\n\n this._$timeout(function() {\n self._updateInkBarStyles(newTab, newIndex);\n // Don't change focus when there is no newTab, the new and old tabs are the same, or when\n // called from MdNavBarController._initTabs() which would have no oldTab defined.\n if (newTab && oldTab && !sameTab) {\n self._moveFocus(oldTab, newTab);\n }\n });\n};\n\n/**\n * Repositions the ink bar to the selected tab.\n * @param {MdNavItemController} tab the nav item that should have ink bar styles applied\n * @param {number=} newIndex the index of the newly selected nav item\n * @private\n */\nMdNavBarController.prototype._updateInkBarStyles = function(tab, newIndex) {\n this._inkbar.css({display: newIndex < 0 ? 'none' : ''});\n\n if (tab) {\n var tabEl = tab.getButtonEl();\n var left = tabEl.offsetLeft;\n var tabWidth = tabEl.offsetWidth;\n var navBarWidth = this._navBarEl.getBoundingClientRect().width;\n var scale = tabWidth / navBarWidth;\n var translate = left / navBarWidth * 100;\n\n this._inkbar.css({ transform: 'translateX(' + translate + '%) scaleX(' + scale + ')' });\n }\n};\n\n/**\n * Updates ink bar to match current tab.\n */\nMdNavBarController.prototype.updateSelectedTabInkBar = function() {\n this._updateInkBarStyles(this._getSelectedTab());\n};\n\n/**\n * Returns an array of the current tabs.\n * @return {Array<!MdNavItemController>}\n * @private\n */\nMdNavBarController.prototype._getTabs = function() {\n var controllers = Array.prototype.slice.call(\n this._navBarEl.querySelectorAll('.md-nav-item'))\n .map(function(el) {\n return angular.element(el).controller('mdNavItem');\n });\n return controllers.indexOf(undefined) ? controllers : [];\n};\n\n/**\n * Returns the tab with the specified name.\n * @param {string} name The name of the tab, found in its name attribute.\n * @return {MdNavItemController}\n * @private\n */\nMdNavBarController.prototype._getTabByName = function(name) {\n return this._findTab(function(tab) {\n return tab.getName() === name;\n });\n};\n\n/**\n * Returns the selected tab.\n * @return {MdNavItemController}\n * @private\n */\nMdNavBarController.prototype._getSelectedTab = function() {\n return this._findTab(function(tab) {\n return tab.isSelected();\n });\n};\n\n/**\n * Returns the focused tab.\n * @return {MdNavItemController}\n */\nMdNavBarController.prototype.getFocusedTab = function() {\n return this._findTab(function(tab) {\n return tab.hasFocus();\n });\n};\n\n/**\n * Find a tab that matches the specified function, starting from the first tab.\n * @param {Function} fn\n * @param {number=} startIndex index to start at. Defaults to 0.\n * @returns {MdNavItemController|null}\n * @private\n */\nMdNavBarController.prototype._findTab = function(fn, startIndex) {\n var tabs = this._getTabs(), i;\n if (startIndex == null) {\n startIndex = 0;\n }\n for (i = startIndex; i < tabs.length; i++) {\n if (fn(tabs[i])) {\n return tabs[i];\n }\n }\n return null;\n};\n\n/**\n * Find a tab that matches the specified function, going backwards from the end of the list.\n * @param {Function} fn\n * @param {number=} startIndex index to start at. Defaults to tabs.length - 1.\n * @returns {MdNavItemController}\n * @private\n */\nMdNavBarController.prototype._findTabReverse = function(fn, startIndex) {\n var tabs = this._getTabs();\n if (startIndex === undefined || startIndex === null) {\n startIndex = tabs.length - 1;\n }\n for (var i = startIndex; i >= 0 ; i--) {\n if (fn(tabs[i])) {\n return tabs[i];\n }\n }\n return null;\n};\n\n/**\n * Direct focus to the selected tab when focus enters the nav bar.\n */\nMdNavBarController.prototype.onFocus = function() {\n var tab = this._getSelectedTab();\n if (tab && !tab.isFocused) {\n tab.setFocused(true);\n }\n};\n\n/**\n * Move focus from oldTab to newTab.\n * @param {!MdNavItemController} oldTab\n * @param {!MdNavItemController} newTab\n * @private\n */\nMdNavBarController.prototype._moveFocus = function(oldTab, newTab) {\n oldTab.setFocused(false);\n newTab.setFocused(true);\n};\n\n/**\n * Focus the first tab.\n * @private\n */\nMdNavBarController.prototype._focusFirstTab = function() {\n var tabs = this._getTabs();\n if (!tabs) return;\n var tabToFocus = this._findTab(function(tab) {\n return tab._isEnabled();\n });\n if (tabToFocus) {\n this._moveFocus(this.getFocusedTab(), tabToFocus);\n }\n};\n\n/**\n * Focus the last tab.\n * @private\n */\nMdNavBarController.prototype._focusLastTab = function() {\n var tabs = this._getTabs();\n if (!tabs) return;\n var tabToFocus = this._findTabReverse(function(tab) {\n return tab._isEnabled();\n });\n if (tabToFocus) {\n this._moveFocus(this.getFocusedTab(), tabToFocus);\n }\n};\n\n/**\n * Focus the next non-disabled tab.\n * @param {number} focusedTabIndex the index of the currently focused tab\n * @private\n */\nMdNavBarController.prototype._focusNextTab = function(focusedTabIndex) {\n var tabs = this._getTabs();\n if (!tabs) return;\n var tabToFocus = this._findTab(function(tab) {\n return tab._isEnabled();\n }, focusedTabIndex + 1);\n if (tabToFocus) {\n this._moveFocus(this.getFocusedTab(), tabToFocus);\n } else {\n this._focusFirstTab();\n }\n};\n\n/**\n * Focus the previous non-disabled tab.\n * @param {number} focusedTabIndex the index of the currently focused tab\n * @private\n */\nMdNavBarController.prototype._focusPreviousTab = function(focusedTabIndex) {\n var tabs = this._getTabs();\n if (!tabs) return;\n var tabToFocus = this._findTabReverse(function(tab) {\n return tab._isEnabled();\n }, focusedTabIndex - 1);\n if (tabToFocus) {\n this._moveFocus(this.getFocusedTab(), tabToFocus);\n } else {\n this._focusLastTab();\n }\n};\n\n/**\n * Responds to keydown events.\n * Calls to preventDefault() stop the page from scrolling when changing focus in the nav-bar.\n * @param {!KeyboardEvent} e\n */\nMdNavBarController.prototype.onKeydown = function(e) {\n var keyCodes = this._$mdConstant.KEY_CODE;\n var tabs = this._getTabs();\n var focusedTab = this.getFocusedTab();\n if (!focusedTab || !tabs) return;\n\n var focusedTabIndex = tabs.indexOf(focusedTab);\n\n // use arrow keys to navigate between tabs\n switch (e.keyCode) {\n case keyCodes.UP_ARROW:\n case keyCodes.LEFT_ARROW:\n e.preventDefault();\n this._focusPreviousTab(focusedTabIndex);\n break;\n case keyCodes.DOWN_ARROW:\n case keyCodes.RIGHT_ARROW:\n e.preventDefault();\n this._focusNextTab(focusedTabIndex);\n break;\n case keyCodes.SPACE:\n case keyCodes.ENTER:\n // timeout to avoid a \"digest already in progress\" console error\n this._$timeout(function() {\n focusedTab.getButtonEl().click();\n });\n break;\n case keyCodes.HOME:\n e.preventDefault();\n this._focusFirstTab();\n break;\n case keyCodes.END:\n e.preventDefault();\n this._focusLastTab();\n break;\n }\n};\n\n/**\n * @ngdoc directive\n * @name mdNavItem\n * @module material.components.navBar\n *\n * @restrict E\n *\n * @description\n * `<md-nav-item>` describes a page navigation link within the `<md-nav-bar>` component.\n * It renders an `<md-button>` as the actual link.\n *\n * Exactly one of the `md-nav-click`, `md-nav-href`, or `md-nav-sref` attributes are required\n * to be specified.\n *\n * @param {string=} nav-item-aria-label Allows setting or overriding the label that is announced by\n * a screen reader for the nav item's button. If this is not set, the nav item's transcluded\n * content will be announced. Make sure to set this if the nav item's transcluded content does\n * not include descriptive text, for example only an icon.\n * @param {expression=} md-nav-click Expression which will be evaluated when the\n * link is clicked to change the page. Renders as an `ng-click`.\n * @param {string=} md-nav-href url to transition to when this link is clicked.\n * Renders as an `ng-href`.\n * @param {string=} md-nav-sref UI-Router state to transition to when this link is\n * clicked. Renders as a `ui-sref`.\n * @param {string} name The name of this link. Used by the nav bar to know\n * which link is currently selected.\n * @param {!object=} sref-opts UI-Router options that are passed to the `$state.go()` function. See\n * the <a ng-href=\"https://ui-router.github.io/docs/latest/interfaces/transition.transitionoptions.html\"\n * target=\"_blank\">UI-Router documentation for details</a>.\n *\n * @usage\n * See <a ng-href=\"api/directive/mdNavBar\">md-nav-bar</a> for usage.\n */\n/**\n * @param $mdAria\n * @param $$rAF\n * @param $mdUtil\n * @param $window\n * @constructor\n * @ngInject\n */\nfunction MdNavItem($mdAria, $$rAF, $mdUtil, $window) {\n return {\n restrict: 'E',\n require: ['mdNavItem', '^mdNavBar'],\n controller: MdNavItemController,\n bindToController: true,\n controllerAs: 'ctrl',\n replace: true,\n transclude: true,\n template: function(tElement, tAttrs) {\n var hasNavClick = tAttrs.mdNavClick;\n var hasNavHref = tAttrs.mdNavHref;\n var hasNavSref = tAttrs.mdNavSref;\n var hasSrefOpts = tAttrs.srefOpts;\n var navigationAttribute;\n var navigationOptions;\n var buttonTemplate;\n\n // Cannot specify more than one nav attribute\n if ((hasNavClick ? 1 : 0) + (hasNavHref ? 1 : 0) + (hasNavSref ? 1 : 0) > 1) {\n throw Error(\n 'Please do not specify more than one of the md-nav-click, md-nav-href, ' +\n 'or md-nav-sref attributes per nav-item directive.'\n );\n }\n\n if (hasNavClick !== undefined && hasNavClick !== null) {\n navigationAttribute = 'ng-click=\"ctrl.mdNavClick()\"';\n } else if (hasNavHref !== undefined && hasNavHref !== null) {\n navigationAttribute = 'ng-href=\"{{ctrl.mdNavHref}}\"';\n } else if (hasNavSref !== undefined && hasNavSref !== null) {\n navigationAttribute = 'ui-sref=\"{{ctrl.mdNavSref}}\"';\n } else {\n throw Error(\n 'Please specify at least one of the md-nav-click, md-nav-href, or md-nav-sref ' +\n 'attributes per nav-item directive.');\n }\n\n navigationOptions = hasSrefOpts ? 'ui-sref-opts=\"{{ctrl.srefOpts}}\" ' : '';\n\n if (navigationAttribute) {\n buttonTemplate = '' +\n '<md-button class=\"_md-nav-button md-accent\" ' +\n 'ng-class=\"ctrl.getNgClassMap()\" ' +\n 'ng-blur=\"ctrl.setFocused(false)\" ' +\n 'ng-disabled=\"ctrl.disabled\" ' +\n 'tabindex=\"-1\" ' +\n 'role=\"tab\" ' +\n 'ng-attr-aria-label=\"{{ctrl.navItemAriaLabel ? ctrl.navItemAriaLabel : undefined}}\" ' +\n 'aria-selected=\"{{ctrl.isSelected()}}\" ' +\n navigationOptions +\n navigationAttribute + '>' +\n '<span ng-transclude class=\"_md-nav-button-text\"></span>' +\n '</md-button>';\n }\n\n return '' +\n '<li class=\"md-nav-item\" ' +\n 'role=\"presentation\">' +\n (buttonTemplate || '') +\n '</li>';\n },\n scope: {\n 'mdNavClick': '&?',\n 'mdNavHref': '@?',\n 'mdNavSref': '@?',\n 'srefOpts': '=?',\n 'name': '@',\n 'navItemAriaLabel': '@?',\n },\n link: function(scope, element, attrs, controllers) {\n var disconnect;\n var mdNavItem;\n var mdNavBar;\n var navButton;\n\n // When accessing the element's contents synchronously, they\n // may not be defined yet because of transclusion. There is a higher\n // chance that it will be accessible if we wait one frame.\n $$rAF(function() {\n mdNavItem = controllers[0];\n mdNavBar = controllers[1];\n navButton = angular.element(element[0].querySelector('._md-nav-button'));\n\n if (!mdNavItem.name) {\n mdNavItem.name = angular.element(element[0]\n .querySelector('._md-nav-button-text')).text().trim();\n }\n\n navButton.on('keydown', function($event) {\n mdNavBar.onKeydown($event);\n });\n\n navButton.on('focus', function() {\n mdNavItem._focused = true;\n });\n\n navButton.on('click', function() {\n // This triggers a watcher on mdNavBar.mdSelectedNavItem which calls\n // MdNavBarController._updateTabs() after a $timeout. That function calls\n // MdNavItemController.setSelected() for the old tab with false and the new tab with true.\n mdNavBar.mdSelectedNavItem = mdNavItem.name;\n scope.$apply();\n });\n\n // Get the disabled attribute value first, then setup observing of value changes\n mdNavItem.disabled = $mdUtil.parseAttributeBoolean(attrs['disabled'], false);\n if ('MutationObserver' in $window) {\n var config = {attributes: true, attributeFilter: ['disabled']};\n var targetNode = element[0];\n var mutationCallback = function(mutationList) {\n $mdUtil.nextTick(function() {\n mdNavItem.disabled = $mdUtil.parseAttributeBoolean(attrs[mutationList[0].attributeName], false);\n });\n };\n var observer = new MutationObserver(mutationCallback);\n observer.observe(targetNode, config);\n disconnect = observer.disconnect.bind(observer);\n } else {\n attrs.$observe('disabled', function (value) {\n mdNavItem.disabled = $mdUtil.parseAttributeBoolean(value, false);\n });\n }\n\n if (!mdNavItem.navItemAriaLabel) {\n $mdAria.expectWithText(navButton, 'aria-label');\n }\n });\n\n scope.$on('destroy', function() {\n navButton.off('keydown');\n navButton.off('focus');\n navButton.off('click');\n disconnect();\n });\n }\n };\n}\n\n/**\n * Controller for the nav-item component.\n * @param {!JQLite} $element\n * @constructor\n * @final\n * @ngInject\n */\nfunction MdNavItemController($element) {\n\n /**\n * @private @const\n * @type {!JQLite}\n */\n this._$element = $element;\n\n // Data-bound variables\n\n /**\n * @const\n * @type {?Function}\n */\n this.mdNavClick;\n\n /**\n * @const\n * @type {?string}\n */\n this.mdNavHref;\n\n /**\n * @const\n * @type {?string}\n */\n this.mdNavSref;\n /**\n * @const\n * @type {?Object}\n */\n this.srefOpts;\n /**\n * @const\n * @type {?string}\n */\n this.name;\n\n /**\n * @const\n * @type {string}\n */\n this.navItemAriaLabel;\n\n // State variables\n /**\n * @private\n * @type {boolean}\n */\n this._selected = false;\n\n /**\n * @type {boolean}\n */\n this.isFocused = false;\n}\n\n/**\n * Returns a map of class names and values for use by ng-class.\n * @return {!Object<string,boolean>}\n */\nMdNavItemController.prototype.getNgClassMap = function() {\n return {\n 'md-active': this._selected,\n 'md-primary': this._selected,\n 'md-unselected': !this._selected,\n 'md-focused': this.isFocused,\n };\n};\n\n/**\n * Get the name attribute of the tab.\n * @return {string}\n */\nMdNavItemController.prototype.getName = function() {\n return this.name;\n};\n\n/**\n * Get the button element associated with the tab.\n * @return {!Element}\n */\nMdNavItemController.prototype.getButtonEl = function() {\n return this._$element[0].querySelector('._md-nav-button');\n};\n\n/**\n * Set the selected state of the tab and updates the tabindex.\n * This function is called for the oldTab and newTab when selection changes.\n * @param {boolean} isSelected true to select the tab, false to deselect the tab\n */\nMdNavItemController.prototype.setSelected = function(isSelected) {\n this._selected = isSelected;\n if (isSelected) {\n // https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html suggests that we call\n // removeAttribute('tabindex') here, but that causes our unit tests to fail due to\n // document.activeElement staying set to the body instead of the focused nav button.\n this.getButtonEl().setAttribute('tabindex', '0');\n } else {\n this.getButtonEl().setAttribute('tabindex', '-1');\n }\n};\n\n/**\n * @return {boolean}\n */\nMdNavItemController.prototype.isSelected = function() {\n return this._selected;\n};\n\n/**\n * Set the focused state of the tab.\n * @param {boolean} isFocused\n */\nMdNavItemController.prototype.setFocused = function(isFocused) {\n this.isFocused = isFocused;\n\n if (isFocused) {\n this.getButtonEl().focus();\n }\n};\n\n/**\n * @return {boolean} true if the tab has focus, false if not.\n */\nMdNavItemController.prototype.hasFocus = function() {\n return this.isFocused;\n};\n\n/**\n * @return {boolean} true if the tab is enabled, false if disabled.\n * @private\n */\nMdNavItemController.prototype._isEnabled = function() {\n return !this._$element.attr('disabled');\n};\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.panel\n */\nMdPanelService.$inject = [\"presets\", \"$rootElement\", \"$rootScope\", \"$injector\", \"$window\"];\nangular\n .module('material.components.panel', [\n 'material.core',\n 'material.components.backdrop'\n ])\n .provider('$mdPanel', MdPanelProvider);\n\n\n/*****************************************************************************\n * PUBLIC DOCUMENTATION *\n *****************************************************************************/\n\n\n/**\n * @ngdoc service\n * @name $mdPanelProvider\n * @module material.components.panel\n *\n * @description\n * `$mdPanelProvider` allows users to create configuration presets that will be\n * stored within a cached presets object. When the configuration is needed, the\n * user can request the preset by passing it as the first parameter in the\n * `$mdPanel.create` or `$mdPanel.open` methods.\n *\n * @usage\n * <hljs lang=\"js\">\n * (function(angular, undefined) {\n * 'use strict';\n *\n * angular\n * .module('demoApp', ['ngMaterial'])\n * .config(DemoConfig)\n * .controller('DemoCtrl', DemoCtrl)\n * .controller('DemoMenuCtrl', DemoMenuCtrl);\n *\n * function DemoConfig($mdPanelProvider) {\n * $mdPanelProvider.definePreset('demoPreset', {\n * attachTo: angular.element(document.body),\n * controller: DemoMenuCtrl,\n * controllerAs: 'ctrl',\n * template: '' +\n * '<div class=\"menu-panel\" md-whiteframe=\"4\">' +\n * ' <div class=\"menu-content\">' +\n * ' <div class=\"menu-item\" ng-repeat=\"item in ctrl.items\">' +\n * ' <button class=\"md-button\">' +\n * ' <span>{{item}}</span>' +\n * ' </button>' +\n * ' </div>' +\n * ' <md-divider></md-divider>' +\n * ' <div class=\"menu-item\">' +\n * ' <button class=\"md-button\" ng-click=\"ctrl.closeMenu()\">' +\n * ' <span>Close Menu</span>' +\n * ' </button>' +\n * ' </div>' +\n * ' </div>' +\n * '</div>',\n * panelClass: 'menu-panel-container',\n * focusOnOpen: false,\n * zIndex: 100,\n * propagateContainerEvents: true,\n * groupName: 'menus'\n * });\n * }\n *\n * function PanelProviderCtrl($mdPanel) {\n * this.navigation = {\n * name: 'navigation',\n * items: [\n * 'Home',\n * 'About',\n * 'Contact'\n * ]\n * };\n * this.favorites = {\n * name: 'favorites',\n * items: [\n * 'Add to Favorites'\n * ]\n * };\n * this.more = {\n * name: 'more',\n * items: [\n * 'Account',\n * 'Sign Out'\n * ]\n * };\n *\n * $mdPanel.newPanelGroup('menus', {\n * maxOpen: 2\n * });\n *\n * this.showMenu = function($event, menu) {\n * $mdPanel.open('demoPreset', {\n * id: 'menu_' + menu.name,\n * position: $mdPanel.newPanelPosition()\n * .relativeTo($event.target)\n * .addPanelPosition(\n * $mdPanel.xPosition.ALIGN_START,\n * $mdPanel.yPosition.BELOW\n * ),\n * locals: {\n * items: menu.items\n * },\n * openFrom: $event\n * });\n * };\n * }\n *\n * function PanelMenuCtrl(mdPanelRef) {\n * // 'mdPanelRef' is injected in the controller.\n * this.closeMenu = function() {\n * if (mdPanelRef) {\n * mdPanelRef.close();\n * }\n * };\n * }\n * })(angular);\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdPanelProvider#definePreset\n * @description\n * Takes the passed in preset name and preset configuration object and adds it\n * to the `_presets` object of the provider. This `_presets` object is then\n * passed along to the `$mdPanel` service.\n *\n * @param {string} name Preset name.\n * @param {!Object} preset Specific configuration object that can contain any\n * and all of the parameters available within the `$mdPanel.create` method.\n * However, parameters that pertain to id, position, animation, and user\n * interaction are not allowed and will be removed from the preset\n * configuration.\n */\n\n\n/*****************************************************************************\n * MdPanel Service *\n *****************************************************************************/\n\n\n/**\n * @ngdoc service\n * @name $mdPanel\n * @module material.components.panel\n *\n * @description\n * `$mdPanel` is a robust, low-level service for creating floating panels on\n * the screen. It can be used to implement tooltips, dialogs, pop-ups, etc.\n *\n * The following types, referenced below, have separate documentation:\n * - <a ng-href=\"api/type/MdPanelAnimation\">MdPanelAnimation</a> from `$mdPanel.newPanelAnimation()`\n * - <a ng-href=\"api/type/MdPanelPosition\">MdPanelPosition</a> from `$mdPanel.newPanelPosition()`\n * - <a ng-href=\"api/type/MdPanelRef\">MdPanelRef</a> from the `$mdPanel.open()` Promise or\n * injected in the panel's controller\n *\n * @usage\n * <hljs lang=\"js\">\n * (function(angular, undefined) {\n * 'use strict';\n *\n * angular\n * .module('demoApp', ['ngMaterial'])\n * .controller('DemoDialogController', DialogController)\n * .controller('DemoCtrl', function($mdPanel) {\n *\n * var panelRef;\n *\n * function showPanel($event) {\n * var panelPosition = $mdPanel.newPanelPosition()\n * .absolute()\n * .top('50%')\n * .left('50%');\n *\n * var panelAnimation = $mdPanel.newPanelAnimation()\n * .openFrom($event)\n * .duration(200)\n * .closeTo('.show-button')\n * .withAnimation($mdPanel.animation.SCALE);\n *\n * var config = {\n * attachTo: angular.element(document.body),\n * controller: DialogController,\n * controllerAs: 'ctrl',\n * position: panelPosition,\n * animation: panelAnimation,\n * targetEvent: $event,\n * templateUrl: 'dialog-template.html',\n * clickOutsideToClose: true,\n * escapeToClose: true,\n * focusOnOpen: true\n * };\n *\n * $mdPanel.open(config)\n * .then(function(result) {\n * panelRef = result;\n * });\n * }\n * }\n *\n * function DialogController(MdPanelRef) {\n * function closeDialog() {\n * if (MdPanelRef) MdPanelRef.close();\n * }\n * }\n * })(angular);\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdPanel#create\n * @description\n * Creates a panel with the specified options.\n *\n * @param {!Object=} config Specific configuration object that may contain the\n * following properties:\n *\n * - `id` - `{string=}`: An ID to track the panel by. When an ID is provided,\n * the created panel is added to a tracked panels object. Any subsequent\n * requests made to create a panel with that ID are ignored. This is useful\n * in having the panel service not open multiple panels from the same user\n * interaction when there is no backdrop and events are propagated. Defaults\n * to an arbitrary string that is not tracked.\n * - `template` - `{string=}`: HTML template to show in the panel. This\n * **must** be trusted HTML with respect to AngularJS’s\n * [$sce service](https://docs.angularjs.org/api/ng/service/$sce).\n * - `templateUrl` - `{string=}`: The URL that will be used as the content of\n * the panel.\n * - `contentElement` - `{(string|!JQLite|!Element)=}`: Pre-compiled\n * element to be used as the panel's content.\n * - `controller` - `{(function|string)=}`: The controller to associate with\n * the panel. The controller can inject a reference to the returned\n * panelRef, which allows the panel to be closed, hidden, and shown. Any\n * fields passed in through locals or resolve will be bound to the\n * controller.\n * - `controllerAs` - `{string=}`: An alias to assign the controller to on\n * the scope.\n * - `bindToController` - `{boolean=}`: Binds locals to the controller\n * instead of passing them in. Defaults to true, as this is a best\n * practice.\n * - `locals` - `{Object=}`: An object containing key/value pairs. The keys\n * will be used as names of values to inject into the controller. For\n * example, `locals: {three: 3}` would inject `three` into the controller,\n * with the value 3. 'mdPanelRef' is a reserved key, and will always\n * be set to the created `MdPanelRef` instance.\n * - `resolve` - `{Object=}`: Similar to locals, except it takes promises as\n * values. The panel will not open until all of the promises resolve.\n * - `attachTo` - `{(string|!JQLite|!Element)=}`: The element to\n * attach the panel to. Defaults to appending to the root element of the\n * application.\n * - `propagateContainerEvents` - `{boolean=}`: Whether pointer or touch\n * events should be allowed to propagate 'go through' the container, aka the\n * wrapper, of the panel. Defaults to false.\n * - `panelClass` - `{string=}`: A css class to apply to the panel element.\n * This class should define any borders, box-shadow, etc. for the panel.\n * - `zIndex` - `{number=}`: The z-index to place the panel at.\n * Defaults to 80.\n * - `position` - `{MdPanelPosition=}`: An MdPanelPosition object that\n * specifies the alignment of the panel. For more information, see\n * `MdPanelPosition`.\n * - `clickOutsideToClose` - `{boolean=}`: Whether the user can click\n * outside the panel to close it. Defaults to false.\n * - `escapeToClose` - `{boolean=}`: Whether the user can press escape to\n * close the panel. Defaults to false.\n * - `onCloseSuccess` - `{function(!panelRef, string)=}`: Function that is\n * called after the close successfully finishes. The first parameter passed\n * into this function is the current panelRef and the 2nd is an optional\n * string explaining the close reason. The currently supported closeReasons\n * can be found in the `MdPanelRef.closeReasons` enum. These are by default\n * passed along by the panel.\n * - `trapFocus` - `{boolean=}`: Whether focus should be trapped within the\n * panel. If `trapFocus` is true, the user will not be able to interact\n * with the rest of the page until the panel is dismissed. Defaults to\n * false.\n * - `focusOnOpen` - `{boolean=}`: An option to override focus behavior on\n * open. Only disable if focusing some other way, as focus management is\n * required for panels to be accessible. Defaults to true.\n * - `fullscreen` - `{boolean=}`: Whether the panel should be full screen.\n * Applies the class `._md-panel-fullscreen` to the panel on open. Defaults\n * to false.\n * - `animation` - `{MdPanelAnimation=}`: An MdPanelAnimation object that\n * specifies the animation of the panel. For more information, see\n * `MdPanelAnimation`.\n * - `hasBackdrop` - `{boolean=}`: Whether there should be an opaque backdrop\n * behind the panel. Defaults to false.\n * - `disableParentScroll` - `{boolean=}`: Whether the user can scroll the\n * page behind the panel. Defaults to false.\n * - `onDomAdded` - `{function=}`: Callback function used to announce when\n * the panel is added to the DOM.\n * - `onOpenComplete` - `{function=}`: Callback function used to announce\n * when the open() action is finished.\n * - `onRemoving` - `{function=}`: Callback function used to announce the\n * close/hide() action is starting.\n * - `onDomRemoved` - `{function=}`: Callback function used to announce when\n * the panel is removed from the DOM.\n * - `origin` - `{(string|!JQLite|!Element)=}`: The element to focus\n * on when the panel closes. This is commonly the element which triggered\n * the opening of the panel. If you do not use `origin`, you need to control\n * the focus manually.\n * - `groupName` - `{(string|!Array<string>)=}`: A group name or an array of\n * group names. The group name is used for creating a group of panels. The\n * group is used for configuring the number of open panels and identifying\n * specific behaviors for groups. For instance, all tooltips could be\n * identified using the same groupName.\n *\n * @returns {!MdPanelRef} panelRef\n */\n\n/**\n * @ngdoc method\n * @name $mdPanel#open\n * @description\n * Calls the create method above, then opens the panel. This is a shortcut for\n * creating and then calling open manually. If custom methods need to be\n * called when the panel is added to the DOM or opened, do not use this method.\n * Instead create the panel, chain promises on the domAdded and openComplete\n * methods, and call open from the returned panelRef.\n *\n * @param {!Object=} config Specific configuration object that may contain\n * the properties defined in `$mdPanel.create`.\n * @returns {!Q.IPromise<!MdPanelRef>} panelRef A promise that resolves\n * to an instance of the panel.\n */\n\n/**\n * @ngdoc method\n * @name $mdPanel#newPanelPosition\n * @description\n * Returns a new instance of the MdPanelPosition object. Use this to create\n * the position config object.\n *\n * @returns {!MdPanelPosition} panelPosition\n */\n\n/**\n * @ngdoc method\n * @name $mdPanel#newPanelAnimation\n * @description\n * Returns a new instance of the MdPanelAnimation object. Use this to create\n * the animation config object.\n *\n * @returns {!MdPanelAnimation} panelAnimation\n */\n\n/**\n * @ngdoc method\n * @name $mdPanel#setGroupMaxOpen\n * @description\n * Sets the maximum number of panels in a group that can be opened at a given\n * time.\n *\n * @param {string} groupName The name of the group to configure.\n * @param {number} maxOpen The maximum number of panels that can be\n * opened. Infinity can be passed in to remove the maxOpen limit.\n */\n\n\n/*****************************************************************************\n * MdPanelRef *\n *****************************************************************************/\n\n\n/**\n * @ngdoc type\n * @name MdPanelRef\n * @module material.components.panel\n * @description\n * A reference to a created panel. This reference contains a unique id for the\n * panel, along with the following properties:\n *\n * - `id` - `{string}`: The unique id for the panel. This id is used to track\n * when a panel was interacted with.\n * - `config` - `{!Object=}`: The entire config object that was used in\n * create.\n * - `isAttached` - `{boolean}`: Whether the panel is attached to the DOM.\n * Visibility to the user does not factor into isAttached.\n * - `panelContainer` - `{JQLite}`: The wrapper element containing the\n * panel. This property is added in order to have access to the `addClass`,\n * `removeClass`, `toggleClass`, etc methods.\n * - `panelEl` - `{JQLite}`: The panel element. This property is added\n * in order to have access to the `addClass`, `removeClass`, `toggleClass`,\n * etc methods.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#open\n * @description\n * Attaches and shows the panel.\n *\n * @returns {!Q.IPromise} A promise that is resolved when the panel is\n * opened.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#close\n * @description\n * Hides and detaches the panel. Note that this will **not** destroy the panel.\n * If you don't intend on using the panel again, call the {@link #destroy\n * destroy} method afterwards.\n *\n * @returns {!Q.IPromise} A promise that is resolved when the panel is\n * closed.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#attach\n * @description\n * Create the panel elements and attach them to the DOM. The panel will be\n * hidden by default.\n *\n * @returns {!Q.IPromise} A promise that is resolved when the panel is\n * attached.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#detach\n * @description\n * Removes the panel from the DOM. This will NOT hide the panel before removing\n * it.\n *\n * @returns {!Q.IPromise} A promise that is resolved when the panel is\n * detached.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#show\n * @description\n * Shows the panel.\n *\n * @returns {!Q.IPromise} A promise that is resolved when the panel has\n * shown and animations are completed.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#hide\n * @description\n * Hides the panel.\n *\n * @returns {!Q.IPromise} A promise that is resolved when the panel has\n * hidden and animations are completed.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#destroy\n * @description\n * Destroys the panel. The panel cannot be opened again after this is called.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#updatePosition\n * @description\n * Updates the position configuration of a panel. Use this to update the\n * position of a panel that is open, without having to close and re-open the\n * panel.\n *\n * @param {!MdPanelPosition} position\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#addToGroup\n * @description\n * Adds a panel to a group if the panel does not exist within the group already.\n * A panel can only exist within a single group.\n *\n * @param {string} groupName The name of the group to add the panel to.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#removeFromGroup\n * @description\n * Removes a panel from a group if the panel exists within that group. The group\n * must be created ahead of time.\n *\n * @param {string} groupName The name of the group.\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#registerInterceptor\n * @description\n * Registers an interceptor with the panel. The callback should return a promise,\n * which will allow the action to continue when it gets resolved, or will\n * prevent an action if it is rejected. The interceptors are called sequentially\n * and it reverse order. `type` must be one of the following\n * values available on `$mdPanel.interceptorTypes`:\n * * `CLOSE` - Gets called before the panel begins closing.\n *\n * @param {string} type Type of interceptor.\n * @param {!Q.IPromise<any>} callback Callback to be registered.\n * @returns {!MdPanelRef}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#removeInterceptor\n * @description\n * Removes a registered interceptor.\n *\n * @param {string} type Type of interceptor to be removed.\n * @param {function(): !Q.IPromise<any>} callback Interceptor to be removed.\n * @returns {!MdPanelRef}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#removeAllInterceptors\n * @description\n * Removes all interceptors. If a type is supplied, only the\n * interceptors of that type will be cleared.\n *\n * @param {string=} type Type of interceptors to be removed.\n * @returns {!MdPanelRef}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelRef#updateAnimation\n * @description\n * Updates the animation configuration for a panel. You can use this to change\n * the panel's animation without having to re-create it.\n *\n * @param {!MdPanelAnimation} animation\n */\n\n\n/*****************************************************************************\n * MdPanelPosition *\n *****************************************************************************/\n\n\n/**\n * @ngdoc type\n * @name MdPanelPosition\n * @module material.components.panel\n * @description\n *\n * Object for configuring the position of the panel.\n *\n * @usage\n *\n * #### Centering the panel\n *\n * <hljs lang=\"js\">\n * new MdPanelPosition().absolute().center();\n * </hljs>\n *\n * #### Overlapping the panel with an element\n *\n * <hljs lang=\"js\">\n * new MdPanelPosition()\n * .relativeTo(someElement)\n * .addPanelPosition(\n * $mdPanel.xPosition.ALIGN_START,\n * $mdPanel.yPosition.ALIGN_TOPS\n * );\n * </hljs>\n *\n * #### Aligning the panel with the bottom of an element\n *\n * <hljs lang=\"js\">\n * new MdPanelPosition()\n * .relativeTo(someElement)\n * .addPanelPosition($mdPanel.xPosition.CENTER, $mdPanel.yPosition.BELOW);\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#absolute\n * @description\n * Positions the panel absolutely relative to the parent element. If the parent\n * is document.body, this is equivalent to positioning the panel absolutely\n * within the viewport.\n *\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#relativeTo\n * @description\n * Positions the panel relative to a specific element.\n *\n * @param {string|!Element|!JQLite} element Query selector, DOM element,\n * or angular element to position the panel with respect to.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#top\n * @description\n * Sets the value of `top` for the panel. Clears any previously set vertical\n * position.\n *\n * @param {string=} top Value of `top`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#bottom\n * @description\n * Sets the value of `bottom` for the panel. Clears any previously set vertical\n * position.\n *\n * @param {string=} bottom Value of `bottom`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#start\n * @description\n * Sets the panel to the start of the page - `left` if `ltr` or `right` for\n * `rtl`. Clears any previously set horizontal position.\n *\n * @param {string=} start Value of position. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#end\n * @description\n * Sets the panel to the end of the page - `right` if `ltr` or `left` for `rtl`.\n * Clears any previously set horizontal position.\n *\n * @param {string=} end Value of position. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#left\n * @description\n * Sets the value of `left` for the panel. Clears any previously set\n * horizontal position.\n *\n * @param {string=} left Value of `left`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#right\n * @description\n * Sets the value of `right` for the panel. Clears any previously set\n * horizontal position.\n *\n * @param {string=} right Value of `right`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#centerHorizontally\n * @description\n * Centers the panel horizontally in the viewport. Clears any previously set\n * horizontal position.\n *\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#centerVertically\n * @description\n * Centers the panel vertically in the viewport. Clears any previously set\n * vertical position.\n *\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#center\n * @description\n * Centers the panel horizontally and vertically in the viewport. This is\n * equivalent to calling both `centerHorizontally` and `centerVertically`.\n * Clears any previously set horizontal and vertical positions.\n *\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#addPanelPosition\n * @description\n * Sets the x and y position for the panel relative to another element. Can be\n * called multiple times to specify an ordered list of panel positions. The\n * first position which allows the panel to be completely on-screen will be\n * chosen; the last position will be chose whether it is on-screen or not.\n *\n * xPosition must be one of the following values available on\n * $mdPanel.xPosition:\n *\n *\n * CENTER | ALIGN_START | ALIGN_END | OFFSET_START | OFFSET_END\n *\n * <pre>\n * *************\n * * *\n * * PANEL *\n * * *\n * *************\n * A B C D E\n *\n * A: OFFSET_START (for LTR displays)\n * B: ALIGN_START (for LTR displays)\n * C: CENTER\n * D: ALIGN_END (for LTR displays)\n * E: OFFSET_END (for LTR displays)\n * </pre>\n *\n * yPosition must be one of the following values available on\n * $mdPanel.yPosition:\n *\n * CENTER | ALIGN_TOPS | ALIGN_BOTTOMS | ABOVE | BELOW\n *\n * <pre>\n * F\n * G *************\n * * *\n * H * PANEL *\n * * *\n * I *************\n * J\n *\n * F: BELOW\n * G: ALIGN_TOPS\n * H: CENTER\n * I: ALIGN_BOTTOMS\n * J: ABOVE\n * </pre>\n *\n * @param {string} xPosition\n * @param {string} yPosition\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#withOffsetX\n * @description\n * Sets the value of the offset in the x-direction.\n *\n * @param {string|number} offsetX\n * @returns {!MdPanelPosition}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelPosition#withOffsetY\n * @description\n * Sets the value of the offset in the y-direction.\n *\n * @param {string|number} offsetY\n * @returns {!MdPanelPosition}\n */\n\n\n/*****************************************************************************\n * MdPanelAnimation *\n *****************************************************************************/\n\n\n/**\n * @ngdoc type\n * @name MdPanelAnimation\n * @module material.components.panel\n * @description\n * Animation configuration object. To use, create an MdPanelAnimation with the\n * desired properties, then pass the object as part of $mdPanel creation.\n *\n * @usage\n *\n * <hljs lang=\"js\">\n * var panelAnimation = new MdPanelAnimation()\n * .openFrom(myButtonEl)\n * .duration(1337)\n * .closeTo('.my-button')\n * .withAnimation($mdPanel.animation.SCALE);\n *\n * $mdPanel.create({\n * animation: panelAnimation\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name MdPanelAnimation#openFrom\n * @description\n * Specifies where to start the open animation. `openFrom` accepts a\n * click event object, query selector, DOM element, or a Rect object that\n * is used to determine the bounds. When passed a click event, the location\n * of the click will be used as the position to start the animation.\n *\n * @param {string|!Element|!Event|{top: number, left: number}}\n * @returns {!MdPanelAnimation}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelAnimation#closeTo\n * @description\n * Specifies where to animate the panel close. `closeTo` accepts a\n * query selector, DOM element, or a Rect object that is used to determine\n * the bounds.\n *\n * @param {string|!Element|{top: number, left: number}}\n * @returns {!MdPanelAnimation}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelAnimation#withAnimation\n * @description\n * Specifies the animation class.\n *\n * There are several default animations that can be used: `$mdPanel.animation.`\n * - `SLIDE`: The panel slides in and out from the specified\n * elements. It will not fade in or out.\n * - `SCALE`: The panel scales in and out. Slide and fade are\n * included in this animation.\n * - `FADE`: The panel fades in and out.\n *\n * Custom classes will by default fade in and out unless\n * `transition: opacity 1ms` is added to the to custom class.\n *\n * @param {string|{open: string, close: string}} cssClass\n * @returns {!MdPanelAnimation}\n */\n\n/**\n * @ngdoc method\n * @name MdPanelAnimation#duration\n * @description\n * Specifies the duration of the animation in milliseconds. The `duration`\n * method accepts either a number or an object with separate open and close\n * durations.\n *\n * @param {number|{open: number, close: number}} duration\n * @returns {!MdPanelAnimation}\n */\n\n\n/*****************************************************************************\n * PUBLIC DOCUMENTATION *\n *****************************************************************************/\n\n\nvar MD_PANEL_Z_INDEX = 80;\nvar MD_PANEL_HIDDEN = '_md-panel-hidden';\nvar FOCUS_TRAP_TEMPLATE;\n\nvar _presets = {};\n\n\n/**\n * A provider that is used for creating presets for the panel API.\n * @final @constructor @ngInject\n */\nfunction MdPanelProvider() {\n return {\n 'definePreset': definePreset,\n 'getAllPresets': getAllPresets,\n 'clearPresets': clearPresets,\n '$get': $getProvider()\n };\n}\n\n\n/**\n * Takes the passed in panel configuration object and adds it to the `_presets`\n * object at the specified name.\n * @param {string} name Name of the preset to set.\n * @param {!Object} preset Specific configuration object that can contain any\n * and all of the parameters available within the `$mdPanel.create` method.\n * However, parameters that pertain to id, position, animation, and user\n * interaction are not allowed and will be removed from the preset\n * configuration.\n */\nfunction definePreset(name, preset) {\n if (!name || !preset) {\n throw new Error('mdPanelProvider: The panel preset definition is ' +\n 'malformed. The name and preset object are required.');\n } else if (_presets.hasOwnProperty(name)) {\n throw new Error('mdPanelProvider: The panel preset you have requested ' +\n 'has already been defined.');\n }\n\n // Delete any property on the preset that is not allowed.\n delete preset.id;\n delete preset.position;\n delete preset.animation;\n\n _presets[name] = preset;\n}\n\n\n/**\n * Gets a clone of the `_presets`.\n * @return {!Object}\n */\nfunction getAllPresets() {\n return angular.copy(_presets);\n}\n\n\n/**\n * Clears all of the stored presets.\n */\nfunction clearPresets() {\n _presets = {};\n}\n\n\n/**\n * Represents the `$get` method of the AngularJS provider. From here, a new\n * reference to the MdPanelService is returned where the needed arguments are\n * passed in including the MdPanelProvider `_presets`.\n * @param {!Object} _presets\n * @param {!JQLite} $rootElement\n * @param {!angular.Scope} $rootScope\n * @param {!IInjectorService} $injector\n * @param {!IWindowService} $window\n */\nfunction $getProvider() {\n return [\n '$rootElement', '$rootScope', '$injector', '$window',\n function($rootElement, $rootScope, $injector, $window) {\n return new MdPanelService(_presets, $rootElement, $rootScope,\n $injector, $window);\n }\n ];\n}\n\n/**\n * @param {string|[]} value\n * @returns {[]} the input string wrapped in an Array or the original Array\n */\nfunction coerceToArray(value) {\n if (angular.isString(value)) {\n value = [value];\n }\n return value;\n}\n\n/*****************************************************************************\n * MdPanel Service *\n *****************************************************************************/\n\n\n/**\n * A service that is used for controlling/displaying panels on the screen.\n * @param {!Object} presets\n * @param {!JQLite} $rootElement\n * @param {!angular.Scope} $rootScope\n * @param {!IInjectorService} $injector\n * @param {!IWindowService} $window\n * @final @constructor @ngInject\n */\nfunction MdPanelService(presets, $rootElement, $rootScope, $injector, $window) {\n /**\n * Default config options for the panel.\n * Anything angular related needs to be done later. Therefore\n * scope: $rootScope.$new(true),\n * attachTo: $rootElement,\n * are added later.\n * @private {!Object}\n */\n this._defaultConfigOptions = {\n bindToController: true,\n clickOutsideToClose: false,\n disableParentScroll: false,\n escapeToClose: false,\n focusOnOpen: true,\n fullscreen: false,\n hasBackdrop: false,\n propagateContainerEvents: false,\n transformTemplate: angular.bind(this, this._wrapTemplate),\n trapFocus: false,\n zIndex: MD_PANEL_Z_INDEX\n };\n\n /** @private {!Object} */\n this._config = {};\n\n /** @private {!Object} */\n this._presets = presets;\n\n /** @private @const */\n this._$rootElement = $rootElement;\n\n /** @private @const */\n this._$rootScope = $rootScope;\n\n /** @private @const */\n this._$injector = $injector;\n\n /** @private @const */\n this._$window = $window;\n\n /** @private @const */\n this._$mdUtil = this._$injector.get('$mdUtil');\n\n /** @private {!Object<string, !MdPanelRef>} */\n this._trackedPanels = {};\n\n /**\n * @private {!Object<string,\n * {panels: !Array<!MdPanelRef>,\n * openPanels: !Array<!MdPanelRef>,\n * maxOpen: number}>}\n */\n this._groups = Object.create(null);\n\n /**\n * Default animations that can be used within the panel.\n * @type {enum}\n */\n this.animation = MdPanelAnimation.animation;\n\n /**\n * Possible values of xPosition for positioning the panel relative to\n * another element.\n * @type {enum}\n */\n this.xPosition = MdPanelPosition.xPosition;\n\n /**\n * Possible values of yPosition for positioning the panel relative to\n * another element.\n * @type {enum}\n */\n this.yPosition = MdPanelPosition.yPosition;\n\n /**\n * Possible values for the interceptors that can be registered on a panel.\n * @type {enum}\n */\n this.interceptorTypes = MdPanelRef.interceptorTypes;\n\n /**\n * Possible values for closing of a panel.\n * @type {enum}\n */\n this.closeReasons = MdPanelRef.closeReasons;\n\n /**\n * Possible values of absolute position.\n * @type {enum}\n */\n this.absPosition = MdPanelPosition.absPosition;\n}\n\n\n/**\n * Creates a panel with the specified options.\n * @param {string|Object=} preset Name of a preset configuration that can be used to\n * extend the panel configuration.\n * @param {!Object=} config Configuration object for the panel.\n * @returns {!MdPanelRef}\n */\nMdPanelService.prototype.create = function(preset, config) {\n if (typeof preset === 'string') {\n preset = this._getPresetByName(preset);\n } else if (typeof preset === 'object' &&\n (angular.isUndefined(config) || !config)) {\n config = preset;\n preset = {};\n }\n\n preset = preset || {};\n config = config || {};\n\n // If the passed-in config contains an ID and the ID is within _trackedPanels,\n // return the tracked panel after updating its config with the passed-in\n // config.\n if (angular.isDefined(config.id) && this._trackedPanels[config.id]) {\n var trackedPanel = this._trackedPanels[config.id];\n angular.extend(trackedPanel.config, config);\n return trackedPanel;\n }\n\n // Combine the passed-in config, the _defaultConfigOptions, and the preset\n // configuration into the `_config`.\n this._config = angular.extend({\n // If no ID is set within the passed-in config, then create an arbitrary ID.\n id: config.id || 'panel_' + this._$mdUtil.nextUid(),\n scope: this._$rootScope.$new(true),\n attachTo: this._$rootElement\n }, this._defaultConfigOptions, config, preset);\n\n // Create the panelRef and add it to the `_trackedPanels` object.\n var panelRef = new MdPanelRef(this._config, this._$injector);\n this._trackedPanels[this._config.id] = panelRef;\n\n // Add the panel to each of its requested groups.\n if (this._config.groupName) {\n this._config.groupName = coerceToArray(this._config.groupName);\n angular.forEach(this._config.groupName, function(group) {\n panelRef.addToGroup(group);\n });\n }\n\n this._config.scope.$on('$destroy', angular.bind(panelRef, panelRef.detach));\n\n return panelRef;\n};\n\n\n/**\n * Creates and opens a panel with the specified options.\n * @param {string=} preset Name of a preset configuration that can be used to\n * extend the panel configuration.\n * @param {!Object=} config Configuration object for the panel.\n * @returns {!Q.IPromise<!MdPanelRef>} The panel created from create.\n */\nMdPanelService.prototype.open = function(preset, config) {\n var panelRef = this.create(preset, config);\n return panelRef.open().then(function() {\n return panelRef;\n });\n};\n\n\n/**\n * Gets a specific preset configuration object saved within `_presets`.\n * @param {string} preset Name of the preset to search for.\n * @returns {!Object} The preset configuration object.\n */\nMdPanelService.prototype._getPresetByName = function(preset) {\n if (!this._presets[preset]) {\n throw new Error('mdPanel: The panel preset configuration that you ' +\n 'requested does not exist. Use the $mdPanelProvider to create a ' +\n 'preset before requesting one.');\n }\n return this._presets[preset];\n};\n\n\n/**\n * Returns a new instance of the MdPanelPosition. Use this to create the\n * positioning object.\n * @returns {!MdPanelPosition}\n */\nMdPanelService.prototype.newPanelPosition = function() {\n return new MdPanelPosition(this._$injector);\n};\n\n\n/**\n * Returns a new instance of the MdPanelAnimation. Use this to create the\n * animation object.\n * @returns {!MdPanelAnimation}\n */\nMdPanelService.prototype.newPanelAnimation = function() {\n return new MdPanelAnimation(this._$injector);\n};\n\n\n/**\n * @ngdoc method\n * @name $mdPanel#newPanelGroup\n * @description\n * Creates a panel group and adds it to a tracked list of panel groups.\n * @param {string} groupName Name of the group to create.\n * @param {{maxOpen: number}=} config Configuration object that may contain the following\n * properties:\n *\n * - `maxOpen`: The maximum number of panels that are allowed open within a defined panel group.\n *\n * @returns {!{panels: !Array<!MdPanelRef>, openPanels: !Array<!MdPanelRef>, maxOpen: number}}\n * the new panel group\n */\nMdPanelService.prototype.newPanelGroup = function(groupName, config) {\n if (!this._groups[groupName]) {\n config = config || {};\n this._groups[groupName] = {\n panels: [],\n openPanels: [],\n maxOpen: config.maxOpen > 0 ? config.maxOpen : Infinity\n };\n }\n return this._groups[groupName];\n};\n\n\n/**\n * Sets the maximum number of panels in a group that can be opened at a given\n * time.\n * @param {string} groupName The name of the group to configure.\n * @param {number} maxOpen The maximum number of panels that can be\n * opened. Infinity can be passed in to remove the maxOpen limit.\n */\nMdPanelService.prototype.setGroupMaxOpen = function(groupName, maxOpen) {\n if (this._groups[groupName]) {\n this._groups[groupName].maxOpen = maxOpen;\n } else {\n throw new Error('mdPanel: Group does not exist yet. Call newPanelGroup().');\n }\n};\n\n\n/**\n * Determines if the current number of open panels within a group exceeds the\n * limit of allowed open panels.\n * @param {string} groupName The name of the group to check.\n * @returns {boolean} true if open count does exceed maxOpen and false if not.\n * @private\n */\nMdPanelService.prototype._openCountExceedsMaxOpen = function(groupName) {\n if (this._groups[groupName]) {\n var group = this._groups[groupName];\n return group.maxOpen > 0 && group.openPanels.length > group.maxOpen;\n }\n return false;\n};\n\n\n/**\n * Closes the first open panel within a specific group.\n * @param {string} groupName The name of the group.\n * @private\n */\nMdPanelService.prototype._closeFirstOpenedPanel = function(groupName) {\n var group = this._groups[groupName];\n if (group && group.openPanels.length) {\n group.openPanels[0].close();\n }\n};\n\n\n/**\n * Wraps the user's template in three elements:\n * - md-panel-outer-wrapper - covers the entire `attachTo` element.\n * - md-panel-inner-wrapper - handles the positioning.\n * - md-panel - contains the user's content and deals with the animations.\n * @param {string} origTemplate The original template.\n * @returns {string} The wrapped template.\n * @private\n */\nMdPanelService.prototype._wrapTemplate = function(origTemplate) {\n var template = origTemplate || '';\n\n // The panel should be initially rendered offscreen so we can calculate\n // height and width for positioning.\n return '' +\n '<div class=\"md-panel-outer-wrapper\">' +\n '<div class=\"md-panel-inner-wrapper _md-panel-offscreen\">' +\n '<div class=\"md-panel _md-panel-offscreen\">' + template + '</div>' +\n '</div>' +\n '</div>';\n};\n\n\n/**\n * Wraps a content element in a `md-panel-outer-wrapper`, as well as\n * a `md-panel-inner-wrapper`, and positions it off-screen. Allows for\n * proper control over positioning and animations.\n * @param {!JQLite} contentElement Element to be wrapped.\n * @return {!JQLite} Wrapper element.\n * @private\n */\nMdPanelService.prototype._wrapContentElement = function(contentElement) {\n var outerWrapper = angular.element(\n '<div class=\"md-panel-outer-wrapper\">' +\n '<div class=\"md-panel-inner-wrapper _md-panel-offscreen\"></div>' +\n '</div>'\n );\n\n contentElement.addClass('md-panel _md-panel-offscreen');\n outerWrapper.children().eq(0).append(contentElement);\n\n return outerWrapper;\n};\n\n\n/*****************************************************************************\n * MdPanelRef *\n *****************************************************************************/\n\n\n/**\n * A reference to a created panel. This reference contains a unique id for the\n * panel, along with properties/functions used to control the panel.\n * @param {!Object} config\n * @param {!IInjectorService} $injector\n * @final @constructor\n */\nfunction MdPanelRef(config, $injector) {\n // Injected variables.\n /** @private @const {!IQService} */\n this._$q = $injector.get('$q');\n\n /** @private @const {!angular.$mdCompiler} */\n this._$mdCompiler = $injector.get('$mdCompiler');\n\n /** @private @const {!angular.$mdConstant} */\n this._$mdConstant = $injector.get('$mdConstant');\n\n /** @private @const {!angular.$mdUtil} */\n this._$mdUtil = $injector.get('$mdUtil');\n\n /** @private @const {!angular.$mdTheming} */\n this._$mdTheming = $injector.get('$mdTheming');\n\n /** @private @const {!IRootScopeService} */\n this._$rootScope = $injector.get('$rootScope');\n\n /** @private @const {!angular.$animate} */\n this._$animate = $injector.get('$animate');\n\n /** @private @const {!MdPanelRef} */\n this._$mdPanel = $injector.get('$mdPanel');\n\n /** @private @const {!ILogService} */\n this._$log = $injector.get('$log');\n\n /** @private @const {!IWindowService} */\n this._$window = $injector.get('$window');\n\n /** @private @const {!Function} */\n this._$$rAF = $injector.get('$$rAF');\n\n // Public variables.\n /**\n * Unique id for the panelRef.\n * @type {string}\n */\n this.id = config.id;\n\n /** @type {!Object} */\n this.config = config;\n\n /** @type {!JQLite|undefined} */\n this.panelContainer = undefined;\n\n /** @type {!JQLite|undefined} */\n this.panelEl = undefined;\n\n /** @type {!JQLite|undefined} */\n this.innerWrapper = undefined;\n\n /**\n * Whether the panel is attached. This is synchronous. When attach is called,\n * isAttached is set to true. When detach is called, isAttached is set to\n * false.\n * @type {boolean}\n */\n this.isAttached = false;\n\n // Private variables.\n /** @private {Array<function()>} */\n this._removeListeners = [];\n\n /** @private {!JQLite|undefined} */\n this._topFocusTrap = undefined;\n\n /** @private {!JQLite|undefined} */\n this._bottomFocusTrap = undefined;\n\n /** @private {!$mdPanel|undefined} */\n this._backdropRef = undefined;\n\n /** @private {Function?} */\n this._restoreScroll = null;\n\n /**\n * Keeps track of all the panel interceptors.\n * @private {!Object}\n */\n this._interceptors = Object.create(null);\n\n /**\n * Cleanup function, provided by `$mdCompiler` and assigned after the element\n * has been compiled. When `contentElement` is used, the function is used to\n * restore the element to it's proper place in the DOM.\n * @private {Function|null}\n */\n this._compilerCleanup = null;\n\n /**\n * Cache for saving and restoring element inline styles, CSS classes etc.\n * @type {{styles: string, classes: string}}\n */\n this._restoreCache = {\n styles: '',\n classes: ''\n };\n}\n\n\nMdPanelRef.interceptorTypes = {\n CLOSE: 'onClose'\n};\n\n\n/**\n * Opens an already created and configured panel. If the panel is already\n * visible, does nothing.\n * @returns {!Q.IPromise<!MdPanelRef>} A promise that is resolved when\n * the panel is opened and animations finish.\n */\nMdPanelRef.prototype.open = function() {\n var self = this;\n return this._$q(function(resolve, reject) {\n var done = self._done(resolve, self);\n var show = self._simpleBind(self.show, self);\n var checkGroupMaxOpen = function() {\n if (self.config.groupName) {\n self.config.groupName = coerceToArray(self.config.groupName);\n angular.forEach(self.config.groupName, function(group) {\n if (self._$mdPanel._openCountExceedsMaxOpen(group)) {\n self._$mdPanel._closeFirstOpenedPanel(group);\n }\n });\n }\n };\n\n self.attach()\n .then(show)\n .then(checkGroupMaxOpen)\n .then(done)\n .catch(reject);\n });\n};\n\n\n/**\n * Closes the panel.\n * @param {string} closeReason The event type that triggered the close.\n * @returns {!Q.IPromise<!MdPanelRef>} A promise that is resolved when\n * the panel is closed and animations finish.\n */\nMdPanelRef.prototype.close = function(closeReason) {\n var self = this;\n\n return this._$q(function(resolve, reject) {\n self._callInterceptors(MdPanelRef.interceptorTypes.CLOSE).then(function() {\n var done = self._done(resolve, self);\n var detach = self._simpleBind(self.detach, self);\n var onCloseSuccess = self.config['onCloseSuccess'] || angular.noop;\n onCloseSuccess = angular.bind(self, onCloseSuccess, self, closeReason);\n\n self.hide()\n .then(detach)\n .then(done)\n .then(onCloseSuccess)\n .catch(reject);\n }, reject);\n });\n};\n\n\n/**\n * Attaches the panel. The panel will be hidden afterwards.\n * @returns {!Q.IPromise<!MdPanelRef>} A promise that is resolved when\n * the panel is attached.\n */\nMdPanelRef.prototype.attach = function() {\n if (this.isAttached && this.panelEl) {\n return this._$q.when(this);\n }\n\n var self = this;\n return this._$q(function(resolve, reject) {\n var done = self._done(resolve, self);\n var onDomAdded = self.config['onDomAdded'] || angular.noop;\n var addListeners = function(response) {\n self.isAttached = true;\n self._addEventListeners();\n return response;\n };\n\n self._$q.all([\n self._createBackdrop(),\n self._createPanel()\n .then(addListeners)\n .catch(reject)\n ]).then(onDomAdded)\n .then(done)\n .catch(reject);\n });\n};\n\n\n/**\n * Only detaches the panel. Will NOT hide the panel first.\n * @returns {!Q.IPromise<!MdPanelRef>} A promise that is resolved when\n * the panel is detached.\n */\nMdPanelRef.prototype.detach = function() {\n if (!this.isAttached) {\n return this._$q.when(this);\n }\n\n var self = this;\n var onDomRemoved = self.config['onDomRemoved'] || angular.noop;\n\n var detachFn = function() {\n self._removeEventListeners();\n\n // Remove the focus traps that we added earlier for keeping focus within\n // the panel.\n if (self._topFocusTrap && self._topFocusTrap.parentNode) {\n self._topFocusTrap.parentNode.removeChild(self._topFocusTrap);\n }\n\n if (self._bottomFocusTrap && self._bottomFocusTrap.parentNode) {\n self._bottomFocusTrap.parentNode.removeChild(self._bottomFocusTrap);\n }\n\n if (self._restoreCache.classes) {\n self.panelEl[0].className = self._restoreCache.classes;\n }\n\n // Either restore the saved styles or clear the ones set by mdPanel.\n self.panelEl[0].style.cssText = self._restoreCache.styles || '';\n\n self._compilerCleanup();\n self.panelContainer.remove();\n self.isAttached = false;\n return self._$q.when(self);\n };\n\n if (this._restoreScroll) {\n this._restoreScroll();\n this._restoreScroll = null;\n }\n\n return this._$q(function(resolve, reject) {\n var done = self._done(resolve, self);\n\n self._$q.all([\n detachFn(),\n self._backdropRef ? self._backdropRef.detach() : true\n ]).then(onDomRemoved)\n .then(done)\n .catch(reject);\n });\n};\n\n\n/**\n * Destroys the panel. The Panel cannot be opened again after this.\n */\nMdPanelRef.prototype.destroy = function() {\n var self = this;\n if (this.config.groupName) {\n this.config.groupName = coerceToArray(this.config.groupName);\n angular.forEach(this.config.groupName, function(group) {\n self.removeFromGroup(group);\n });\n }\n this.config.scope.$destroy();\n this.config.locals = null;\n this.config.onDomAdded = null;\n this.config.onDomRemoved = null;\n this.config.onRemoving = null;\n this.config.onOpenComplete = null;\n this._interceptors = undefined;\n};\n\n\n/**\n * Shows the panel.\n * @returns {!Q.IPromise<!MdPanelRef>} A promise that is resolved when\n * the panel has shown and animations finish.\n */\nMdPanelRef.prototype.show = function() {\n if (!this.panelContainer) {\n return this._$q(function(resolve, reject) {\n reject('mdPanel: Panel does not exist yet. Call open() or attach().');\n });\n }\n\n if (!this.panelContainer.hasClass(MD_PANEL_HIDDEN)) {\n return this._$q.when(this);\n }\n\n var self = this;\n var animatePromise = function() {\n self.panelContainer.removeClass(MD_PANEL_HIDDEN);\n return self._animateOpen();\n };\n\n return this._$q(function(resolve, reject) {\n var done = self._done(resolve, self);\n var onOpenComplete = self.config['onOpenComplete'] || angular.noop;\n var addToGroupOpen = function() {\n if (self.config.groupName) {\n self.config.groupName = coerceToArray(self.config.groupName);\n angular.forEach(self.config.groupName, function(group) {\n group = self._$mdPanel._groups[group];\n if (group) {\n group.openPanels.push(self);\n }\n });\n }\n };\n\n self._$q.all([\n self._backdropRef ? self._backdropRef.show() : self,\n animatePromise().then(function() { self._focusOnOpen(); }, reject)\n ]).then(onOpenComplete)\n .then(addToGroupOpen)\n .then(done)\n .catch(reject);\n });\n};\n\n\n/**\n * Hides the panel.\n * @returns {!Q.IPromise<!MdPanelRef>} A promise that is resolved when\n * the panel has hidden and animations finish.\n */\nMdPanelRef.prototype.hide = function() {\n if (!this.panelContainer) {\n return this._$q(function(resolve, reject) {\n reject('mdPanel: Panel does not exist yet. Call open() or attach().');\n });\n }\n\n if (this.panelContainer.hasClass(MD_PANEL_HIDDEN)) {\n return this._$q.when(this);\n }\n\n var self = this;\n\n return this._$q(function(resolve, reject) {\n var done = self._done(resolve, self);\n var onRemoving = self.config['onRemoving'] || angular.noop;\n var hidePanel = function() {\n self.panelContainer.addClass(MD_PANEL_HIDDEN);\n };\n var removeFromGroupOpen = function() {\n if (self.config.groupName) {\n var index;\n self.config.groupName = coerceToArray(self.config.groupName);\n angular.forEach(self.config.groupName, function(group) {\n group = self._$mdPanel._groups[group];\n index = group.openPanels.indexOf(self);\n if (index > -1) {\n group.openPanels.splice(index, 1);\n }\n });\n }\n };\n var focusOnOrigin = function() {\n var origin = self.config['origin'];\n if (origin) {\n getElement(origin).focus();\n }\n };\n\n self._$q.all([\n self._backdropRef ? self._backdropRef.hide() : self,\n self._animateClose()\n .then(onRemoving)\n .then(hidePanel)\n .then(removeFromGroupOpen)\n .then(focusOnOrigin)\n .catch(reject)\n ]).then(done, reject);\n });\n};\n\n/**\n * Compiles the panel, according to the passed in config and appends it to\n * the DOM. Helps normalize differences in the compilation process between\n * using a string template and a content element.\n * @returns {!Q.IPromise<!MdPanelRef>} Promise that is resolved when\n * the element has been compiled and added to the DOM.\n * @private\n */\nMdPanelRef.prototype._compile = function() {\n var self = this;\n\n // Compile the element via $mdCompiler. Note that when using a\n // contentElement, the element isn't actually being compiled, rather the\n // compiler saves it's place in the DOM and provides a way of restoring it.\n return self._$mdCompiler.compile(self.config).then(function(compileData) {\n var config = self.config;\n\n if (config.contentElement) {\n var panelEl = compileData.element;\n\n // Since mdPanel modifies the inline styles and CSS classes, we need\n // to save them in order to be able to restore on close.\n self._restoreCache.styles = panelEl[0].style.cssText;\n self._restoreCache.classes = panelEl[0].className;\n\n self.panelContainer = self._$mdPanel._wrapContentElement(panelEl);\n self.panelEl = panelEl;\n } else {\n self.panelContainer = compileData.link(config['scope']);\n self.panelEl = angular.element(\n self.panelContainer[0].querySelector('.md-panel')\n );\n }\n\n // Save a reference to the inner wrapper.\n self.innerWrapper = angular.element(\n self.panelContainer[0].querySelector('.md-panel-inner-wrapper')\n );\n\n // Save a reference to the cleanup function from the compiler.\n self._compilerCleanup = compileData.cleanup;\n\n // Attach the panel to the proper place in the DOM.\n getElement(self.config['attachTo']).append(self.panelContainer);\n\n return self;\n });\n};\n\n\n/**\n * Creates a panel and adds it to the dom.\n * @returns {!Q.IPromise} A promise that is resolved when the panel is\n * created.\n * @private\n */\nMdPanelRef.prototype._createPanel = function() {\n var self = this;\n\n return this._$q(function(resolve, reject) {\n if (!self.config.locals) {\n self.config.locals = {};\n }\n\n self.config.locals.mdPanelRef = self;\n\n self._compile().then(function() {\n if (self.config['disableParentScroll']) {\n self._restoreScroll = self._$mdUtil.disableScrollAround(\n null,\n self.panelContainer,\n { disableScrollMask: true }\n );\n }\n\n // Add a custom CSS class to the panel element.\n if (self.config['panelClass']) {\n self.panelEl.addClass(self.config['panelClass']);\n }\n\n // Handle click and touch events for the panel container.\n if (self.config['propagateContainerEvents']) {\n self.panelContainer.css('pointer-events', 'none');\n self.panelEl.css('pointer-events', 'all');\n }\n\n // Panel may be outside the $rootElement, tell ngAnimate to animate\n // regardless.\n if (self._$animate.pin) {\n self._$animate.pin(\n self.panelContainer,\n getElement(self.config['attachTo'])\n );\n }\n\n self._configureTrapFocus();\n self._addStyles().then(function() {\n resolve(self);\n }, reject);\n }, reject);\n\n });\n};\n\n\n/**\n * Adds the styles for the panel, such as positioning and z-index. Also,\n * themes the panel element and panel container using `$mdTheming`.\n * @returns {!Q.IPromise<!MdPanelRef>}\n * @private\n */\nMdPanelRef.prototype._addStyles = function() {\n var self = this;\n return this._$q(function(resolve) {\n self.panelContainer.css('z-index', self.config['zIndex']);\n self.innerWrapper.css('z-index', self.config['zIndex'] + 1);\n\n var hideAndResolve = function() {\n // Theme the element and container.\n self._setTheming();\n\n // Remove offscreen classes and add hidden class.\n self.panelEl.removeClass('_md-panel-offscreen');\n self.innerWrapper.removeClass('_md-panel-offscreen');\n self.panelContainer.addClass(MD_PANEL_HIDDEN);\n\n resolve(self);\n };\n\n if (self.config['fullscreen']) {\n self.panelEl.addClass('_md-panel-fullscreen');\n hideAndResolve();\n return; // Don't setup positioning.\n }\n\n var positionConfig = self.config['position'];\n if (!positionConfig) {\n hideAndResolve();\n return; // Don't setup positioning.\n }\n\n // Wait for angular to finish processing the template\n self._$rootScope['$$postDigest'](function() {\n // Position it correctly. This is necessary so that the panel will have a\n // defined height and width.\n self._updatePosition(true);\n\n // Theme the element and container.\n self._setTheming();\n\n resolve(self);\n });\n });\n};\n\n\n/**\n * Sets the `$mdTheming` classes on the `panelContainer` and `panelEl`.\n * @private\n */\nMdPanelRef.prototype._setTheming = function() {\n this._$mdTheming(this.panelEl);\n this._$mdTheming(this.panelContainer);\n};\n\n\n/**\n * Updates the position configuration of a panel\n * @param {!MdPanelPosition} position\n */\nMdPanelRef.prototype.updatePosition = function(position) {\n if (!this.panelContainer) {\n throw new Error(\n 'mdPanel: Panel does not exist yet. Call open() or attach().');\n }\n\n this.config['position'] = position;\n this._updatePosition();\n};\n\n\n/**\n * Calculates and updates the position of the panel.\n * @param {boolean=} init\n * @private\n */\nMdPanelRef.prototype._updatePosition = function(init) {\n var positionConfig = this.config['position'];\n\n if (positionConfig) {\n positionConfig._setPanelPosition(this.innerWrapper);\n\n // Hide the panel now that position is known.\n if (init) {\n this.panelEl.removeClass('_md-panel-offscreen');\n this.innerWrapper.removeClass('_md-panel-offscreen');\n this.panelContainer.addClass(MD_PANEL_HIDDEN);\n }\n\n this.innerWrapper.css(\n MdPanelPosition.absPosition.TOP,\n positionConfig.getTop()\n );\n this.innerWrapper.css(\n MdPanelPosition.absPosition.BOTTOM,\n positionConfig.getBottom()\n );\n this.innerWrapper.css(\n MdPanelPosition.absPosition.LEFT,\n positionConfig.getLeft()\n );\n this.innerWrapper.css(\n MdPanelPosition.absPosition.RIGHT,\n positionConfig.getRight()\n );\n }\n};\n\n\n/**\n * Focuses on the panel or the first focus target.\n * @private\n */\nMdPanelRef.prototype._focusOnOpen = function() {\n if (this.config['focusOnOpen']) {\n // Wait for the template to finish rendering to guarantee md-autofocus has\n // finished adding the class md-autofocus, otherwise the focusable element\n // isn't available to focus.\n var self = this;\n this._$rootScope['$$postDigest'](function() {\n var target = self._$mdUtil.findFocusTarget(self.panelEl) ||\n self.panelEl;\n target.focus();\n });\n }\n};\n\n\n/**\n * Shows the backdrop.\n * @returns {!Q.IPromise} A promise that is resolved when the backdrop\n * is created and attached.\n * @private\n */\nMdPanelRef.prototype._createBackdrop = function() {\n if (this.config.hasBackdrop) {\n if (!this._backdropRef) {\n var backdropAnimation = this._$mdPanel.newPanelAnimation()\n .openFrom(this.config.attachTo)\n .withAnimation({\n open: '_md-opaque-enter',\n close: '_md-opaque-leave'\n });\n\n if (this.config.animation) {\n backdropAnimation.duration(this.config.animation._rawDuration);\n }\n\n var backdropConfig = {\n animation: backdropAnimation,\n attachTo: this.config.attachTo,\n focusOnOpen: false,\n panelClass: '_md-panel-backdrop',\n zIndex: this.config.zIndex - 1\n };\n\n this._backdropRef = this._$mdPanel.create(backdropConfig);\n }\n if (!this._backdropRef.isAttached) {\n return this._backdropRef.attach();\n }\n }\n};\n\n\n/**\n * Listen for escape keys and outside clicks to auto close.\n * @private\n */\nMdPanelRef.prototype._addEventListeners = function() {\n this._configureEscapeToClose();\n this._configureClickOutsideToClose();\n this._configureScrollListener();\n};\n\n\n/**\n * Remove event listeners added in _addEventListeners.\n * @private\n */\nMdPanelRef.prototype._removeEventListeners = function() {\n this._removeListeners && this._removeListeners.forEach(function(removeFn) {\n removeFn();\n });\n this._removeListeners = [];\n};\n\n\n/**\n * Setup the escapeToClose event listeners.\n * @private\n */\nMdPanelRef.prototype._configureEscapeToClose = function() {\n if (this.config['escapeToClose']) {\n var parentTarget = getElement(this.config['attachTo']);\n var self = this;\n\n var keyHandlerFn = function(ev) {\n if (ev.keyCode === self._$mdConstant.KEY_CODE.ESCAPE) {\n ev.stopPropagation();\n ev.preventDefault();\n\n self.close(MdPanelRef.closeReasons.ESCAPE);\n }\n };\n\n // Add keydown listeners\n this.panelContainer.on('keydown', keyHandlerFn);\n parentTarget.on('keydown', keyHandlerFn);\n\n // Queue remove listeners function\n this._removeListeners.push(function() {\n self.panelContainer.off('keydown', keyHandlerFn);\n parentTarget.off('keydown', keyHandlerFn);\n });\n }\n};\n\n\n/**\n * Setup the clickOutsideToClose event listeners.\n * @private\n */\nMdPanelRef.prototype._configureClickOutsideToClose = function() {\n if (this.config['clickOutsideToClose']) {\n var target = this.config['propagateContainerEvents'] ?\n angular.element(document.body) :\n this.panelContainer;\n var sourceEl;\n\n // Keep track of the element on which the mouse originally went down\n // so that we can only close the backdrop when the 'click' started on it.\n // A simple 'click' handler does not work, it sets the target object as the\n // element the mouse went down on.\n var mousedownHandler = function(ev) {\n sourceEl = ev.target;\n };\n\n // We check if our original element and the target is the backdrop\n // because if the original was the backdrop and the target was inside the\n // panel we don't want to panel to close.\n var self = this;\n var mouseupHandler = function(ev) {\n if (self.config['propagateContainerEvents']) {\n\n // We check if the sourceEl of the event is the panel element or one\n // of it's children. If it is not, then close the panel.\n if (sourceEl !== self.panelEl[0] && !self.panelEl[0].contains(sourceEl)) {\n self.close();\n }\n\n } else if (sourceEl === target[0] && ev.target === target[0]) {\n ev.stopPropagation();\n ev.preventDefault();\n\n self.close(MdPanelRef.closeReasons.CLICK_OUTSIDE);\n }\n };\n\n // Add listeners\n target.on('mousedown', mousedownHandler);\n target.on('mouseup', mouseupHandler);\n\n // Queue remove listeners function\n this._removeListeners.push(function() {\n target.off('mousedown', mousedownHandler);\n target.off('mouseup', mouseupHandler);\n });\n }\n};\n\n\n/**\n * Configures the listeners for updating the panel position on scroll.\n * @private\n*/\nMdPanelRef.prototype._configureScrollListener = function() {\n // No need to bind the event if scrolling is disabled.\n if (!this.config['disableParentScroll']) {\n var updatePosition = angular.bind(this, this._updatePosition);\n var debouncedUpdatePosition = this._$$rAF.throttle(updatePosition);\n var self = this;\n\n var onScroll = function() {\n debouncedUpdatePosition();\n };\n\n // Add listeners.\n this._$window.addEventListener('scroll', onScroll, true);\n\n // Queue remove listeners function.\n this._removeListeners.push(function() {\n self._$window.removeEventListener('scroll', onScroll, true);\n });\n }\n};\n\n\n/**\n * Setup the focus traps. These traps will wrap focus when tabbing past the\n * panel. When shift-tabbing, the focus will stick in place.\n * @private\n */\nMdPanelRef.prototype._configureTrapFocus = function() {\n // Focus doesn't remain inside of the panel without this.\n this.panelEl.attr('tabIndex', '-1');\n if (this.config['trapFocus']) {\n var element = this.panelEl;\n // Set up elements before and after the panel to capture focus and\n // redirect back into the panel.\n if (!FOCUS_TRAP_TEMPLATE) {\n var template = document.createElement('div');\n template.className = '_md-panel-focus-trap';\n template.tabIndex = 0;\n FOCUS_TRAP_TEMPLATE = angular.element(template);\n }\n this._topFocusTrap = FOCUS_TRAP_TEMPLATE.clone()[0];\n this._bottomFocusTrap = FOCUS_TRAP_TEMPLATE.clone()[0];\n\n // When focus is about to move out of the panel, we want to intercept it\n // and redirect it back to the panel element.\n var focusHandler = function() {\n element.focus();\n };\n this._topFocusTrap.addEventListener('focus', focusHandler);\n this._bottomFocusTrap.addEventListener('focus', focusHandler);\n\n // Queue remove listeners function\n this._removeListeners.push(this._simpleBind(function() {\n this._topFocusTrap.removeEventListener('focus', focusHandler);\n this._bottomFocusTrap.removeEventListener('focus', focusHandler);\n }, this));\n\n // The top focus trap inserted immediately before the md-panel element (as\n // a sibling). The bottom focus trap inserted immediately after the\n // md-panel element (as a sibling).\n element[0].parentNode.insertBefore(this._topFocusTrap, element[0]);\n element.after(this._bottomFocusTrap);\n }\n};\n\n\n/**\n * Updates the animation of a panel.\n * @param {!MdPanelAnimation} animation\n */\nMdPanelRef.prototype.updateAnimation = function(animation) {\n this.config['animation'] = animation;\n\n if (this._backdropRef) {\n this._backdropRef.config.animation.duration(animation._rawDuration);\n }\n};\n\n\n/**\n * Animate the panel opening.\n * @returns {!Q.IPromise} A promise that is resolved when the panel has\n * animated open.\n * @private\n */\nMdPanelRef.prototype._animateOpen = function() {\n this.panelContainer.addClass('md-panel-is-showing');\n var animationConfig = this.config['animation'];\n if (!animationConfig) {\n // Promise is in progress, return it.\n this.panelContainer.addClass('_md-panel-shown');\n return this._$q.when(this);\n }\n\n var self = this;\n return this._$q(function(resolve) {\n var done = self._done(resolve, self);\n var warnAndOpen = function() {\n self._$log.warn(\n 'mdPanel: MdPanel Animations failed. ' +\n 'Showing panel without animating.');\n done();\n };\n\n animationConfig.animateOpen(self.panelEl)\n .then(done, warnAndOpen);\n });\n};\n\n\n/**\n * Animate the panel closing.\n * @returns {!Q.IPromise} A promise that is resolved when the panel has animated closed.\n * @private\n */\nMdPanelRef.prototype._animateClose = function() {\n var self = this;\n var animationConfig = this.config['animation'];\n\n if (!animationConfig) {\n this.panelContainer.removeClass('md-panel-is-showing');\n this.panelContainer.removeClass('_md-panel-shown');\n return this._$q.when(this);\n } else {\n return this._$q(function (resolve) {\n var done = function () {\n self.panelContainer.removeClass('md-panel-is-showing');\n // Remove the transform so that re-used panels don't accumulate transforms.\n self.panelEl.css('transform', '');\n resolve(self);\n };\n var warnAndClose = function () {\n self._$log.warn(\n 'mdPanel: MdPanel Animations failed. Hiding panel without animating.');\n done();\n };\n\n animationConfig.animateClose(self.panelEl).then(done, warnAndClose);\n });\n }\n};\n\n\n/**\n * Registers a interceptor with the panel. The callback should return a promise,\n * which will allow the action to continue when it gets resolved, or will\n * prevent an action if it is rejected.\n * @param {string} type Type of interceptor.\n * @param {!Q.IPromise<!any>} callback Callback to be registered.\n * @returns {!MdPanelRef}\n */\nMdPanelRef.prototype.registerInterceptor = function(type, callback) {\n var error = null;\n\n if (!angular.isString(type)) {\n error = 'Interceptor type must be a string, instead got ' + typeof type;\n } else if (!angular.isFunction(callback)) {\n error = 'Interceptor callback must be a function, instead got ' + typeof callback;\n }\n\n if (error) {\n throw new Error('MdPanel: ' + error);\n }\n\n var interceptors = this._interceptors[type] = this._interceptors[type] || [];\n\n if (interceptors.indexOf(callback) === -1) {\n interceptors.push(callback);\n }\n\n return this;\n};\n\n\n/**\n * Removes a registered interceptor.\n * @param {string} type Type of interceptor to be removed.\n * @param {Function} callback Interceptor to be removed.\n * @returns {!MdPanelRef}\n */\nMdPanelRef.prototype.removeInterceptor = function(type, callback) {\n var index = this._interceptors[type] ?\n this._interceptors[type].indexOf(callback) : -1;\n\n if (index > -1) {\n this._interceptors[type].splice(index, 1);\n }\n\n return this;\n};\n\n\n/**\n * Removes all interceptors.\n * @param {string=} type Type of interceptors to be removed.\n * If ommited, all interceptors types will be removed.\n * @returns {!MdPanelRef}\n */\nMdPanelRef.prototype.removeAllInterceptors = function(type) {\n if (type) {\n this._interceptors[type] = [];\n } else {\n this._interceptors = Object.create(null);\n }\n\n return this;\n};\n\n\n/**\n * Invokes all the interceptors of a certain type sequantially in\n * reverse order. Works in a similar way to `$q.all`, except it\n * respects the order of the functions.\n * @param {string} type Type of interceptors to be invoked.\n * @returns {!Q.IPromise<!MdPanelRef>}\n * @private\n */\nMdPanelRef.prototype._callInterceptors = function(type) {\n var self = this;\n var $q = self._$q;\n var interceptors = self._interceptors && self._interceptors[type] || [];\n\n return interceptors.reduceRight(function(promise, interceptor) {\n var isPromiseLike = interceptor && angular.isFunction(interceptor.then);\n var response = isPromiseLike ? interceptor : null;\n\n /**\n * For interceptors to reject/cancel subsequent portions of the chain, simply\n * return a `$q.reject(<value>)`\n */\n return promise.then(function() {\n if (!response) {\n try {\n response = interceptor(self);\n } catch (e) {\n response = $q.reject(e);\n }\n }\n\n return response;\n });\n }, $q.resolve(self));\n};\n\n\n/**\n * Faster, more basic than angular.bind\n * http://jsperf.com/angular-bind-vs-custom-vs-native\n * @param {function} callback\n * @param {!Object} self\n * @return {function} Callback function with a bound self.\n */\nMdPanelRef.prototype._simpleBind = function(callback, self) {\n return function(value) {\n return callback.apply(self, value);\n };\n};\n\n\n/**\n * @param {function|IQResolveReject} callback\n * @param {!Object} self\n * @return {function} Callback function with a self param.\n */\nMdPanelRef.prototype._done = function(callback, self) {\n return function() {\n callback(self);\n };\n};\n\n\n/**\n * Adds a panel to a group if the panel does not exist within the group already.\n * A panel can only exist within a single group.\n * @param {string} groupName The name of the group.\n */\nMdPanelRef.prototype.addToGroup = function(groupName) {\n if (!this._$mdPanel._groups[groupName]) {\n this._$mdPanel.newPanelGroup(groupName);\n }\n\n var group = this._$mdPanel._groups[groupName];\n var index = group.panels.indexOf(this);\n\n if (index < 0) {\n group.panels.push(this);\n }\n};\n\n\n/**\n * Removes a panel from a group if the panel exists within that group. The group\n * must be created ahead of time.\n * @param {string} groupName The name of the group.\n */\nMdPanelRef.prototype.removeFromGroup = function(groupName) {\n if (!this._$mdPanel._groups[groupName]) {\n throw new Error('mdPanel: The group ' + groupName + ' does not exist.');\n }\n\n var group = this._$mdPanel._groups[groupName];\n var index = group.panels.indexOf(this);\n\n if (index > -1) {\n group.panels.splice(index, 1);\n }\n};\n\n\n/**\n * Possible default closeReasons for the close function.\n * @enum {string}\n */\nMdPanelRef.closeReasons = {\n CLICK_OUTSIDE: 'clickOutsideToClose',\n ESCAPE: 'escapeToClose',\n};\n\n\n/*****************************************************************************\n * MdPanelPosition *\n *****************************************************************************/\n\n\n/**\n * Position configuration object. To use, create an MdPanelPosition with the\n * desired properties, then pass the object as part of $mdPanel creation.\n *\n * Example:\n *\n * var panelPosition = new MdPanelPosition()\n * .relativeTo(myButtonEl)\n * .addPanelPosition(\n * $mdPanel.xPosition.CENTER,\n * $mdPanel.yPosition.ALIGN_TOPS\n * );\n *\n * $mdPanel.create({\n * position: panelPosition\n * });\n *\n * @param {!IInjectorService} $injector\n * @final @constructor\n */\nfunction MdPanelPosition($injector) {\n /** @private @const {!IWindowService} */\n this._$window = $injector.get('$window');\n\n /** @private {boolean} */\n this._isRTL = $injector.get('$mdUtil').isRtl();\n\n /** @private @const {!angular.$mdConstant} */\n this._$mdConstant = $injector.get('$mdConstant');\n\n /** @private {boolean} */\n this._absolute = false;\n\n /** @private {!JQLite} */\n this._relativeToEl = undefined;\n\n /** @private {string} */\n this._top = '';\n\n /** @private {string} */\n this._bottom = '';\n\n /** @private {string} */\n this._left = '';\n\n /** @private {string} */\n this._right = '';\n\n /** @private {!Array<string>} */\n this._translateX = [];\n\n /** @private {!Array<string>} */\n this._translateY = [];\n\n /** @private {!Array<{x:string, y:string}>} */\n this._positions = [];\n\n /** @private {?{x:string, y:string}} */\n this._actualPosition = undefined;\n}\n\n\n/**\n * Possible values of xPosition.\n * @enum {string}\n */\nMdPanelPosition.xPosition = {\n CENTER: 'center',\n ALIGN_START: 'align-start',\n ALIGN_END: 'align-end',\n OFFSET_START: 'offset-start',\n OFFSET_END: 'offset-end'\n};\n\n\n/**\n * Possible values of yPosition.\n * @enum {string}\n */\nMdPanelPosition.yPosition = {\n CENTER: 'center',\n ALIGN_TOPS: 'align-tops',\n ALIGN_BOTTOMS: 'align-bottoms',\n ABOVE: 'above',\n BELOW: 'below'\n};\n\n\n/**\n * Possible values of absolute position.\n * @enum {string}\n */\nMdPanelPosition.absPosition = {\n TOP: 'top',\n RIGHT: 'right',\n BOTTOM: 'bottom',\n LEFT: 'left'\n};\n\n/**\n * Margin between the edges of a panel and the viewport.\n * @const {number}\n */\nMdPanelPosition.viewportMargin = 8;\n\n\n/**\n * Sets absolute positioning for the panel.\n * @return {!MdPanelPosition}\n */\nMdPanelPosition.prototype.absolute = function() {\n this._absolute = true;\n return this;\n};\n\n\n/**\n * Sets the value of a position for the panel. Clears any previously set\n * position.\n * @param {string} position Position to set\n * @param {string=} value Value of the position. Defaults to '0'.\n * @returns {!MdPanelPosition}\n * @private\n */\nMdPanelPosition.prototype._setPosition = function(position, value) {\n if (position === MdPanelPosition.absPosition.RIGHT ||\n position === MdPanelPosition.absPosition.LEFT) {\n this._left = this._right = '';\n } else if (\n position === MdPanelPosition.absPosition.BOTTOM ||\n position === MdPanelPosition.absPosition.TOP) {\n this._top = this._bottom = '';\n } else {\n var positions = Object.keys(MdPanelPosition.absPosition).join()\n .toLowerCase();\n\n throw new Error('mdPanel: Position must be one of ' + positions + '.');\n }\n\n this['_' + position] = angular.isString(value) ? value : '0';\n\n return this;\n};\n\n\n/**\n * Sets the value of `top` for the panel. Clears any previously set vertical\n * position.\n * @param {string=} top Value of `top`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.top = function(top) {\n return this._setPosition(MdPanelPosition.absPosition.TOP, top);\n};\n\n\n/**\n * Sets the value of `bottom` for the panel. Clears any previously set vertical\n * position.\n * @param {string=} bottom Value of `bottom`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.bottom = function(bottom) {\n return this._setPosition(MdPanelPosition.absPosition.BOTTOM, bottom);\n};\n\n\n/**\n * Sets the panel to the start of the page - `left` if `ltr` or `right` for\n * `rtl`. Clears any previously set horizontal position.\n * @param {string=} start Value of position. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.start = function(start) {\n var position = this._isRTL ? MdPanelPosition.absPosition.RIGHT : MdPanelPosition.absPosition.LEFT;\n return this._setPosition(position, start);\n};\n\n\n/**\n * Sets the panel to the end of the page - `right` if `ltr` or `left` for `rtl`.\n * Clears any previously set horizontal position.\n * @param {string=} end Value of position. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.end = function(end) {\n var position = this._isRTL ? MdPanelPosition.absPosition.LEFT : MdPanelPosition.absPosition.RIGHT;\n return this._setPosition(position, end);\n};\n\n\n/**\n * Sets the value of `left` for the panel. Clears any previously set\n * horizontal position.\n * @param {string=} left Value of `left`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.left = function(left) {\n return this._setPosition(MdPanelPosition.absPosition.LEFT, left);\n};\n\n\n/**\n * Sets the value of `right` for the panel. Clears any previously set\n * horizontal position.\n * @param {string=} right Value of `right`. Defaults to '0'.\n * @returns {!MdPanelPosition}\n*/\nMdPanelPosition.prototype.right = function(right) {\n return this._setPosition(MdPanelPosition.absPosition.RIGHT, right);\n};\n\n\n/**\n * Centers the panel horizontally in the viewport. Clears any previously set\n * horizontal position.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.centerHorizontally = function() {\n this._left = '50%';\n this._right = '';\n this._translateX = ['-50%'];\n return this;\n};\n\n\n/**\n * Centers the panel vertically in the viewport. Clears any previously set\n * vertical position.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.centerVertically = function() {\n this._top = '50%';\n this._bottom = '';\n this._translateY = ['-50%'];\n return this;\n};\n\n\n/**\n * Centers the panel horizontally and vertically in the viewport. This is\n * equivalent to calling both `centerHorizontally` and `centerVertically`.\n * Clears any previously set horizontal and vertical positions.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.center = function() {\n return this.centerHorizontally().centerVertically();\n};\n\n\n/**\n * Sets element for relative positioning.\n * @param {string|!Element|!JQLite} element Query selector, DOM element,\n * or angular element to set the panel relative to.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.relativeTo = function(element) {\n this._absolute = false;\n this._relativeToEl = getElement(element);\n return this;\n};\n\n\n/**\n * Sets the x and y positions for the panel relative to another element.\n * @param {string} xPosition must be one of the MdPanelPosition.xPosition\n * values.\n * @param {string} yPosition must be one of the MdPanelPosition.yPosition\n * values.\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.addPanelPosition = function(xPosition, yPosition) {\n if (!this._relativeToEl) {\n throw new Error('mdPanel: addPanelPosition can only be used with ' +\n 'relative positioning. Set relativeTo first.');\n }\n\n validatePosition(MdPanelPosition.xPosition, xPosition);\n validatePosition(MdPanelPosition.yPosition, yPosition);\n\n this._positions.push({\n x: xPosition,\n y: yPosition\n });\n\n return this;\n};\n\n\n/**\n * Sets the value of the offset in the x-direction. This will add to any\n * previously set offsets.\n * @param {string|number|function(MdPanelPosition): string} offsetX\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.withOffsetX = function(offsetX) {\n this._translateX.push(addUnits(offsetX));\n return this;\n};\n\n\n/**\n * Sets the value of the offset in the y-direction. This will add to any\n * previously set offsets.\n * @param {string|number|function(MdPanelPosition): string} offsetY\n * @returns {!MdPanelPosition}\n */\nMdPanelPosition.prototype.withOffsetY = function(offsetY) {\n this._translateY.push(addUnits(offsetY));\n return this;\n};\n\n\n/**\n * Gets the value of `top` for the panel.\n * @returns {string}\n */\nMdPanelPosition.prototype.getTop = function() {\n return this._top;\n};\n\n\n/**\n * Gets the value of `bottom` for the panel.\n * @returns {string}\n */\nMdPanelPosition.prototype.getBottom = function() {\n return this._bottom;\n};\n\n\n/**\n * Gets the value of `left` for the panel.\n * @returns {string}\n */\nMdPanelPosition.prototype.getLeft = function() {\n return this._left;\n};\n\n\n/**\n * Gets the value of `right` for the panel.\n * @returns {string}\n */\nMdPanelPosition.prototype.getRight = function() {\n return this._right;\n};\n\n\n/**\n * Gets the value of `transform` for the panel.\n * @returns {string} representation of the translateX and translateY rules and values\n */\nMdPanelPosition.prototype.getTransform = function() {\n var translateX = this._reduceTranslateValues('translateX', this._translateX);\n var translateY = this._reduceTranslateValues('translateY', this._translateY);\n\n // It's important to trim the result, because the browser will ignore the set\n // operation if the string contains only whitespace.\n return (translateX + ' ' + translateY).trim();\n};\n\n\n/**\n * Sets the `transform` value for an element.\n * @param {!JQLite} el\n * @returns {!JQLite}\n * @private\n */\nMdPanelPosition.prototype._setTransform = function(el) {\n return el.css(this._$mdConstant.CSS.TRANSFORM, this.getTransform());\n};\n\n\n/**\n * True if the panel is completely on-screen with this positioning; false\n * otherwise.\n * @param {!JQLite} el\n * @return {boolean}\n * @private\n */\nMdPanelPosition.prototype._isOnscreen = function(el) {\n // this works because we always use fixed positioning for the panel,\n // which is relative to the viewport.\n var left = parseInt(this.getLeft());\n var top = parseInt(this.getTop());\n\n if (this._translateX.length || this._translateY.length) {\n var prefixedTransform = this._$mdConstant.CSS.TRANSFORM;\n var offsets = getComputedTranslations(el, prefixedTransform);\n left += offsets.x;\n top += offsets.y;\n }\n\n var right = left + el[0].offsetWidth;\n var bottom = top + el[0].offsetHeight;\n\n return (left >= 0) &&\n (top >= 0) &&\n (bottom <= this._$window.innerHeight) &&\n (right <= this._$window.innerWidth);\n};\n\n\n/**\n * Gets the first x/y position that can fit on-screen.\n * @returns {{x: string, y: string}}\n */\nMdPanelPosition.prototype.getActualPosition = function() {\n return this._actualPosition;\n};\n\n\n/**\n * Reduces a list of translate values to a string that can be used within\n * transform.\n * @param {string} translateFn\n * @param {!Array<string>} values\n * @returns {string}\n * @private\n */\nMdPanelPosition.prototype._reduceTranslateValues =\n function(translateFn, values) {\n return values.map(function(translation) {\n var translationValue = angular.isFunction(translation) ?\n addUnits(translation(this)) : translation;\n return translateFn + '(' + translationValue + ')';\n }, this).join(' ');\n };\n\n\n/**\n * Sets the panel position based on the created panel element and best x/y\n * positioning.\n * @param {!JQLite} el\n * @private\n */\nMdPanelPosition.prototype._setPanelPosition = function(el) {\n // Remove the class in case it has been added before.\n el.removeClass('_md-panel-position-adjusted');\n\n // Only calculate the position if necessary.\n if (this._absolute) {\n this._setTransform(el);\n return;\n }\n\n if (this._actualPosition) {\n this._calculatePanelPosition(el, this._actualPosition);\n this._setTransform(el);\n this._constrainToViewport(el);\n return;\n }\n\n for (var i = 0; i < this._positions.length; i++) {\n this._actualPosition = this._positions[i];\n this._calculatePanelPosition(el, this._actualPosition);\n this._setTransform(el);\n\n if (this._isOnscreen(el)) {\n return;\n }\n }\n\n this._constrainToViewport(el);\n};\n\n\n/**\n * Constrains a panel's position to the viewport.\n * @param {!JQLite} el\n * @private\n */\nMdPanelPosition.prototype._constrainToViewport = function(el) {\n var margin = MdPanelPosition.viewportMargin;\n var initialTop = this._top;\n var initialLeft = this._left;\n\n if (this.getTop()) {\n var top = parseInt(this.getTop());\n var bottom = el[0].offsetHeight + top;\n var viewportHeight = this._$window.innerHeight;\n\n if (top < margin) {\n this._top = margin + 'px';\n } else if (bottom > viewportHeight) {\n this._top = top - (bottom - viewportHeight + margin) + 'px';\n }\n }\n\n if (this.getLeft()) {\n var left = parseInt(this.getLeft());\n var right = el[0].offsetWidth + left;\n var viewportWidth = this._$window.innerWidth;\n\n if (left < margin) {\n this._left = margin + 'px';\n } else if (right > viewportWidth) {\n this._left = left - (right - viewportWidth + margin) + 'px';\n }\n }\n\n // Class that can be used to re-style the panel if it was repositioned.\n el.toggleClass(\n '_md-panel-position-adjusted',\n this._top !== initialTop || this._left !== initialLeft\n );\n};\n\n\n/**\n * Switches between 'start' and 'end'.\n * @param {string} position Horizontal position of the panel\n * @returns {string} Reversed position\n * @private\n */\nMdPanelPosition.prototype._reverseXPosition = function(position) {\n if (position === MdPanelPosition.xPosition.CENTER) {\n return position;\n }\n\n var start = 'start';\n var end = 'end';\n\n return position.indexOf(start) > -1 ? position.replace(start, end) : position.replace(end, start);\n};\n\n\n/**\n * Handles horizontal positioning in rtl or ltr environments.\n * @param {string} position Horizontal position of the panel\n * @returns {string} The correct position according the page direction\n * @private\n */\nMdPanelPosition.prototype._bidi = function(position) {\n return this._isRTL ? this._reverseXPosition(position) : position;\n};\n\n\n/**\n * Calculates the panel position based on the created panel element and the\n * provided positioning.\n * @param {!JQLite} el\n * @param {!{x:string, y:string}} position\n * @private\n */\nMdPanelPosition.prototype._calculatePanelPosition = function(el, position) {\n\n var panelBounds = el[0].getBoundingClientRect();\n var panelWidth = Math.max(panelBounds.width, el[0].clientWidth);\n var panelHeight = Math.max(panelBounds.height, el[0].clientHeight);\n\n var targetBounds = this._relativeToEl[0].getBoundingClientRect();\n\n var targetLeft = targetBounds.left;\n var targetRight = targetBounds.right;\n var targetWidth = targetBounds.width;\n\n switch (this._bidi(position.x)) {\n case MdPanelPosition.xPosition.OFFSET_START:\n this._left = targetLeft - panelWidth + 'px';\n break;\n case MdPanelPosition.xPosition.ALIGN_END:\n this._left = targetRight - panelWidth + 'px';\n break;\n case MdPanelPosition.xPosition.CENTER:\n var left = targetLeft + (0.5 * targetWidth) - (0.5 * panelWidth);\n this._left = left + 'px';\n break;\n case MdPanelPosition.xPosition.ALIGN_START:\n this._left = targetLeft + 'px';\n break;\n case MdPanelPosition.xPosition.OFFSET_END:\n this._left = targetRight + 'px';\n break;\n }\n\n var targetTop = targetBounds.top;\n var targetBottom = targetBounds.bottom;\n var targetHeight = targetBounds.height;\n\n switch (position.y) {\n case MdPanelPosition.yPosition.ABOVE:\n this._top = targetTop - panelHeight + 'px';\n break;\n case MdPanelPosition.yPosition.ALIGN_BOTTOMS:\n this._top = targetBottom - panelHeight + 'px';\n break;\n case MdPanelPosition.yPosition.CENTER:\n var top = targetTop + (0.5 * targetHeight) - (0.5 * panelHeight);\n this._top = top + 'px';\n break;\n case MdPanelPosition.yPosition.ALIGN_TOPS:\n this._top = targetTop + 'px';\n break;\n case MdPanelPosition.yPosition.BELOW:\n this._top = targetBottom + 'px';\n break;\n }\n};\n\n\n/*****************************************************************************\n * MdPanelAnimation *\n *****************************************************************************/\n\n\n/**\n * Animation configuration object. To use, create an MdPanelAnimation with the\n * desired properties, then pass the object as part of $mdPanel creation.\n *\n * Example:\n *\n * var panelAnimation = new MdPanelAnimation()\n * .openFrom(myButtonEl)\n * .closeTo('.my-button')\n * .withAnimation($mdPanel.animation.SCALE);\n *\n * $mdPanel.create({\n * animation: panelAnimation\n * });\n *\n * @param {!IInjectorService} $injector\n * @final @constructor\n */\nfunction MdPanelAnimation($injector) {\n /** @private @const {!angular.$mdUtil} */\n this._$mdUtil = $injector.get('$mdUtil');\n\n /**\n * @private {{element: !JQLite|undefined, bounds: !DOMRect}|\n * undefined}\n */\n this._openFrom;\n\n /**\n * @private {{element: !JQLite|undefined, bounds: !DOMRect}|\n * undefined}\n */\n this._closeTo;\n\n /** @private {string|{open: string, close: string}} */\n this._animationClass = '';\n\n /** @private {number} */\n this._openDuration;\n\n /** @private {number} */\n this._closeDuration;\n\n /** @private {number|{open: number, close: number}} */\n this._rawDuration;\n}\n\n\n/**\n * Possible default animations.\n * @enum {string}\n */\nMdPanelAnimation.animation = {\n SLIDE: 'md-panel-animate-slide',\n SCALE: 'md-panel-animate-scale',\n FADE: 'md-panel-animate-fade'\n};\n\n\n/**\n * Specifies where to start the open animation. `openFrom` accepts a\n * click event object, query selector, DOM element, or a Rect object that\n * is used to determine the bounds. When passed a click event, the location\n * of the click will be used as the position to start the animation.\n * @param {string|!Element|!Event|{top: number, left: number}} openFrom\n * @returns {!MdPanelAnimation}\n */\nMdPanelAnimation.prototype.openFrom = function(openFrom) {\n // Check if 'openFrom' is an Event.\n openFrom = openFrom.target ? openFrom.target : openFrom;\n\n this._openFrom = this._getPanelAnimationTarget(openFrom);\n\n if (!this._closeTo) {\n this._closeTo = this._openFrom;\n }\n return this;\n};\n\n\n/**\n * Specifies where to animate the panel close. `closeTo` accepts a\n * query selector, DOM element, or a Rect object that is used to determine\n * the bounds.\n * @param {string|!Element|{top: number, left: number}} closeTo\n * @returns {!MdPanelAnimation}\n */\nMdPanelAnimation.prototype.closeTo = function(closeTo) {\n this._closeTo = this._getPanelAnimationTarget(closeTo);\n return this;\n};\n\n\n/**\n * Specifies the duration of the animation in milliseconds.\n * @param {number|{open: number, close: number}} duration\n * @returns {!MdPanelAnimation}\n */\nMdPanelAnimation.prototype.duration = function(duration) {\n if (duration) {\n if (angular.isNumber(duration)) {\n this._openDuration = this._closeDuration = toSeconds(duration);\n } else if (angular.isObject(duration)) {\n this._openDuration = toSeconds(duration.open);\n this._closeDuration = toSeconds(duration.close);\n }\n }\n\n // Save the original value so it can be passed to the backdrop.\n this._rawDuration = duration;\n\n return this;\n\n function toSeconds(value) {\n if (angular.isNumber(value)) return value / 1000;\n }\n};\n\n\n/**\n * Returns the element and bounds for the animation target.\n * @param {string|!Element|{top: number, left: number}} location\n * @returns {{element: !JQLite|undefined, bounds: !DOMRect}}\n * @private\n */\nMdPanelAnimation.prototype._getPanelAnimationTarget = function(location) {\n if (angular.isDefined(location.top) || angular.isDefined(location.left)) {\n return {\n element: undefined,\n bounds: {\n top: location.top || 0,\n left: location.left || 0\n }\n };\n } else {\n return this._getBoundingClientRect(getElement(location));\n }\n};\n\n\n/**\n * Specifies the animation class.\n *\n * There are several default animations that can be used:\n * (MdPanelAnimation.animation)\n * SLIDE: The panel slides in and out from the specified\n * elements.\n * SCALE: The panel scales in and out.\n * FADE: The panel fades in and out.\n *\n * @param {string|{open: string, close: string}} cssClass\n * @returns {!MdPanelAnimation}\n */\nMdPanelAnimation.prototype.withAnimation = function(cssClass) {\n this._animationClass = cssClass;\n return this;\n};\n\n\n/**\n * Animate the panel open.\n * @param {!JQLite} panelEl\n * @returns {!Q.IPromise} A promise that is resolved when the open\n * animation is complete.\n */\nMdPanelAnimation.prototype.animateOpen = function(panelEl) {\n var animator = this._$mdUtil.dom.animator;\n\n this._fixBounds(panelEl);\n var animationOptions = {};\n\n // Include the panel transformations when calculating the animations.\n var panelTransform = panelEl[0].style.transform || '';\n\n var openFrom = animator.toTransformCss(panelTransform);\n var openTo = animator.toTransformCss(panelTransform);\n\n switch (this._animationClass) {\n case MdPanelAnimation.animation.SLIDE:\n // Slide should start with opacity: 1.\n panelEl.css('opacity', '1');\n\n animationOptions = {\n transitionInClass: '_md-panel-animate-enter',\n transitionOutClass: '_md-panel-animate-leave',\n };\n\n var openSlide = animator.calculateSlideToOrigin(\n panelEl, this._openFrom) || '';\n openFrom = animator.toTransformCss(openSlide + ' ' + panelTransform);\n break;\n\n case MdPanelAnimation.animation.SCALE:\n animationOptions = {\n transitionInClass: '_md-panel-animate-enter'\n };\n\n var openScale = animator.calculateZoomToOrigin(\n panelEl, this._openFrom) || '';\n openFrom = animator.toTransformCss(panelTransform + ' ' + openScale);\n break;\n\n case MdPanelAnimation.animation.FADE:\n animationOptions = {\n transitionInClass: '_md-panel-animate-enter'\n };\n break;\n\n default:\n if (angular.isString(this._animationClass)) {\n animationOptions = {\n transitionInClass: this._animationClass\n };\n } else {\n animationOptions = {\n transitionInClass: this._animationClass['open'],\n transitionOutClass: this._animationClass['close'],\n };\n }\n }\n\n animationOptions.duration = this._openDuration;\n\n return animator\n .translate3d(panelEl, openFrom, openTo, animationOptions);\n};\n\n\n/**\n * Animate the panel close.\n * @param {!JQLite} panelEl\n * @returns {!Q.IPromise} A promise that resolves when the close animation is complete.\n */\nMdPanelAnimation.prototype.animateClose = function(panelEl) {\n var animator = this._$mdUtil.dom.animator;\n var reverseAnimationOptions = {};\n\n // Include the panel transformations when calculating the animations.\n var panelTransform = panelEl[0].style.transform || '';\n\n var closeFrom = animator.toTransformCss(panelTransform);\n var closeTo = animator.toTransformCss(panelTransform);\n\n switch (this._animationClass) {\n case MdPanelAnimation.animation.SLIDE:\n // Slide should start with opacity: 1.\n panelEl.css('opacity', '1');\n reverseAnimationOptions = {\n transitionInClass: '_md-panel-animate-leave',\n transitionOutClass: '_md-panel-animate-enter _md-panel-animate-leave'\n };\n\n var closeSlide = animator.calculateSlideToOrigin(panelEl, this._closeTo) || '';\n closeTo = animator.toTransformCss(closeSlide + ' ' + panelTransform);\n break;\n\n case MdPanelAnimation.animation.SCALE:\n reverseAnimationOptions = {\n transitionInClass: '_md-panel-animate-scale-out _md-panel-animate-leave',\n transitionOutClass: '_md-panel-animate-scale-out _md-panel-animate-enter _md-panel-animate-leave'\n };\n\n var closeScale = animator.calculateZoomToOrigin(panelEl, this._closeTo) || '';\n closeTo = animator.toTransformCss(panelTransform + ' ' + closeScale);\n break;\n\n case MdPanelAnimation.animation.FADE:\n reverseAnimationOptions = {\n transitionInClass: '_md-panel-animate-fade-out _md-panel-animate-leave',\n transitionOutClass: '_md-panel-animate-fade-out _md-panel-animate-enter _md-panel-animate-leave'\n };\n break;\n\n default:\n if (angular.isString(this._animationClass)) {\n reverseAnimationOptions = {\n transitionOutClass: this._animationClass\n };\n } else {\n reverseAnimationOptions = {\n transitionInClass: this._animationClass['close'],\n transitionOutClass: this._animationClass['open']\n };\n }\n }\n\n reverseAnimationOptions.duration = this._closeDuration;\n\n return animator\n .translate3d(panelEl, closeFrom, closeTo, reverseAnimationOptions);\n};\n\n\n/**\n * Set the height and width to match the panel if not provided.\n * @param {!JQLite} panelEl\n * @private\n */\nMdPanelAnimation.prototype._fixBounds = function(panelEl) {\n var panelWidth = panelEl[0].offsetWidth;\n var panelHeight = panelEl[0].offsetHeight;\n\n if (this._openFrom && this._openFrom.bounds.height == null) {\n this._openFrom.bounds.height = panelHeight;\n }\n if (this._openFrom && this._openFrom.bounds.width == null) {\n this._openFrom.bounds.width = panelWidth;\n }\n if (this._closeTo && this._closeTo.bounds.height == null) {\n this._closeTo.bounds.height = panelHeight;\n }\n if (this._closeTo && this._closeTo.bounds.width == null) {\n this._closeTo.bounds.width = panelWidth;\n }\n};\n\n\n/**\n * Identify the bounding RECT for the target element.\n * @param {!JQLite} element\n * @returns {{element: !JQLite|undefined, bounds: !DOMRect}}\n * @private\n */\nMdPanelAnimation.prototype._getBoundingClientRect = function(element) {\n if (element instanceof angular.element) {\n return {\n element: element,\n bounds: element[0].getBoundingClientRect()\n };\n }\n};\n\n\n/*****************************************************************************\n * Util Methods *\n *****************************************************************************/\n\n\n/**\n * Returns the angular element associated with a css selector or element.\n * @param el {string|!JQLite|!Element}\n * @returns {!JQLite}\n */\nfunction getElement(el) {\n var queryResult = angular.isString(el) ?\n document.querySelector(el) : el;\n return angular.element(queryResult);\n}\n\n/**\n * Gets the computed values for an element's translateX and translateY in px.\n * @param {!JQLite|!Element} el the element to evaluate\n * @param {string} property\n * @return {{x: number, y: number}} an element's translateX and translateY in px\n */\nfunction getComputedTranslations(el, property) {\n // The transform being returned by `getComputedStyle` is in the format:\n // `matrix(a, b, c, d, translateX, translateY)` if defined and `none`\n // if the element doesn't have a transform.\n var transform = getComputedStyle(el[0] || el)[property];\n var openIndex = transform.indexOf('(');\n var closeIndex = transform.lastIndexOf(')');\n var output = { x: 0, y: 0 };\n\n if (openIndex > -1 && closeIndex > -1) {\n var parsedValues = transform\n .substring(openIndex + 1, closeIndex)\n .split(', ')\n .slice(-2);\n\n output.x = parseInt(parsedValues[0]);\n output.y = parseInt(parsedValues[1]);\n }\n\n return output;\n}\n\n/*\n * Ensures that a value is a valid position name. Throw an exception if not.\n * @param {Object} positionMap Object against which the value will be checked.\n * @param {string} value\n */\nfunction validatePosition(positionMap, value) {\n // empty is ok\n if (value === null || angular.isUndefined(value)) {\n return;\n }\n\n var positionKeys = Object.keys(positionMap);\n var positionValues = [];\n\n for (var key, i = 0; key = positionKeys[i]; i++) {\n var position = positionMap[key];\n positionValues.push(position);\n\n if (position === value) {\n return;\n }\n }\n\n throw new Error('Panel position only accepts the following values:\\n' +\n positionValues.join(' | '));\n}\n\n/**\n * Adds units to a number value.\n * @param {string|number} value\n * @return {string}\n */\nfunction addUnits(value) {\n return angular.isNumber(value) ? value + 'px' : value;\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.progressCircular\n * @description Module for a circular progressbar\n */\n\nangular.module('material.components.progressCircular', ['material.core']);\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc directive\n * @name mdProgressCircular\n * @module material.components.progressCircular\n * @restrict E\n *\n * @description\n * The circular progress directive is used to make loading content in your app as delightful and\n * painless as possible by minimizing the amount of visual change a user sees before they can view\n * and interact with content.\n *\n * For operations where the percentage of the operation completed can be determined, use a\n * determinate indicator. They give users a quick sense of how long an operation will take.\n *\n * For operations where the user is asked to wait a moment while something finishes up, and it’s\n * not necessary to expose what's happening behind the scenes and how long it will take, use an\n * indeterminate indicator.\n *\n * @param {string} md-mode Select from one of two modes: **'determinate'** and **'indeterminate'**.\n *\n * Note: if the `md-mode` value is set as undefined or specified as not 1 of the two (2) valid modes, then **'indeterminate'**\n * will be auto-applied as the mode.\n *\n * Note: if not configured, the `md-mode=\"indeterminate\"` will be auto injected as an attribute.\n * If `value=\"\"` is also specified, however, then `md-mode=\"determinate\"` would be auto-injected instead.\n * @param {number=} value In determinate mode, this number represents the percentage of the\n * circular progress. Default: 0\n * @param {number=} md-diameter This specifies the diameter of the circular progress. The value\n * should be a pixel-size value (eg '100'). If this attribute is\n * not present then a default value of '50px' is assumed.\n *\n * @param {boolean=} ng-disabled Determines whether to disable the progress element.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-progress-circular md-mode=\"determinate\" value=\"...\"></md-progress-circular>\n *\n * <md-progress-circular md-mode=\"determinate\" ng-value=\"...\"></md-progress-circular>\n *\n * <md-progress-circular md-mode=\"determinate\" value=\"...\" md-diameter=\"100\"></md-progress-circular>\n *\n * <md-progress-circular md-mode=\"indeterminate\"></md-progress-circular>\n * </hljs>\n */\n\nMdProgressCircularDirective.$inject = [\"$window\", \"$mdProgressCircular\", \"$mdTheming\", \"$mdUtil\", \"$interval\", \"$log\"];\nangular\n .module('material.components.progressCircular')\n .directive('mdProgressCircular', MdProgressCircularDirective);\n\n/* @ngInject */\nfunction MdProgressCircularDirective($window, $mdProgressCircular, $mdTheming,\n $mdUtil, $interval, $log) {\n\n // Note that this shouldn't use use $$rAF, because it can cause an infinite loop\n // in any tests that call $animate.flush.\n var rAF = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame ||\n angular.noop;\n\n var cAF = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame ||\n angular.noop;\n\n var MODE_DETERMINATE = 'determinate';\n var MODE_INDETERMINATE = 'indeterminate';\n var DISABLED_CLASS = '_md-progress-circular-disabled';\n var INDETERMINATE_CLASS = 'md-mode-indeterminate';\n\n return {\n restrict: 'E',\n scope: {\n value: '@',\n mdDiameter: '@',\n mdMode: '@'\n },\n template:\n '<svg xmlns=\"http://www.w3.org/2000/svg\">' +\n '<path fill=\"none\"/>' +\n '</svg>',\n compile: function(element, attrs) {\n element.attr({\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'role': 'progressbar'\n });\n\n if (angular.isUndefined(attrs.mdMode)) {\n var mode = attrs.hasOwnProperty('value') ? MODE_DETERMINATE : MODE_INDETERMINATE;\n attrs.$set('mdMode', mode);\n } else {\n attrs.$set('mdMode', attrs.mdMode.trim());\n }\n\n return MdProgressCircularLink;\n }\n };\n\n function MdProgressCircularLink(scope, element, attrs) {\n var node = element[0];\n var svg = angular.element(node.querySelector('svg'));\n var path = angular.element(node.querySelector('path'));\n var startIndeterminate = $mdProgressCircular.startIndeterminate;\n var endIndeterminate = $mdProgressCircular.endIndeterminate;\n var iterationCount = 0;\n var lastAnimationId = 0;\n var lastDrawFrame;\n var interval;\n\n $mdTheming(element);\n element.toggleClass(DISABLED_CLASS, attrs.hasOwnProperty('disabled'));\n\n // If the mode is indeterminate, it doesn't need to\n // wait for the next digest. It can start right away.\n if (scope.mdMode === MODE_INDETERMINATE){\n startIndeterminateAnimation();\n }\n\n scope.$on('$destroy', function(){\n cleanupIndeterminateAnimation();\n\n if (lastDrawFrame) {\n cAF(lastDrawFrame);\n }\n });\n\n scope.$watchGroup(['value', 'mdMode', function() {\n var isDisabled = node.disabled;\n\n // Sometimes the browser doesn't return a boolean, in\n // which case we should check whether the attribute is\n // present.\n if (isDisabled === true || isDisabled === false){\n return isDisabled;\n }\n\n return angular.isDefined(element.attr('disabled'));\n }], function(newValues, oldValues) {\n var mode = newValues[1];\n var isDisabled = newValues[2];\n var wasDisabled = oldValues[2];\n var diameter = 0;\n var strokeWidth = 0;\n\n if (isDisabled !== wasDisabled) {\n element.toggleClass(DISABLED_CLASS, !!isDisabled);\n }\n\n if (isDisabled) {\n cleanupIndeterminateAnimation();\n } else {\n if (mode !== MODE_DETERMINATE && mode !== MODE_INDETERMINATE) {\n mode = MODE_INDETERMINATE;\n attrs.$set('mdMode', mode);\n }\n\n if (mode === MODE_INDETERMINATE) {\n if (oldValues[1] === MODE_DETERMINATE) {\n diameter = getSize(scope.mdDiameter);\n strokeWidth = getStroke(diameter);\n path.attr('d', getSvgArc(diameter, strokeWidth, true));\n path.attr('stroke-dasharray', getDashLength(diameter, strokeWidth, 75));\n }\n startIndeterminateAnimation();\n } else {\n var newValue = clamp(newValues[0]);\n var oldValue = clamp(oldValues[0]);\n\n cleanupIndeterminateAnimation();\n\n if (oldValues[1] === MODE_INDETERMINATE) {\n diameter = getSize(scope.mdDiameter);\n strokeWidth = getStroke(diameter);\n path.attr('d', getSvgArc(diameter, strokeWidth, false));\n path.attr('stroke-dasharray', getDashLength(diameter, strokeWidth, 100));\n }\n\n element.attr('aria-valuenow', newValue);\n renderCircle(oldValue, newValue);\n }\n }\n\n });\n\n // This is in a separate watch in order to avoid layout, unless\n // the value has actually changed.\n scope.$watch('mdDiameter', function(newValue) {\n var diameter = getSize(newValue);\n var strokeWidth = getStroke(diameter);\n var value = clamp(scope.value);\n var transformOrigin = (diameter / 2) + 'px';\n var dimensions = {\n width: diameter + 'px',\n height: diameter + 'px'\n };\n\n // The viewBox has to be applied via setAttribute, because it is\n // case-sensitive. If jQuery is included in the page, `.attr` lowercases\n // all attribute names.\n svg[0].setAttribute('viewBox', '0 0 ' + diameter + ' ' + diameter);\n\n // Usually viewBox sets the dimensions for the SVG, however that doesn't\n // seem to be the case on IE10.\n // Important! The transform origin has to be set from here and it has to\n // be in the format of \"Ypx Ypx Ypx\", otherwise the rotation wobbles in\n // IE and Edge, because they don't account for the stroke width when\n // rotating. Also \"center\" doesn't help in this case, it has to be a\n // precise value.\n svg\n .css(dimensions)\n .css('transform-origin', transformOrigin + ' ' + transformOrigin + ' ' + transformOrigin);\n\n element.css(dimensions);\n\n path.attr('stroke-width', strokeWidth);\n path.attr('stroke-linecap', 'square');\n if (scope.mdMode == MODE_INDETERMINATE) {\n path.attr('d', getSvgArc(diameter, strokeWidth, true));\n path.attr('stroke-dasharray', getDashLength(diameter, strokeWidth, 75));\n path.attr('stroke-dashoffset', getDashOffset(diameter, strokeWidth, 1, 75));\n } else {\n path.attr('d', getSvgArc(diameter, strokeWidth, false));\n path.attr('stroke-dasharray', getDashLength(diameter, strokeWidth, 100));\n path.attr('stroke-dashoffset', getDashOffset(diameter, strokeWidth, 0, 100));\n renderCircle(value, value);\n }\n\n });\n\n function renderCircle(animateFrom, animateTo, easing, duration, iterationCount, maxValue) {\n var id = ++lastAnimationId;\n var startTime = $mdUtil.now();\n var changeInValue = animateTo - animateFrom;\n var diameter = getSize(scope.mdDiameter);\n var strokeWidth = getStroke(diameter);\n var ease = easing || $mdProgressCircular.easeFn;\n var animationDuration = duration || $mdProgressCircular.duration;\n var rotation = -90 * (iterationCount || 0);\n var dashLimit = maxValue || 100;\n\n // No need to animate it if the values are the same\n if (animateTo === animateFrom) {\n renderFrame(animateTo);\n } else {\n lastDrawFrame = rAF(function animation() {\n var currentTime = $window.Math.max(0, $window.Math.min($mdUtil.now() - startTime, animationDuration));\n\n renderFrame(ease(currentTime, animateFrom, changeInValue, animationDuration));\n\n // Do not allow overlapping animations\n if (id === lastAnimationId && currentTime < animationDuration) {\n lastDrawFrame = rAF(animation);\n }\n });\n }\n\n function renderFrame(value) {\n path.attr('stroke-dashoffset', getDashOffset(diameter, strokeWidth, value, dashLimit));\n path.attr('transform','rotate(' + (rotation) + ' ' + diameter/2 + ' ' + diameter/2 + ')');\n }\n }\n\n function animateIndeterminate() {\n renderCircle(\n startIndeterminate,\n endIndeterminate,\n $mdProgressCircular.easeFnIndeterminate,\n $mdProgressCircular.durationIndeterminate,\n iterationCount,\n 75\n );\n\n // The %4 technically isn't necessary, but it keeps the rotation\n // under 360, instead of becoming a crazy large number.\n iterationCount = ++iterationCount % 4;\n\n }\n\n function startIndeterminateAnimation() {\n if (!interval) {\n // Note that this interval isn't supposed to trigger a digest.\n interval = $interval(\n animateIndeterminate,\n $mdProgressCircular.durationIndeterminate,\n 0,\n false\n );\n\n animateIndeterminate();\n\n element\n .addClass(INDETERMINATE_CLASS)\n .removeAttr('aria-valuenow');\n }\n }\n\n function cleanupIndeterminateAnimation() {\n if (interval) {\n $interval.cancel(interval);\n interval = null;\n element.removeClass(INDETERMINATE_CLASS);\n }\n }\n }\n\n /**\n * Returns SVG path data for progress circle\n * Syntax spec: https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands\n *\n * @param {number} diameter Diameter of the container.\n * @param {number} strokeWidth Stroke width to be used when drawing circle\n * @param {boolean} indeterminate Use if progress circle will be used for indeterminate\n *\n * @returns {string} String representation of an SVG arc.\n */\n function getSvgArc(diameter, strokeWidth, indeterminate) {\n var radius = diameter / 2;\n var offset = strokeWidth / 2;\n var start = radius + ',' + offset; // ie: (25, 2.5) or 12 o'clock\n var end = offset + ',' + radius; // ie: (2.5, 25) or 9 o'clock\n var arcRadius = radius - offset;\n return 'M' + start\n + 'A' + arcRadius + ',' + arcRadius + ' 0 1 1 ' + end // 75% circle\n + (indeterminate ? '' : 'A' + arcRadius + ',' + arcRadius + ' 0 0 1 ' + start); // loop to start\n }\n\n /**\n * Return stroke length for progress circle\n *\n * @param {number} diameter Diameter of the container.\n * @param {number} strokeWidth Stroke width to be used when drawing circle\n * @param {number} value Percentage of circle (between 0 and 100)\n * @param {number} maxArcLength Maximum length of arc as a percentage of circle (between 0 and 100)\n *\n * @returns {number} Stroke length for progress circle\n */\n function getDashOffset(diameter, strokeWidth, value, maxArcLength) {\n return getSpinnerCircumference(diameter, strokeWidth) * ((maxArcLength - value) / 100);\n }\n\n /**\n * Limits a value between 0 and 100.\n */\n function clamp(value) {\n return $window.Math.max(0, $window.Math.min(value || 0, 100));\n }\n\n /**\n * Determines the size of a progress circle, based on the provided\n * value in the following formats: `X`, `Ypx`, `Z%`.\n */\n function getSize(value) {\n var defaultValue = $mdProgressCircular.progressSize;\n\n if (value) {\n var parsed = parseFloat(value);\n\n if (value.lastIndexOf('%') === value.length - 1) {\n parsed = (parsed / 100) * defaultValue;\n }\n\n return parsed;\n }\n\n return defaultValue;\n }\n\n /**\n * Determines the circle's stroke width, based on\n * the provided diameter.\n */\n function getStroke(diameter) {\n return $mdProgressCircular.strokeWidth / 100 * diameter;\n }\n\n /**\n * Return length of the dash\n *\n * @param {number} diameter Diameter of the container.\n * @param {number} strokeWidth Stroke width to be used when drawing circle\n * @param {number} value Percentage of circle (between 0 and 100)\n *\n * @returns {number} Length of the dash\n */\n function getDashLength(diameter, strokeWidth, value) {\n return getSpinnerCircumference(diameter, strokeWidth) * (value / 100);\n }\n\n /**\n * Return circumference of the spinner\n *\n * @param {number} diameter Diameter of the container.\n * @param {number} strokeWidth Stroke width to be used when drawing circle\n *\n * @returns {number} Circumference of the spinner\n */\n function getSpinnerCircumference(diameter, strokeWidth) {\n return ((diameter - strokeWidth) * $window.Math.PI);\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc service\n * @name $mdProgressCircular\n * @module material.components.progressCircular\n *\n * @description\n * Allows the user to specify the default options for the `progressCircular` directive.\n *\n * @property {number} progressSize Diameter of the progress circle in pixels.\n * @property {number} strokeWidth Width of the circle's stroke as a percentage of the circle's size.\n * @property {number} duration Length of the circle animation in milliseconds.\n * @property {function} easeFn Default easing animation function.\n * @property {object} easingPresets Collection of pre-defined easing functions.\n *\n * @property {number} durationIndeterminate Duration of the indeterminate animation.\n * @property {number} startIndeterminate Indeterminate animation start point.\n * @property {number} endIndeterminate Indeterminate animation end point.\n * @property {function} easeFnIndeterminate Easing function to be used when animating\n * between the indeterminate values.\n *\n * @property {(function(object): object)} configure Used to modify the default options.\n *\n * @usage\n * <hljs lang=\"js\">\n * myAppModule.config(function($mdProgressCircularProvider) {\n *\n * // Example of changing the default progress options.\n * $mdProgressCircularProvider.configure({\n * progressSize: 100,\n * strokeWidth: 20,\n * duration: 800\n * });\n * });\n * </hljs>\n *\n */\n\nangular\n .module('material.components.progressCircular')\n .provider(\"$mdProgressCircular\", MdProgressCircularProvider);\n\nfunction MdProgressCircularProvider() {\n var progressConfig = {\n progressSize: 50,\n strokeWidth: 10,\n duration: 100,\n easeFn: linearEase,\n\n durationIndeterminate: 1333,\n startIndeterminate: 1,\n endIndeterminate: 149,\n easeFnIndeterminate: materialEase,\n\n easingPresets: {\n linearEase: linearEase,\n materialEase: materialEase\n }\n };\n\n return {\n configure: function(options) {\n progressConfig = angular.extend(progressConfig, options || {});\n return progressConfig;\n },\n $get: function() { return progressConfig; }\n };\n\n function linearEase(t, b, c, d) {\n return c * t / d + b;\n }\n\n function materialEase(t, b, c, d) {\n // via http://www.timotheegroleau.com/Flash/experiments/easing_function_generator.htm\n // with settings of [0, 0, 1, 1]\n var ts = (t /= d) * t;\n var tc = ts * t;\n return b + c * (6 * tc * ts + -15 * ts * ts + 10 * tc);\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.progressLinear\n * @description Linear Progress module!\n */\nMdProgressLinearDirective.$inject = [\"$mdTheming\", \"$mdUtil\", \"$log\"];\nangular.module('material.components.progressLinear', [\n 'material.core'\n])\n .directive('mdProgressLinear', MdProgressLinearDirective);\n\n/**\n * @ngdoc directive\n * @name mdProgressLinear\n * @module material.components.progressLinear\n * @restrict E\n *\n * @description\n * The linear progress directive is used to make loading content\n * in your app as delightful and painless as possible by minimizing\n * the amount of visual change a user sees before they can view\n * and interact with content.\n *\n * Each operation should only be represented by one activity indicator\n * For example: one refresh operation should not display both a\n * refresh bar and an activity circle.\n *\n * For operations where the percentage of the operation completed\n * can be determined, use a determinate indicator. They give users\n * a quick sense of how long an operation will take.\n *\n * For operations where the user is asked to wait a moment while\n * something finishes up, and it’s not necessary to expose what's\n * happening behind the scenes and how long it will take, use an\n * indeterminate indicator.\n *\n * @param {string} md-mode Select from one of four modes: determinate, indeterminate, buffer or query.\n *\n * Note: if the `md-mode` value is set as undefined or specified as 1 of the four (4) valid modes, then `indeterminate`\n * will be auto-applied as the mode.\n *\n * Note: if not configured, the `md-mode=\"indeterminate\"` will be auto injected as an attribute. If `value=\"\"` is also specified, however,\n * then `md-mode=\"determinate\"` would be auto-injected instead.\n * @param {number=} value In determinate and buffer modes, this number represents the percentage of the primary progress bar. Default: 0\n * @param {number=} md-buffer-value In the buffer mode, this number represents the percentage of the secondary progress bar. Default: 0\n * @param {boolean=} ng-disabled Determines whether to disable the progress element.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-progress-linear md-mode=\"determinate\" value=\"...\"></md-progress-linear>\n *\n * <md-progress-linear md-mode=\"determinate\" ng-value=\"...\"></md-progress-linear>\n *\n * <md-progress-linear md-mode=\"indeterminate\"></md-progress-linear>\n *\n * <md-progress-linear md-mode=\"buffer\" value=\"...\" md-buffer-value=\"...\"></md-progress-linear>\n *\n * <md-progress-linear md-mode=\"query\"></md-progress-linear>\n * </hljs>\n */\nfunction MdProgressLinearDirective($mdTheming, $mdUtil, $log) {\n var MODE_DETERMINATE = \"determinate\";\n var MODE_INDETERMINATE = \"indeterminate\";\n var MODE_BUFFER = \"buffer\";\n var MODE_QUERY = \"query\";\n var DISABLED_CLASS = \"_md-progress-linear-disabled\";\n\n return {\n restrict: 'E',\n template: '<div class=\"md-container\">' +\n '<div class=\"md-dashed\"></div>' +\n '<div class=\"md-bar md-bar1\"></div>' +\n '<div class=\"md-bar md-bar2\"></div>' +\n '</div>',\n compile: compile\n };\n\n function compile(tElement, tAttrs, transclude) {\n tElement.attr('aria-valuemin', 0);\n tElement.attr('aria-valuemax', 100);\n tElement.attr('role', 'progressbar');\n\n return postLink;\n }\n function postLink(scope, element, attr) {\n $mdTheming(element);\n\n var lastMode;\n var isDisabled = attr.hasOwnProperty('disabled');\n var toVendorCSS = $mdUtil.dom.animator.toCss;\n var bar1 = angular.element(element[0].querySelector('.md-bar1'));\n var bar2 = angular.element(element[0].querySelector('.md-bar2'));\n var container = angular.element(element[0].querySelector('.md-container'));\n\n element\n .attr('md-mode', mode())\n .toggleClass(DISABLED_CLASS, isDisabled);\n\n validateMode();\n watchAttributes();\n\n /**\n * Watch the value, md-buffer-value, and md-mode attributes\n */\n function watchAttributes() {\n attr.$observe('value', function(value) {\n var percentValue = clamp(value);\n element.attr('aria-valuenow', percentValue);\n\n if (mode() != MODE_QUERY) animateIndicator(bar2, percentValue);\n });\n\n attr.$observe('mdBufferValue', function(value) {\n animateIndicator(bar1, clamp(value));\n });\n\n attr.$observe('disabled', function(value) {\n if (value === true || value === false) {\n isDisabled = !!value;\n } else {\n isDisabled = angular.isDefined(value);\n }\n\n element.toggleClass(DISABLED_CLASS, isDisabled);\n container.toggleClass(lastMode, !isDisabled);\n });\n\n attr.$observe('mdMode', function(mode) {\n if (lastMode) container.removeClass(lastMode);\n\n switch (mode) {\n case MODE_QUERY:\n case MODE_BUFFER:\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n container.addClass(lastMode = \"md-mode-\" + mode);\n break;\n default:\n container.addClass(lastMode = \"md-mode-\" + MODE_INDETERMINATE);\n break;\n }\n });\n }\n\n /**\n * Auto-defaults the mode to either `determinate` or `indeterminate` mode; if not specified\n */\n function validateMode() {\n if (angular.isUndefined(attr.mdMode)) {\n var hasValue = angular.isDefined(attr.value);\n var mode = hasValue ? MODE_DETERMINATE : MODE_INDETERMINATE;\n var info = \"Auto-adding the missing md-mode='{0}' to the ProgressLinear element\";\n element.attr(\"md-mode\", mode);\n attr.mdMode = mode;\n }\n }\n\n /**\n * Is the md-mode a valid option?\n */\n function mode() {\n var value = (attr.mdMode || \"\").trim();\n if (value) {\n switch (value) {\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n case MODE_BUFFER:\n case MODE_QUERY:\n break;\n default:\n value = MODE_INDETERMINATE;\n break;\n }\n }\n return value;\n }\n\n /**\n * Manually set CSS to animate the Determinate indicator based on the specified\n * percentage value (0-100).\n */\n function animateIndicator(target, value) {\n if (isDisabled || !mode()) return;\n\n var to = $mdUtil.supplant(\"translateX({0}%) scale({1},1)\", [(value-100)/2, value/100]);\n var styles = toVendorCSS({ transform : to });\n angular.element(target).css(styles);\n }\n }\n\n /**\n * Clamps the value to be between 0 and 100.\n * @param {number} value The value to clamp.\n * @returns {number}\n */\n function clamp(value) {\n return Math.max(0, Math.min(value || 0, 100));\n }\n}\n\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.radioButton\n * @description radioButton module!\n */\nmdRadioGroupDirective.$inject = [\"$mdUtil\", \"$mdConstant\", \"$mdTheming\", \"$timeout\"];\nmdRadioButtonDirective.$inject = [\"$mdAria\", \"$mdUtil\", \"$mdTheming\"];\nangular.module('material.components.radioButton', [\n 'material.core'\n])\n .directive('mdRadioGroup', mdRadioGroupDirective)\n .directive('mdRadioButton', mdRadioButtonDirective);\n\n/**\n * @type {Readonly<{NEXT: number, CURRENT: number, PREVIOUS: number}>}\n */\nvar incrementSelection = Object.freeze({PREVIOUS: -1, CURRENT: 0, NEXT: 1});\n\n/**\n * @ngdoc directive\n * @module material.components.radioButton\n * @name mdRadioGroup\n *\n * @restrict E\n *\n * @description\n * The `<md-radio-group>` directive identifies a grouping\n * container for the 1..n grouped radio buttons; specified using nested\n * `<md-radio-button>` elements.\n *\n * The radio button uses the accent color by default. The primary color palette may be used with\n * the `md-primary` class.\n *\n * Note: `<md-radio-group>` and `<md-radio-button>` handle `tabindex` differently\n * than the native `<input type=\"radio\">` controls. Whereas the native controls\n * force the user to tab through all the radio buttons, `<md-radio-group>`\n * is focusable and by default the `<md-radio-button>`s are not.\n *\n * @param {string} ng-model Assignable angular expression to data-bind to.\n * @param {string=} ng-change AngularJS expression to be executed when input changes due to user\n * interaction.\n * @param {boolean=} md-no-ink If present, disables ink ripple effects.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-radio-group ng-model=\"selected\">\n * <md-radio-button ng-repeat=\"item in items\"\n * ng-value=\"item.value\" aria-label=\"{{item.label}}\">\n * {{ item.label }}\n * </md-radio-button>\n * </md-radio-group>\n * </hljs>\n */\nfunction mdRadioGroupDirective($mdUtil, $mdConstant, $mdTheming, $timeout) {\n RadioGroupController.prototype = createRadioGroupControllerProto();\n\n return {\n restrict: 'E',\n controller: ['$element', RadioGroupController],\n require: ['mdRadioGroup', '?ngModel'],\n link: { pre: linkRadioGroup }\n };\n\n function linkRadioGroup(scope, element, attr, controllers) {\n // private md component indicator for styling\n element.addClass('_md');\n $mdTheming(element);\n\n var radioGroupController = controllers[0];\n var ngModelCtrl = controllers[1] || $mdUtil.fakeNgModel();\n\n radioGroupController.init(ngModelCtrl);\n\n scope.mouseActive = false;\n\n element\n .attr({\n 'role': 'radiogroup',\n 'tabIndex': element.attr('tabindex') || '0'\n })\n .on('keydown', keydownListener)\n .on('mousedown', function() {\n scope.mouseActive = true;\n $timeout(function() {\n scope.mouseActive = false;\n }, 100);\n })\n .on('focus', function() {\n if (scope.mouseActive === false) {\n radioGroupController.$element.addClass('md-focused');\n }\n })\n .on('blur', function() {\n radioGroupController.$element.removeClass('md-focused');\n });\n\n // Initially set the first radio button as the aria-activedescendant. This will be overridden\n // if a 'checked' radio button gets rendered. We need to wait for the nextTick here so that the\n // radio buttons have their id values assigned.\n $mdUtil.nextTick(function () {\n var radioButtons = getRadioButtons(radioGroupController.$element);\n if (radioButtons.count() &&\n !radioGroupController.$element[0].hasAttribute('aria-activedescendant')) {\n radioGroupController.setActiveDescendant(radioButtons.first().id);\n }\n });\n\n /**\n * Apply the md-focused class if it isn't already applied.\n */\n function setFocus() {\n if (!element.hasClass('md-focused')) { element.addClass('md-focused'); }\n }\n\n /**\n * @param {KeyboardEvent} keyboardEvent\n */\n function keydownListener(keyboardEvent) {\n var keyCode = keyboardEvent.which || keyboardEvent.keyCode;\n\n // Only listen to events that we originated ourselves\n // so that we don't trigger on things like arrow keys in inputs.\n if (keyCode !== $mdConstant.KEY_CODE.ENTER &&\n keyboardEvent.currentTarget !== keyboardEvent.target) {\n return;\n }\n\n switch (keyCode) {\n case $mdConstant.KEY_CODE.LEFT_ARROW:\n case $mdConstant.KEY_CODE.UP_ARROW:\n keyboardEvent.preventDefault();\n radioGroupController.selectPrevious();\n setFocus();\n break;\n\n case $mdConstant.KEY_CODE.RIGHT_ARROW:\n case $mdConstant.KEY_CODE.DOWN_ARROW:\n keyboardEvent.preventDefault();\n radioGroupController.selectNext();\n setFocus();\n break;\n\n case $mdConstant.KEY_CODE.SPACE:\n keyboardEvent.preventDefault();\n radioGroupController.selectCurrent();\n break;\n\n case $mdConstant.KEY_CODE.ENTER:\n var form = angular.element($mdUtil.getClosest(element[0], 'form'));\n if (form.length > 0) {\n form.triggerHandler('submit');\n }\n break;\n }\n }\n }\n\n /**\n * @param {JQLite} $element\n * @constructor\n */\n function RadioGroupController($element) {\n this._radioButtonRenderFns = [];\n this.$element = $element;\n }\n\n function createRadioGroupControllerProto() {\n return {\n init: function(ngModelCtrl) {\n this._ngModelCtrl = ngModelCtrl;\n this._ngModelCtrl.$render = angular.bind(this, this.render);\n },\n add: function(rbRender) {\n this._radioButtonRenderFns.push(rbRender);\n },\n remove: function(rbRender) {\n var index = this._radioButtonRenderFns.indexOf(rbRender);\n if (index !== -1) {\n this._radioButtonRenderFns.splice(index, 1);\n }\n },\n render: function() {\n this._radioButtonRenderFns.forEach(function(rbRender) {\n rbRender();\n });\n },\n setViewValue: function(value, eventType) {\n this._ngModelCtrl.$setViewValue(value, eventType);\n // update the other radio buttons as well\n this.render();\n },\n getViewValue: function() {\n return this._ngModelCtrl.$viewValue;\n },\n selectCurrent: function() {\n return changeSelectedButton(this.$element, incrementSelection.CURRENT);\n },\n selectNext: function() {\n return changeSelectedButton(this.$element, incrementSelection.NEXT);\n },\n selectPrevious: function() {\n return changeSelectedButton(this.$element, incrementSelection.PREVIOUS);\n },\n setActiveDescendant: function (radioId) {\n this.$element.attr('aria-activedescendant', radioId);\n },\n isDisabled: function() {\n return this.$element[0].hasAttribute('disabled');\n }\n };\n }\n\n /**\n * Coerce all child radio buttons into an array, then wrap them in an iterator.\n * @param parent {!JQLite}\n * @return {{add: add, next: (function()), last: (function(): any|null), previous: (function()), count: (function(): number), hasNext: (function(*=): Array.length|*|number|boolean), inRange: (function(*): boolean), remove: remove, contains: (function(*=): *|boolean), itemAt: (function(*=): any|null), findBy: (function(*, *): *[]), hasPrevious: (function(*=): Array.length|*|number|boolean), items: (function(): *[]), indexOf: (function(*=): number), first: (function(): any|null)}}\n */\n function getRadioButtons(parent) {\n return $mdUtil.iterator(parent[0].querySelectorAll('md-radio-button'), true);\n }\n\n /**\n * Change the radio group's selected button by a given increment.\n * If no button is selected, select the first button.\n * @param {JQLite} parent the md-radio-group\n * @param {incrementSelection} increment enum that determines whether the next or\n * previous button is clicked. For current, only the first button is selected, otherwise the\n * current selection is maintained (by doing nothing).\n */\n function changeSelectedButton(parent, increment) {\n var buttons = getRadioButtons(parent);\n var target;\n\n if (buttons.count()) {\n var validate = function (button) {\n // If disabled, then NOT valid\n return !angular.element(button).attr(\"disabled\");\n };\n\n var selected = parent[0].querySelector('md-radio-button.md-checked');\n if (!selected) {\n target = buttons.first();\n } else if (increment === incrementSelection.PREVIOUS ||\n increment === incrementSelection.NEXT) {\n target = buttons[\n increment === incrementSelection.PREVIOUS ? 'previous' : 'next'\n ](selected, validate);\n }\n\n if (target) {\n // Activate radioButton's click listener (triggerHandler won't create a real click event)\n angular.element(target).triggerHandler('click');\n }\n }\n }\n}\n\n/**\n * @ngdoc directive\n * @module material.components.radioButton\n * @name mdRadioButton\n *\n * @restrict E\n *\n * @description\n * The `<md-radio-button>`directive is the child directive required to be used within `<md-radio-group>` elements.\n *\n * While similar to the `<input type=\"radio\" ng-model=\"\" value=\"\">` directive,\n * the `<md-radio-button>` directive provides ink effects, ARIA support, and\n * supports use within named radio groups.\n *\n * One of `value` or `ng-value` must be set so that the `md-radio-group`'s model is set properly when the\n * `md-radio-button` is selected.\n *\n * @param {string} value The value to which the model should be set when selected.\n * @param {string} ng-value AngularJS expression which sets the value to which the model should\n * be set when selected.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} aria-label Adds label to radio button for accessibility.\n * Defaults to radio button's text. If no text content is available, a warning will be logged.\n *\n * @usage\n * <hljs lang=\"html\">\n *\n * <md-radio-button value=\"1\" aria-label=\"Label 1\">\n * Label 1\n * </md-radio-button>\n *\n * <md-radio-button ng-value=\"specialValue\" aria-label=\"Green\">\n * Green\n * </md-radio-button>\n *\n * </hljs>\n *\n */\nfunction mdRadioButtonDirective($mdAria, $mdUtil, $mdTheming) {\n\n var CHECKED_CSS = 'md-checked';\n\n return {\n restrict: 'E',\n require: '^mdRadioGroup',\n transclude: true,\n template: '<div class=\"md-container\" md-ink-ripple md-ink-ripple-checkbox>' +\n '<div class=\"md-off\"></div>' +\n '<div class=\"md-on\"></div>' +\n '</div>' +\n '<div ng-transclude class=\"md-label\"></div>',\n link: link\n };\n\n function link(scope, element, attr, radioGroupController) {\n var lastChecked;\n\n $mdTheming(element);\n configureAria(element);\n element.addClass('md-auto-horizontal-margin');\n\n // ngAria overwrites the aria-checked inside a $watch for ngValue.\n // We should defer the initialization until all the watches have fired.\n // This can also be fixed by removing the `lastChecked` check, but that'll\n // cause more DOM manipulation on each digest.\n if (attr.ngValue) {\n $mdUtil.nextTick(initialize, false);\n } else {\n initialize();\n }\n\n /**\n * Initializes the component.\n */\n function initialize() {\n if (!radioGroupController) {\n throw 'RadioButton: No RadioGroupController could be found.';\n }\n\n radioGroupController.add(render);\n attr.$observe('value', render);\n\n element\n .on('click', listener)\n .on('$destroy', function() {\n radioGroupController.remove(render);\n });\n }\n\n /**\n * On click functionality.\n */\n function listener(ev) {\n if (element[0].hasAttribute('disabled') || radioGroupController.isDisabled()) return;\n\n scope.$apply(function() {\n radioGroupController.setViewValue(attr.value, ev && ev.type);\n });\n }\n\n /**\n * Add or remove the `.md-checked` class from the RadioButton (and conditionally its parent).\n * Update the `aria-activedescendant` attribute.\n */\n function render() {\n var checked = radioGroupController.getViewValue() == attr.value;\n\n if (checked === lastChecked) return;\n\n if (element[0] && element[0].parentNode &&\n element[0].parentNode.nodeName.toLowerCase() !== 'md-radio-group') {\n // If the radioButton is inside a div, then add class so highlighting will work.\n element.parent().toggleClass(CHECKED_CSS, checked);\n }\n\n if (checked) {\n radioGroupController.setActiveDescendant(element.attr('id'));\n }\n\n lastChecked = checked;\n\n element\n .attr('aria-checked', checked)\n .toggleClass(CHECKED_CSS, checked);\n }\n\n /**\n * Inject ARIA-specific attributes appropriate for each radio button\n */\n function configureAria(element) {\n element.attr({\n id: attr.id || 'radio_' + $mdUtil.nextUid(),\n role: 'radio',\n 'aria-checked': 'false'\n });\n\n $mdAria.expectWithText(element, 'aria-label');\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.select\n */\n\n/***************************************************\n\n ### TODO ###\n - [ ] Abstract placement logic in $mdSelect service to $mdMenu service\n\n ***************************************************/\n\nSelectDirective.$inject = [\"$mdSelect\", \"$mdUtil\", \"$mdConstant\", \"$mdTheming\", \"$mdAria\", \"$parse\", \"$sce\"];\nSelectMenuDirective.$inject = [\"$parse\", \"$mdUtil\", \"$mdConstant\", \"$mdTheming\"];\nOptionDirective.$inject = [\"$mdButtonInkRipple\", \"$mdUtil\", \"$mdTheming\"];\nSelectProvider.$inject = [\"$$interimElementProvider\"];\nOptionController.$inject = [\"$element\"];\nvar SELECT_EDGE_MARGIN = 8;\nvar selectNextId = 0;\nvar CHECKBOX_SELECTION_INDICATOR;\n\nangular.module('material.components.select', [\n 'material.core',\n 'material.components.backdrop'\n ])\n .directive('mdSelect', SelectDirective)\n .directive('mdSelectMenu', SelectMenuDirective)\n .directive('mdOption', OptionDirective)\n .directive('mdOptgroup', OptgroupDirective)\n .directive('mdSelectHeader', SelectHeaderDirective)\n .provider('$mdSelect', SelectProvider);\n\n/**\n * @ngdoc directive\n * @name mdSelect\n * @restrict E\n * @module material.components.select\n *\n * @description Displays a select box, bound to an `ng-model`. Selectable options are defined using\n * the <a ng-href=\"api/directive/mdOption\">md-option</a> element directive. Options can be grouped\n * using the <a ng-href=\"api/directive/mdOptgroup\">md-optgroup</a> element directive.\n *\n * When the select is required and uses a floating label, then the label will automatically contain\n * an asterisk (`*`). This behavior can be disabled by using the `md-no-asterisk` attribute.\n *\n * By default, the select will display with an underline to match other form elements. This can be\n * disabled by applying the `md-no-underline` CSS class.\n *\n * @param {expression} ng-model Assignable angular expression to data-bind to.\n * @param {expression=} ng-change Expression to be executed when the model value changes.\n * @param {boolean=} multiple When present, allows for more than one option to be selected.\n * The model is an array with the selected choices. **Note:** This attribute is only evaluated\n * once; it is not watched.\n * @param {expression=} md-on-close Expression to be evaluated when the select is closed.\n * @param {expression=} md-on-open Expression to be evaluated when opening the select.\n * Will hide the select options and show a spinner until the evaluated promise resolves.\n * @param {expression=} md-selected-text Expression to be evaluated that will return a string\n * to be displayed as a placeholder in the select input box when it is closed. The value\n * will be treated as *text* (not html).\n * @param {expression=} md-selected-html Expression to be evaluated that will return a string\n * to be displayed as a placeholder in the select input box when it is closed. The value\n * will be treated as *html*. The value must either be explicitly marked as trustedHtml or\n * the ngSanitize module must be loaded.\n * @param {string=} placeholder Placeholder hint text.\n * @param {boolean=} md-no-asterisk When set to true, an asterisk will not be appended to the\n * floating label. **Note:** This attribute is only evaluated once; it is not watched.\n * @param {string=} aria-label Optional label for accessibility. Only necessary if no explicit label\n * is present.\n * @param {string=} md-container-class Class list to get applied to the `.md-select-menu-container`\n * element (for custom styling).\n * @param {string=} md-select-only-option If specified, a `<md-select>` will automatically select\n * it's first option, if it only has one.\n *\n * @usage\n * With a placeholder (label and aria-label are added dynamically)\n * <hljs lang=\"html\">\n * <md-input-container>\n * <md-select\n * ng-model=\"someModel\"\n * placeholder=\"Select a state\">\n * <md-option ng-value=\"opt\" ng-repeat=\"opt in neighborhoods2\">{{ opt }}</md-option>\n * </md-select>\n * </md-input-container>\n * </hljs>\n *\n * With an explicit label\n * <hljs lang=\"html\">\n * <md-input-container>\n * <label>State</label>\n * <md-select\n * ng-model=\"someModel\">\n * <md-option ng-value=\"opt\" ng-repeat=\"opt in neighborhoods2\">{{ opt }}</md-option>\n * </md-select>\n * </md-input-container>\n * </hljs>\n *\n * Using the `md-select-header` element directive\n *\n * When a developer needs to put more than just a text label in the `md-select-menu`, they should\n * use one or more `md-select-header`s. These elements can contain custom HTML which can be styled\n * as desired. Use cases for this element include a sticky search bar and custom option group\n * labels.\n *\n * <hljs lang=\"html\">\n * <md-input-container>\n * <md-select ng-model=\"someModel\">\n * <md-select-header>\n * <span> Neighborhoods - </span>\n * </md-select-header>\n * <md-option ng-value=\"opt\" ng-repeat=\"opt in neighborhoods2\">{{ opt }}</md-option>\n * </md-select>\n * </md-input-container>\n * </hljs>\n *\n * ## Selects and object equality\n * When using a `md-select` to pick from a list of objects, it is important to realize how javascript handles\n * equality. Consider the following example:\n * <hljs lang=\"js\">\n * angular.controller('MyCtrl', function($scope) {\n * $scope.users = [\n * { id: 1, name: 'Bob' },\n * { id: 2, name: 'Alice' },\n * { id: 3, name: 'Steve' }\n * ];\n * $scope.selectedUser = { id: 1, name: 'Bob' };\n * });\n * </hljs>\n * <hljs lang=\"html\">\n * <div ng-controller=\"MyCtrl\">\n * <md-select ng-model=\"selectedUser\">\n * <md-option ng-value=\"user\" ng-repeat=\"user in users\">{{ user.name }}</md-option>\n * </md-select>\n * </div>\n * </hljs>\n *\n * At first one might expect that the select should be populated with \"Bob\" as the selected user.\n * However, this is not true. To determine whether something is selected,\n * `ngModelController` is looking at whether `$scope.selectedUser == (any user in $scope.users);`;\n *\n * Javascript's `==` operator does not check for deep equality (ie. that all properties\n * on the object are the same), but instead whether the objects are *the same object in memory*.\n * In this case, we have two instances of identical objects, but they exist in memory as unique\n * entities. Because of this, the select will have no value populated for a selected user.\n *\n * To get around this, `ngModelController` provides a `track by` option that allows us to specify a\n * different expression which will be used for the equality operator. As such, we can update our\n * `html` to make use of this by specifying the `ng-model-options=\"{trackBy: '$value.id'}\"` on the\n * `md-select` element. This converts our equality expression to be\n * `$scope.selectedUser.id == (any id in $scope.users.map(function(u) { return u.id; }));`\n * which results in Bob being selected as desired.\n *\n * **Note:** We do not support AngularJS's `track by` syntax. For instance\n * `ng-options=\"user in users track by user.id\"` will not work with `md-select`.\n *\n * Working HTML:\n * <hljs lang=\"html\">\n * <div ng-controller=\"MyCtrl\">\n * <md-select ng-model=\"selectedUser\" ng-model-options=\"{trackBy: '$value.id'}\">\n * <md-option ng-value=\"user\" ng-repeat=\"user in users\">{{ user.name }}</md-option>\n * </md-select>\n * </div>\n * </hljs>\n */\nfunction SelectDirective($mdSelect, $mdUtil, $mdConstant, $mdTheming, $mdAria, $parse, $sce) {\n return {\n restrict: 'E',\n require: ['^?mdInputContainer', 'mdSelect', 'ngModel', '?^form'],\n compile: compile,\n controller: function() {\n } // empty placeholder controller to be initialized in link\n };\n\n /**\n * @param {JQLite} tElement\n * @param {IAttributes} tAttrs\n * @return {postLink}\n */\n function compile(tElement, tAttrs) {\n var isMultiple = $mdUtil.parseAttributeBoolean(tAttrs.multiple);\n tElement.addClass('md-auto-horizontal-margin');\n\n // add the select value that will hold our placeholder or selected option value\n var valueEl = angular.element('<md-select-value><span></span></md-select-value>');\n valueEl.append('<span class=\"md-select-icon\" aria-hidden=\"true\"></span>');\n valueEl.addClass('md-select-value');\n if (!valueEl[0].hasAttribute('id')) {\n valueEl.attr('id', 'select_value_label_' + $mdUtil.nextUid());\n }\n\n // There's got to be an md-content inside. If there's not one, let's add it.\n var mdContentEl = tElement.find('md-content');\n if (!mdContentEl.length) {\n tElement.append(angular.element('<md-content>').append(tElement.contents()));\n mdContentEl = tElement.find('md-content');\n }\n mdContentEl.attr('role', 'listbox');\n mdContentEl.attr('tabindex', '-1');\n\n if (isMultiple) {\n mdContentEl.attr('aria-multiselectable', 'true');\n } else {\n mdContentEl.attr('aria-multiselectable', 'false');\n }\n\n // Add progress spinner for md-options-loading\n if (tAttrs.mdOnOpen) {\n\n // Show progress indicator while loading async\n // Use ng-hide for `display:none` so the indicator does not interfere with the options list\n tElement\n .find('md-content')\n .prepend(angular.element(\n '<div>' +\n ' <md-progress-circular md-mode=\"indeterminate\" ng-if=\"$$loadingAsyncDone === false\"' +\n ' md-diameter=\"25px\"></md-progress-circular>' +\n '</div>'\n ));\n\n // Hide list [of item options] while loading async\n tElement\n .find('md-option')\n .attr('ng-show', '$$loadingAsyncDone');\n }\n\n if (tAttrs.name) {\n var autofillClone = angular.element('<select class=\"md-visually-hidden\"></select>');\n autofillClone.attr({\n 'name': tAttrs.name,\n 'aria-hidden': 'true',\n 'tabindex': '-1'\n });\n var opts = tElement.find('md-option');\n angular.forEach(opts, function(el) {\n var newEl = angular.element('<option>' + el.innerHTML + '</option>');\n if (el.hasAttribute('ng-value')) {\n newEl.attr('ng-value', el.getAttribute('ng-value'));\n }\n else if (el.hasAttribute('value')) {\n newEl.attr('value', el.getAttribute('value'));\n }\n autofillClone.append(newEl);\n });\n\n // Adds an extra option that will hold the selected value for the\n // cases where the select is a part of a non-AngularJS form. This can be done with a ng-model,\n // however if the `md-option` is being `ng-repeat`-ed, AngularJS seems to insert a similar\n // `option` node, but with a value of `? string: <value> ?` which would then get submitted.\n // This also goes around having to prepend a dot to the name attribute.\n autofillClone.append(\n '<option ng-value=\"' + tAttrs.ngModel + '\" selected></option>'\n );\n\n tElement.parent().append(autofillClone);\n }\n\n // Use everything that's left inside element.contents() as the contents of the menu\n var multipleContent = isMultiple ? 'multiple' : '';\n var ngModelOptions = tAttrs.ngModelOptions ? $mdUtil.supplant('ng-model-options=\"{0}\"', [tAttrs.ngModelOptions]) : '';\n var selectTemplate = '' +\n '<div class=\"md-select-menu-container\" aria-hidden=\"true\" role=\"presentation\">' +\n ' <md-select-menu role=\"presentation\" {0} {1}>{2}</md-select-menu>' +\n '</div>';\n\n selectTemplate = $mdUtil.supplant(selectTemplate, [multipleContent, ngModelOptions, tElement.html()]);\n tElement.empty().append(valueEl);\n tElement.append(selectTemplate);\n\n if (!tAttrs.tabindex) {\n tAttrs.$set('tabindex', 0);\n }\n\n return function postLink(scope, element, attrs, ctrls) {\n var untouched = true;\n var isDisabled;\n\n var containerCtrl = ctrls[0];\n var mdSelectCtrl = ctrls[1];\n var ngModelCtrl = ctrls[2];\n var formCtrl = ctrls[3];\n // grab a reference to the select menu value label\n var selectValueElement = element.find('md-select-value');\n var isReadonly = angular.isDefined(attrs.readonly);\n var disableAsterisk = $mdUtil.parseAttributeBoolean(attrs.mdNoAsterisk);\n var stopMdMultipleWatch;\n var userDefinedLabelledby = angular.isDefined(attrs.ariaLabelledby);\n var listboxContentElement = element.find('md-content');\n var initialPlaceholder = element.attr('placeholder');\n\n if (disableAsterisk) {\n element.addClass('md-no-asterisk');\n }\n\n if (containerCtrl) {\n var isErrorGetter = containerCtrl.isErrorGetter || function() {\n return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (formCtrl && formCtrl.$submitted));\n };\n\n if (containerCtrl.input) {\n // We ignore inputs that are in the md-select-header.\n // One case where this might be useful would be adding as searchbox.\n if (element.find('md-select-header').find('input')[0] !== containerCtrl.input[0]) {\n throw new Error(\"<md-input-container> can only have *one* child <input>, <textarea>, or <select> element!\");\n }\n }\n\n containerCtrl.input = element;\n if (!containerCtrl.label) {\n $mdAria.expect(element, 'aria-label', initialPlaceholder);\n var selectLabel = element.attr('aria-label');\n if (!selectLabel) {\n selectLabel = initialPlaceholder;\n }\n listboxContentElement.attr('aria-label', selectLabel);\n } else {\n containerCtrl.label.attr('aria-hidden', 'true');\n listboxContentElement.attr('aria-label', containerCtrl.label.text());\n containerCtrl.setHasPlaceholder(!!initialPlaceholder);\n }\n\n var stopInvalidWatch = scope.$watch(isErrorGetter, containerCtrl.setInvalid);\n }\n\n var selectContainer, selectScope, selectMenuCtrl;\n\n selectContainer = findSelectContainer();\n $mdTheming(element);\n\n var originalRender = ngModelCtrl.$render;\n ngModelCtrl.$render = function() {\n originalRender();\n syncSelectValueText();\n inputCheckValue();\n };\n\n var stopPlaceholderObserver = attrs.$observe('placeholder', ngModelCtrl.$render);\n\n var stopRequiredObserver = attrs.$observe('required', function (value) {\n if (containerCtrl && containerCtrl.label) {\n // Toggle the md-required class on the input containers label, because the input container\n // is automatically applying the asterisk indicator on the label.\n containerCtrl.label.toggleClass('md-required', value && !disableAsterisk);\n }\n element.removeAttr('aria-required');\n if (value) {\n listboxContentElement.attr('aria-required', 'true');\n } else {\n listboxContentElement.removeAttr('aria-required');\n }\n });\n\n /**\n * Set the contents of the md-select-value element. This element's contents are announced by\n * screen readers and used for displaying the value of the select in both single and multiple\n * selection modes.\n * @param {string=} text A sanitized and trusted HTML string or a pure text string from user\n * input.\n */\n mdSelectCtrl.setSelectValueText = function(text) {\n var useDefaultText = text === undefined || text === '';\n // Whether the select label has been given via user content rather than the internal\n // template of <md-option>\n var isSelectLabelFromUser = false;\n\n mdSelectCtrl.setIsPlaceholder(!text);\n\n if (attrs.mdSelectedText && attrs.mdSelectedHtml) {\n throw Error('md-select cannot have both `md-selected-text` and `md-selected-html`');\n }\n\n if (attrs.mdSelectedText || attrs.mdSelectedHtml) {\n text = $parse(attrs.mdSelectedText || attrs.mdSelectedHtml)(scope);\n isSelectLabelFromUser = true;\n } else if (useDefaultText) {\n // Use placeholder attribute, otherwise fallback to the md-input-container label\n var tmpPlaceholder = attrs.placeholder ||\n (containerCtrl && containerCtrl.label ? containerCtrl.label.text() : '');\n\n text = tmpPlaceholder || '';\n isSelectLabelFromUser = true;\n }\n\n var target = selectValueElement.children().eq(0);\n\n if (attrs.mdSelectedHtml) {\n // Using getTrustedHtml will run the content through $sanitize if it is not already\n // explicitly trusted. If the ngSanitize module is not loaded, this will\n // *correctly* throw an sce error.\n target.html($sce.getTrustedHtml(text));\n } else if (isSelectLabelFromUser) {\n target.text(text);\n } else {\n // If we've reached this point, the text is not user-provided.\n target.html(text);\n }\n\n if (useDefaultText) {\n // Avoid screen readers double announcing the label name when no value has been selected\n selectValueElement.attr('aria-hidden', 'true');\n if (!userDefinedLabelledby) {\n element.removeAttr('aria-labelledby');\n }\n } else {\n selectValueElement.removeAttr('aria-hidden');\n if (!userDefinedLabelledby) {\n element.attr('aria-labelledby', element[0].id + ' ' + selectValueElement[0].id);\n }\n }\n };\n\n /**\n * @param {boolean} isPlaceholder true to mark the md-select-value element and\n * input container, if one exists, with classes for styling when a placeholder is present.\n * false to remove those classes.\n */\n mdSelectCtrl.setIsPlaceholder = function(isPlaceholder) {\n if (isPlaceholder) {\n selectValueElement.addClass('md-select-placeholder');\n // Don't hide the floating label if the md-select has a placeholder.\n if (containerCtrl && containerCtrl.label && !element.attr('placeholder')) {\n containerCtrl.label.addClass('md-placeholder');\n }\n } else {\n selectValueElement.removeClass('md-select-placeholder');\n if (containerCtrl && containerCtrl.label && !element.attr('placeholder')) {\n containerCtrl.label.removeClass('md-placeholder');\n }\n }\n };\n\n if (!isReadonly) {\n var handleBlur = function(event) {\n // Attach before ngModel's blur listener to stop propagation of blur event\n // and prevent setting $touched.\n if (untouched) {\n untouched = false;\n if (selectScope._mdSelectIsOpen) {\n event.stopImmediatePropagation();\n }\n }\n\n containerCtrl && containerCtrl.setFocused(false);\n inputCheckValue();\n };\n var handleFocus = function() {\n // Always focus the container (if we have one) so floating labels and other styles are\n // applied properly\n containerCtrl && containerCtrl.setFocused(true);\n };\n\n element.on('focus', handleFocus);\n element.on('blur', handleBlur);\n }\n\n mdSelectCtrl.triggerClose = function() {\n $parse(attrs.mdOnClose)(scope);\n };\n\n scope.$$postDigest(function() {\n initAriaLabel();\n syncSelectValueText();\n });\n\n function initAriaLabel() {\n var labelText = element.attr('aria-label') || element.attr('placeholder');\n if (!labelText && containerCtrl && containerCtrl.label) {\n labelText = containerCtrl.label.text();\n }\n $mdAria.expect(element, 'aria-label', labelText);\n }\n\n var stopSelectedLabelsWatcher = scope.$watch(function() {\n return selectMenuCtrl.getSelectedLabels();\n }, syncSelectValueText);\n\n function syncSelectValueText() {\n selectMenuCtrl = selectMenuCtrl ||\n selectContainer.find('md-select-menu').controller('mdSelectMenu');\n mdSelectCtrl.setSelectValueText(selectMenuCtrl.getSelectedLabels());\n }\n\n // TODO add tests for mdMultiple\n // TODO add docs for mdMultiple\n var stopMdMultipleObserver = attrs.$observe('mdMultiple', function(val) {\n if (stopMdMultipleWatch) {\n stopMdMultipleWatch();\n }\n var parser = $parse(val);\n stopMdMultipleWatch = scope.$watch(function() {\n return parser(scope);\n }, function(multiple, prevVal) {\n var selectMenu = selectContainer.find('md-select-menu');\n // assume compiler did a good job\n if (multiple === undefined && prevVal === undefined) {\n return;\n }\n if (multiple) {\n var setMultipleAttrs = {'multiple': 'multiple'};\n element.attr(setMultipleAttrs);\n selectMenu.attr(setMultipleAttrs);\n } else {\n element.removeAttr('multiple');\n selectMenu.removeAttr('multiple');\n }\n element.find('md-content').attr('aria-multiselectable', multiple ? 'true' : 'false');\n\n if (selectContainer) {\n selectMenuCtrl.setMultiple(Boolean(multiple));\n originalRender = ngModelCtrl.$render;\n ngModelCtrl.$render = function() {\n originalRender();\n syncSelectValueText();\n inputCheckValue();\n };\n ngModelCtrl.$render();\n }\n });\n });\n\n var stopDisabledObserver = attrs.$observe('disabled', function(disabled) {\n if (angular.isString(disabled)) {\n disabled = true;\n }\n // Prevent click event being registered twice\n if (isDisabled !== undefined && isDisabled === disabled) {\n return;\n }\n isDisabled = disabled;\n if (disabled) {\n element\n .attr({'aria-disabled': 'true'})\n .removeAttr('tabindex')\n .removeAttr('aria-expanded')\n .removeAttr('aria-haspopup')\n .off('click', openSelect)\n .off('keydown', handleKeypress);\n } else {\n element\n .attr({\n 'tabindex': attrs.tabindex,\n 'aria-haspopup': 'listbox'\n })\n .removeAttr('aria-disabled')\n .on('click', openSelect)\n .on('keydown', handleKeypress);\n }\n });\n\n if (!attrs.hasOwnProperty('disabled') && !attrs.hasOwnProperty('ngDisabled')) {\n element.attr({'aria-disabled': 'false'});\n element.on('click', openSelect);\n element.on('keydown', handleKeypress);\n }\n\n var ariaAttrs = {\n role: 'button',\n 'aria-haspopup': 'listbox'\n };\n\n if (!element[0].hasAttribute('id')) {\n ariaAttrs.id = 'select_' + $mdUtil.nextUid();\n }\n\n var containerId = 'select_container_' + $mdUtil.nextUid();\n selectContainer.attr('id', containerId);\n var listboxContentId = 'select_listbox_' + $mdUtil.nextUid();\n selectContainer.find('md-content').attr('id', listboxContentId);\n // Only add aria-owns if element ownership is NOT represented in the DOM.\n if (!element.find('md-select-menu').length) {\n ariaAttrs['aria-owns'] = listboxContentId;\n }\n element.attr(ariaAttrs);\n\n scope.$on('$destroy', function() {\n stopRequiredObserver && stopRequiredObserver();\n stopDisabledObserver && stopDisabledObserver();\n stopMdMultipleWatch && stopMdMultipleWatch();\n stopMdMultipleObserver && stopMdMultipleObserver();\n stopSelectedLabelsWatcher && stopSelectedLabelsWatcher();\n stopPlaceholderObserver && stopPlaceholderObserver();\n stopInvalidWatch && stopInvalidWatch();\n\n element.off('focus');\n element.off('blur');\n\n $mdSelect\n .destroy()\n .finally(function() {\n if (containerCtrl) {\n containerCtrl.setFocused(false);\n containerCtrl.setHasValue(false);\n containerCtrl.input = null;\n }\n ngModelCtrl.$setTouched();\n });\n });\n\n function inputCheckValue() {\n // The select counts as having a value if one or more options are selected,\n // or if the input's validity state says it has bad input (eg: string in a number input).\n // We must do this on nextTick as the $render is sometimes invoked on nextTick.\n $mdUtil.nextTick(function () {\n containerCtrl && containerCtrl.setHasValue(\n selectMenuCtrl.getSelectedLabels().length > 0 || (element[0].validity || {}).badInput);\n });\n }\n\n function findSelectContainer() {\n var selectContainer = angular.element(\n element[0].querySelector('.md-select-menu-container')\n );\n selectScope = scope;\n attrs.mdContainerClass && selectContainer.addClass(attrs.mdContainerClass);\n selectMenuCtrl = selectContainer.find('md-select-menu').controller('mdSelectMenu');\n selectMenuCtrl.init(ngModelCtrl, attrs);\n element.on('$destroy', function() {\n selectContainer.remove();\n });\n return selectContainer;\n }\n\n /**\n * Determine if the select menu should be opened or an option in the select menu should be\n * selected.\n * @param {KeyboardEvent} e keyboard event to handle\n */\n function handleKeypress(e) {\n if ($mdConstant.isNavigationKey(e)) {\n // prevent page scrolling on interaction\n e.preventDefault();\n openSelect(e);\n } else {\n if (shouldHandleKey(e, $mdConstant)) {\n e.preventDefault();\n\n var node = selectMenuCtrl.optNodeForKeyboardSearch(e);\n if (!node || node.hasAttribute('disabled')) {\n return;\n }\n var optionCtrl = angular.element(node).controller('mdOption');\n if (!selectMenuCtrl.isMultiple) {\n angular.forEach(Object.keys(selectMenuCtrl.selected), function (key) {\n selectMenuCtrl.deselect(key);\n });\n }\n selectMenuCtrl.select(optionCtrl.hashKey, optionCtrl.value);\n selectMenuCtrl.refreshViewValue();\n }\n }\n }\n\n function openSelect() {\n selectScope._mdSelectIsOpen = true;\n element.attr('aria-expanded', 'true');\n\n $mdSelect.show({\n scope: selectScope,\n preserveScope: true,\n skipCompile: true,\n element: selectContainer,\n target: element[0],\n selectCtrl: mdSelectCtrl,\n preserveElement: true,\n hasBackdrop: true,\n loadingAsync: attrs.mdOnOpen ? scope.$eval(attrs.mdOnOpen) || true : false\n }).finally(function() {\n selectScope._mdSelectIsOpen = false;\n element.removeAttr('aria-expanded');\n element.removeAttr('aria-activedescendant');\n ngModelCtrl.$setTouched();\n });\n }\n\n };\n }\n}\n\nfunction SelectMenuDirective($parse, $mdUtil, $mdConstant, $mdTheming) {\n // We want the scope to be set to 'false' so an isolated scope is not created\n // which would interfere with the md-select-header's access to the\n // parent scope.\n SelectMenuController.$inject = [\"$scope\", \"$attrs\", \"$element\"];\n return {\n restrict: 'E',\n require: ['mdSelectMenu'],\n scope: false,\n controller: SelectMenuController,\n link: {pre: preLink}\n };\n\n // We use preLink instead of postLink to ensure that the select is initialized before\n // its child options run postLink.\n function preLink(scope, element, attrs, ctrls) {\n var selectMenuCtrl = ctrls[0];\n\n element.addClass('_md'); // private md component indicator for styling\n\n $mdTheming(element);\n element.on('click', clickListener);\n element.on('keypress', keyListener);\n\n /**\n * @param {KeyboardEvent} keyboardEvent\n */\n function keyListener(keyboardEvent) {\n if (keyboardEvent.keyCode === 13 || keyboardEvent.keyCode === 32) {\n clickListener(keyboardEvent);\n }\n }\n\n /**\n * @param {Event} mouseEvent\n * @return {void}\n */\n function clickListener(mouseEvent) {\n var option = $mdUtil.getClosest(mouseEvent.target, 'md-option');\n var optionCtrl = option && angular.element(option).data('$mdOptionController');\n\n if (!option || !optionCtrl) {\n // Avoid closing the menu when the select header's input is clicked\n if (mouseEvent.target && mouseEvent.target.parentNode &&\n mouseEvent.target.parentNode.tagName === 'MD-SELECT-HEADER') {\n mouseEvent.stopImmediatePropagation();\n }\n return;\n } else if (option.hasAttribute('disabled')) {\n mouseEvent.stopImmediatePropagation();\n return;\n }\n\n var optionHashKey = selectMenuCtrl.hashGetter(optionCtrl.value);\n var isSelected = angular.isDefined(selectMenuCtrl.selected[optionHashKey]);\n\n scope.$apply(function() {\n if (selectMenuCtrl.isMultiple) {\n if (isSelected) {\n selectMenuCtrl.deselect(optionHashKey);\n } else {\n selectMenuCtrl.select(optionHashKey, optionCtrl.value);\n }\n } else {\n if (!isSelected) {\n angular.forEach(Object.keys(selectMenuCtrl.selected), function (key) {\n selectMenuCtrl.deselect(key);\n });\n selectMenuCtrl.select(optionHashKey, optionCtrl.value);\n }\n }\n selectMenuCtrl.refreshViewValue();\n });\n }\n }\n\n function SelectMenuController($scope, $attrs, $element) {\n var self = this;\n var defaultIsEmpty;\n var searchStr = '';\n var clearSearchTimeout, optNodes, optText;\n var CLEAR_SEARCH_AFTER = 300;\n\n self.isMultiple = angular.isDefined($attrs.multiple);\n // selected is an object with keys matching all of the selected options' hashed values\n self.selected = {};\n // options is an object with keys matching every option's hash value,\n // and values containing an instance of every option's controller.\n self.options = {};\n\n $scope.$watchCollection(function() {\n return self.options;\n }, function() {\n self.ngModel.$render();\n updateOptionSetSizeAndPosition();\n });\n\n /**\n * @param {boolean} isMultiple\n */\n self.setMultiple = function(isMultiple) {\n var ngModel = self.ngModel;\n defaultIsEmpty = defaultIsEmpty || ngModel.$isEmpty;\n self.isMultiple = isMultiple;\n\n if (self.isMultiple) {\n // We want to delay the render method so that the directive has a chance to load before\n // rendering, this prevents the control being marked as dirty onload.\n var loaded = false;\n var delayedRender = function(val) {\n if (!loaded) {\n $mdUtil.nextTick(function () {\n renderMultiple(val);\n loaded = true;\n });\n } else {\n renderMultiple(val);\n }\n };\n ngModel.$validators['md-multiple'] = validateArray;\n ngModel.$render = delayedRender;\n\n // watchCollection on the model because by default ngModel only watches the model's\n // reference. This allows the developer to also push and pop from their array.\n $scope.$watchCollection(self.modelBinding, function(value) {\n if (validateArray(value)) {\n delayedRender(value);\n }\n });\n\n ngModel.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n } else {\n delete ngModel.$validators['md-multiple'];\n ngModel.$render = renderSingular;\n }\n\n function validateArray(modelValue, viewValue) {\n // If a value is truthy but not an array, reject it.\n // If value is undefined/falsy, accept that it's an empty array.\n return angular.isArray(modelValue || viewValue || []);\n }\n };\n\n /**\n * @param {KeyboardEvent} keyboardEvent keyboard event to handle\n * @return {Element|HTMLElement|undefined}\n */\n self.optNodeForKeyboardSearch = function(keyboardEvent) {\n var search, i;\n clearSearchTimeout && clearTimeout(clearSearchTimeout);\n clearSearchTimeout = setTimeout(function() {\n clearSearchTimeout = undefined;\n searchStr = '';\n optText = undefined;\n optNodes = undefined;\n }, CLEAR_SEARCH_AFTER);\n\n searchStr += keyboardEvent.key;\n search = new RegExp('^' + $mdUtil.sanitize(searchStr), 'i');\n if (!optNodes) {\n optNodes = $element.find('md-option');\n optText = new Array(optNodes.length);\n angular.forEach(optNodes, function(el, i) {\n optText[i] = el.textContent.trim();\n });\n }\n\n for (i = 0; i < optText.length; ++i) {\n if (search.test(optText[i])) {\n return optNodes[i];\n }\n }\n };\n\n self.init = function(ngModel, parentAttrs) {\n self.ngModel = ngModel;\n self.modelBinding = parentAttrs.ngModel;\n\n // Setup a more robust version of isEmpty to ensure value is a valid option\n self.ngModel.$isEmpty = function($viewValue) {\n // We have to transform the viewValue into the hashKey, because otherwise the\n // OptionCtrl may not exist. Developers may have specified a trackBy function.\n var hashedValue = self.options[self.hashGetter($viewValue)] ? self.options[self.hashGetter($viewValue)].value : null;\n // Base this check on the default AngularJS $isEmpty() function.\n // eslint-disable-next-line no-self-compare\n return !angular.isDefined(hashedValue) || hashedValue === null || hashedValue === '' || hashedValue !== hashedValue;\n };\n\n // Allow users to provide `ng-model=\"foo\" ng-model-options=\"{trackBy: '$value.id'}\"` so\n // that we can properly compare objects set on the model to the available options\n //\n // If the user doesn't provide a trackBy, we automatically generate an id for every\n // value passed in with the getId function\n if ($attrs.ngModelOptions) {\n self.hashGetter = function(value) {\n var ngModelOptions = $parse($attrs.ngModelOptions)($scope);\n var trackByOption = ngModelOptions && ngModelOptions.trackBy;\n\n if (trackByOption) {\n return $parse(trackByOption)($scope, { $value: value });\n } else if (angular.isObject(value)) {\n return getId(value);\n }\n return value;\n };\n } else {\n self.hashGetter = getId;\n }\n self.setMultiple(self.isMultiple);\n\n /**\n * If the value is an object, get the unique, incremental id of the value.\n * If it's not an object, the value will be converted to a string and then returned.\n * @param value\n * @returns {string}\n */\n function getId(value) {\n if (angular.isObject(value) && !angular.isArray(value)) {\n return 'object_' + (value.$$mdSelectId || (value.$$mdSelectId = ++selectNextId));\n }\n return value + '';\n }\n\n if (parentAttrs.hasOwnProperty('mdSelectOnlyOption')) {\n $mdUtil.nextTick(function() {\n var optionKeys = Object.keys(self.options);\n\n if (optionKeys.length === 1) {\n var option = self.options[optionKeys[0]];\n\n self.deselect(Object.keys(self.selected)[0]);\n self.select(self.hashGetter(option.value), option.value);\n self.refreshViewValue();\n self.ngModel.$setPristine();\n }\n }, false);\n }\n };\n\n /**\n * @param {string=} id\n */\n self.setActiveDescendant = function(id) {\n if (angular.isDefined(id)) {\n $element.find('md-content').attr('aria-activedescendant', id);\n } else {\n $element.find('md-content').removeAttr('aria-activedescendant');\n }\n };\n\n /**\n * @param {{mode: string}=} opts options object to allow specifying html (default) or aria mode.\n * @return {string} comma separated set of selected values\n */\n self.getSelectedLabels = function(opts) {\n opts = opts || {};\n var mode = opts.mode || 'html';\n var selectedOptionEls =\n $mdUtil.nodesToArray($element[0].querySelectorAll('md-option[selected]'));\n\n if (selectedOptionEls.length) {\n var mapFn;\n\n if (mode === 'html') {\n // Map the given element to its innerHTML string. If the element has a child ripple\n // container remove it from the HTML string, before returning the string.\n mapFn = function(el) {\n // If we do not have a `value` or `ng-value`, assume it is an empty option which clears\n // the select.\n if (el.hasAttribute('md-option-empty')) {\n return '';\n }\n\n var html = el.innerHTML;\n\n // Remove the ripple container from the selected option, copying it would cause a CSP\n // violation.\n var rippleContainer = el.querySelector('.md-ripple-container');\n if (rippleContainer) {\n html = html.replace(rippleContainer.outerHTML, '');\n }\n\n // Remove the checkbox container, because it will cause the label to wrap inside of the\n // placeholder. It should be not displayed inside of the label element.\n var checkboxContainer = el.querySelector('.md-container');\n if (checkboxContainer) {\n html = html.replace(checkboxContainer.outerHTML, '');\n }\n\n return html;\n };\n } else if (mode === 'aria') {\n mapFn = function(el) {\n return el.hasAttribute('aria-label') ? el.getAttribute('aria-label') : el.textContent;\n };\n }\n\n // Ensure there are no duplicates; see https://github.com/angular/material/issues/9442\n return $mdUtil.uniq(selectedOptionEls.map(mapFn)).join(', ');\n } else {\n return '';\n }\n };\n\n /**\n * Mark an option as selected\n * @param {string} hashKey key within the SelectMenuController.options object, which is an\n * instance of OptionController.\n * @param {OptionController} hashedValue value to associate with the key\n */\n self.select = function(hashKey, hashedValue) {\n var option = self.options[hashKey];\n option && option.setSelected(true, self.isMultiple);\n self.selected[hashKey] = hashedValue;\n };\n\n /**\n * Mark an option as not selected\n * @param {string} hashKey key within the SelectMenuController.options object, which is an\n * instance of OptionController.\n */\n self.deselect = function(hashKey) {\n var option = self.options[hashKey];\n option && option.setSelected(false, self.isMultiple);\n delete self.selected[hashKey];\n };\n\n /**\n * Add an option to the select\n * @param {string} hashKey key within the SelectMenuController.options object, which is an\n * instance of OptionController.\n * @param {OptionController} optionCtrl instance to associate with the key\n */\n self.addOption = function(hashKey, optionCtrl) {\n if (angular.isDefined(self.options[hashKey])) {\n throw new Error('Duplicate md-option values are not allowed in a select. ' +\n 'Duplicate value \"' + optionCtrl.value + '\" found.');\n }\n\n self.options[hashKey] = optionCtrl;\n\n // If this option's value was already in our ngModel, go ahead and select it.\n if (angular.isDefined(self.selected[hashKey])) {\n self.select(hashKey, optionCtrl.value);\n\n // When the current $modelValue of the ngModel Controller is using the same hash as\n // the current option, which will be added, then we can be sure, that the validation\n // of the option has occurred before the option was added properly.\n // This means, that we have to manually trigger a new validation of the current option.\n if (angular.isDefined(self.ngModel.$$rawModelValue) &&\n self.hashGetter(self.ngModel.$$rawModelValue) === hashKey) {\n self.ngModel.$validate();\n }\n\n self.refreshViewValue();\n }\n };\n\n /**\n * Remove an option from the select\n * @param {string} hashKey key within the SelectMenuController.options object, which is an\n * instance of OptionController.\n */\n self.removeOption = function(hashKey) {\n delete self.options[hashKey];\n // Don't deselect an option when it's removed - the user's ngModel should be allowed\n // to have values that do not match a currently available option.\n };\n\n self.refreshViewValue = function() {\n var values = [];\n var option;\n for (var hashKey in self.selected) {\n // If this hashKey has an associated option, push that option's value to the model.\n if ((option = self.options[hashKey])) {\n values.push(option.value);\n } else {\n // Otherwise, the given hashKey has no associated option, and we got it\n // from an ngModel value at an earlier time. Push the unhashed value of\n // this hashKey to the model.\n // This allows the developer to put a value in the model that doesn't yet have\n // an associated option.\n values.push(self.selected[hashKey]);\n }\n }\n\n var newVal = self.isMultiple ? values : values[0];\n var prevVal = self.ngModel.$modelValue;\n\n if (!equals(prevVal, newVal)) {\n self.ngModel.$setViewValue(newVal);\n self.ngModel.$render();\n }\n\n function equals(prevVal, newVal) {\n if (self.isMultiple) {\n if (!angular.isArray(prevVal)) {\n // newVal is always an array when self.isMultiple is true\n // thus, if prevVal is not an array they are different\n return false;\n } else if (prevVal.length !== newVal.length) {\n // they are different if they have different length\n return false;\n } else {\n // if they have the same length, then they are different\n // if an item in the newVal array can't be found in the prevVal\n var prevValHashes = prevVal.map(function(prevValItem) {\n return self.hashGetter(prevValItem);\n });\n return newVal.every(function(newValItem) {\n var newValItemHash = self.hashGetter(newValItem);\n return prevValHashes.some(function(prevValHash) {\n return prevValHash === newValItemHash;\n });\n });\n }\n } else {\n return self.hashGetter(prevVal) === self.hashGetter(newVal);\n }\n }\n };\n\n /**\n * If the options include md-optgroups, then we need to apply aria-setsize and aria-posinset\n * to help screen readers understand the indexes. When md-optgroups are not used, we save on\n * perf and extra attributes by not applying these attributes as they are not needed by screen\n * readers.\n */\n function updateOptionSetSizeAndPosition() {\n var i, options;\n var hasOptGroup = $element.find('md-optgroup');\n if (!hasOptGroup.length) {\n return;\n }\n\n options = $element.find('md-option');\n\n for (i = 0; i < options.length; i++) {\n options[i].setAttribute('aria-setsize', options.length);\n options[i].setAttribute('aria-posinset', i + 1);\n }\n }\n\n function renderMultiple() {\n var newSelectedValues = self.ngModel.$modelValue || self.ngModel.$viewValue || [];\n if (!angular.isArray(newSelectedValues)) {\n return;\n }\n\n var oldSelected = Object.keys(self.selected);\n\n var newSelectedHashes = newSelectedValues.map(self.hashGetter);\n var deselected = oldSelected.filter(function(hash) {\n return newSelectedHashes.indexOf(hash) === -1;\n });\n\n deselected.forEach(self.deselect);\n newSelectedHashes.forEach(function(hashKey, i) {\n self.select(hashKey, newSelectedValues[i]);\n });\n }\n\n function renderSingular() {\n var value = self.ngModel.$viewValue || self.ngModel.$modelValue;\n Object.keys(self.selected).forEach(self.deselect);\n self.select(self.hashGetter(value), value);\n }\n }\n}\n\n/**\n * @ngdoc directive\n * @name mdOption\n * @restrict E\n * @module material.components.select\n *\n * @description Displays an option in a <a ng-href=\"api/directive/mdSelect\">md-select</a> box's\n * dropdown menu. Options can be grouped using\n * <a ng-href=\"api/directive/mdOptgroup\">md-optgroup</a> element directives.\n *\n * ### Option Params\n *\n * When applied, `md-option-empty` will mark the option as \"empty\" allowing the option to clear the\n * select and put it back in it's default state. You may supply this attribute on any option you\n * wish, however, it is automatically applied to an option whose `value` or `ng-value` are not\n * defined.\n *\n * **Automatically Applied**\n *\n * - `<md-option>`\n * - `<md-option value>`\n * - `<md-option value=\"\">`\n * - `<md-option ng-value>`\n * - `<md-option ng-value=\"\">`\n *\n * **NOT Automatically Applied**\n *\n * - `<md-option ng-value=\"1\">`\n * - `<md-option ng-value=\"''\">`\n * - `<md-option ng-value=\"undefined\">`\n * - `<md-option value=\"undefined\">` (this evaluates to the string `\"undefined\"`)\n * - <code ng-non-bindable><md-option ng-value=\"{{someValueThatMightBeUndefined}}\"></code>\n *\n * **Note:** A value of `undefined` ***is considered a valid value*** (and does not auto-apply this\n * attribute) since you may wish this to be your \"Not Available\" or \"None\" option.\n *\n * **Note:** Using the\n * <a ng-href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#Attributes\">value</a>\n * attribute from the `<option>` element (as opposed to the `<md-option>` element's\n * <a ng-href=\"https://docs.angularjs.org/api/ng/directive/ngValue\">ng-value</a>) always evaluates\n * to a `string`. This means that `value=\"null\"` will cause a check against `myValue != \"null\"`\n * rather than `!myValue` or `myValue != null`.\n * Importantly, this also applies to `number` values. `value=\"1\"` will not match up with an\n * `ng-model` like `$scope.selectedValue = 1`. Use `ng-value=\"1\"` in this case and other cases where\n * you have values that are not strings.\n *\n * **Note:** Please see our <a ng-href=\"api/directive/mdSelect#selects-and-object-equality\">docs on\n * using objects with `md-select`</a> for additional guidance on using the `trackBy` option with\n * `ng-model-options`.\n *\n * @param {expression=} ng-value Binds the given expression to the value of the option.\n * @param {string=} value Attribute to set the value of the option.\n * @param {expression=} ng-repeat <a ng-href=\"https://docs.angularjs.org/api/ng/directive/ngRepeat\">\n * AngularJS directive</a> that instantiates a template once per item from a collection.\n * @param {expression=} ng-selected <a ng-href=\"https://docs.angularjs.org/api/ng/directive/ngSelected\">\n * AngularJS directive</a> that adds the `selected` attribute to the option when the expression\n * evaluates as truthy.\n *\n * **Note:** Unlike native `option` elements used with AngularJS, `md-option` elements\n * watch their `selected` attributes for changes and trigger model value changes on `md-select`.\n * @param {boolean=} md-option-empty If the attribute exists, mark the option as \"empty\" allowing\n * the option to clear the select and put it back in it's default state. You may supply this\n * attribute on any option you wish, however, it is automatically applied to an option whose `value`\n * or `ng-value` are not defined.\n * @param {number=} tabindex The `tabindex` of the option. Defaults to `0`.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-select ng-model=\"currentState\" placeholder=\"Select a state\">\n * <md-option ng-value=\"AL\">Alabama</md-option>\n * <md-option ng-value=\"AK\">Alaska</md-option>\n * <md-option ng-value=\"FL\">Florida</md-option>\n * </md-select>\n * </hljs>\n *\n * With `ng-repeat`:\n * <hljs lang=\"html\">\n * <md-select ng-model=\"currentState\" placeholder=\"Select a state\">\n * <md-option ng-value=\"state\" ng-repeat=\"state in states\">{{ state }}</md-option>\n * </md-select>\n * </hljs>\n */\nfunction OptionDirective($mdButtonInkRipple, $mdUtil, $mdTheming) {\n\n return {\n restrict: 'E',\n require: ['mdOption', '^^mdSelectMenu'],\n controller: OptionController,\n compile: compile\n };\n\n /**\n * @param {JQLite} element\n * @param {IAttributes} attrs\n * @return {postLink}\n */\n function compile(element, attrs) {\n // Manual transclusion to avoid the extra inner <span> that ng-transclude generates\n element.append(angular.element('<div class=\"md-text\">').append(element.contents()));\n\n element.attr('tabindex', attrs.tabindex || '0');\n\n if (!hasDefinedValue(attrs)) {\n element.attr('md-option-empty', '');\n }\n\n return postLink;\n }\n\n /**\n * @param {Object} attrs list of attributes from the compile function\n * @return {string|undefined|null} if defined and non-empty, return the value of the option's\n * value attribute, otherwise return the value of the option's ng-value attribute.\n */\n function hasDefinedValue(attrs) {\n var value = attrs.value;\n var ngValue = attrs.ngValue;\n\n return value || ngValue;\n }\n\n function postLink(scope, element, attrs, ctrls) {\n var optionCtrl = ctrls[0];\n var selectMenuCtrl = ctrls[1];\n\n $mdTheming(element);\n\n if (selectMenuCtrl.isMultiple) {\n element.addClass('md-checkbox-enabled');\n if (!CHECKBOX_SELECTION_INDICATOR) {\n var indicator = document.createElement('div');\n indicator.className = 'md-container';\n indicator.appendChild(document.createElement('div'));\n indicator.firstChild.className = 'md-icon';\n CHECKBOX_SELECTION_INDICATOR = angular.element(indicator);\n }\n element.prepend(CHECKBOX_SELECTION_INDICATOR.clone());\n }\n\n if (angular.isDefined(attrs.ngValue)) {\n scope.$watch(attrs.ngValue, function (newValue, oldValue) {\n setOptionValue(newValue, oldValue);\n element.removeAttr('aria-checked');\n });\n } else if (angular.isDefined(attrs.value)) {\n setOptionValue(attrs.value);\n } else {\n scope.$watch(function() {\n return element.text().trim();\n }, setOptionValue);\n }\n\n attrs.$observe('disabled', function(disabled) {\n if (disabled) {\n element.attr('tabindex', '-1');\n } else {\n element.attr('tabindex', '0');\n }\n });\n\n scope.$$postDigest(function() {\n attrs.$observe('selected', function(selected) {\n if (!angular.isDefined(selected)) return;\n if (typeof selected == 'string') selected = true;\n if (selected) {\n if (!selectMenuCtrl.isMultiple) {\n selectMenuCtrl.deselect(Object.keys(selectMenuCtrl.selected)[0]);\n }\n selectMenuCtrl.select(optionCtrl.hashKey, optionCtrl.value);\n } else {\n selectMenuCtrl.deselect(optionCtrl.hashKey);\n }\n selectMenuCtrl.refreshViewValue();\n });\n });\n\n $mdButtonInkRipple.attach(scope, element);\n configureAria();\n\n /**\n * @param {*} newValue the option's new value\n * @param {*=} oldValue the option's previous value\n * @param {boolean=} prevAttempt true if this had to be attempted again due to an undefined\n * hashGetter on the selectMenuCtrl, undefined otherwise.\n */\n function setOptionValue(newValue, oldValue, prevAttempt) {\n if (!selectMenuCtrl.hashGetter) {\n if (!prevAttempt) {\n scope.$$postDigest(function() {\n setOptionValue(newValue, oldValue, true);\n });\n }\n return;\n }\n var oldHashKey = selectMenuCtrl.hashGetter(oldValue, scope);\n var newHashKey = selectMenuCtrl.hashGetter(newValue, scope);\n\n optionCtrl.hashKey = newHashKey;\n optionCtrl.value = newValue;\n\n selectMenuCtrl.removeOption(oldHashKey, optionCtrl);\n selectMenuCtrl.addOption(newHashKey, optionCtrl);\n }\n\n scope.$on('$destroy', function() {\n selectMenuCtrl.removeOption(optionCtrl.hashKey, optionCtrl);\n });\n\n function configureAria() {\n var ariaAttrs = {\n 'role': 'option'\n };\n\n // We explicitly omit the `aria-selected` attribute from single-selection, unselected\n // options. Including the `aria-selected=\"false\"` attributes adds a significant amount of\n // noise to screen-reader users without providing useful information.\n if (selectMenuCtrl.isMultiple) {\n ariaAttrs['aria-selected'] = 'false';\n }\n\n if (!element[0].hasAttribute('id')) {\n ariaAttrs.id = 'select_option_' + $mdUtil.nextUid();\n }\n element.attr(ariaAttrs);\n }\n }\n}\n\n/**\n * @param {JQLite} $element\n * @constructor\n */\nfunction OptionController($element) {\n /**\n * @param {boolean} isSelected\n * @param {boolean=} isMultiple\n */\n this.setSelected = function(isSelected, isMultiple) {\n if (isSelected) {\n $element.attr({\n 'selected': 'true',\n 'aria-selected': 'true'\n });\n } else if (!isSelected) {\n $element.removeAttr('selected');\n\n if (isMultiple) {\n $element.attr('aria-selected', 'false');\n } else {\n // We explicitly omit the `aria-selected` attribute from single-selection, unselected\n // options. Including the `aria-selected=\"false\"` attributes adds a significant amount of\n // noise to screen-reader users without providing useful information.\n $element.removeAttr('aria-selected');\n }\n }\n };\n}\n\n/**\n * @ngdoc directive\n * @name mdOptgroup\n * @restrict E\n * @module material.components.select\n *\n * @description Displays a label separating groups of\n * <a ng-href=\"api/directive/mdOption\">md-option</a> element directives in a\n * <a ng-href=\"api/directive/mdSelect\">md-select</a> box's dropdown menu.\n *\n * **Note:** When using `md-select-header` element directives within a `md-select`, the labels that\n * would normally be added to the <a ng-href=\"api/directive/mdOptgroup\">md-optgroup</a> directives\n * are omitted, allowing the `md-select-header` to represent the option group label\n * (and possibly more).\n *\n * @usage\n * With label attributes\n * <hljs lang=\"html\">\n * <md-select ng-model=\"currentState\" placeholder=\"Select a state\">\n * <md-optgroup label=\"Southern\">\n * <md-option ng-value=\"AL\">Alabama</md-option>\n * <md-option ng-value=\"FL\">Florida</md-option>\n * </md-optgroup>\n * <md-optgroup label=\"Northern\">\n * <md-option ng-value=\"AK\">Alaska</md-option>\n * <md-option ng-value=\"MA\">Massachusetts</md-option>\n * </md-optgroup>\n * </md-select>\n * </hljs>\n *\n * With label elements\n * <hljs lang=\"html\">\n * <md-select ng-model=\"currentState\" placeholder=\"Select a state\">\n * <md-optgroup>\n * <label>Southern</label>\n * <md-option ng-value=\"AL\">Alabama</md-option>\n * <md-option ng-value=\"FL\">Florida</md-option>\n * </md-optgroup>\n * <md-optgroup>\n * <label>Northern</label>\n * <md-option ng-value=\"AK\">Alaska</md-option>\n * <md-option ng-value=\"MA\">Massachusetts</md-option>\n * </md-optgroup>\n * </md-select>\n * </hljs>\n *\n * @param {string=} label The option group's label.\n */\nfunction OptgroupDirective() {\n return {\n restrict: 'E',\n compile: compile\n };\n function compile(element, attrs) {\n // If we have a select header element, we don't want to add the normal label\n // header.\n if (!hasSelectHeader()) {\n setupLabelElement();\n }\n element.attr('role', 'group');\n\n function hasSelectHeader() {\n return element.parent().find('md-select-header').length;\n }\n\n function setupLabelElement() {\n var labelElement = element.find('label');\n if (!labelElement.length) {\n labelElement = angular.element('<label>');\n element.prepend(labelElement);\n }\n labelElement.addClass('md-container-ignore');\n labelElement.attr('aria-hidden', 'true');\n if (attrs.label) {\n labelElement.text(attrs.label);\n }\n element.attr('aria-label', labelElement.text());\n }\n }\n}\n\nfunction SelectHeaderDirective() {\n return {\n restrict: 'E',\n };\n}\n\nfunction SelectProvider($$interimElementProvider) {\n selectDefaultOptions.$inject = [\"$mdSelect\", \"$mdConstant\", \"$mdUtil\", \"$window\", \"$q\", \"$$rAF\", \"$animateCss\", \"$animate\", \"$document\"];\n return $$interimElementProvider('$mdSelect')\n .setDefaults({\n methods: ['target'],\n options: selectDefaultOptions\n });\n\n /* @ngInject */\n function selectDefaultOptions($mdSelect, $mdConstant, $mdUtil, $window, $q, $$rAF, $animateCss, $animate, $document) {\n var ERROR_TARGET_EXPECTED = \"$mdSelect.show() expected a target element in options.target but got '{0}'!\";\n var animator = $mdUtil.dom.animator;\n var keyCodes = $mdConstant.KEY_CODE;\n\n return {\n parent: 'body',\n themable: true,\n onShow: onShow,\n onRemove: onRemove,\n hasBackdrop: true,\n disableParentScroll: true\n };\n\n /**\n * Interim-element onRemove logic....\n */\n function onRemove(scope, element, opts) {\n var animationRunner = null;\n var destroyListener = scope.$on('$destroy', function() {\n // Listen for the case where the element was destroyed while there was an\n // ongoing close animation. If this happens, we need to end the animation\n // manually.\n animationRunner.end();\n });\n\n opts = opts || { };\n opts.cleanupInteraction();\n opts.cleanupResizing();\n opts.hideBackdrop();\n\n // For navigation $destroy events, do a quick, non-animated removal,\n // but for normal closes (from clicks, etc) animate the removal\n return (opts.$destroy === true) ? cleanElement() : animateRemoval().then(cleanElement);\n\n /**\n * For normal closes (eg clicks), animate the removal.\n * For forced closes (like $destroy events from navigation),\n * skip the animations.\n */\n function animateRemoval() {\n animationRunner = $animateCss(element, {addClass: 'md-leave'});\n return animationRunner.start();\n }\n\n /**\n * Restore the element to a closed state\n */\n function cleanElement() {\n destroyListener();\n\n element\n .removeClass('md-active')\n .attr('aria-hidden', 'true')\n .css({\n 'display': 'none',\n 'top': '',\n 'right': '',\n 'bottom': '',\n 'left': '',\n 'font-size': '',\n 'min-width': ''\n });\n\n announceClosed(opts);\n\n if (!opts.$destroy) {\n if (opts.restoreFocus) {\n opts.target.focus();\n } else {\n // Make sure that the container's md-input-focused is removed on backdrop click.\n $mdUtil.nextTick(function() {\n opts.target.triggerHandler('blur');\n }, true);\n }\n }\n }\n }\n\n /**\n * Interim-element onShow logic.\n */\n function onShow(scope, element, opts) {\n\n watchAsyncLoad();\n sanitizeAndConfigure(scope, opts);\n\n opts.hideBackdrop = showBackdrop(scope, element, opts);\n\n return showDropDown(scope, element, opts)\n .then(function(response) {\n element.attr('aria-hidden', 'false');\n opts.alreadyOpen = true;\n opts.cleanupInteraction = activateInteraction();\n opts.cleanupResizing = activateResizing();\n opts.contentEl[0].focus();\n\n return response;\n }, opts.hideBackdrop);\n\n // ************************************\n // Closure Functions\n // ************************************\n\n /**\n * Attach the select DOM element(s) and animate to the correct positions and scale.\n */\n function showDropDown(scope, element, opts) {\n if (opts.parent !== element.parent()) {\n element.parent().attr('aria-owns', element.find('md-content').attr('id'));\n }\n\n opts.parent.append(element);\n\n return $q(function(resolve, reject) {\n try {\n $animateCss(element, {removeClass: 'md-leave', duration: 0})\n .start()\n .then(positionAndFocusMenu)\n .then(resolve);\n\n } catch (e) {\n reject(e);\n }\n });\n }\n\n /**\n * Initialize container and dropDown menu positions/scale, then animate to show.\n * @return {*} a Promise that resolves after the menu is animated in and an item is focused\n */\n function positionAndFocusMenu() {\n return $q(function(resolve) {\n if (opts.isRemoved) return $q.reject(false);\n\n var info = calculateMenuPositions(scope, element, opts);\n\n info.container.element.css(animator.toCss(info.container.styles));\n info.dropDown.element.css(animator.toCss(info.dropDown.styles));\n\n $$rAF(function() {\n element.addClass('md-active');\n info.dropDown.element.css(animator.toCss({transform: ''}));\n autoFocus(opts.focusedNode);\n\n resolve();\n });\n\n });\n }\n\n /**\n * Show modal backdrop element.\n */\n function showBackdrop(scope, element, options) {\n\n // If we are not within a dialog...\n if (options.disableParentScroll && !$mdUtil.getClosest(options.target, 'MD-DIALOG')) {\n // !! DO this before creating the backdrop; since disableScrollAround()\n // configures the scroll offset; which is used by mdBackDrop postLink()\n options.restoreScroll = $mdUtil.disableScrollAround(options.element, options.parent);\n } else {\n options.disableParentScroll = false;\n }\n\n if (options.hasBackdrop) {\n // Override duration to immediately show invisible backdrop\n options.backdrop = $mdUtil.createBackdrop(scope, \"md-select-backdrop md-click-catcher\");\n $animate.enter(options.backdrop, $document[0].body, null, {duration: 0});\n }\n\n /**\n * Hide modal backdrop element...\n */\n return function hideBackdrop() {\n if (options.backdrop) options.backdrop.remove();\n if (options.disableParentScroll) options.restoreScroll();\n\n delete options.restoreScroll;\n };\n }\n\n /**\n * @param {Element|HTMLElement|null=} previousNode\n * @param {Element|HTMLElement} node\n * @param {SelectMenuController|Function|object=} menuController SelectMenuController instance\n */\n function focusOptionNode(previousNode, node, menuController) {\n var listboxContentNode = opts.contentEl[0];\n\n if (node) {\n if (previousNode) {\n previousNode.classList.remove('md-focused');\n }\n\n node.classList.add('md-focused');\n if (menuController && menuController.setActiveDescendant) {\n menuController.setActiveDescendant(node.id);\n }\n\n // Scroll the node into view if needed.\n if (listboxContentNode.scrollHeight > listboxContentNode.clientHeight) {\n var scrollBottom = listboxContentNode.clientHeight + listboxContentNode.scrollTop;\n var nodeBottom = node.offsetTop + node.offsetHeight;\n if (nodeBottom > scrollBottom) {\n listboxContentNode.scrollTop = nodeBottom - listboxContentNode.clientHeight;\n } else if (node.offsetTop < listboxContentNode.scrollTop) {\n listboxContentNode.scrollTop = node.offsetTop;\n }\n }\n opts.focusedNode = node;\n if (menuController && menuController.refreshViewValue) {\n menuController.refreshViewValue();\n }\n }\n }\n\n /**\n * @param {Element|HTMLElement} nodeToFocus\n */\n function autoFocus(nodeToFocus) {\n var selectMenuController;\n if (nodeToFocus && !nodeToFocus.hasAttribute('disabled')) {\n selectMenuController = opts.selectEl.controller('mdSelectMenu');\n focusOptionNode(null, nodeToFocus, selectMenuController);\n }\n }\n\n /**\n * Check for valid opts and set some useful defaults\n */\n function sanitizeAndConfigure(scope, options) {\n var selectMenuElement = element.find('md-select-menu');\n\n if (!options.target) {\n throw new Error($mdUtil.supplant(ERROR_TARGET_EXPECTED, [options.target]));\n }\n\n angular.extend(options, {\n isRemoved: false,\n target: angular.element(options.target), // make sure it's not a naked DOM node\n parent: angular.element(options.parent),\n selectEl: selectMenuElement,\n contentEl: element.find('md-content'),\n optionNodes: selectMenuElement[0].getElementsByTagName('md-option')\n });\n }\n\n /**\n * Configure various resize listeners for screen changes\n */\n function activateResizing() {\n var debouncedOnResize = (function(scope, target, options) {\n\n return function() {\n if (options.isRemoved) return;\n\n var updates = calculateMenuPositions(scope, target, options);\n var container = updates.container;\n var dropDown = updates.dropDown;\n\n container.element.css(animator.toCss(container.styles));\n dropDown.element.css(animator.toCss(dropDown.styles));\n };\n\n })(scope, element, opts);\n\n var window = angular.element($window);\n window.on('resize', debouncedOnResize);\n window.on('orientationchange', debouncedOnResize);\n\n // Publish deactivation closure...\n return function deactivateResizing() {\n\n // Disable resizing handlers\n window.off('resize', debouncedOnResize);\n window.off('orientationchange', debouncedOnResize);\n };\n }\n\n /**\n * If asynchronously loading, watch and update internal '$$loadingAsyncDone' flag.\n */\n function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }\n\n function activateInteraction() {\n if (opts.isRemoved) {\n return;\n }\n\n var dropDown = opts.selectEl;\n var selectMenuController = dropDown.controller('mdSelectMenu') || {};\n\n element.addClass('md-clickable');\n\n // Close on backdrop click\n opts.backdrop && opts.backdrop.on('click', onBackdropClick);\n\n // Escape to close\n // Cycling of options, and closing on enter\n dropDown.on('keydown', onMenuKeyDown);\n dropDown.on('click', checkCloseMenu);\n\n return function cleanupInteraction() {\n opts.backdrop && opts.backdrop.off('click', onBackdropClick);\n dropDown.off('keydown', onMenuKeyDown);\n dropDown.off('click', checkCloseMenu);\n\n element.removeClass('md-clickable');\n opts.isRemoved = true;\n };\n\n // ************************************\n // Closure Functions\n // ************************************\n\n function onBackdropClick(e) {\n e.preventDefault();\n e.stopPropagation();\n opts.restoreFocus = false;\n $mdUtil.nextTick($mdSelect.hide, true);\n }\n\n function onMenuKeyDown(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n\n switch (ev.keyCode) {\n case keyCodes.UP_ARROW:\n return focusPrevOption();\n case keyCodes.DOWN_ARROW:\n return focusNextOption();\n case keyCodes.SPACE:\n case keyCodes.ENTER:\n if (opts.focusedNode) {\n dropDown.triggerHandler({\n type: 'click',\n target: opts.focusedNode\n });\n ev.preventDefault();\n }\n checkCloseMenu(ev);\n break;\n case keyCodes.TAB:\n case keyCodes.ESCAPE:\n ev.stopPropagation();\n ev.preventDefault();\n opts.restoreFocus = true;\n $mdUtil.nextTick($mdSelect.hide, true);\n break;\n default:\n if (shouldHandleKey(ev, $mdConstant)) {\n var optNode = selectMenuController.optNodeForKeyboardSearch(ev);\n if (optNode && !optNode.hasAttribute('disabled')) {\n focusOptionNode(opts.focusedNode, optNode, selectMenuController);\n }\n }\n }\n }\n\n /**\n * Change the focus to another option. If there is no focused option, focus the first\n * option. If there is a focused option, then use the direction to determine if we should\n * focus the previous or next option in the list.\n * @param {'next'|'prev'} direction\n */\n function focusOption(direction) {\n var optionsArray = $mdUtil.nodesToArray(opts.optionNodes);\n var index = optionsArray.indexOf(opts.focusedNode);\n var prevOption = optionsArray[index];\n var newOption;\n\n do {\n if (index === -1) {\n // We lost the previously focused element, reset to first option\n index = 0;\n } else if (direction === 'next' && index < optionsArray.length - 1) {\n index++;\n } else if (direction === 'prev' && index > 0) {\n index--;\n }\n newOption = optionsArray[index];\n if (newOption.hasAttribute('disabled')) {\n newOption = null;\n }\n } while (!newOption && index < optionsArray.length - 1 && index > 0);\n\n focusOptionNode(prevOption, newOption, selectMenuController);\n }\n\n function focusNextOption() {\n focusOption('next');\n }\n\n function focusPrevOption() {\n focusOption('prev');\n }\n\n /**\n * @param {KeyboardEvent|MouseEvent} event\n */\n function checkCloseMenu(event) {\n if (event && (event.type === 'click') && (event.currentTarget !== dropDown[0])) {\n return;\n }\n if (mouseOnScrollbar()) {\n return;\n }\n\n if (opts.focusedNode && opts.focusedNode.hasAttribute &&\n !opts.focusedNode.hasAttribute('disabled')) {\n event.preventDefault();\n event.stopPropagation();\n if (!selectMenuController.isMultiple) {\n opts.restoreFocus = true;\n\n $mdUtil.nextTick(function () {\n $mdSelect.hide(selectMenuController.ngModel.$viewValue);\n opts.focusedNode.classList.remove('md-focused');\n }, true);\n }\n }\n\n /**\n * check if the mouseup event was on a scrollbar\n */\n function mouseOnScrollbar() {\n var clickOnScrollbar = false;\n if (event && (event.currentTarget.children.length > 0)) {\n var child = event.currentTarget.children[0];\n var hasScrollbar = child.scrollHeight > child.clientHeight;\n if (hasScrollbar && child.children.length > 0) {\n var relPosX = event.pageX - event.currentTarget.getBoundingClientRect().left;\n if (relPosX > child.querySelector('md-option').offsetWidth)\n clickOnScrollbar = true;\n }\n }\n return clickOnScrollbar;\n }\n }\n }\n }\n\n /**\n * To notify listeners that the Select menu has closed,\n * trigger the [optional] user-defined expression\n */\n function announceClosed(opts) {\n var mdSelect = opts.selectCtrl;\n if (mdSelect) {\n var menuController = opts.selectEl.controller('mdSelectMenu');\n mdSelect.setSelectValueText(menuController ? menuController.getSelectedLabels() : '');\n mdSelect.triggerClose();\n }\n }\n\n\n /**\n * Calculate the menu positions after an event like options changing, screen resizing, or\n * animations finishing.\n * @param {Object} scope\n * @param element\n * @param opts\n * @return {{container: {styles: {top: number, left: number, 'font-size': *, 'min-width': number}, element: Object}, dropDown: {styles: {transform: string, transformOrigin: string}, element: Object}}}\n */\n function calculateMenuPositions(scope, element, opts) {\n var\n containerNode = element[0],\n targetNode = opts.target[0].children[0], // target the label\n parentNode = $document[0].body,\n selectNode = opts.selectEl[0],\n contentNode = opts.contentEl[0],\n parentRect = parentNode.getBoundingClientRect(),\n targetRect = targetNode.getBoundingClientRect(),\n shouldOpenAroundTarget = false,\n bounds = {\n left: parentRect.left + SELECT_EDGE_MARGIN,\n top: SELECT_EDGE_MARGIN,\n bottom: parentRect.height - SELECT_EDGE_MARGIN,\n right: parentRect.width - SELECT_EDGE_MARGIN - ($mdUtil.floatingScrollbars() ? 16 : 0)\n },\n spaceAvailable = {\n top: targetRect.top - bounds.top,\n left: targetRect.left - bounds.left,\n right: bounds.right - (targetRect.left + targetRect.width),\n bottom: bounds.bottom - (targetRect.top + targetRect.height)\n },\n maxWidth = parentRect.width - SELECT_EDGE_MARGIN * 2,\n selectedNode = selectNode.querySelector('md-option[selected]'),\n optionNodes = selectNode.getElementsByTagName('md-option'),\n optgroupNodes = selectNode.getElementsByTagName('md-optgroup'),\n isScrollable = calculateScrollable(element, contentNode),\n centeredNode;\n\n var loading = isPromiseLike(opts.loadingAsync);\n if (!loading) {\n // If a selected node, center around that\n if (selectedNode) {\n centeredNode = selectedNode;\n // If there are option groups, center around the first option group\n } else if (optgroupNodes.length) {\n centeredNode = optgroupNodes[0];\n // Otherwise - if we are not loading async - center around the first optionNode\n } else if (optionNodes.length) {\n centeredNode = optionNodes[0];\n // In case there are no options, center on whatever's in there... (eg progress indicator)\n } else {\n centeredNode = contentNode.firstElementChild || contentNode;\n }\n } else {\n // If loading, center on progress indicator\n centeredNode = contentNode.firstElementChild || contentNode;\n }\n\n if (contentNode.offsetWidth > maxWidth) {\n contentNode.style['max-width'] = maxWidth + 'px';\n } else {\n contentNode.style.maxWidth = null;\n }\n if (shouldOpenAroundTarget) {\n contentNode.style['min-width'] = targetRect.width + 'px';\n }\n\n // Remove padding before we compute the position of the menu\n if (isScrollable) {\n selectNode.classList.add('md-overflow');\n }\n\n var focusedNode = centeredNode;\n if ((focusedNode.tagName || '').toUpperCase() === 'MD-OPTGROUP') {\n focusedNode = optionNodes[0] || contentNode.firstElementChild || contentNode;\n centeredNode = focusedNode;\n }\n // Cache for autoFocus()\n opts.focusedNode = focusedNode;\n\n // Get the selectMenuRect *after* max-width is possibly set above\n containerNode.style.display = 'block';\n var selectMenuRect = selectNode.getBoundingClientRect();\n var centeredRect = getOffsetRect(centeredNode);\n\n if (centeredNode) {\n var centeredStyle = $window.getComputedStyle(centeredNode);\n centeredRect.paddingLeft = parseInt(centeredStyle.paddingLeft, 10) || 0;\n centeredRect.paddingRight = parseInt(centeredStyle.paddingRight, 10) || 0;\n }\n\n if (isScrollable) {\n var scrollBuffer = contentNode.offsetHeight / 2;\n contentNode.scrollTop = centeredRect.top + centeredRect.height / 2 - scrollBuffer;\n\n if (spaceAvailable.top < scrollBuffer) {\n contentNode.scrollTop = Math.min(\n centeredRect.top,\n contentNode.scrollTop + scrollBuffer - spaceAvailable.top\n );\n } else if (spaceAvailable.bottom < scrollBuffer) {\n contentNode.scrollTop = Math.max(\n centeredRect.top + centeredRect.height - selectMenuRect.height,\n contentNode.scrollTop - scrollBuffer + spaceAvailable.bottom\n );\n }\n }\n\n var left, top, transformOrigin, minWidth, fontSize;\n if (shouldOpenAroundTarget) {\n left = targetRect.left;\n top = targetRect.top + targetRect.height;\n transformOrigin = '50% 0';\n if (top + selectMenuRect.height > bounds.bottom) {\n top = targetRect.top - selectMenuRect.height;\n transformOrigin = '50% 100%';\n }\n } else {\n left = (targetRect.left + centeredRect.left - centeredRect.paddingLeft);\n top = Math.floor(targetRect.top + targetRect.height / 2 - centeredRect.height / 2 -\n centeredRect.top + contentNode.scrollTop) + 2;\n\n transformOrigin = (centeredRect.left + targetRect.width / 2) + 'px ' +\n (centeredRect.top + centeredRect.height / 2 - contentNode.scrollTop) + 'px 0px';\n\n minWidth = Math.min(targetRect.width + centeredRect.paddingLeft + centeredRect.paddingRight, maxWidth);\n\n fontSize = window.getComputedStyle(targetNode)['font-size'];\n }\n\n // Keep left and top within the window\n var containerRect = containerNode.getBoundingClientRect();\n var scaleX = Math.round(100 * Math.min(targetRect.width / selectMenuRect.width, 1.0)) / 100;\n var scaleY = Math.round(100 * Math.min(targetRect.height / selectMenuRect.height, 1.0)) / 100;\n\n return {\n container: {\n element: angular.element(containerNode),\n styles: {\n left: Math.floor(clamp(bounds.left, left, bounds.right - minWidth)),\n top: Math.floor(clamp(bounds.top, top, bounds.bottom - containerRect.height)),\n 'min-width': minWidth,\n 'font-size': fontSize\n }\n },\n dropDown: {\n element: angular.element(selectNode),\n styles: {\n transformOrigin: transformOrigin,\n transform: !opts.alreadyOpen ? $mdUtil.supplant('scale({0},{1})', [scaleX, scaleY]) : \"\"\n }\n }\n };\n }\n }\n\n function isPromiseLike(obj) {\n return obj && angular.isFunction(obj.then);\n }\n\n function clamp(min, n, max) {\n return Math.max(min, Math.min(n, max));\n }\n\n function getOffsetRect(node) {\n return node ? {\n left: node.offsetLeft,\n top: node.offsetTop,\n width: node.offsetWidth,\n height: node.offsetHeight\n } : {left: 0, top: 0, width: 0, height: 0};\n }\n\n function calculateScrollable(element, contentNode) {\n var isScrollable = false;\n\n try {\n var oldDisplay = element[0].style.display;\n\n // Set the element's display to block so that this calculation is correct\n element[0].style.display = 'block';\n\n isScrollable = contentNode.scrollHeight > contentNode.offsetHeight;\n\n // Reset it back afterwards\n element[0].style.display = oldDisplay;\n } finally {\n // Nothing to do\n }\n return isScrollable;\n }\n}\n\nfunction shouldHandleKey(ev, $mdConstant) {\n var char = String.fromCharCode(ev.keyCode);\n var isNonUsefulKey = (ev.keyCode <= 31);\n\n return (char && char.length && !isNonUsefulKey &&\n !$mdConstant.isMetaKey(ev) && !$mdConstant.isFnLockKey(ev) && !$mdConstant.hasModifierKey(ev));\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.showHide\n */\n\n// Add additional handlers to ng-show and ng-hide that notify directives\n// contained within that they should recompute their size.\n// These run in addition to AngularJS's built-in ng-hide and ng-show directives.\nangular.module('material.components.showHide', [\n 'material.core'\n])\n .directive('ngShow', createDirective('ngShow', true))\n .directive('ngHide', createDirective('ngHide', false));\n\n\nfunction createDirective(name, targetValue) {\n return ['$mdUtil', '$window', function($mdUtil, $window) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function($scope, $element, $attr) {\n var unregister = $scope.$on('$md-resize-enable', function() {\n unregister();\n\n var node = $element[0];\n var cachedTransitionStyles = node.nodeType === $window.Node.ELEMENT_NODE ?\n $window.getComputedStyle(node) : {};\n\n $scope.$watch($attr[name], function(value) {\n if (!!value === targetValue) {\n $mdUtil.nextTick(function() {\n $scope.$broadcast('$md-resize');\n });\n\n var opts = {\n cachedTransitionStyles: cachedTransitionStyles\n };\n\n $mdUtil.dom.animator.waitTransitionEnd($element, opts).then(function() {\n $scope.$broadcast('$md-resize');\n });\n }\n });\n });\n }\n };\n }];\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.sidenav\n *\n * @description\n * A Sidenav component.\n */\nSidenavService.$inject = [\"$mdComponentRegistry\", \"$mdUtil\", \"$q\", \"$log\"];\nSidenavDirective.$inject = [\"$mdMedia\", \"$mdUtil\", \"$mdConstant\", \"$mdTheming\", \"$mdInteraction\", \"$animate\", \"$compile\", \"$parse\", \"$log\", \"$q\", \"$document\", \"$window\", \"$$rAF\"];\nSidenavController.$inject = [\"$scope\", \"$attrs\", \"$mdComponentRegistry\", \"$q\", \"$interpolate\"];\nangular\n .module('material.components.sidenav', [\n 'material.core',\n 'material.components.backdrop'\n ])\n .factory('$mdSidenav', SidenavService)\n .directive('mdSidenav', SidenavDirective)\n .controller('$mdSidenavController', SidenavController);\n\n\n/**\n * @ngdoc service\n * @name $mdSidenav\n * @module material.components.sidenav\n *\n * @description\n * `$mdSidenav` makes it easy to interact with multiple sidenavs in an app. When looking up a\n * sidenav instance, you can either look it up synchronously or wait for it to be initialized\n * asynchronously. This is done by passing the second argument to `$mdSidenav`.\n *\n * @usage\n * <hljs lang=\"js\">\n * // Async lookup for sidenav instance; will resolve when the instance is available\n * $mdSidenav(componentId, true).then(function(instance) {\n * $log.debug( componentId + \"is now ready\" );\n * });\n * // Sync lookup for sidenav instance; this will resolve immediately.\n * $mdSidenav(componentId).then(function(instance) {\n * $log.debug( componentId + \"is now ready\" );\n * });\n * // Async toggle the given sidenav;\n * // when instance is known ready and lazy lookup is not needed.\n * $mdSidenav(componentId)\n * .toggle()\n * .then(function(){\n * $log.debug('toggled');\n * });\n * // Async open the given sidenav\n * $mdSidenav(componentId)\n * .open()\n * .then(function(){\n * $log.debug('opened');\n * });\n * // Async close the given sidenav\n * $mdSidenav(componentId)\n * .close()\n * .then(function(){\n * $log.debug('closed');\n * });\n * // Async lookup for sidenav instance\n * $mdSidenav(componentId, true).then(function(instance) {\n * // On close callback to handle close, backdrop click, or escape key pressed.\n * // Callback happens BEFORE the close action occurs.\n * instance.onClose(function() {\n * $log.debug('closing');\n * });\n * });\n * // Sync check to see if the specified sidenav is set to be open\n * $mdSidenav(componentId).isOpen();\n * // Sync check to whether given sidenav is locked open\n * // If this is true, the sidenav will be open regardless of close()\n * $mdSidenav(componentId).isLockedOpen();\n * </hljs>\n */\nfunction SidenavService($mdComponentRegistry, $mdUtil, $q, $log) {\n var errorMsg = \"SideNav '{0}' is not available! Did you use md-component-id='{0}'?\";\n var service = {\n find: findInstance, // sync - returns proxy API\n waitFor: waitForInstance // async - returns promise\n };\n\n /**\n * Service API that supports three (3) usages:\n * $mdSidenav().find(\"left\") // sync (must already exist) or returns undefined\n * $mdSidenav(\"left\").toggle(); // sync (must already exist) or returns reject promise;\n * $mdSidenav(\"left\",true).then(function(left) { // async returns instance when available\n * left.toggle();\n * });\n */\n return function(handle, enableWait) {\n if (angular.isUndefined(handle)) {\n return service;\n }\n\n var shouldWait = enableWait === true;\n var instance = service.find(handle, shouldWait);\n return !instance && shouldWait ? service.waitFor(handle) :\n !instance && angular.isUndefined(enableWait) ? addLegacyAPI(service, handle) : instance;\n };\n\n /**\n * For failed instance/handle lookups, older-clients expect an response object with noops\n * that include `rejected promise APIs`\n * @param service\n * @param handle\n * @returns {Object}\n */\n function addLegacyAPI(service, handle) {\n var falseFn = function() {\n return false;\n };\n var rejectFn = function() {\n return $q.when($mdUtil.supplant(errorMsg, [handle || \"\"]));\n };\n\n return angular.extend({\n isLockedOpen: falseFn,\n isOpen: falseFn,\n toggle: rejectFn,\n open: rejectFn,\n close: rejectFn,\n onClose: angular.noop,\n then: function(callback) {\n return waitForInstance(handle).then(callback || angular.noop);\n }\n }, service);\n }\n\n /**\n * Synchronously lookup the controller instance for the specified sidNav instance which has been\n * registered with the markup `md-component-id`\n */\n function findInstance(handle, shouldWait) {\n var instance = $mdComponentRegistry.get(handle);\n\n if (!instance && !shouldWait) {\n // Report missing instance\n $log.error($mdUtil.supplant(errorMsg, [handle || \"\"]));\n\n // The component has not registered itself... most like NOT yet created\n // return null to indicate that the Sidenav is not in the DOM\n return undefined;\n }\n return instance;\n }\n\n /**\n * Asynchronously wait for the component instantiation,\n * Deferred lookup of component instance using $component registry\n */\n function waitForInstance(handle) {\n return $mdComponentRegistry.when(handle).catch($log.error);\n }\n}\n\n/**\n * @ngdoc directive\n * @name mdSidenav\n * @module material.components.sidenav\n * @restrict E\n *\n * @description\n * A Sidenav component that can be opened and closed programmatically.\n *\n * By default, upon opening it will slide out on top of the main content area.\n *\n * For keyboard and screen reader accessibility, focus is sent to the sidenav wrapper by default.\n * It can be overridden with the `md-autofocus` directive on the child element you want focused.\n *\n * @usage\n * <hljs lang=\"html\">\n * <div layout=\"row\" ng-controller=\"MyController\">\n * <md-sidenav md-component-id=\"left\" class=\"md-sidenav-left\">\n * Left Nav!\n * </md-sidenav>\n *\n * <md-content>\n * Center Content\n * <md-button ng-click=\"openLeftMenu()\">\n * Open Left Menu\n * </md-button>\n * </md-content>\n *\n * <md-sidenav md-component-id=\"right\"\n * md-is-locked-open=\"$mdMedia('min-width: 333px')\"\n * class=\"md-sidenav-right\">\n * <form>\n * <md-input-container>\n * <label for=\"testInput\">Test input</label>\n * <input id=\"testInput\" type=\"text\"\n * ng-model=\"data\" md-autofocus>\n * </md-input-container>\n * </form>\n * </md-sidenav>\n * </div>\n * </hljs>\n *\n * <hljs lang=\"js\">\n * var app = angular.module('myApp', ['ngMaterial']);\n * app.controller('MyController', function($scope, $mdSidenav) {\n * $scope.openLeftMenu = function() {\n * $mdSidenav('left').toggle();\n * };\n * });\n * </hljs>\n *\n * @param {expression=} md-is-open A model bound to whether the sidenav is opened.\n * @param {boolean=} md-disable-backdrop When present in the markup, the sidenav will not show a\n * backdrop.\n * @param {boolean=} md-disable-close-events When present in the markup, clicking the backdrop or\n * pressing the 'Escape' key will not close the sidenav.\n * @param {string=} md-component-id componentId to use with $mdSidenav service.\n * @param {expression=} md-is-locked-open When this expression evaluates to true,\n * the sidenav \"locks open\": it falls into the content's flow instead of appearing over it. This\n * overrides the `md-is-open` attribute.\n *\n * The `$mdMedia()` service is exposed to the `md-is-locked-open` attribute, which\n * can be given a media query or one of the `sm`, `gt-sm`, `md`, `gt-md`, `lg` or `gt-lg` presets.\n * <br><br>Examples:\n *\n * Lock open when `true`:<br>\n * `<md-sidenav md-is-locked-open=\"shouldLockOpen\"></md-sidenav>`\n *\n * Lock open when the width is `1000px` or greater:<br>\n * `<md-sidenav md-is-locked-open=\"$mdMedia('min-width: 1000px')\"></md-sidenav>`\n *\n * Lock open on small screens:<br>\n * `<md-sidenav md-is-locked-open=\"$mdMedia('sm')\"></md-sidenav>`\n *\n * @param {string=} md-disable-scroll-target Selector, pointing to an element, whose scrolling will\n * be disabled when the sidenav is opened. By default this is the sidenav's direct parent.\n */\nfunction SidenavDirective($mdMedia, $mdUtil, $mdConstant, $mdTheming, $mdInteraction, $animate,\n $compile, $parse, $log, $q, $document, $window, $$rAF) {\n return {\n restrict: 'E',\n scope: {\n isOpen: '=?mdIsOpen'\n },\n controller: '$mdSidenavController',\n compile: function(element) {\n element.addClass('md-closed').attr('tabIndex', '-1');\n return postLink;\n }\n };\n\n /**\n * Directive Post Link function...\n */\n function postLink(scope, element, attr, sidenavCtrl) {\n var lastParentOverFlow;\n var backdrop;\n var disableScrollTarget = null;\n var disableCloseEvents;\n var triggeringInteractionType;\n var triggeringElement = null;\n var previousContainerStyles;\n var promise = $q.when(true);\n var isLockedOpenParsed = $parse(attr.mdIsLockedOpen);\n var ngWindow = angular.element($window);\n var isLocked = function() {\n return isLockedOpenParsed(scope.$parent, {\n $mdMedia: $mdMedia\n });\n };\n\n if (attr.mdDisableScrollTarget) {\n disableScrollTarget = $document[0].querySelector(attr.mdDisableScrollTarget);\n\n if (disableScrollTarget) {\n disableScrollTarget = angular.element(disableScrollTarget);\n } else {\n $log.warn($mdUtil.supplant('mdSidenav: couldn\\'t find element matching ' +\n 'selector \"{selector}\". Falling back to parent.',\n { selector: attr.mdDisableScrollTarget }));\n }\n }\n\n if (!disableScrollTarget) {\n disableScrollTarget = element.parent();\n }\n\n // Only create the backdrop if the backdrop isn't disabled.\n if (!attr.hasOwnProperty('mdDisableBackdrop')) {\n backdrop = $mdUtil.createBackdrop(scope, \"md-sidenav-backdrop md-opaque ng-enter\");\n }\n\n // If md-disable-close-events is set on the sidenav we will disable\n // backdrop click and Escape key events\n if (attr.hasOwnProperty('mdDisableCloseEvents')) {\n disableCloseEvents = true;\n }\n\n element.addClass('_md'); // private md component indicator for styling\n $mdTheming(element);\n\n // The backdrop should inherit the sidenavs theme,\n // because the backdrop will take its parent theme by default.\n if (backdrop) $mdTheming.inherit(backdrop, element);\n\n element.on('$destroy', function() {\n backdrop && backdrop.remove();\n sidenavCtrl.destroy();\n });\n\n scope.$on('$destroy', function(){\n backdrop && backdrop.remove();\n });\n\n scope.$watch(isLocked, updateIsLocked);\n scope.$watch('isOpen', updateIsOpen);\n\n\n // Publish special accessor for the Controller instance\n sidenavCtrl.$toggleOpen = toggleOpen;\n\n /**\n * Toggle the DOM classes to indicate `locked`\n * @param isLocked\n * @param oldValue\n */\n function updateIsLocked(isLocked, oldValue) {\n scope.isLockedOpen = isLocked;\n if (isLocked === oldValue) {\n element.toggleClass('md-locked-open', !!isLocked);\n } else {\n $animate[isLocked ? 'addClass' : 'removeClass'](element, 'md-locked-open');\n }\n if (backdrop) {\n backdrop.toggleClass('md-locked-open', !!isLocked);\n }\n }\n\n /**\n * Toggle the SideNav view and attach/detach listeners\n * @param {boolean} isOpen\n */\n function updateIsOpen(isOpen) {\n var focusEl = $mdUtil.findFocusTarget(element) || element;\n var parent = element.parent();\n var restorePositioning;\n\n // If the user hasn't set the disable close events property we are adding\n // click and escape events to close the sidenav\n if (!disableCloseEvents) {\n parent[isOpen ? 'on' : 'off']('keydown', onKeyDown);\n if (backdrop) backdrop[isOpen ? 'on' : 'off']('click', close);\n }\n\n restorePositioning = updateContainerPositions(parent, isOpen);\n\n if (isOpen) {\n // Capture upon opening..\n triggeringElement = $document[0].activeElement;\n triggeringInteractionType = $mdInteraction.getLastInteractionType();\n }\n\n disableParentScroll(isOpen);\n\n return promise = $q.all([\n isOpen && backdrop ? $animate.enter(backdrop, parent) : backdrop ?\n $animate.leave(backdrop) : $q.when(true),\n $animate[isOpen ? 'removeClass' : 'addClass'](element, 'md-closed')\n ]).then(function() {\n // Perform focus when animations are ALL done...\n if (scope.isOpen) {\n $$rAF(function() {\n // Notifies child components that the sidenav was opened. Should wait\n // a frame in order to allow for the element height to be computed.\n ngWindow.triggerHandler('resize');\n });\n\n focusEl && focusEl.focus();\n }\n\n // Restores the positioning on the sidenav and backdrop.\n restorePositioning && restorePositioning();\n });\n }\n\n function updateContainerPositions(parent, willOpen) {\n var drawerEl = element[0];\n var scrollTop = parent[0].scrollTop;\n\n if (willOpen && scrollTop) {\n previousContainerStyles = {\n top: drawerEl.style.top,\n bottom: drawerEl.style.bottom,\n height: drawerEl.style.height\n };\n\n // When the parent is scrolled down, then we want to be able to show the sidenav at the\n // current scroll position. We're moving the sidenav down to the correct scroll position\n // and apply the height of the parent, to increase the performance. Using 100% as height,\n // will impact the performance heavily.\n var positionStyle = {\n top: scrollTop + 'px',\n bottom: 'auto',\n height: parent[0].clientHeight + 'px'\n };\n\n // Apply the new position styles to the sidenav and backdrop.\n element.css(positionStyle);\n backdrop.css(positionStyle);\n }\n\n // When the sidenav is closing and we have previous defined container styles,\n // then we return a restore function, which resets the sidenav and backdrop.\n if (!willOpen && previousContainerStyles) {\n return function() {\n drawerEl.style.top = previousContainerStyles.top;\n drawerEl.style.bottom = previousContainerStyles.bottom;\n drawerEl.style.height = previousContainerStyles.height;\n\n backdrop[0].style.top = null;\n backdrop[0].style.bottom = null;\n backdrop[0].style.height = null;\n\n previousContainerStyles = null;\n };\n }\n }\n\n /**\n * Prevent parent scrolling (when the SideNav is open)\n */\n function disableParentScroll(disabled) {\n if (disabled && !lastParentOverFlow) {\n lastParentOverFlow = disableScrollTarget.css('overflow');\n disableScrollTarget.css('overflow', 'hidden');\n } else if (angular.isDefined(lastParentOverFlow)) {\n disableScrollTarget.css('overflow', lastParentOverFlow);\n lastParentOverFlow = undefined;\n }\n }\n\n /**\n * Toggle the sideNav view and publish a promise to be resolved when\n * the view animation finishes.\n * @param {boolean} isOpen true to open the sidenav, false to close it\n * @returns {*} promise to be resolved when the view animation finishes\n */\n function toggleOpen(isOpen) {\n if (scope.isOpen === isOpen) {\n return $q.when(true);\n } else {\n if (scope.isOpen && sidenavCtrl.onCloseCb) sidenavCtrl.onCloseCb();\n\n return $q(function(resolve) {\n // Toggle value to force an async `updateIsOpen()` to run\n scope.isOpen = isOpen;\n\n $mdUtil.nextTick(function() {\n // When the current `updateIsOpen()` animation finishes\n promise.then(function(result) {\n\n if (!scope.isOpen && triggeringElement && triggeringInteractionType === 'keyboard') {\n // reset focus to originating element (if available) upon close\n triggeringElement.focus();\n triggeringElement = null;\n }\n\n resolve(result);\n });\n });\n });\n }\n }\n\n /**\n * Auto-close sideNav when the `escape` key is pressed.\n * @param {KeyboardEvent} ev keydown event\n */\n function onKeyDown(ev) {\n var isEscape = (ev.keyCode === $mdConstant.KEY_CODE.ESCAPE);\n return isEscape ? close(ev) : $q.when(true);\n }\n\n /**\n * With backdrop `clicks` or `escape` key-press, immediately apply the CSS close transition...\n * Then notify the controller to close() and perform its own actions.\n * @param {Event} ev\n * @returns {*}\n */\n function close(ev) {\n ev.preventDefault();\n\n return sidenavCtrl.close();\n }\n }\n}\n\n/*\n * @private\n * @ngdoc controller\n * @name SidenavController\n * @module material.components.sidenav\n */\nfunction SidenavController($scope, $attrs, $mdComponentRegistry, $q, $interpolate) {\n var self = this;\n\n // Use Default internal method until overridden by directive postLink\n\n // Synchronous getters\n self.isOpen = function() { return !!$scope.isOpen; };\n self.isLockedOpen = function() { return !!$scope.isLockedOpen; };\n\n // Synchronous setters\n self.onClose = function (callback) {\n self.onCloseCb = callback;\n return self;\n };\n\n // Async actions\n self.open = function() { return self.$toggleOpen(true); };\n self.close = function() { return self.$toggleOpen(false); };\n self.toggle = function() { return self.$toggleOpen(!$scope.isOpen); };\n self.$toggleOpen = function(value) { return $q.when($scope.isOpen = value); };\n\n // Evaluate the component id.\n var rawId = $attrs.mdComponentId;\n var hasDataBinding = rawId && rawId.indexOf($interpolate.startSymbol()) > -1;\n var componentId = hasDataBinding ? $interpolate(rawId)($scope.$parent) : rawId;\n\n // Register the component.\n self.destroy = $mdComponentRegistry.register(self, componentId);\n\n // Watch and update the component, if the id has changed.\n if (hasDataBinding) {\n $attrs.$observe('mdComponentId', function(id) {\n if (id && id !== self.$$mdHandle) {\n // `destroy` only deregisters the old component id so we can add the new one.\n self.destroy();\n self.destroy = $mdComponentRegistry.register(self, id);\n }\n });\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.slider\n */\nSliderDirective.$inject = [\"$$rAF\", \"$window\", \"$mdAria\", \"$mdUtil\", \"$mdConstant\", \"$mdTheming\", \"$mdGesture\", \"$parse\", \"$log\", \"$timeout\"];\nangular.module('material.components.slider', [\n 'material.core'\n])\n.directive('mdSlider', SliderDirective)\n.directive('mdSliderContainer', SliderContainerDirective);\n\n/**\n * @type {number} the page size used for stepping when page up/down keys are pressed.\n */\nvar stepPageSize = 10;\n/**\n * @type {number} the multiplier applied to a step when the arrow key is pressed along with\n * alt, meta, or ctrl.\n */\nvar modifierMultiplier = 4;\n\n/**\n * @ngdoc directive\n * @name mdSliderContainer\n * @module material.components.slider\n * @restrict E\n * @description\n * The `<md-slider-container>` can hold the slider with two other elements.\n * In this case, the other elements are a `span` for the label and an `input` for displaying\n * the model value.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-slider-container>\n * <span>Red</span>\n * <md-slider min=\"0\" max=\"255\" ng-model=\"color.red\" aria-label=\"red\" id=\"red-slider\">\n * </md-slider>\n * <md-input-container>\n * <input type=\"number\" ng-model=\"color.red\" aria-label=\"Red\" aria-controls=\"red-slider\">\n * </md-input-container>\n * </md-slider-container>\n * </hljs>\n */\nfunction SliderContainerDirective() {\n return {\n controller: function () {},\n compile: function (elem) {\n var slider = elem.find('md-slider');\n\n if (!slider) {\n return;\n }\n\n var vertical = slider.attr('md-vertical');\n\n if (vertical !== undefined) {\n elem.attr('md-vertical', '');\n }\n\n if (!slider.attr('flex')) {\n slider.attr('flex', '');\n }\n\n return function postLink(scope, element, attr, ctrl) {\n element.addClass('_md'); // private md component indicator for styling\n\n // We have to manually stop the $watch on ngDisabled because it exists\n // on the parent scope, and won't be automatically destroyed when\n // the component is destroyed.\n function setDisable(value) {\n element.children().attr('disabled', value);\n element.find('input').attr('disabled', value);\n }\n\n var stopDisabledWatch = angular.noop;\n\n if (attr.disabled) {\n setDisable(true);\n }\n else if (attr.ngDisabled) {\n stopDisabledWatch = scope.$watch(attr.ngDisabled, function (value) {\n setDisable(value);\n });\n }\n\n scope.$on('$destroy', function () {\n stopDisabledWatch();\n });\n\n var initialMaxWidth;\n\n /**\n * @param {number} length of the input's string value\n */\n ctrl.fitInputWidthToTextLength = function (length) {\n var input = element[0].querySelector('md-input-container');\n\n if (input) {\n var computedStyle = getComputedStyle(input);\n var minWidth = parseInt(computedStyle.minWidth);\n var padding = parseInt(computedStyle.paddingLeft) + parseInt(computedStyle.paddingRight);\n\n initialMaxWidth = initialMaxWidth || parseInt(computedStyle.maxWidth);\n var newMaxWidth = Math.max(initialMaxWidth, minWidth + padding + (minWidth / 2 * length));\n\n input.style.maxWidth = newMaxWidth + 'px';\n }\n };\n };\n }\n };\n}\n\n/**\n * @ngdoc directive\n * @name mdSlider\n * @module material.components.slider\n * @restrict E\n * @description\n * The `<md-slider>` component allows the user to choose from a range of values.\n *\n * As per the [Material Design spec](https://material.io/archive/guidelines/style/color.html#color-color-system)\n * the slider is in the accent color by default. The primary color palette may be used with\n * the `md-primary` class.\n *\n * The slider has two modes:\n * - \"normal\" mode where the user slides between a wide range of values\n * - \"discrete\" mode where the user slides between only a few select values\n *\n * To enable discrete mode, add the `md-discrete` attribute to a slider\n * and use the `step` attribute to change the distance between\n * values the user is allowed to pick.\n *\n * When using the keyboard:\n * - pressing the arrow keys will increase or decrease the slider's value by one step\n * - holding the Meta, Control, or Alt key while pressing the arrow keys will\n * move the slider four steps at a time\n * - pressing the Home key will move the slider to the first allowed value\n * - pressing the End key will move the slider to the last allowed value\n * - pressing the Page Up key will increase the slider value by ten\n * - pressing the Page Down key will decrease the slider value by ten\n *\n * @usage\n * <h4>Normal Mode</h4>\n * <hljs lang=\"html\">\n * <md-slider ng-model=\"myValue\" min=\"5\" max=\"500\">\n * </md-slider>\n * </hljs>\n * <h4>Discrete Mode</h4>\n * <hljs lang=\"html\">\n * <md-slider md-discrete ng-model=\"myDiscreteValue\" step=\"10\" min=\"10\" max=\"130\">\n * </md-slider>\n * </hljs>\n * <h4>Invert Mode</h4>\n * <hljs lang=\"html\">\n * <md-slider md-invert ng-model=\"myValue\" step=\"10\" min=\"10\" max=\"130\">\n * </md-slider>\n * </hljs>\n *\n * @param {expression} ng-model Assignable angular expression to be data-bound.\n * The expression should evaluate to a `number`.\n * @param {expression=} ng-disabled If this expression evaluates as truthy, the slider will be\n * disabled.\n * @param {expression=} ng-readonly If this expression evaluates as truthy, the slider will be in\n * read only mode.\n * @param {boolean=} md-discrete If this attribute exists during initialization, enable discrete\n * mode. Defaults to `false`.\n * @param {boolean=} md-vertical If this attribute exists during initialization, enable vertical\n * orientation mode. Defaults to `false`.\n * @param {boolean=} md-invert If this attribute exists during initialization, enable inverted mode.\n * Defaults to `false`.\n * @param {number=} step The distance between values the user is allowed to pick. Defaults to `1`.\n * @param {number=} min The minimum value the user is allowed to pick. Defaults to `0`.\n * @param {number=} max The maximum value the user is allowed to pick. Defaults to `100`.\n * @param {number=} round The amount of numbers after the decimal point. The maximum is 6 to\n * prevent scientific notation. Defaults to `3`.\n */\nfunction SliderDirective($$rAF, $window, $mdAria, $mdUtil, $mdConstant, $mdTheming, $mdGesture,\n $parse, $log, $timeout) {\n return {\n scope: {},\n require: ['?ngModel', '?^mdSliderContainer'],\n template:\n '<div class=\"md-slider-wrapper\">' +\n '<div class=\"md-slider-content\">' +\n '<div class=\"md-track-container\">' +\n '<div class=\"md-track\"></div>' +\n '<div class=\"md-track md-track-fill\"></div>' +\n '<div class=\"md-track-ticks\"></div>' +\n '</div>' +\n '<div class=\"md-thumb-container\">' +\n '<div class=\"md-thumb\"></div>' +\n '<div class=\"md-focus-thumb\"></div>' +\n '<div class=\"md-focus-ring\"></div>' +\n '<div class=\"md-sign\">' +\n '<span class=\"md-thumb-text\"></span>' +\n '</div>' +\n '<div class=\"md-disabled-thumb\"></div>' +\n '</div>' +\n '</div>' +\n '</div>',\n compile: compile\n };\n\n // **********************************************************\n // Private Methods\n // **********************************************************\n\n function compile (tElement, tAttrs) {\n var wrapper = angular.element(tElement[0].getElementsByClassName('md-slider-wrapper'));\n\n var tabIndex = tAttrs.tabindex || 0;\n wrapper.attr('tabindex', tabIndex);\n\n if (tAttrs.disabled || tAttrs.ngDisabled) wrapper.attr('tabindex', -1);\n\n wrapper.attr('role', 'slider');\n\n $mdAria.expect(tElement, 'aria-label');\n\n return postLink;\n }\n\n function postLink(scope, element, attr, ctrls) {\n $mdTheming(element);\n var ngModelCtrl = ctrls[0] || {\n // Mock ngModelController if it doesn't exist to give us\n // the minimum functionality needed\n $setViewValue: function(val) {\n this.$viewValue = val;\n this.$viewChangeListeners.forEach(function(cb) { cb(); });\n },\n $parsers: [],\n $formatters: [],\n $viewChangeListeners: []\n };\n\n var containerCtrl = ctrls[1];\n var container = angular.element($mdUtil.getClosest(element, '_md-slider-container', true));\n var isDisabled = attr.ngDisabled ? angular.bind(null, $parse(attr.ngDisabled), scope.$parent) : function () {\n return element[0].hasAttribute('disabled');\n };\n\n var thumb = angular.element(element[0].querySelector('.md-thumb'));\n var thumbText = angular.element(element[0].querySelector('.md-thumb-text'));\n var thumbContainer = thumb.parent();\n var trackContainer = angular.element(element[0].querySelector('.md-track-container'));\n var activeTrack = angular.element(element[0].querySelector('.md-track-fill'));\n var tickContainer = angular.element(element[0].querySelector('.md-track-ticks'));\n var wrapper = angular.element(element[0].getElementsByClassName('md-slider-wrapper'));\n var content = angular.element(element[0].getElementsByClassName('md-slider-content'));\n var throttledRefreshDimensions = $mdUtil.throttle(refreshSliderDimensions, 5000);\n\n // Default values, overridable by attrs\n var DEFAULT_ROUND = 3;\n var vertical = angular.isDefined(attr.mdVertical);\n var discrete = angular.isDefined(attr.mdDiscrete);\n var invert = angular.isDefined(attr.mdInvert);\n angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(0);\n angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(100);\n angular.isDefined(attr.step)? attr.$observe('step', updateStep) : updateStep(1);\n angular.isDefined(attr.round)? attr.$observe('round', updateRound) : updateRound(DEFAULT_ROUND);\n\n // We have to manually stop the $watch on ngDisabled because it exists\n // on the parent scope, and won't be automatically destroyed when\n // the component is destroyed.\n var stopDisabledWatch = angular.noop;\n if (attr.ngDisabled) {\n stopDisabledWatch = scope.$parent.$watch(attr.ngDisabled, updateAriaDisabled);\n }\n\n $mdGesture.register(wrapper, 'drag', { horizontal: !vertical });\n\n scope.mouseActive = false;\n\n wrapper\n .on('keydown', keydownListener)\n .on('mousedown', mouseDownListener)\n .on('focus', focusListener)\n .on('blur', blurListener)\n .on('$md.pressdown', onPressDown)\n .on('$md.pressup', onPressUp)\n .on('$md.dragstart', onDragStart)\n .on('$md.drag', onDrag)\n .on('$md.dragend', onDragEnd);\n\n // On resize, recalculate the slider's dimensions and re-render\n function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }\n setTimeout(updateAll, 0);\n\n var debouncedUpdateAll = $$rAF.throttle(updateAll);\n angular.element($window).on('resize', debouncedUpdateAll);\n\n scope.$on('$destroy', function() {\n angular.element($window).off('resize', debouncedUpdateAll);\n });\n\n ngModelCtrl.$render = ngModelRender;\n ngModelCtrl.$viewChangeListeners.push(ngModelRender);\n ngModelCtrl.$formatters.push(minMaxValidator);\n ngModelCtrl.$formatters.push(stepValidator);\n\n /**\n * Attributes\n */\n var min;\n var max;\n var step;\n var round;\n function updateMin(value) {\n min = parseFloat(value);\n ngModelCtrl.$viewValue = minMaxValidator(ngModelCtrl.$modelValue, min, max);\n wrapper.attr('aria-valuemin', value);\n updateAll();\n }\n function updateMax(value) {\n max = parseFloat(value);\n ngModelCtrl.$viewValue = minMaxValidator(ngModelCtrl.$modelValue, min, max);\n wrapper.attr('aria-valuemax', value);\n updateAll();\n }\n function updateStep(value) {\n step = parseFloat(value);\n }\n function updateRound(value) {\n // Set max round digits to 6, after 6 the input uses scientific notation\n round = minMaxValidator(parseInt(value), 0, 6);\n }\n function updateAriaDisabled() {\n element.attr('aria-disabled', !!isDisabled());\n }\n\n // Draw the ticks with canvas.\n // The alternative to drawing ticks with canvas is to draw one element for each tick,\n // which could quickly become a performance bottleneck.\n var tickCanvas, tickCtx;\n function redrawTicks() {\n if (!discrete || isDisabled()) return;\n if (angular.isUndefined(step)) return;\n\n if (step <= 0) {\n var msg = 'Slider step value must be greater than zero when in discrete mode';\n $log.error(msg);\n throw new Error(msg);\n }\n\n var numSteps = Math.floor((max - min) / step);\n if (!tickCanvas) {\n tickCanvas = angular.element('<canvas>').css('position', 'absolute');\n tickContainer.append(tickCanvas);\n\n tickCtx = tickCanvas[0].getContext('2d');\n }\n\n var dimensions = getSliderDimensions();\n\n // If `dimensions` doesn't have height and width it might be the first attempt so we will refresh dimensions\n if (dimensions && !dimensions.height && !dimensions.width) {\n refreshSliderDimensions();\n dimensions = sliderDimensions;\n }\n\n tickCanvas[0].width = dimensions.width;\n tickCanvas[0].height = dimensions.height;\n\n var distance;\n for (var i = 0; i <= numSteps; i++) {\n var trackTicksStyle = $window.getComputedStyle(tickContainer[0]);\n tickCtx.fillStyle = trackTicksStyle.color || 'black';\n\n distance = Math.floor((vertical ? dimensions.height : dimensions.width) * (i / numSteps));\n\n tickCtx.fillRect(vertical ? 0 : distance - 1,\n vertical ? distance - 1 : 0,\n vertical ? dimensions.width : 2,\n vertical ? 2 : dimensions.height);\n }\n }\n\n function clearTicks() {\n if (tickCanvas && tickCtx) {\n var dimensions = getSliderDimensions();\n tickCtx.clearRect(0, 0, dimensions.width, dimensions.height);\n }\n }\n\n /**\n * Refreshing Dimensions\n */\n var sliderDimensions = {};\n refreshSliderDimensions();\n function refreshSliderDimensions() {\n sliderDimensions = trackContainer[0].getBoundingClientRect();\n }\n function getSliderDimensions() {\n throttledRefreshDimensions();\n return sliderDimensions;\n }\n\n /**\n * left/right/up/down arrow listener\n * @param {!KeyboardEvent} ev\n */\n function keydownListener(ev) {\n if (isDisabled()) return;\n var keyCodes = $mdConstant.KEY_CODE;\n\n var changeAmount;\n switch (ev.keyCode) {\n case keyCodes.DOWN_ARROW:\n case keyCodes.LEFT_ARROW:\n ev.preventDefault();\n changeAmount = -step;\n break;\n case keyCodes.UP_ARROW:\n case keyCodes.RIGHT_ARROW:\n ev.preventDefault();\n changeAmount = step;\n break;\n case keyCodes.PAGE_DOWN:\n ev.preventDefault();\n changeAmount = -step * stepPageSize;\n break;\n case keyCodes.PAGE_UP:\n ev.preventDefault();\n changeAmount = step * stepPageSize;\n break;\n case keyCodes.HOME:\n ev.preventDefault();\n ev.stopPropagation();\n updateValue(min);\n break;\n case keyCodes.END:\n ev.preventDefault();\n ev.stopPropagation();\n updateValue(max);\n break;\n }\n if (changeAmount) {\n changeAmount = invert ? -changeAmount : changeAmount;\n if (ev.metaKey || ev.ctrlKey || ev.altKey) {\n changeAmount *= modifierMultiplier;\n }\n ev.preventDefault();\n ev.stopPropagation();\n updateValue(ngModelCtrl.$viewValue + changeAmount);\n }\n }\n\n /**\n * @param value new slider value used for setting the model value\n */\n function updateValue(value) {\n scope.$evalAsync(function() {\n setModelValue(value);\n });\n }\n\n function mouseDownListener() {\n redrawTicks();\n\n scope.mouseActive = true;\n wrapper.removeClass('md-focused');\n\n $timeout(function() {\n scope.mouseActive = false;\n }, 100);\n }\n\n function focusListener() {\n if (scope.mouseActive === false) {\n wrapper.addClass('md-focused');\n }\n }\n\n function blurListener() {\n wrapper.removeClass('md-focused');\n element.removeClass('md-active');\n clearTicks();\n }\n\n /**\n * ngModel setters and validators\n */\n function setModelValue(value) {\n ngModelCtrl.$setViewValue(minMaxValidator(stepValidator(value)));\n }\n function ngModelRender() {\n if (isNaN(ngModelCtrl.$viewValue)) {\n ngModelCtrl.$viewValue = ngModelCtrl.$modelValue;\n }\n\n ngModelCtrl.$viewValue = minMaxValidator(ngModelCtrl.$viewValue);\n\n var percent = valueToPercent(ngModelCtrl.$viewValue);\n scope.modelValue = ngModelCtrl.$viewValue;\n wrapper.attr('aria-valuenow', ngModelCtrl.$viewValue);\n setSliderPercent(percent);\n thumbText.text(ngModelCtrl.$viewValue);\n }\n\n function minMaxValidator(value, minValue, maxValue) {\n if (angular.isNumber(value)) {\n minValue = angular.isNumber(minValue) ? minValue : min;\n maxValue = angular.isNumber(maxValue) ? maxValue : max;\n\n return Math.max(minValue, Math.min(maxValue, value));\n }\n }\n\n function stepValidator(value) {\n if (angular.isNumber(value)) {\n var formattedValue = (Math.round((value - min) / step) * step + min);\n formattedValue = (Math.round(formattedValue * Math.pow(10, round)) / Math.pow(10, round));\n\n if (containerCtrl && containerCtrl.fitInputWidthToTextLength) {\n $mdUtil.debounce(function () {\n containerCtrl.fitInputWidthToTextLength(formattedValue.toString().length);\n }, 100)();\n }\n\n return formattedValue;\n }\n }\n\n /**\n * @param {number} percent 0-1\n */\n function setSliderPercent(percent) {\n\n percent = clamp(percent);\n\n var thumbPosition = (percent * 100) + '%';\n var activeTrackPercent = invert ? (1 - percent) * 100 + '%' : thumbPosition;\n\n if (vertical) {\n thumbContainer.css('bottom', thumbPosition);\n }\n else {\n $mdUtil.bidiProperty(thumbContainer, 'left', 'right', thumbPosition);\n }\n\n\n activeTrack.css(vertical ? 'height' : 'width', activeTrackPercent);\n\n element.toggleClass((invert ? 'md-max' : 'md-min'), percent === 0);\n element.toggleClass((invert ? 'md-min' : 'md-max'), percent === 1);\n }\n\n /**\n * Slide listeners\n */\n var isDragging = false;\n\n function onPressDown(ev) {\n if (isDisabled()) return;\n\n element.addClass('md-active');\n element[0].focus();\n refreshSliderDimensions();\n\n var exactVal = percentToValue(positionToPercent(vertical ? ev.srcEvent.clientY : ev.srcEvent.clientX));\n var closestVal = minMaxValidator(stepValidator(exactVal));\n scope.$apply(function() {\n setModelValue(closestVal);\n setSliderPercent(valueToPercent(closestVal));\n });\n }\n function onPressUp(ev) {\n if (isDisabled()) return;\n\n element.removeClass('md-dragging');\n\n var exactVal = percentToValue(positionToPercent(vertical ? ev.srcEvent.clientY : ev.srcEvent.clientX));\n var closestVal = minMaxValidator(stepValidator(exactVal));\n scope.$apply(function() {\n setModelValue(closestVal);\n ngModelRender();\n });\n }\n function onDragStart(ev) {\n if (isDisabled()) return;\n isDragging = true;\n\n ev.stopPropagation();\n\n element.addClass('md-dragging');\n setSliderFromEvent(ev);\n }\n function onDrag(ev) {\n if (!isDragging) return;\n ev.stopPropagation();\n setSliderFromEvent(ev);\n }\n function onDragEnd(ev) {\n if (!isDragging) return;\n ev.stopPropagation();\n isDragging = false;\n }\n\n function setSliderFromEvent(ev) {\n // While panning discrete, update only the\n // visual positioning but not the model value.\n if (discrete) adjustThumbPosition(vertical ? ev.srcEvent.clientY : ev.srcEvent.clientX);\n else doSlide(vertical ? ev.srcEvent.clientY : ev.srcEvent.clientX);\n }\n\n /**\n * Slide the UI by changing the model value\n * @param x\n */\n function doSlide(x) {\n scope.$evalAsync(function() {\n setModelValue(percentToValue(positionToPercent(x)));\n });\n }\n\n /**\n * Slide the UI without changing the model (while dragging/panning)\n * @param x\n */\n function adjustThumbPosition(x) {\n var exactVal = percentToValue(positionToPercent(x));\n var closestVal = minMaxValidator(stepValidator(exactVal));\n setSliderPercent(positionToPercent(x));\n thumbText.text(closestVal);\n }\n\n /**\n * Clamps the value to be between 0 and 1.\n * @param {number} value The value to clamp.\n * @returns {number}\n */\n function clamp(value) {\n return Math.max(0, Math.min(value || 0, 1));\n }\n\n /**\n * Convert position on slider to percentage value of offset from beginning...\n * @param position\n * @returns {number}\n */\n function positionToPercent(position) {\n var offset = vertical ? sliderDimensions.top : sliderDimensions.left;\n var size = vertical ? sliderDimensions.height : sliderDimensions.width;\n var calc = (position - offset) / size;\n\n if (!vertical && $mdUtil.isRtl(attr)) {\n calc = 1 - calc;\n }\n\n return Math.max(0, Math.min(1, vertical ? 1 - calc : calc));\n }\n\n /**\n * Convert percentage offset on slide to equivalent model value\n * @param percent\n * @returns {*}\n */\n function percentToValue(percent) {\n var adjustedPercent = invert ? (1 - percent) : percent;\n return (min + adjustedPercent * (max - min));\n }\n\n function valueToPercent(val) {\n var percent = (val - min) / (max - min);\n return invert ? (1 - percent) : percent;\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.sticky\n * @description\n * Sticky effects for md.\n */\nMdSticky.$inject = [\"$mdConstant\", \"$$rAF\", \"$mdUtil\", \"$compile\"];\nangular\n .module('material.components.sticky', [\n 'material.core',\n 'material.components.content'\n ])\n .factory('$mdSticky', MdSticky);\n\n/**\n * @ngdoc service\n * @name $mdSticky\n * @module material.components.sticky\n *\n * @description\n * The `$mdSticky` service provides the capability to make elements sticky, even when the browser\n * does not support `position: sticky`.\n *\n * Whenever the current browser supports stickiness natively, the `$mdSticky` service will leverage\n * the native browser's sticky functionality.\n *\n * By default the `$mdSticky` service compiles the cloned element, when not specified through the\n * `stickyClone` parameter, in the same scope as the actual element lives.\n *\n * @usage\n * <hljs lang=\"js\">\n * angular.module('myModule')\n * .directive('stickyText', function($mdSticky) {\n * return {\n * restrict: 'E',\n * template: '<span>Sticky Text</span>',\n * link: function(scope, element) {\n * $mdSticky(scope, element);\n * }\n * };\n * });\n * </hljs>\n *\n * <h3>Notes</h3>\n * When using an element which contains a compiled directive that changes the DOM structure\n * during compilation, you should compile the clone yourself.\n *\n * An example of this usage can be found below:\n * <hljs lang=\"js\">\n * angular.module('myModule')\n * .directive('stickySelect', function($mdSticky, $compile) {\n * var SELECT_TEMPLATE =\n * '<md-select ng-model=\"selected\">' +\n * ' <md-option>Option 1</md-option>' +\n * '</md-select>';\n *\n * return {\n * restrict: 'E',\n * replace: true,\n * template: SELECT_TEMPLATE,\n * link: function(scope, element) {\n * $mdSticky(scope, element, $compile(SELECT_TEMPLATE)(scope));\n * }\n * };\n * });\n * </hljs>\n *\n * @returns {function(IScope, JQLite, ITemplateLinkingFunction=): void} `$mdSticky` returns a\n * function that takes three arguments:\n * - `scope`: the scope to use when compiling the clone and listening for the `$destroy` event,\n * which triggers removal of the clone\n * - `element`: the element that will be 'sticky'\n * - `stickyClone`: An optional clone of the element (returned from AngularJS'\n * [$compile service](https://docs.angularjs.org/api/ng/service/$compile#usage)),\n * that will be shown when the user starts scrolling past the original element. If not\n * provided, the result of `element.clone()` will be used and compiled in the given scope.\n */\nfunction MdSticky($mdConstant, $$rAF, $mdUtil, $compile) {\n\n var browserStickySupport = $mdUtil.checkStickySupport();\n\n /**\n * Registers an element as sticky, used internally by directives to register themselves.\n */\n return function registerStickyElement(scope, element, stickyClone) {\n var contentCtrl = element.controller('mdContent');\n if (!contentCtrl) return;\n\n if (browserStickySupport) {\n element.css({\n position: browserStickySupport,\n top: 0,\n 'z-index': 2\n });\n } else {\n var $$sticky = contentCtrl.$element.data('$$sticky');\n if (!$$sticky) {\n $$sticky = setupSticky(contentCtrl);\n contentCtrl.$element.data('$$sticky', $$sticky);\n }\n\n // Compile our cloned element, when cloned in this service, into the given scope.\n var cloneElement = stickyClone || $compile(element.clone())(scope);\n\n var deregister = $$sticky.add(element, cloneElement);\n scope.$on('$destroy', deregister);\n }\n };\n\n function setupSticky(contentCtrl) {\n var contentEl = contentCtrl.$element;\n\n // Refresh elements is very expensive, so we use the debounced\n // version when possible.\n var debouncedRefreshElements = $$rAF.throttle(refreshElements);\n\n // setupAugmentedScrollEvents gives us `$scrollstart` and `$scroll`,\n // more reliable than `scroll` on android.\n setupAugmentedScrollEvents(contentEl);\n contentEl.on('$scrollstart', debouncedRefreshElements);\n contentEl.on('$scroll', onScroll);\n\n var self;\n return self = {\n prev: null,\n current: null, // the currently stickied item\n next: null,\n items: [],\n add: add,\n refreshElements: refreshElements\n };\n\n /***************\n * Public\n ***************/\n // Add an element and its sticky clone to this content's sticky collection\n function add(element, stickyClone) {\n stickyClone.addClass('md-sticky-clone');\n\n var item = {\n element: element,\n clone: stickyClone\n };\n self.items.push(item);\n\n $mdUtil.nextTick(function() {\n contentEl.prepend(item.clone);\n });\n\n debouncedRefreshElements();\n\n return function remove() {\n self.items.forEach(function(item, index) {\n if (item.element[0] === element[0]) {\n self.items.splice(index, 1);\n item.clone.remove();\n }\n });\n debouncedRefreshElements();\n };\n }\n\n function refreshElements() {\n // Sort our collection of elements by their current position in the DOM.\n // We need to do this because our elements' order of being added may not\n // be the same as their order of display.\n self.items.forEach(refreshPosition);\n self.items = self.items.sort(function(a, b) {\n return a.top < b.top ? -1 : 1;\n });\n\n // Find which item in the list should be active,\n // based upon the content's current scroll position\n var item;\n var currentScrollTop = contentEl.prop('scrollTop');\n for (var i = self.items.length - 1; i >= 0; i--) {\n if (currentScrollTop > self.items[i].top) {\n item = self.items[i];\n break;\n }\n }\n setCurrentItem(item);\n }\n\n /***************\n * Private\n ***************/\n\n // Find the `top` of an item relative to the content element,\n // and also the height.\n function refreshPosition(item) {\n // Find the top of an item by adding to the offsetHeight until we reach the\n // content element.\n var current = item.element[0];\n item.top = 0;\n item.left = 0;\n item.right = 0;\n while (current && current !== contentEl[0]) {\n item.top += current.offsetTop;\n item.left += current.offsetLeft;\n if (current.offsetParent) {\n // Compute offsetRight\n item.right += current.offsetParent.offsetWidth - current.offsetWidth - current.offsetLeft;\n }\n current = current.offsetParent;\n }\n item.height = item.element.prop('offsetHeight');\n\n var defaultVal = $mdUtil.floatingScrollbars() ? '0' : undefined;\n $mdUtil.bidi(item.clone, 'margin-left', item.left, defaultVal);\n $mdUtil.bidi(item.clone, 'margin-right', defaultVal, item.right);\n }\n\n // As we scroll, push in and select the correct sticky element.\n function onScroll() {\n var scrollTop = contentEl.prop('scrollTop');\n var isScrollingDown = scrollTop > (onScroll.prevScrollTop || 0);\n\n // Store the previous scroll so we know which direction we are scrolling\n onScroll.prevScrollTop = scrollTop;\n\n //\n // AT TOP (not scrolling)\n //\n if (scrollTop === 0) {\n // If we're at the top, just clear the current item and return\n setCurrentItem(null);\n return;\n }\n\n //\n // SCROLLING DOWN (going towards the next item)\n //\n if (isScrollingDown) {\n\n // If we've scrolled down past the next item's position, sticky it and return\n if (self.next && self.next.top <= scrollTop) {\n setCurrentItem(self.next);\n return;\n }\n\n // If the next item is close to the current one, push the current one up out of the way\n if (self.current && self.next && self.next.top - scrollTop <= self.next.height) {\n translate(self.current, scrollTop + (self.next.top - self.next.height - scrollTop));\n return;\n }\n }\n\n //\n // SCROLLING UP (not at the top & not scrolling down; must be scrolling up)\n //\n if (!isScrollingDown) {\n\n // If we've scrolled up past the previous item's position, sticky it and return\n if (self.current && self.prev && scrollTop < self.current.top) {\n setCurrentItem(self.prev);\n return;\n }\n\n // If the next item is close to the current one, pull the current one down into view\n if (self.next && self.current && (scrollTop >= (self.next.top - self.current.height))) {\n translate(self.current, scrollTop + (self.next.top - scrollTop - self.current.height));\n return;\n }\n }\n\n //\n // Otherwise, just move the current item to the proper place (scrolling up or down)\n //\n if (self.current) {\n translate(self.current, scrollTop);\n }\n }\n\n function setCurrentItem(item) {\n if (self.current === item) return;\n // Deactivate currently active item\n if (self.current) {\n translate(self.current, null);\n setStickyState(self.current, null);\n }\n\n // Activate new item if given\n if (item) {\n setStickyState(item, 'active');\n }\n\n self.current = item;\n var index = self.items.indexOf(item);\n // If index === -1, index + 1 = 0. It works out.\n self.next = self.items[index + 1];\n self.prev = self.items[index - 1];\n setStickyState(self.next, 'next');\n setStickyState(self.prev, 'prev');\n }\n\n function setStickyState(item, state) {\n if (!item || item.state === state) return;\n if (item.state) {\n item.clone.attr('sticky-prev-state', item.state);\n item.element.attr('sticky-prev-state', item.state);\n }\n item.clone.attr('sticky-state', state);\n item.element.attr('sticky-state', state);\n item.state = state;\n }\n\n function translate(item, amount) {\n if (!item) return;\n if (amount === null || amount === undefined) {\n if (item.translateY) {\n item.translateY = null;\n item.clone.css($mdConstant.CSS.TRANSFORM, '');\n }\n } else {\n item.translateY = amount;\n\n $mdUtil.bidi(item.clone, $mdConstant.CSS.TRANSFORM,\n 'translate3d(' + item.left + 'px,' + amount + 'px,0)',\n 'translateY(' + amount + 'px)'\n );\n }\n }\n }\n\n\n // Android 4.4 don't accurately give scroll events.\n // To fix this problem, we setup a fake scroll event. We say:\n // > If a scroll or touchmove event has happened in the last DELAY milliseconds,\n // then send a `$scroll` event every animationFrame.\n // Additionally, we add $scrollstart and $scrollend events.\n function setupAugmentedScrollEvents(element) {\n var SCROLL_END_DELAY = 200;\n var isScrolling;\n var lastScrollTime;\n element.on('scroll touchmove', function() {\n if (!isScrolling) {\n isScrolling = true;\n $$rAF.throttle(loopScrollEvent);\n element.triggerHandler('$scrollstart');\n }\n element.triggerHandler('$scroll');\n lastScrollTime = +$mdUtil.now();\n });\n\n function loopScrollEvent() {\n if (+$mdUtil.now() - lastScrollTime > SCROLL_END_DELAY) {\n isScrolling = false;\n element.triggerHandler('$scrollend');\n } else {\n element.triggerHandler('$scroll');\n $$rAF.throttle(loopScrollEvent);\n }\n }\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.subheader\n * @description\n * SubHeader module\n *\n * Subheaders are special list tiles that delineate distinct sections of a\n * list or grid list and are typically related to the current filtering or\n * sorting criteria. Subheader tiles are either displayed inline with tiles or\n * can be associated with content, for example, in an adjacent column.\n *\n * Upon scrolling, subheaders remain pinned to the top of the screen and remain\n * pinned until pushed on or off screen by the next subheader. @see [Material\n * Design Specifications](https://material.io/archive/guidelines/components/subheaders.html)\n *\n * > To improve the visual grouping of content, use the system color for your subheaders.\n *\n */\nMdSubheaderDirective.$inject = [\"$mdSticky\", \"$compile\", \"$mdTheming\", \"$mdUtil\", \"$mdAria\"];\nangular\n .module('material.components.subheader', [\n 'material.core',\n 'material.components.sticky'\n ])\n .directive('mdSubheader', MdSubheaderDirective);\n\n/**\n * @ngdoc directive\n * @name mdSubheader\n * @module material.components.subheader\n *\n * @restrict E\n *\n * @description\n * The `md-subheader` directive creates a sticky subheader for a section.\n *\n * Developers are able to disable the stickiness of the subheader by using the following markup\n *\n * <hljs lang=\"html\">\n * <md-subheader class=\"md-no-sticky\">Not Sticky</md-subheader>\n * </hljs>\n *\n * ### Notes\n * - The `md-subheader` directive uses the <a ng-href=\"api/service/$mdSticky\">$mdSticky</a> service\n * to make the subheader sticky.\n *\n * > Whenever the current browser doesn't support stickiness natively, the subheader\n * will be compiled twice to create a sticky clone of the subheader.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-subheader>Online Friends</md-subheader>\n * </hljs>\n */\n\nfunction MdSubheaderDirective($mdSticky, $compile, $mdTheming, $mdUtil, $mdAria) {\n return {\n restrict: 'E',\n replace: true,\n transclude: true,\n template: (\n '<div class=\"md-subheader _md\">' +\n ' <div class=\"md-subheader-inner\">' +\n ' <div class=\"md-subheader-content\"></div>' +\n ' </div>' +\n '</div>'\n ),\n link: function postLink(scope, element, attr, controllers, transclude) {\n $mdTheming(element);\n element.addClass('_md');\n\n // Remove the ngRepeat attribute from the root element, because we don't want to compile\n // the ngRepeat for the sticky clone again.\n $mdUtil.prefixer().removeAttribute(element, 'ng-repeat');\n\n var outerHTML = element[0].outerHTML;\n\n function getContent(el) {\n return angular.element(el[0].querySelector('.md-subheader-content'));\n }\n\n // Set the ARIA attributes on the original element since it keeps it's original place in\n // the DOM, whereas the clones are in reverse order. Should be done after the outerHTML,\n // in order to avoid having multiple element be marked as headers.\n attr.$set('role', 'heading');\n $mdAria.expect(element, 'aria-level', '2');\n\n // Transclude the user-given contents of the subheader\n // the conventional way.\n transclude(scope, function(clone) {\n getContent(element).append(clone);\n });\n\n // Create another clone, that uses the outer and inner contents\n // of the element, that will be 'stickied' as the user scrolls.\n if (!element.hasClass('md-no-sticky')) {\n transclude(scope, function(clone) {\n // If the user adds an ng-if or ng-repeat directly to the md-subheader element, the\n // compiled clone below will only be a comment tag (since they replace their elements with\n // a comment) which cannot be properly passed to the $mdSticky; so we wrap it in our own\n // DIV to ensure we have something $mdSticky can use\n var wrapper = $compile('<div class=\"md-subheader-wrapper\" aria-hidden=\"true\">' + outerHTML + '</div>')(scope);\n\n // Delay initialization until after any `ng-if`/`ng-repeat`/etc has finished before\n // attempting to create the clone\n $mdUtil.nextTick(function() {\n // Append our transcluded clone into the wrapper.\n // We don't have to recompile the element again, because the clone is already\n // compiled in it's transclusion scope. If we recompile the outerHTML of the new clone, we would lose\n // our ngIf's and other previous registered bindings / properties.\n getContent(wrapper).append(clone);\n });\n\n // Make the element sticky and provide the stickyClone our self, to avoid recompilation of the subheader\n // element.\n $mdSticky(scope, element, wrapper);\n });\n }\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.swipe\n * @description Swipe module!\n */\n/**\n * @ngdoc directive\n * @module material.components.swipe\n * @name mdSwipeLeft\n *\n * @restrict A\n *\n * @description\n * The md-swipe-left directive allows you to specify custom behavior when an element is swiped\n * left.\n *\n * ### Notes\n * - The `$event.currentTarget` of the swiped element will be `null`, but you can get a\n * reference to the element that actually holds the `md-swipe-left` directive by using\n * `$target.current`\n *\n * > You can see this in action on the <a ng-href=\"demo/swipe\">demo page</a> (Look at the Developer\n * Tools console while swiping).\n *\n * @usage\n * <hljs lang=\"html\">\n * <div md-swipe-left=\"onSwipeLeft($event, $target)\">Swipe me left!</div>\n * </hljs>\n */\n/**\n * @ngdoc directive\n * @module material.components.swipe\n * @name mdSwipeRight\n *\n * @restrict A\n *\n * @description\n * The md-swipe-right directive allows you to specify custom behavior when an element is swiped\n * right.\n *\n * ### Notes\n * - The `$event.currentTarget` of the swiped element will be `null`, but you can get a\n * reference to the element that actually holds the `md-swipe-right` directive by using\n * `$target.current`\n *\n * > You can see this in action on the <a ng-href=\"demo/swipe\">demo page</a> (Look at the Developer\n * Tools console while swiping).\n *\n * @usage\n * <hljs lang=\"html\">\n * <div md-swipe-right=\"onSwipeRight($event, $target)\">Swipe me right!</div>\n * </hljs>\n */\n/**\n * @ngdoc directive\n * @module material.components.swipe\n * @name mdSwipeUp\n *\n * @restrict A\n *\n * @description\n * The md-swipe-up directive allows you to specify custom behavior when an element is swiped\n * up.\n *\n * ### Notes\n * - The `$event.currentTarget` of the swiped element will be `null`, but you can get a\n * reference to the element that actually holds the `md-swipe-up` directive by using\n * `$target.current`\n *\n * > You can see this in action on the <a ng-href=\"demo/swipe\">demo page</a> (Look at the Developer\n * Tools console while swiping).\n *\n * @usage\n * <hljs lang=\"html\">\n * <div md-swipe-up=\"onSwipeUp($event, $target)\">Swipe me up!</div>\n * </hljs>\n */\n/**\n * @ngdoc directive\n * @module material.components.swipe\n * @name mdSwipeDown\n *\n * @restrict A\n *\n * @description\n * The md-swipe-down directive allows you to specify custom behavior when an element is swiped\n * down.\n *\n * ### Notes\n * - The `$event.currentTarget` of the swiped element will be `null`, but you can get a\n * reference to the element that actually holds the `md-swipe-down` directive by using\n * `$target.current`\n *\n * > You can see this in action on the <a ng-href=\"demo/swipe\">demo page</a> (Look at the Developer\n * Tools console while swiping).\n *\n * @usage\n * <hljs lang=\"html\">\n * <div md-swipe-down=\"onSwipeDown($event, $target)\">Swipe me down!</div>\n * </hljs>\n */\n\nangular.module('material.components.swipe', ['material.core'])\n .directive('mdSwipeLeft', getDirective('SwipeLeft'))\n .directive('mdSwipeRight', getDirective('SwipeRight'))\n .directive('mdSwipeUp', getDirective('SwipeUp'))\n .directive('mdSwipeDown', getDirective('SwipeDown'));\n\nfunction getDirective(name) {\n DirectiveFactory.$inject = [\"$parse\"];\n var directiveName = 'md' + name;\n var eventName = '$md.' + name.toLowerCase();\n\n return DirectiveFactory;\n\n /* @ngInject */\n function DirectiveFactory($parse) {\n return { restrict: 'A', link: postLink };\n function postLink(scope, element, attr) {\n var fn = $parse(attr[directiveName]);\n element.on(eventName, function(ev) {\n var currentTarget = ev.currentTarget;\n scope.$applyAsync(function() { fn(scope, { $event: ev, $target: { current: currentTarget } }); });\n });\n }\n }\n}\n\n\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.switch\n */\n\nMdSwitch.$inject = [\"mdCheckboxDirective\", \"$mdUtil\", \"$mdConstant\", \"$parse\", \"$$rAF\", \"$mdGesture\", \"$timeout\"];\nangular.module('material.components.switch', [\n 'material.core',\n 'material.components.checkbox'\n])\n .directive('mdSwitch', MdSwitch);\n\n/**\n * @ngdoc directive\n * @module material.components.switch\n * @name mdSwitch\n * @restrict E\n *\n * The switch directive is used very much like the normal [angular checkbox](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D).\n *\n * As per the [Material Design spec](https://material.io/archive/guidelines/style/color.html#color-color-system)\n * the switch is in the accent color by default. The primary color palette may be used with\n * the `md-primary` class.\n *\n * @param {expression} ng-model Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ng-true-value The value to which the expression should be set when selected.\n * @param {expression=} ng-false-value The value to which the expression should be set when not selected.\n * @param {expression=} ng-change Expression to be executed when the model value changes.\n * @param {expression=} ng-disabled En/Disable based on the expression.\n * @param {boolean=} md-no-ink Use of attribute indicates use of ripple ink effects.\n * @param {string=} aria-label Publish the button label used by screen-readers for accessibility. Defaults to the switch's text.\n * @param {boolean=} md-invert When set to true, the switch will be inverted.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-switch ng-model=\"isActive\" aria-label=\"Finished?\">\n * Finished ?\n * </md-switch>\n *\n * <md-switch md-no-ink ng-model=\"hasInk\" aria-label=\"No Ink Effects\">\n * No Ink Effects\n * </md-switch>\n *\n * <md-switch ng-disabled=\"true\" ng-model=\"isDisabled\" aria-label=\"Disabled\">\n * Disabled\n * </md-switch>\n *\n * </hljs>\n */\nfunction MdSwitch(mdCheckboxDirective, $mdUtil, $mdConstant, $parse, $$rAF, $mdGesture, $timeout) {\n var checkboxDirective = mdCheckboxDirective[0];\n\n return {\n restrict: 'E',\n priority: $mdConstant.BEFORE_NG_ARIA,\n transclude: true,\n template:\n '<div class=\"md-container\">' +\n '<div class=\"md-bar\"></div>' +\n '<div class=\"md-thumb-container\">' +\n '<div class=\"md-thumb\" md-ink-ripple md-ink-ripple-checkbox></div>' +\n '</div>'+\n '</div>' +\n '<div ng-transclude class=\"md-label\"></div>',\n require: ['^?mdInputContainer', '?ngModel', '?^form'],\n compile: mdSwitchCompile\n };\n\n function mdSwitchCompile(element, attr) {\n var checkboxLink = checkboxDirective.compile(element, attr).post;\n // No transition on initial load.\n element.addClass('md-dragging');\n\n return function (scope, element, attr, ctrls) {\n var containerCtrl = ctrls[0];\n var ngModel = ctrls[1] || $mdUtil.fakeNgModel();\n var formCtrl = ctrls[2];\n\n var disabledGetter = null;\n if (attr.disabled != null) {\n disabledGetter = function() { return true; };\n } else if (attr.ngDisabled) {\n disabledGetter = $parse(attr.ngDisabled);\n }\n\n var thumbContainer = angular.element(element[0].querySelector('.md-thumb-container'));\n var switchContainer = angular.element(element[0].querySelector('.md-container'));\n var labelContainer = angular.element(element[0].querySelector('.md-label'));\n\n // no transition on initial load\n $$rAF(function() {\n element.removeClass('md-dragging');\n });\n\n checkboxLink(scope, element, attr, ctrls);\n\n if (disabledGetter) {\n scope.$watch(disabledGetter, function(isDisabled) {\n element.attr('tabindex', isDisabled ? -1 : 0);\n });\n }\n\n attr.$observe('mdInvert', function(newValue) {\n var isInverted = $mdUtil.parseAttributeBoolean(newValue);\n\n isInverted ? element.prepend(labelContainer) : element.prepend(switchContainer);\n\n // Toggle a CSS class to update the margin.\n element.toggleClass('md-inverted', isInverted);\n });\n\n // These events are triggered by setup drag\n $mdGesture.register(switchContainer, 'drag');\n switchContainer\n .on('$md.dragstart', onDragStart)\n .on('$md.drag', onDrag)\n .on('$md.dragend', onDragEnd);\n\n var drag;\n function onDragStart(ev) {\n // Don't go if the switch is disabled.\n if (disabledGetter && disabledGetter(scope)) return;\n ev.stopPropagation();\n\n element.addClass('md-dragging');\n drag = {width: thumbContainer.prop('offsetWidth')};\n }\n\n function onDrag(ev) {\n if (!drag) return;\n ev.stopPropagation();\n ev.srcEvent && ev.srcEvent.preventDefault();\n\n var percent = ev.pointer.distanceX / drag.width;\n\n // if checked, start from right. else, start from left\n var translate = ngModel.$viewValue ? 1 + percent : percent;\n // Make sure the switch stays inside its bounds, 0-1%\n translate = Math.max(0, Math.min(1, translate));\n\n thumbContainer.css($mdConstant.CSS.TRANSFORM, 'translate3d(' + (100*translate) + '%,0,0)');\n drag.translate = translate;\n }\n\n function onDragEnd(ev) {\n if (!drag) return;\n ev.stopPropagation();\n\n element.removeClass('md-dragging');\n thumbContainer.css($mdConstant.CSS.TRANSFORM, '');\n\n // We changed if there is no distance (this is a click a click),\n // or if the drag distance is >50% of the total.\n var isChanged = ngModel.$viewValue ? drag.translate < 0.5 : drag.translate > 0.5;\n if (isChanged) {\n applyModelValue(!ngModel.$viewValue);\n }\n drag = null;\n\n // Wait for incoming mouse click\n scope.skipToggle = true;\n $timeout(function() {\n scope.skipToggle = false;\n }, 1);\n }\n\n function applyModelValue(newValue) {\n scope.$apply(function() {\n ngModel.$setViewValue(newValue);\n ngModel.$render();\n });\n }\n\n };\n }\n\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.tabs\n * @description\n *\n * Tabs, created with the `<md-tabs>` directive provide *tabbed* navigation with different styles.\n * The Tabs component consists of clickable tabs that are aligned horizontally side-by-side.\n *\n * Features include support for:\n *\n * - static or dynamic tabs,\n * - responsive designs,\n * - accessibility support (ARIA),\n * - tab pagination,\n * - external or internal tab content,\n * - focus indicators and arrow-key navigations,\n * - programmatic lookup and access to tab controllers, and\n * - dynamic transitions through different tab contents.\n *\n */\n/*\n * @see js folder for tabs implementation\n */\nangular.module('material.components.tabs', [\n 'material.core',\n 'material.components.icon'\n]);\n\n})();\n(function(){\n\"use strict\";\n\nangular\n.module('material.components.tabs')\n.service('MdTabsPaginationService', MdTabsPaginationService);\n\n/**\n * @private\n * @module material.components.tabs\n * @name MdTabsPaginationService\n * @description Provides many standalone functions to ease in pagination calculations.\n *\n * Most functions accept the elements and the current offset.\n *\n * The `elements` parameter is typically the value returned from the `getElements()` function of the\n * tabsController.\n *\n * The `offset` parameter is always positive regardless of LTR or RTL (we simply make the LTR one\n * negative when we apply our transform). This is typically the `ctrl.leftOffset` variable in the\n * tabsController.\n *\n * @returns MdTabsPaginationService\n * @constructor\n */\nfunction MdTabsPaginationService() {\n return {\n decreasePageOffset: decreasePageOffset,\n increasePageOffset: increasePageOffset,\n getTabOffsets: getTabOffsets,\n getTotalTabsWidth: getTotalTabsWidth\n };\n\n /**\n * Returns the offset for the next decreasing page.\n *\n * @param elements\n * @param currentOffset\n * @returns {number}\n */\n function decreasePageOffset(elements, currentOffset) {\n var canvas = elements.canvas,\n tabOffsets = getTabOffsets(elements),\n i, firstVisibleTabOffset;\n\n // Find the first fully visible tab in offset range\n for (i = 0; i < tabOffsets.length; i++) {\n if (tabOffsets[i] >= currentOffset) {\n firstVisibleTabOffset = tabOffsets[i];\n break;\n }\n }\n\n // Return (the first visible tab offset - the tabs container width) without going negative\n return Math.max(0, firstVisibleTabOffset - canvas.clientWidth);\n }\n\n /**\n * Returns the offset for the next increasing page.\n *\n * @param elements\n * @param currentOffset\n * @returns {number}\n */\n function increasePageOffset(elements, currentOffset) {\n var canvas = elements.canvas,\n maxOffset = getTotalTabsWidth(elements) - canvas.clientWidth,\n tabOffsets = getTabOffsets(elements),\n i, firstHiddenTabOffset;\n\n // Find the first partially (or fully) invisible tab\n for (i = 0; i < tabOffsets.length, tabOffsets[i] <= currentOffset + canvas.clientWidth; i++) {\n firstHiddenTabOffset = tabOffsets[i];\n }\n\n // Return the offset of the first hidden tab, or the maximum offset (whichever is smaller)\n return Math.min(maxOffset, firstHiddenTabOffset);\n }\n\n /**\n * Returns the offsets of all of the tabs based on their widths.\n *\n * @param elements\n * @returns {number[]}\n */\n function getTabOffsets(elements) {\n var i, tab, currentOffset = 0, offsets = [];\n\n for (i = 0; i < elements.tabs.length; i++) {\n tab = elements.tabs[i];\n offsets.push(currentOffset);\n currentOffset += tab.offsetWidth;\n }\n\n return offsets;\n }\n\n /**\n * Sum the width of all tabs.\n *\n * @param elements\n * @returns {number}\n */\n function getTotalTabsWidth(elements) {\n var sum = 0, i, tab;\n\n for (i = 0; i < elements.tabs.length; i++) {\n tab = elements.tabs[i];\n sum += tab.offsetWidth;\n }\n\n return sum;\n }\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc directive\n * @name mdTab\n * @module material.components.tabs\n *\n * @restrict E\n *\n * @description\n * The `<md-tab>` is a nested directive used within `<md-tabs>` to specify a tab with a **label**\n * and optional *view content*.\n *\n * If the `label` attribute is not specified, then an optional `<md-tab-label>` tag can be used to\n * specify more complex tab header markup. If neither the **label** nor the **md-tab-label** are\n * specified, then the nested markup of the `<md-tab>` is used as the tab header markup.\n *\n * Please note that if you use `<md-tab-label>`, your content **MUST** be wrapped in the\n * `<md-tab-body>` tag. This is to define a clear separation between the tab content and the tab\n * label.\n *\n * This container is used by the TabsController to show/hide the active tab's content view. This\n * synchronization is automatically managed by the internal TabsController whenever the tab\n * selection changes. Selection changes can be initiated via data binding changes, programmatic\n * invocation, or user gestures.\n *\n * @param {string=} label Optional attribute to specify a simple string as the tab label\n * @param {boolean=} ng-disabled If present and expression evaluates to truthy, disabled tab\n * selection.\n * @param {string=} md-tab-class Optional attribute to specify a class that will be applied to the\n * tab's button\n * @param {expression=} md-on-deselect Expression to be evaluated after the tab has been\n * de-selected.\n * @param {expression=} md-on-select Expression to be evaluated after the tab has been selected.\n * @param {boolean=} md-active When true, sets the active tab. Note: There can only be one active\n * tab at a time.\n *\n *\n * @usage\n *\n * <hljs lang=\"html\">\n * <md-tab label=\"My Tab\" md-tab-class=\"my-content-tab\" ng-disabled md-on-select=\"onSelect()\"\n * md-on-deselect=\"onDeselect()\">\n * <h3>My Tab content</h3>\n * </md-tab>\n *\n * <md-tab>\n * <md-tab-label>\n * <h3>My Tab</h3>\n * </md-tab-label>\n * <md-tab-body>\n * <p>\n * Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque\n * laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi\n * architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\n * aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione\n * voluptatem sequi nesciunt.\n * </p>\n * </md-tab-body>\n * </md-tab>\n * </hljs>\n *\n */\nangular\n .module('material.components.tabs')\n .directive('mdTab', MdTab);\n\nfunction MdTab () {\n return {\n require: '^?mdTabs',\n terminal: true,\n compile: function (element, attr) {\n var label = firstChild(element, 'md-tab-label'),\n body = firstChild(element, 'md-tab-body');\n\n if (label.length === 0) {\n label = angular.element('<md-tab-label></md-tab-label>');\n if (attr.label) label.text(attr.label);\n else label.append(element.contents());\n\n if (body.length === 0) {\n var contents = element.contents().detach();\n body = angular.element('<md-tab-body></md-tab-body>');\n body.append(contents);\n }\n }\n\n element.append(label);\n if (body.html()) element.append(body);\n\n return postLink;\n },\n scope: {\n active: '=?mdActive',\n disabled: '=?ngDisabled',\n select: '&?mdOnSelect',\n deselect: '&?mdOnDeselect',\n tabClass: '@mdTabClass'\n }\n };\n\n function postLink (scope, element, attr, ctrl) {\n if (!ctrl) return;\n var index = ctrl.getTabElementIndex(element),\n body = firstChild(element, 'md-tab-body').remove(),\n label = firstChild(element, 'md-tab-label').remove(),\n data = ctrl.insertTab({\n scope: scope,\n parent: scope.$parent,\n index: index,\n element: element,\n template: body.html(),\n label: label.html()\n }, index);\n\n scope.select = scope.select || angular.noop;\n scope.deselect = scope.deselect || angular.noop;\n\n scope.$watch('active', function (active) { if (active) ctrl.select(data.getIndex(), true); });\n scope.$watch('disabled', function () { ctrl.refreshIndex(); });\n scope.$watch(\n function () {\n return ctrl.getTabElementIndex(element);\n },\n function (newIndex) {\n data.index = newIndex;\n ctrl.updateTabOrder();\n }\n );\n scope.$on('$destroy', function () { ctrl.removeTab(data); });\n }\n\n function firstChild (element, tagName) {\n var children = element[0].children;\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if (child.tagName === tagName.toUpperCase()) return angular.element(child);\n }\n return angular.element();\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\nangular\n .module('material.components.tabs')\n .directive('mdTabItem', MdTabItem);\n\nfunction MdTabItem () {\n return {\n require: '^?mdTabs',\n link: function link (scope, element, attr, ctrl) {\n if (!ctrl) return;\n ctrl.attachRipple(scope, element);\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\nangular\n .module('material.components.tabs')\n .directive('mdTabLabel', MdTabLabel);\n\nfunction MdTabLabel () {\n return { terminal: true };\n}\n\n\n})();\n(function(){\n\"use strict\";\n\n\nMdTabScroll.$inject = [\"$parse\"];angular.module('material.components.tabs')\n .directive('mdTabScroll', MdTabScroll);\n\nfunction MdTabScroll ($parse) {\n return {\n restrict: 'A',\n compile: function ($element, attr) {\n var fn = $parse(attr.mdTabScroll, null, true);\n return function ngEventHandler (scope, element) {\n element.on('wheel', function (event) {\n scope.$apply(function () { fn(scope, { $event: event }); });\n });\n };\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdTabsController.$inject = [\"$scope\", \"$element\", \"$window\", \"$mdConstant\", \"$mdTabInkRipple\", \"$mdUtil\", \"$animateCss\", \"$attrs\", \"$compile\", \"$mdTheming\", \"$mdInteraction\", \"$timeout\", \"MdTabsPaginationService\"];angular\n .module('material.components.tabs')\n .controller('MdTabsController', MdTabsController);\n\n/**\n * @ngInject\n */\nfunction MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipple, $mdUtil,\n $animateCss, $attrs, $compile, $mdTheming, $mdInteraction, $timeout,\n MdTabsPaginationService) {\n // define private properties\n var ctrl = this,\n locked = false,\n queue = [],\n destroyed = false,\n loaded = false;\n\n // Define public methods\n ctrl.$onInit = $onInit;\n ctrl.updatePagination = $mdUtil.debounce(updatePagination, 100);\n ctrl.redirectFocus = redirectFocus;\n ctrl.attachRipple = attachRipple;\n ctrl.insertTab = insertTab;\n ctrl.removeTab = removeTab;\n ctrl.select = select;\n ctrl.scroll = scroll;\n ctrl.nextPage = nextPage;\n ctrl.previousPage = previousPage;\n ctrl.keydown = keydown;\n ctrl.canPageForward = canPageForward;\n ctrl.canPageBack = canPageBack;\n ctrl.refreshIndex = refreshIndex;\n ctrl.incrementIndex = incrementIndex;\n ctrl.getTabElementIndex = getTabElementIndex;\n ctrl.updateInkBarStyles = $mdUtil.debounce(updateInkBarStyles, 100);\n ctrl.updateTabOrder = $mdUtil.debounce(updateTabOrder, 100);\n ctrl.getFocusedTabId = getFocusedTabId;\n\n // For AngularJS 1.4 and older, where there are no lifecycle hooks but bindings are pre-assigned,\n // manually call the $onInit hook.\n if (angular.version.major === 1 && angular.version.minor <= 4) {\n this.$onInit();\n }\n\n /**\n * AngularJS Lifecycle hook for newer AngularJS versions.\n * Bindings are not guaranteed to have been assigned in the controller, but they are in the\n * $onInit hook.\n */\n function $onInit() {\n // Define one-way bindings\n defineOneWayBinding('stretchTabs', handleStretchTabs);\n\n // Define public properties with change handlers\n defineProperty('focusIndex', handleFocusIndexChange, ctrl.selectedIndex || 0);\n defineProperty('offsetLeft', handleOffsetChange, 0);\n defineProperty('hasContent', handleHasContent, false);\n defineProperty('maxTabWidth', handleMaxTabWidth, getMaxTabWidth());\n defineProperty('shouldPaginate', handleShouldPaginate, false);\n\n // Define boolean attributes\n defineBooleanAttribute('noInkBar', handleInkBar);\n defineBooleanAttribute('dynamicHeight', handleDynamicHeight);\n defineBooleanAttribute('noPagination');\n defineBooleanAttribute('swipeContent');\n defineBooleanAttribute('autoselect');\n defineBooleanAttribute('noSelectClick');\n defineBooleanAttribute('centerTabs', handleCenterTabs);\n defineBooleanAttribute('enableDisconnect');\n\n // Define public properties\n ctrl.scope = $scope;\n ctrl.parent = $scope.$parent;\n ctrl.tabs = [];\n ctrl.lastSelectedIndex = null;\n ctrl.hasFocus = false;\n ctrl.styleTabItemFocus = false;\n ctrl.shouldCenterTabs = shouldCenterTabs();\n ctrl.tabContentPrefix = 'tab-content-';\n ctrl.navigationHint = 'Use the left and right arrow keys to navigate between tabs';\n\n // Setup the tabs controller after all bindings are available.\n setupTabsController();\n }\n\n /**\n * Perform setup for the controller, setup events and watcher(s)\n */\n function setupTabsController () {\n ctrl.selectedIndex = ctrl.selectedIndex || 0;\n compileTemplate();\n configureWatchers();\n bindEvents();\n $mdTheming($element);\n $mdUtil.nextTick(function () {\n updateHeightFromContent();\n adjustOffset();\n updateInkBarStyles();\n ctrl.tabs[ ctrl.selectedIndex ] && ctrl.tabs[ ctrl.selectedIndex ].scope.select();\n loaded = true;\n updatePagination();\n });\n }\n\n /**\n * Compiles the template provided by the user. This is passed as an attribute from the tabs\n * directive's template function.\n */\n function compileTemplate () {\n var template = $attrs.$mdTabsTemplate,\n element = angular.element($element[0].querySelector('md-tab-data'));\n\n element.html(template);\n $compile(element.contents())(ctrl.parent);\n delete $attrs.$mdTabsTemplate;\n }\n\n /**\n * Binds events used by the tabs component.\n */\n function bindEvents () {\n angular.element($window).on('resize', handleWindowResize);\n $scope.$on('$destroy', cleanup);\n }\n\n /**\n * Configure watcher(s) used by Tabs\n */\n function configureWatchers () {\n $scope.$watch('$mdTabsCtrl.selectedIndex', handleSelectedIndexChange);\n }\n\n /**\n * Creates a one-way binding manually rather than relying on AngularJS's isolated scope\n * @param key\n * @param handler\n */\n function defineOneWayBinding (key, handler) {\n var attr = $attrs.$normalize('md-' + key);\n if (handler) defineProperty(key, handler);\n $attrs.$observe(attr, function (newValue) { ctrl[ key ] = newValue; });\n }\n\n /**\n * Defines boolean attributes with default value set to true. I.e. md-stretch-tabs with no value\n * will be treated as being truthy.\n * @param {string} key\n * @param {Function=} handler\n */\n function defineBooleanAttribute (key, handler) {\n var attr = $attrs.$normalize('md-' + key);\n if (handler) defineProperty(key, handler, undefined);\n if ($attrs.hasOwnProperty(attr)) updateValue($attrs[attr]);\n $attrs.$observe(attr, updateValue);\n function updateValue (newValue) {\n ctrl[ key ] = newValue !== 'false';\n }\n }\n\n /**\n * Remove any events defined by this controller\n */\n function cleanup () {\n destroyed = true;\n angular.element($window).off('resize', handleWindowResize);\n }\n\n // Change handlers\n\n /**\n * Toggles stretch tabs class and updates inkbar when tab stretching changes.\n */\n function handleStretchTabs () {\n var elements = getElements();\n angular.element(elements.wrapper).toggleClass('md-stretch-tabs', shouldStretchTabs());\n updateInkBarStyles();\n }\n\n /**\n * Update the value of ctrl.shouldCenterTabs.\n */\n function handleCenterTabs () {\n ctrl.shouldCenterTabs = shouldCenterTabs();\n }\n\n /**\n * @param {number} newWidth new max tab width in pixels\n * @param {number} oldWidth previous max tab width in pixels\n */\n function handleMaxTabWidth (newWidth, oldWidth) {\n if (newWidth !== oldWidth) {\n var elements = getElements();\n\n // Set the max width for the real tabs\n angular.forEach(elements.tabs, function(tab) {\n tab.style.maxWidth = newWidth + 'px';\n });\n\n // Set the max width for the dummy tabs too\n angular.forEach(elements.dummies, function(tab) {\n tab.style.maxWidth = newWidth + 'px';\n });\n\n $mdUtil.nextTick(ctrl.updateInkBarStyles);\n }\n }\n\n function handleShouldPaginate (newValue, oldValue) {\n if (newValue !== oldValue) {\n ctrl.maxTabWidth = getMaxTabWidth();\n ctrl.shouldCenterTabs = shouldCenterTabs();\n $mdUtil.nextTick(function () {\n ctrl.maxTabWidth = getMaxTabWidth();\n adjustOffset(ctrl.selectedIndex);\n });\n }\n }\n\n /**\n * Add/remove the `md-no-tab-content` class depending on `ctrl.hasContent`\n * @param {boolean} hasContent\n */\n function handleHasContent (hasContent) {\n $element[ hasContent ? 'removeClass' : 'addClass' ]('md-no-tab-content');\n }\n\n /**\n * Apply ctrl.offsetLeft to the paging element when it changes\n * @param {string|number} left\n */\n function handleOffsetChange (left) {\n var newValue = ((ctrl.shouldCenterTabs || isRtl() ? '' : '-') + left + 'px');\n\n // Fix double-negative which can happen with RTL support\n newValue = newValue.replace('--', '');\n\n angular.element(getElements().paging).css($mdConstant.CSS.TRANSFORM,\n 'translate(' + newValue + ', 0)');\n $scope.$broadcast('$mdTabsPaginationChanged');\n }\n\n /**\n * Update the UI whenever `ctrl.focusIndex` is updated\n * @param {number} newIndex\n * @param {number} oldIndex\n */\n function handleFocusIndexChange (newIndex, oldIndex) {\n if (newIndex === oldIndex) return;\n if (!getElements().tabs[ newIndex ]) return;\n adjustOffset();\n redirectFocus();\n }\n\n /**\n * Update the UI whenever the selected index changes. Calls user-defined select/deselect methods.\n * @param {number} newValue selected index's new value\n * @param {number} oldValue selected index's previous value\n */\n function handleSelectedIndexChange (newValue, oldValue) {\n if (newValue === oldValue) return;\n\n ctrl.selectedIndex = getNearestSafeIndex(newValue);\n ctrl.lastSelectedIndex = oldValue;\n ctrl.updateInkBarStyles();\n updateHeightFromContent();\n adjustOffset(newValue);\n $scope.$broadcast('$mdTabsChanged');\n ctrl.tabs[ oldValue ] && ctrl.tabs[ oldValue ].scope.deselect();\n ctrl.tabs[ newValue ] && ctrl.tabs[ newValue ].scope.select();\n }\n\n function getTabElementIndex(tabEl){\n var tabs = $element[0].getElementsByTagName('md-tab');\n return Array.prototype.indexOf.call(tabs, tabEl[0]);\n }\n\n /**\n * Queues up a call to `handleWindowResize` when a resize occurs while the tabs component is\n * hidden.\n */\n function handleResizeWhenVisible () {\n // if there is already a watcher waiting for resize, do nothing\n if (handleResizeWhenVisible.watcher) return;\n // otherwise, we will abuse the $watch function to check for visible\n handleResizeWhenVisible.watcher = $scope.$watch(function () {\n // since we are checking for DOM size, we use $mdUtil.nextTick() to wait for after the DOM updates\n $mdUtil.nextTick(function () {\n // if the watcher has already run (ie. multiple digests in one cycle), do nothing\n if (!handleResizeWhenVisible.watcher) return;\n\n if ($element.prop('offsetParent')) {\n handleResizeWhenVisible.watcher();\n handleResizeWhenVisible.watcher = null;\n\n handleWindowResize();\n }\n }, false);\n });\n }\n\n // Event handlers / actions\n\n /**\n * Handle user keyboard interactions\n * @param {KeyboardEvent} event keydown event\n */\n function keydown (event) {\n switch (event.keyCode) {\n case $mdConstant.KEY_CODE.LEFT_ARROW:\n event.preventDefault();\n incrementIndex(-1, true);\n break;\n case $mdConstant.KEY_CODE.RIGHT_ARROW:\n event.preventDefault();\n incrementIndex(1, true);\n break;\n case $mdConstant.KEY_CODE.SPACE:\n case $mdConstant.KEY_CODE.ENTER:\n event.preventDefault();\n if (!locked) select(ctrl.focusIndex);\n break;\n case $mdConstant.KEY_CODE.TAB:\n // On tabbing out of the tablist, reset hasFocus to reset ng-focused and\n // its md-focused class if the focused tab is not the active tab.\n if (ctrl.focusIndex !== ctrl.selectedIndex) {\n ctrl.focusIndex = ctrl.selectedIndex;\n }\n break;\n }\n }\n\n /**\n * Update the selected index. Triggers a click event on the original `md-tab` element in order\n * to fire user-added click events if canSkipClick or `md-no-select-click` are false.\n * @param index\n * @param canSkipClick Optionally allow not firing the click event if `md-no-select-click` is also true.\n */\n function select (index, canSkipClick) {\n if (!locked) ctrl.focusIndex = ctrl.selectedIndex = index;\n // skip the click event if noSelectClick is enabled\n if (canSkipClick && ctrl.noSelectClick) return;\n // nextTick is required to prevent errors in user-defined click events\n $mdUtil.nextTick(function () {\n ctrl.tabs[ index ].element.triggerHandler('click');\n }, false);\n }\n\n /**\n * When pagination is on, this makes sure the selected index is in view.\n * @param {WheelEvent} event\n */\n function scroll (event) {\n if (!ctrl.shouldPaginate) return;\n event.preventDefault();\n if (event.deltaY) {\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaY);\n } else if (event.deltaX) {\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaX);\n }\n }\n\n /**\n * Slides the tabs over approximately one page forward.\n */\n function nextPage () {\n if (!ctrl.canPageForward()) { return; }\n\n var newOffset = MdTabsPaginationService.increasePageOffset(getElements(), ctrl.offsetLeft);\n\n ctrl.offsetLeft = fixOffset(newOffset);\n }\n\n /**\n * Slides the tabs over approximately one page backward.\n */\n function previousPage () {\n if (!ctrl.canPageBack()) { return; }\n\n var newOffset = MdTabsPaginationService.decreasePageOffset(getElements(), ctrl.offsetLeft);\n\n // Set the new offset\n ctrl.offsetLeft = fixOffset(newOffset);\n }\n\n /**\n * Update size calculations when the window is resized.\n */\n function handleWindowResize () {\n ctrl.lastSelectedIndex = ctrl.selectedIndex;\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);\n\n $mdUtil.nextTick(function () {\n ctrl.updateInkBarStyles();\n updatePagination();\n });\n }\n\n /**\n * Hides or shows the tabs ink bar.\n * @param {boolean} hide A Boolean (not just truthy/falsy) value to determine whether the class\n * should be added or removed.\n */\n function handleInkBar (hide) {\n angular.element(getElements().inkBar).toggleClass('ng-hide', hide);\n }\n\n /**\n * Enables or disables tabs dynamic height.\n * @param {boolean} value A Boolean (not just truthy/falsy) value to determine whether the class\n * should be added or removed.\n */\n function handleDynamicHeight (value) {\n $element.toggleClass('md-dynamic-height', value);\n }\n\n /**\n * Remove a tab from the data and select the nearest valid tab.\n * @param {Object} tabData tab to remove\n */\n function removeTab (tabData) {\n if (destroyed) return;\n var selectedIndex = ctrl.selectedIndex,\n tab = ctrl.tabs.splice(tabData.getIndex(), 1)[ 0 ];\n refreshIndex();\n // when removing a tab, if the selected index did not change, we have to manually trigger the\n // tab select/deselect events\n if (ctrl.selectedIndex === selectedIndex) {\n tab.scope.deselect();\n ctrl.tabs[ ctrl.selectedIndex ] && ctrl.tabs[ ctrl.selectedIndex ].scope.select();\n }\n $mdUtil.nextTick(function () {\n updatePagination();\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);\n });\n }\n\n /**\n * Create an entry in the tabs array for a new tab at the specified index.\n * @param {Object} tabData tab to insert\n * @param {number} index location to insert the new tab\n * @returns {Object} the inserted tab\n */\n function insertTab (tabData, index) {\n var hasLoaded = loaded;\n var proto = {\n getIndex: function () { return ctrl.tabs.indexOf(tab); },\n isActive: function () { return this.getIndex() === ctrl.selectedIndex; },\n isLeft: function () { return this.getIndex() < ctrl.selectedIndex; },\n isRight: function () { return this.getIndex() > ctrl.selectedIndex; },\n shouldRender: function () { return ctrl.dynamicHeight || this.isActive(); },\n hasFocus: function () {\n return ctrl.styleTabItemFocus\n && ctrl.hasFocus && this.getIndex() === ctrl.focusIndex;\n },\n id: $mdUtil.nextUid(),\n hasContent: !!(tabData.template && tabData.template.trim())\n };\n var tab = angular.extend(proto, tabData);\n\n if (angular.isDefined(index)) {\n ctrl.tabs.splice(index, 0, tab);\n } else {\n ctrl.tabs.push(tab);\n }\n processQueue();\n updateHasContent();\n\n $mdUtil.nextTick(function () {\n updatePagination();\n setAriaControls(tab);\n\n // if autoselect is enabled, select the newly added tab\n if (hasLoaded && ctrl.autoselect) {\n $mdUtil.nextTick(function () {\n $mdUtil.nextTick(function () { select(ctrl.tabs.indexOf(tab)); });\n });\n }\n });\n return tab;\n }\n\n // Getter methods\n\n /**\n * Gathers references to all of the DOM elements used by this controller.\n * @returns {Object}\n */\n function getElements () {\n var elements = {};\n var node = $element[0];\n\n // gather tab bar elements\n elements.wrapper = node.querySelector('md-tabs-wrapper');\n elements.canvas = elements.wrapper.querySelector('md-tabs-canvas');\n elements.paging = elements.canvas.querySelector('md-pagination-wrapper');\n elements.inkBar = elements.paging.querySelector('md-ink-bar');\n elements.nextButton = node.querySelector('md-next-button');\n elements.prevButton = node.querySelector('md-prev-button');\n\n elements.contents = node.querySelectorAll('md-tabs-content-wrapper > md-tab-content');\n elements.tabs = elements.paging.querySelectorAll('md-tab-item');\n elements.dummies = elements.canvas.querySelectorAll('md-dummy-tab');\n\n return elements;\n }\n\n /**\n * Determines whether or not the left pagination arrow should be enabled.\n * @returns {boolean}\n */\n function canPageBack () {\n // This works for both LTR and RTL\n return ctrl.offsetLeft > 0;\n }\n\n /**\n * Determines whether or not the right pagination arrow should be enabled.\n * @returns {*|boolean}\n */\n function canPageForward () {\n var elements = getElements();\n var lastTab = elements.tabs[ elements.tabs.length - 1 ];\n\n if (isRtl()) {\n return ctrl.offsetLeft < elements.paging.offsetWidth - elements.canvas.offsetWidth;\n }\n\n return lastTab && lastTab.offsetLeft + lastTab.offsetWidth > elements.canvas.clientWidth +\n ctrl.offsetLeft;\n }\n\n /**\n * Returns currently focused tab item's element ID\n */\n function getFocusedTabId() {\n var focusedTab = ctrl.tabs[ctrl.focusIndex];\n if (!focusedTab || !focusedTab.id) {\n return null;\n }\n return 'tab-item-' + focusedTab.id;\n }\n\n /**\n * Determines if the UI should stretch the tabs to fill the available space.\n * @returns {*}\n */\n function shouldStretchTabs () {\n switch (ctrl.stretchTabs) {\n case 'always':\n return true;\n case 'never':\n return false;\n default:\n return !ctrl.shouldPaginate\n && $window.matchMedia('(max-width: 600px)').matches;\n }\n }\n\n /**\n * Determines if the tabs should appear centered.\n * @returns {boolean}\n */\n function shouldCenterTabs () {\n return ctrl.centerTabs && !ctrl.shouldPaginate;\n }\n\n /**\n * Determines if pagination is necessary to display the tabs within the available space.\n * @returns {boolean} true if pagination is necessary, false otherwise\n */\n function shouldPaginate () {\n var shouldPaginate;\n if (ctrl.noPagination || !loaded) return false;\n var canvasWidth = $element.prop('clientWidth');\n\n angular.forEach(getElements().tabs, function (tab) {\n canvasWidth -= tab.offsetWidth;\n });\n\n shouldPaginate = canvasWidth < 0;\n // Work around width calculation issues on IE11 when pagination is enabled.\n // Don't do this on other browsers because it breaks scroll to new tab animation.\n if ($mdUtil.msie) {\n if (shouldPaginate) {\n getElements().paging.style.width = '999999px';\n } else {\n getElements().paging.style.width = undefined;\n }\n }\n return shouldPaginate;\n }\n\n /**\n * Finds the nearest tab index that is available. This is primarily used for when the active\n * tab is removed.\n * @param newIndex\n * @returns {*}\n */\n function getNearestSafeIndex (newIndex) {\n if (newIndex === -1) return -1;\n var maxOffset = Math.max(ctrl.tabs.length - newIndex, newIndex),\n i, tab;\n for (i = 0; i <= maxOffset; i++) {\n tab = ctrl.tabs[ newIndex + i ];\n if (tab && (tab.scope.disabled !== true)) return tab.getIndex();\n tab = ctrl.tabs[ newIndex - i ];\n if (tab && (tab.scope.disabled !== true)) return tab.getIndex();\n }\n return newIndex;\n }\n\n // Utility methods\n\n /**\n * Defines a property using a getter and setter in order to trigger a change handler without\n * using `$watch` to observe changes.\n * @param {PropertyKey} key\n * @param {Function} handler\n * @param {any} value\n */\n function defineProperty (key, handler, value) {\n Object.defineProperty(ctrl, key, {\n get: function () { return value; },\n set: function (newValue) {\n var oldValue = value;\n value = newValue;\n handler && handler(newValue, oldValue);\n }\n });\n }\n\n /**\n * Updates whether or not pagination should be displayed.\n */\n function updatePagination () {\n ctrl.maxTabWidth = getMaxTabWidth();\n ctrl.shouldPaginate = shouldPaginate();\n }\n\n /**\n * @param {Array<HTMLElement>} tabs tab item elements for use in computing total width\n * @returns {number} the width of the tabs in the specified array in pixels\n */\n function calcTabsWidth(tabs) {\n var width = 0;\n\n angular.forEach(tabs, function (tab) {\n // Uses the larger value between `getBoundingClientRect().width` and `offsetWidth`. This\n // prevents `offsetWidth` value from being rounded down and causing wrapping issues, but\n // also handles scenarios where `getBoundingClientRect()` is inaccurate (ie. tabs inside\n // of a dialog).\n width += Math.max(tab.offsetWidth, tab.getBoundingClientRect().width);\n });\n\n return Math.ceil(width);\n }\n\n /**\n * @returns {number} either the max width as constrained by the container or the max width from\n * the 2017 version of the Material Design spec.\n */\n function getMaxTabWidth() {\n var elements = getElements(),\n containerWidth = elements.canvas.clientWidth,\n\n // See https://material.io/archive/guidelines/components/tabs.html#tabs-specs\n specMax = 264;\n\n // Do the spec maximum, or the canvas width; whichever is *smaller* (tabs larger than the canvas\n // width can break the pagination) but not less than 0\n return Math.max(0, Math.min(containerWidth - 1, specMax));\n }\n\n /**\n * Re-orders the tabs and updates the selected and focus indexes to their new positions.\n * This is triggered by `tabDirective.js` when the user's tabs have been re-ordered.\n */\n function updateTabOrder () {\n var selectedItem = ctrl.tabs[ ctrl.selectedIndex ],\n focusItem = ctrl.tabs[ ctrl.focusIndex ];\n ctrl.tabs = ctrl.tabs.sort(function (a, b) {\n return a.index - b.index;\n });\n ctrl.selectedIndex = ctrl.tabs.indexOf(selectedItem);\n ctrl.focusIndex = ctrl.tabs.indexOf(focusItem);\n }\n\n /**\n * This moves the selected or focus index left or right. This is used by the keydown handler.\n * @param {number} inc amount to increment\n * @param {boolean} focus true to increment the focus index, false to increment the selected index\n */\n function incrementIndex (inc, focus) {\n var newIndex,\n key = focus ? 'focusIndex' : 'selectedIndex',\n index = ctrl[ key ];\n for (newIndex = index + inc;\n ctrl.tabs[ newIndex ] && ctrl.tabs[ newIndex ].scope.disabled;\n newIndex += inc) { /* do nothing */ }\n\n newIndex = (index + inc + ctrl.tabs.length) % ctrl.tabs.length;\n\n if (ctrl.tabs[ newIndex ]) {\n ctrl[ key ] = newIndex;\n }\n }\n\n /**\n * This is used to forward focus to tab container elements. This method is necessary to avoid\n * animation issues when attempting to focus an item that is out of view.\n */\n function redirectFocus () {\n ctrl.styleTabItemFocus = ($mdInteraction.getLastInteractionType() === 'keyboard');\n var tabToFocus = getElements().tabs[ctrl.focusIndex];\n if (tabToFocus) {\n tabToFocus.focus();\n }\n }\n\n /**\n * Forces the pagination to move the focused tab into view.\n * @param {number=} index of tab to have its offset adjusted\n */\n function adjustOffset (index) {\n var elements = getElements();\n\n if (!angular.isNumber(index)) index = ctrl.focusIndex;\n if (!elements.tabs[ index ]) return;\n if (ctrl.shouldCenterTabs) return;\n var tab = elements.tabs[ index ],\n left = tab.offsetLeft,\n right = tab.offsetWidth + left,\n extraOffset = 32;\n\n // If we are selecting the first tab (in LTR and RTL), always set the offset to 0\n if (index === 0) {\n ctrl.offsetLeft = 0;\n return;\n }\n\n if (isRtl()) {\n var tabWidthsBefore = calcTabsWidth(Array.prototype.slice.call(elements.tabs, 0, index));\n var tabWidthsIncluding = calcTabsWidth(Array.prototype.slice.call(elements.tabs, 0, index + 1));\n\n ctrl.offsetLeft = Math.min(ctrl.offsetLeft, fixOffset(tabWidthsBefore));\n ctrl.offsetLeft = Math.max(ctrl.offsetLeft, fixOffset(tabWidthsIncluding - elements.canvas.clientWidth));\n } else {\n ctrl.offsetLeft = Math.max(ctrl.offsetLeft, fixOffset(right - elements.canvas.clientWidth + extraOffset));\n ctrl.offsetLeft = Math.min(ctrl.offsetLeft, fixOffset(left));\n }\n }\n\n /**\n * Iterates through all queued functions and clears the queue. This is used for functions that\n * are called before the UI is ready, such as size calculations.\n */\n function processQueue () {\n queue.forEach(function (func) { $mdUtil.nextTick(func); });\n queue = [];\n }\n\n /**\n * Determines if the tab content area is needed.\n */\n function updateHasContent () {\n var hasContent = false;\n var i;\n\n for (i = 0; i < ctrl.tabs.length; i++) {\n if (ctrl.tabs[i].hasContent) {\n hasContent = true;\n break;\n }\n }\n\n ctrl.hasContent = hasContent;\n }\n\n /**\n * Moves the indexes to their nearest valid values.\n */\n function refreshIndex () {\n ctrl.selectedIndex = getNearestSafeIndex(ctrl.selectedIndex);\n ctrl.focusIndex = getNearestSafeIndex(ctrl.focusIndex);\n }\n\n /**\n * Calculates the content height of the current tab.\n * @returns {*}\n */\n function updateHeightFromContent () {\n if (!ctrl.dynamicHeight) return $element.css('height', '');\n if (!ctrl.tabs.length) return queue.push(updateHeightFromContent);\n\n var elements = getElements();\n\n var tabContent = elements.contents[ ctrl.selectedIndex ],\n contentHeight = tabContent ? tabContent.offsetHeight : 0,\n tabsHeight = elements.wrapper.offsetHeight,\n newHeight = contentHeight + tabsHeight,\n currentHeight = $element.prop('clientHeight');\n\n if (currentHeight === newHeight) return;\n\n // Adjusts calculations for when the buttons are bottom-aligned since this relies on absolute\n // positioning. This should probably be cleaned up if a cleaner solution is possible.\n if ($element.attr('md-align-tabs') === 'bottom') {\n currentHeight -= tabsHeight;\n newHeight -= tabsHeight;\n // Need to include bottom border in these calculations\n if ($element.attr('md-border-bottom') !== undefined) {\n ++currentHeight;\n }\n }\n\n // Lock during animation so the user can't change tabs\n locked = true;\n\n var fromHeight = { height: currentHeight + 'px' },\n toHeight = { height: newHeight + 'px' };\n\n // Set the height to the current, specific pixel height to fix a bug on iOS where the height\n // first animates to 0, then back to the proper height causing a visual glitch\n $element.css(fromHeight);\n\n // Animate the height from the old to the new\n $animateCss($element, {\n from: fromHeight,\n to: toHeight,\n easing: 'cubic-bezier(0.35, 0, 0.25, 1)',\n duration: 0.5\n }).start().done(function () {\n // Then (to fix the same iOS issue as above), disable transitions and remove the specific\n // pixel height so the height can size with browser width/content changes, etc.\n $element.css({\n transition: 'none',\n height: ''\n });\n\n // In the next tick, re-allow transitions (if we do it all at once, $element.css is \"smart\"\n // enough to batch it for us instead of doing it immediately, which undoes the original\n // transition: none)\n $mdUtil.nextTick(function() {\n $element.css('transition', '');\n });\n\n // And unlock so tab changes can occur\n locked = false;\n });\n }\n\n /**\n * Repositions the ink bar to the selected tab.\n * Parameters are used when calling itself recursively when md-center-tabs is used as we need to\n * run two passes to properly center the tabs. These parameters ensure that we only run two passes\n * and that we don't run indefinitely.\n * @param {number=} previousTotalWidth previous width of pagination wrapper\n * @param {number=} previousWidthOfTabItems previous width of all tab items\n */\n function updateInkBarStyles (previousTotalWidth, previousWidthOfTabItems) {\n if (ctrl.noInkBar) {\n return;\n }\n var elements = getElements();\n\n if (!elements.tabs[ ctrl.selectedIndex ]) {\n angular.element(elements.inkBar).css({ left: 'auto', right: 'auto' });\n return;\n }\n\n if (!ctrl.tabs.length) {\n queue.push(ctrl.updateInkBarStyles);\n return;\n }\n // If the element is not visible, we will not be able to calculate sizes until it becomes\n // visible. We should treat that as a resize event rather than just updating the ink bar.\n if (!$element.prop('offsetParent')) {\n handleResizeWhenVisible();\n return;\n }\n\n var index = ctrl.selectedIndex,\n totalWidth = elements.paging.offsetWidth,\n tab = elements.tabs[ index ],\n left = tab.offsetLeft,\n right = totalWidth - left - tab.offsetWidth;\n\n if (ctrl.shouldCenterTabs) {\n // We need to use the same calculate process as in the pagination wrapper, to avoid rounding\n // deviations.\n var totalWidthOfTabItems = calcTabsWidth(elements.tabs);\n\n if (totalWidth > totalWidthOfTabItems &&\n previousTotalWidth !== totalWidth &&\n previousWidthOfTabItems !== totalWidthOfTabItems) {\n $timeout(updateInkBarStyles, 0, true, totalWidth, totalWidthOfTabItems);\n }\n }\n updateInkBarClassName();\n angular.element(elements.inkBar).css({ left: left + 'px', right: right + 'px' });\n }\n\n /**\n * Adds left/right classes so that the ink bar will animate properly.\n */\n function updateInkBarClassName () {\n var elements = getElements();\n var newIndex = ctrl.selectedIndex,\n oldIndex = ctrl.lastSelectedIndex,\n ink = angular.element(elements.inkBar);\n if (!angular.isNumber(oldIndex)) return;\n ink\n .toggleClass('md-left', newIndex < oldIndex)\n .toggleClass('md-right', newIndex > oldIndex);\n }\n\n /**\n * Takes an offset value and makes sure that it is within the min/max allowed values.\n * @param {number} value\n * @returns {number}\n */\n function fixOffset (value) {\n var elements = getElements();\n\n if (!elements.tabs.length || !ctrl.shouldPaginate) return 0;\n\n var lastTab = elements.tabs[ elements.tabs.length - 1 ],\n totalWidth = lastTab.offsetLeft + lastTab.offsetWidth;\n\n if (isRtl()) {\n value = Math.min(elements.paging.offsetWidth - elements.canvas.clientWidth, value);\n value = Math.max(0, value);\n } else {\n value = Math.max(0, value);\n value = Math.min(totalWidth - elements.canvas.clientWidth, value);\n }\n\n return value;\n }\n\n /**\n * Attaches a ripple to the tab item element.\n * @param scope\n * @param element\n */\n function attachRipple (scope, element) {\n var elements = getElements();\n var options = { colorElement: angular.element(elements.inkBar) };\n $mdTabInkRipple.attach(scope, element, options);\n }\n\n /**\n * Sets the `aria-controls` attribute to the elements that correspond to the passed-in tab.\n * @param tab\n */\n function setAriaControls (tab) {\n if (tab.hasContent) {\n var nodes = $element[0].querySelectorAll('[md-tab-id=\"' + tab.id + '\"]');\n angular.element(nodes).attr('aria-controls', ctrl.tabContentPrefix + tab.id);\n }\n }\n\n function isRtl() {\n return $mdUtil.isRtl($attrs);\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc directive\n * @name mdTabs\n * @module material.components.tabs\n *\n * @restrict E\n *\n * @description\n * The `<md-tabs>` directive serves as the container for 1..n\n * <a ng-href=\"api/directive/mdTab\">`<md-tab>`</a> child directives.\n * In turn, the nested `<md-tab>` directive is used to specify a tab label for the\n * **header button** and <i>optional</i> tab view content that will be associated with each tab\n * button.\n *\n * Below is the markup for its simplest usage:\n *\n * <hljs lang=\"html\">\n * <md-tabs>\n * <md-tab label=\"Tab #1\"></md-tab>\n * <md-tab label=\"Tab #2\"></md-tab>\n * <md-tab label=\"Tab #3\"></md-tab>\n * </md-tabs>\n * </hljs>\n *\n * Tabs support three (3) usage scenarios:\n *\n * 1. Tabs (buttons only)\n * 2. Tabs with internal view content\n * 3. Tabs with external view content\n *\n * **Tabs-only** support is useful when tab buttons are used for custom navigation regardless of any\n * other components, content, or views.\n *\n * <blockquote><b>Note:</b> If you are using the Tabs component for page-level navigation, please\n * use the <a ng-href=\"./api/directive/mdNavBar\">NavBar component</a> instead. It handles this\n * case a more natively and more performantly.</blockquote>\n *\n * **Tabs with internal views** are the traditional usage where each tab has associated view\n * content and the view switching is managed internally by the Tabs component.\n *\n * **Tabs with external view content** is often useful when content associated with each tab is\n * independently managed and data-binding notifications announce tab selection changes.\n *\n * Additional features include:\n *\n * * Content can include any markup.\n * * If a tab is disabled while active/selected, then the next tab will be auto-selected.\n *\n * ### Theming\n *\n * By default, tabs use your app's accent color for the selected tab's text and ink bar.\n *\n * You can use the theming classes to change the color of the `md-tabs` background:\n * * Applying `class=\"md-primary\"` will use your app's primary color for the background, your\n * accent color for the ink bar, and your primary palette's contrast color for the text of the\n * selected tab.\n * * When using the `md-primary` class, you can add the `md-no-ink-bar-color` class to make the\n * ink bar use your theme's primary contrast color instead of the accent color.\n * * Applying `class=\"md-accent\"` will use your app's accent color for the background and your\n * accent palette's contrast color for the text and ink bar of the selected tab.\n * * Applying `class=\"md-warn\"` will use your app's warn color for the background and your\n * warn palette's contrast color for the text and ink bar of the selected tab.\n *\n * ### Explanation of tab stretching\n *\n * Initially, tabs will have an inherent size. This size will either be defined by how much space\n * is needed to accommodate their text or set by the user through CSS.\n * Calculations will be based on this size.\n *\n * On mobile devices, tabs will be expanded to fill the available horizontal space.\n * When this happens, all tabs will become the same size.\n *\n * On desktops, by default, stretching will never occur.\n *\n * This default behavior can be overridden through the `md-stretch-tabs` attribute.\n * Here is a table showing when stretching will occur:\n *\n * `md-stretch-tabs` | mobile | desktop\n * ------------------|-----------|--------\n * `auto` | stretched | ---\n * `always` | stretched | stretched\n * `never` | --- | ---\n *\n * @param {number=} md-selected Index of the active/selected tab.\n * @param {expression=} md-no-ink-bar If `true` or no value, disables the selection ink bar.\n * @param {string=} md-align-tabs Attribute to indicate position of tab buttons: `bottom` or `top`;\n * Default is `top`.\n * @param {string=} md-stretch-tabs Attribute to indicate whether or not to stretch tabs: `auto`,\n * `always`, or `never`; Default is `auto`.\n * @param {expression=} md-dynamic-height If `true` or no value, the tab wrapper will resize based\n * on the contents of the selected tab.\n * @param {boolean=} md-border-bottom If the attribute is present, shows a solid `1px` border\n * between the tabs and their content.\n * @param {boolean=} md-center-tabs If the attribute is present, tabs will be centered provided\n * there is no need for pagination.\n * @param {boolean=} md-no-pagination If the attribute is present, pagination will remain off.\n * @param {expression=} md-swipe-content When enabled, swipe gestures will be enabled for the content\n * area to allow swiping between tabs.\n * @param {boolean=} md-enable-disconnect When enabled, scopes will be disconnected for tabs that\n * are not being displayed. This provides a performance boost, but may also cause unexpected\n * issues. It is not recommended for most users.\n * @param {boolean=} md-autoselect If the attribute is present, any tabs added after the initial\n * load will be automatically selected.\n * @param {boolean=} md-no-select-click When true, click events will not be fired when the value of\n * `md-active` on an `md-tab` changes. This is useful when using tabs with UI-Router's child\n * states, as triggering a click event in that case can cause an extra tab change to occur.\n * @param {string=} md-navigation-hint Attribute to override the default `tablist` navigation hint\n * that screen readers will announce to provide instructions for navigating between tabs. This is\n * desirable when you want the hint to be in a different language. Default is \"Use the left and\n * right arrow keys to navigate between tabs\".\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-tabs md-selected=\"selectedIndex\">\n * <img ng-src=\"img/angular.png\" class=\"centered\" alt=\"Angular icon\">\n * <md-tab\n * ng-repeat=\"tab in tabs | orderBy:predicate:reversed\"\n * md-on-select=\"onTabSelected(tab)\"\n * md-on-deselect=\"announceDeselected(tab)\"\n * ng-disabled=\"tab.disabled\">\n * <md-tab-label>\n * {{tab.title}}\n * <img src=\"img/removeTab.png\" ng-click=\"removeTab(tab)\" class=\"delete\" alt=\"Remove tab\">\n * </md-tab-label>\n * <md-tab-body>\n * {{tab.content}}\n * </md-tab-body>\n * </md-tab>\n * </md-tabs>\n * </hljs>\n *\n */\nMdTabs.$inject = [\"$$mdSvgRegistry\"];\nangular\n .module('material.components.tabs')\n .directive('mdTabs', MdTabs);\n\nfunction MdTabs ($$mdSvgRegistry) {\n return {\n scope: {\n navigationHint: '@?mdNavigationHint',\n selectedIndex: '=?mdSelected'\n },\n template: function (element, attr) {\n attr.$mdTabsTemplate = element.html();\n return '' +\n '<md-tabs-wrapper> ' +\n '<md-tab-data></md-tab-data> ' +\n '<md-prev-button ' +\n 'tabindex=\"-1\" ' +\n 'role=\"button\" ' +\n 'aria-label=\"Previous Page\" ' +\n 'aria-disabled=\"{{!$mdTabsCtrl.canPageBack()}}\" ' +\n 'ng-class=\"{ \\'md-disabled\\': !$mdTabsCtrl.canPageBack() }\" ' +\n 'ng-if=\"$mdTabsCtrl.shouldPaginate\" ' +\n 'ng-click=\"$mdTabsCtrl.previousPage()\"> ' +\n '<md-icon md-svg-src=\"'+ $$mdSvgRegistry.mdTabsArrow +'\"></md-icon> ' +\n '</md-prev-button> ' +\n '<md-next-button ' +\n 'tabindex=\"-1\" ' +\n 'role=\"button\" ' +\n 'aria-label=\"Next Page\" ' +\n 'aria-disabled=\"{{!$mdTabsCtrl.canPageForward()}}\" ' +\n 'ng-class=\"{ \\'md-disabled\\': !$mdTabsCtrl.canPageForward() }\" ' +\n 'ng-if=\"$mdTabsCtrl.shouldPaginate\" ' +\n 'ng-click=\"$mdTabsCtrl.nextPage()\"> ' +\n '<md-icon md-svg-src=\"'+ $$mdSvgRegistry.mdTabsArrow +'\"></md-icon> ' +\n '</md-next-button> ' +\n '<md-tabs-canvas ' +\n 'tabindex=\"{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}\" ' +\n 'ng-focus=\"$mdTabsCtrl.redirectFocus()\" ' +\n 'ng-class=\"{ ' +\n '\\'md-paginated\\': $mdTabsCtrl.shouldPaginate, ' +\n '\\'md-center-tabs\\': $mdTabsCtrl.shouldCenterTabs ' +\n '}\" ' +\n 'ng-keydown=\"$mdTabsCtrl.keydown($event)\"> ' +\n '<md-pagination-wrapper ' +\n 'ng-class=\"{ \\'md-center-tabs\\': $mdTabsCtrl.shouldCenterTabs }\" ' +\n 'md-tab-scroll=\"$mdTabsCtrl.scroll($event)\" ' +\n 'role=\"tablist\" ' +\n 'aria-label=\"{{::$mdTabsCtrl.navigationHint}}\">' +\n '<md-tab-item ' +\n 'tabindex=\"{{ tab.isActive() ? 0 : -1 }}\" ' +\n 'class=\"md-tab {{::tab.scope.tabClass}}\" ' +\n 'ng-repeat=\"tab in $mdTabsCtrl.tabs\" ' +\n 'role=\"tab\" ' +\n 'id=\"tab-item-{{::tab.id}}\" ' +\n 'md-tab-id=\"{{::tab.id}}\" ' +\n 'aria-selected=\"{{tab.isActive()}}\" ' +\n 'aria-disabled=\"{{tab.scope.disabled || \\'false\\'}}\" ' +\n 'ng-click=\"$mdTabsCtrl.select(tab.getIndex())\" ' +\n 'ng-focus=\"$mdTabsCtrl.hasFocus = true\" ' +\n 'ng-blur=\"$mdTabsCtrl.hasFocus = false\" ' +\n 'ng-class=\"{ ' +\n '\\'md-active\\': tab.isActive(), ' +\n '\\'md-focused\\': tab.hasFocus(), ' +\n '\\'md-disabled\\': tab.scope.disabled ' +\n '}\" ' +\n 'ng-disabled=\"tab.scope.disabled\" ' +\n 'md-swipe-left=\"$mdTabsCtrl.nextPage()\" ' +\n 'md-swipe-right=\"$mdTabsCtrl.previousPage()\" ' +\n 'md-tabs-template=\"::tab.label\" ' +\n 'md-scope=\"::tab.parent\"></md-tab-item> ' +\n '<md-ink-bar></md-ink-bar> ' +\n '</md-pagination-wrapper> ' +\n '<md-tabs-dummy-wrapper aria-hidden=\"true\" class=\"md-visually-hidden md-dummy-wrapper\"> ' +\n '<md-dummy-tab ' +\n 'class=\"md-tab\" ' +\n 'tabindex=\"-1\" ' +\n 'ng-focus=\"$mdTabsCtrl.hasFocus = true\" ' +\n 'ng-blur=\"$mdTabsCtrl.hasFocus = false\" ' +\n 'ng-repeat=\"tab in $mdTabsCtrl.tabs\" ' +\n 'md-tabs-template=\"::tab.label\" ' +\n 'md-scope=\"::tab.parent\"></md-dummy-tab> ' +\n '</md-tabs-dummy-wrapper> ' +\n '</md-tabs-canvas> ' +\n '</md-tabs-wrapper> ' +\n '<md-tabs-content-wrapper ng-show=\"$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0\" class=\"_md\"> ' +\n '<md-tab-content ' +\n 'id=\"{{:: $mdTabsCtrl.tabContentPrefix + tab.id}}\" ' +\n 'class=\"_md\" ' +\n 'role=\"tabpanel\" ' +\n 'aria-labelledby=\"tab-item-{{::tab.id}}\" ' +\n 'md-swipe-left=\"$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)\" ' +\n 'md-swipe-right=\"$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)\" ' +\n 'ng-if=\"tab.hasContent\" ' +\n 'ng-repeat=\"(index, tab) in $mdTabsCtrl.tabs\" ' +\n 'ng-class=\"{ ' +\n '\\'md-no-transition\\': $mdTabsCtrl.lastSelectedIndex == null, ' +\n '\\'md-active\\': tab.isActive(), ' +\n '\\'md-left\\': tab.isLeft(), ' +\n '\\'md-right\\': tab.isRight(), ' +\n '\\'md-no-scroll\\': $mdTabsCtrl.dynamicHeight ' +\n '}\"> ' +\n '<div ' +\n 'md-tabs-template=\"::tab.template\" ' +\n 'md-connected-if=\"tab.isActive()\" ' +\n 'md-scope=\"::tab.parent\" ' +\n 'ng-if=\"$mdTabsCtrl.enableDisconnect || tab.shouldRender()\"></div> ' +\n '</md-tab-content> ' +\n '</md-tabs-content-wrapper>';\n },\n controller: 'MdTabsController',\n controllerAs: '$mdTabsCtrl',\n bindToController: true\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdTabsDummyWrapper.$inject = [\"$mdUtil\", \"$window\"];angular\n .module('material.components.tabs')\n .directive('mdTabsDummyWrapper', MdTabsDummyWrapper);\n\n/**\n * @private\n *\n * @param $mdUtil\n * @param $window\n * @returns {{require: string, link: link}}\n * @constructor\n *\n * @ngInject\n */\nfunction MdTabsDummyWrapper ($mdUtil, $window) {\n return {\n require: '^?mdTabs',\n link: function link (scope, element, attr, ctrl) {\n if (!ctrl) return;\n\n var observer;\n var disconnect;\n\n var mutationCallback = function() {\n ctrl.updatePagination();\n ctrl.updateInkBarStyles();\n };\n\n if ('MutationObserver' in $window) {\n var config = {\n childList: true,\n subtree: true,\n // Per https://bugzilla.mozilla.org/show_bug.cgi?id=1138368, browsers will not fire\n // the childList mutation, once a <span> element's innerText changes.\n // The characterData of the <span> element will change.\n characterData: true\n };\n\n observer = new MutationObserver(mutationCallback);\n observer.observe(element[0], config);\n disconnect = observer.disconnect.bind(observer);\n } else {\n var debounced = $mdUtil.debounce(mutationCallback, 15, null, false);\n\n element.on('DOMSubtreeModified', debounced);\n disconnect = element.off.bind(element, 'DOMSubtreeModified', debounced);\n }\n\n // Disconnect the observer\n scope.$on('$destroy', function() {\n disconnect();\n });\n }\n };\n}\n\n})();\n(function(){\n\"use strict\";\n\n\nMdTabsTemplate.$inject = [\"$compile\", \"$mdUtil\"];angular\n .module('material.components.tabs')\n .directive('mdTabsTemplate', MdTabsTemplate);\n\nfunction MdTabsTemplate ($compile, $mdUtil) {\n return {\n restrict: 'A',\n link: link,\n scope: {\n template: '=mdTabsTemplate',\n connected: '=?mdConnectedIf',\n compileScope: '=mdScope'\n },\n require: '^?mdTabs'\n };\n function link (scope, element, attr, ctrl) {\n if (!ctrl) return;\n\n var compileScope = ctrl.enableDisconnect ? scope.compileScope.$new() : scope.compileScope;\n\n element.html(scope.template);\n $compile(element.contents())(compileScope);\n\n return $mdUtil.nextTick(handleScope);\n\n function handleScope () {\n scope.$watch('connected', function (value) { value === false ? disconnect() : reconnect(); });\n scope.$on('$destroy', reconnect);\n }\n\n function disconnect () {\n if (ctrl.enableDisconnect) $mdUtil.disconnectScope(compileScope);\n }\n\n function reconnect () {\n if (ctrl.enableDisconnect) $mdUtil.reconnectScope(compileScope);\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.toast\n * @description\n * Toast and Snackbar component.\n */\nMdToastDirective.$inject = [\"$mdToast\"];\nMdToastProvider.$inject = [\"$$interimElementProvider\"];\nangular.module('material.components.toast', [\n 'material.core',\n 'material.components.button'\n])\n .directive('mdToast', MdToastDirective)\n .provider('$mdToast', MdToastProvider);\n\n/* @ngInject */\nfunction MdToastDirective($mdToast) {\n return {\n restrict: 'E',\n link: function postLink(scope, element) {\n element.addClass('_md'); // private md component indicator for styling\n\n // When navigation force destroys an interimElement, then\n // listen and $destroy() that interim instance...\n scope.$on('$destroy', function() {\n $mdToast.destroy();\n });\n }\n };\n}\n\n/**\n * @ngdoc service\n * @name $mdToast\n * @module material.components.toast\n *\n * @description\n * `$mdToast` is a service to build a toast notification on any position\n * on the screen with an optional duration, and provides a simple promise API.\n *\n * The toast will be always positioned at the `bottom`, when the screen size is\n * between `600px` and `959px` (`sm` breakpoint)\n *\n * ## Restrictions on custom toasts\n * - The toast's template must have an outer `<md-toast>` element.\n * - For a toast action, use element with class `md-action`.\n * - Add the class `md-capsule` for curved corners.\n *\n * ### Custom Presets\n * Developers are also able to create their own preset, which can be easily used without repeating\n * their options each time.\n *\n * <hljs lang=\"js\">\n * $mdToastProvider.addPreset('testPreset', {\n * options: function() {\n * return {\n * template:\n * '<md-toast>' +\n * '<div class=\"md-toast-content\">' +\n * 'This is a custom preset' +\n * '</div>' +\n * '</md-toast>',\n * controllerAs: 'toast',\n * bindToController: true\n * };\n * }\n * });\n * </hljs>\n *\n * After you created your preset at config phase, you can easily access it.\n *\n * <hljs lang=\"js\">\n * $mdToast.show(\n * $mdToast.testPreset()\n * );\n * </hljs>\n *\n * ## Parent container notes\n *\n * The toast is positioned using absolute positioning relative to its first non-static parent\n * container. Thus, if the requested parent container uses static positioning, we will temporarily\n * set its positioning to `relative` while the toast is visible and reset it when the toast is\n * hidden.\n *\n * Because of this, it is usually best to ensure that the parent container has a fixed height and\n * prevents scrolling by setting the `overflow: hidden;` style. Since the position is based off of\n * the parent's height, the toast may be mispositioned if you allow the parent to scroll.\n *\n * You can, however, have a scrollable element inside of the container; just make sure the\n * container itself does not scroll.\n *\n * <hljs lang=\"html\">\n * <div layout-fill id=\"toast-container\">\n * <md-content>\n * I can have lots of content and scroll!\n * </md-content>\n * </div>\n * </hljs>\n *\n * @usage\n * <hljs lang=\"html\">\n * <div ng-controller=\"MyController\">\n * <md-button ng-click=\"openToast()\">\n * Open a Toast!\n * </md-button>\n * </div>\n * </hljs>\n *\n * <hljs lang=\"js\">\n * var app = angular.module('app', ['ngMaterial']);\n * app.controller('MyController', function($scope, $mdToast) {\n * $scope.openToast = function($event) {\n * $mdToast.show($mdToast.simple().textContent('Hello!'));\n * // Could also do $mdToast.showSimple('Hello');\n * };\n * });\n * </hljs>\n */\n\n/**\n * @ngdoc method\n * @name $mdToast#showSimple\n *\n * @param {string} message The message to display inside the toast\n * @description\n * Convenience method which builds and shows a simple toast.\n *\n * @returns {promise} A promise that can be resolved with `$mdToast.hide()`.\n */\n\n/**\n * @ngdoc method\n * @name $mdToast#simple\n *\n * @description\n * Builds a preconfigured toast.\n *\n * @returns {obj} a `$mdToastPreset` with the following chainable configuration methods.\n *\n * _**Note:** These configuration methods are provided in addition to the methods provided by\n * the `build()` and `show()` methods below._\n *\n * <table class=\"md-api-table methods\">\n * <thead>\n * <tr>\n * <th>Method</th>\n * <th>Description</th>\n * </tr>\n * </thead>\n * <tbody>\n * <tr>\n * <td>`.textContent(string)`</td>\n * <td>Sets the toast content to the specified string</td>\n * </tr>\n * <tr>\n * <td>`.action(string)`</td>\n * <td>\n * Adds an action button. <br/>\n * If clicked, the promise (returned from `show()`) will resolve with the value `'ok'`;\n * otherwise, it is resolved with `true` after a `hideDelay` timeout.\n * </td>\n * </tr>\n * <tr>\n * <td>`.actionKey(string)`</td>\n * <td>\n * Adds a hotkey for the action button to the page. <br/>\n * If the `actionKey` and `Control` key are pressed, the toast's action will be triggered.\n * </td>\n * </tr>\n * <tr>\n * <td>`.actionHint(string)`</td>\n * <td>\n * Text that a screen reader will announce to let the user know how to activate the\n * action. <br>\n * If an `actionKey` is defined, this defaults to:\n * 'Press Control-\"`actionKey`\" to ' followed by the `action`.\n * </td>\n * </tr>\n * <tr>\n * <td>`.dismissHint(string)`</td>\n * <td>\n * Text that a screen reader will announce to let the user know how to dismiss the toast.\n * <br>Defaults to: \"Press Escape to dismiss.\"\n * </td>\n * </tr>\n * <tr>\n * <td>`.highlightAction(boolean)`</td>\n * <td>\n * Whether or not the action button will have an additional highlight class.<br/>\n * By default the `accent` color will be applied to the action button.\n * </td>\n * </tr>\n * <tr>\n * <td>`.highlightClass(string)`</td>\n * <td>\n * If set, the given class will be applied to the highlighted action button.<br/>\n * This allows you to specify the highlight color easily. Highlight classes are\n * `md-primary`, `md-warn`, and `md-accent`\n * </td>\n * </tr>\n * <tr>\n * <td>`.capsule(boolean)`</td>\n * <td>\n * Whether or not to add the `md-capsule` class to the toast to provide rounded corners\n * </td>\n * </tr>\n * <tr>\n * <td>`.theme(string)`</td>\n * <td>\n * Sets the theme on the toast to the requested theme. Default is `$mdThemingProvider`'s\n * default.\n * </td>\n * </tr>\n * <tr>\n * <td>`.toastClass(string)`</td>\n * <td>Sets a class on the toast element</td>\n * </tr>\n * </tbody>\n * </table>\n */\n\n/**\n * @ngdoc method\n * @name $mdToast#updateTextContent\n *\n * @description\n * Updates the content of an existing toast. Useful for updating things like counts, etc.\n */\n\n/**\n * @ngdoc method\n * @name $mdToast#build\n *\n * @description\n * Creates a custom `$mdToastPreset` that you can configure.\n *\n * @returns {obj} a `$mdToastPreset` with the chainable configuration methods for shows' options\n * (see below).\n */\n\n/**\n * @ngdoc method\n * @name $mdToast#show\n *\n * @description Shows the toast.\n *\n * @param {Object} optionsOrPreset Either provide an `$mdToastPreset` returned from `simple()`\n * and `build()`, or an options object with the following properties:\n *\n * - `templateUrl` - `{string=}`: The url of an html template file that will\n * be used as the content of the toast. Restrictions: the template must\n * have an outer `md-toast` element.\n * - `template` - `{string=}`: Same as templateUrl, except this is an actual\n * template string.\n * - `autoWrap` - `{boolean=}`: Whether or not to automatically wrap the template content with a\n * `<div class=\"md-toast-content\">` if one is not provided. Defaults to true. Can be disabled\n * if you provide a custom toast directive.\n * - `scope` - `{Object=}`: the scope to link the template / controller to. If none is specified,\n * it will create a new child scope. This scope will be destroyed when the toast is removed\n * unless `preserveScope` is set to true.\n * - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed.\n * Default is false\n * - `hideDelay` - `{number=}`: The number of milliseconds the toast should stay active before\n * automatically closing. Set to `0` or `false` to have the toast stay open until closed\n * manually via an action in the toast, a hotkey, or a swipe gesture. For accessibility, toasts\n * should not automatically close when they contain an action.<br>\n * Defaults to: `3000`.\n * - `position` - `{string=}`: Sets the position of the toast. <br/>\n * Available: any combination of `'bottom'`, `'left'`, `'top'`, `'right'`, `'end'`, and\n * `'start'`. The properties `'end'` and `'start'` are dynamic and can be used for RTL support.\n * <br/>\n * Default combination: `'bottom left'`.\n * - `toastClass` - `{string=}`: A class to set on the toast element.\n * - `controller` - `{string=}`: The controller to associate with this toast.\n * The controller will be injected the local `$mdToast.hide()`, which is a function\n * used to hide the toast.\n * - `locals` - `{Object=}`: An object containing key/value pairs. The keys will be used as names\n * of values to inject into the controller. For example, `locals: {three: 3}` would inject\n * `three` into the controller with the value of 3.\n * - `bindToController` - `{boolean=}`: bind the locals to the controller, instead of passing\n * them in.\n * - `resolve` - `{Object=}`: Similar to locals, except it takes promises as values\n * and the toast will not open until the promises resolve.\n * - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope.\n * - `parent` - `{element=}`: The element to append the toast to. Defaults to appending\n * to the root element of the application.\n *\n * @returns {promise} A promise that can be resolved with `$mdToast.hide()`. `$mdToast.hide()` will\n * resolve either with the boolean value `true` or the value passed as an argument to\n * `$mdToast.hide()`.\n */\n\n/**\n * @ngdoc method\n * @name $mdToast#hide\n *\n * @description\n * Hide an existing toast and resolve the promise returned from `$mdToast.show()`.\n *\n * @param {*=} response An argument for the resolved promise.\n *\n * @returns {promise} A promise that is called when the existing element is removed from the DOM.\n * The promise is resolved with either the Boolean value `true` or the value passed as the\n * argument to `$mdToast.hide()`.\n */\n\nfunction MdToastProvider($$interimElementProvider) {\n // Differentiate promise resolves: hide timeout (value == true) and hide action clicks\n // (value == ok).\n MdToastController.$inject = [\"$mdToast\", \"$scope\", \"$log\"];\n toastDefaultOptions.$inject = [\"$animate\", \"$mdToast\", \"$mdUtil\", \"$mdMedia\", \"$document\", \"$q\"];\n var ACTION_RESOLVE = 'ok';\n\n var activeToastContent;\n var $mdToast = $$interimElementProvider('$mdToast')\n .setDefaults({\n methods: ['position', 'hideDelay', 'capsule', 'parent', 'position', 'toastClass'],\n options: toastDefaultOptions\n })\n .addPreset('simple', {\n argOption: 'textContent',\n methods: ['textContent', 'action', 'actionKey', 'actionHint', 'highlightAction',\n 'highlightClass', 'theme', 'parent', 'dismissHint'],\n options: /* @ngInject */ [\"$mdToast\", \"$mdTheming\", function($mdToast, $mdTheming) {\n return {\n template:\n '<md-toast md-theme=\"{{ toast.theme }}\" ng-class=\"{\\'md-capsule\\': toast.capsule}\">' +\n ' <div class=\"md-toast-content\" aria-live=\"polite\" aria-relevant=\"all\">' +\n ' <span class=\"md-toast-text\">' +\n ' {{ toast.content }}' +\n ' </span>' +\n ' <span class=\"md-visually-hidden\">{{ toast.dismissHint }}</span>' +\n ' <span class=\"md-visually-hidden\" ng-if=\"toast.action && toast.actionKey\">' +\n ' {{ toast.actionHint }}' +\n ' </span>' +\n ' <md-button class=\"md-action\" ng-if=\"toast.action\" ng-click=\"toast.resolve()\" ' +\n ' ng-class=\"highlightClasses\">' +\n ' {{ toast.action }}' +\n ' </md-button>' +\n ' </div>' +\n '</md-toast>',\n controller: MdToastController,\n theme: $mdTheming.defaultTheme(),\n controllerAs: 'toast',\n bindToController: true\n };\n }]\n })\n .addMethod('updateTextContent', updateTextContent);\n\n function updateTextContent(newContent) {\n activeToastContent = newContent;\n }\n\n return $mdToast;\n\n /**\n * Controller for the Toast interim elements.\n * @ngInject\n */\n function MdToastController($mdToast, $scope, $log) {\n // For compatibility with AngularJS 1.6+, we should always use the $onInit hook in\n // interimElements. The $mdCompiler simulates the $onInit hook for all versions.\n this.$onInit = function() {\n var self = this;\n\n if (self.highlightAction) {\n $scope.highlightClasses = [\n 'md-highlight',\n self.highlightClass\n ];\n }\n\n // If an action is defined and no actionKey is specified, then log a warning.\n if (self.action && !self.actionKey) {\n $log.warn('Toasts with actions should define an actionKey for accessibility.',\n 'Details: https://material.angularjs.org/latest/api/service/$mdToast#mdtoast-simple');\n }\n\n if (self.actionKey && !self.actionHint) {\n self.actionHint = 'Press Control-\"' + self.actionKey + '\" to ';\n }\n\n if (!self.dismissHint) {\n self.dismissHint = 'Press Escape to dismiss.';\n }\n\n $scope.$watch(function() { return activeToastContent; }, function() {\n self.content = activeToastContent;\n });\n\n this.resolve = function() {\n $mdToast.hide(ACTION_RESOLVE);\n };\n };\n }\n\n /* @ngInject */\n function toastDefaultOptions($animate, $mdToast, $mdUtil, $mdMedia, $document, $q) {\n var SWIPE_EVENTS = '$md.swipeleft $md.swiperight $md.swipeup $md.swipedown';\n return {\n onShow: onShow,\n onRemove: onRemove,\n toastClass: '',\n position: 'bottom left',\n themable: true,\n hideDelay: 3000,\n autoWrap: true,\n transformTemplate: function(template, options) {\n var shouldAddWrapper = options.autoWrap && template && !/md-toast-content/g.test(template);\n\n if (shouldAddWrapper) {\n // Root element of template will be <md-toast>. We need to wrap all of its content inside\n // of <div class=\"md-toast-content\">. All templates provided here should be static,\n // developer-controlled content (meaning we're not attempting to guard against XSS).\n var templateRoot = document.createElement('md-template');\n templateRoot.innerHTML = template;\n\n // Iterate through all root children, to detect possible md-toast directives.\n for (var i = 0; i < templateRoot.children.length; i++) {\n if (templateRoot.children[i].nodeName === 'MD-TOAST') {\n var wrapper = angular.element('<div class=\"md-toast-content\">');\n\n // Wrap the children of the `md-toast` directive in jqLite, to be able to append\n // multiple nodes with the same execution.\n wrapper.append(angular.element(templateRoot.children[i].childNodes));\n\n // Append the new wrapped element to the `md-toast` directive.\n templateRoot.children[i].appendChild(wrapper[0]);\n }\n }\n\n // We have to return the innerHTML, because we do not want to have the `md-template`\n // element to be the root element of our interimElement.\n return templateRoot.innerHTML;\n }\n\n return template || '';\n }\n };\n\n /**\n * @param {{toast: {actionKey: string=}}=} scope\n * @param {JQLite} element\n * @param {Object.<string, string>} options\n * @return {*}\n */\n function onShow(scope, element, options) {\n activeToastContent = options.textContent;\n\n var isSmScreen = !$mdMedia('gt-sm');\n\n element = $mdUtil.extractElementByName(element, 'md-toast', true);\n options.element = element;\n\n options.onSwipe = function(ev) {\n // Add the relevant swipe class to the element so it can animate correctly\n var swipe = ev.type.replace('$md.','');\n var direction = swipe.replace('swipe', '');\n\n // If the swipe direction is down/up but the toast came from top/bottom don't fade away\n // Unless the screen is small, then the toast always on bottom\n if ((direction === 'down' && options.position.indexOf('top') !== -1 && !isSmScreen) ||\n (direction === 'up' && (options.position.indexOf('bottom') !== -1 || isSmScreen))) {\n return;\n }\n\n if ((direction === 'left' || direction === 'right') && isSmScreen) {\n return;\n }\n\n element.addClass('md-' + swipe);\n $mdUtil.nextTick($mdToast.cancel);\n };\n options.openClass = toastOpenClass(options.position);\n\n element.addClass(options.toastClass);\n\n // 'top left' -> 'md-top md-left'\n options.parent.addClass(options.openClass);\n\n // static is the default position\n if ($mdUtil.hasComputedStyle(options.parent, 'position', 'static')) {\n options.parent.css('position', 'relative');\n }\n\n setupActionKeyListener(scope.toast && scope.toast.actionKey ?\n scope.toast.actionKey : undefined);\n\n element.on(SWIPE_EVENTS, options.onSwipe);\n\n var verticalPositionDefined = false;\n var positionClasses = options.position.split(' ').map(function (position) {\n if (position) {\n var className = 'md-' + position;\n if (className === 'md-top' || className === 'md-bottom') {\n verticalPositionDefined = true;\n }\n return className;\n }\n return 'md-bottom';\n });\n // If only \"right\" or \"left\" are defined, default to a vertical position of \"bottom\"\n // as documented.\n if (!verticalPositionDefined) {\n positionClasses.push('md-bottom');\n }\n element.addClass(isSmScreen ? 'md-bottom' : positionClasses.join(' '));\n\n if (options.parent) {\n options.parent.addClass('md-toast-animating');\n }\n return $animate.enter(element, options.parent).then(function() {\n if (options.parent) {\n options.parent.removeClass('md-toast-animating');\n }\n });\n }\n\n /**\n * @param {Object} scope the toast's scope\n * @param {JQLite} element the toast to be removed\n * @param {Object} options\n * @return {Promise<*>} a Promise to remove the element immediately or to animate it out.\n */\n function onRemove(scope, element, options) {\n if (scope.toast && scope.toast.actionKey) {\n removeActionKeyListener();\n }\n element.off(SWIPE_EVENTS, options.onSwipe);\n if (options.parent) options.parent.addClass('md-toast-animating');\n if (options.openClass) options.parent.removeClass(options.openClass);\n\n // Don't run the leave animation if the element has already been destroyed.\n return ((options.$destroy === true) ? $q.when(element.remove()) : $animate.leave(element))\n .then(function () {\n if (options.parent) options.parent.removeClass('md-toast-animating');\n if ($mdUtil.hasComputedStyle(options.parent, 'position', 'static')) {\n options.parent.css('position', '');\n }\n });\n }\n\n function toastOpenClass(position) {\n // For mobile, always open full-width on bottom\n if (!$mdMedia('gt-xs')) {\n return 'md-toast-open-bottom';\n }\n\n return 'md-toast-open-' + (position.indexOf('top') > -1 ? 'top' : 'bottom');\n }\n\n /**\n * @param {string} actionKey\n */\n function setupActionKeyListener(actionKey) {\n /**\n * @param {KeyboardEvent} event\n */\n var handleKeyDown = function(event) {\n if (event.key === 'Escape') {\n $mdToast.hide(false);\n }\n if (actionKey && event.key === actionKey && event.ctrlKey) {\n $mdToast.hide(ACTION_RESOLVE);\n }\n };\n $document.on('keydown', handleKeyDown);\n }\n\n function removeActionKeyListener() {\n $document.off('keydown');\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.toolbar\n */\nmdToolbarDirective.$inject = [\"$$rAF\", \"$mdConstant\", \"$mdUtil\", \"$mdTheming\", \"$animate\", \"$timeout\"];\nangular.module('material.components.toolbar', [\n 'material.core',\n 'material.components.content'\n])\n .directive('mdToolbar', mdToolbarDirective);\n\n/**\n * @ngdoc directive\n * @name mdToolbar\n * @module material.components.toolbar\n * @restrict E\n * @description\n * `md-toolbar` is used to place a toolbar in your app.\n *\n * Toolbars are usually used above a content area to display the title of the\n * current page, and show relevant action buttons for that page.\n *\n * You can change the height of the toolbar by adding either the\n * `md-medium-tall` or `md-tall` class to the toolbar.\n *\n * @usage\n * <hljs lang=\"html\">\n * <div layout=\"column\" layout-fill>\n * <md-toolbar>\n *\n * <div class=\"md-toolbar-tools\">\n * <h2 md-truncate flex>My App's Title</h2>\n *\n * <md-button>\n * Right Bar Button\n * </md-button>\n * </div>\n *\n * </md-toolbar>\n * <md-content>\n * Hello!\n * </md-content>\n * </div>\n * </hljs>\n *\n * <i><b>Note:</b> The code above shows usage with the `md-truncate` component which provides an\n * ellipsis if the title is longer than the width of the Toolbar.</i>\n *\n * ## CSS & Styles\n *\n * The `<md-toolbar>` provides a few custom CSS classes that you may use to enhance the\n * functionality of your toolbar.\n *\n * <div>\n * <docs-css-api-table>\n *\n * <docs-css-selector code=\"md-toolbar .md-toolbar-tools\">\n * The `md-toolbar-tools` class provides quite a bit of automatic styling for your toolbar\n * buttons and text. When applied, it will center the buttons and text vertically for you.\n * </docs-css-selector>\n *\n * </docs-css-api-table>\n * </div>\n *\n * ### Private Classes\n *\n * Currently, the only private class is the `md-toolbar-transitions` class. All other classes are\n * considered public.\n *\n * @param {boolean=} md-scroll-shrink Whether the header should shrink away as\n * the user scrolls down, and reveal itself as the user scrolls up.\n *\n * _**Note (1):** for scrollShrink to work, the toolbar must be a sibling of a\n * `md-content` element, placed before it. See the scroll shrink demo._\n *\n * _**Note (2):** The `md-scroll-shrink` attribute is only parsed on component\n * initialization, it does not watch for scope changes._\n *\n *\n * @param {number=} md-shrink-speed-factor How much to change the speed of the toolbar's\n * shrinking by. For example, if 0.25 is given then the toolbar will shrink\n * at one fourth the rate at which the user scrolls down. Default 0.5.\n *\n */\n\nfunction mdToolbarDirective($$rAF, $mdConstant, $mdUtil, $mdTheming, $animate, $timeout) {\n var translateY = angular.bind(null, $mdUtil.supplant, 'translate3d(0,{0}px,0)');\n\n return {\n template: '',\n restrict: 'E',\n\n link: function(scope, element, attr) {\n\n element.addClass('_md'); // private md component indicator for styling\n $mdTheming(element);\n\n $mdUtil.nextTick(function () {\n element.addClass('_md-toolbar-transitions'); // adding toolbar transitions after digest\n }, false);\n\n if (angular.isDefined(attr.mdScrollShrink)) {\n setupScrollShrink();\n }\n\n function setupScrollShrink() {\n\n var toolbarHeight;\n var contentElement;\n var disableScrollShrink = angular.noop;\n\n // Current \"y\" position of scroll\n // Store the last scroll top position\n var y = 0;\n var prevScrollTop = 0;\n var shrinkSpeedFactor = attr.mdShrinkSpeedFactor || 0.5;\n\n var debouncedContentScroll = $$rAF.throttle(onContentScroll);\n var debouncedUpdateHeight = $mdUtil.debounce(updateToolbarHeight, 5 * 1000);\n\n // Wait for $mdContentLoaded event from mdContent directive.\n // If the mdContent element is a sibling of our toolbar, hook it up\n // to scroll events.\n\n scope.$on('$mdContentLoaded', onMdContentLoad);\n\n // If the toolbar is used inside an ng-if statement, we may miss the\n // $mdContentLoaded event, so we attempt to fake it if we have a\n // md-content close enough.\n\n attr.$observe('mdScrollShrink', onChangeScrollShrink);\n\n // If the toolbar has ngShow or ngHide we need to update height immediately as it changed\n // and not wait for $mdUtil.debounce to happen\n\n if (attr.ngShow) { scope.$watch(attr.ngShow, updateToolbarHeight); }\n if (attr.ngHide) { scope.$watch(attr.ngHide, updateToolbarHeight); }\n\n // If the scope is destroyed (which could happen with ng-if), make sure\n // to disable scroll shrinking again\n\n scope.$on('$destroy', disableScrollShrink);\n\n /**\n * @param {string} shrinkWithScroll value of md-scroll-shrink attribute\n */\n function onChangeScrollShrink(shrinkWithScroll) {\n var closestContent = $mdUtil.getSiblings(element, 'md-content');\n\n // If there are content elements, fake the call using the first content element.\n // This might still fail if the content element isn't a sibling of the toolbar.\n if (!contentElement && closestContent.length) {\n onMdContentLoad(null, closestContent[0]);\n }\n\n // Evaluate the expression\n shrinkWithScroll = scope.$eval(shrinkWithScroll);\n\n // Disable only if the attribute's expression evaluates to false\n if (shrinkWithScroll === false) {\n disableScrollShrink();\n } else {\n disableScrollShrink = enableScrollShrink();\n }\n }\n\n /**\n * @param {null} $event $mdContentLoaded always has a null event\n * @param {JQLite} newContentEl JQLite object containing an md-content\n */\n function onMdContentLoad($event, newContentEl) {\n // Toolbar and content must be siblings\n if (newContentEl && element.parent()[0] === newContentEl.parent()[0]) {\n // unhook old content event listener if exists\n if (contentElement) {\n contentElement.off('scroll', debouncedContentScroll);\n }\n\n contentElement = newContentEl;\n disableScrollShrink = enableScrollShrink();\n }\n }\n\n /**\n *\n */\n function onContentScroll(e) {\n var scrollTop = e ? e.target.scrollTop : prevScrollTop;\n\n debouncedUpdateHeight();\n\n y = Math.min(\n toolbarHeight / shrinkSpeedFactor,\n Math.max(0, y + scrollTop - prevScrollTop)\n );\n\n element.css($mdConstant.CSS.TRANSFORM, translateY([-y * shrinkSpeedFactor]));\n contentElement.css($mdConstant.CSS.TRANSFORM, translateY([(toolbarHeight - y) * shrinkSpeedFactor]));\n\n prevScrollTop = scrollTop;\n\n $mdUtil.nextTick(function() {\n var hasWhiteFrame = element.hasClass('md-whiteframe-z1');\n\n if (hasWhiteFrame && !y) {\n $animate.removeClass(element, 'md-whiteframe-z1');\n } else if (!hasWhiteFrame && y) {\n $animate.addClass(element, 'md-whiteframe-z1');\n }\n });\n\n }\n\n /**\n *\n */\n function enableScrollShrink() {\n if (!contentElement) return angular.noop; // no md-content\n\n contentElement.on('scroll', debouncedContentScroll);\n contentElement.attr('scroll-shrink', 'true');\n\n $timeout(updateToolbarHeight);\n\n return function disableScrollShrink() {\n contentElement.off('scroll', debouncedContentScroll);\n contentElement.attr('scroll-shrink', 'false');\n\n updateToolbarHeight();\n };\n }\n\n /**\n *\n */\n function updateToolbarHeight() {\n toolbarHeight = element.prop('offsetHeight');\n // Add a negative margin-top the size of the toolbar to the content el.\n // The content will start transformed down the toolbarHeight amount,\n // so everything looks normal.\n //\n // As the user scrolls down, the content will be transformed up slowly\n // to put the content underneath where the toolbar was.\n var margin = (-toolbarHeight * shrinkSpeedFactor) + 'px';\n\n contentElement.css({\n \"margin-top\": margin,\n \"margin-bottom\": margin\n });\n\n onContentScroll();\n }\n\n }\n\n }\n };\n\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.tooltip\n */\nMdTooltipDirective.$inject = [\"$timeout\", \"$window\", \"$$rAF\", \"$document\", \"$interpolate\", \"$mdUtil\", \"$mdPanel\", \"$$mdTooltipRegistry\"];\nangular\n .module('material.components.tooltip', [\n 'material.core',\n 'material.components.panel'\n ])\n .directive('mdTooltip', MdTooltipDirective)\n .service('$$mdTooltipRegistry', MdTooltipRegistry);\n\n\n/**\n * @ngdoc directive\n * @name mdTooltip\n * @module material.components.tooltip\n * @description\n * Tooltips are used to describe elements that are interactive and primarily\n * graphical (not textual).\n *\n * Place a `<md-tooltip>` as a child of the element it describes.\n *\n * A tooltip will activate when the user hovers over, focuses, or touches the\n * parent element.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-button class=\"md-fab md-accent\" aria-label=\"Play\">\n * <md-tooltip>Play Music</md-tooltip>\n * <md-icon md-svg-src=\"img/icons/ic_play_arrow_24px.svg\"></md-icon>\n * </md-button>\n * </hljs>\n *\n * @param {number=} md-z-index The visual level that the tooltip will appear\n * in comparison with the rest of the elements of the application.\n * @param {expression=} md-visible Boolean bound to whether the tooltip is\n * currently visible.\n * @param {number=} md-delay How many milliseconds to wait to show the tooltip\n * after the user hovers over, focuses, or touches the parent element.\n * Defaults to 0ms on non-touch devices and 75ms on touch.\n * @param {boolean=} md-autohide If present or provided with a boolean value,\n * the tooltip will hide on mouse leave, regardless of focus.\n * @param {string=} md-direction The direction that the tooltip is shown,\n * relative to the parent element. Supports top, right, bottom, and left.\n * Defaults to bottom.\n */\nfunction MdTooltipDirective($timeout, $window, $$rAF, $document, $interpolate,\n $mdUtil, $mdPanel, $$mdTooltipRegistry) {\n\n var ENTER_EVENTS = 'focus touchstart mouseenter';\n var LEAVE_EVENTS = 'blur touchcancel mouseleave';\n var TOOLTIP_DEFAULT_Z_INDEX = 100;\n var TOOLTIP_DEFAULT_SHOW_DELAY = 0;\n var TOOLTIP_DEFAULT_DIRECTION = 'bottom';\n var TOOLTIP_DIRECTIONS = {\n top: { x: $mdPanel.xPosition.CENTER, y: $mdPanel.yPosition.ABOVE },\n right: { x: $mdPanel.xPosition.OFFSET_END, y: $mdPanel.yPosition.CENTER },\n bottom: { x: $mdPanel.xPosition.CENTER, y: $mdPanel.yPosition.BELOW },\n left: { x: $mdPanel.xPosition.OFFSET_START, y: $mdPanel.yPosition.CENTER }\n };\n\n return {\n restrict: 'E',\n priority: 210, // Before ngAria\n scope: {\n mdZIndex: '=?mdZIndex',\n mdDelay: '=?mdDelay',\n mdVisible: '=?mdVisible',\n mdAutohide: '=?mdAutohide',\n mdDirection: '@?mdDirection' // Do not expect expressions.\n },\n link: linkFunc\n };\n\n function linkFunc(scope, element, attr) {\n // Set constants.\n var tooltipId = 'md-tooltip-' + $mdUtil.nextUid();\n var parent = $mdUtil.getParentWithPointerEvents(element);\n var debouncedOnResize = $$rAF.throttle(updatePosition);\n var mouseActive = false;\n var origin, position, panelPosition, panelRef, autohide, showTimeout,\n elementFocusedOnWindowBlur = null;\n\n // Set defaults\n setDefaults();\n\n // Set parent aria-label.\n addAriaLabel();\n\n // Remove the element from its current DOM position.\n element.detach();\n\n updatePosition();\n bindEvents();\n configureWatchers();\n\n function setDefaults() {\n scope.mdZIndex = scope.mdZIndex || TOOLTIP_DEFAULT_Z_INDEX;\n scope.mdDelay = scope.mdDelay || TOOLTIP_DEFAULT_SHOW_DELAY;\n if (!TOOLTIP_DIRECTIONS[scope.mdDirection]) {\n scope.mdDirection = TOOLTIP_DEFAULT_DIRECTION;\n }\n }\n\n function addAriaLabel(labelText) {\n // Only interpolate the text from the HTML element because otherwise the custom text could\n // be interpolated twice and cause XSS violations.\n var interpolatedText = labelText || $interpolate(element.text().trim())(scope.$parent);\n\n // Only add the `aria-label` to the parent if there isn't already one, if there isn't an\n // already present `aria-labelledby`, or if the previous `aria-label` was added by the\n // tooltip directive.\n if (\n (!parent.attr('aria-label') && !parent.attr('aria-labelledby')) ||\n parent.attr('md-labeled-by-tooltip')\n ) {\n parent.attr('aria-label', interpolatedText);\n\n // Set the `md-labeled-by-tooltip` attribute if it has not already been set.\n if (!parent.attr('md-labeled-by-tooltip')) {\n parent.attr('md-labeled-by-tooltip', tooltipId);\n }\n }\n }\n\n function updatePosition() {\n setDefaults();\n\n // If the panel has already been created, remove the current origin\n // class from the panel element.\n if (panelRef && panelRef.panelEl) {\n panelRef.panelEl.removeClass(origin);\n }\n\n // Set the panel element origin class based off of the current\n // mdDirection.\n origin = 'md-origin-' + scope.mdDirection;\n\n // Create the position of the panel based off of the mdDirection.\n position = TOOLTIP_DIRECTIONS[scope.mdDirection];\n\n // Using the newly created position object, use the MdPanel\n // panelPosition API to build the panel's position.\n panelPosition = $mdPanel.newPanelPosition()\n .relativeTo(parent)\n .addPanelPosition(position.x, position.y);\n\n // If the panel has already been created, add the new origin class to\n // the panel element and update it's position with the panelPosition.\n if (panelRef && panelRef.panelEl) {\n panelRef.panelEl.addClass(origin);\n panelRef.updatePosition(panelPosition);\n }\n }\n\n function bindEvents() {\n // Add a mutationObserver where there is support for it and the need\n // for it in the form of viable host(parent[0]).\n if (parent[0] && 'MutationObserver' in $window) {\n // Use a mutationObserver to tackle #2602.\n var attributeObserver = new MutationObserver(function(mutations) {\n if (isDisabledMutation(mutations)) {\n $mdUtil.nextTick(function() {\n setVisible(false);\n });\n }\n });\n\n attributeObserver.observe(parent[0], {\n attributes: true\n });\n }\n\n elementFocusedOnWindowBlur = false;\n\n $$mdTooltipRegistry.register('scroll', windowScrollEventHandler, true);\n $$mdTooltipRegistry.register('blur', windowBlurEventHandler);\n $$mdTooltipRegistry.register('resize', debouncedOnResize);\n\n scope.$on('$destroy', onDestroy);\n\n // To avoid 'synthetic clicks', we listen to mousedown instead of\n // 'click'.\n parent.on('mousedown', mousedownEventHandler);\n parent.on(ENTER_EVENTS, enterEventHandler);\n\n function isDisabledMutation(mutations) {\n mutations.some(function(mutation) {\n return mutation.attributeName === 'disabled' && parent[0].disabled;\n });\n return false;\n }\n\n function windowScrollEventHandler() {\n setVisible(false);\n }\n\n function windowBlurEventHandler() {\n elementFocusedOnWindowBlur = document.activeElement === parent[0];\n }\n\n function enterEventHandler($event) {\n // Prevent the tooltip from showing when the window is receiving\n // focus.\n if ($event.type === 'focus' && elementFocusedOnWindowBlur) {\n elementFocusedOnWindowBlur = false;\n } else if (!scope.mdVisible) {\n parent.on(LEAVE_EVENTS, leaveEventHandler);\n setVisible(true);\n\n // If the user is on a touch device, we should bind the tap away\n // after the 'touched' in order to prevent the tooltip being\n // removed immediately.\n if ($event.type === 'touchstart') {\n parent.one('touchend', function() {\n $mdUtil.nextTick(function() {\n $document.one('touchend', leaveEventHandler);\n }, false);\n });\n }\n }\n }\n\n function leaveEventHandler() {\n autohide = scope.hasOwnProperty('mdAutohide') ?\n scope.mdAutohide :\n attr.hasOwnProperty('mdAutohide');\n\n if (autohide || mouseActive ||\n $document[0].activeElement !== parent[0]) {\n // When a show timeout is currently in progress, then we have\n // to cancel it, otherwise the tooltip will remain showing\n // without focus or hover.\n if (showTimeout) {\n $timeout.cancel(showTimeout);\n setVisible.queued = false;\n showTimeout = null;\n }\n\n parent.off(LEAVE_EVENTS, leaveEventHandler);\n parent.triggerHandler('blur');\n setVisible(false);\n }\n mouseActive = false;\n }\n\n function mousedownEventHandler() {\n mouseActive = true;\n }\n\n function onDestroy() {\n $$mdTooltipRegistry.deregister('scroll', windowScrollEventHandler, true);\n $$mdTooltipRegistry.deregister('blur', windowBlurEventHandler);\n $$mdTooltipRegistry.deregister('resize', debouncedOnResize);\n\n parent\n .off(ENTER_EVENTS, enterEventHandler)\n .off(LEAVE_EVENTS, leaveEventHandler)\n .off('mousedown', mousedownEventHandler);\n\n // Trigger the handler in case any of the tooltips are\n // still visible.\n leaveEventHandler();\n attributeObserver && attributeObserver.disconnect();\n }\n }\n\n function configureWatchers() {\n if (element[0] && 'MutationObserver' in $window) {\n var attributeObserver = new MutationObserver(function(mutations) {\n mutations.forEach(function(mutation) {\n if (mutation.attributeName === 'md-visible' &&\n !scope.visibleWatcher) {\n scope.visibleWatcher = scope.$watch('mdVisible',\n onVisibleChanged);\n }\n });\n });\n\n attributeObserver.observe(element[0], {\n attributes: true\n });\n\n // Build watcher only if mdVisible is being used.\n if (attr.hasOwnProperty('mdVisible')) {\n scope.visibleWatcher = scope.$watch('mdVisible',\n onVisibleChanged);\n }\n } else {\n // MutationObserver not supported\n scope.visibleWatcher = scope.$watch('mdVisible', onVisibleChanged);\n }\n\n // Direction watcher\n scope.$watch('mdDirection', updatePosition);\n\n // Clean up if the element or parent was removed via jqLite's .remove.\n // A couple of notes:\n // - In these cases the scope might not have been destroyed, which\n // is why we destroy it manually. An example of this can be having\n // `md-visible=\"false\"` and adding tooltips while they're\n // invisible. If `md-visible` becomes true, at some point, you'd\n // usually get a lot of tooltips.\n // - We use `.one`, not `.on`, because this only needs to fire once.\n // If we were using `.on`, it would get thrown into an infinite\n // loop.\n // - This kicks off the scope's `$destroy` event which finishes the\n // cleanup.\n element.one('$destroy', onElementDestroy);\n parent.one('$destroy', onElementDestroy);\n scope.$on('$destroy', function() {\n setVisible(false);\n panelRef && panelRef.destroy();\n attributeObserver && attributeObserver.disconnect();\n element.remove();\n });\n\n // Updates the aria-label when the element text changes. This watch\n // doesn't need to be set up if the element doesn't have any data\n // bindings.\n if (element.text().indexOf($interpolate.startSymbol()) > -1) {\n scope.$watch(function() {\n return element.text().trim();\n }, addAriaLabel);\n }\n\n function onElementDestroy() {\n scope.$destroy();\n }\n }\n\n function setVisible(value) {\n // Break if passed value is already in queue or there is no queue and\n // passed value is current in the controller.\n if (setVisible.queued && setVisible.value === !!value ||\n !setVisible.queued && scope.mdVisible === !!value) {\n return;\n }\n setVisible.value = !!value;\n\n if (!setVisible.queued) {\n if (value) {\n setVisible.queued = true;\n showTimeout = $timeout(function() {\n scope.mdVisible = setVisible.value;\n setVisible.queued = false;\n showTimeout = null;\n if (!scope.visibleWatcher) {\n onVisibleChanged(scope.mdVisible);\n }\n }, scope.mdDelay);\n } else {\n $mdUtil.nextTick(function() {\n scope.mdVisible = false;\n if (!scope.visibleWatcher) {\n onVisibleChanged(false);\n }\n });\n }\n }\n }\n\n function onVisibleChanged(isVisible) {\n isVisible ? showTooltip() : hideTooltip();\n }\n\n function showTooltip() {\n // Do not show the tooltip if the text is empty.\n if (!element[0].textContent.trim()) {\n throw new Error('Text for the tooltip has not been provided. ' +\n 'Please include text within the mdTooltip element.');\n }\n\n if (!panelRef) {\n var attachTo = angular.element(document.body);\n var panelAnimation = $mdPanel.newPanelAnimation()\n .openFrom(parent)\n .closeTo(parent)\n .withAnimation({\n open: 'md-show',\n close: 'md-hide'\n });\n\n var panelConfig = {\n id: tooltipId,\n attachTo: attachTo,\n contentElement: element,\n propagateContainerEvents: true,\n panelClass: 'md-tooltip',\n animation: panelAnimation,\n position: panelPosition,\n zIndex: scope.mdZIndex,\n focusOnOpen: false,\n onDomAdded: function() {\n panelRef.panelEl.addClass(origin);\n }\n };\n\n panelRef = $mdPanel.create(panelConfig);\n }\n\n panelRef.open().then(function() {\n panelRef.panelEl.attr('role', 'tooltip');\n });\n }\n\n function hideTooltip() {\n panelRef && panelRef.close();\n }\n }\n\n}\n\n\n/**\n * Service that is used to reduce the amount of listeners that are being\n * registered on the `window` by the tooltip component. Works by collecting\n * the individual event handlers and dispatching them from a global handler.\n *\n * @ngInject\n */\nfunction MdTooltipRegistry() {\n var listeners = {};\n var ngWindow = angular.element(window);\n\n return {\n register: register,\n deregister: deregister\n };\n\n /**\n * Global event handler that dispatches the registered handlers in the\n * service.\n * @param {!Event} event Event object passed in by the browser\n */\n function globalEventHandler(event) {\n if (listeners[event.type]) {\n listeners[event.type].forEach(function(currentHandler) {\n currentHandler.call(this, event);\n }, this);\n }\n }\n\n /**\n * Registers a new handler with the service.\n * @param {string} type Type of event to be registered.\n * @param {!Function} handler Event handler.\n * @param {boolean} useCapture Whether to use event capturing.\n */\n function register(type, handler, useCapture) {\n var handlers = listeners[type] = listeners[type] || [];\n\n if (!handlers.length) {\n useCapture ? window.addEventListener(type, globalEventHandler, true) :\n ngWindow.on(type, globalEventHandler);\n }\n\n if (handlers.indexOf(handler) === -1) {\n handlers.push(handler);\n }\n }\n\n /**\n * Removes an event handler from the service.\n * @param {string} type Type of event handler.\n * @param {!Function} handler The event handler itself.\n * @param {boolean} useCapture Whether the event handler used event capturing.\n */\n function deregister(type, handler, useCapture) {\n var handlers = listeners[type];\n var index = handlers ? handlers.indexOf(handler) : -1;\n\n if (index > -1) {\n handlers.splice(index, 1);\n\n if (handlers.length === 0) {\n useCapture ? window.removeEventListener(type, globalEventHandler, true) :\n ngWindow.off(type, globalEventHandler);\n }\n }\n }\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.truncate\n */\nMdTruncateController.$inject = [\"$element\"];\nangular.module('material.components.truncate', ['material.core'])\n .directive('mdTruncate', MdTruncateDirective);\n\n/**\n * @ngdoc directive\n * @name mdTruncate\n * @module material.components.truncate\n * @restrict AE\n * @description\n *\n * The `md-truncate` component displays a label that will automatically clip text which is wider\n * than the component. By default, it displays an ellipsis, but you may apply the `md-clip` CSS\n * class to override this default and use a standard \"clipping\" approach.\n *\n * <i><b>Note:</b> The `md-truncate` component does not automatically adjust it's width. You must\n * provide the `flex` attribute, or some other CSS-based width management. See the\n * <a ng-href=\"./demo/truncate\">demos</a> for examples.</i>\n *\n * @usage\n *\n * ### As an Element\n *\n * <hljs lang=\"html\">\n * <div layout=\"row\">\n * <md-button>Back</md-button>\n *\n * <md-truncate flex>Chapter 1 - The Way of the Old West</md-truncate>\n *\n * <md-button>Forward</md-button>\n * </div>\n * </hljs>\n *\n * ### As an Attribute\n *\n * <hljs lang=\"html\">\n * <h2 md-truncate style=\"max-width: 100px;\">Some Title With a Lot of Text</h2>\n * </hljs>\n *\n * ## CSS & Styles\n *\n * `<md-truncate>` provides two CSS classes that you may use to control the type of clipping.\n *\n * <i><b>Note:</b> The `md-truncate` also applies a setting of `width: 0;` when used with the `flex`\n * attribute to fix an issue with the flex element not shrinking properly.</i>\n *\n * <div>\n * <docs-css-api-table>\n *\n * <docs-css-selector code=\".md-ellipsis\">\n * Assigns the \"ellipsis\" behavior (default) which will cut off mid-word and append an ellipsis\n * (…) to the end of the text.\n * </docs-css-selector>\n *\n * <docs-css-selector code=\".md-clip\">\n * Assigns the \"clipping\" behavior which will simply chop off the text. This may happen\n * mid-word or even mid-character.\n * </docs-css-selector>\n *\n * </docs-css-api-table>\n * </div>\n */\nfunction MdTruncateDirective() {\n return {\n restrict: 'AE',\n\n controller: MdTruncateController\n };\n}\n\n/**\n * Controller for the <md-truncate> component.\n *\n * @param $element The md-truncate element.\n *\n * @constructor\n * @ngInject\n */\nfunction MdTruncateController($element) {\n $element.addClass('md-truncate');\n}\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.virtualRepeat\n */\nVirtualRepeatContainerController.$inject = [\"$$rAF\", \"$mdUtil\", \"$mdConstant\", \"$parse\", \"$rootScope\", \"$window\", \"$scope\", \"$element\", \"$attrs\"];\nVirtualRepeatController.$inject = [\"$scope\", \"$element\", \"$attrs\", \"$browser\", \"$document\", \"$rootScope\", \"$$rAF\", \"$mdUtil\"];\nVirtualRepeatDirective.$inject = [\"$parse\"];\nangular.module('material.components.virtualRepeat', [\n 'material.core',\n 'material.components.showHide'\n])\n.directive('mdVirtualRepeatContainer', VirtualRepeatContainerDirective)\n.directive('mdVirtualRepeat', VirtualRepeatDirective)\n.directive('mdForceHeight', ForceHeightDirective);\n\n\n/**\n * @ngdoc directive\n * @name mdVirtualRepeatContainer\n * @module material.components.virtualRepeat\n * @restrict E\n * @description\n * `md-virtual-repeat-container` provides the scroll container for\n * <a ng-href=\"api/directive/mdVirtualRepeat\">md-virtual-repeat</a>.\n *\n * VirtualRepeat is a limited substitute for `ng-repeat` that renders only\n * enough DOM nodes to fill the container, recycling them as the user scrolls.\n *\n * Once an element is not visible anymore, the Virtual Repeat recycles the element and reuses it\n * for another visible item by replacing the previous data set with the set of currently visible\n * elements.\n *\n * ### Common Issues\n *\n * - When having one-time bindings inside of the view template, the Virtual Repeat will not properly\n * update the bindings for new items, since the view will be recycled.\n * - Directives inside of a Virtual Repeat will be only compiled (linked) once, because those\n * items will be recycled and used for other items.\n * The Virtual Repeat just updates the scope bindings.\n *\n *\n * ### Notes\n *\n * > The VirtualRepeat is a similar implementation to the Android\n * [RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html).\n *\n * <!-- This comment forces a break between blockquotes //-->\n *\n * > Please also review the <a ng-href=\"api/directive/mdVirtualRepeat\">mdVirtualRepeat</a>\n * documentation for more information.\n *\n *\n * @usage\n * <hljs lang=\"html\">\n *\n * <md-virtual-repeat-container md-top-index=\"topIndex\">\n * <div md-virtual-repeat=\"i in items\" md-item-size=\"20\">Hello {{i}}!</div>\n * </md-virtual-repeat-container>\n * </hljs>\n *\n * @param {boolean=} md-auto-shrink When present and the container will shrink to fit\n * the number of items in the `md-virtual-repeat`.\n * @param {number=} md-auto-shrink-min Minimum number of items that md-auto-shrink\n * will shrink to. Default: `0`.\n * @param {boolean=} md-orient-horizontal Whether the container should scroll horizontally.\n * The default is `false` which indicates vertical orientation and scrolling.\n * @param {number=} md-top-index Binds the index of the item that is at the top of the scroll\n * container to `$scope`. It can both read and set the scroll position.\n */\nfunction VirtualRepeatContainerDirective() {\n return {\n controller: VirtualRepeatContainerController,\n template: virtualRepeatContainerTemplate,\n compile: function virtualRepeatContainerCompile($element, $attrs) {\n $element\n .addClass('md-virtual-repeat-container')\n .addClass($attrs.hasOwnProperty('mdOrientHorizontal')\n ? 'md-orient-horizontal'\n : 'md-orient-vertical');\n }\n };\n}\n\n\nfunction virtualRepeatContainerTemplate($element) {\n return '<div class=\"md-virtual-repeat-scroller\" role=\"presentation\">' +\n '<div class=\"md-virtual-repeat-sizer\" role=\"presentation\"></div>' +\n '<div class=\"md-virtual-repeat-offsetter\" role=\"presentation\">' +\n $element[0].innerHTML +\n '</div></div>';\n}\n\n/**\n * Number of additional elements to render above and below the visible area inside\n * of the virtual repeat container. A higher number results in less flicker when scrolling\n * very quickly in Safari, but comes with a higher rendering and dirty-checking cost.\n * @const {number}\n */\nvar NUM_EXTRA = 3;\n\n/** @ngInject */\nfunction VirtualRepeatContainerController($$rAF, $mdUtil, $mdConstant, $parse, $rootScope, $window,\n $scope, $element, $attrs) {\n this.$rootScope = $rootScope;\n this.$scope = $scope;\n this.$element = $element;\n this.$attrs = $attrs;\n\n /** @type {number} The width or height of the container */\n this.size = 0;\n /** @type {number} The scroll width or height of the scroller */\n this.scrollSize = 0;\n /** @type {number} The scrollLeft or scrollTop of the scroller */\n this.scrollOffset = 0;\n /** @type {boolean} Whether the scroller is oriented horizontally */\n this.horizontal = this.$attrs.hasOwnProperty('mdOrientHorizontal');\n /** @type {!VirtualRepeatController} The repeater inside of this container */\n this.repeater = null;\n /** @type {boolean} Whether auto-shrink is enabled */\n this.autoShrink = this.$attrs.hasOwnProperty('mdAutoShrink');\n /** @type {number} Minimum number of items to auto-shrink to */\n this.autoShrinkMin = parseInt(this.$attrs.mdAutoShrinkMin, 10) || 0;\n /** @type {?number} Original container size when shrank */\n this.originalSize = null;\n /** @type {number} Amount to offset the total scroll size by. */\n this.offsetSize = parseInt(this.$attrs.mdOffsetSize, 10) || 0;\n /** @type {?string} height or width element style on the container prior to auto-shrinking. */\n this.oldElementSize = null;\n /** @type {!number} Maximum amount of pixels allowed for a single DOM element */\n this.maxElementPixels = $mdConstant.ELEMENT_MAX_PIXELS;\n /** @type {string} Direction of the text */\n this.ltr = !$mdUtil.isRtl(this.$attrs);\n\n if (this.$attrs.mdTopIndex) {\n /** @type {function(angular.Scope): number} Binds to topIndex on AngularJS scope */\n this.bindTopIndex = $parse(this.$attrs.mdTopIndex);\n /** @type {number} The index of the item that is at the top of the scroll container */\n this.topIndex = this.bindTopIndex(this.$scope);\n\n if (!angular.isDefined(this.topIndex)) {\n this.topIndex = 0;\n this.bindTopIndex.assign(this.$scope, 0);\n }\n\n this.$scope.$watch(this.bindTopIndex, angular.bind(this, function(newIndex) {\n if (newIndex !== this.topIndex) {\n this.scrollToIndex(newIndex);\n }\n }));\n } else {\n this.topIndex = 0;\n }\n\n this.scroller = $element[0].querySelector('.md-virtual-repeat-scroller');\n this.sizer = this.scroller.querySelector('.md-virtual-repeat-sizer');\n this.offsetter = this.scroller.querySelector('.md-virtual-repeat-offsetter');\n\n // After the DOM stabilizes, measure the initial size of the container and\n // make a best effort at re-measuring as it changes.\n var boundUpdateSize = angular.bind(this, this.updateSize);\n\n $$rAF(angular.bind(this, function() {\n boundUpdateSize();\n\n var debouncedUpdateSize = $mdUtil.debounce(boundUpdateSize, 10, null, false);\n var jWindow = angular.element($window);\n\n // Make one more attempt to get the size if it is 0.\n // This is not by any means a perfect approach, but there's really no\n // silver bullet here.\n if (!this.size) {\n debouncedUpdateSize();\n }\n\n jWindow.on('resize', debouncedUpdateSize);\n $scope.$on('$destroy', function() {\n jWindow.off('resize', debouncedUpdateSize);\n });\n\n $scope.$emit('$md-resize-enable');\n $scope.$on('$md-resize', boundUpdateSize);\n }));\n}\n\n\n/** Called by the md-virtual-repeat inside of the container at startup. */\nVirtualRepeatContainerController.prototype.register = function(repeaterCtrl) {\n this.repeater = repeaterCtrl;\n\n angular.element(this.scroller)\n .on('scroll wheel touchmove touchend', angular.bind(this, this.handleScroll_));\n};\n\n\n/** @return {boolean} Whether the container is configured for horizontal scrolling. */\nVirtualRepeatContainerController.prototype.isHorizontal = function() {\n return this.horizontal;\n};\n\n\n/** @return {number} The size (width or height) of the container. */\nVirtualRepeatContainerController.prototype.getSize = function() {\n return this.size;\n};\n\n\n/**\n * Resizes the container.\n * @private\n * @param {number} size The new size to set.\n */\nVirtualRepeatContainerController.prototype.setSize_ = function(size) {\n var dimension = this.getDimensionName_();\n\n this.size = size;\n this.$element[0].style[dimension] = size + 'px';\n};\n\n\nVirtualRepeatContainerController.prototype.unsetSize_ = function() {\n this.$element[0].style[this.getDimensionName_()] = this.oldElementSize;\n this.oldElementSize = null;\n};\n\n\n/** Instructs the container to re-measure its size. */\nVirtualRepeatContainerController.prototype.updateSize = function() {\n // If the original size is already determined, we can skip the update.\n if (this.originalSize) return;\n\n var size = this.isHorizontal()\n ? this.$element[0].clientWidth\n : this.$element[0].clientHeight;\n\n if (size) {\n this.size = size;\n }\n\n // Recheck the scroll position after updating the size. This resolves\n // problems that can result if the scroll position was measured while the\n // element was display: none or detached from the document.\n this.handleScroll_();\n\n this.repeater && this.repeater.containerUpdated();\n};\n\n\n/** @return {number} The container's scrollHeight or scrollWidth. */\nVirtualRepeatContainerController.prototype.getScrollSize = function() {\n return this.scrollSize;\n};\n\n/**\n * @returns {string} either width or height dimension\n * @private\n */\nVirtualRepeatContainerController.prototype.getDimensionName_ = function() {\n return this.isHorizontal() ? 'width' : 'height';\n};\n\n\n/**\n * Sets the scroller element to the specified size.\n * @private\n * @param {number} size The new size.\n */\nVirtualRepeatContainerController.prototype.sizeScroller_ = function(size) {\n var dimension = this.getDimensionName_();\n var crossDimension = this.isHorizontal() ? 'height' : 'width';\n\n // Clear any existing dimensions.\n this.sizer.innerHTML = '';\n\n // If the size falls within the browser's maximum explicit size for a single element, we can\n // set the size and be done. Otherwise, we have to create children that add up the the desired\n // size.\n if (size < this.maxElementPixels) {\n this.sizer.style[dimension] = size + 'px';\n } else {\n this.sizer.style[dimension] = 'auto';\n this.sizer.style[crossDimension] = 'auto';\n\n // Divide the total size we have to render into N max-size pieces.\n var numChildren = Math.floor(size / this.maxElementPixels);\n\n // Element template to clone for each max-size piece.\n var sizerChild = document.createElement('div');\n sizerChild.style[dimension] = this.maxElementPixels + 'px';\n sizerChild.style[crossDimension] = '1px';\n\n for (var i = 0; i < numChildren; i++) {\n this.sizer.appendChild(sizerChild.cloneNode(false));\n }\n\n // Re-use the element template for the remainder.\n sizerChild.style[dimension] = (size - (numChildren * this.maxElementPixels)) + 'px';\n this.sizer.appendChild(sizerChild);\n }\n};\n\n\n/**\n * If auto-shrinking is enabled, shrinks or unshrinks as appropriate.\n * @private\n * @param {number} size The new size.\n */\nVirtualRepeatContainerController.prototype.autoShrink_ = function(size) {\n var shrinkSize = Math.max(size, this.autoShrinkMin * this.repeater.getItemSize());\n\n if (this.autoShrink && shrinkSize !== this.size) {\n if (this.oldElementSize === null) {\n this.oldElementSize = this.$element[0].style[this.getDimensionName_()];\n }\n\n var currentSize = this.originalSize || this.size;\n\n if (!currentSize || shrinkSize < currentSize) {\n if (!this.originalSize) {\n this.originalSize = this.size;\n }\n\n // Now we update the containers size, because shrinking is enabled.\n this.setSize_(shrinkSize);\n } else if (this.originalSize !== null) {\n // Set the size back to our initial size.\n this.unsetSize_();\n\n var _originalSize = this.originalSize;\n this.originalSize = null;\n\n // We determine the repeaters size again, if the original size was zero.\n // The originalSize needs to be null, to be able to determine the size.\n if (!_originalSize) this.updateSize();\n\n // Apply the original size or the determined size back to the container, because\n // it has been overwritten before, in the shrink block.\n this.setSize_(_originalSize || this.size);\n }\n\n this.repeater.containerUpdated();\n }\n};\n\n\n/**\n * Sets the scrollHeight or scrollWidth. Called by the repeater based on\n * its item count and item size.\n * @param {number} itemsSize The total size of the items.\n */\nVirtualRepeatContainerController.prototype.setScrollSize = function(itemsSize) {\n var size = itemsSize + this.offsetSize;\n if (this.scrollSize === size) return;\n\n this.sizeScroller_(size);\n this.autoShrink_(size);\n this.scrollSize = size;\n};\n\n\n/** @return {number} The container's current scroll offset. */\nVirtualRepeatContainerController.prototype.getScrollOffset = function() {\n return this.scrollOffset;\n};\n\n/**\n * Scrolls to a given scrollTop position.\n * @param {number} position\n */\nVirtualRepeatContainerController.prototype.scrollTo = function(position) {\n this.scroller[this.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = position;\n this.handleScroll_();\n};\n\n/**\n * Scrolls the item with the given index to the top of the scroll container.\n * @param {number} index\n */\nVirtualRepeatContainerController.prototype.scrollToIndex = function(index) {\n var itemSize = this.repeater.getItemSize();\n var itemsLength = this.repeater.itemsLength;\n if (index > itemsLength) {\n index = itemsLength - 1;\n }\n this.scrollTo(itemSize * index);\n};\n\nVirtualRepeatContainerController.prototype.resetScroll = function() {\n this.scrollTo(0);\n};\n\n\nVirtualRepeatContainerController.prototype.handleScroll_ = function() {\n if (!this.ltr && !this.maxSize) {\n this.scroller.scrollLeft = this.scrollSize;\n this.maxSize = this.scroller.scrollLeft;\n }\n var offset = this.isHorizontal() ?\n (this.ltr ? this.scroller.scrollLeft : this.maxSize - this.scroller.scrollLeft)\n : this.scroller.scrollTop;\n if (this.scrollSize < this.size) return;\n if (offset > this.scrollSize - this.size) {\n offset = this.scrollSize - this.size;\n }\n if (offset === this.scrollOffset) return;\n\n var itemSize = this.repeater.getItemSize();\n if (!itemSize) return;\n\n var numItems = Math.max(0, Math.floor(offset / itemSize) - NUM_EXTRA);\n\n var transform = (this.isHorizontal() ? 'translateX(' : 'translateY(') +\n (!this.isHorizontal() || this.ltr ? (numItems * itemSize) : - (numItems * itemSize)) + 'px)';\n\n this.scrollOffset = offset;\n this.offsetter.style.webkitTransform = transform;\n this.offsetter.style.transform = transform;\n\n if (this.bindTopIndex) {\n var topIndex = Math.floor(offset / itemSize);\n if (topIndex !== this.topIndex && topIndex < this.repeater.getItemCount()) {\n this.topIndex = topIndex;\n this.bindTopIndex.assign(this.$scope, topIndex);\n if (!this.$rootScope.$$phase) this.$scope.$digest();\n }\n }\n\n this.repeater.containerUpdated();\n};\n\n\n/**\n * @ngdoc directive\n * @name mdVirtualRepeat\n * @module material.components.virtualRepeat\n * @restrict A\n * @priority 1000\n * @description\n * The `md-virtual-repeat` attribute is applied to a template that is repeated using virtual\n * scrolling. This provides smooth and performant scrolling through very large lists of elements.\n *\n * Virtual repeat is a limited substitute for `ng-repeat` that renders only\n * enough DOM nodes to fill the container, recycling them as the user scrolls.\n *\n * ### Notes\n *\n * - Arrays are supported for iteration by default.\n * - An object can used use if `md-on-demand` is specified and the object implements the interface\n * described in the `md-on-demand` <a ng-href=\"#attributes\">documentation</a>.\n * - `trackBy`, `as` alias, and `(key, value)` syntax from `ng-repeat` are not supported.\n *\n * ### On-Demand Async Item Loading\n *\n * When using the `md-on-demand` attribute and loading some asynchronous data,\n * the `getItemAtIndex` function will mostly return nothing.\n *\n * <hljs lang=\"js\">\n * DynamicItems.prototype.getItemAtIndex = function(index) {\n * if (this.pages[index]) {\n * return this.pages[index];\n * } else {\n * // This is an asynchronous action and does not return any value.\n * this.loadPage(index);\n * }\n * };\n * </hljs>\n *\n * This means that the Virtual Repeat will not have any value for the given index.<br/>\n * After the data loading completes, the user expects the Virtual Repeat to recognize the change.\n *\n * To make sure that the Virtual Repeat properly detects any change, you need to run the operation\n * in another digest.\n *\n * <hljs lang=\"js\">\n * DynamicItems.prototype.loadPage = function(index) {\n * var self = this;\n *\n * // Trigger a new digest by using $timeout\n * $timeout(function() {\n * self.pages[index] = Data;\n * });\n * };\n * </hljs>\n *\n * > <b>Note:</b> Please also review the\n * <a ng-href=\"api/directive/mdVirtualRepeatContainer\">VirtualRepeatContainer</a> documentation\n * for more information.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-virtual-repeat-container>\n * <div md-virtual-repeat=\"i in items\">Hello {{i}}!</div>\n * </md-virtual-repeat-container>\n *\n * <md-virtual-repeat-container md-orient-horizontal>\n * <div md-virtual-repeat=\"i in items\" md-item-size=\"20\">Hello {{i}}!</div>\n * </md-virtual-repeat-container>\n * </hljs>\n *\n * @param {expression=} md-extra-name Evaluates to an additional name to which the current iterated\n * item can be assigned on the repeated scope (needed for use in `md-autocomplete`).\n * @param {number=} md-item-size Optional height or width of the repeated elements (which **must be\n * identical for each element**). Virtual repeat will attempt to read the size from the DOM,\n * if missing, but it still assumes that all repeated nodes have the **same height**\n * (when scrolling vertically) or **same width** (when scrolling horizontally).\n * @param {boolean=} md-on-demand When present, treats the `md-virtual-repeat` argument as an object\n * that can fetch rows rather than an array.\n *\n * **NOTE:** This object **must** implement the following interface with two methods:\n *\n * - `getItemAtIndex` - `{function(index): Object}`: The item at that `index` or `null` if it is\n * not yet loaded (it should start downloading the item in that case).\n * - `getLength` - `{function(): number}`: The data length to which the repeater container\n * should be sized. Ideally, when the count is known, this method should return it.\n * Otherwise, return a higher number than the currently loaded items to produce an\n * infinite-scroll behavior.\n */\nfunction VirtualRepeatDirective($parse) {\n return {\n controller: VirtualRepeatController,\n priority: 1000,\n require: ['mdVirtualRepeat', '^^mdVirtualRepeatContainer'],\n restrict: 'A',\n terminal: true,\n transclude: 'element',\n compile: function VirtualRepeatCompile($element, $attrs) {\n var expression = $attrs.mdVirtualRepeat;\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)\\s*$/);\n var repeatName = match[1];\n var repeatListExpression = $parse(match[2]);\n var extraName = $attrs.mdExtraName && $parse($attrs.mdExtraName);\n\n return function VirtualRepeatLink($scope, $element, $attrs, ctrl, $transclude) {\n ctrl[0].link_(ctrl[1], $transclude, repeatName, repeatListExpression, extraName);\n };\n }\n };\n}\n\n\n/** @ngInject */\nfunction VirtualRepeatController($scope, $element, $attrs, $browser, $document, $rootScope,\n $$rAF, $mdUtil) {\n this.$scope = $scope;\n this.$element = $element;\n this.$attrs = $attrs;\n this.$browser = $browser;\n this.$document = $document;\n this.$mdUtil = $mdUtil;\n this.$rootScope = $rootScope;\n this.$$rAF = $$rAF;\n\n /** @type {boolean} Whether we are in on-demand mode. */\n this.onDemand = $mdUtil.parseAttributeBoolean($attrs.mdOnDemand);\n /** @type {!Function} Backup reference to $browser.$$checkUrlChange */\n this.browserCheckUrlChange = $browser.$$checkUrlChange;\n /** @type {number} Most recent starting repeat index (based on scroll offset) */\n this.newStartIndex = 0;\n /** @type {number} Most recent ending repeat index (based on scroll offset) */\n this.newEndIndex = 0;\n /** @type {number} Most recent end visible index (based on scroll offset) */\n this.newVisibleEnd = 0;\n /** @type {number} Previous starting repeat index (based on scroll offset) */\n this.startIndex = 0;\n /** @type {number} Previous ending repeat index (based on scroll offset) */\n this.endIndex = 0;\n /** @type {?number} Height/width of repeated elements. */\n this.itemSize = $scope.$eval($attrs.mdItemSize) || null;\n\n /** @type {boolean} Whether this is the first time that items are rendered. */\n this.isFirstRender = true;\n\n /**\n * @private {boolean} Whether the items in the list are already being updated. Used to prevent\n * nested calls to virtualRepeatUpdate_.\n */\n this.isVirtualRepeatUpdating_ = false;\n\n /** @type {number} Most recently seen length of items. */\n this.itemsLength = 0;\n\n /**\n * @type {!Function} Unwatch callback for item size (when md-items-size is\n * not specified), or angular.noop otherwise.\n */\n this.unwatchItemSize_ = angular.noop;\n\n /**\n * Presently rendered blocks by repeat index.\n * @type {Object<number, !VirtualRepeatController.Block>}\n */\n this.blocks = {};\n /** @type {Array<!VirtualRepeatController.Block>} A pool of presently unused blocks. */\n this.pooledBlocks = [];\n\n $scope.$on('$destroy', angular.bind(this, this.cleanupBlocks_));\n}\n\n\n/**\n * An object representing a repeated item.\n * @typedef {{element: !jqLite, new: boolean, scope: !angular.Scope}}\n */\nVirtualRepeatController.Block;\n\n\n/**\n * Called at startup by the md-virtual-repeat postLink function.\n * @param {!VirtualRepeatContainerController} container The container's controller.\n * @param {!Function} transclude The repeated element's bound transclude function.\n * @param {string} repeatName The left hand side of the repeat expression, indicating\n * the name for each item in the array.\n * @param {!Function} repeatListExpression A compiled expression based on the right hand side\n * of the repeat expression. Points to the array to repeat over.\n * @param {string|undefined} extraName The optional extra repeatName.\n */\nVirtualRepeatController.prototype.link_ =\n function(container, transclude, repeatName, repeatListExpression, extraName) {\n this.container = container;\n this.transclude = transclude;\n this.repeatName = repeatName;\n this.rawRepeatListExpression = repeatListExpression;\n this.extraName = extraName;\n this.sized = false;\n\n this.repeatListExpression = angular.bind(this, this.repeatListExpression_);\n\n this.container.register(this);\n};\n\n\n/** @private Cleans up unused blocks. */\nVirtualRepeatController.prototype.cleanupBlocks_ = function() {\n angular.forEach(this.pooledBlocks, function cleanupBlock(block) {\n block.element.remove();\n });\n};\n\n\n/** @private Attempts to set itemSize by measuring a repeated element in the dom */\nVirtualRepeatController.prototype.readItemSize_ = function() {\n if (this.itemSize) {\n // itemSize was successfully read in a different asynchronous call.\n return;\n }\n\n this.items = this.repeatListExpression(this.$scope);\n this.parentNode = this.$element[0].parentNode;\n var block = this.getBlock_(0);\n if (!block.element[0].parentNode) {\n this.parentNode.appendChild(block.element[0]);\n }\n\n this.itemSize = block.element[0][\n this.container.isHorizontal() ? 'offsetWidth' : 'offsetHeight'] || null;\n\n this.blocks[0] = block;\n this.poolBlock_(0);\n\n if (this.itemSize) {\n this.containerUpdated();\n }\n};\n\n\n/**\n * Returns the user-specified repeat list, transforming it into an array-like\n * object in the case of infinite scroll/dynamic load mode.\n * @param {!angular.Scope} scope The scope.\n * @return {!Array|!Object} An array or array-like object for iteration.\n */\nVirtualRepeatController.prototype.repeatListExpression_ = function(scope) {\n var repeatList = this.rawRepeatListExpression(scope);\n\n if (this.onDemand && repeatList) {\n var virtualList = new VirtualRepeatModelArrayLike(repeatList);\n virtualList.$$includeIndexes(this.newStartIndex, this.newVisibleEnd);\n return virtualList;\n } else {\n return repeatList;\n }\n};\n\n\n/**\n * Called by the container. Informs us that the container's scroll or size has\n * changed.\n */\nVirtualRepeatController.prototype.containerUpdated = function() {\n // If itemSize is unknown, attempt to measure it.\n if (!this.itemSize) {\n // Make sure to clean up watchers if we can (see #8178)\n if (this.unwatchItemSize_ && this.unwatchItemSize_ !== angular.noop){\n this.unwatchItemSize_();\n }\n this.unwatchItemSize_ = this.$scope.$watchCollection(\n this.repeatListExpression,\n angular.bind(this, function(items) {\n if (items && items.length) {\n this.readItemSize_();\n }\n }));\n if (!this.$rootScope.$$phase) this.$scope.$digest();\n\n return;\n } else if (!this.sized) {\n this.items = this.repeatListExpression(this.$scope);\n }\n\n if (!this.sized) {\n this.unwatchItemSize_();\n this.sized = true;\n this.$scope.$watchCollection(this.repeatListExpression,\n angular.bind(this, function(items, oldItems) {\n if (!this.isVirtualRepeatUpdating_) {\n this.virtualRepeatUpdate_(items, oldItems);\n }\n }));\n }\n\n this.updateIndexes_();\n\n if (this.newStartIndex !== this.startIndex ||\n this.newEndIndex !== this.endIndex ||\n this.container.getScrollOffset() > this.container.getScrollSize()) {\n if (this.items instanceof VirtualRepeatModelArrayLike) {\n this.items.$$includeIndexes(this.newStartIndex, this.newEndIndex);\n }\n this.virtualRepeatUpdate_(this.items, this.items);\n }\n};\n\n\n/**\n * Called by the container. Returns the size of a single repeated item.\n * @return {?number} size of a repeated item.\n */\nVirtualRepeatController.prototype.getItemSize = function() {\n return this.itemSize;\n};\n\n\n/**\n * Called by the container.\n * @return {?number} the most recently seen length of items.\n */\nVirtualRepeatController.prototype.getItemCount = function() {\n return this.itemsLength;\n};\n\n\n/**\n * Updates the order and visible offset of repeated blocks in response to scrolling\n * or updates to `items`.\n * @param {Array} items visible elements\n * @param {Array} oldItems previously visible elements\n * @private\n */\nVirtualRepeatController.prototype.virtualRepeatUpdate_ = function(items, oldItems) {\n this.isVirtualRepeatUpdating_ = true;\n\n var itemsLength = items && items.length || 0;\n var lengthChanged = false;\n\n // If the number of items shrank, keep the scroll position.\n if (this.items && itemsLength < this.items.length && this.container.getScrollOffset() !== 0) {\n this.items = items;\n var previousScrollOffset = this.container.getScrollOffset();\n this.container.resetScroll();\n this.container.scrollTo(previousScrollOffset);\n }\n\n if (itemsLength !== this.itemsLength) {\n lengthChanged = true;\n this.itemsLength = itemsLength;\n }\n\n this.items = items;\n if (items !== oldItems || lengthChanged) {\n this.updateIndexes_();\n }\n\n this.parentNode = this.$element[0].parentNode;\n\n if (lengthChanged) {\n this.container.setScrollSize(itemsLength * this.itemSize);\n }\n\n // Detach and pool any blocks that are no longer in the viewport.\n Object.keys(this.blocks).forEach(function(blockIndex) {\n var index = parseInt(blockIndex, 10);\n if (index < this.newStartIndex || index >= this.newEndIndex) {\n this.poolBlock_(index);\n }\n }, this);\n\n // Add needed blocks.\n // For performance reasons, temporarily block browser url checks as we digest\n // the restored block scopes ($$checkUrlChange reads window.location to\n // check for changes and trigger route change, etc, which we don't need when\n // trying to scroll at 60fps).\n this.$browser.$$checkUrlChange = angular.noop;\n\n var i, block,\n newStartBlocks = [],\n newEndBlocks = [];\n\n // Collect blocks at the top.\n for (i = this.newStartIndex; i < this.newEndIndex && this.blocks[i] == null; i++) {\n block = this.getBlock_(i);\n this.updateBlock_(block, i);\n newStartBlocks.push(block);\n }\n\n // Update blocks that are already rendered.\n for (; this.blocks[i] != null; i++) {\n this.updateBlock_(this.blocks[i], i);\n }\n var maxIndex = i - 1;\n\n // Collect blocks at the end.\n for (; i < this.newEndIndex; i++) {\n block = this.getBlock_(i);\n this.updateBlock_(block, i);\n newEndBlocks.push(block);\n }\n\n // Attach collected blocks to the document.\n if (newStartBlocks.length) {\n this.parentNode.insertBefore(\n this.domFragmentFromBlocks_(newStartBlocks),\n this.$element[0].nextSibling);\n }\n if (newEndBlocks.length) {\n this.parentNode.insertBefore(\n this.domFragmentFromBlocks_(newEndBlocks),\n this.blocks[maxIndex] && this.blocks[maxIndex].element[0].nextSibling);\n }\n\n // Restore $$checkUrlChange.\n this.$browser.$$checkUrlChange = this.browserCheckUrlChange;\n\n this.startIndex = this.newStartIndex;\n this.endIndex = this.newEndIndex;\n\n if (this.isFirstRender) {\n this.isFirstRender = false;\n var firstRenderStartIndex = this.$attrs.mdStartIndex ?\n this.$scope.$eval(this.$attrs.mdStartIndex) :\n this.container.topIndex;\n\n // The first call to virtualRepeatUpdate_ may not be when the virtual repeater is ready.\n // Introduce a slight delay so that the update happens when it is actually ready.\n this.$mdUtil.nextTick(function() {\n this.container.scrollToIndex(firstRenderStartIndex);\n }.bind(this));\n }\n\n this.isVirtualRepeatUpdating_ = false;\n};\n\n\n/**\n * @param {number} index Where the block is to be in the repeated list.\n * @return {!VirtualRepeatController.Block} A new or pooled block to place at the specified index.\n * @private\n */\nVirtualRepeatController.prototype.getBlock_ = function(index) {\n if (this.pooledBlocks.length) {\n return this.pooledBlocks.pop();\n }\n\n var block;\n this.transclude(angular.bind(this, function(clone, scope) {\n block = {\n element: clone,\n new: true,\n scope: scope\n };\n\n this.updateScope_(scope, index);\n this.parentNode.appendChild(clone[0]);\n }));\n\n return block;\n};\n\n\n/**\n * Updates and if not in a digest cycle, digests the specified block's scope to the data\n * at the specified index.\n * @param {!VirtualRepeatController.Block} block The block whose scope should be updated.\n * @param {number} index The index to set.\n * @private\n */\nVirtualRepeatController.prototype.updateBlock_ = function(block, index) {\n this.blocks[index] = block;\n\n if (!block.new &&\n (block.scope.$index === index && block.scope[this.repeatName] === this.items[index])) {\n return;\n }\n block.new = false;\n\n // Update and digest the block's scope.\n this.updateScope_(block.scope, index);\n\n // Perform digest before reattaching the block.\n // Any resulting synchronous DOM mutations should be much faster as a result.\n // This might break some directives.\n if (!this.$rootScope.$$phase) {\n block.scope.$digest();\n }\n};\n\n\n/**\n * Updates scope to the data at the specified index.\n * @param {!angular.Scope} scope The scope which should be updated.\n * @param {number} index The index to set.\n * @private\n */\nVirtualRepeatController.prototype.updateScope_ = function(scope, index) {\n scope.$index = index;\n scope[this.repeatName] = this.items && this.items[index];\n if (this.extraName) scope[this.extraName(this.$scope)] = this.items[index];\n};\n\n\n/**\n * Pools the block at the specified index (Pulls its element out of the dom and stores it).\n * @param {number} index The index at which the block to pool is stored.\n * @private\n */\nVirtualRepeatController.prototype.poolBlock_ = function(index) {\n this.pooledBlocks.push(this.blocks[index]);\n this.parentNode.removeChild(this.blocks[index].element[0]);\n delete this.blocks[index];\n};\n\n\n/**\n * Produces a dom fragment containing the elements from the list of blocks.\n * @param {!Array<!VirtualRepeatController.Block>} blocks The blocks whose elements\n * should be added to the document fragment.\n * @return {DocumentFragment}\n * @private\n */\nVirtualRepeatController.prototype.domFragmentFromBlocks_ = function(blocks) {\n var fragment = this.$document[0].createDocumentFragment();\n blocks.forEach(function(block) {\n fragment.appendChild(block.element[0]);\n });\n return fragment;\n};\n\n\n/**\n * Updates start and end indexes based on length of repeated items and container size.\n * @private\n */\nVirtualRepeatController.prototype.updateIndexes_ = function() {\n var itemsLength = this.items ? this.items.length : 0;\n var containerLength = Math.ceil(this.container.getSize() / this.itemSize);\n\n this.newStartIndex = Math.max(0, Math.min(\n itemsLength - containerLength,\n Math.floor(this.container.getScrollOffset() / this.itemSize)));\n this.newVisibleEnd = this.newStartIndex + containerLength + NUM_EXTRA;\n this.newEndIndex = Math.min(itemsLength, this.newVisibleEnd);\n this.newStartIndex = Math.max(0, this.newStartIndex - NUM_EXTRA);\n};\n\n/**\n * This VirtualRepeatModelArrayLike class enforces the interface requirements\n * for infinite scrolling within a mdVirtualRepeatContainer.\n *\n * @param {Object} model An object with this interface must implement the following interface with\n * two (2) methods:\n *\n * getItemAtIndex: function(index) -> item at that index or null if it is not yet\n * loaded (It should start downloading the item in that case).\n *\n * getLength: function() -> number The data length to which the repeater container\n * should be sized. Ideally, when the count is known, this method should return it.\n * Otherwise, return a higher number than the currently loaded items to produce an\n * infinite-scroll behavior.\n *\n * @usage\n * <hljs lang=\"html\">\n * <md-virtual-repeat-container md-orient-horizontal>\n * <div md-virtual-repeat=\"i in items\" md-on-demand>\n * Hello {{i}}!\n * </div>\n * </md-virtual-repeat-container>\n * </hljs>\n *\n */\nfunction VirtualRepeatModelArrayLike(model) {\n if (!angular.isFunction(model.getItemAtIndex) ||\n !angular.isFunction(model.getLength)) {\n throw Error('When md-on-demand is enabled, the Object passed to md-virtual-repeat must ' +\n 'implement functions getItemAtIndex() and getLength().');\n }\n\n this.model = model;\n}\n\n/**\n * @param {number} start\n * @param {number} end\n */\nVirtualRepeatModelArrayLike.prototype.$$includeIndexes = function(start, end) {\n for (var i = start; i < end; i++) {\n if (!this.hasOwnProperty(i)) {\n this[i] = this.model.getItemAtIndex(i);\n }\n }\n this.length = this.model.getLength();\n};\n\n/**\n * @ngdoc directive\n * @name mdForceHeight\n * @module material.components.virtualRepeat\n * @restrict A\n * @description\n *\n * Force an element to have a certain `px` height. This is used in place of a style tag in order to\n * conform to the\n * <a href=\"https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/script-src\">\n * Content Security Policy</a> regarding `unsafe-inline` `<style>` tags.\n *\n * This directive is related to <a ng-href=\"api/directive/mdVirtualRepeat\">mdVirtualRepeat</a>.\n *\n * @usage\n * <hljs lang=\"html\">\n * <div md-force-height=\"'100px'\"></div>\n * </hljs>\n */\nfunction ForceHeightDirective($mdUtil) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var height = scope.$eval(attrs.mdForceHeight) || null;\n\n if (height && element) {\n element[0].style.height = height;\n }\n }\n };\n}\nForceHeightDirective.$inject = ['$mdUtil'];\n\n})();\n(function(){\n\"use strict\";\n\n/**\n * @ngdoc module\n * @name material.components.whiteframe\n */\nMdWhiteframeDirective.$inject = [\"$log\"];\nangular\n .module('material.components.whiteframe', ['material.core'])\n .directive('mdWhiteframe', MdWhiteframeDirective);\n\n/**\n * @ngdoc directive\n * @module material.components.whiteframe\n * @name mdWhiteframe\n *\n * @description\n * The md-whiteframe directive allows you to apply an elevation shadow to an element.\n *\n * The attribute values needs to be a number between 1 and 24 or -1.\n * When set to -1 no style is applied.\n *\n * ### Notes\n * - If there is no value specified it defaults to 4dp.\n * - If the value is not valid it defaults to 4dp.\n\n * @usage\n * <hljs lang=\"html\">\n * <div md-whiteframe=\"3\">\n * <span>Elevation of 3dp</span>\n * </div>\n * </hljs>\n *\n * <hljs lang=\"html\">\n * <div md-whiteframe=\"-1\">\n * <span>No elevation shadow applied</span>\n * </div>\n * </hljs>\n *\n * <hljs lang=\"html\">\n * <div ng-init=\"elevation = 5\" md-whiteframe=\"{{elevation}}\">\n * <span>Elevation of 5dp with an interpolated value</span>\n * </div>\n * </hljs>\n */\nfunction MdWhiteframeDirective($log) {\n var DISABLE_DP = -1;\n var MIN_DP = 1;\n var MAX_DP = 24;\n var DEFAULT_DP = 4;\n\n return {\n link: postLink\n };\n\n function postLink(scope, element, attr) {\n var oldClass = '';\n\n attr.$observe('mdWhiteframe', function(elevation) {\n elevation = parseInt(elevation, 10) || DEFAULT_DP;\n\n if (elevation != DISABLE_DP && (elevation > MAX_DP || elevation < MIN_DP)) {\n $log.warn('md-whiteframe attribute value is invalid. It should be a number between ' + MIN_DP + ' and ' + MAX_DP, element[0]);\n elevation = DEFAULT_DP;\n }\n\n var newClass = elevation == DISABLE_DP ? '' : 'md-whiteframe-' + elevation + 'dp';\n attr.$updateClass(newClass, oldClass);\n oldClass = newClass;\n });\n }\n}\n\n\n})();\n(function(){ \nangular.module(\"material.core\").constant(\"$MD_THEME_CSS\", \"md-autocomplete.md-THEME_NAME-theme{background:\\\"{{background-hue-1}}\\\"}md-autocomplete.md-THEME_NAME-theme[disabled]:not([md-floating-label]){background:\\\"{{background-hue-2}}\\\"}md-autocomplete.md-THEME_NAME-theme button md-icon path{fill:\\\"{{background-600}}\\\"}md-autocomplete.md-THEME_NAME-theme button:after{background:\\\"{{background-600-0.3}}\\\"}md-autocomplete.md-THEME_NAME-theme input{color:\\\"{{foreground-1}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-accent md-input-container.md-input-focused .md-input{border-color:\\\"{{accent-color}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-accent md-input-container.md-input-focused label,md-autocomplete.md-THEME_NAME-theme.md-accent md-input-container.md-input-focused md-icon{color:\\\"{{accent-color}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-accent md-progress-linear .md-container{background-color:\\\"{{accent-100}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-accent md-progress-linear .md-bar{background-color:\\\"{{accent-color}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-warn md-input-container.md-input-focused .md-input{border-color:\\\"{{warn-A700}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-warn md-input-container.md-input-focused label,md-autocomplete.md-THEME_NAME-theme.md-warn md-input-container.md-input-focused md-icon{color:\\\"{{warn-A700}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-warn md-progress-linear .md-container{background-color:\\\"{{warn-100}}\\\"}md-autocomplete.md-THEME_NAME-theme.md-warn md-progress-linear .md-bar{background-color:\\\"{{warn-color}}\\\"}.md-autocomplete-standard-list-container.md-THEME_NAME-theme,.md-autocomplete-suggestions-container.md-THEME_NAME-theme{background:\\\"{{background-hue-1}}\\\"}.md-autocomplete-standard-list-container.md-THEME_NAME-theme .md-autocomplete-suggestion,.md-autocomplete-suggestions-container.md-THEME_NAME-theme .md-autocomplete-suggestion{color:\\\"{{foreground-1}}\\\"}.md-autocomplete-standard-list-container.md-THEME_NAME-theme .md-autocomplete-suggestion.selected,.md-autocomplete-standard-list-container.md-THEME_NAME-theme .md-autocomplete-suggestion:hover,.md-autocomplete-suggestions-container.md-THEME_NAME-theme .md-autocomplete-suggestion.selected,.md-autocomplete-suggestions-container.md-THEME_NAME-theme .md-autocomplete-suggestion:hover{background:\\\"{{background-500-0.18}}\\\"}md-backdrop{background-color:\\\"{{background-900-0.0}}\\\"}md-backdrop.md-opaque.md-THEME_NAME-theme{background-color:\\\"{{background-900-1.0}}\\\"}md-bottom-sheet.md-THEME_NAME-theme{background-color:\\\"{{background-color}}\\\";border-top-color:\\\"{{background-hue-3}}\\\"}md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item{color:\\\"{{foreground-1}}\\\"}md-bottom-sheet.md-THEME_NAME-theme .md-subheader{background-color:\\\"{{background-color}}\\\";color:\\\"{{foreground-1}}\\\"}.md-button.md-THEME_NAME-theme:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme:not([disabled]):hover{background-color:\\\"{{background-500-0.2}}\\\"}.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover{background-color:transparent}.md-button.md-THEME_NAME-theme.md-fab{background-color:\\\"{{accent-color}}\\\";color:\\\"{{accent-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-fab md-icon{color:\\\"{{accent-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover{background-color:\\\"{{accent-A700}}\\\"}.md-button.md-THEME_NAME-theme.md-primary{color:\\\"{{primary-color}}\\\"}.md-button.md-THEME_NAME-theme.md-primary.md-fab,.md-button.md-THEME_NAME-theme.md-primary.md-raised{background-color:\\\"{{primary-color}}\\\";color:\\\"{{primary-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon{color:\\\"{{primary-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover{background-color:\\\"{{primary-600}}\\\"}.md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon{color:\\\"{{primary-color}}\\\"}.md-button.md-THEME_NAME-theme.md-raised{background-color:\\\"{{background-50}}\\\";color:\\\"{{background-900}}\\\"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]) md-icon{color:\\\"{{background-900}}\\\"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover{background-color:\\\"{{background-50}}\\\"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused{background-color:\\\"{{background-200}}\\\"}.md-button.md-THEME_NAME-theme.md-warn{color:\\\"{{warn-color}}\\\"}.md-button.md-THEME_NAME-theme.md-warn.md-fab,.md-button.md-THEME_NAME-theme.md-warn.md-raised{background-color:\\\"{{warn-color}}\\\";color:\\\"{{warn-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon{color:\\\"{{warn-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover{background-color:\\\"{{warn-600}}\\\"}.md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon{color:\\\"{{warn-color}}\\\"}.md-button.md-THEME_NAME-theme.md-accent{color:\\\"{{accent-color}}\\\"}.md-button.md-THEME_NAME-theme.md-accent.md-fab,.md-button.md-THEME_NAME-theme.md-accent.md-raised{background-color:\\\"{{accent-color}}\\\";color:\\\"{{accent-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon{color:\\\"{{accent-contrast}}\\\"}.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover{background-color:\\\"{{accent-A700}}\\\"}.md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon{color:\\\"{{accent-color}}\\\"}.md-button.md-THEME_NAME-theme.md-accent[disabled],.md-button.md-THEME_NAME-theme.md-fab[disabled],.md-button.md-THEME_NAME-theme.md-raised[disabled],.md-button.md-THEME_NAME-theme.md-warn[disabled],.md-button.md-THEME_NAME-theme[disabled]{color:\\\"{{foreground-3}}\\\";cursor:default}.md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon,.md-button.md-THEME_NAME-theme[disabled] md-icon{color:\\\"{{foreground-3}}\\\"}.md-button.md-THEME_NAME-theme.md-fab[disabled],.md-button.md-THEME_NAME-theme.md-raised[disabled]{background-color:\\\"{{foreground-4}}\\\"}.md-button.md-THEME_NAME-theme[disabled]{background-color:transparent}._md a.md-THEME_NAME-theme:not(.md-button).md-primary{color:\\\"{{primary-color}}\\\"}._md a.md-THEME_NAME-theme:not(.md-button).md-primary:hover{color:\\\"{{primary-700}}\\\"}._md a.md-THEME_NAME-theme:not(.md-button).md-accent{color:\\\"{{accent-color}}\\\"}._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover{color:\\\"{{accent-A700}}\\\"}._md a.md-THEME_NAME-theme:not(.md-button).md-warn{color:\\\"{{warn-color}}\\\"}._md a.md-THEME_NAME-theme:not(.md-button).md-warn:hover{color:\\\"{{warn-700}}\\\"}md-card.md-THEME_NAME-theme{background-color:\\\"{{background-hue-1}}\\\";border-radius:2px;color:\\\"{{foreground-1}}\\\"}md-card.md-THEME_NAME-theme .md-card-image{border-radius:2px 2px 0 0}md-card.md-THEME_NAME-theme md-card-header md-card-avatar md-icon{background-color:\\\"{{foreground-3}}\\\";color:\\\"{{background-color}}\\\"}md-card.md-THEME_NAME-theme md-card-header md-card-header-text .md-subhead,md-card.md-THEME_NAME-theme md-card-title md-card-title-text:not(:only-child) .md-subhead{color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme .md-ripple{color:\\\"{{accent-A700}}\\\"}md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple{color:\\\"{{background-600}}\\\"}md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before{background-color:\\\"{{accent-color-0.26}}\\\"}md-checkbox.md-THEME_NAME-theme .md-ink-ripple{color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:\\\"{{accent-color-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme:not(.md-checked) .md-icon{border-color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme.md-checked .md-icon{background-color:\\\"{{accent-color-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after{border-color:\\\"{{background-default}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple{color:\\\"{{primary-600}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple{color:\\\"{{background-600}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ink-ripple{color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple{color:\\\"{{primary-color-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary:not(.md-checked) .md-icon{border-color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon{background-color:\\\"{{primary-color-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before{background-color:\\\"{{primary-color-0.26}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after{border-color:\\\"{{primary-contrast-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-indeterminate[disabled] .md-container{color:\\\"{{foreground-3}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple{color:\\\"{{warn-600}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ink-ripple{color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple{color:\\\"{{warn-color-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn:not(.md-checked) .md-icon{border-color:\\\"{{foreground-2}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon{background-color:\\\"{{warn-color-0.87}}\\\"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before{background-color:\\\"{{warn-color-0.26}}\\\"}md-checkbox.md-THEME_NAME-theme[disabled]:not(.md-checked) .md-icon{border-color:\\\"{{foreground-3}}\\\"}md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon{background-color:\\\"{{foreground-3}}\\\"}md-checkbox.md-THEME_NAME-theme[disabled] .md-label{color:\\\"{{foreground-3}}\\\"}md-chips.md-THEME_NAME-theme .md-chips{box-shadow:0 1px \\\"{{foreground-4}}\\\"}md-chips.md-THEME_NAME-theme .md-chips.md-focused{box-shadow:0 2px \\\"{{primary-color}}\\\"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input{color:\\\"{{foreground-1}}\\\"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder{color:\\\"{{foreground-3}}\\\"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-ms-input-placeholder{color:\\\"{{foreground-3}}\\\"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-ms-input-placeholder{color:\\\"{{foreground-3}}\\\"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::placeholder{color:\\\"{{foreground-3}}\\\"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-moz-placeholder,md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-moz-placeholder{color:\\\"{{foreground-3}}\\\";opacity:1}md-chips.md-THEME_NAME-theme md-chip{background:\\\"{{background-300}}\\\";color:\\\"{{background-800}}\\\"}md-chips.md-THEME_NAME-theme md-chip md-icon{color:\\\"{{background-700}}\\\"}md-chips.md-THEME_NAME-theme md-chip.md-focused{background:\\\"{{primary-color}}\\\";color:\\\"{{primary-contrast}}\\\"}md-chips.md-THEME_NAME-theme md-chip.md-focused md-icon{color:\\\"{{primary-contrast}}\\\"}md-chips.md-THEME_NAME-theme md-chip._md-chip-editing{background:transparent;color:\\\"{{background-800}}\\\"}md-chips.md-THEME_NAME-theme .md-chip-remove-container button.md-chip-remove md-icon,md-chips.md-THEME_NAME-theme .md-chip-remove-container buttonmd-chip-remove md-icon{fill:\\\"{{foreground-2}}\\\";color:\\\"{{foreground-2}}\\\"}.md-contact-suggestion span.md-contact-email{color:\\\"{{background-400}}\\\"}md-content.md-THEME_NAME-theme{background-color:\\\"{{background-default}}\\\";color:\\\"{{foreground-1}}\\\"}.md-THEME_NAME-theme .md-calendar{background:\\\"{{background-hue-1}}\\\";color:\\\"{{foreground-1-0.87}}\\\"}.md-THEME_NAME-theme .md-calendar tr:last-child td{border-bottom-color:\\\"{{background-hue-2}}\\\"}.md-THEME_NAME-theme .md-calendar-day-header{background:\\\"{{background-500-0.32}}\\\";color:\\\"{{foreground-1-0.87}}\\\"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator{border:1px solid \\\"{{primary-500}}\\\"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today.md-calendar-date-disabled{color:\\\"{{primary-500-0.6}}\\\"}.md-calendar-date.md-focus .md-THEME_NAME-theme .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date-selection-indicator:hover{background:\\\"{{background-500-0.32}}\\\"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator{background:\\\"{{primary-500}}\\\";border-color:transparent;color:\\\"{{primary-500-contrast}}\\\"}.md-THEME_NAME-theme .md-calendar-date-disabled,.md-THEME_NAME-theme .md-calendar-month-label-disabled{color:\\\"{{foreground-3}}\\\"}.md-THEME_NAME-theme .md-calendar-month-label md-icon,.md-THEME_NAME-theme .md-datepicker-input{color:\\\"{{foreground-1}}\\\"}.md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder{color:\\\"{{foreground-3}}\\\"}.md-THEME_NAME-theme .md-datepicker-input:-ms-input-placeholder{color:\\\"{{foreground-3}}\\\"}.md-THEME_NAME-theme .md-datepicker-input::-ms-input-placeholder{color:\\\"{{foreground-3}}\\\"}.md-THEME_NAME-theme .md-datepicker-input::placeholder{color:\\\"{{foreground-3}}\\\"}.md-THEME_NAME-theme .md-datepicker-input:-moz-placeholder,.md-THEME_NAME-theme .md-datepicker-input::-moz-placeholder{color:\\\"{{foreground-3}}\\\";opacity:1}.md-THEME_NAME-theme .md-datepicker-input-container{border-bottom-color:\\\"{{foreground-4}}\\\"}.md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:\\\"{{primary-color}}\\\"}.md-accent .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:\\\"{{accent-color}}\\\"}.md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-invalid,.md-warn .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:\\\"{{warn-A700}}\\\"}.md-THEME_NAME-theme .md-datepicker-calendar-pane{border-color:\\\"{{background-hue-1}}\\\"}.md-THEME_NAME-theme .md-datepicker-triangle-button .md-datepicker-expand-triangle{border-top-color:\\\"{{foreground-2}}\\\"}.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon{color:\\\"{{primary-color}}\\\"}.md-accent .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon,.md-THEME_NAME-theme .md-datepicker-open.md-accent .md-datepicker-calendar-icon{color:\\\"{{accent-color}}\\\"}.md-THEME_NAME-theme .md-datepicker-open.md-warn .md-datepicker-calendar-icon,.md-warn .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon{color:\\\"{{warn-A700}}\\\"}.md-THEME_NAME-theme .md-datepicker-calendar{background:\\\"{{background-hue-1}}\\\"}.md-THEME_NAME-theme .md-datepicker-input-mask-opaque{box-shadow:0 0 0 9999px \\\"{{background-hue-1}}\\\"}.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-input-container{background:\\\"{{background-hue-1}}\\\"}md-dialog.md-THEME_NAME-theme{background-color:\\\"{{background-hue-1}}\\\";border-radius:4px;color:\\\"{{foreground-1}}\\\"}md-dialog.md-THEME_NAME-theme.md-content-overflow md-dialog-actions{border-top-color:\\\"{{foreground-4}}\\\"}md-divider.md-THEME_NAME-theme{border-color:\\\"{{foreground-4}}\\\"}md-fab-speed-dial.md-THEME_NAME-theme md-fab-trigger .md-fab.md-button[disabled]{background-color:\\\"{{foreground-4}}\\\"}md-fab-speed-dial.md-THEME_NAME-theme md-fab-actions .md-fab-action-item .md-button.md-fab.md-raised.md-mini.md-focused,md-fab-speed-dial.md-THEME_NAME-theme md-fab-actions .md-fab-action-item .md-button.md-fab.md-raised.md-mini:hover{background-color:\\\"{{background-500}}\\\"}md-icon.md-THEME_NAME-theme{color:\\\"{{foreground-2}}\\\"}md-icon.md-THEME_NAME-theme.md-primary{color:\\\"{{primary-color}}\\\"}md-icon.md-THEME_NAME-theme.md-accent{color:\\\"{{accent-color}}\\\"}md-icon.md-THEME_NAME-theme.md-warn{color:\\\"{{warn-color}}\\\"}md-input-container.md-THEME_NAME-theme .md-input{border-color:\\\"{{background-default-contrast-divider}}\\\";color:\\\"{{background-default-contrast}}\\\"}md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme .md-input::-ms-input-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme .md-input::placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder,md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\";opacity:1}md-input-container.md-THEME_NAME-theme>md-icon{color:\\\"{{background-default-contrast}}\\\"}md-input-container.md-THEME_NAME-theme .md-placeholder,md-input-container.md-THEME_NAME-theme label{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme label.md-required:after{color:\\\"{{warn-A700}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-focused):not(.md-input-invalid) label.md-required:after{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme .md-input-message-animation,md-input-container.md-THEME_NAME-theme .md-input-messages-animation{color:\\\"{{warn-A700}}\\\"}md-input-container.md-THEME_NAME-theme .md-input-message-animation .md-char-counter,md-input-container.md-THEME_NAME-theme .md-input-messages-animation .md-char-counter{color:\\\"{{background-default-contrast}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-webkit-input-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input:-ms-input-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-ms-input-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::placeholder{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input:-moz-placeholder,md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-moz-placeholder{color:\\\"{{background-default-contrast-secondary}}\\\";opacity:1}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label{color:\\\"{{background-default-contrast-secondary}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-resized .md-input{border-color:\\\"{{primary-color}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon{color:\\\"{{primary-color}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input{border-color:\\\"{{accent-color}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent md-icon{color:\\\"{{accent-color}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input{border-color:\\\"{{warn-A700}}\\\"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn md-icon{color:\\\"{{warn-A700}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input{border-color:\\\"{{warn-A700}}\\\"}md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input-message-animation,md-input-container.md-THEME_NAME-theme.md-input-invalid label{color:\\\"{{warn-A700}}\\\"}[disabled] md-input-container.md-THEME_NAME-theme .md-input,md-input-container.md-THEME_NAME-theme .md-input[disabled]{background-image:linear-gradient(90deg,\\\"{{background-default-contrast-disabled}}\\\" 0,\\\"{{background-default-contrast-disabled}}\\\" 33%,transparent 0);background-image:-ms-linear-gradient(left,transparent 0,\\\"{{background-default-contrast-disabled}}\\\" 100%);border-bottom-color:transparent;color:\\\"{{background-default-contrast-disabled}}\\\"}md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4{color:\\\"{{foreground-1}}\\\"}md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p{color:\\\"{{foreground-2}}\\\"}md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style{background-color:\\\"{{background-100}}\\\"}md-list.md-THEME_NAME-theme md-list-item .md-avatar-icon{background-color:\\\"{{foreground-3}}\\\";color:\\\"{{background-color}}\\\"}md-list.md-THEME_NAME-theme md-list-item>md-icon{color:\\\"{{foreground-2}}\\\"}md-list.md-THEME_NAME-theme md-list-item>md-icon.md-highlight{color:\\\"{{primary-color}}\\\"}md-list.md-THEME_NAME-theme md-list-item>md-icon.md-highlight.md-accent{color:\\\"{{accent-color}}\\\"}md-menu-content.md-THEME_NAME-theme{background-color:\\\"{{background-hue-1}}\\\"}md-menu-content.md-THEME_NAME-theme md-menu-item{color:\\\"{{foreground-1}}\\\"}md-menu-content.md-THEME_NAME-theme md-menu-item md-icon{color:\\\"{{foreground-2}}\\\"}md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled],md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] md-icon{color:\\\"{{foreground-3}}\\\"}md-menu-content.md-THEME_NAME-theme md-menu-divider{background-color:\\\"{{foreground-4}}\\\"}md-menu-bar.md-THEME_NAME-theme>button.md-button{border-radius:2px;color:\\\"{{foreground-1}}\\\"}md-menu-bar.md-THEME_NAME-theme md-menu>button{color:\\\"{{foreground-1}}\\\"}md-menu-bar.md-THEME_NAME-theme md-menu.md-open>button,md-menu-bar.md-THEME_NAME-theme md-menu>button:focus{background-color:\\\"{{ background-500-0.18}}\\\";outline:none}md-menu-bar.md-THEME_NAME-theme.md-open:not(.md-keyboard-mode) md-menu:hover>button{background-color:\\\"{{ background-500-0.18}}\\\"}md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:focus,md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:hover{background:transparent}md-menu-content.md-THEME_NAME-theme .md-menu>.md-button:after{color:\\\"{{foreground-2}}\\\"}md-menu-content.md-THEME_NAME-theme .md-menu.md-open>.md-button{background-color:\\\"{{ background-500-0.18}}\\\"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar{background-color:\\\"{{background-hue-1}}\\\";color:\\\"{{foreground-1}}\\\"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler{background-color:\\\"{{primary-color}}\\\";color:\\\"{{primary-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler md-icon{color:\\\"{{primary-contrast}}\\\"}md-nav-bar.md-THEME_NAME-theme .md-nav-bar{background-color:transparent;border-color:\\\"{{foreground-4}}\\\"}md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button.md-unselected{color:\\\"{{foreground-2}}\\\"}md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button[disabled]{color:\\\"{{foreground-3}}\\\"}md-nav-bar.md-THEME_NAME-theme md-nav-ink-bar{background:\\\"{{accent-color}}\\\";color:\\\"{{accent-color}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar{background-color:\\\"{{accent-color}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button{color:\\\"{{accent-A100}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-focused{color:\\\"{{accent-contrast}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-focused{background:\\\"{{accent-contrast-0.1}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar md-nav-ink-bar{background:\\\"{{primary-600-1}}\\\";color:\\\"{{primary-600-1}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar{background-color:\\\"{{warn-color}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button{color:\\\"{{warn-100}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-focused{color:\\\"{{warn-contrast}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-focused{background:\\\"{{warn-contrast-0.1}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar{background-color:\\\"{{primary-color}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button{color:\\\"{{primary-100}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-focused{color:\\\"{{primary-contrast}}\\\"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-focused{background:\\\"{{primary-contrast-0.1}}\\\"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:\\\"{{primary-color}}\\\"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:\\\"{{primary-100}}\\\"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:\\\"{{primary-contrast}}\\\"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:\\\"{{primary-contrast-0.1}}\\\"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:\\\"{{accent-color}}\\\"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:\\\"{{accent-A100}}\\\"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:\\\"{{accent-contrast}}\\\"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:\\\"{{accent-contrast-0.1}}\\\"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar md-nav-ink-bar{background:\\\"{{primary-600-1}}\\\";color:\\\"{{primary-600-1}}\\\"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:\\\"{{warn-color}}\\\"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:\\\"{{warn-100}}\\\"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:\\\"{{warn-contrast}}\\\"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:\\\"{{warn-contrast-0.1}}\\\"}._md-panel-backdrop.md-THEME_NAME-theme{background-color:\\\"{{background-900-1.0}}\\\"}md-progress-circular.md-THEME_NAME-theme path{stroke:\\\"{{primary-color}}\\\"}md-progress-circular.md-THEME_NAME-theme.md-warn path{stroke:\\\"{{warn-color}}\\\"}md-progress-circular.md-THEME_NAME-theme.md-accent path{stroke:\\\"{{accent-color}}\\\"}md-progress-linear.md-THEME_NAME-theme .md-container{background-color:\\\"{{primary-100}}\\\"}md-progress-linear.md-THEME_NAME-theme .md-bar{background-color:\\\"{{primary-color}}\\\"}md-progress-linear.md-THEME_NAME-theme.md-warn .md-container{background-color:\\\"{{warn-100}}\\\"}md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar{background-color:\\\"{{warn-color}}\\\"}md-progress-linear.md-THEME_NAME-theme.md-accent .md-container{background-color:\\\"{{accent-100}}\\\"}md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar{background-color:\\\"{{accent-color}}\\\"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-primary .md-bar1{background-color:\\\"{{primary-100}}\\\"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-primary .md-dashed:before{background:radial-gradient(\\\"{{primary-100}}\\\" 0,\\\"{{primary-100}}\\\" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1{background-color:\\\"{{warn-100}}\\\"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before{background:radial-gradient(\\\"{{warn-100}}\\\" 0,\\\"{{warn-100}}\\\" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1{background-color:\\\"{{accent-100}}\\\"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before{background:radial-gradient(\\\"{{accent-100}}\\\" 0,\\\"{{accent-100}}\\\" 16%,transparent 42%)}md-radio-button.md-THEME_NAME-theme .md-off{border-color:\\\"{{foreground-2}}\\\"}md-radio-button.md-THEME_NAME-theme .md-on{background-color:\\\"{{accent-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme.md-checked .md-off{border-color:\\\"{{accent-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:\\\"{{accent-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme .md-container .md-ripple{color:\\\"{{accent-A700}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on{background-color:\\\"{{primary-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off{border-color:\\\"{{primary-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple{color:\\\"{{primary-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple{color:\\\"{{primary-600}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on{background-color:\\\"{{warn-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off{border-color:\\\"{{warn-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple{color:\\\"{{warn-color-0.87}}\\\"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple{color:\\\"{{warn-600}}\\\"}md-radio-button.md-THEME_NAME-theme[disabled],md-radio-group.md-THEME_NAME-theme[disabled]{color:\\\"{{foreground-3}}\\\"}md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off,md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on,md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off,md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on{border-color:\\\"{{foreground-3}}\\\"}md-radio-group.md-THEME_NAME-theme .md-checked .md-ink-ripple{color:\\\"{{accent-color-0.26}}\\\"}md-radio-group.md-THEME_NAME-theme .md-checked:not([disabled]).md-primary .md-ink-ripple,md-radio-group.md-THEME_NAME-theme.md-primary .md-checked:not([disabled]) .md-ink-ripple{color:\\\"{{primary-color-0.26}}\\\"}md-radio-group.md-THEME_NAME-theme.md-focused.ng-empty>md-radio-button:first-child .md-container:before{background-color:\\\"{{foreground-3-0.26}}\\\"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before{background-color:\\\"{{accent-color-0.26}}\\\"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-primary .md-checked .md-container:before{background-color:\\\"{{primary-color-0.26}}\\\"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-warn .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-warn .md-checked .md-container:before{background-color:\\\"{{warn-color-0.26}}\\\"}md-input-container md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:\\\"{{warn-A700}}\\\"}md-input-container:not(.md-input-focused):not(.md-input-invalid) md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:\\\"{{foreground-3}}\\\"}md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value,md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder{color:\\\"{{primary-color}}\\\"}md-input-container.md-input-invalid md-select.md-THEME_NAME-theme .md-select-value{border-bottom-color:\\\"{{warn-A700}}\\\"!important;color:\\\"{{warn-A700}}\\\"!important}md-input-container.md-input-invalid md-select.md-THEME_NAME-theme.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-input-container:not(.md-input-invalid).md-input-focused.md-accent .md-select-value{border-color:\\\"{{accent-color}}\\\"}md-input-container:not(.md-input-invalid).md-input-focused.md-accent .md-select-value span{color:\\\"{{accent-color}}\\\"}md-input-container:not(.md-input-invalid).md-input-focused.md-warn .md-select-value{border-color:\\\"{{warn-A700}}\\\"}md-input-container:not(.md-input-invalid).md-input-focused.md-warn .md-select-value span{color:\\\"{{warn-A700}}\\\"}md-select.md-THEME_NAME-theme[disabled] .md-select-value{background-image:linear-gradient(90deg,\\\"{{foreground-3}}\\\" 0,\\\"{{foreground-3}}\\\" 33%,transparent 0);background-image:-ms-linear-gradient(left,transparent 0,\\\"{{foreground-3}}\\\" 100%);border-bottom-color:transparent}md-select.md-THEME_NAME-theme .md-select-value{border-bottom-color:\\\"{{foreground-4}}\\\"}md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder{color:\\\"{{foreground-3}}\\\"}md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:\\\"{{warn-A700}}\\\"}md-select.md-THEME_NAME-theme.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme.ng-invalid.ng-touched .md-select-value{border-bottom-color:\\\"{{warn-A700}}\\\"!important;color:\\\"{{warn-A700}}\\\"!important}md-select.md-THEME_NAME-theme.ng-invalid.ng-touched.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value{border-bottom-color:\\\"{{primary-color}}\\\";color:\\\"{{ foreground-1 }}\\\"}md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value.md-select-placeholder{color:\\\"{{ foreground-1 }}\\\"}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-value{border-bottom-color:\\\"{{accent-color}}\\\"}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-value{border-bottom-color:\\\"{{warn-color}}\\\"}md-select.md-THEME_NAME-theme[disabled] .md-select-icon,md-select.md-THEME_NAME-theme[disabled] .md-select-value,md-select.md-THEME_NAME-theme[disabled] .md-select-value.md-select-placeholder{color:\\\"{{foreground-3}}\\\"}md-select.md-THEME_NAME-theme .md-select-icon{color:\\\"{{foreground-2}}\\\"}md-select-menu.md-THEME_NAME-theme md-content{background-color:\\\"{{background-hue-1}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-optgroup{color:\\\"{{foreground-2}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option{color:\\\"{{foreground-1}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option[disabled] .md-text{color:\\\"{{foreground-3}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):hover{background-color:\\\"{{background-500-0.10}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]).md-focused,md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):focus{background-color:\\\"{{background-500-0.18}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected]{color:\\\"{{primary-500}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-focused,md-select-menu.md-THEME_NAME-theme md-content md-option[selected]:focus{color:\\\"{{primary-600}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent{color:\\\"{{accent-color}}\\\"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent.md-focused,md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent:focus{color:\\\"{{accent-A700}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme .md-ripple{color:\\\"{{primary-600}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ripple{color:\\\"{{background-600}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme .md-ink-ripple{color:\\\"{{foreground-2}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ink-ripple{color:\\\"{{primary-color-0.87}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme:not(.md-checked) .md-icon{border-color:\\\"{{foreground-2}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon{background-color:\\\"{{primary-color-0.87}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme[selected].md-focused .md-container:before{background-color:\\\"{{primary-color-0.26}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon:after{border-color:\\\"{{primary-contrast-0.87}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme .md-indeterminate[disabled] .md-container{color:\\\"{{foreground-3}}\\\"}.md-checkbox-enabled.md-THEME_NAME-theme md-option .md-text{color:\\\"{{foreground-1}}\\\"}md-sidenav.md-THEME_NAME-theme,md-sidenav.md-THEME_NAME-theme md-content{background-color:\\\"{{background-hue-1}}\\\"}md-slider.md-THEME_NAME-theme .md-track{background-color:\\\"{{foreground-3}}\\\"}md-slider.md-THEME_NAME-theme .md-track-ticks{color:\\\"{{background-contrast}}\\\"}md-slider.md-THEME_NAME-theme .md-focus-ring{background-color:\\\"{{accent-A200-0.2}}\\\"}md-slider.md-THEME_NAME-theme .md-disabled-thumb{background-color:\\\"{{background-color}}\\\";border-color:\\\"{{background-color}}\\\"}md-slider.md-THEME_NAME-theme.md-min .md-thumb:after{background-color:\\\"{{background-color}}\\\";border-color:\\\"{{foreground-3}}\\\"}md-slider.md-THEME_NAME-theme.md-min .md-focus-ring{background-color:\\\"{{foreground-3-0.38}}\\\"}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-thumb:after{background-color:\\\"{{background-contrast}}\\\";border-color:transparent}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign{background-color:\\\"{{background-400}}\\\"}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign:after{border-top-color:\\\"{{background-400}}\\\"}md-slider.md-THEME_NAME-theme.md-min[md-discrete][md-vertical] .md-sign:after{border-left-color:\\\"{{background-400}}\\\";border-top-color:transparent}md-slider.md-THEME_NAME-theme .md-track.md-track-fill{background-color:\\\"{{accent-color}}\\\"}md-slider.md-THEME_NAME-theme .md-thumb:after{background-color:\\\"{{accent-color}}\\\";border-color:\\\"{{accent-color}}\\\"}md-slider.md-THEME_NAME-theme .md-sign{background-color:\\\"{{accent-color}}\\\"}md-slider.md-THEME_NAME-theme .md-sign:after{border-top-color:\\\"{{accent-color}}\\\"}md-slider.md-THEME_NAME-theme[md-vertical] .md-sign:after{border-left-color:\\\"{{accent-color}}\\\";border-top-color:transparent}md-slider.md-THEME_NAME-theme .md-thumb-text{color:\\\"{{accent-contrast}}\\\"}md-slider.md-THEME_NAME-theme.md-warn .md-focus-ring{background-color:\\\"{{warn-200-0.38}}\\\"}md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill{background-color:\\\"{{warn-color}}\\\"}md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after{background-color:\\\"{{warn-color}}\\\";border-color:\\\"{{warn-color}}\\\"}md-slider.md-THEME_NAME-theme.md-warn .md-sign{background-color:\\\"{{warn-color}}\\\"}md-slider.md-THEME_NAME-theme.md-warn .md-sign:after{border-top-color:\\\"{{warn-color}}\\\"}md-slider.md-THEME_NAME-theme.md-warn[md-vertical] .md-sign:after{border-left-color:\\\"{{warn-color}}\\\";border-top-color:transparent}md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text{color:\\\"{{warn-contrast}}\\\"}md-slider.md-THEME_NAME-theme.md-primary .md-focus-ring{background-color:\\\"{{primary-200-0.38}}\\\"}md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill{background-color:\\\"{{primary-color}}\\\"}md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after{background-color:\\\"{{primary-color}}\\\";border-color:\\\"{{primary-color}}\\\"}md-slider.md-THEME_NAME-theme.md-primary .md-sign{background-color:\\\"{{primary-color}}\\\"}md-slider.md-THEME_NAME-theme.md-primary .md-sign:after{border-top-color:\\\"{{primary-color}}\\\"}md-slider.md-THEME_NAME-theme.md-primary[md-vertical] .md-sign:after{border-left-color:\\\"{{primary-color}}\\\";border-top-color:transparent}md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text{color:\\\"{{primary-contrast}}\\\"}md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after{border-color:transparent}md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after,md-slider.md-THEME_NAME-theme[disabled][md-discrete] .md-thumb:after{background-color:\\\"{{foreground-3}}\\\";border-color:transparent}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign{background-color:\\\"{{background-400}}\\\"}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign:after{border-top-color:\\\"{{background-400}}\\\"}md-slider.md-THEME_NAME-theme[disabled][readonly][md-vertical] .md-sign:after{border-left-color:\\\"{{background-400}}\\\";border-top-color:transparent}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-disabled-thumb{background-color:transparent;border-color:transparent}md-slider-container[disabled]>:first-child:not(md-slider),md-slider-container[disabled]>:last-child:not(md-slider){color:\\\"{{foreground-3}}\\\"}.md-subheader.md-THEME_NAME-theme{background-color:\\\"{{background-default}}\\\";color:\\\"{{ foreground-2-0.54 }}\\\"}.md-subheader.md-THEME_NAME-theme.md-primary{color:\\\"{{primary-color}}\\\"}.md-subheader.md-THEME_NAME-theme.md-accent{color:\\\"{{accent-color}}\\\"}.md-subheader.md-THEME_NAME-theme.md-warn{color:\\\"{{warn-color}}\\\"}md-switch.md-THEME_NAME-theme .md-ink-ripple{color:\\\"{{background-500}}\\\"}md-switch.md-THEME_NAME-theme .md-thumb{background-color:\\\"{{background-50}}\\\"}md-switch.md-THEME_NAME-theme .md-bar{background-color:\\\"{{background-500}}\\\"}md-switch.md-THEME_NAME-theme.md-focused:not(.md-checked) .md-thumb:before,md-switch.md-THEME_NAME-theme.md-focused[disabled] .md-thumb:before{background-color:\\\"{{foreground-4}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]) .md-ink-ripple{color:\\\"{{accent-color}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]) .md-thumb{background-color:\\\"{{accent-color}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]) .md-bar{background-color:\\\"{{accent-color-0.5}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-focused .md-thumb:before{background-color:\\\"{{accent-color-0.26}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary .md-ink-ripple{color:\\\"{{primary-color}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary .md-thumb{background-color:\\\"{{primary-color}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary .md-bar{background-color:\\\"{{primary-color-0.5}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary.md-focused .md-thumb:before{background-color:\\\"{{primary-color-0.26}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn .md-ink-ripple{color:\\\"{{warn-color}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn .md-thumb{background-color:\\\"{{warn-color}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn .md-bar{background-color:\\\"{{warn-color-0.5}}\\\"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn.md-focused .md-thumb:before{background-color:\\\"{{warn-color-0.26}}\\\"}md-switch.md-THEME_NAME-theme[disabled] .md-thumb{background-color:\\\"{{background-400}}\\\"}md-switch.md-THEME_NAME-theme[disabled] .md-bar{background-color:\\\"{{foreground-4}}\\\"}md-tabs.md-THEME_NAME-theme md-tabs-wrapper{background-color:transparent;border-color:\\\"{{foreground-4}}\\\"}md-tabs.md-THEME_NAME-theme md-next-button md-icon,md-tabs.md-THEME_NAME-theme md-prev-button md-icon{color:\\\"{{foreground-2}}\\\"}md-tabs.md-THEME_NAME-theme md-ink-bar{background:\\\"{{accent-color}}\\\";color:\\\"{{accent-color}}\\\"}md-tabs.md-THEME_NAME-theme .md-tab{color:\\\"{{foreground-2}}\\\"}md-tabs.md-THEME_NAME-theme .md-tab[disabled],md-tabs.md-THEME_NAME-theme .md-tab[disabled] md-icon{color:\\\"{{foreground-3}}\\\"}md-tabs.md-THEME_NAME-theme .md-tab.md-active,md-tabs.md-THEME_NAME-theme .md-tab.md-active md-icon,md-tabs.md-THEME_NAME-theme .md-tab.md-focused,md-tabs.md-THEME_NAME-theme .md-tab.md-focused md-icon{color:\\\"{{accent-color}}\\\"}md-tabs.md-THEME_NAME-theme .md-tab.md-focused{background:\\\"{{primary-color-0.1}}\\\"}md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container{color:\\\"{{accent-A100}}\\\"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper{background-color:\\\"{{accent-500}}\\\"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper md-next-button md-icon,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper md-prev-button md-icon{color:\\\"{{accent-500-contrast-0.7}}\\\"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:\\\"{{accent-500-contrast-1}}\\\"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:\\\"{{accent-500-contrast-0.1}}\\\"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{accent-500-contrast}}\\\";color:\\\"{{accent-500-contrast}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper{background-color:\\\"{{primary-color}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper md-next-button md-icon,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper md-prev-button md-icon{color:\\\"{{primary-contrast}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:\\\"{{primary-contrast-0.7}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:\\\"{{primary-contrast}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:\\\"{{primary-contrast-0.1}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{accent-color}}\\\";color:\\\"{{accent-color}}\\\"}md-tabs.md-THEME_NAME-theme.md-primary.md-no-ink-bar-color>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{primary-contrast}}\\\";color:\\\"{{primary-contrast}}\\\"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper{background-color:\\\"{{warn-500}}\\\"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper md-next-button md-icon,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper md-prev-button md-icon{color:\\\"{{warn-500-contrast}}\\\"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:\\\"{{warn-500-contrast-0.7}}\\\"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:\\\"{{warn-500-contrast-1}}\\\"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:\\\"{{warn-500-contrast-0.1}}\\\"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{warn-500-contrast}}\\\";color:\\\"{{warn-500-contrast}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:\\\"{{primary-color}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper md-next-button md-icon,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper md-prev-button md-icon{color:\\\"{{primary-contrast}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:\\\"{{primary-contrast-0.7}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:\\\"{{primary-contrast}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:\\\"{{primary-contrast-0.1}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{accent-color}}\\\";color:\\\"{{accent-color}}\\\"}md-toolbar>md-tabs.md-THEME_NAME-theme.md-no-ink-bar-color>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{primary-contrast}}\\\";color:\\\"{{primary-contrast}}\\\"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:\\\"{{accent-500}}\\\"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper md-next-button md-icon,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper md-prev-button md-icon{color:\\\"{{accent-500-contrast-0.7}}\\\"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:\\\"{{accent-500-contrast-1}}\\\"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:\\\"{{accent-500-contrast-0.1}}\\\"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{accent-500-contrast}}\\\";color:\\\"{{accent-500-contrast}}\\\"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:\\\"{{warn-500}}\\\"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper md-next-button md-icon,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper md-prev-button md-icon{color:\\\"{{warn-500-contrast}}\\\"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:\\\"{{warn-500-contrast-0.7}}\\\"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:\\\"{{warn-500-contrast-1}}\\\"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:\\\"{{warn-500-contrast-0.1}}\\\"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{background:\\\"{{warn-500-contrast}}\\\";color:\\\"{{warn-500-contrast}}\\\"}md-toast.md-THEME_NAME-theme .md-toast-content{background-color:#323232;color:\\\"{{background-50}}\\\"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button{color:\\\"{{background-50}}\\\"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight{color:\\\"{{accent-color}}\\\"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-primary{color:\\\"{{primary-color}}\\\"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-warn{color:\\\"{{warn-color}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar){background-color:\\\"{{primary-color}}\\\";color:\\\"{{primary-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon{fill:\\\"{{primary-contrast}}\\\";color:\\\"{{primary-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon{fill:\\\"{{primary-contrast-0.26}}\\\";color:\\\"{{primary-contrast-0.26}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input{border-color:\\\"{{primary-default-contrast-divider}}\\\";color:\\\"{{primary-default-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input::-webkit-input-placeholder{color:\\\"{{primary-default-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input:-ms-input-placeholder{color:\\\"{{primary-default-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input::-ms-input-placeholder{color:\\\"{{primary-default-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input::placeholder{color:\\\"{{primary-default-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input:-moz-placeholder,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float] .md-input::-moz-placeholder{color:\\\"{{primary-default-contrast-hint}}\\\";opacity:1}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float].md-input-focused .md-input::-webkit-input-placeholder{color:\\\"{{primary-default-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float].md-input-focused .md-input:-ms-input-placeholder{color:\\\"{{primary-default-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float].md-input-focused .md-input::-ms-input-placeholder{color:\\\"{{primary-default-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float].md-input-focused .md-input::placeholder{color:\\\"{{primary-default-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float].md-input-focused .md-input:-moz-placeholder,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float].md-input-focused .md-input::-moz-placeholder{color:\\\"{{primary-default-contrast-secondary}}\\\";opacity:1}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused .md-input,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float]:not(.md-input-invalid).md-input-resized .md-input{border-color:\\\"{{primary-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused.md-accent .md-input{border-color:\\\"{{accent-color}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused.md-warn .md-input{border-color:\\\"{{warn-A700}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent{background-color:\\\"{{accent-500}}\\\";color:\\\"{{accent-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple{color:\\\"{{accent-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon{fill:\\\"{{accent-500-contrast}}\\\";color:\\\"{{accent-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon{fill:\\\"{{accent-500-contrast-0.26}}\\\";color:\\\"{{accent-500-contrast-0.26}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input{border-color:\\\"{{accent-500-contrast-divider}}\\\";color:\\\"{{accent-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input::-webkit-input-placeholder{color:\\\"{{accent-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input:-ms-input-placeholder{color:\\\"{{accent-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input::-ms-input-placeholder{color:\\\"{{accent-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input::placeholder{color:\\\"{{accent-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input:-moz-placeholder,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input::-moz-placeholder{color:\\\"{{accent-500-contrast-hint}}\\\";opacity:1}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float].md-input-focused .md-input::-webkit-input-placeholder{color:\\\"{{accent-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float].md-input-focused .md-input:-ms-input-placeholder{color:\\\"{{accent-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float].md-input-focused .md-input::-ms-input-placeholder{color:\\\"{{accent-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float].md-input-focused .md-input::placeholder{color:\\\"{{accent-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float].md-input-focused .md-input:-moz-placeholder,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float].md-input-focused .md-input::-moz-placeholder{color:\\\"{{accent-500-contrast-secondary}}\\\";opacity:1}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused .md-input,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float]:not(.md-input-invalid).md-input-resized .md-input{border-color:\\\"{{primary-color}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused.md-accent .md-input{border-color:\\\"{{accent-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused.md-warn .md-input{border-color:\\\"{{warn-A700}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn{background-color:\\\"{{warn-500}}\\\";color:\\\"{{warn-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-icon{fill:\\\"{{warn-500-contrast}}\\\";color:\\\"{{warn-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input{border-color:\\\"{{warn-500-contrast-divider}}\\\";color:\\\"{{warn-500-contrast}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input::-webkit-input-placeholder{color:\\\"{{warn-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input:-ms-input-placeholder{color:\\\"{{warn-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input::-ms-input-placeholder{color:\\\"{{warn-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input::placeholder{color:\\\"{{warn-500-contrast-hint}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input:-moz-placeholder,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float] .md-input::-moz-placeholder{color:\\\"{{warn-500-contrast-hint}}\\\";opacity:1}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float].md-input-focused .md-input::-webkit-input-placeholder{color:\\\"{{warn-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float].md-input-focused .md-input:-ms-input-placeholder{color:\\\"{{warn-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float].md-input-focused .md-input::-ms-input-placeholder{color:\\\"{{warn-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float].md-input-focused .md-input::placeholder{color:\\\"{{warn-500-contrast-secondary}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float].md-input-focused .md-input:-moz-placeholder,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float].md-input-focused .md-input::-moz-placeholder{color:\\\"{{warn-500-contrast-secondary}}\\\";opacity:1}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused .md-input,md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float]:not(.md-input-invalid).md-input-resized .md-input{border-color:\\\"{{primary-color}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused.md-accent .md-input{border-color:\\\"{{accent-color}}\\\"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn md-input-container[md-no-float]:not(.md-input-invalid).md-input-focused.md-warn .md-input{border-color:\\\"{{warn-500-contrast}}\\\"}.md-panel.md-tooltip.md-THEME_NAME-theme{background-color:\\\"{{background-700}}\\\";color:\\\"{{background-700-contrast}}\\\"}body.md-THEME_NAME-theme,html.md-THEME_NAME-theme{background-color:\\\"{{background-color}}\\\";color:\\\"{{foreground-1}}\\\"}\"); \n})();\n\n\n})(window, window.angular);;window.ngMaterial={version:{full: \"1.2.5\"}};","// Should already be required, here for clarity\nrequire('angular');\n\n// Load Angular and dependent libs\nrequire('angular-animate');\nrequire('angular-aria');\n\n// Now load Angular Material\nrequire('./angular-material');\n\n// Export namespace\nmodule.exports = 'ngMaterial';\n","/**\n * @license AngularJS v1.8.3\n * (c) 2010-2020 Google LLC. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\nvar forEach;\nvar isArray;\nvar isString;\nvar jqLite;\n\n/**\n * @ngdoc module\n * @name ngMessages\n * @description\n *\n * The `ngMessages` module provides enhanced support for displaying messages within templates\n * (typically within forms or when rendering message objects that return key/value data).\n * Instead of relying on JavaScript code and/or complex ng-if statements within your form template to\n * show and hide error messages specific to the state of an input field, the `ngMessages` and\n * `ngMessage` directives are designed to handle the complexity, inheritance and priority\n * sequencing based on the order of how the messages are defined in the template.\n *\n * Currently, the ngMessages module only contains the code for the `ngMessages`, `ngMessagesInclude`\n * `ngMessage`, `ngMessageExp` and `ngMessageDefault` directives.\n *\n * ## Usage\n * The `ngMessages` directive allows keys in a key/value collection to be associated with a child element\n * (or 'message') that will show or hide based on the truthiness of that key's value in the collection. A common use\n * case for `ngMessages` is to display error messages for inputs using the `$error` object exposed by the\n * {@link ngModel ngModel} directive.\n *\n * The child elements of the `ngMessages` directive are matched to the collection keys by a `ngMessage` or\n * `ngMessageExp` directive. The value of these attributes must match a key in the collection that is provided by\n * the `ngMessages` directive.\n *\n * Consider the following example, which illustrates a typical use case of `ngMessages`. Within the form `myForm` we\n * have a text input named `myField` which is bound to the scope variable `field` using the {@link ngModel ngModel}\n * directive.\n *\n * The `myField` field is a required input of type `email` with a maximum length of 15 characters.\n *\n * ```html\n * <form name=\"myForm\">\n * <label>\n * Enter text:\n * <input type=\"email\" ng-model=\"field\" name=\"myField\" required maxlength=\"15\" />\n * </label>\n * <div ng-messages=\"myForm.myField.$error\" role=\"alert\">\n * <div ng-message=\"required\">Please enter a value for this field.</div>\n * <div ng-message=\"email\">This field must be a valid email address.</div>\n * <div ng-message=\"maxlength\">This field can be at most 15 characters long.</div>\n * </div>\n * </form>\n * ```\n *\n * In order to show error messages corresponding to `myField` we first create an element with an `ngMessages` attribute\n * set to the `$error` object owned by the `myField` input in our `myForm` form.\n *\n * Within this element we then create separate elements for each of the possible errors that `myField` could have.\n * The `ngMessage` attribute is used to declare which element(s) will appear for which error - for example,\n * setting `ng-message=\"required\"` specifies that this particular element should be displayed when there\n * is no value present for the required field `myField` (because the key `required` will be `true` in the object\n * `myForm.myField.$error`).\n *\n * ### Message order\n *\n * By default, `ngMessages` will only display one message for a particular key/value collection at any time. If more\n * than one message (or error) key is currently true, then which message is shown is determined by the order of messages\n * in the HTML template code (messages declared first are prioritised). This mechanism means the developer does not have\n * to prioritize messages using custom JavaScript code.\n *\n * Given the following error object for our example (which informs us that the field `myField` currently has both the\n * `required` and `email` errors):\n *\n * ```javascript\n * <!-- keep in mind that ngModel automatically sets these error flags -->\n * myField.$error = { required : true, email: true, maxlength: false };\n * ```\n * The `required` message will be displayed to the user since it appears before the `email` message in the DOM.\n * Once the user types a single character, the `required` message will disappear (since the field now has a value)\n * but the `email` message will be visible because it is still applicable.\n *\n * ### Displaying multiple messages at the same time\n *\n * While `ngMessages` will by default only display one error element at a time, the `ng-messages-multiple` attribute can\n * be applied to the `ngMessages` container element to cause it to display all applicable error messages at once:\n *\n * ```html\n * <!-- attribute-style usage -->\n * <div ng-messages=\"myForm.myField.$error\" ng-messages-multiple>...</div>\n *\n * <!-- element-style usage -->\n * <ng-messages for=\"myForm.myField.$error\" multiple>...</ng-messages>\n * ```\n *\n * ## Reusing and Overriding Messages\n * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline\n * template. This allows for generic collection of messages to be reused across multiple parts of an\n * application.\n *\n * ```html\n * <script type=\"text/ng-template\" id=\"error-messages\">\n * <div ng-message=\"required\">This field is required</div>\n * <div ng-message=\"minlength\">This field is too short</div>\n * </script>\n *\n * <div ng-messages=\"myForm.myField.$error\" role=\"alert\">\n * <div ng-messages-include=\"error-messages\"></div>\n * </div>\n * ```\n *\n * However, including generic messages may not be useful enough to match all input fields, therefore,\n * `ngMessages` provides the ability to override messages defined in the remote template by redefining\n * them within the directive container.\n *\n * ```html\n * <!-- a generic template of error messages known as \"my-custom-messages\" -->\n * <script type=\"text/ng-template\" id=\"my-custom-messages\">\n * <div ng-message=\"required\">This field is required</div>\n * <div ng-message=\"minlength\">This field is too short</div>\n * </script>\n *\n * <form name=\"myForm\">\n * <label>\n * Email address\n * <input type=\"email\"\n * id=\"email\"\n * name=\"myEmail\"\n * ng-model=\"email\"\n * minlength=\"5\"\n * required />\n * </label>\n * <!-- any ng-message elements that appear BEFORE the ng-messages-include will\n * override the messages present in the ng-messages-include template -->\n * <div ng-messages=\"myForm.myEmail.$error\" role=\"alert\">\n * <!-- this required message has overridden the template message -->\n * <div ng-message=\"required\">You did not enter your email address</div>\n *\n * <!-- this is a brand new message and will appear last in the prioritization -->\n * <div ng-message=\"email\">Your email address is invalid</div>\n *\n * <!-- and here are the generic error messages -->\n * <div ng-messages-include=\"my-custom-messages\"></div>\n * </div>\n * </form>\n * ```\n *\n * In the example HTML code above the message that is set on required will override the corresponding\n * required message defined within the remote template. Therefore, with particular input fields (such\n * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied\n * while more generic messages can be used to handle other, more general input errors.\n *\n * ## Dynamic Messaging\n * ngMessages also supports using expressions to dynamically change key values. Using arrays and\n * repeaters to list messages is also supported. This means that the code below will be able to\n * fully adapt itself and display the appropriate message when any of the expression data changes:\n *\n * ```html\n * <form name=\"myForm\">\n * <label>\n * Email address\n * <input type=\"email\"\n * name=\"myEmail\"\n * ng-model=\"email\"\n * minlength=\"5\"\n * required />\n * </label>\n * <div ng-messages=\"myForm.myEmail.$error\" role=\"alert\">\n * <div ng-message=\"required\">You did not enter your email address</div>\n * <div ng-repeat=\"errorMessage in errorMessages\">\n * <!-- use ng-message-exp for a message whose key is given by an expression -->\n * <div ng-message-exp=\"errorMessage.type\">{{ errorMessage.text }}</div>\n * </div>\n * </div>\n * </form>\n * ```\n *\n * The `errorMessage.type` expression can be a string value or it can be an array so\n * that multiple errors can be associated with a single error message:\n *\n * ```html\n * <label>\n * Email address\n * <input type=\"email\"\n * ng-model=\"data.email\"\n * name=\"myEmail\"\n * ng-minlength=\"5\"\n * ng-maxlength=\"100\"\n * required />\n * </label>\n * <div ng-messages=\"myForm.myEmail.$error\" role=\"alert\">\n * <div ng-message-exp=\"'required'\">You did not enter your email address</div>\n * <div ng-message-exp=\"['minlength', 'maxlength']\">\n * Your email must be between 5 and 100 characters long\n * </div>\n * </div>\n * ```\n *\n * Feel free to use other structural directives such as ng-if and ng-switch to further control\n * what messages are active and when. Be careful, if you place ng-message on the same element\n * as these structural directives, AngularJS may not be able to determine if a message is active\n * or not. Therefore it is best to place the ng-message on a child element of the structural\n * directive.\n *\n * ```html\n * <div ng-messages=\"myForm.myEmail.$error\" role=\"alert\">\n * <div ng-if=\"showRequiredError\">\n * <div ng-message=\"required\">Please enter something</div>\n * </div>\n * </div>\n * ```\n *\n * ## Animations\n * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and\n * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from\n * the DOM by the `ngMessages` directive.\n *\n * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS\n * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no\n * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can\n * hook into the animations whenever these classes are added/removed.\n *\n * Let's say that our HTML code for our messages container looks like so:\n *\n * ```html\n * <div ng-messages=\"myMessages\" class=\"my-messages\" role=\"alert\">\n * <div ng-message=\"alert\" class=\"some-message\">...</div>\n * <div ng-message=\"fail\" class=\"some-message\">...</div>\n * </div>\n * ```\n *\n * Then the CSS animation code for the message container looks like so:\n *\n * ```css\n * .my-messages {\n * transition:1s linear all;\n * }\n * .my-messages.ng-active {\n * // messages are visible\n * }\n * .my-messages.ng-inactive {\n * // messages are hidden\n * }\n * ```\n *\n * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter\n * and leave animation is triggered for each particular element bound to the `ngMessage` directive.\n *\n * Therefore, the CSS code for the inner messages looks like so:\n *\n * ```css\n * .some-message {\n * transition:1s linear all;\n * }\n *\n * .some-message.ng-enter {}\n * .some-message.ng-enter.ng-enter-active {}\n *\n * .some-message.ng-leave {}\n * .some-message.ng-leave.ng-leave-active {}\n * ```\n *\n * {@link ngAnimate See the ngAnimate docs} to learn how to use JavaScript animations or to learn\n * more about ngAnimate.\n *\n * ## Displaying a default message\n * If the ngMessages renders no inner ngMessage directive (i.e. when none of the truthy\n * keys are matched by a defined message), then it will render a default message\n * using the {@link ngMessageDefault} directive.\n * Note that matched messages will always take precedence over unmatched messages. That means\n * the default message will not be displayed when another message is matched. This is also\n * true for `ng-messages-multiple`.\n *\n * ```html\n * <div ng-messages=\"myForm.myField.$error\" role=\"alert\">\n * <div ng-message=\"required\">This field is required</div>\n * <div ng-message=\"minlength\">This field is too short</div>\n * <div ng-message-default>This field has an input error</div>\n * </div>\n * ```\n *\n\n */\nangular.module('ngMessages', [], function initAngularHelpers() {\n // Access helpers from AngularJS core.\n // Do it inside a `config` block to ensure `window.angular` is available.\n forEach = angular.forEach;\n isArray = angular.isArray;\n isString = angular.isString;\n jqLite = angular.element;\n})\n .info({ angularVersion: '1.8.3' })\n\n /**\n * @ngdoc directive\n * @module ngMessages\n * @name ngMessages\n * @restrict AE\n *\n * @description\n * `ngMessages` is a directive that is designed to show and hide messages based on the state\n * of a key/value object that it listens on. The directive itself complements error message\n * reporting with the `ngModel` $error object (which stores a key/value state of validation errors).\n *\n * `ngMessages` manages the state of internal messages within its container element. The internal\n * messages use the `ngMessage` directive and will be inserted/removed from the page depending\n * on if they're present within the key/value object. By default, only one message will be displayed\n * at a time and this depends on the prioritization of the messages within the template. (This can\n * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.)\n *\n * A remote template can also be used (With {@link ngMessagesInclude}) to promote message\n * reusability and messages can also be overridden.\n *\n * A default message can also be displayed when no `ngMessage` directive is inserted, using the\n * {@link ngMessageDefault} directive.\n *\n * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.\n *\n * @usage\n * ```html\n * <!-- using attribute directives -->\n * <ANY ng-messages=\"expression\" role=\"alert\">\n * <ANY ng-message=\"stringValue\">...</ANY>\n * <ANY ng-message=\"stringValue1, stringValue2, ...\">...</ANY>\n * <ANY ng-message-exp=\"expressionValue\">...</ANY>\n * <ANY ng-message-default>...</ANY>\n * </ANY>\n *\n * <!-- or by using element directives -->\n * <ng-messages for=\"expression\" role=\"alert\">\n * <ng-message when=\"stringValue\">...</ng-message>\n * <ng-message when=\"stringValue1, stringValue2, ...\">...</ng-message>\n * <ng-message when-exp=\"expressionValue\">...</ng-message>\n * <ng-message-default>...</ng-message-default>\n * </ng-messages>\n * ```\n *\n * @param {string} ngMessages an AngularJS expression evaluating to a key/value object\n * (this is typically the $error object on an ngModel instance).\n * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true\n *\n * @example\n * <example name=\"ngMessages-directive\" module=\"ngMessagesExample\"\n * deps=\"angular-messages.js\"\n * animations=\"true\" fixBase=\"true\">\n * <file name=\"index.html\">\n * <form name=\"myForm\">\n * <label>\n * Enter your name:\n * <input type=\"text\"\n * name=\"myName\"\n * ng-model=\"name\"\n * ng-minlength=\"5\"\n * ng-maxlength=\"20\"\n * required />\n * </label>\n * <pre>myForm.myName.$error = {{ myForm.myName.$error | json }}</pre>\n *\n * <div ng-messages=\"myForm.myName.$error\" style=\"color:maroon\" role=\"alert\">\n * <div ng-message=\"required\">You did not enter a field</div>\n * <div ng-message=\"minlength\">Your field is too short</div>\n * <div ng-message=\"maxlength\">Your field is too long</div>\n * <div ng-message-default>This field has an input error</div>\n * </div>\n * </form>\n * </file>\n * <file name=\"script.js\">\n * angular.module('ngMessagesExample', ['ngMessages']);\n * </file>\n * </example>\n */\n .directive('ngMessages', ['$animate', function($animate) {\n var ACTIVE_CLASS = 'ng-active';\n var INACTIVE_CLASS = 'ng-inactive';\n\n return {\n require: 'ngMessages',\n restrict: 'AE',\n controller: ['$element', '$scope', '$attrs', function NgMessagesCtrl($element, $scope, $attrs) {\n var ctrl = this;\n var latestKey = 0;\n var nextAttachId = 0;\n\n this.getAttachId = function getAttachId() { return nextAttachId++; };\n\n var messages = this.messages = {};\n var renderLater, cachedCollection;\n\n this.render = function(collection) {\n collection = collection || {};\n\n renderLater = false;\n cachedCollection = collection;\n\n // this is true if the attribute is empty or if the attribute value is truthy\n var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) ||\n isAttrTruthy($scope, $attrs.multiple);\n\n var unmatchedMessages = [];\n var matchedKeys = {};\n var truthyKeys = 0;\n var messageItem = ctrl.head;\n var messageFound = false;\n var totalMessages = 0;\n\n // we use != instead of !== to allow for both undefined and null values\n while (messageItem != null) {\n totalMessages++;\n var messageCtrl = messageItem.message;\n\n var messageUsed = false;\n if (!messageFound) {\n forEach(collection, function(value, key) {\n if (truthy(value) && !messageUsed) {\n truthyKeys++;\n\n if (messageCtrl.test(key)) {\n // this is to prevent the same error name from showing up twice\n if (matchedKeys[key]) return;\n matchedKeys[key] = true;\n\n messageUsed = true;\n messageCtrl.attach();\n }\n }\n });\n }\n\n if (messageUsed) {\n // unless we want to display multiple messages then we should\n // set a flag here to avoid displaying the next message in the list\n messageFound = !multiple;\n } else {\n unmatchedMessages.push(messageCtrl);\n }\n\n messageItem = messageItem.next;\n }\n\n forEach(unmatchedMessages, function(messageCtrl) {\n messageCtrl.detach();\n });\n\n var messageMatched = unmatchedMessages.length !== totalMessages;\n var attachDefault = ctrl.default && !messageMatched && truthyKeys > 0;\n\n if (attachDefault) {\n ctrl.default.attach();\n } else if (ctrl.default) {\n ctrl.default.detach();\n }\n\n if (messageMatched || attachDefault) {\n $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS);\n } else {\n $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS);\n }\n };\n\n $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render);\n\n this.reRender = function() {\n if (!renderLater) {\n renderLater = true;\n $scope.$evalAsync(function() {\n if (renderLater && cachedCollection) {\n ctrl.render(cachedCollection);\n }\n });\n }\n };\n\n this.register = function(comment, messageCtrl, isDefault) {\n if (isDefault) {\n ctrl.default = messageCtrl;\n } else {\n var nextKey = latestKey.toString();\n messages[nextKey] = {\n message: messageCtrl\n };\n insertMessageNode($element[0], comment, nextKey);\n comment.$$ngMessageNode = nextKey;\n latestKey++;\n }\n\n ctrl.reRender();\n };\n\n this.deregister = function(comment, isDefault) {\n if (isDefault) {\n delete ctrl.default;\n } else {\n var key = comment.$$ngMessageNode;\n delete comment.$$ngMessageNode;\n removeMessageNode($element[0], comment, key);\n delete messages[key];\n }\n ctrl.reRender();\n };\n\n function findPreviousMessage(parent, comment) {\n var prevNode = comment;\n var parentLookup = [];\n\n while (prevNode && prevNode !== parent) {\n var prevKey = prevNode.$$ngMessageNode;\n if (prevKey && prevKey.length) {\n return messages[prevKey];\n }\n\n // dive deeper into the DOM and examine its children for any ngMessage\n // comments that may be in an element that appears deeper in the list\n if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) === -1) {\n parentLookup.push(prevNode);\n prevNode = prevNode.childNodes[prevNode.childNodes.length - 1];\n } else if (prevNode.previousSibling) {\n prevNode = prevNode.previousSibling;\n } else {\n prevNode = prevNode.parentNode;\n parentLookup.push(prevNode);\n }\n }\n }\n\n function insertMessageNode(parent, comment, key) {\n var messageNode = messages[key];\n if (!ctrl.head) {\n ctrl.head = messageNode;\n } else {\n var match = findPreviousMessage(parent, comment);\n if (match) {\n messageNode.next = match.next;\n match.next = messageNode;\n } else {\n messageNode.next = ctrl.head;\n ctrl.head = messageNode;\n }\n }\n }\n\n function removeMessageNode(parent, comment, key) {\n var messageNode = messages[key];\n\n // This message node may have already been removed by a call to deregister()\n if (!messageNode) return;\n\n var match = findPreviousMessage(parent, comment);\n if (match) {\n match.next = messageNode.next;\n } else {\n ctrl.head = messageNode.next;\n }\n }\n }]\n };\n\n function isAttrTruthy(scope, attr) {\n return (isString(attr) && attr.length === 0) || //empty attribute\n truthy(scope.$eval(attr));\n }\n\n function truthy(val) {\n return isString(val) ? val.length : !!val;\n }\n }])\n\n /**\n * @ngdoc directive\n * @name ngMessagesInclude\n * @restrict AE\n * @scope\n *\n * @description\n * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template\n * code from a remote template and place the downloaded template code into the exact spot\n * that the ngMessagesInclude directive is placed within the ngMessages container. This allows\n * for a series of pre-defined messages to be reused and also allows for the developer to\n * determine what messages are overridden due to the placement of the ngMessagesInclude directive.\n *\n * @usage\n * ```html\n * <!-- using attribute directives -->\n * <ANY ng-messages=\"expression\" role=\"alert\">\n * <ANY ng-messages-include=\"remoteTplString\">...</ANY>\n * </ANY>\n *\n * <!-- or by using element directives -->\n * <ng-messages for=\"expression\" role=\"alert\">\n * <ng-messages-include src=\"expressionValue1\">...</ng-messages-include>\n * </ng-messages>\n * ```\n *\n * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.\n *\n * @param {string} ngMessagesInclude|src a string value corresponding to the remote template.\n */\n .directive('ngMessagesInclude',\n ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) {\n\n return {\n restrict: 'AE',\n require: '^^ngMessages', // we only require this for validation sake\n link: function($scope, element, attrs) {\n var src = attrs.ngMessagesInclude || attrs.src;\n $templateRequest(src).then(function(html) {\n if ($scope.$$destroyed) return;\n\n if (isString(html) && !html.trim()) {\n // Empty template - nothing to compile\n replaceElementWithMarker(element, src);\n } else {\n // Non-empty template - compile and link\n $compile(html)($scope, function(contents) {\n element.after(contents);\n replaceElementWithMarker(element, src);\n });\n }\n });\n }\n };\n\n // Helpers\n function replaceElementWithMarker(element, src) {\n // A comment marker is placed for debugging purposes\n var comment = $compile.$$createComment ?\n $compile.$$createComment('ngMessagesInclude', src) :\n $document[0].createComment(' ngMessagesInclude: ' + src + ' ');\n var marker = jqLite(comment);\n element.after(marker);\n\n // Don't pollute the DOM anymore by keeping an empty directive element\n element.remove();\n }\n }])\n\n /**\n * @ngdoc directive\n * @name ngMessage\n * @restrict AE\n * @scope\n * @priority 1\n *\n * @description\n * `ngMessage` is a directive with the purpose to show and hide a particular message.\n * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element\n * must be situated since it determines which messages are visible based on the state\n * of the provided key/value map that `ngMessages` listens on.\n *\n * More information about using `ngMessage` can be found in the\n * {@link module:ngMessages `ngMessages` module documentation}.\n *\n * @usage\n * ```html\n * <!-- using attribute directives -->\n * <ANY ng-messages=\"expression\" role=\"alert\">\n * <ANY ng-message=\"stringValue\">...</ANY>\n * <ANY ng-message=\"stringValue1, stringValue2, ...\">...</ANY>\n * </ANY>\n *\n * <!-- or by using element directives -->\n * <ng-messages for=\"expression\" role=\"alert\">\n * <ng-message when=\"stringValue\">...</ng-message>\n * <ng-message when=\"stringValue1, stringValue2, ...\">...</ng-message>\n * </ng-messages>\n * ```\n *\n * @param {expression} ngMessage|when a string value corresponding to the message key.\n */\n .directive('ngMessage', ngMessageDirectiveFactory())\n\n\n /**\n * @ngdoc directive\n * @name ngMessageExp\n * @restrict AE\n * @priority 1\n * @scope\n *\n * @description\n * `ngMessageExp` is the same as {@link directive:ngMessage `ngMessage`}, but instead of a static\n * value, it accepts an expression to be evaluated for the message key.\n *\n * @usage\n * ```html\n * <!-- using attribute directives -->\n * <ANY ng-messages=\"expression\">\n * <ANY ng-message-exp=\"expressionValue\">...</ANY>\n * </ANY>\n *\n * <!-- or by using element directives -->\n * <ng-messages for=\"expression\">\n * <ng-message when-exp=\"expressionValue\">...</ng-message>\n * </ng-messages>\n * ```\n *\n * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.\n *\n * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key.\n */\n .directive('ngMessageExp', ngMessageDirectiveFactory())\n\n /**\n * @ngdoc directive\n * @name ngMessageDefault\n * @restrict AE\n * @scope\n *\n * @description\n * `ngMessageDefault` is a directive with the purpose to show and hide a default message for\n * {@link directive:ngMessages}, when none of provided messages matches.\n *\n * More information about using `ngMessageDefault` can be found in the\n * {@link module:ngMessages `ngMessages` module documentation}.\n *\n * @usage\n * ```html\n * <!-- using attribute directives -->\n * <ANY ng-messages=\"expression\" role=\"alert\">\n * <ANY ng-message=\"stringValue\">...</ANY>\n * <ANY ng-message=\"stringValue1, stringValue2, ...\">...</ANY>\n * <ANY ng-message-default>...</ANY>\n * </ANY>\n *\n * <!-- or by using element directives -->\n * <ng-messages for=\"expression\" role=\"alert\">\n * <ng-message when=\"stringValue\">...</ng-message>\n * <ng-message when=\"stringValue1, stringValue2, ...\">...</ng-message>\n * <ng-message-default>...</ng-message-default>\n * </ng-messages>\n *\n */\n .directive('ngMessageDefault', ngMessageDirectiveFactory(true));\n\nfunction ngMessageDirectiveFactory(isDefault) {\n return ['$animate', function($animate) {\n return {\n restrict: 'AE',\n transclude: 'element',\n priority: 1, // must run before ngBind, otherwise the text is set on the comment\n terminal: true,\n require: '^^ngMessages',\n link: function(scope, element, attrs, ngMessagesCtrl, $transclude) {\n var commentNode, records, staticExp, dynamicExp;\n\n if (!isDefault) {\n commentNode = element[0];\n staticExp = attrs.ngMessage || attrs.when;\n dynamicExp = attrs.ngMessageExp || attrs.whenExp;\n\n var assignRecords = function(items) {\n records = items\n ? (isArray(items)\n ? items\n : items.split(/[\\s,]+/))\n : null;\n ngMessagesCtrl.reRender();\n };\n\n if (dynamicExp) {\n assignRecords(scope.$eval(dynamicExp));\n scope.$watchCollection(dynamicExp, assignRecords);\n } else {\n assignRecords(staticExp);\n }\n }\n\n var currentElement, messageCtrl;\n ngMessagesCtrl.register(commentNode, messageCtrl = {\n test: function(name) {\n return contains(records, name);\n },\n attach: function() {\n if (!currentElement) {\n $transclude(function(elm, newScope) {\n $animate.enter(elm, null, element);\n currentElement = elm;\n\n // Each time we attach this node to a message we get a new id that we can match\n // when we are destroying the node later.\n var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId();\n\n // in the event that the element or a parent element is destroyed\n // by another structural directive then it's time\n // to deregister the message from the controller\n currentElement.on('$destroy', function() {\n // If the message element was removed via a call to `detach` then `currentElement` will be null\n // So this handler only handles cases where something else removed the message element.\n if (currentElement && currentElement.$$attachId === $$attachId) {\n ngMessagesCtrl.deregister(commentNode, isDefault);\n messageCtrl.detach();\n }\n newScope.$destroy();\n });\n });\n }\n },\n detach: function() {\n if (currentElement) {\n var elm = currentElement;\n currentElement = null;\n $animate.leave(elm);\n }\n }\n }, isDefault);\n\n // We need to ensure that this directive deregisters itself when it no longer exists\n // Normally this is done when the attached element is destroyed; but if this directive\n // gets removed before we attach the message to the DOM there is nothing to watch\n // in which case we must deregister when the containing scope is destroyed.\n scope.$on('$destroy', function() {\n ngMessagesCtrl.deregister(commentNode, isDefault);\n });\n }\n };\n }];\n\n function contains(collection, key) {\n if (collection) {\n return isArray(collection)\n ? collection.indexOf(key) >= 0\n : collection.hasOwnProperty(key);\n }\n }\n}\n\n\n})(window, window.angular);\n","require('./angular-messages');\nmodule.exports = 'ngMessages';\n","/**\n * @license AngularJS v1.8.3\n * (c) 2010-2020 Google LLC. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\nvar bind;\nvar extend;\nvar forEach;\nvar isArray;\nvar isDefined;\nvar lowercase;\nvar noop;\nvar nodeContains;\nvar htmlParser;\nvar htmlSanitizeWriter;\n\n/**\n * @ngdoc module\n * @name ngSanitize\n * @description\n *\n * The `ngSanitize` module provides functionality to sanitize HTML.\n *\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n */\n\n/**\n * @ngdoc service\n * @name $sanitize\n * @kind function\n *\n * @description\n * Sanitizes an html string by stripping all potentially dangerous tokens.\n *\n * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a trusted URI list) are\n * then serialized back to a properly escaped HTML string. This means that no unsafe input can make\n * it into the returned string.\n *\n * The trusted URIs for URL sanitization of attribute values is configured using the functions\n * `aHrefSanitizationTrustedUrlList` and `imgSrcSanitizationTrustedUrlList` of {@link $compileProvider}.\n *\n * The input may also contain SVG markup if this is enabled via {@link $sanitizeProvider}.\n *\n * @param {string} html HTML input.\n * @returns {string} Sanitized HTML.\n *\n * @example\n <example module=\"sanitizeExample\" deps=\"angular-sanitize.js\" name=\"sanitize-service\">\n <file name=\"index.html\">\n <script>\n angular.module('sanitizeExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {\n $scope.snippet =\n '<p style=\"color:blue\">an html\\n' +\n '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n 'snippet</p>';\n $scope.deliberatelyTrustDangerousSnippet = function() {\n return $sce.trustAsHtml($scope.snippet);\n };\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n <table>\n <tr>\n <td>Directive</td>\n <td>How</td>\n <td>Source</td>\n <td>Rendered</td>\n </tr>\n <tr id=\"bind-html-with-sanitize\">\n <td>ng-bind-html</td>\n <td>Automatically uses $sanitize</td>\n <td><pre><div ng-bind-html=\"snippet\"><br/></div></pre></td>\n <td><div ng-bind-html=\"snippet\"></div></td>\n </tr>\n <tr id=\"bind-html-with-trust\">\n <td>ng-bind-html</td>\n <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n <td>\n <pre><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\">\n</div></pre>\n </td>\n <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n </tr>\n <tr id=\"bind-default\">\n <td>ng-bind</td>\n <td>Automatically escapes</td>\n <td><pre><div ng-bind=\"snippet\"><br/></div></pre></td>\n <td><div ng-bind=\"snippet\"></div></td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should sanitize the html snippet by default', function() {\n expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).\n toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n });\n\n it('should inline raw snippet if bound to a trusted value', function() {\n expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).\n toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n \"snippet</p>\");\n });\n\n it('should escape snippet without any filter', function() {\n expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).\n toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n \"snippet</p>\");\n });\n\n it('should update', function() {\n element(by.model('snippet')).clear();\n element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\n expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).\n toBe('new <b>text</b>');\n expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe(\n 'new <b onclick=\"alert(1)\">text</b>');\n expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe(\n \"new <b onclick=\\\"alert(1)\\\">text</b>\");\n });\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc provider\n * @name $sanitizeProvider\n * @this\n *\n * @description\n * Creates and configures {@link $sanitize} instance.\n */\nfunction $SanitizeProvider() {\n var hasBeenInstantiated = false;\n var svgEnabled = false;\n\n this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n hasBeenInstantiated = true;\n if (svgEnabled) {\n extend(validElements, svgElements);\n }\n return function(html) {\n var buf = [];\n htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n return !/^unsafe:/.test($$sanitizeUri(uri, isImage));\n }));\n return buf.join('');\n };\n }];\n\n\n /**\n * @ngdoc method\n * @name $sanitizeProvider#enableSvg\n * @kind function\n *\n * @description\n * Enables a subset of svg to be supported by the sanitizer.\n *\n * <div class=\"alert alert-warning\">\n * <p>By enabling this setting without taking other precautions, you might expose your\n * application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned\n * outside of the containing element and be rendered over other elements on the page (e.g. a login\n * link). Such behavior can then result in phishing incidents.</p>\n *\n * <p>To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg\n * tags within the sanitized content:</p>\n *\n * <br>\n *\n * <pre><code>\n * .rootOfTheIncludedContent svg {\n * overflow: hidden !important;\n * }\n * </code></pre>\n * </div>\n *\n * @param {boolean=} flag Enable or disable SVG support in the sanitizer.\n * @returns {boolean|$sanitizeProvider} Returns the currently configured value if called\n * without an argument or self for chaining otherwise.\n */\n this.enableSvg = function(enableSvg) {\n if (isDefined(enableSvg)) {\n svgEnabled = enableSvg;\n return this;\n } else {\n return svgEnabled;\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $sanitizeProvider#addValidElements\n * @kind function\n *\n * @description\n * Extends the built-in lists of valid HTML/SVG elements, i.e. elements that are considered safe\n * and are not stripped off during sanitization. You can extend the following lists of elements:\n *\n * - `htmlElements`: A list of elements (tag names) to extend the current list of safe HTML\n * elements. HTML elements considered safe will not be removed during sanitization. All other\n * elements will be stripped off.\n *\n * - `htmlVoidElements`: This is similar to `htmlElements`, but marks the elements as\n * \"void elements\" (similar to HTML\n * [void elements](https://rawgit.com/w3c/html/html5.1-2/single-page.html#void-elements)). These\n * elements have no end tag and cannot have content.\n *\n * - `svgElements`: This is similar to `htmlElements`, but for SVG elements. This list is only\n * taken into account if SVG is {@link ngSanitize.$sanitizeProvider#enableSvg enabled} for\n * `$sanitize`.\n *\n * <div class=\"alert alert-info\">\n * This method must be called during the {@link angular.Module#config config} phase. Once the\n * `$sanitize` service has been instantiated, this method has no effect.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * Keep in mind that extending the built-in lists of elements may expose your app to XSS or\n * other vulnerabilities. Be very mindful of the elements you add.\n * </div>\n *\n * @param {Array<String>|Object} elements - A list of valid HTML elements or an object with one or\n * more of the following properties:\n * - **htmlElements** - `{Array<String>}` - A list of elements to extend the current list of\n * HTML elements.\n * - **htmlVoidElements** - `{Array<String>}` - A list of elements to extend the current list of\n * void HTML elements; i.e. elements that do not have an end tag.\n * - **svgElements** - `{Array<String>}` - A list of elements to extend the current list of SVG\n * elements. The list of SVG elements is only taken into account if SVG is\n * {@link ngSanitize.$sanitizeProvider#enableSvg enabled} for `$sanitize`.\n *\n * Passing an array (`[...]`) is equivalent to passing `{htmlElements: [...]}`.\n *\n * @return {$sanitizeProvider} Returns self for chaining.\n */\n this.addValidElements = function(elements) {\n if (!hasBeenInstantiated) {\n if (isArray(elements)) {\n elements = {htmlElements: elements};\n }\n\n addElementsTo(svgElements, elements.svgElements);\n addElementsTo(voidElements, elements.htmlVoidElements);\n addElementsTo(validElements, elements.htmlVoidElements);\n addElementsTo(validElements, elements.htmlElements);\n }\n\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $sanitizeProvider#addValidAttrs\n * @kind function\n *\n * @description\n * Extends the built-in list of valid attributes, i.e. attributes that are considered safe and are\n * not stripped off during sanitization.\n *\n * **Note**:\n * The new attributes will not be treated as URI attributes, which means their values will not be\n * sanitized as URIs using `$compileProvider`'s\n * {@link ng.$compileProvider#aHrefSanitizationTrustedUrlList aHrefSanitizationTrustedUrlList} and\n * {@link ng.$compileProvider#imgSrcSanitizationTrustedUrlList imgSrcSanitizationTrustedUrlList}.\n *\n * <div class=\"alert alert-info\">\n * This method must be called during the {@link angular.Module#config config} phase. Once the\n * `$sanitize` service has been instantiated, this method has no effect.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * Keep in mind that extending the built-in list of attributes may expose your app to XSS or\n * other vulnerabilities. Be very mindful of the attributes you add.\n * </div>\n *\n * @param {Array<String>} attrs - A list of valid attributes.\n *\n * @returns {$sanitizeProvider} Returns self for chaining.\n */\n this.addValidAttrs = function(attrs) {\n if (!hasBeenInstantiated) {\n extend(validAttrs, arrayToMap(attrs, true));\n }\n return this;\n };\n\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // Private stuff\n //////////////////////////////////////////////////////////////////////////////////////////////////\n\n bind = angular.bind;\n extend = angular.extend;\n forEach = angular.forEach;\n isArray = angular.isArray;\n isDefined = angular.isDefined;\n lowercase = angular.$$lowercase;\n noop = angular.noop;\n\n htmlParser = htmlParserImpl;\n htmlSanitizeWriter = htmlSanitizeWriterImpl;\n\n nodeContains = window.Node.prototype.contains || /** @this */ function(arg) {\n // eslint-disable-next-line no-bitwise\n return !!(this.compareDocumentPosition(arg) & 16);\n };\n\n // Regular Expressions for parsing tags and attributes\n var SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n // Match everything outside of normal chars and \" (quote character)\n NON_ALPHANUMERIC_REGEXP = /([^#-~ |!])/g;\n\n\n // Good source of info about elements and attributes\n // http://dev.w3.org/html5/spec/Overview.html#semantics\n // http://simon.html5.org/html-elements\n\n // Safe Void Elements - HTML5\n // http://dev.w3.org/html5/spec/Overview.html#void-elements\n var voidElements = stringToMap('area,br,col,hr,img,wbr');\n\n // Elements that you can, intentionally, leave open (and which close themselves)\n // http://dev.w3.org/html5/spec/Overview.html#optional-tags\n var optionalEndTagBlockElements = stringToMap('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr'),\n optionalEndTagInlineElements = stringToMap('rp,rt'),\n optionalEndTagElements = extend({},\n optionalEndTagInlineElements,\n optionalEndTagBlockElements);\n\n // Safe Block Elements - HTML5\n var blockElements = extend({}, optionalEndTagBlockElements, stringToMap('address,article,' +\n 'aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul'));\n\n // Inline Elements - HTML5\n var inlineElements = extend({}, optionalEndTagInlineElements, stringToMap('a,abbr,acronym,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,' +\n 'samp,small,span,strike,strong,sub,sup,time,tt,u,var'));\n\n // SVG Elements\n // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements\n // Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.\n // They can potentially allow for arbitrary javascript to be executed. See #11290\n var svgElements = stringToMap('circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,' +\n 'hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,' +\n 'radialGradient,rect,stop,svg,switch,text,title,tspan');\n\n // Blocked Elements (will be stripped)\n var blockedElements = stringToMap('script,style');\n\n var validElements = extend({},\n voidElements,\n blockElements,\n inlineElements,\n optionalEndTagElements);\n\n //Attributes that have href and hence need to be sanitized\n var uriAttrs = stringToMap('background,cite,href,longdesc,src,xlink:href,xml:base');\n\n var htmlAttrs = stringToMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +\n 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +\n 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +\n 'valign,value,vspace,width');\n\n // SVG attributes (without \"id\" and \"name\" attributes)\n // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes\n var svgAttrs = stringToMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +\n 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +\n 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +\n 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +\n 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +\n 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +\n 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +\n 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +\n 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +\n 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +\n 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +\n 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +\n 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +\n 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +\n 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);\n\n var validAttrs = extend({},\n uriAttrs,\n svgAttrs,\n htmlAttrs);\n\n function stringToMap(str, lowercaseKeys) {\n return arrayToMap(str.split(','), lowercaseKeys);\n }\n\n function arrayToMap(items, lowercaseKeys) {\n var obj = {}, i;\n for (i = 0; i < items.length; i++) {\n obj[lowercaseKeys ? lowercase(items[i]) : items[i]] = true;\n }\n return obj;\n }\n\n function addElementsTo(elementsMap, newElements) {\n if (newElements && newElements.length) {\n extend(elementsMap, arrayToMap(newElements));\n }\n }\n\n /**\n * Create an inert document that contains the dirty HTML that needs sanitizing.\n * We use the DOMParser API by default and fall back to createHTMLDocument if DOMParser is not\n * available.\n */\n var getInertBodyElement /* function(html: string): HTMLBodyElement */ = (function(window, document) {\n if (isDOMParserAvailable()) {\n return getInertBodyElement_DOMParser;\n }\n\n if (!document || !document.implementation) {\n throw $sanitizeMinErr('noinert', 'Can\\'t create an inert html document');\n }\n var inertDocument = document.implementation.createHTMLDocument('inert');\n var inertBodyElement = (inertDocument.documentElement || inertDocument.getDocumentElement()).querySelector('body');\n return getInertBodyElement_InertDocument;\n\n function isDOMParserAvailable() {\n try {\n return !!getInertBodyElement_DOMParser('');\n } catch (e) {\n return false;\n }\n }\n\n function getInertBodyElement_DOMParser(html) {\n // We add this dummy element 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 `<head>` tag.\n html = '<remove></remove>' + html;\n try {\n var body = new window.DOMParser().parseFromString(html, 'text/html').body;\n body.firstChild.remove();\n return body;\n } catch (e) {\n return undefined;\n }\n }\n\n function getInertBodyElement_InertDocument(html) {\n inertBodyElement.innerHTML = html;\n\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (document.documentMode) {\n stripCustomNsAttrs(inertBodyElement);\n }\n\n return inertBodyElement;\n }\n })(window, window.document);\n\n /**\n * @example\n * htmlParser(htmlString, {\n * start: function(tag, attrs) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * });\n *\n * @param {string} html string\n * @param {object} handler\n */\n function htmlParserImpl(html, handler) {\n if (html === null || html === undefined) {\n html = '';\n } else if (typeof html !== 'string') {\n html = '' + html;\n }\n\n var inertBodyElement = getInertBodyElement(html);\n if (!inertBodyElement) return '';\n\n //mXSS protection\n var mXSSAttempts = 5;\n do {\n if (mXSSAttempts === 0) {\n throw $sanitizeMinErr('uinput', 'Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n // trigger mXSS if it is going to happen by reading and writing the innerHTML\n html = inertBodyElement.innerHTML;\n inertBodyElement = getInertBodyElement(html);\n } while (html !== inertBodyElement.innerHTML);\n\n var node = inertBodyElement.firstChild;\n while (node) {\n switch (node.nodeType) {\n case 1: // ELEMENT_NODE\n handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes));\n break;\n case 3: // TEXT NODE\n handler.chars(node.textContent);\n break;\n }\n\n var nextNode;\n if (!(nextNode = node.firstChild)) {\n if (node.nodeType === 1) {\n handler.end(node.nodeName.toLowerCase());\n }\n nextNode = getNonDescendant('nextSibling', node);\n if (!nextNode) {\n while (nextNode == null) {\n node = getNonDescendant('parentNode', node);\n if (node === inertBodyElement) break;\n nextNode = getNonDescendant('nextSibling', node);\n if (node.nodeType === 1) {\n handler.end(node.nodeName.toLowerCase());\n }\n }\n }\n }\n node = nextNode;\n }\n\n while ((node = inertBodyElement.firstChild)) {\n inertBodyElement.removeChild(node);\n }\n }\n\n function attrToMap(attrs) {\n var map = {};\n for (var i = 0, ii = attrs.length; i < ii; i++) {\n var attr = attrs[i];\n map[attr.name] = attr.value;\n }\n return map;\n }\n\n\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 * @returns {string} escaped text\n */\n function encodeEntities(value) {\n return value.\n replace(/&/g, '&').\n replace(SURROGATE_PAIR_REGEXP, function(value) {\n var hi = value.charCodeAt(0);\n var low = value.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n }).\n replace(NON_ALPHANUMERIC_REGEXP, function(value) {\n return '&#' + value.charCodeAt(0) + ';';\n }).\n replace(/</g, '<').\n replace(/>/g, '>');\n }\n\n /**\n * create an HTML/XML writer which writes to buffer\n * @param {Array} buf use buf.join('') to get out sanitized html string\n * @returns {object} in the form of {\n * start: function(tag, attrs) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * }\n */\n function htmlSanitizeWriterImpl(buf, uriValidator) {\n var ignoreCurrentElement = false;\n var out = bind(buf, buf.push);\n return {\n start: function(tag, attrs) {\n tag = lowercase(tag);\n if (!ignoreCurrentElement && blockedElements[tag]) {\n ignoreCurrentElement = tag;\n }\n if (!ignoreCurrentElement && validElements[tag] === true) {\n out('<');\n out(tag);\n forEach(attrs, function(value, key) {\n var lkey = lowercase(key);\n var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n if (validAttrs[lkey] === true &&\n (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n out(' ');\n out(key);\n out('=\"');\n out(encodeEntities(value));\n out('\"');\n }\n });\n out('>');\n }\n },\n end: function(tag) {\n tag = lowercase(tag);\n if (!ignoreCurrentElement && validElements[tag] === true && voidElements[tag] !== true) {\n out('</');\n out(tag);\n out('>');\n }\n // eslint-disable-next-line eqeqeq\n if (tag == ignoreCurrentElement) {\n ignoreCurrentElement = false;\n }\n },\n chars: function(chars) {\n if (!ignoreCurrentElement) {\n out(encodeEntities(chars));\n }\n }\n };\n }\n\n\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' attribute to declare\n * ns1 namespace and prefixes the attribute with 'ns1' (e.g. 'ns1:xlink:foo'). This is undesirable since we don't want\n * to allow any of these custom attributes. This method strips them all.\n *\n * @param node Root element to process\n */\n function stripCustomNsAttrs(node) {\n while (node) {\n if (node.nodeType === window.Node.ELEMENT_NODE) {\n var attrs = node.attributes;\n for (var i = 0, l = attrs.length; i < l; i++) {\n var attrNode = attrs[i];\n var attrName = attrNode.name.toLowerCase();\n if (attrName === 'xmlns:ns1' || attrName.lastIndexOf('ns1:', 0) === 0) {\n node.removeAttributeNode(attrNode);\n i--;\n l--;\n }\n }\n }\n\n var nextNode = node.firstChild;\n if (nextNode) {\n stripCustomNsAttrs(nextNode);\n }\n\n node = getNonDescendant('nextSibling', node);\n }\n }\n\n function getNonDescendant(propName, node) {\n // An element is clobbered if its `propName` property points to one of its descendants\n var nextNode = node[propName];\n if (nextNode && nodeContains.call(node, nextNode)) {\n throw $sanitizeMinErr('elclob', 'Failed to sanitize html because the element is clobbered: {0}', node.outerHTML || node.outerText);\n }\n return nextNode;\n }\n}\n\nfunction sanitizeText(chars) {\n var buf = [];\n var writer = htmlSanitizeWriter(buf, noop);\n writer.chars(chars);\n return buf.join('');\n}\n\n\n// define ngSanitize module and register $sanitize service\nangular.module('ngSanitize', [])\n .provider('$sanitize', $SanitizeProvider)\n .info({ angularVersion: '1.8.3' });\n\n/**\n * @ngdoc filter\n * @name linky\n * @kind function\n *\n * @description\n * Finds links in text input and turns them into html links. Supports `http/https/ftp/sftp/mailto` and\n * plain email address links.\n *\n * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n *\n * @param {string} text Input text.\n * @param {string} [target] Window (`_blank|_self|_parent|_top`) or named frame to open links in.\n * @param {object|function(url)} [attributes] Add custom attributes to the link element.\n *\n * Can be one of:\n *\n * - `object`: A map of attributes\n * - `function`: Takes the url as a parameter and returns a map of attributes\n *\n * If the map of attributes contains a value for `target`, it overrides the value of\n * the target parameter.\n *\n *\n * @returns {string} Html-linkified and {@link $sanitize sanitized} text.\n *\n * @usage\n <span ng-bind-html=\"linky_expression | linky\"></span>\n *\n * @example\n <example module=\"linkyExample\" deps=\"angular-sanitize.js\" name=\"linky-filter\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n <table>\n <tr>\n <th>Filter</th>\n <th>Source</th>\n <th>Rendered</th>\n </tr>\n <tr id=\"linky-filter\">\n <td>linky filter</td>\n <td>\n <pre><div ng-bind-html=\"snippet | linky\"><br></div></pre>\n </td>\n <td>\n <div ng-bind-html=\"snippet | linky\"></div>\n </td>\n </tr>\n <tr id=\"linky-target\">\n <td>linky target</td>\n <td>\n <pre><div ng-bind-html=\"snippetWithSingleURL | linky:'_blank'\"><br></div></pre>\n </td>\n <td>\n <div ng-bind-html=\"snippetWithSingleURL | linky:'_blank'\"></div>\n </td>\n </tr>\n <tr id=\"linky-custom-attributes\">\n <td>linky custom attributes</td>\n <td>\n <pre><div ng-bind-html=\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\"><br></div></pre>\n </td>\n <td>\n <div ng-bind-html=\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\"></div>\n </td>\n </tr>\n <tr id=\"escaped-html\">\n <td>no filter</td>\n <td><pre><div ng-bind=\"snippet\"><br></div></pre></td>\n <td><div ng-bind=\"snippet\"></div></td>\n </tr>\n </table>\n </file>\n <file name=\"script.js\">\n angular.module('linkyExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.snippet =\n 'Pretty text with some links:\\n' +\n 'http://angularjs.org/,\\n' +\n 'mailto:us@somewhere.org,\\n' +\n 'another@somewhere.org,\\n' +\n 'and one more: ftp://127.0.0.1/.';\n $scope.snippetWithSingleURL = 'http://angularjs.org/';\n }]);\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should linkify the snippet with urls', function() {\n expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n });\n\n it('should not linkify snippet without the linky filter', function() {\n expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n });\n\n it('should update', function() {\n element(by.model('snippet')).clear();\n element(by.model('snippet')).sendKeys('new http://link.');\n expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n toBe('new http://link.');\n expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n .toBe('new http://link.');\n });\n\n it('should work with the target property', function() {\n expect(element(by.id('linky-target')).\n element(by.binding(\"snippetWithSingleURL | linky:'_blank'\")).getText()).\n toBe('http://angularjs.org/');\n expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n });\n\n it('should optionally add custom attributes', function() {\n expect(element(by.id('linky-custom-attributes')).\n element(by.binding(\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\")).getText()).\n toBe('http://angularjs.org/');\n expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow');\n });\n </file>\n </example>\n */\nangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n var LINKY_URL_REGEXP =\n /((s?ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"\\u201d\\u2019]/i,\n MAILTO_REGEXP = /^mailto:/i;\n\n var linkyMinErr = angular.$$minErr('linky');\n var isDefined = angular.isDefined;\n var isFunction = angular.isFunction;\n var isObject = angular.isObject;\n var isString = angular.isString;\n\n return function(text, target, attributes) {\n if (text == null || text === '') return text;\n if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text);\n\n var attributesFn =\n isFunction(attributes) ? attributes :\n isObject(attributes) ? function getAttributesObject() {return attributes;} :\n function getEmptyAttributesObject() {return {};};\n\n var match;\n var raw = text;\n var html = [];\n var url;\n var i;\n while ((match = raw.match(LINKY_URL_REGEXP))) {\n // We can not end in these as they are sometimes found at the end of the sentence\n url = match[0];\n // if we did not match ftp/http/www/mailto then assume mailto\n if (!match[2] && !match[4]) {\n url = (match[3] ? 'http://' : 'mailto:') + url;\n }\n i = match.index;\n addText(raw.substr(0, i));\n addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n raw = raw.substring(i + match[0].length);\n }\n addText(raw);\n return $sanitize(html.join(''));\n\n function addText(text) {\n if (!text) {\n return;\n }\n html.push(sanitizeText(text));\n }\n\n function addLink(url, text) {\n var key, linkAttributes = attributesFn(url);\n html.push('<a ');\n\n for (key in linkAttributes) {\n html.push(key + '=\"' + linkAttributes[key] + '\" ');\n }\n\n if (isDefined(target) && !('target' in linkAttributes)) {\n html.push('target=\"',\n target,\n '\" ');\n }\n html.push('href=\"',\n url.replace(/\"/g, '"'),\n '\">');\n addText(text);\n html.push('</a>');\n }\n };\n}]);\n\n\n})(window, window.angular);\n","require('./angular-sanitize');\nmodule.exports = 'ngSanitize';\n","/** @publicapi @module ng1 */ /** */\nimport * as ng_from_import from 'angular';\n/** @hidden */ var ng_from_global = angular;\n/** @hidden */ export var ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;\n//# sourceMappingURL=angular.js.map","/** @publicapi @module ng1 */ /** */\nimport { pick, forEach, tail, extend, isArray, isInjectable, isDefined, isString, services, trace, ViewService, ResolveContext, Resolvable, } from '@uirouter/core';\n/** @internalapi */\nexport function getNg1ViewConfigFactory() {\n var templateFactory = null;\n return function (path, view) {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n/** @internalapi */\nvar hasAnyKey = function (keys, obj) { return keys.reduce(function (acc, key) { return acc || isDefined(obj[key]); }, false); };\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\nexport function ng1ViewsBuilder(state) {\n // Do not process root state\n if (!state.parent)\n return {};\n var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys);\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\"State '\" + state.name + \"' has a 'views' object. \" +\n \"It cannot also have \\\"view properties\\\" at the state level. \" +\n \"Move the following properties into a view (in the 'views' object): \" +\n (\" \" + allViewKeys.filter(function (key) { return isDefined(state[key]); }).join(', ')));\n }\n var views = {}, viewsObject = state.views || { $default: pick(state, allViewKeys) };\n forEach(viewsObject, function (config, name) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config))\n config = { component: config };\n // Make a shallow copy of the config object\n config = extend({}, config);\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\"Cannot combine: \" + compKeys.join('|') + \" with: \" + nonCompKeys.join('|') + \" in stateview: '\" + name + \"@\" + state.name + \"'\");\n }\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n var normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n views[name] = config;\n });\n return views;\n}\n/** @hidden */\nvar id = 0;\n/** @internalapi */\nvar Ng1ViewConfig = /** @class */ (function () {\n function Ng1ViewConfig(path, viewDecl, factory) {\n var _this = this;\n this.path = path;\n this.viewDecl = viewDecl;\n this.factory = factory;\n this.$id = id++;\n this.loaded = false;\n this.getTemplate = function (uiView, context) {\n return _this.component\n ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings)\n : _this.template;\n };\n }\n Ng1ViewConfig.prototype.load = function () {\n var _this = this;\n var $q = services.$q;\n var context = new ResolveContext(this.path);\n var params = this.path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {});\n var promises = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n return $q.all(promises).then(function (results) {\n trace.traceViewServiceEvent('Loaded', _this);\n _this.controller = results.controller;\n extend(_this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return _this;\n });\n };\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.\n */\n Ng1ViewConfig.prototype.getController = function (context) {\n var provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider))\n return this.viewDecl.controller;\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n return Ng1ViewConfig;\n}());\nexport { Ng1ViewConfig };\n//# sourceMappingURL=views.js.map","/** @publicapi @module view */ /** */\nimport { ng as angular } from './angular';\nimport { isArray, isDefined, isFunction, isObject, services, tail, kebobString, unnestR, Resolvable, } from '@uirouter/core';\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nvar TemplateFactory = /** @class */ (function () {\n function TemplateFactory() {\n var _this = this;\n /** @hidden */ this._useHttp = angular.version.minor < 3;\n /** @hidden */ this.$get = [\n '$http',\n '$templateCache',\n '$injector',\n function ($http, $templateCache, $injector) {\n _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n _this.$http = $http;\n _this.$templateCache = $templateCache;\n return _this;\n },\n ];\n }\n /** @hidden */\n TemplateFactory.prototype.useHttpService = function (value) {\n this._useHttp = value;\n };\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n TemplateFactory.prototype.fromConfig = function (config, params, context) {\n var defaultTemplate = '<ui-view></ui-view>';\n var asTemplate = function (result) { return services.$q.when(result).then(function (str) { return ({ template: str }); }); };\n var asComponent = function (result) { return services.$q.when(result).then(function (str) { return ({ component: str }); }); };\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n };\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n TemplateFactory.prototype.fromString = function (template, params) {\n return isFunction(template) ? template(params) : template;\n };\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n TemplateFactory.prototype.fromUrl = function (url, params) {\n if (isFunction(url))\n url = url(params);\n if (url == null)\n return null;\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n return this.$templateRequest(url);\n };\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n TemplateFactory.prototype.fromProvider = function (provider, params, context) {\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) {\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) {\n bindings = bindings || {};\n // Bind once prefix\n var prefix = angular.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n var kebob = function (camelCase) {\n var kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? \"x-\" + kebobed : kebobed;\n };\n var attributeTpl = function (input) {\n var name = input.name, type = input.type;\n var attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return attrName + \"='\" + uiView.attr(attrName) + \"'\";\n var resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return attrName + \"='{{\" + prefix + \"$resolve.\" + resolveName + \"}}'\";\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n var res = context.getResolvable(resolveName);\n var fn = res && res.data;\n var args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n var arrayIdxStr = isArray(fn) ? \"[\" + (fn.length - 1) + \"]\" : '';\n return attrName + \"='$resolve.\" + resolveName + arrayIdxStr + \"(\" + args.join(',') + \")'\";\n }\n // some-attr=\"::$resolve.someResolveName\"\n return attrName + \"='\" + prefix + \"$resolve.\" + resolveName + \"'\";\n };\n var attrs = getComponentBindings(component).map(attributeTpl).join(' ');\n var kebobName = kebob(component);\n return \"<\" + kebobName + \" \" + attrs + \"></\" + kebobName + \">\";\n };\n return TemplateFactory;\n}());\nexport { TemplateFactory };\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name) {\n var cmpDefs = services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length)\n throw new Error(\"Unable to find component named '\" + name + \"'\");\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nvar getBindings = function (def) {\n if (isObject(def.bindToController))\n return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nvar scopeBindings = function (bindingsObj) {\n return Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; })\n // skip malformed values\n .filter(function (tuple) { return isDefined(tuple) && isArray(tuple[1]); })\n // { name: ('foo' || 'input'), type: '=' }\n .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); });\n};\n//# sourceMappingURL=templateFactory.js.map","/** @publicapi @module ng1 */ /** */\nimport { val, isObject, createProxyFunctions, } from '@uirouter/core';\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nvar StateProvider = /** @class */ (function () {\n function StateProvider(stateRegistry, stateService) {\n this.stateRegistry = stateRegistry;\n this.stateService = stateService;\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n StateProvider.prototype.decorator = function (name, func) {\n return this.stateRegistry.decorator(name, func) || this;\n };\n StateProvider.prototype.state = function (name, definition) {\n if (isObject(name)) {\n definition = name;\n }\n else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n };\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n StateProvider.prototype.onInvalid = function (callback) {\n return this.stateService.onInvalid(callback);\n };\n return StateProvider;\n}());\nexport { StateProvider };\n//# sourceMappingURL=stateProvider.js.map","/** @publicapi @module ng1 */ /** */\nimport { services, ResolveContext, extend, } from '@uirouter/core';\nimport { getLocals } from '../services';\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n *\n * @internalapi\n */\nexport var getStateHookBuilder = function (hookName) {\n return function stateHookBuilder(stateObject) {\n var hook = stateObject[hookName];\n var pathname = hookName === 'onExit' ? 'from' : 'to';\n function decoratedNg1Hook(trans, state) {\n var resolveContext = new ResolveContext(trans.treeChanges(pathname));\n var subContext = resolveContext.subContext(state.$$state());\n var locals = extend(getLocals(subContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n return hook ? decoratedNg1Hook : undefined;\n };\n};\n//# sourceMappingURL=onEnterExitRetain.js.map","/** @publicapi @module ng1 */ /** */\nimport { isDefined } from '@uirouter/core';\nimport { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\nvar Ng1LocationServices = /** @class */ (function () {\n function Ng1LocationServices($locationProvider) {\n // .onChange() registry\n this._urlListeners = [];\n this.$locationProvider = $locationProvider;\n var _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n Ng1LocationServices.monkeyPatchPathParameterType = function (router) {\n var pathType = router.urlMatcherFactory.type('path');\n pathType.encode = function (x) {\n return x != null ? x.toString().replace(/(~|\\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : x;\n };\n pathType.decode = function (x) {\n return x != null ? x.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : x;\n };\n };\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n Ng1LocationServices.prototype.dispose = function () { };\n Ng1LocationServices.prototype.onChange = function (callback) {\n var _this = this;\n this._urlListeners.push(callback);\n return function () { return removeFrom(_this._urlListeners)(callback); };\n };\n Ng1LocationServices.prototype.html5Mode = function () {\n var html5Mode = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n };\n Ng1LocationServices.prototype.baseHref = function () {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n };\n Ng1LocationServices.prototype.url = function (newUrl, replace, state) {\n if (replace === void 0) { replace = false; }\n if (isDefined(newUrl))\n this.$location.url(newUrl);\n if (replace)\n this.$location.replace();\n if (state)\n this.$location.state(state);\n return this.$location.url();\n };\n Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser, $window) {\n var _this = this;\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); });\n var _loc = val($location);\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n };\n return Ng1LocationServices;\n}());\nexport { Ng1LocationServices };\n//# sourceMappingURL=locationServices.js.map","/** @publicapi @module url */ /** */\nimport { BaseUrlRule, } from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nvar UrlRouterProvider = /** @class */ (function () {\n /** @hidden */\n function UrlRouterProvider(/** @hidden */ router) {\n this.router = router;\n }\n UrlRouterProvider.injectableHandler = function (router, handler) {\n return function (match) { return services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); };\n };\n /** @hidden */\n UrlRouterProvider.prototype.$get = function () {\n var urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred)\n urlService.listen();\n return this.router.urlRouter;\n };\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n UrlRouterProvider.prototype.rule = function (ruleFn) {\n var _this = this;\n if (!isFunction(ruleFn))\n throw new Error(\"'rule' must be a function\");\n var match = function () { return ruleFn(services.$injector, _this.router.locationService); };\n var rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n };\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n UrlRouterProvider.prototype.otherwise = function (rule) {\n var _this = this;\n var urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n }\n else if (isFunction(rule)) {\n urlRules.otherwise(function () { return rule(services.$injector, _this.router.locationService); });\n }\n else {\n throw new Error(\"'rule' must be a string or function\");\n }\n return this;\n };\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n UrlRouterProvider.prototype.when = function (what, handler) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n this.router.urlService.rules.when(what, handler);\n return this;\n };\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n UrlRouterProvider.prototype.deferIntercept = function (defer) {\n this.router.urlService.deferIntercept(defer);\n };\n return UrlRouterProvider;\n}());\nexport { UrlRouterProvider };\n//# sourceMappingURL=urlRouterProvider.js.map","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport { services, applyPairs, isString, trace, extend, UIRouter, unnestR, } from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nangular.module('ui.router.angular1', []);\nvar mod_init = angular.module('ui.router.init', ['ng']);\nvar mod_util = angular.module('ui.router.util', ['ui.router.init']);\nvar mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nvar mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nvar mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nvar mod_cmpt = angular.module('ui.router.compat', ['ui.router']);\nvar router = null;\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n // Disable decoding of params by UrlMatcherFactory because $location already handles this\n router.urlService.config._decodeParams = false;\n var ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider));\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location, $browser, $window, $sniffer, $rootScope, $http, $templateCache) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\nvar getProviderFor = function (serviceName) { return [\n '$uiRouterProvider',\n function ($urp) {\n var service = $urp.router[serviceName];\n service['$get'] = function () { return service; };\n return service;\n },\n]; };\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector, $q, $uiRouter) {\n services.$injector = $injector;\n services.$q = $q;\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!Object.prototype.hasOwnProperty.call($injector, 'strictDi')) {\n try {\n $injector.invoke(function (checkStrictDi) { });\n }\n catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map(function (x) { return x.$$state().resolvables; })\n .reduce(unnestR, [])\n .filter(function (x) { return x.deps === 'deferred'; })\n .forEach(function (resolvable) { return (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)); });\n}\n// $urlRouter service and $urlRouterProvider\nvar getUrlRouterProvider = function (uiRouter) { return (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter)); };\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nvar getStateProvider = function () { return extend(router.stateProvider, { $get: function () { return router.stateService; } }); };\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope) {\n $rootScope.$watch(function () {\n trace.approximateDigests++;\n });\n}\nmod_init.provider('$uiRouter', $uiRouterProvider);\nmod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util.provider('$urlService', getProviderFor('urlService'));\nmod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]);\nmod_util.provider('$templateFactory', function () { return new TemplateFactory(); });\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\nmod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]);\nmod_main.factory('$view', function () { return router.viewService; });\nmod_main.service('$trace', function () { return trace; });\nmod_main.run(watchDigests);\nmod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]);\nmod_state.run(['$state', function ($state) { }]);\nmod_rtr.run(['$urlRouter', function ($urlRouter) { }]);\nmod_init.run(runBlock);\n/** @hidden TODO: find a place to move this */\nexport var getLocals = function (ctx) {\n var tokens = ctx.getTokens().filter(isString);\n var tuples = tokens.map(function (key) {\n var resolvable = ctx.getResolvable(key);\n var waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n return tuples.reduce(applyPairs, {});\n};\n//# sourceMappingURL=services.js.map","/* eslint-disable @typescript-eslint/no-empty-interface */\n/* eslint-disable prefer-const */\n/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom, } from '@uirouter/core';\n/** @hidden */\nfunction parseStateRef(ref) {\n var paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly)\n ref = '(' + paramsOnly[1] + ')';\n var parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4)\n throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n/** @hidden */\nfunction stateContext(el) {\n var $uiView = el.parent().inheritedData('$uiView');\n var path = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n/** @hidden */\nfunction processedDef($state, $element, def) {\n var uiState = def.uiState || $state.current.name;\n var uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n var href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href };\n}\n/** @hidden */\nfunction getTypeInfo(el) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === 'FORM';\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n/** @hidden */\nfunction clickHook(el, $state, $timeout, type, getDef) {\n return function (e) {\n var button = e.which || e.button, target = getDef();\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition_1 = $timeout(function () {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n var ignorePreventDefaultCount_1 = type.isAnchor && !target.href ? 1 : 0;\n e.preventDefault = function () {\n if (ignorePreventDefaultCount_1-- <= 0)\n $timeout.cancel(transition_1);\n };\n }\n };\n}\n/** @hidden */\nfunction defaultOpts(el, $state) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n/** @hidden */\nfunction bindEvents(element, scope, hookFn, uiStateOpts) {\n var events;\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n if (!isArray(events)) {\n events = ['click'];\n }\n var on = element.on ? 'on' : 'bind';\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n element[on](event_1, hookFn);\n }\n scope.$on('$destroy', function () {\n var off = element.off ? 'off' : 'unbind';\n for (var _i = 0, events_2 = events; _i < events_2.length; _i++) {\n var event_2 = events_2[_i];\n element[off](event_2, hookFn);\n }\n });\n}\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * <a ui-sref=\".child1\">child 1 state</a>\n * <a ui-sref=\".child2\">child 2 state</a>\n * ```\n *\n * This link activates the parent state.\n * ```html\n * <a ui-sref=\"^\">Return</a>\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * <a ui-sref=\"users\" href=\"/users/\">Users</a>\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"user in users\">\n * <a ui-sref=\"users.detail({ userId: user.id })\">{{ user.displayName }}</a>\n * </li>\n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * <a ui-sref=\"home\" ui-sref-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-sref=\"contacts\" ui-sref-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * <a ui-sref=\"about\">About</a>\n * <a ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n * </li>\n * </ul>\n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * <a href=\"#/home\" ui-sref=\"home\">Home</a>\n * <a href=\"#/about\" ui-sref=\"about\">About</a>\n * <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n * </li>\n * </ul>\n *\n * <a href=\"#/home\" ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-sref=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nvar uiSrefDirective;\nuiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n var hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\" ui-state-params=\"link.params\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * <a ui-state=\"returnto.state\" ui-state-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-state=\"contacts\" ui-state-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-state=\"\" ui-state-params=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nvar uiStateDirective;\nuiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var hookFn;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return ((acc[attr] = noop), acc); }, {});\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n inputAttrs.forEach(function (field) {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n attrs.$observe(field, function (expr) {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, function (newval) {\n rawDef[field] = newval;\n update();\n }, true);\n });\n });\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n * <li ng-repeat=\"user in users\" ui-sref-active=\"active\">\n * <a ui-sref=\"user.details({ userId: user.id })\">{{ user.lastName }}</a>\n * </li>\n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item\">\n * <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item active\">\n * <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n * <div ui-sref-active=\"{'active': 'admin.**'}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n * <div ui-sref-active=\"{'active': ['owner.**', 'admin.**']}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `<div>` and `<a>` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nvar uiSrefActiveDirective;\nuiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope, $element, $attrs) {\n var states = [];\n var activeEqClass;\n var uiSrefActive;\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n }\n catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState, newParams) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n var deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n function setupEventListeners() {\n var deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n var deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n var deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n function setStatesFromDefinitionObject(statesDefinition) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName, activeClass) {\n // Helper function to abstract adding state.\n var addStateForClass = function (stateOrName, activeClass) {\n var ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName, activeClass);\n }\n else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n function addState(stateName, stateParams, activeClass) {\n var state = $state.get(stateName, stateContext($element));\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n states.push(stateInfo);\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n // Update route state\n function update() {\n var splitClasses = function (str) { return str.split(/\\s/).filter(identity); };\n var getClasses = function (stateList) {\n return stateList\n .map(function (x) { return x.activeClass; })\n .map(splitClasses)\n .reduce(unnestR, []);\n };\n var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); }));\n var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length;\n var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n var addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n var removeClasses = allClasses.filter(function (cls) { return !inArray(addClasses, cls); });\n $scope.$evalAsync(function () {\n addClasses.forEach(function (className) { return $element.addClass(className); });\n removeClasses.forEach(function (className) { return $element.removeClass(className); });\n });\n }\n update();\n },\n ],\n };\n },\n];\nangular\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n//# sourceMappingURL=stateDirectives.js.map","/** @publicapi @module directives */ /** */\nimport { extend, filter, isDefined, isFunction, isString, kebobString, noop, parse, ResolveContext, tail, trace, unnestR, } from '@uirouter/core';\nimport { ng as angular } from '../angular';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport var uiView;\n// eslint-disable-next-line prefer-const\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {\n function getRenderer() {\n return {\n enter: function (element, target, cb) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n }\n else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element, cb) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n }\n else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n function configsEqual(config1, config2) {\n return config1 === config2;\n }\n var rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n var directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement, tAttrs, $transclude) {\n return function (scope, $element, attrs) {\n var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n var previousEl, currentEl, currentScope, viewConfig;\n var activeUIView = {\n $type: 'ng1',\n id: directive.count++,\n name: name,\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name,\n config: null,\n configUpdated: configUpdatedCallback,\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n var fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow <ui-view name=\"foo\"><ui-view name=\"bar\"></ui-view></ui-view>\n // See https://github.com/angular-ui/ui-router/issues/3355\n var fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n trace.traceUIViewEvent('Linking', activeUIView);\n function configUpdatedCallback(config) {\n if (config && !(config instanceof Ng1ViewConfig))\n return;\n if (configsEqual(viewConfig, config))\n return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n viewConfig = config;\n updateView(config);\n }\n $element.data('$uiView', { $uiView: activeUIView });\n updateView();\n var unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentEl) {\n var _viewData_1 = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData_1);\n renderer.leave(currentEl, function () {\n _viewData_1.$$animLeave.resolve();\n previousEl = null;\n });\n previousEl = currentEl;\n currentEl = null;\n }\n }\n function updateView(config) {\n var newScope = scope.$new();\n var animEnter = $q.defer(), animLeave = $q.defer();\n var $uiViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n var $uiViewAnim = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n var cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope)\n currentScope.$emit('$viewContentAnimationEnded');\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n cleanupLastView();\n });\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n return directive;\n },\n];\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) {\n var getControllerAs = parse('viewDecl.controllerAs');\n var getResolveAs = parse('viewDecl.resolveAs');\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement) {\n var initial = tElement.html();\n tElement.empty();\n return function (scope, $element) {\n var data = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n var cfg = data.$cfg || { viewDecl: {}, getTemplate: noop };\n var resolveCtx = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n var link = $compile($element.contents());\n var controller = cfg.controller;\n var controllerAs = getControllerAs(cfg);\n var resolveAs = getResolveAs(cfg);\n var locals = resolveCtx && getLocals(resolveCtx);\n scope[resolveAs] = locals;\n if (controller) {\n var controllerInstance = ($controller(controller, extend({}, locals, { $scope: scope, $element: $element })));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n var kebobName = kebobString(cfg.component);\n var tagRegexp_1 = new RegExp(\"^(x-|data-)?\" + kebobName + \"$\", 'i');\n var getComponentController = function () {\n var directiveEl = [].slice\n .call($element[0].children)\n .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); });\n return directiveEl && angular.element(directiveEl).data(\"$\" + cfg.component + \"Controller\");\n };\n var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance)\n return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch_1();\n });\n }\n link(scope);\n };\n },\n };\n}\n/** @hidden */\nvar hasComponentImpl = typeof angular.module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nvar _uiCanExitId = 0;\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n var viewState = tail(cfg.path).state.self;\n var hookOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n var resolveContext = new ResolveContext(cfg.path);\n var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data;\n // Fire callback on any successful transition\n var paramsUpdated = function ($transition$) {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1)\n return;\n var toParams = $transition$.params('to');\n var fromParams = $transition$.params('from');\n var getNodeSchema = function (node) { return node.paramSchema; };\n var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n // Find the to params that have different values than the from params\n var changedToParams = toSchema.filter(function (param) {\n var idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n var changedKeys_1 = changedToParams.map(function (x) { return x.id; });\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; });\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n var id_1 = _uiCanExitId++;\n var cacheProp_1 = '_uiCanExitIds';\n // Returns true if a redirect transition already answered truthy\n var prevTruthyAnswer_1 = function (trans) {\n return !!trans && ((trans[cacheProp_1] && trans[cacheProp_1][id_1] === true) || prevTruthyAnswer_1(trans.redirectedFrom()));\n };\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n var wrappedHook = function (trans) {\n var promise;\n var ids = (trans[cacheProp_1] = trans[cacheProp_1] || {});\n if (!prevTruthyAnswer_1(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(function (val) { return (ids[id_1] = val !== false); });\n }\n return promise;\n };\n var criteria = { exiting: viewState.name };\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n//# sourceMappingURL=viewDirective.js.map","/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state) {\n var isFilter = function (state, params, options) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state) {\n var includesFilter = function (state, params, options) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\nangular.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\nexport { $IsStateFilter, $IncludedByStateFilter };\n//# sourceMappingURL=stateFilters.js.map","/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\n/** @hidden */\nfunction $ViewScrollProvider() {\n var useAnchorScroll = false;\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll, $timeout) {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n return function ($element) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n },\n ];\n}\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n//# sourceMappingURL=viewScroll.js.map","/**\n * @license AngularJS v1.8.3\n * (c) 2010-2020 Google LLC. http://angularjs.org\n * License: MIT\n */\n(function(window) {'use strict';\n\n/* exported\n minErrConfig,\n errorHandlingConfig,\n isValidObjectMaxDepth\n*/\n\nvar minErrConfig = {\n objectMaxDepth: 5,\n urlErrorParamsEnabled: true\n};\n\n/**\n * @ngdoc function\n * @name angular.errorHandlingConfig\n * @module ng\n * @kind function\n *\n * @description\n * Configure several aspects of error handling in AngularJS if used as a setter or return the\n * current configuration if used as a getter. The following options are supported:\n *\n * - **objectMaxDepth**: The maximum depth to which objects are traversed when stringified for error messages.\n *\n * Omitted or undefined options will leave the corresponding configuration values unchanged.\n *\n * @param {Object=} config - The configuration object. May only contain the options that need to be\n * updated. Supported keys:\n *\n * * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a\n * non-positive or non-numeric value, removes the max depth limit.\n * Default: 5\n *\n * * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated error url will\n * contain the parameters of the thrown error. Disabling the parameters can be useful if the\n * generated error url is very long.\n *\n * Default: true. When used without argument, it returns the current value.\n */\nfunction errorHandlingConfig(config) {\n if (isObject(config)) {\n if (isDefined(config.objectMaxDepth)) {\n minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN;\n }\n if (isDefined(config.urlErrorParamsEnabled) && isBoolean(config.urlErrorParamsEnabled)) {\n minErrConfig.urlErrorParamsEnabled = config.urlErrorParamsEnabled;\n }\n } else {\n return minErrConfig;\n }\n}\n\n/**\n * @private\n * @param {Number} maxDepth\n * @return {boolean}\n */\nfunction isValidObjectMaxDepth(maxDepth) {\n return isNumber(maxDepth) && maxDepth > 0;\n}\n\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * AngularJS. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one. The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace'). Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n * error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n ErrorConstructor = ErrorConstructor || Error;\n\n var url = 'https://errors.angularjs.org/1.8.3/';\n var regex = url.replace('.', '\\\\.') + '[\\\\s\\\\S]*';\n var errRegExp = new RegExp(regex, 'g');\n\n return function() {\n var code = arguments[0],\n template = arguments[1],\n message = '[' + (module ? module + ':' : '') + code + '] ',\n templateArgs = sliceArgs(arguments, 2).map(function(arg) {\n return toDebugString(arg, minErrConfig.objectMaxDepth);\n }),\n paramPrefix, i;\n\n // A minErr message has two parts: the message itself and the url that contains the\n // encoded message.\n // The message's parameters can contain other error messages which also include error urls.\n // To prevent the messages from getting too long, we strip the error urls from the parameters.\n\n message += template.replace(/\\{\\d+\\}/g, function(match) {\n var index = +match.slice(1, -1);\n\n if (index < templateArgs.length) {\n return templateArgs[index].replace(errRegExp, '');\n }\n\n return match;\n });\n\n message += '\\n' + url + (module ? module + '/' : '') + code;\n\n if (minErrConfig.urlErrorParamsEnabled) {\n for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {\n message += paramPrefix + 'p' + i + '=' + encodeURIComponent(templateArgs[i]);\n }\n }\n\n return new ErrorConstructor(message);\n };\n}\n\n/* We need to tell ESLint what variables are being exported */\n/* exported\n angular,\n msie,\n jqLite,\n jQuery,\n slice,\n splice,\n push,\n toString,\n minErrConfig,\n errorHandlingConfig,\n isValidObjectMaxDepth,\n ngMinErr,\n angularModule,\n uid,\n REGEX_STRING_REGEXP,\n VALIDITY_STATE_PROPERTY,\n\n lowercase,\n uppercase,\n nodeName_,\n isArrayLike,\n forEach,\n forEachSorted,\n reverseParams,\n nextUid,\n setHashKey,\n extend,\n toInt,\n inherit,\n merge,\n noop,\n identity,\n valueFn,\n isUndefined,\n isDefined,\n isObject,\n isBlankObject,\n isString,\n isNumber,\n isNumberNaN,\n isDate,\n isError,\n isArray,\n isFunction,\n isRegExp,\n isWindow,\n isScope,\n isFile,\n isFormData,\n isBlob,\n isBoolean,\n isPromiseLike,\n trim,\n escapeForRegexp,\n isElement,\n makeMap,\n includes,\n arrayRemove,\n copy,\n simpleCompare,\n equals,\n csp,\n jq,\n concat,\n sliceArgs,\n bind,\n toJsonReplacer,\n toJson,\n fromJson,\n convertTimezoneToLocal,\n timezoneToOffset,\n addDateMinutes,\n startingTag,\n tryDecodeURIComponent,\n parseKeyValue,\n toKeyValue,\n encodeUriSegment,\n encodeUriQuery,\n angularInit,\n bootstrap,\n getTestability,\n snake_case,\n bindJQuery,\n assertArg,\n assertArgFn,\n assertNotHasOwnProperty,\n getter,\n getBlockNodes,\n hasOwnProperty,\n createMap,\n stringify,\n UNSAFE_restoreLegacyJqLiteXHTMLReplacement,\n\n NODE_TYPE_ELEMENT,\n NODE_TYPE_ATTRIBUTE,\n NODE_TYPE_TEXT,\n NODE_TYPE_COMMENT,\n NODE_TYPE_DOCUMENT,\n NODE_TYPE_DOCUMENT_FRAGMENT\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @installation\n * @description\n *\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @private\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};\n\n/**\n * @private\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};\n\n\nvar\n msie, // holds major version number for IE, or NaN if UA is not IE.\n jqLite, // delay binding since jQuery could be loaded after us.\n jQuery, // delay binding\n slice = [].slice,\n splice = [].splice,\n push = [].push,\n toString = Object.prototype.toString,\n getPrototypeOf = Object.getPrototypeOf,\n ngMinErr = minErr('ng'),\n\n /** @name angular */\n angular = window.angular || (window.angular = {}),\n angularModule,\n uid = 0;\n\n// Support: IE 9-11 only\n/**\n * documentMode is an IE-only property\n * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx\n */\nmsie = window.document.documentMode;\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n * String ...)\n */\nfunction isArrayLike(obj) {\n\n // `null`, `undefined` and `window` are not array-like\n if (obj == null || isWindow(obj)) return false;\n\n // arrays, strings and jQuery/jqLite objects are array like\n // * jqLite is either the jQuery or jqLite constructor function\n // * we have to check the existence of jqLite first as this method is called\n // via the forEach method when constructing the jqLite object in the first place\n if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;\n\n // Support: iOS 8.2 (not reproducible in simulator)\n // \"length\" in obj used to prevent JIT error (gh-11508)\n var length = 'length' in Object(obj) && obj.length;\n\n // NodeList objects (with `item` method) and\n // other objects with suitable length characteristics are array-like\n return isNumber(length) && (length >= 0 && (length - 1) in obj || typeof obj.item === 'function');\n\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n * Unlike ES262's\n * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),\n * providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just\n * return the value provided.\n *\n ```js\n var values = {name: 'misko', gender: 'male'};\n var log = [];\n angular.forEach(values, function(value, key) {\n this.push(key + ': ' + value);\n }, log);\n expect(log).toEqual(['name: misko', 'gender: male']);\n ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n var key, length;\n if (obj) {\n if (isFunction(obj)) {\n for (key in obj) {\n if (key !== 'prototype' && key !== 'length' && key !== 'name' && obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (isArray(obj) || isArrayLike(obj)) {\n var isPrimitive = typeof obj !== 'object';\n for (key = 0, length = obj.length; key < length; key++) {\n if (isPrimitive || key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (obj.forEach && obj.forEach !== forEach) {\n obj.forEach(iterator, context, obj);\n } else if (isBlankObject(obj)) {\n // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n for (key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n } else if (typeof obj.hasOwnProperty === 'function') {\n // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else {\n // Slow path for objects which do not have a method `hasOwnProperty`\n for (key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n }\n return obj;\n}\n\nfunction forEachSorted(obj, iterator, context) {\n var keys = Object.keys(obj).sort();\n for (var i = 0; i < keys.length; i++) {\n iterator.call(context, obj[keys[i]], keys[i]);\n }\n return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n return function(value, key) {iteratorFn(key, value);};\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}\n\n\nfunction baseExtend(dst, objs, deep) {\n var h = dst.$$hashKey;\n\n for (var i = 0, ii = objs.length; i < ii; ++i) {\n var obj = objs[i];\n if (!isObject(obj) && !isFunction(obj)) continue;\n var keys = Object.keys(obj);\n for (var j = 0, jj = keys.length; j < jj; j++) {\n var key = keys[j];\n var src = obj[key];\n\n if (deep && isObject(src)) {\n if (isDate(src)) {\n dst[key] = new Date(src.valueOf());\n } else if (isRegExp(src)) {\n dst[key] = new RegExp(src);\n } else if (src.nodeName) {\n dst[key] = src.cloneNode(true);\n } else if (isElement(src)) {\n dst[key] = src.clone();\n } else {\n if (key !== '__proto__') {\n if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};\n baseExtend(dst[key], [src], true);\n }\n }\n } else {\n dst[key] = src;\n }\n }\n }\n\n setHashKey(dst, h);\n return dst;\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.\n *\n * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use\n * {@link angular.merge} for this.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n return baseExtend(dst, slice.call(arguments, 1), false);\n}\n\n\n/**\n* @ngdoc function\n* @name angular.merge\n* @module ng\n* @kind function\n*\n* @description\n* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.\n*\n* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source\n* objects, performing a deep copy.\n*\n* @deprecated\n* sinceVersion=\"1.6.5\"\n* This function is deprecated, but will not be removed in the 1.x lifecycle.\n* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not\n* supported by this function. We suggest using another, similar library for all-purpose merging,\n* such as [lodash's merge()](https://lodash.com/docs/4.17.4#merge).\n*\n* @knownIssue\n* This is a list of (known) object types that are not handled correctly by this function:\n* - [`Blob`](https://developer.mozilla.org/docs/Web/API/Blob)\n* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream)\n* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient)\n* - AngularJS {@link $rootScope.Scope scopes};\n*\n* `angular.merge` also does not support merging objects with circular references.\n*\n* @param {Object} dst Destination object.\n* @param {...Object} src Source object(s).\n* @returns {Object} Reference to `dst`.\n*/\nfunction merge(dst) {\n return baseExtend(dst, slice.call(arguments, 1), true);\n}\n\n\n\nfunction toInt(str) {\n return parseInt(str, 10);\n}\n\nvar isNumberNaN = Number.isNaN || function isNumberNaN(num) {\n // eslint-disable-next-line no-self-compare\n return num !== num;\n};\n\n\nfunction inherit(parent, extra) {\n return extend(Object.create(parent), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n ```js\n function foo(callback) {\n var result = calculateResult();\n (callback || angular.noop)(result);\n }\n ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n ```js\n function transformer(transformationFn, value) {\n return (transformationFn || angular.identity)(value);\n };\n\n // E.g.\n function getResult(fn, input) {\n return (fn || angular.identity)(input);\n };\n\n getResult(function(n) { return n * 2; }, 21); // returns 42\n getResult(null, 21); // returns 21\n getResult(undefined, 21); // returns 21\n ```\n *\n * @param {*} value to be returned.\n * @returns {*} the value passed in.\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function valueRef() {return value;};}\n\nfunction hasCustomToString(obj) {\n return isFunction(obj.toString) && obj.toString !== toString;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value) {return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value) {return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value) {\n // http://jsperf.com/isobject4\n return value !== null && typeof value === 'object';\n}\n\n\n/**\n * Determine if a value is an object with a null prototype\n *\n * @returns {boolean} True if `value` is an `Object` with a null prototype\n */\nfunction isBlankObject(value) {\n return value !== null && typeof value === 'object' && !getPrototypeOf(value);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value) {return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * This includes the \"special\" numbers `NaN`, `+Infinity` and `-Infinity`.\n *\n * If you wish to exclude these then you can use the native\n * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)\n * method.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value) {return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nfunction isArray(arr) {\n return Array.isArray(arr) || arr instanceof Array;\n}\n\n/**\n * @description\n * Determines if a reference is an `Error`.\n * Loosely based on https://www.npmjs.com/package/iserror\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Error`.\n */\nfunction isError(value) {\n var tag = toString.call(value);\n switch (tag) {\n case '[object Error]': return true;\n case '[object Exception]': return true;\n case '[object DOMException]': return true;\n default: return value instanceof Error;\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value) {return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n return toString.call(obj) === '[object File]';\n}\n\n\nfunction isFormData(obj) {\n return toString.call(obj) === '[object FormData]';\n}\n\n\nfunction isBlob(obj) {\n return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n return obj && isFunction(obj.then);\n}\n\n\nvar TYPED_ARRAY_REGEXP = /^\\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/;\nfunction isTypedArray(value) {\n return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));\n}\n\nfunction isArrayBuffer(obj) {\n return toString.call(obj) === '[object ArrayBuffer]';\n}\n\n\nvar trim = function(value) {\n return isString(value) ? value.trim() : value;\n};\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021\n// Prereq: s is a string.\nvar escapeForRegexp = function(s) {\n return s\n .replace(/([-()[\\]{}+?*.$^|,:#<!\\\\])/g, '\\\\$1')\n // eslint-disable-next-line no-control-regex\n .replace(/\\x08/g, '\\\\x08');\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n return !!(node &&\n (node.nodeName // We are a direct element.\n || (node.prop && node.attr && node.find))); // We have an on and find method part of jQuery API.\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n var obj = {}, items = str.split(','), i;\n for (i = 0; i < items.length; i++) {\n obj[items[i]] = true;\n }\n return obj;\n}\n\n\nfunction nodeName_(element) {\n return lowercase(element.nodeName || (element[0] && element[0].nodeName));\n}\n\nfunction includes(array, obj) {\n return Array.prototype.indexOf.call(array, obj) !== -1;\n}\n\nfunction arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index >= 0) {\n array.splice(index, 1);\n }\n return index;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array. This functions is used\n * internally, mostly in the change-detection code. It is not intended as an all-purpose copy\n * function, and has several limitations (see below).\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for arrays) or properties (for objects)\n * are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to `destination` an exception will be thrown.\n *\n * <br />\n *\n * <div class=\"alert alert-warning\">\n * Only enumerable properties are taken into account. Non-enumerable properties (both on `source`\n * and on `destination`) will be ignored.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * `angular.copy` does not check if destination and source are of the same type. It's the\n * developer's responsibility to make sure they are compatible.\n * </div>\n *\n * @knownIssue\n * This is a non-exhaustive list of object types / features that are not handled correctly by\n * `angular.copy`. Note that since this functions is used by the change detection code, this\n * means binding or watching objects of these types (or that include these types) might not work\n * correctly.\n * - [`File`](https://developer.mozilla.org/docs/Web/API/File)\n * - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)\n * - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData)\n * - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream)\n * - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\n * - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)\n * - [`getter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/\n * [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)\n *\n * @param {*} source The source that will be used to make a copy. Can be any type, including\n * primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If provided,\n * must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n <example module=\"copyExample\" name=\"angular-copy\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form novalidate class=\"simple-form\">\n <label>Name: <input type=\"text\" ng-model=\"user.name\" /></label><br />\n <label>Age: <input type=\"number\" ng-model=\"user.age\" /></label><br />\n Gender: <label><input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male</label>\n <label><input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female</label><br />\n <button ng-click=\"reset()\">RESET</button>\n <button ng-click=\"update(user)\">SAVE</button>\n </form>\n <pre>form = {{user | json}}</pre>\n <pre>leader = {{leader | json}}</pre>\n </div>\n </file>\n <file name=\"script.js\">\n // Module: copyExample\n angular.\n module('copyExample', []).\n controller('ExampleController', ['$scope', function($scope) {\n $scope.leader = {};\n\n $scope.reset = function() {\n // Example with 1 argument\n $scope.user = angular.copy($scope.leader);\n };\n\n $scope.update = function(user) {\n // Example with 2 arguments\n angular.copy(user, $scope.leader);\n };\n\n $scope.reset();\n }]);\n </file>\n </example>\n */\nfunction copy(source, destination, maxDepth) {\n var stackSource = [];\n var stackDest = [];\n maxDepth = isValidObjectMaxDepth(maxDepth) ? maxDepth : NaN;\n\n if (destination) {\n if (isTypedArray(destination) || isArrayBuffer(destination)) {\n throw ngMinErr('cpta', 'Can\\'t copy! TypedArray destination cannot be mutated.');\n }\n if (source === destination) {\n throw ngMinErr('cpi', 'Can\\'t copy! Source and destination are identical.');\n }\n\n // Empty the destination object\n if (isArray(destination)) {\n destination.length = 0;\n } else {\n forEach(destination, function(value, key) {\n if (key !== '$$hashKey') {\n delete destination[key];\n }\n });\n }\n\n stackSource.push(source);\n stackDest.push(destination);\n return copyRecurse(source, destination, maxDepth);\n }\n\n return copyElement(source, maxDepth);\n\n function copyRecurse(source, destination, maxDepth) {\n maxDepth--;\n if (maxDepth < 0) {\n return '...';\n }\n var h = destination.$$hashKey;\n var key;\n if (isArray(source)) {\n for (var i = 0, ii = source.length; i < ii; i++) {\n destination.push(copyElement(source[i], maxDepth));\n }\n } else if (isBlankObject(source)) {\n // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n for (key in source) {\n destination[key] = copyElement(source[key], maxDepth);\n }\n } else if (source && typeof source.hasOwnProperty === 'function') {\n // Slow path, which must rely on hasOwnProperty\n for (key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = copyElement(source[key], maxDepth);\n }\n }\n } else {\n // Slowest path --- hasOwnProperty can't be called as a method\n for (key in source) {\n if (hasOwnProperty.call(source, key)) {\n destination[key] = copyElement(source[key], maxDepth);\n }\n }\n }\n setHashKey(destination, h);\n return destination;\n }\n\n function copyElement(source, maxDepth) {\n // Simple values\n if (!isObject(source)) {\n return source;\n }\n\n // Already copied values\n var index = stackSource.indexOf(source);\n if (index !== -1) {\n return stackDest[index];\n }\n\n if (isWindow(source) || isScope(source)) {\n throw ngMinErr('cpws',\n 'Can\\'t copy! Making copies of Window or Scope instances is not supported.');\n }\n\n var needsRecurse = false;\n var destination = copyType(source);\n\n if (destination === undefined) {\n destination = isArray(source) ? [] : Object.create(getPrototypeOf(source));\n needsRecurse = true;\n }\n\n stackSource.push(source);\n stackDest.push(destination);\n\n return needsRecurse\n ? copyRecurse(source, destination, maxDepth)\n : destination;\n }\n\n function copyType(source) {\n switch (toString.call(source)) {\n case '[object Int8Array]':\n case '[object Int16Array]':\n case '[object Int32Array]':\n case '[object Float32Array]':\n case '[object Float64Array]':\n case '[object Uint8Array]':\n case '[object Uint8ClampedArray]':\n case '[object Uint16Array]':\n case '[object Uint32Array]':\n return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length);\n\n case '[object ArrayBuffer]':\n // Support: IE10\n if (!source.slice) {\n // If we're in this case we know the environment supports ArrayBuffer\n /* eslint-disable no-undef */\n var copied = new ArrayBuffer(source.byteLength);\n new Uint8Array(copied).set(new Uint8Array(source));\n /* eslint-enable */\n return copied;\n }\n return source.slice(0);\n\n case '[object Boolean]':\n case '[object Number]':\n case '[object String]':\n case '[object Date]':\n return new source.constructor(source.valueOf());\n\n case '[object RegExp]':\n var re = new RegExp(source.source, source.toString().match(/[^/]*$/)[0]);\n re.lastIndex = source.lastIndex;\n return re;\n\n case '[object Blob]':\n return new source.constructor([source], {type: source.type});\n }\n\n if (isFunction(source.cloneNode)) {\n return source.cloneNode(true);\n }\n }\n}\n\n\n// eslint-disable-next-line no-self-compare\nfunction simpleCompare(a, b) { return a === b || (a !== a && b !== b); }\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n * comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n * representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n *\n * @example\n <example module=\"equalsExample\" name=\"equalsExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form novalidate>\n <h3>User 1</h3>\n Name: <input type=\"text\" ng-model=\"user1.name\">\n Age: <input type=\"number\" ng-model=\"user1.age\">\n\n <h3>User 2</h3>\n Name: <input type=\"text\" ng-model=\"user2.name\">\n Age: <input type=\"number\" ng-model=\"user2.age\">\n\n <div>\n <br/>\n <input type=\"button\" value=\"Compare\" ng-click=\"compare()\">\n </div>\n User 1: <pre>{{user1 | json}}</pre>\n User 2: <pre>{{user2 | json}}</pre>\n Equal: <pre>{{result}}</pre>\n </form>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('equalsExample', []).controller('ExampleController', ['$scope', function($scope) {\n $scope.user1 = {};\n $scope.user2 = {};\n $scope.compare = function() {\n $scope.result = angular.equals($scope.user1, $scope.user2);\n };\n }]);\n </file>\n </example>\n */\nfunction equals(o1, o2) {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n // eslint-disable-next-line no-self-compare\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 === t2 && t1 === 'object') {\n if (isArray(o1)) {\n if (!isArray(o2)) return false;\n if ((length = o1.length) === o2.length) {\n for (key = 0; key < length; key++) {\n if (!equals(o1[key], o2[key])) return false;\n }\n return true;\n }\n } else if (isDate(o1)) {\n if (!isDate(o2)) return false;\n return simpleCompare(o1.getTime(), o2.getTime());\n } else if (isRegExp(o1)) {\n if (!isRegExp(o2)) return false;\n return o1.toString() === o2.toString();\n } else {\n if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||\n isArray(o2) || isDate(o2) || isRegExp(o2)) return false;\n keySet = createMap();\n for (key in o1) {\n if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n if (!equals(o1[key], o2[key])) return false;\n keySet[key] = true;\n }\n for (key in o2) {\n if (!(key in keySet) &&\n key.charAt(0) !== '$' &&\n isDefined(o2[key]) &&\n !isFunction(o2[key])) return false;\n }\n return true;\n }\n }\n return false;\n}\n\nvar csp = function() {\n if (!isDefined(csp.rules)) {\n\n\n var ngCspElement = (window.document.querySelector('[ng-csp]') ||\n window.document.querySelector('[data-ng-csp]'));\n\n if (ngCspElement) {\n var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||\n ngCspElement.getAttribute('data-ng-csp');\n csp.rules = {\n noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),\n noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)\n };\n } else {\n csp.rules = {\n noUnsafeEval: noUnsafeEval(),\n noInlineStyle: false\n };\n }\n }\n\n return csp.rules;\n\n function noUnsafeEval() {\n try {\n // eslint-disable-next-line no-new, no-new-func\n new Function('');\n return false;\n } catch (e) {\n return true;\n }\n }\n};\n\n/**\n * @ngdoc directive\n * @module ng\n * @name ngJq\n *\n * @element ANY\n * @param {string=} ngJq the name of the library available under `window`\n * to be used for angular.element\n * @description\n * Use this directive to force the angular.element library. This should be\n * used to force either jqLite by leaving ng-jq blank or setting the name of\n * the jquery variable under window (eg. jQuery).\n *\n * Since AngularJS looks for this directive when it is loaded (doesn't wait for the\n * DOMContentLoaded event), it must be placed on an element that comes before the script\n * which loads angular. Also, only the first instance of `ng-jq` will be used and all\n * others ignored.\n *\n * @example\n * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.\n ```html\n <!doctype html>\n <html ng-app ng-jq>\n ...\n ...\n </html>\n ```\n * @example\n * This example shows how to use a jQuery based library of a different name.\n * The library name must be available at the top most 'window'.\n ```html\n <!doctype html>\n <html ng-app ng-jq=\"jQueryLib\">\n ...\n ...\n </html>\n ```\n */\nvar jq = function() {\n if (isDefined(jq.name_)) return jq.name_;\n var el;\n var i, ii = ngAttrPrefixes.length, prefix, name;\n for (i = 0; i < ii; ++i) {\n prefix = ngAttrPrefixes[i];\n el = window.document.querySelector('[' + prefix.replace(':', '\\\\:') + 'jq]');\n if (el) {\n name = el.getAttribute(prefix + 'jq');\n break;\n }\n }\n\n return (jq.name_ = name);\n};\n\nfunction concat(array1, array2, index) {\n return array1.concat(slice.call(array2, index));\n}\n\nfunction sliceArgs(args, startIndex) {\n return slice.call(args, startIndex || 0);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.bind\n * @module ng\n * @kind function\n *\n * @description\n * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n *\n * @param {Object} self Context which `fn` should be evaluated in.\n * @param {function()} fn Function to be bound.\n * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n */\nfunction bind(self, fn) {\n var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n if (isFunction(fn) && !(fn instanceof RegExp)) {\n return curryArgs.length\n ? function() {\n return arguments.length\n ? fn.apply(self, concat(curryArgs, arguments, 0))\n : fn.apply(self, curryArgs);\n }\n : function() {\n return arguments.length\n ? fn.apply(self, arguments)\n : fn.call(self);\n };\n } else {\n // In IE, native methods are not functions so they cannot be bound (note: they don't need to be).\n return fn;\n }\n}\n\n\nfunction toJsonReplacer(key, value) {\n var val = value;\n\n if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n val = undefined;\n } else if (isWindow(value)) {\n val = '$WINDOW';\n } else if (value && window.document === value) {\n val = '$DOCUMENT';\n } else if (isScope(value)) {\n val = '$SCOPE';\n }\n\n return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since AngularJS uses this notation internally.\n *\n * @param {Object|Array|Date|string|number|boolean} obj Input to be serialized into JSON.\n * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.\n * If set to an integer, the JSON output will contain that many spaces per indentation.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n * @knownIssue\n *\n * The Safari browser throws a `RangeError` instead of returning `null` when it tries to stringify a `Date`\n * object with an invalid date value. The only reliable way to prevent this is to monkeypatch the\n * `Date.prototype.toJSON` method as follows:\n *\n * ```\n * var _DatetoJSON = Date.prototype.toJSON;\n * Date.prototype.toJSON = function() {\n * try {\n * return _DatetoJSON.call(this);\n * } catch(e) {\n * if (e instanceof RangeError) {\n * return null;\n * }\n * throw e;\n * }\n * };\n * ```\n *\n * See https://github.com/angular/angular.js/pull/14221 for more information.\n */\nfunction toJson(obj, pretty) {\n if (isUndefined(obj)) return undefined;\n if (!isNumber(pretty)) {\n pretty = pretty ? 2 : null;\n }\n return JSON.stringify(obj, toJsonReplacer, pretty);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized JSON string.\n */\nfunction fromJson(json) {\n return isString(json)\n ? JSON.parse(json)\n : json;\n}\n\n\nvar ALL_COLONS = /:/g;\nfunction timezoneToOffset(timezone, fallback) {\n // Support: IE 9-11 only, Edge 13-15+\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(ALL_COLONS, '');\n var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNumberNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\n\n\nfunction addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\n\n\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n reverse = reverse ? -1 : 1;\n var dateTimezoneOffset = date.getTimezoneOffset();\n var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n element = jqLite(element).clone().empty();\n var elemHtml = jqLite('<div></div>').append(element).html();\n try {\n return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :\n elemHtml.\n match(/^(<[^>]+>)/)[1].\n replace(/^<([\\w-]+)/, function(match, nodeName) {return '<' + lowercase(nodeName);});\n } catch (e) {\n return lowercase(elemHtml);\n }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n try {\n return decodeURIComponent(value);\n } catch (e) {\n // Ignore any invalid uri component.\n }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.<string,boolean|Array>}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n var obj = {};\n forEach((keyValue || '').split('&'), function(keyValue) {\n var splitPoint, key, val;\n if (keyValue) {\n key = keyValue = keyValue.replace(/\\+/g,'%20');\n splitPoint = keyValue.indexOf('=');\n if (splitPoint !== -1) {\n key = keyValue.substring(0, splitPoint);\n val = keyValue.substring(splitPoint + 1);\n }\n key = tryDecodeURIComponent(key);\n if (isDefined(key)) {\n val = isDefined(val) ? tryDecodeURIComponent(val) : true;\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n } else if (isArray(obj[key])) {\n obj[key].push(val);\n } else {\n obj[key] = [obj[key],val];\n }\n }\n }\n });\n return obj;\n}\n\nfunction toKeyValue(obj) {\n var parts = [];\n forEach(obj, function(value, key) {\n if (isArray(value)) {\n forEach(value, function(arrayValue) {\n parts.push(encodeUriQuery(key, true) +\n (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n });\n } else {\n parts.push(encodeUriQuery(key, true) +\n (value === true ? '' : '=' + encodeUriQuery(value, true)));\n }\n });\n return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n var attr, i, ii = ngAttrPrefixes.length;\n for (i = 0; i < ii; ++i) {\n attr = ngAttrPrefixes[i] + ngAttr;\n if (isString(attr = element.getAttribute(attr))) {\n return attr;\n }\n }\n return null;\n}\n\nfunction allowAutoBootstrap(document) {\n var script = document.currentScript;\n\n if (!script) {\n // Support: IE 9-11 only\n // IE does not have `document.currentScript`\n return true;\n }\n\n // If the `currentScript` property has been clobbered just return false, since this indicates a probable attack\n if (!(script instanceof window.HTMLScriptElement || script instanceof window.SVGScriptElement)) {\n return false;\n }\n\n var attributes = script.attributes;\n var srcs = [attributes.getNamedItem('src'), attributes.getNamedItem('href'), attributes.getNamedItem('xlink:href')];\n\n return srcs.every(function(src) {\n if (!src) {\n return true;\n }\n if (!src.value) {\n return false;\n }\n\n var link = document.createElement('a');\n link.href = src.value;\n\n if (document.location.origin === link.origin) {\n // Same-origin resources are always allowed, even for banned URL schemes.\n return true;\n }\n // Disabled bootstrapping unless angular.js was loaded from a known scheme used on the web.\n // This is to prevent angular.js bundled with browser extensions from being used to bypass the\n // content security policy in web pages and other browser extensions.\n switch (link.protocol) {\n case 'http:':\n case 'https:':\n case 'ftp:':\n case 'blob:':\n case 'file:':\n case 'data:':\n return true;\n default:\n return false;\n }\n });\n}\n\n// Cached as it has to run during loading so that document.currentScript is available.\nvar isAutoBootstrapAllowed = allowAutoBootstrap(window.document);\n\n/**\n * @ngdoc directive\n * @name ngApp\n * @module ng\n *\n * @element ANY\n * @param {angular.Module} ngApp an optional application\n * {@link angular.module module} name to load.\n * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be\n * created in \"strict-di\" mode. This means that the application will fail to invoke functions which\n * do not use explicit function annotation (and are thus unsuitable for minification), as described\n * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in\n * tracking down the root of these bugs.\n *\n * @description\n *\n * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n * designates the **root element** of the application and is typically placed near the root element\n * of the page - e.g. on the `<body>` or `<html>` tags.\n *\n * There are a few things to keep in mind when using `ngApp`:\n * - only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead.\n * - AngularJS applications cannot be nested within each other.\n * - Do not use a directive that uses {@link ng.$compile#transclusion transclusion} on the same element as `ngApp`.\n * This includes directives such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and\n * {@link ngRoute.ngView `ngView`}.\n * Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector},\n * causing animations to stop working and making the injector inaccessible from outside the app.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application. This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * @example\n *\n * ### Simple Usage\n *\n * `ngApp` is the easiest, and most common way to bootstrap an application.\n *\n <example module=\"ngAppDemo\" name=\"ng-app\">\n <file name=\"index.html\">\n <div ng-controller=\"ngAppDemoController\">\n I can add: {{a}} + {{b}} = {{ a+b }}\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n });\n </file>\n </example>\n *\n * @example\n *\n * ### With `ngStrictDi`\n *\n * Using `ngStrictDi`, you would see something like this:\n *\n <example ng-app-included=\"true\" name=\"strict-di\">\n <file name=\"index.html\">\n <div ng-app=\"ngAppStrictDemo\" ng-strict-di>\n <div ng-controller=\"GoodController1\">\n I can add: {{a}} + {{b}} = {{ a+b }}\n\n <p>This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n </p>\n </div>\n\n <div ng-controller=\"GoodController2\">\n Name: <input ng-model=\"name\"><br />\n Hello, {{name}}!\n\n <p>This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n </p>\n </div>\n\n <div ng-controller=\"BadController\">\n I can add: {{a}} + {{b}} = {{ a+b }}\n\n <p>The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n </p>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngAppStrictDemo', [])\n // BadController will fail to instantiate, due to relying on automatic function annotation,\n // rather than an explicit annotation\n .controller('BadController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n })\n // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n // due to using explicit annotations using the array style and $inject property, respectively.\n .controller('GoodController1', ['$scope', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n }])\n .controller('GoodController2', GoodController2);\n function GoodController2($scope) {\n $scope.name = 'World';\n }\n GoodController2.$inject = ['$scope'];\n </file>\n <file name=\"style.css\">\n div[ng-controller] {\n margin-bottom: 1em;\n -webkit-border-radius: 4px;\n border-radius: 4px;\n border: 1px solid;\n padding: .5em;\n }\n div[ng-controller^=Good] {\n border-color: #d6e9c6;\n background-color: #dff0d8;\n color: #3c763d;\n }\n div[ng-controller^=Bad] {\n border-color: #ebccd1;\n background-color: #f2dede;\n color: #a94442;\n margin-bottom: 0;\n }\n </file>\n </example>\n */\nfunction angularInit(element, bootstrap) {\n var appElement,\n module,\n config = {};\n\n // The element `element` has priority over any other element.\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n\n if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n appElement = element;\n module = element.getAttribute(name);\n }\n });\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n var candidate;\n\n if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n appElement = candidate;\n module = candidate.getAttribute(name);\n }\n });\n if (appElement) {\n if (!isAutoBootstrapAllowed) {\n window.console.error('AngularJS: disabling automatic bootstrap. <script> protocol indicates ' +\n 'an extension, document.location.href does not match.');\n return;\n }\n config.strictDi = getNgAttribute(appElement, 'strict-di') !== null;\n bootstrap(appElement, module ? [module] : [], config);\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up AngularJS application.\n *\n * For more information, see the {@link guide/bootstrap Bootstrap guide}.\n *\n * AngularJS will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of AngularJS try to work on the DOM.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Do not bootstrap the app on an element with a directive that uses {@link ng.$compile#transclusion transclusion},\n * such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and {@link ngRoute.ngView `ngView`}.\n * Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector},\n * causing animations to stop working and making the injector inaccessible from outside the app.\n * </div>\n *\n * ```html\n * <!doctype html>\n * <html>\n * <body>\n * <div ng-controller=\"WelcomeController\">\n * {{greeting}}\n * </div>\n *\n * <script src=\"angular.js\"></script>\n * <script>\n * var app = angular.module('demo', [])\n * .controller('WelcomeController', function($scope) {\n * $scope.greeting = 'Welcome!';\n * });\n * angular.bootstrap(document, ['demo']);\n * </script>\n * </body>\n * </html>\n * ```\n *\n * @param {DOMElement} element DOM element which is the root of AngularJS application.\n * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a `config` block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * * `strictDi` - disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code. Defaults to `false`.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === window.document) ? 'document' : startingTag(element);\n // Encode angle brackets to prevent input from being sanitized to empty string #8683.\n throw ngMinErr(\n 'btstrpd',\n 'App already bootstrapped with this element \\'{0}\\'',\n tag.replace(/</,'<').replace(/>/,'>'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n return doBootstrap();\n };\n\n if (isFunction(angular.resumeDeferredBootstrap)) {\n angular.resumeDeferredBootstrap();\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of AngularJS on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of AngularJS application.\n */\nfunction getTestability(rootElement) {\n var injector = angular.element(rootElement).injector();\n if (!injector) {\n throw ngMinErr('test',\n 'no injector found for element argument to getTestability');\n }\n return injector.get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n var jqName = jq();\n jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)\n !jqName ? undefined : // use jqLite\n window[jqName]; // use jQuery specified by `ngJq`\n\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // AngularJS 1.2+ requires jQuery 1.7+ for on()/off() support.\n // AngularJS 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: /** @type {?} */ (JQLitePrototype).controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n } else {\n jqLite = JQLite;\n }\n\n // All nodes removed from the DOM via various jqLite/jQuery APIs like .remove()\n // are passed through jqLite/jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jqLite.cleanData;\n jqLite.cleanData = function(elems) {\n var events;\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = (jqLite._data(elem) || {}).events;\n if (events && events.$destroy) {\n jqLite(elem).triggerHandler('$destroy');\n }\n }\n originalCleanData(elems);\n };\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * @ngdoc function\n * @name angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement\n * @module ng\n * @kind function\n *\n * @description\n * Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like\n * `<div /><span />` to `<div></div><span></span>` instead of `<div><span></span></div>`.\n * The new behavior is a security fix. Thus, if you need to call this function, please try to adjust\n * your code for this change and remove your use of this function as soon as possible.\n\n * Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read the\n * [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details\n * about the workarounds.\n */\nfunction UNSAFE_restoreLegacyJqLiteXHTMLReplacement() {\n JQLite.legacyXHTMLReplacement = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', 'Argument \\'{0}\\' is {1}', (name || '?'), (reason || 'required'));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {Array} the inputted object or a jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): update `nodes` instead of creating a new object?\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes;\n\n for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {\n if (blockNodes || nodes[i] !== node) {\n if (!blockNodes) {\n blockNodes = jqLite(slice.call(nodes, 0, i));\n }\n blockNodes.push(node);\n }\n }\n\n return blockNodes || nodes;\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\nfunction stringify(value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string':\n break;\n case 'number':\n value = '' + value;\n break;\n default:\n if (hasCustomToString(value) && !isArray(value) && !isDate(value)) {\n value = value.toString();\n } else {\n value = toJson(value);\n }\n }\n\n return value;\n}\n\nvar NODE_TYPE_ELEMENT = 1;\nvar NODE_TYPE_ATTRIBUTE = 2;\nvar NODE_TYPE_TEXT = 3;\nvar NODE_TYPE_COMMENT = 8;\nvar NODE_TYPE_DOCUMENT = 9;\nvar NODE_TYPE_DOCUMENT_FRAGMENT = 11;\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring AngularJS {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.<string, angular.Module>} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving AngularJS\n * modules.\n * All modules (AngularJS core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * Passing one argument retrieves an existing {@link angular.Module},\n * whereas passing more than one argument creates a new {@link angular.Module}\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.<string>=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {angular.Module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n\n var info = {};\n\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', 'Module \\'{0}\\' is not available! You either misspelled ' +\n 'the module name or forgot to load it. If registering a module ensure that you ' +\n 'specify the dependencies as the second argument.', name);\n }\n\n /** @type {!Array.<Array.<*>>} */\n var invokeQueue = [];\n\n /** @type {!Array.<Function>} */\n var configBlocks = [];\n\n /** @type {!Array.<Function>} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc method\n * @name angular.Module#info\n * @module ng\n *\n * @param {Object=} info Information about the module\n * @returns {Object|Module} The current info object for this module if called as a getter,\n * or `this` if called as a setter.\n *\n * @description\n * Read and write custom information about this module.\n * For example you could put the version of the module in here.\n *\n * ```js\n * angular.module('myModule', []).info({ version: '1.0.0' });\n * ```\n *\n * The version could then be read back out by accessing the module elsewhere:\n *\n * ```\n * var version = angular.module('myModule').info().version;\n * ```\n *\n * You can also retrieve this information during runtime via the\n * {@link $injector#modules `$injector.modules`} property:\n *\n * ```js\n * var version = $injector.modules['myModule'].info().version;\n * ```\n */\n info: function(value) {\n if (isDefined(value)) {\n if (!isObject(value)) throw ngMinErr('aobj', 'Argument \\'{0}\\' must be an object', 'value');\n info = value;\n return this;\n }\n return info;\n },\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLaterAndSetModuleName('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLaterAndSetModuleName('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLaterAndSetModuleName('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constants are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#decorator\n * @module ng\n * @param {string} name The name of the service to decorate.\n * @param {Function} decorFn This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance.\n * @description\n * See {@link auto.$provide#decorator $provide.decorator()}.\n */\n decorator: invokeLaterAndSetModuleName('$provide', 'decorator', configBlocks),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link $animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ng.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name - this must be a valid AngularJS expression identifier\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n */\n filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#component\n * @module ng\n * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),\n * or an object map of components where the keys are the names and the values are the component definition objects.\n * @param {Object} options Component definition object (a simplified\n * {@link ng.$compile#directive-definition-object directive definition object})\n *\n * @description\n * See {@link ng.$compileProvider#component $compileProvider.component()}.\n */\n component: invokeLaterAndSetModuleName('$compileProvider', 'component'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to configure services by injecting their\n * {@link angular.Module#provider `providers`}, e.g. for adding routes to the\n * {@link ngRoute.$routeProvider $routeProvider}.\n *\n * Note that you can only inject {@link angular.Module#provider `providers`} and\n * {@link angular.Module#constant `constants`} into this function.\n *\n * For more about how to configure services, see\n * {@link providers#provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n\n /**\n * @param {string} provider\n * @param {string} method\n * @returns {angular.Module}\n */\n function invokeLaterAndSetModuleName(provider, method, queue) {\n if (!queue) queue = invokeQueue;\n return function(recipeName, factoryFunction) {\n if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;\n queue.push([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global shallowCopy: true */\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n/* exported toDebugString */\n\nfunction serializeObject(obj, maxDepth) {\n var seen = [];\n\n // There is no direct way to stringify object until reaching a specific depth\n // and a very deep object can cause a performance issue, so we copy the object\n // based on this specific depth and then stringify it.\n if (isValidObjectMaxDepth(maxDepth)) {\n // This file is also included in `angular-loader`, so `copy()` might not always be available in\n // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed.\n obj = angular.copy(obj, null, maxDepth);\n }\n return JSON.stringify(obj, function(key, val) {\n val = toJsonReplacer(key, val);\n if (isObject(val)) {\n\n if (seen.indexOf(val) >= 0) return '...';\n\n seen.push(val);\n }\n return val;\n });\n}\n\nfunction toDebugString(obj, maxDepth) {\n if (typeof obj === 'function') {\n return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n } else if (isUndefined(obj)) {\n return 'undefined';\n } else if (typeof obj !== 'string') {\n return serializeObject(obj, maxDepth);\n }\n return obj;\n}\n\n/* global angularModule: true,\n version: true,\n\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n hiddenInputBrowserCacheDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRefDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $CoreAnimateCssProvider,\n $$CoreAnimateJsProvider,\n $$CoreAnimateQueueProvider,\n $$AnimateRunnerFactoryProvider,\n $$AnimateAsyncRunFactoryProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DateProvider,\n $DocumentProvider,\n $$IsDocumentHiddenProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $$ForceReflowProvider,\n $InterpolateProvider,\n $$IntervalFactoryProvider,\n $IntervalProvider,\n $HttpProvider,\n $HttpParamSerializerProvider,\n $HttpParamSerializerJQLikeProvider,\n $HttpBackendProvider,\n $xhrFactoryProvider,\n $jsonpCallbacksProvider,\n $LocationProvider,\n $LogProvider,\n $$MapProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $$TaskTrackerFactoryProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $WindowProvider,\n $$jqLiteProvider,\n $$CookieReaderProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version.\n *\n * This object has the following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n // These placeholder strings will be replaced by grunt's `build` task.\n // They need to be double- or single-quoted.\n full: '1.8.3',\n major: 1,\n minor: 8,\n dot: 3,\n codeName: 'ultimate-farewell'\n};\n\n\nfunction publishExternalAPI(angular) {\n extend(angular, {\n 'errorHandlingConfig': errorHandlingConfig,\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'merge': merge,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'callbacks': {$$counter: 0},\n 'getTestability': getTestability,\n 'reloadWithDebugInfo': reloadWithDebugInfo,\n 'UNSAFE_restoreLegacyJqLiteXHTMLReplacement': UNSAFE_restoreLegacyJqLiteXHTMLReplacement,\n '$$minErr': minErr,\n '$$csp': csp,\n '$$encodeUriSegment': encodeUriSegment,\n '$$encodeUriQuery': encodeUriQuery,\n '$$lowercase': lowercase,\n '$$stringify': stringify,\n '$$uppercase': uppercase\n });\n\n angularModule = setupModuleLoader(window);\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRef: ngRefDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective,\n input: hiddenInputBrowserCacheDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $animateCss: $CoreAnimateCssProvider,\n $$animateJs: $$CoreAnimateJsProvider,\n $$animateQueue: $$CoreAnimateQueueProvider,\n $$AnimateRunner: $$AnimateRunnerFactoryProvider,\n $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $$isDocumentHidden: $$IsDocumentHiddenProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $$forceReflow: $$ForceReflowProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $$intervalFactory: $$IntervalFactoryProvider,\n $http: $HttpProvider,\n $httpParamSerializer: $HttpParamSerializerProvider,\n $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,\n $httpBackend: $HttpBackendProvider,\n $xhrFactory: $xhrFactoryProvider,\n $jsonpCallbacks: $jsonpCallbacksProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $$taskTrackerFactory: $$TaskTrackerFactoryProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$jqLite: $$jqLiteProvider,\n $$Map: $$MapProvider,\n $$cookieReader: $$CookieReaderProvider\n });\n }\n ])\n .info({ angularVersion: '1.8.3' });\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* global\n JQLitePrototype: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to AngularJS's built-in subset of jQuery, called \"jQuery lite\" or **jqLite**.\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * AngularJS to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the\n * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a\n * specific version of jQuery if multiple versions exist on the page.\n *\n * <div class=\"alert alert-info\">**Note:** All element references in AngularJS are always wrapped with jQuery or\n * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.</div>\n *\n * <div class=\"alert alert-warning\">**Note:** Keep in mind that this function will not find elements\n * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)`\n * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.</div>\n *\n * ## AngularJS's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/) - Contrary to jQuery, this doesn't clone elements\n * so will not work correctly when invoked on a jqLite object containing more than one DOM node\n * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters\n * - [`bind()`](http://api.jquery.com/bind/) (_deprecated_, use [`on()`](http://api.jquery.com/on/)) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`.\n * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing.\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/) (_deprecated_, use `angular.element(callback)` instead of `angular.element(document).ready(callback)`)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/) - Does not support multiple attributes\n * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/) - Does not support a function as first argument\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers\n * - [`unbind()`](http://api.jquery.com/unbind/) (_deprecated_, use [`off()`](http://api.jquery.com/off/)) - Does not support namespaces or event object as parameter\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * jqLite also provides a method restoring pre-1.8 insecure treatment of XHTML-like tags.\n * This legacy behavior turns input like `<div /><span />` to `<div></div><span></span>`\n * instead of `<div><span></span></div>` like version 1.8 & newer do. To restore it, invoke:\n * ```js\n * angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement();\n * ```\n * Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read the\n * [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details\n * about the workarounds.\n *\n * ## jQuery/jqLite Extras\n * AngularJS also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to\n * be enabled.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @knownIssue You cannot spy on `angular.element` if you are using Jasmine version 1.x. See\n * https://github.com/angular/angular.js/issues/14251 for more information.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1;\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar DASH_LOWERCASE_REGEXP = /-([a-z])/g;\nvar MS_HACK_REGEXP = /^-ms-/;\nvar MOUSE_EVENT_MAP = { mouseleave: 'mouseout', mouseenter: 'mouseover' };\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts kebab-case to camelCase.\n * There is also a special case for the ms prefix starting with a lowercase letter.\n * @param name Name to normalize\n */\nfunction cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}\n\nfunction fnCamelCaseReplace(all, letter) {\n return letter.toUpperCase();\n}\n\n/**\n * Converts kebab-case to camelCase.\n * @param name Name to normalize\n */\nfunction kebabToCamel(name) {\n return name\n .replace(DASH_LOWERCASE_REGEXP, fnCamelCaseReplace);\n}\n\nvar SINGLE_TAG_REGEXP = /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|&#?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:-]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi;\n\n// Table parts need to be wrapped with `<table>` or they're\n// stripped to their contents when put in a div.\n// XHTML parsers do not magically insert elements in the\n// same way that tag soup parsers do, so we cannot shorten\n// this by omitting <tbody> or other required elements.\nvar wrapMap = {\n thead: ['table'],\n col: ['colgroup', 'table'],\n tr: ['tbody', 'table'],\n td: ['tr', 'tbody', 'table']\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <10 only\n// IE 9 requires an option wrapper & it needs to have the whole table structure\n// set up in advance; assigning `\"<td></td>\"` to `tr.innerHTML` doesn't work, etc.\nvar wrapMapIE9 = {\n option: [1, '<select multiple=\"multiple\">', '</select>'],\n _default: [0, '', '']\n};\n\nfor (var key in wrapMap) {\n var wrapMapValueClosing = wrapMap[key];\n var wrapMapValue = wrapMapValueClosing.slice().reverse();\n wrapMapIE9[key] = [wrapMapValue.length, '<' + wrapMapValue.join('><') + '>', '</' + wrapMapValueClosing.join('></') + '>'];\n}\n\nwrapMapIE9.optgroup = wrapMapIE9.option;\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;\n}\n\nfunction jqLiteHasData(node) {\n for (var key in jqCache[node.ng339]) {\n return true;\n }\n return false;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap, finalHtml,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = fragment.appendChild(context.createElement('div'));\n tag = (TAG_NAME_REGEXP.exec(html) || ['', ''])[1].toLowerCase();\n finalHtml = JQLite.legacyXHTMLReplacement ?\n html.replace(XHTML_TAG_REGEXP, '<$1></$2>') :\n html;\n\n if (msie < 10) {\n wrap = wrapMapIE9[tag] || wrapMapIE9._default;\n tmp.innerHTML = wrap[1] + finalHtml + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.firstChild;\n }\n } else {\n wrap = wrapMap[tag] || [];\n\n // Create wrappers & descend into them\n i = wrap.length;\n while (--i > -1) {\n tmp.appendChild(window.document.createElement(wrap[i]));\n tmp = tmp.firstChild;\n }\n\n tmp.innerHTML = finalHtml;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = '';\n }\n\n // Remove wrapper from fragment\n fragment.textContent = '';\n fragment.innerHTML = ''; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || window.document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\nfunction jqLiteWrapNode(node, wrapper) {\n var parent = node.parentNode;\n\n if (parent) {\n parent.replaceChild(wrapper, node);\n }\n\n wrapper.appendChild(node);\n}\n\n\n// IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\nvar jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) {\n // eslint-disable-next-line no-bitwise\n return !!(this.compareDocumentPosition(arg) & 16);\n};\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) !== '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else if (isFunction(element)) {\n jqLiteReady(element);\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants) {\n if (!onlyDescendants && jqLiteAcceptsData(element)) jqLite.cleanData([element]);\n\n if (element.querySelectorAll) {\n jqLite.cleanData(element.querySelectorAll('*'));\n }\n}\n\nfunction isEmptyObject(obj) {\n var name;\n\n for (name in obj) {\n return false;\n }\n return true;\n}\n\nfunction removeIfEmptyData(element) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n var events = expandoStore && expandoStore.events;\n var data = expandoStore && expandoStore.data;\n\n if ((!data || isEmptyObject(data)) && (!events || isEmptyObject(events))) {\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n element.removeEventListener(type, handle);\n }\n delete events[type];\n }\n } else {\n\n var removeHandler = function(type) {\n var listenerFns = events[type];\n if (isDefined(fn)) {\n arrayRemove(listenerFns || [], fn);\n }\n if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {\n element.removeEventListener(type, handle);\n delete events[type];\n }\n };\n\n forEach(type.split(' '), function(type) {\n removeHandler(type);\n if (MOUSE_EVENT_MAP[type]) {\n removeHandler(MOUSE_EVENT_MAP[type]);\n }\n });\n }\n\n removeIfEmptyData(element);\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n } else {\n expandoStore.data = {};\n }\n\n removeIfEmptyData(element);\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n var prop;\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[kebabToCamel(key)] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[kebabToCamel(key)];\n } else { // mass-setter: data({key1: val1, key2: val2})\n for (prop in key) {\n data[kebabToCamel(prop)] = key[prop];\n }\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((' ' + (element.getAttribute('class') || '') + ' ').replace(/[\\n\\t]/g, ' ').\n indexOf(' ' + selector + ' ') > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, ' ');\n var newClasses = existingClasses;\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n newClasses = newClasses.replace(' ' + cssClass + ' ', ' ');\n });\n\n if (newClasses !== existingClasses) {\n element.setAttribute('class', trim(newClasses));\n }\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, ' ');\n var newClasses = existingClasses;\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (newClasses.indexOf(' ' + cssClass + ' ') === -1) {\n newClasses += cssClass + ' ';\n }\n });\n\n if (newClasses !== existingClasses) {\n element.setAttribute('class', trim(newClasses));\n }\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if (element.nodeType === NODE_TYPE_DOCUMENT) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if (isDefined(value = jqLite.data(element, names[i]))) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n\nfunction jqLiteDocumentLoaded(action, win) {\n win = win || window;\n if (win.document.readyState === 'complete') {\n // Force the action to be run async for consistent behavior\n // from the action's point of view\n // i.e. it will definitely not be in a $apply\n win.setTimeout(action);\n } else {\n // No need to unbind this handler as load is only ever called once\n jqLite(win).on('load', action);\n }\n}\n\nfunction jqLiteReady(fn) {\n function trigger() {\n window.document.removeEventListener('DOMContentLoaded', trigger);\n window.removeEventListener('load', trigger);\n fn();\n }\n\n // check if document is already loaded\n if (window.document.readyState === 'complete') {\n window.setTimeout(fn);\n } else {\n // We can not use jqLite since we are not done loading and jQuery could be loaded later.\n\n // Works for modern browsers and IE9\n window.document.addEventListener('DOMContentLoaded', trigger);\n\n // Fallback to window.onload for others\n window.addEventListener('load', trigger);\n }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: jqLiteReady,\n toString: function() {\n var value = [];\n forEach(this, function(e) { value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength': 'minlength',\n 'ngMaxlength': 'maxlength',\n 'ngMin': 'min',\n 'ngMax': 'max',\n 'ngPattern': 'pattern',\n 'ngStep': 'step'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(name) {\n return ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData,\n hasData: jqLiteHasData,\n cleanData: function jqLiteCleanData(nodes) {\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n jqLiteRemoveData(nodes[i]);\n jqLiteOff(nodes[i]);\n }\n }\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = cssKebabToCamel(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value) {\n var ret;\n var nodeType = element.nodeType;\n if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT ||\n !element.getAttribute) {\n return;\n }\n\n var lowercasedName = lowercase(name);\n var isBooleanAttr = BOOLEAN_ATTR[lowercasedName];\n\n if (isDefined(value)) {\n // setter\n\n if (value === null || (value === false && isBooleanAttr)) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, isBooleanAttr ? lowercasedName : value);\n }\n } else {\n // getter\n\n ret = element.getAttribute(name);\n\n if (isBooleanAttr && ret !== null) {\n ret = lowercasedName;\n }\n // Normalize non-existing attributes to undefined (as jQuery).\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function(option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name) {\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (isUndefined((fn.length === 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function(event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Some events have special handlers that wrap the real handler\n var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n handlerWrapper(element, event, eventFns[i]);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\nfunction defaultHandlerWrapper(element, event, handler) {\n handler.call(element, event);\n}\n\nfunction specialMouseHandlerWrapper(target, event, handler) {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n var related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if (!related || (related !== target && !jqLiteContains.call(target, related))) {\n handler.call(target, event);\n }\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n var addHandler = function(type, specialHandlerWrapper, noEventListener) {\n var eventFns = events[type];\n\n if (!eventFns) {\n eventFns = events[type] = [];\n eventFns.specialHandlerWrapper = specialHandlerWrapper;\n if (type !== '$destroy' && !noEventListener) {\n element.addEventListener(type, handle);\n }\n }\n\n eventFns.push(fn);\n };\n\n while (i--) {\n type = types[i];\n if (MOUSE_EVENT_MAP[type]) {\n addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);\n addHandler(type, undefined, true);\n } else {\n addHandler(type);\n }\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node) {\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element) {\n if (element.nodeType === NODE_TYPE_ELEMENT) {\n children.push(element);\n }\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === NODE_TYPE_ELEMENT) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child) {\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n\n if (parent) {\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className) {\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name) {\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for (var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n});\n\n// bind legacy bind/unbind to on/off\nJQLite.prototype.bind = JQLite.prototype.on;\nJQLite.prototype.unbind = JQLite.prototype.off;\n\n\n// Provider for private $$jqLite service\n/** @this */\nfunction $$jqLiteProvider() {\n this.$get = function $$jqLite() {\n return extend(JQLite, {\n hasClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteHasClass(node, classes);\n },\n addClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteAddClass(node, classes);\n },\n removeClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteRemoveClass(node, classes);\n }\n });\n };\n}\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType === 'function' || (objType === 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n// A minimal ES2015 Map implementation.\n// Should be bug/feature equivalent to the native implementations of supported browsers\n// (for the features required in Angular).\n// See https://kangax.github.io/compat-table/es6/#test-Map\nvar nanKey = Object.create(null);\nfunction NgMapShim() {\n this._keys = [];\n this._values = [];\n this._lastKey = NaN;\n this._lastIndex = -1;\n}\nNgMapShim.prototype = {\n _idx: function(key) {\n if (key !== this._lastKey) {\n this._lastKey = key;\n this._lastIndex = this._keys.indexOf(key);\n }\n return this._lastIndex;\n },\n _transformKey: function(key) {\n return isNumberNaN(key) ? nanKey : key;\n },\n get: function(key) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n if (idx !== -1) {\n return this._values[idx];\n }\n },\n has: function(key) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n return idx !== -1;\n },\n set: function(key, value) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n if (idx === -1) {\n idx = this._lastIndex = this._keys.length;\n }\n this._keys[idx] = key;\n this._values[idx] = value;\n\n // Support: IE11\n // Do not `return this` to simulate the partial IE11 implementation\n },\n delete: function(key) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n if (idx === -1) {\n return false;\n }\n this._keys.splice(idx, 1);\n this._values.splice(idx, 1);\n this._lastKey = NaN;\n this._lastIndex = -1;\n return true;\n }\n};\n\n// For now, always use `NgMapShim`, even if `window.Map` is available. Some native implementations\n// are still buggy (often in subtle ways) and can cause hard-to-debug failures. When native `Map`\n// implementations get more stable, we can reconsider switching to `window.Map` (when available).\nvar NgMap = NgMapShim;\n\nvar $$MapProvider = [/** @this */function() {\n this.$get = [function() {\n return NgMap;\n }];\n}];\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector object that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which\n * disallows argument name annotation inference.\n * @returns {injector} Injector object. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running AngularJS app\n * from outside AngularJS. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @installation\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar ARROW_ARG = /^([^(]+?)=>/;\nvar FN_ARGS = /^[^(]*\\(\\s*([^)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction stringifyFn(fn) {\n return Function.prototype.toString.call(fn);\n}\n\nfunction extractArgs(fn) {\n var fnText = stringifyFn(fn).replace(STRIP_COMMENTS, ''),\n args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);\n return args;\n}\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var args = extractArgs(fn);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n argDecl = extractArgs(fn);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * })).toBe($injector);\n * ```\n *\n * ## Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ### Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. This method of discovering\n * annotations is disallowed when the injector is in strict mode.\n * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the\n * argument names.\n *\n * ### `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ### Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc property\n * @name $injector#modules\n * @type {Object}\n * @description\n * A hash containing all the modules that have been loaded into the\n * $injector.\n *\n * You can use this property to find out information about a module via the\n * {@link angular.Module#info `myModule.info(...)`} method.\n *\n * For example:\n *\n * ```\n * var info = $injector.modules['ngAnimate'].info();\n * ```\n *\n * **Do not use this property to attempt to modify the modules after the application\n * has been bootstrapped.**\n */\n\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @param {string=} caller An optional string to provide the origin of the function call for error messages.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are\n * injected according to the {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} name Name of the service to query.\n * @returns {boolean} `true` if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * #### Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * You can disallow this method by using strict injection mode.\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * #### The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * #### The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.\n *\n * @returns {Array.<string>} The names of the services which the function requires.\n */\n/**\n * @ngdoc method\n * @name $injector#loadNewModules\n *\n * @description\n *\n * **This is a dangerous API, which you use at your own risk!**\n *\n * Add the specified modules to the current injector.\n *\n * This method will add each of the injectables to the injector and execute all of the config and run\n * blocks for each module passed to the method.\n *\n * If a module has already been loaded into the injector then it will not be loaded again.\n *\n * * The application developer is responsible for loading the code containing the modules; and for\n * ensuring that lazy scripts are not downloaded and executed more often that desired.\n * * Previously compiled HTML will not be affected by newly loaded directives, filters and components.\n * * Modules cannot be unloaded.\n *\n * You can use {@link $injector#modules `$injector.modules`} to check whether a module has been loaded\n * into the injector, which may indicate whether the script has been executed already.\n *\n * @example\n * Here is an example of loading a bundle of modules, with a utility method called `getScript`:\n *\n * ```javascript\n * app.factory('loadModule', function($injector) {\n * return function loadModule(moduleName, bundleUrl) {\n * return getScript(bundleUrl).then(function() { $injector.loadNewModules([moduleName]); });\n * };\n * })\n * ```\n *\n * @param {Array<String|Function|Array>=} mods an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a `config` block.\n * See: {@link angular.module modules}\n */\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An AngularJS **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(name, provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(name, obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(name, obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(name, fn)} - registers a service **factory function**\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(name, Fn)} - registers a **constructor function**\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n * * {@link auto.$provide#decorator decorator(name, decorFn)} - registers a **decorator function** that\n * will be able to modify or replace the implementation of another service.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * It is possible to inject other providers into the provider function,\n * but the injected provider must have been defined before the one that requires it.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.\n * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is a factory\n * function that returns an instance instantiated by the injector from the service constructor\n * function.\n *\n * Internally it looks a bit like this:\n *\n * ```\n * {\n * $get: function() {\n * return $injector.instantiate(constructor);\n * }\n * }\n * ```\n *\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)\n * that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**. That also means it is not possible to inject other services into a value service.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an AngularJS {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service** with the {@link auto.$injector $injector}, such as a string,\n * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not\n * possible to inject other services into a constant.\n *\n * But unlike {@link auto.$provide#value value}, a constant can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an AngularJS {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **decorator function** with the {@link auto.$injector $injector}. A decorator function\n * intercepts the creation of a service, allowing it to override or modify the behavior of the\n * service. The return value of the decorator function may be the original service, or a new service\n * that replaces (or wraps and delegates to) the original service.\n *\n * You can find out more about using decorators in the {@link guide/decorators} guide.\n *\n * @param {string} name The name of the service to decorate.\n * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be\n * provided and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be replaced, monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new NgMap(),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function(serviceName, caller) {\n if (angular.isString(caller)) {\n path.push(caller);\n }\n throw $injectorMinErr('unpr', 'Unknown provider: {0}', path.join(' <- '));\n })),\n instanceCache = {},\n protoInstanceInjector =\n createInternalInjector(instanceCache, function(serviceName, caller) {\n var provider = providerInjector.get(serviceName + providerSuffix, caller);\n return instanceInjector.invoke(\n provider.$get, provider, undefined, serviceName);\n }),\n instanceInjector = protoInstanceInjector;\n\n providerCache['$injector' + providerSuffix] = { $get: valueFn(protoInstanceInjector) };\n instanceInjector.modules = providerInjector.modules = createMap();\n var runBlocks = loadModules(modulesToLoad);\n instanceInjector = protoInstanceInjector.get('$injector');\n instanceInjector.strictDi = strictDi;\n forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); });\n\n instanceInjector.loadNewModules = function(mods) {\n forEach(loadModules(mods), function(fn) { if (fn) instanceInjector.invoke(fn); });\n };\n\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', 'Provider \\'{0}\\' must define $get factory method.', name);\n }\n return (providerCache[name + providerSuffix] = provider_);\n }\n\n function enforceReturnValue(name, factory) {\n return /** @this */ function enforcedReturnValue() {\n var result = instanceInjector.invoke(factory, this);\n if (isUndefined(result)) {\n throw $injectorMinErr('undef', 'Provider \\'{0}\\' must return a value from $get factory method.', name);\n }\n return result;\n };\n }\n\n function factory(name, factoryFn, enforce) {\n return provider(name, {\n $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn\n });\n }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val), false); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad) {\n assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.set(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for (i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n instanceInjector.modules[module] = moduleFn;\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) === -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n // eslint-disable-next-line no-ex-assign\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', 'Failed to instantiate module {0} due to:\\n{1}',\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName, caller) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n cache[serviceName] = factory(serviceName, caller);\n return cache[serviceName];\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n\n function injectionArgs(fn, locals, serviceName) {\n var args = [],\n $inject = createInjector.$$annotate(fn, strictDi, serviceName);\n\n for (var i = 0, length = $inject.length; i < length; i++) {\n var key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(locals && locals.hasOwnProperty(key) ? locals[key] :\n getService(key, serviceName));\n }\n return args;\n }\n\n function isClass(func) {\n // Support: IE 9-11 only\n // IE 9-11 do not support classes and IE9 leaks with the code below.\n if (msie || typeof func !== 'function') {\n return false;\n }\n var result = func.$$ngIsClass;\n if (!isBoolean(result)) {\n result = func.$$ngIsClass = /^class\\b/.test(stringifyFn(func));\n }\n return result;\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = injectionArgs(fn, locals, serviceName);\n if (isArray(fn)) {\n fn = fn[fn.length - 1];\n }\n\n if (!isClass(fn)) {\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n } else {\n args.unshift(null);\n return new (Function.prototype.bind.apply(fn, args))();\n }\n }\n\n\n function instantiate(Type, locals, serviceName) {\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n var ctor = (isArray(Type) ? Type[Type.length - 1] : Type);\n var args = injectionArgs(Type, locals, serviceName);\n // Empty object at position 0 is ignored for invocation with `new`, but required.\n args.unshift(null);\n return new (Function.prototype.bind.apply(ctor, args))();\n }\n\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: createInjector.$$annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc provider\n * @name $anchorScrollProvider\n * @this\n *\n * @description\n * Use `$anchorScrollProvider` to disable automatic scrolling whenever\n * {@link ng.$location#hash $location.hash()} changes.\n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n /**\n * @ngdoc method\n * @name $anchorScrollProvider#disableAutoScrolling\n *\n * @description\n * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to\n * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />\n * Use this method to disable automatic scrolling.\n *\n * If automatic scrolling is disabled, one must explicitly call\n * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the\n * current hash.\n */\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n /**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the\n * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified\n * in the\n * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#an-indicated-part-of-the-document).\n *\n * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to\n * match any anchor whenever it changes. This can be disabled by calling\n * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.\n *\n * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a\n * vertical scroll-offset (either fixed or dynamic).\n *\n * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of\n * {@link ng.$location#hash $location.hash()} will be used.\n *\n * @property {(number|function|jqLite)} yOffset\n * If set, specifies a vertical scroll-offset. This is often useful when there are fixed\n * positioned elements at the top of the page, such as navbars, headers etc.\n *\n * `yOffset` can be specified in various ways:\n * - **number**: A fixed number of pixels to be used as offset.<br /><br />\n * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return\n * a number representing the offset (in pixels).<br /><br />\n * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from\n * the top of the page to the element's bottom will be used as offset.<br />\n * **Note**: The element will be taken into account only as long as its `position` is set to\n * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust\n * their height and/or positioning according to the viewport's size.\n *\n * <br />\n * <div class=\"alert alert-warning\">\n * In order for `yOffset` to work properly, scrolling should take place on the document's root and\n * not some child element.\n * </div>\n *\n * @example\n <example module=\"anchorScrollExample\" name=\"anchor-scroll\">\n <file name=\"index.html\">\n <div id=\"scrollArea\" ng-controller=\"ScrollController\">\n <a ng-click=\"gotoBottom()\">Go to bottom</a>\n <a id=\"bottom\"></a> You're at the bottom!\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n </file>\n <file name=\"style.css\">\n #scrollArea {\n height: 280px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n </file>\n </example>\n *\n * <hr />\n * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).\n * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.\n *\n * @example\n <example module=\"anchorScrollOffsetExample\" name=\"anchor-scroll-offset\">\n <file name=\"index.html\">\n <div class=\"fixed-header\" ng-controller=\"headerCtrl\">\n <a href=\"\" ng-click=\"gotoAnchor(x)\" ng-repeat=\"x in [1,2,3,4,5]\">\n Go to anchor {{x}}\n </a>\n </div>\n <div id=\"anchor{{x}}\" class=\"anchor\" ng-repeat=\"x in [1,2,3,4,5]\">\n Anchor {{x}} of 5\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('anchorScrollOffsetExample', [])\n .run(['$anchorScroll', function($anchorScroll) {\n $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels\n }])\n .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',\n function($anchorScroll, $location, $scope) {\n $scope.gotoAnchor = function(x) {\n var newHash = 'anchor' + x;\n if ($location.hash() !== newHash) {\n // set the $location.hash to `newHash` and\n // $anchorScroll will automatically scroll to it\n $location.hash('anchor' + x);\n } else {\n // call $anchorScroll() explicitly,\n // since $location.hash hasn't changed\n $anchorScroll();\n }\n };\n }\n ]);\n </file>\n <file name=\"style.css\">\n body {\n padding-top: 50px;\n }\n\n .anchor {\n border: 2px dashed DarkOrchid;\n padding: 10px 10px 200px 10px;\n }\n\n .fixed-header {\n background-color: rgba(0, 0, 0, 0.2);\n height: 50px;\n position: fixed;\n top: 0; left: 0; right: 0;\n }\n\n .fixed-header > a {\n display: inline-block;\n margin: 5px 15px;\n }\n </file>\n </example>\n */\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // Helper function to get first anchor from a NodeList\n // (using `Array#some()` instead of `angular#forEach()` since it's more performant\n // and working in all supported browsers.)\n function getFirstAnchor(list) {\n var result = null;\n Array.prototype.some.call(list, function(element) {\n if (nodeName_(element) === 'a') {\n result = element;\n return true;\n }\n });\n return result;\n }\n\n function getYOffset() {\n\n var offset = scroll.yOffset;\n\n if (isFunction(offset)) {\n offset = offset();\n } else if (isElement(offset)) {\n var elem = offset[0];\n var style = $window.getComputedStyle(elem);\n if (style.position !== 'fixed') {\n offset = 0;\n } else {\n offset = elem.getBoundingClientRect().bottom;\n }\n } else if (!isNumber(offset)) {\n offset = 0;\n }\n\n return offset;\n }\n\n function scrollTo(elem) {\n if (elem) {\n elem.scrollIntoView();\n\n var offset = getYOffset();\n\n if (offset) {\n // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.\n // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the\n // top of the viewport.\n //\n // IF the number of pixels from the top of `elem` to the end of the page's content is less\n // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some\n // way down the page.\n //\n // This is often the case for elements near the bottom of the page.\n //\n // In such cases we do not need to scroll the whole `offset` up, just the difference between\n // the top of the element and the offset, which is enough to align the top of `elem` at the\n // desired position.\n var elemTop = elem.getBoundingClientRect().top;\n $window.scrollBy(0, elemTop - offset);\n }\n } else {\n $window.scrollTo(0, 0);\n }\n }\n\n function scroll(hash) {\n // Allow numeric hashes\n hash = isString(hash) ? hash : isNumber(hash) ? hash.toString() : $location.hash();\n var elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) scrollTo(null);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) scrollTo(elm);\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);\n\n // no element and hash === 'top', scroll to the top of the page\n else if (hash === 'top') scrollTo(null);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction(newVal, oldVal) {\n // skip the initial scroll if $location.hash is empty\n if (newVal === oldVal && newVal === '') return;\n\n jqLiteDocumentLoaded(function() {\n $rootScope.$evalAsync(scroll);\n });\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\nvar ELEMENT_NODE = 1;\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\n\nfunction mergeClasses(a,b) {\n if (!a && !b) return '';\n if (!a) return b;\n if (!b) return a;\n if (isArray(a)) a = a.join(' ');\n if (isArray(b)) b = b.join(' ');\n return a + ' ' + b;\n}\n\nfunction extractElementNode(element) {\n for (var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType === ELEMENT_NODE) {\n return elm;\n }\n }\n}\n\nfunction splitClasses(classes) {\n if (isString(classes)) {\n classes = classes.split(' ');\n }\n\n // Use createMap() to prevent class assumptions involving property names in\n // Object.prototype\n var obj = createMap();\n forEach(classes, function(klass) {\n // sometimes the split leaves empty string values\n // incase extra spaces were applied to the options\n if (klass.length) {\n obj[klass] = true;\n }\n });\n return obj;\n}\n\n// if any other type of options value besides an Object value is\n// passed into the $animate.method() animation then this helper code\n// will be run which will ignore it. While this patch is not the\n// greatest solution to this, a lot of existing plugins depend on\n// $animate to either call the callback (< 1.2) or return a promise\n// that can be changed. This helper function ensures that the options\n// are wiped clean incase a callback function is provided.\nfunction prepareAnimateOptions(options) {\n return isObject(options)\n ? options\n : {};\n}\n\nvar $$CoreAnimateJsProvider = /** @this */ function() {\n this.$get = noop;\n};\n\n// this is prefixed with Core since it conflicts with\n// the animateQueueProvider defined in ngAnimate/animateQueue.js\nvar $$CoreAnimateQueueProvider = /** @this */ function() {\n var postDigestQueue = new NgMap();\n var postDigestElements = [];\n\n this.$get = ['$$AnimateRunner', '$rootScope',\n function($$AnimateRunner, $rootScope) {\n return {\n enabled: noop,\n on: noop,\n off: noop,\n pin: noop,\n\n push: function(element, event, options, domOperation) {\n if (domOperation) {\n domOperation();\n }\n\n options = options || {};\n if (options.from) {\n element.css(options.from);\n }\n if (options.to) {\n element.css(options.to);\n }\n\n if (options.addClass || options.removeClass) {\n addRemoveClassesPostDigest(element, options.addClass, options.removeClass);\n }\n\n var runner = new $$AnimateRunner();\n\n // since there are no animations to run the runner needs to be\n // notified that the animation call is complete.\n runner.complete();\n return runner;\n }\n };\n\n\n function updateData(data, classes, value) {\n var changed = false;\n if (classes) {\n classes = isString(classes) ? classes.split(' ') :\n isArray(classes) ? classes : [];\n forEach(classes, function(className) {\n if (className) {\n changed = true;\n data[className] = value;\n }\n });\n }\n return changed;\n }\n\n function handleCSSClassChanges() {\n forEach(postDigestElements, function(element) {\n var data = postDigestQueue.get(element);\n if (data) {\n var existing = splitClasses(element.attr('class'));\n var toAdd = '';\n var toRemove = '';\n forEach(data, function(status, className) {\n var hasClass = !!existing[className];\n if (status !== hasClass) {\n if (status) {\n toAdd += (toAdd.length ? ' ' : '') + className;\n } else {\n toRemove += (toRemove.length ? ' ' : '') + className;\n }\n }\n });\n\n forEach(element, function(elm) {\n if (toAdd) {\n jqLiteAddClass(elm, toAdd);\n }\n if (toRemove) {\n jqLiteRemoveClass(elm, toRemove);\n }\n });\n postDigestQueue.delete(element);\n }\n });\n postDigestElements.length = 0;\n }\n\n\n function addRemoveClassesPostDigest(element, add, remove) {\n var data = postDigestQueue.get(element) || {};\n\n var classesAdded = updateData(data, add, true);\n var classesRemoved = updateData(data, remove, false);\n\n if (classesAdded || classesRemoved) {\n\n postDigestQueue.set(element, data);\n postDigestElements.push(element);\n\n if (postDigestElements.length === 1) {\n $rootScope.$$postDigest(handleCSSClassChanges);\n }\n }\n }\n }];\n};\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM updates and resolves the returned runner promise.\n *\n * In order to enable animations the `ngAnimate` module has to be loaded.\n *\n * To see the functional implementation check out `src/ngAnimate/animate.js`.\n */\nvar $AnimateProvider = ['$provide', /** @this */ function($provide) {\n var provider = this;\n var classNameFilter = null;\n var customFilter = null;\n\n this.$$registeredAnimations = Object.create(null);\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(element, ... , doneFunction, options)`\n * The element to animate, the `doneFunction` and the options fed into the animation. Depending\n * on the type of animation additional arguments will be injected into the animation function. The\n * list below explains the function signatures for the different animation methods:\n *\n * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)\n * - addClass: function(element, addedClasses, doneFunction, options)\n * - removeClass: function(element, removedClasses, doneFunction, options)\n * - enter, leave, move: function(element, doneFunction, options)\n * - animate: function(element, fromStyles, toStyles, doneFunction, options)\n *\n * Make sure to trigger the `doneFunction` once the animation is fully complete.\n *\n * ```js\n * return {\n * //enter, leave, move signature\n * eventFn : function(element, done, options) {\n * //code to run the animation\n * //once complete, then run done()\n * return function endFunction(wasCancelled) {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n if (name && name.charAt(0) !== '.') {\n throw $animateMinErr('notcsel', 'Expecting class selector starting with \\'.\\' got \\'{0}\\'.', name);\n }\n\n var key = name + '-animation';\n provider.$$registeredAnimations[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#customFilter\n *\n * @description\n * Sets and/or returns the custom filter function that is used to \"filter\" animations, i.e.\n * determine if an animation is allowed or not. When no filter is specified (the default), no\n * animation will be blocked. Setting the `customFilter` value will only allow animations for\n * which the filter function's return value is truthy.\n *\n * This allows to easily create arbitrarily complex rules for filtering animations, such as\n * allowing specific events only, or enabling animations on specific subtrees of the DOM, etc.\n * Filtering animations can also boost performance for low-powered devices, as well as\n * applications containing a lot of structural operations.\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:**\n * Keep the filtering function as lean as possible, because it will be called for each DOM\n * action (e.g. insertion, removal, class change) performed by \"animation-aware\" directives.\n * See {@link guide/animations#which-directives-support-animations- here} for a list of built-in\n * directives that support animations.\n * Performing computationally expensive or time-consuming operations on each call of the\n * filtering function can make your animations sluggish.\n * </div>\n *\n * **Note:** If present, `customFilter` will be checked before\n * {@link $animateProvider#classNameFilter classNameFilter}.\n *\n * @param {Function=} filterFn - The filter function which will be used to filter all animations.\n * If a falsy value is returned, no animation will be performed. The function will be called\n * with the following arguments:\n * - **node** `{DOMElement}` - The DOM element to be animated.\n * - **event** `{String}` - The name of the animation event (e.g. `enter`, `leave`, `addClass`\n * etc).\n * - **options** `{Object}` - A collection of options/styles used for the animation.\n * @return {Function} The current filter function or `null` if there is none set.\n */\n this.customFilter = function(filterFn) {\n if (arguments.length === 1) {\n customFilter = isFunction(filterFn) ? filterFn : null;\n }\n\n return customFilter;\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element that is triggered.\n * When setting the `classNameFilter` value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n *\n * **Note:** If present, `classNameFilter` will be checked after\n * {@link $animateProvider#customFilter customFilter}. If `customFilter` is present and returns\n * false, `classNameFilter` will not be checked.\n *\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if (arguments.length === 1) {\n classNameFilter = (expression instanceof RegExp) ? expression : null;\n if (classNameFilter) {\n var reservedRegex = new RegExp('[(\\\\s|\\\\/)]' + NG_ANIMATE_CLASSNAME + '[(\\\\s|\\\\/)]');\n if (reservedRegex.test(classNameFilter.toString())) {\n classNameFilter = null;\n throw $animateMinErr('nongcls', '$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class.', NG_ANIMATE_CLASSNAME);\n }\n }\n }\n return classNameFilter;\n };\n\n this.$get = ['$$animateQueue', function($$animateQueue) {\n function domInsert(element, parentElement, afterElement) {\n // if for some reason the previous element was removed\n // from the dom sometime before this code runs then let's\n // just stick to using the parent element as the anchor\n if (afterElement) {\n var afterNode = extractElementNode(afterElement);\n if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {\n afterElement = null;\n }\n }\n if (afterElement) {\n afterElement.after(element);\n } else {\n parentElement.prepend(element);\n }\n }\n\n /**\n * @ngdoc service\n * @name $animate\n * @description The $animate service exposes a series of DOM utility methods that provide support\n * for animation hooks. The default behavior is the application of DOM operations, however,\n * when an animation is detected (and animations are enabled), $animate will do the heavy lifting\n * to ensure that animation runs with the triggered DOM operation.\n *\n * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't\n * included and only when it is active then the animation hooks that `$animate` triggers will be\n * functional. Once active then all structural `ng-` directives will trigger animations as they perform\n * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,\n * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.\n *\n * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.\n *\n * To learn more about enabling animation support, click here to visit the\n * {@link ngAnimate ngAnimate module page}.\n */\n return {\n // we don't call it directly since non-existant arguments may\n // be interpreted as null within the sub enabled function\n\n /**\n *\n * @ngdoc method\n * @name $animate#on\n * @kind function\n * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)\n * has fired on the given element or among any of its children. Once the listener is fired, the provided callback\n * is fired with the following params:\n *\n * ```js\n * $animate.on('enter', container,\n * function callback(element, phase) {\n * // cool we detected an enter animation within the container\n * }\n * );\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Generally, the events that are fired correspond 1:1 to `$animate` method names,\n * e.g. {@link ng.$animate#addClass addClass()} will fire `addClass`, and {@link ng.ngClass}\n * will fire `addClass` if classes are added, and `removeClass` if classes are removed.\n * However, there are two exceptions:\n *\n * <ul>\n * <li>if both an {@link ng.$animate#addClass addClass()} and a\n * {@link ng.$animate#removeClass removeClass()} action are performed during the same\n * animation, the event fired will be `setClass`. This is true even for `ngClass`.</li>\n * <li>an {@link ng.$animate#animate animate()} call that adds and removes classes will fire\n * the `setClass` event, but if it either removes or adds classes,\n * it will fire `animate` instead.</li>\n * </ul>\n *\n * </div>\n *\n * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)\n * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself\n * as well as among its children\n * @param {Function} callback the callback function that will be fired when the listener is triggered.\n *\n * The arguments present in the callback function are:\n * * `element` - The captured DOM element that the animation was fired on.\n * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).\n * * `data` - an object with these properties:\n * * addClass - `{string|null}` - space-separated CSS classes to add to the element\n * * removeClass - `{string|null}` - space-separated CSS classes to remove from the element\n * * from - `{Object|null}` - CSS properties & values at the beginning of the animation\n * * to - `{Object|null}` - CSS properties & values at the end of the animation\n *\n * Note that the callback does not trigger a scope digest. Wrap your call into a\n * {@link $rootScope.Scope#$apply scope.$apply} to propagate changes to the scope.\n */\n on: $$animateQueue.on,\n\n /**\n *\n * @ngdoc method\n * @name $animate#off\n * @kind function\n * @description Deregisters an event listener based on the event which has been associated with the provided element. This method\n * can be used in three different ways depending on the arguments:\n *\n * ```js\n * // remove all the animation event listeners listening for `enter`\n * $animate.off('enter');\n *\n * // remove listeners for all animation events from the container element\n * $animate.off(container);\n *\n * // remove all the animation event listeners listening for `enter` on the given element and its children\n * $animate.off('enter', container);\n *\n * // remove the event listener function provided by `callback` that is set\n * // to listen for `enter` on the given `container` as well as its children\n * $animate.off('enter', container, callback);\n * ```\n *\n * @param {string|DOMElement} event|container the animation event (e.g. enter, leave, move,\n * addClass, removeClass, etc...), or the container element. If it is the element, all other\n * arguments are ignored.\n * @param {DOMElement=} container the container element the event listener was placed on\n * @param {Function=} callback the callback function that was registered as the listener\n */\n off: $$animateQueue.off,\n\n /**\n * @ngdoc method\n * @name $animate#pin\n * @kind function\n * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists\n * outside of the DOM structure of the AngularJS application. By doing so, any animation triggered via `$animate` can be issued on the\n * element despite being outside the realm of the application or within another application. Say for example if the application\n * was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated\n * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind\n * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.\n *\n * Note that this feature is only active when the `ngAnimate` module is used.\n *\n * @param {DOMElement} element the external element that will be pinned\n * @param {DOMElement} parentElement the host parent element that will be associated with the external element\n */\n pin: $$animateQueue.pin,\n\n /**\n *\n * @ngdoc method\n * @name $animate#enabled\n * @kind function\n * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This\n * function can be called in four ways:\n *\n * ```js\n * // returns true or false\n * $animate.enabled();\n *\n * // changes the enabled state for all animations\n * $animate.enabled(false);\n * $animate.enabled(true);\n *\n * // returns true or false if animations are enabled for an element\n * $animate.enabled(element);\n *\n * // changes the enabled state for an element and its children\n * $animate.enabled(element, true);\n * $animate.enabled(element, false);\n * ```\n *\n * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state\n * @param {boolean=} enabled whether or not the animations will be enabled for the element\n *\n * @return {boolean} whether or not animations are enabled\n */\n enabled: $$animateQueue.enabled,\n\n /**\n * @ngdoc method\n * @name $animate#cancel\n * @kind function\n * @description Cancels the provided animation and applies the end state of the animation.\n * Note that this does not cancel the underlying operation, e.g. the setting of classes or\n * adding the element to the DOM.\n *\n * @param {animationRunner} animationRunner An animation runner returned by an $animate function.\n *\n * @example\n <example module=\"animationExample\" deps=\"angular-animate.js\" animations=\"true\" name=\"animate-cancel\">\n <file name=\"app.js\">\n angular.module('animationExample', ['ngAnimate']).component('cancelExample', {\n templateUrl: 'template.html',\n controller: function($element, $animate) {\n this.runner = null;\n\n this.addClass = function() {\n this.runner = $animate.addClass($element.find('div'), 'red');\n var ctrl = this;\n this.runner.finally(function() {\n ctrl.runner = null;\n });\n };\n\n this.removeClass = function() {\n this.runner = $animate.removeClass($element.find('div'), 'red');\n var ctrl = this;\n this.runner.finally(function() {\n ctrl.runner = null;\n });\n };\n\n this.cancel = function() {\n $animate.cancel(this.runner);\n };\n }\n });\n </file>\n <file name=\"template.html\">\n <p>\n <button id=\"add\" ng-click=\"$ctrl.addClass()\">Add</button>\n <button ng-click=\"$ctrl.removeClass()\">Remove</button>\n <br>\n <button id=\"cancel\" ng-click=\"$ctrl.cancel()\" ng-disabled=\"!$ctrl.runner\">Cancel</button>\n <br>\n <div id=\"target\">CSS-Animated Text</div>\n </p>\n </file>\n <file name=\"index.html\">\n <cancel-example></cancel-example>\n </file>\n <file name=\"style.css\">\n .red-add, .red-remove {\n transition: all 4s cubic-bezier(0.250, 0.460, 0.450, 0.940);\n }\n\n .red,\n .red-add.red-add-active {\n color: #FF0000;\n font-size: 40px;\n }\n\n .red-remove.red-remove-active {\n font-size: 10px;\n color: black;\n }\n\n </file>\n </example>\n */\n cancel: function(runner) {\n if (runner.cancel) {\n runner.cancel();\n }\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element (if provided) or\n * as the first child within the `parent` element and then triggers an animation.\n * A promise is returned that will be resolved during the next digest once the animation\n * has completed.\n *\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (so long as the after element is not present)\n * @param {DOMElement=} after the sibling element after which the element will be appended\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n enter: function(element, parent, after, options) {\n parent = parent && jqLite(parent);\n after = after && jqLite(after);\n parent = parent || after.parent();\n domInsert(element, parent, after);\n return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Inserts (moves) the element into its new position in the DOM either after\n * the `after` element (if provided) or as the first child within the `parent` element\n * and then triggers an animation. A promise is returned that will be resolved\n * during the next digest once the animation has completed.\n *\n * @param {DOMElement} element the element which will be moved into the new DOM position\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (so long as the after element is not present)\n * @param {DOMElement=} after the sibling element after which the element will be appended\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n move: function(element, parent, after, options) {\n parent = parent && jqLite(parent);\n after = after && jqLite(after);\n parent = parent || after.parent();\n domInsert(element, parent, after);\n return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));\n },\n\n /**\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Triggers an animation and then removes the element from the DOM.\n * When the function is called a promise is returned that will be resolved during the next\n * digest once the animation has completed.\n *\n * @param {DOMElement} element the element which will be removed from the DOM\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n leave: function(element, options) {\n return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {\n element.remove();\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n *\n * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon\n * execution, the addClass operation will only be handled after the next digest and it will not trigger an\n * animation if element already contains the CSS class or if the class is removed at a later step.\n * Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} animationRunner the animation runner\n */\n addClass: function(element, className, options) {\n options = prepareAnimateOptions(options);\n options.addClass = mergeClasses(options.addclass, className);\n return $$animateQueue.push(element, 'addClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n *\n * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon\n * execution, the removeClass operation will only be handled after the next digest and it will not trigger an\n * animation if element does not contain the CSS class or if the class is added at a later step.\n * Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n removeClass: function(element, className, options) {\n options = prepareAnimateOptions(options);\n options.removeClass = mergeClasses(options.removeClass, className);\n return $$animateQueue.push(element, 'removeClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n *\n * @description Performs both the addition and removal of a CSS classes on an element and (during the process)\n * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and\n * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has\n * passed. Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)\n * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n setClass: function(element, add, remove, options) {\n options = prepareAnimateOptions(options);\n options.addClass = mergeClasses(options.addClass, add);\n options.removeClass = mergeClasses(options.removeClass, remove);\n return $$animateQueue.push(element, 'setClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#animate\n * @kind function\n *\n * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.\n * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take\n * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and\n * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding\n * style in `to`, the style in `from` is applied immediately, and no animation is run.\n * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate`\n * method (or as part of the `options` parameter):\n *\n * ```js\n * ngModule.animation('.my-inline-animation', function() {\n * return {\n * animate : function(element, from, to, done, options) {\n * //animation\n * done();\n * }\n * }\n * });\n * ```\n *\n * @param {DOMElement} element the element which the CSS styles will be applied to\n * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.\n * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.\n * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If\n * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.\n * (Note that if no animation is detected then this value will not be applied to the element.)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n animate: function(element, from, to, className, options) {\n options = prepareAnimateOptions(options);\n options.from = options.from ? extend(options.from, from) : from;\n options.to = options.to ? extend(options.to, to) : to;\n\n className = className || 'ng-inline-animate';\n options.tempClasses = mergeClasses(options.tempClasses, className);\n return $$animateQueue.push(element, 'animate', options);\n }\n };\n }];\n}];\n\nvar $$AnimateAsyncRunFactoryProvider = /** @this */ function() {\n this.$get = ['$$rAF', function($$rAF) {\n var waitQueue = [];\n\n function waitForTick(fn) {\n waitQueue.push(fn);\n if (waitQueue.length > 1) return;\n $$rAF(function() {\n for (var i = 0; i < waitQueue.length; i++) {\n waitQueue[i]();\n }\n waitQueue = [];\n });\n }\n\n return function() {\n var passed = false;\n waitForTick(function() {\n passed = true;\n });\n return function(callback) {\n if (passed) {\n callback();\n } else {\n waitForTick(callback);\n }\n };\n };\n }];\n};\n\nvar $$AnimateRunnerFactoryProvider = /** @this */ function() {\n this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$$isDocumentHidden', '$timeout',\n function($q, $sniffer, $$animateAsyncRun, $$isDocumentHidden, $timeout) {\n\n var INITIAL_STATE = 0;\n var DONE_PENDING_STATE = 1;\n var DONE_COMPLETE_STATE = 2;\n\n AnimateRunner.chain = function(chain, callback) {\n var index = 0;\n\n next();\n function next() {\n if (index === chain.length) {\n callback(true);\n return;\n }\n\n chain[index](function(response) {\n if (response === false) {\n callback(false);\n return;\n }\n index++;\n next();\n });\n }\n };\n\n AnimateRunner.all = function(runners, callback) {\n var count = 0;\n var status = true;\n forEach(runners, function(runner) {\n runner.done(onProgress);\n });\n\n function onProgress(response) {\n status = status && response;\n if (++count === runners.length) {\n callback(status);\n }\n }\n };\n\n function AnimateRunner(host) {\n this.setHost(host);\n\n var rafTick = $$animateAsyncRun();\n var timeoutTick = function(fn) {\n $timeout(fn, 0, false);\n };\n\n this._doneCallbacks = [];\n this._tick = function(fn) {\n if ($$isDocumentHidden()) {\n timeoutTick(fn);\n } else {\n rafTick(fn);\n }\n };\n this._state = 0;\n }\n\n AnimateRunner.prototype = {\n setHost: function(host) {\n this.host = host || {};\n },\n\n done: function(fn) {\n if (this._state === DONE_COMPLETE_STATE) {\n fn();\n } else {\n this._doneCallbacks.push(fn);\n }\n },\n\n progress: noop,\n\n getPromise: function() {\n if (!this.promise) {\n var self = this;\n this.promise = $q(function(resolve, reject) {\n self.done(function(status) {\n if (status === false) {\n reject();\n } else {\n resolve();\n }\n });\n });\n }\n return this.promise;\n },\n\n then: function(resolveHandler, rejectHandler) {\n return this.getPromise().then(resolveHandler, rejectHandler);\n },\n\n 'catch': function(handler) {\n return this.getPromise()['catch'](handler);\n },\n\n 'finally': function(handler) {\n return this.getPromise()['finally'](handler);\n },\n\n pause: function() {\n if (this.host.pause) {\n this.host.pause();\n }\n },\n\n resume: function() {\n if (this.host.resume) {\n this.host.resume();\n }\n },\n\n end: function() {\n if (this.host.end) {\n this.host.end();\n }\n this._resolve(true);\n },\n\n cancel: function() {\n if (this.host.cancel) {\n this.host.cancel();\n }\n this._resolve(false);\n },\n\n complete: function(response) {\n var self = this;\n if (self._state === INITIAL_STATE) {\n self._state = DONE_PENDING_STATE;\n self._tick(function() {\n self._resolve(response);\n });\n }\n },\n\n _resolve: function(response) {\n if (this._state !== DONE_COMPLETE_STATE) {\n forEach(this._doneCallbacks, function(fn) {\n fn(response);\n });\n this._doneCallbacks.length = 0;\n this._state = DONE_COMPLETE_STATE;\n }\n }\n };\n\n return AnimateRunner;\n }];\n};\n\n/* exported $CoreAnimateCssProvider */\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n * @this\n *\n * @description\n * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,\n * then the `$animateCss` service will actually perform animations.\n *\n * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.\n */\nvar $CoreAnimateCssProvider = function() {\n this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {\n\n return function(element, initialOptions) {\n // all of the animation functions should create\n // a copy of the options data, however, if a\n // parent service has already created a copy then\n // we should stick to using that\n var options = initialOptions || {};\n if (!options.$$prepared) {\n options = copy(options);\n }\n\n // there is no point in applying the styles since\n // there is no animation that goes on at all in\n // this version of $animateCss.\n if (options.cleanupStyles) {\n options.from = options.to = null;\n }\n\n if (options.from) {\n element.css(options.from);\n options.from = null;\n }\n\n var closed, runner = new $$AnimateRunner();\n return {\n start: run,\n end: run\n };\n\n function run() {\n $$rAF(function() {\n applyAnimationContents();\n if (!closed) {\n runner.complete();\n }\n closed = true;\n });\n return runner;\n }\n\n function applyAnimationContents() {\n if (options.addClass) {\n element.addClass(options.addClass);\n options.addClass = null;\n }\n if (options.removeClass) {\n element.removeClass(options.removeClass);\n options.removeClass = null;\n }\n if (options.to) {\n element.css(options.to);\n options.to = null;\n }\n }\n };\n }];\n};\n\n/* global getHash: true, stripHash: false */\n\nfunction getHash(url) {\n var index = url.indexOf('#');\n return index === -1 ? '' : url.substr(index);\n}\n\nfunction trimEmptyHash(url) {\n return url.replace(/#$/, '');\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {object} $log window.console or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer, $$taskTrackerFactory) {\n var self = this,\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {},\n taskTracker = $$taskTrackerFactory($log);\n\n self.isMock = false;\n\n //////////////////////////////////////////////////////////////\n // Task-tracking API\n //////////////////////////////////////////////////////////////\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = taskTracker.completeTask;\n self.$$incOutstandingRequestCount = taskTracker.incTaskCount;\n\n // TODO(vojta): prefix this method with $$ ?\n self.notifyWhenNoOutstandingRequests = taskTracker.notifyWhenNoPendingTasks;\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var cachedState, lastHistoryState,\n lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n pendingLocation = null,\n getCurrentState = !$sniffer.history ? noop : function getCurrentState() {\n try {\n return history.state;\n } catch (e) {\n // MSIE can reportedly throw when there is no state (UNCONFIRMED).\n }\n };\n\n cacheState();\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of `location.href` (with a\n * trailing `#` stripped of if the hash is empty).\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, `pushState`/`replaceState` is used, otherwise\n * `location.href`/`location.replace` is used.\n * Returns its own instance to allow chaining.\n *\n * NOTE: this api is intended for use only by the `$location` service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record?\n * @param {object=} state State object to use with `pushState`/`replaceState`\n */\n self.url = function(url, replace, state) {\n // In modern browsers `history.state` is `null` by default; treating it separately\n // from `undefined` would cause `$browser.url('/foo')` to change `history.state`\n // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.\n if (isUndefined(state)) {\n state = null;\n }\n\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n var sameState = lastHistoryState === state;\n\n // Normalize the inputted URL\n url = urlResolve(url).href;\n\n // Don't change anything if previous and current URLs and states match. This also prevents\n // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.\n // See https://github.com/angular/angular.js/commit/ffb2701\n if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {\n return self;\n }\n var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);\n lastBrowserUrl = url;\n lastHistoryState = state;\n // Don't use history API if only the hash changed\n // due to a bug in IE10/IE11 which leads\n // to not firing a `hashchange` nor `popstate` event\n // in some cases (see #9143).\n if ($sniffer.history && (!sameBase || !sameState)) {\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\n cacheState();\n } else {\n if (!sameBase) {\n pendingLocation = url;\n }\n if (replace) {\n location.replace(url);\n } else if (!sameBase) {\n location.href = url;\n } else {\n location.hash = getHash(url);\n }\n if (location.href !== url) {\n pendingLocation = url;\n }\n }\n if (pendingLocation) {\n pendingLocation = url;\n }\n return self;\n // getter\n } else {\n // - pendingLocation is needed as browsers don't allow to read out\n // the new location.href if a reload happened or if there is a bug like in iOS 9 (see\n // https://openradar.appspot.com/22186109).\n return trimEmptyHash(pendingLocation || location.href);\n }\n };\n\n /**\n * @name $browser#state\n *\n * @description\n * This method is a getter.\n *\n * Return history.state or null if history.state is undefined.\n *\n * @returns {object} state\n */\n self.state = function() {\n return cachedState;\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function cacheStateAndFireUrlChange() {\n pendingLocation = null;\n fireStateOrUrlChange();\n }\n\n // This variable should be used *only* inside the cacheState function.\n var lastCachedState = null;\n function cacheState() {\n // This should be the only place in $browser where `history.state` is read.\n cachedState = getCurrentState();\n cachedState = isUndefined(cachedState) ? null : cachedState;\n\n // Prevent callbacks fo fire twice if both hashchange & popstate were fired.\n if (equals(cachedState, lastCachedState)) {\n cachedState = lastCachedState;\n }\n\n lastCachedState = cachedState;\n lastHistoryState = cachedState;\n }\n\n function fireStateOrUrlChange() {\n var prevLastHistoryState = lastHistoryState;\n cacheState();\n\n if (lastBrowserUrl === self.url() && prevLastHistoryState === cachedState) {\n return;\n }\n\n lastBrowserUrl = self.url();\n lastHistoryState = cachedState;\n forEach(urlChangeListeners, function(listener) {\n listener(self.url(), cachedState);\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of AngularJS:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in AngularJS apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers don't\n // fire popstate when user changes the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);\n // hashchange event\n jqLite(window).on('hashchange', cacheStateAndFireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * @private\n * Remove popstate and hashchange handler from window.\n *\n * NOTE: this api is intended for use only by $rootScope.\n */\n self.$$applicationDestroyed = function() {\n jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);\n };\n\n /**\n * Checks whether the url has changed outside of AngularJS.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireStateOrUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current <base href>\n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?:)?\\/\\/[^/]*/, '') : '';\n };\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] Number of milliseconds to defer the function execution.\n * @param {string=} [taskType=DEFAULT_TASK_TYPE] The type of task that is deferred.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay, taskType) {\n var timeoutId;\n\n delay = delay || 0;\n taskType = taskType || taskTracker.DEFAULT_TASK_TYPE;\n\n taskTracker.incTaskCount(taskType);\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n taskTracker.completeTask(fn, taskType);\n }, delay);\n pendingDeferIds[timeoutId] = taskType;\n\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds.hasOwnProperty(deferId)) {\n var taskType = pendingDeferIds[deferId];\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n taskTracker.completeTask(noop, taskType);\n return true;\n }\n return false;\n };\n\n}\n\n/** @this */\nfunction $BrowserProvider() {\n this.$get = ['$window', '$log', '$sniffer', '$document', '$$taskTrackerFactory',\n function($window, $log, $sniffer, $document, $$taskTrackerFactory) {\n return new Browser($window, $document, $log, $sniffer, $$taskTrackerFactory);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n * @this\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n <example module=\"cacheExampleApp\" name=\"cache-factory\">\n <file name=\"index.html\">\n <div ng-controller=\"CacheController\">\n <input ng-model=\"newCacheKey\" placeholder=\"Key\">\n <input ng-model=\"newCacheValue\" placeholder=\"Value\">\n <button ng-click=\"put(newCacheKey, newCacheValue)\">Cache</button>\n\n <p ng-if=\"keys.length\">Cached Values</p>\n <div ng-repeat=\"key in keys\">\n <span ng-bind=\"key\"></span>\n <span>: </span>\n <b ng-bind=\"cache.get(key)\"></b>\n </div>\n\n <p>Cache Info</p>\n <div ng-repeat=\"(key, value) in cache.info()\">\n <span ng-bind=\"key\"></span>\n <span>: </span>\n <b ng-bind=\"value\"></b>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if (angular.isUndefined($scope.cache.get(key))) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, angular.isUndefined(value) ? null : value);\n };\n }]);\n </file>\n <file name=\"style.css\">\n p {\n margin: 10px 0 3px;\n }\n </file>\n </example>\n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', 'CacheId \\'{0}\\' is already taken!', cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = createMap(),\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = createMap(),\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $templateRequest $templateRequest} and the {@link ng.directive:script script}\n * directive to cache templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return (caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (isUndefined(value)) return;\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry === freshEnd) freshEnd = lruEntry.p;\n if (lruEntry === staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n if (!(key in data)) return;\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = createMap();\n size = 0;\n lruHash = createMap();\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n * <ul>\n * <li>**id**: the id of the cache instance</li>\n * <li>**size**: the number of entries kept in the cache instance</li>\n * <li>**...**: any additional properties from the options object when creating the\n * cache.</li>\n * </ul>\n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n });\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry !== freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd === entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry !== prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n * @this\n *\n * @description\n * `$templateCache` is a {@link $cacheFactory.Cache Cache object} created by the\n * {@link ng.$cacheFactory $cacheFactory}.\n *\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, by using {@link $templateRequest},\n * or by consuming the `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * <script type=\"text/ng-template\" id=\"templateId.html\">\n * <p>This is the content of the template</p>\n * </script>\n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (e.g.\n * element with {@link ngApp} attribute), otherwise the template will be ignored.\n *\n * Adding via the `$templateCache` service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your component:\n * ```js\n * myApp.component('myComponent', {\n * templateUrl: 'templateId.html'\n * });\n * ```\n *\n * or get it via the `$templateCache` service:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables like document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * </div>\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)}\n * that defines the directive properties, or just the `postLink` function (all other properties will have\n * the default values).\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * </div>\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * {@link $compile#-priority- priority}: 0,\n * {@link $compile#-template- template}: '<div></div>', // or // function(tElement, tAttrs) { ... },\n * // or\n * // {@link $compile#-templateurl- templateUrl}: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * {@link $compile#-transclude- transclude}: false,\n * {@link $compile#-restrict- restrict}: 'A',\n * {@link $compile#-templatenamespace- templateNamespace}: 'html',\n * {@link $compile#-scope- scope}: false,\n * {@link $compile#-controller- controller}: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * {@link $compile#-controlleras- controllerAs}: 'stringIdentifier',\n * {@link $compile#-bindtocontroller- bindToController}: false,\n * {@link $compile#-require- require}: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * {@link $compile#-multielement- multiElement}: false,\n * {@link $compile#-compile- compile}: function compile(tElement, tAttrs, transclude) {\n * return {\n * {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... },\n * {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // {@link $compile#-link- link}: {\n * // {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // {@link $compile#-link- link}: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * </div>\n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n * ### Life-cycle hooks\n * Directive controllers can provide the following methods that are called by AngularJS at points in the life-cycle of the\n * directive:\n * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and\n * had their bindings initialized (and before the pre & post linking functions for the directives on\n * this element). This is a good place to put initialization code for your controller.\n * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The\n * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an\n * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a\n * component such as cloning the bound value to prevent accidental mutation of the outer value. Note that this will\n * also be called when your bindings are initialized.\n * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on\n * changes. Any actions that you wish to take in response to the changes that you detect must be\n * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook\n * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not\n * be detected by AngularJS's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;\n * if detecting changes, you must store the previous value(s) for comparison to the current values.\n * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing\n * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in\n * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent\n * components will have their `$onDestroy()` hook called before child components.\n * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link\n * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.\n * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since\n * they are waiting for their template to load asynchronously and their own compilation and linking has been\n * suspended until that occurs.\n *\n * #### Comparison with life-cycle hooks in the new Angular\n * The new Angular also uses life-cycle hooks for its components. While the AngularJS life-cycle hooks are similar there are\n * some differences that you should be aware of, especially when it comes to moving your code from AngularJS to Angular:\n *\n * * AngularJS hooks are prefixed with `$`, such as `$onInit`. Angular hooks are prefixed with `ng`, such as `ngOnInit`.\n * * AngularJS hooks can be defined on the controller prototype or added to the controller inside its constructor.\n * In Angular you can only define hooks on the prototype of the Component class.\n * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in AngularJS than you would to\n * `ngDoCheck` in Angular.\n * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be\n * propagated throughout the application.\n * Angular does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an\n * error or do nothing depending upon the state of `enableProdMode()`.\n *\n * #### Life-cycle hook examples\n *\n * This example shows how you can check for mutations to a Date object even though the identity of the object\n * has not changed.\n *\n * <example name=\"doCheckDateExample\" module=\"do-check-module\">\n * <file name=\"app.js\">\n * angular.module('do-check-module', [])\n * .component('app', {\n * template:\n * 'Month: <input ng-model=\"$ctrl.month\" ng-change=\"$ctrl.updateDate()\">' +\n * 'Date: {{ $ctrl.date }}' +\n * '<test date=\"$ctrl.date\"></test>',\n * controller: function() {\n * this.date = new Date();\n * this.month = this.date.getMonth();\n * this.updateDate = function() {\n * this.date.setMonth(this.month);\n * };\n * }\n * })\n * .component('test', {\n * bindings: { date: '<' },\n * template:\n * '<pre>{{ $ctrl.log | json }}</pre>',\n * controller: function() {\n * var previousValue;\n * this.log = [];\n * this.$doCheck = function() {\n * var currentValue = this.date && this.date.valueOf();\n * if (previousValue !== currentValue) {\n * this.log.push('doCheck: date mutated: ' + this.date);\n * previousValue = currentValue;\n * }\n * };\n * }\n * });\n * </file>\n * <file name=\"index.html\">\n * <app></app>\n * </file>\n * </example>\n *\n * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the\n * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large\n * arrays or objects can have a negative impact on your application performance.)\n *\n * <example name=\"doCheckArrayExample\" module=\"do-check-module\">\n * <file name=\"index.html\">\n * <div ng-init=\"items = []\">\n * <button ng-click=\"items.push(items.length)\">Add Item</button>\n * <button ng-click=\"items = []\">Reset Items</button>\n * <pre>{{ items }}</pre>\n * <test items=\"items\"></test>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('do-check-module', [])\n * .component('test', {\n * bindings: { items: '<' },\n * template:\n * '<pre>{{ $ctrl.log | json }}</pre>',\n * controller: function() {\n * this.log = [];\n *\n * this.$doCheck = function() {\n * if (this.items_ref !== this.items) {\n * this.log.push('doCheck: items changed');\n * this.items_ref = this.items;\n * }\n * if (!angular.equals(this.items_clone, this.items)) {\n * this.log.push('doCheck: items mutated');\n * this.items_clone = angular.copy(this.items);\n * }\n * };\n * }\n * });\n * </file>\n * </example>\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true (default is `false`), the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recommended that this feature be used on directives\n * which are not strictly behavioral (such as {@link ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined). Note that expressions\n * and other directives used in the directive's template will also be excluded from execution.\n *\n * #### `scope`\n * The scope property can be `false`, `true`, or an object:\n *\n * * **`false` (default):** No scope will be created for the directive. The directive will use its\n * parent's scope.\n *\n * * **`true`:** A new child scope that prototypically inherits from its parent will be created for\n * the directive's element. If multiple directives on the same element request a new scope,\n * only one new scope is created.\n *\n * * **`{...}` (an object hash):** A new \"isolate\" scope is created for the directive's template.\n * The 'isolate' scope differs from normal scope in that it does not prototypically\n * inherit from its parent scope. This is useful when creating reusable components, which should not\n * accidentally read or modify data in the parent scope. Note that an isolate scope\n * directive without a `template` or `templateUrl` will not apply the isolate scope\n * to its children elements.\n *\n * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the\n * directive's element. These local properties are useful for aliasing values for templates. The keys in\n * the object hash map to the name of the property on the isolate scope; the values define how the property\n * is bound to the parent scope, via matching attributes on the directive's element:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name. Given `<my-component\n * my-attr=\"hello {{name}}\">` and the isolate scope definition `scope: { localName:'@myAttr' }`,\n * the directive's scope property `localName` will reflect the interpolated value of `hello\n * {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's\n * scope. The `name` is read from the parent scope (not the directive's scope).\n *\n * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression\n * passed via the attribute `attr`. The expression is evaluated in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the local\n * name. Given `<my-component my-attr=\"parentModel\">` and the isolate scope definition `scope: {\n * localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the\n * value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in\n * `localModel` and vice versa. If the binding expression is non-assignable, or if the attribute\n * isn't optional and doesn't exist, an exception\n * ({@link error/$compile/nonassign `$compile:nonassign`}) will be thrown upon discovering changes\n * to the local value, since it will be impossible to sync them back to the parent scope.\n *\n * By default, the {@link ng.$rootScope.Scope#$watch `$watch`}\n * method is used for tracking changes, and the equality check is based on object identity.\n * However, if an object literal or an array literal is passed as the binding expression, the\n * equality check is done by value (using the {@link angular.equals} function). It's also possible\n * to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection\n * `$watchCollection`}: use `=*` or `=*attr`\n *\n * * `<` or `<attr` - set up a one-way (one-directional) binding between a local scope property and an\n * expression passed via the attribute `attr`. The expression is evaluated in the context of the\n * parent scope. If no `attr` name is specified then the attribute name is assumed to be the same as the\n * local name.\n *\n * For example, given `<my-component my-attr=\"parentModel\">` and directive definition of\n * `scope: { localModel:'<myAttr' }`, then the isolated scope property `localModel` will reflect the\n * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n * in `localModel`, but changes in `localModel` will not reflect in `parentModel`. There are however\n * two caveats:\n * 1. one-way binding does not copy the value from the parent to the isolate scope, it simply\n * sets the same value. That means if your bound value is an object, changes to its properties\n * in the isolated scope will be reflected in the parent scope (because both reference the same object).\n * 2. one-way binding watches changes to the **identity** of the parent value. That means the\n * {@link ng.$rootScope.Scope#$watch `$watch`} on the parent value only fires if the reference\n * to the value has changed. In most cases, this should not be of concern, but can be important\n * to know if you one-way bind to an object, and then replace that object in the isolated scope.\n * If you now change a property of the object in your parent scope, the change will not be\n * propagated to the isolated scope, because the identity of the object on the parent scope\n * has not changed. Instead you must assign a new object.\n *\n * One-way binding is useful if you do not plan to propagate changes to your isolated scope bindings\n * back to the parent. However, it does not make this completely impossible.\n *\n * By default, the {@link ng.$rootScope.Scope#$watch `$watch`}\n * method is used for tracking changes, and the equality check is based on object identity.\n * It's also possible to watch the evaluated value shallowly with\n * {@link ng.$rootScope.Scope#$watchCollection `$watchCollection`}: use `<*` or `<*attr`\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope. If\n * no `attr` name is specified then the attribute name is assumed to be the same as the local name.\n * Given `<my-component my-attr=\"count = count + value\">` and the isolate scope definition `scope: {\n * localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for\n * the `count = count + value` expression. Often it's desirable to pass data from the isolated scope\n * via an expression to the parent scope. This can be done by passing a map of local variable names\n * and values into the expression wrapper fn. For example, if the expression is `increment(amount)`\n * then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`.\n *\n * All 4 kinds of bindings (`@`, `=`, `<`, and `&`) can be made optional by adding `?` to the expression.\n * The marker must come after the mode and before the attribute name.\n * See the {@link error/$compile/iscp Invalid Isolate Scope Definition error} for definition examples.\n * This is useful to refine the interface directives provide.\n * One subtle difference between optional and non-optional happens **when the binding attribute is not\n * set**:\n * - the binding is optional: the property will not be defined\n * - the binding is not optional: the property is defined\n *\n * ```js\n *app.directive('testDir', function() {\n return {\n scope: {\n notoptional: '=',\n optional: '=?',\n },\n bindToController: true,\n controller: function() {\n this.$onInit = function() {\n console.log(this.hasOwnProperty('notoptional')) // true\n console.log(this.hasOwnProperty('optional')) // false\n }\n }\n }\n })\n *```\n *\n *\n * ##### Combining directives with different scope defintions\n *\n * In general it's possible to apply more than one directive to one element, but there might be limitations\n * depending on the type of scope required by the directives. The following points will help explain these limitations.\n * For simplicity only two directives are taken into account, but it is also applicable for several directives:\n *\n * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope\n * * **child scope** + **no scope** => Both directives will share one single child scope\n * * **child scope** + **child scope** => Both directives will share one single child scope\n * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use\n * its parent's scope\n * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot\n * be applied to the same element.\n * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives\n * cannot be applied to the same element.\n *\n *\n * #### `bindToController`\n * This property is used to bind scope properties directly to the controller. It can be either\n * `true` or an object hash with the same format as the `scope` property.\n *\n * When an isolate scope is used for a directive (see above), `bindToController: true` will\n * allow a component to have its properties bound to the controller, rather than to scope.\n *\n * After the controller is instantiated, the initial values of the isolate scope bindings will be bound to the controller\n * properties. You can access these bindings once they have been initialized by providing a controller method called\n * `$onInit`, which is called after all the controllers on an element have been constructed and had their bindings\n * initialized.\n *\n * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property.\n * This will set up the scope bindings to the controller directly. Note that `scope` can still be used\n * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate\n * scope (useful for component directives).\n *\n * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`.\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and can be accessed by other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement, slotName)`:\n * * `scope`: (optional) override the scope.\n * * `cloneLinkingFn`: (optional) argument to create clones of the original transcluded content.\n * * `futureParentElement` (optional):\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkingFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like `<svg>`).\n * * See also the `directive.templateNamespace` property.\n * * `slotName`: (optional) the name of the slot to transclude. If falsy (e.g. `null`, `undefined` or `''`)\n * then the default transclusion is provided.\n * The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns\n * `true` if the specified slot contains content (i.e. one or more DOM nodes).\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` property can be a string, an array or an object:\n * * a **string** containing the name of the directive to pass to the linking function\n * * an **array** containing the names of directives to pass to the linking function. The argument passed to the\n * linking function will be an array of controllers in the same order as the names in the `require` property\n * * an **object** whose property values are the names of the directives to pass to the linking function. The argument\n * passed to the linking function will also be an object with matching keys, whose values will hold the corresponding\n * controllers.\n *\n * If the `require` property is an object and `bindToController` is truthy, then the required controllers are\n * bound to the controller using the keys of the `require` property. This binding occurs after all the controllers\n * have been constructed but before `$onInit` is called.\n * If the name of the required controller is the same as the local name (the key), the name can be\n * omitted. For example, `{parentDir: '^^'}` is equivalent to `{parentDir: '^^parentDir'}`.\n * See the {@link $compileProvider#component} helper for an example of how this can be used.\n * If no such required directive(s) can be found, or if the directive does not have a controller, then an error is\n * raised (unless no link function is specified and the required controllers are not being bound to the directive\n * controller, in which case error checking is skipped). The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Identifier name for a reference to the controller in the directive's scope.\n * This allows the controller to be referenced from the directive template. This is especially\n * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible\n * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the\n * `controllerAs` reference might overwrite a property that already exists on the parent scope.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): `<my-directive></my-directive>`\n * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n * * `M` - Comment: `<!-- directive: my-directive exp -->`\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `<svg>` or `<math>`.\n * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).\n * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}.\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace`\n * <div class=\"alert alert-danger\">\n * **Note:** `replace` is deprecated in AngularJS and has been removed in the new Angular (v2+).\n * </div>\n *\n * Specifies what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * Extract the contents of the element where the directive appears and make it available to the directive.\n * The contents are compiled and provided to the directive as a **transclusion function**. See the\n * {@link $compile#transclusion Transclusion} section below.\n *\n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * <div class=\"alert alert-warning\">\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * </div>\n\n * <div class=\"alert alert-warning\">\n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and\n * stack overflow errors.\n *\n * This can be avoided by manually using `$compile` in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * </div>\n *\n * <div class=\"alert alert-danger\">\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n * </div>\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - the directive's required controller instance(s) - Instances are shared\n * among all directives, which allows the directives to use the controllers as a communication\n * channel. The exact value depends on the directive's `require` property:\n * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one\n * * `string`: the controller instance\n * * `array`: array of controller instances\n *\n * If a required controller cannot be found, and it is optional, the instance is `null`,\n * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.\n *\n * Note that you can also require the directive's own controller - it will be made available like\n * any other controller.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude` parameter of directive controllers,\n * see {@link ng.$compile#-controller- the controller section for details}.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n *\n * ### Transclusion\n *\n * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and\n * copying them to another part of the DOM, while maintaining their connection to the original AngularJS\n * scope from where they were taken.\n *\n * Transclusion is used (often with {@link ngTransclude}) to insert the\n * original contents of a directive's element into a specified place in the template of the directive.\n * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded\n * content has access to the properties on the scope from which it was taken, even if the directive\n * has isolated scope.\n * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.\n *\n * This makes it possible for the widget to have private state for its template, while the transcluded\n * content has access to its originating scope.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * </div>\n *\n * There are three kinds of transclusion depending upon whether you want to transclude just the contents of the\n * directive's element, the entire element or multiple parts of the element contents:\n *\n * * `true` - transclude the content (i.e. the child nodes) of the directive's element.\n * * `'element'` - transclude the whole of the directive's element including any directives on this\n * element that are defined at a lower priority than this directive. When used, the `template`\n * property is ignored.\n * * **`{...}` (an object hash):** - map elements of the content onto transclusion \"slots\" in the template.\n *\n * **Multi-slot transclusion** is declared by providing an object for the `transclude` property.\n *\n * This object is a map where the keys are the name of the slot to fill and the value is an element selector\n * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)\n * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).\n *\n * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}.\n *\n * If the element selector is prefixed with a `?` then that slot is optional.\n *\n * For example, the transclude object `{ slotA: '?myCustomElement' }` maps `<my-custom-element>` elements to\n * the `slotA` slot, which can be accessed via the `$transclude` function or via the {@link ngTransclude} directive.\n *\n * Slots that are not marked as optional (`?`) will trigger a compile time error if there are no matching elements\n * in the transclude content. If you wish to know if an optional slot was filled with content, then you can call\n * `$transclude.isSlotFilled(slotName)` on the transclude function passed to the directive's link function and\n * injectable into the directive's controller.\n *\n *\n * #### Transclusion Functions\n *\n * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion\n * function** to the directive's `link` function and `controller`. This transclusion function is a special\n * **linking function** that will return the compiled contents linked to a new transclusion scope.\n *\n * <div class=\"alert alert-info\">\n * If you are just using {@link ngTransclude} then you don't need to worry about this function, since\n * ngTransclude will deal with it for us.\n * </div>\n *\n * If you want to manually control the insertion and removal of the transcluded content in your directive\n * then you must use this transclude function. When you call a transclude function it returns a jqLite/JQuery\n * object that contains the compiled DOM, which is linked to the correct transclusion scope.\n *\n * When you call a transclusion function you can pass in a **clone attach function**. This function accepts\n * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded\n * content and the `scope` is the newly created transclusion scope, which the clone will be linked to.\n *\n * <div class=\"alert alert-info\">\n * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a transclude function\n * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.\n * </div>\n *\n * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone\n * attach function**:\n *\n * ```js\n * var transcludedContent, transclusionScope;\n *\n * $transclude(function(clone, scope) {\n * element.append(clone);\n * transcludedContent = clone;\n * transclusionScope = scope;\n * });\n * ```\n *\n * Later, if you want to remove the transcluded content from your DOM then you should also destroy the\n * associated transclusion scope:\n *\n * ```js\n * transcludedContent.remove();\n * transclusionScope.$destroy();\n * ```\n *\n * <div class=\"alert alert-info\">\n * **Best Practice**: if you intend to add and remove transcluded content manually in your directive\n * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),\n * then you are also responsible for calling `$destroy` on the transclusion scope.\n * </div>\n *\n * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}\n * automatically destroy their transcluded clones as necessary so you do not need to worry about this if\n * you are simply using {@link ngTransclude} to inject the transclusion into your directive.\n *\n *\n * #### Transclusion Scopes\n *\n * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion\n * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed\n * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it\n * was taken.\n *\n * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look\n * like this:\n *\n * ```html\n * <div ng-app>\n * <div isolate>\n * <div transclusion>\n * </div>\n * </div>\n * </div>\n * ```\n *\n * The `$parent` scope hierarchy will look like this:\n *\n ```\n - $rootScope\n - isolate\n - transclusion\n ```\n *\n * but the scopes will inherit prototypically from different scopes to their `$parent`.\n *\n ```\n - $rootScope\n - transclusion\n - isolate\n ```\n *\n *\n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * * *Accessing normalized attribute names:* Directives like `ngBind` can be expressed in many ways:\n * `ng:bind`, `data-ng-bind`, or `x-ng-bind`. The attributes object allows for normalized access\n * to the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * ## Example\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * </div>\n *\n <example module=\"compileExample\" name=\"compile\">\n <file name=\"index.html\">\n <script>\n angular.module('compileExample', [], function($compileProvider) {\n // Configure new 'compile' directive by passing a directive\n // factory function. The factory function injects '$compile'.\n $compileProvider.directive('compile', function($compile) {\n // The directive factory creates a link function.\n return function(scope, element, attrs) {\n scope.$watch(\n function(scope) {\n // Watch the 'compile' expression for changes.\n return scope.$eval(attrs.compile);\n },\n function(value) {\n // When the 'compile' expression changes\n // assign it into the current DOM.\n element.html(value);\n\n // Compile the new DOM and link it to the current scope.\n // NOTE: we only compile '.childNodes' so that we\n // don't get into an infinite loop compiling ourselves.\n $compile(element.contents())(scope);\n }\n );\n };\n });\n })\n .controller('GreeterController', ['$scope', function($scope) {\n $scope.name = 'AngularJS';\n $scope.html = 'Hello {{name}}';\n }]);\n </script>\n <div ng-controller=\"GreeterController\">\n <input ng-model=\"name\"> <br/>\n <textarea ng-model=\"html\"></textarea> <br/>\n <div compile=\"html\"></div>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello AngularJS'.\n expect(output.getText()).toBe('Hello AngularJS');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('AngularJS!');\n });\n </file>\n </example>\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.\n *\n * <div class=\"alert alert-danger\">\n * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it\n * e.g. will not use the right outer scope. Please pass the transclude function as a\n * `parentBoundTranscludeFn` to the link function instead.\n * </div>\n *\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as: <br/> `cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * * `options` - An optional object hash with linking options. If `options` is provided, then the following\n * keys may be used to control linking behavior:\n *\n * * `parentBoundTranscludeFn` - the transclude function made available to\n * directives; if given, it will be passed through to the link functions of\n * directives found in `element` during compilation.\n * * `transcludeControllers` - an object hash with keys that map controller names\n * to a hash with the key `instance`, which maps to the controller instance;\n * if given, it will make the controllers available to directives on the compileNode:\n * ```\n * {\n * parent: {\n * instance: parentControllerInstance\n * }\n * }\n * ```\n * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add\n * the cloned elements; only needed for transcludes that are allowed to contain non HTML\n * elements (e.g. SVG elements). See also the `directive.controller` property.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to `$digest`, which typically is done by\n * AngularJS automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = angular.element('<p>{{total}}</p>');\n * $compile(element)(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone either via the `cloneAttachFn` or the value returned by the\n * linking function:\n * ```js\n * var templateElement = angular.element('<p>{{total}}</p>');\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * // Attach the clone to DOM document at the right place.\n * });\n *\n * // Now we have reference to the cloned DOM via `clonedElement`.\n * // NOTE: The `clonedElement` returned by the linking function is the same as the\n * // `clonedElement` passed to `cloneAttachFn`.\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler AngularJS HTML Compiler} section of the Developer Guide.\n *\n * @knownIssue\n *\n * ### Double Compilation\n *\n Double compilation occurs when an already compiled part of the DOM gets\n compiled again. This is an undesired effect and can lead to misbehaving directives, performance issues,\n and memory leaks. Refer to the Compiler Guide {@link guide/compiler#double-compilation-and-how-to-avoid-it\n section on double compilation} for an in-depth explanation and ways to avoid it.\n\n * @knownIssue\n\n ### Issues with `replace: true`\n *\n * <div class=\"alert alert-danger\">\n * **Note**: {@link $compile#-replace- `replace: true`} is deprecated and not recommended to use,\n * mainly due to the issues listed here. It has been completely removed in the new Angular.\n * </div>\n *\n * #### Attribute values are not merged\n *\n * When a `replace` directive encounters the same attribute on the original and the replace node,\n * it will simply deduplicate the attribute and join the values with a space or with a `;` in case of\n * the `style` attribute.\n * ```html\n * Original Node: <span class=\"original\" style=\"color: red;\"></span>\n * Replace Template: <span class=\"replaced\" style=\"background: blue;\"></span>\n * Result: <span class=\"original replaced\" style=\"color: red; background: blue;\"></span>\n * ```\n *\n * That means attributes that contain AngularJS expressions will not be merged correctly, e.g.\n * {@link ngShow} or {@link ngClass} will cause a {@link $parse} error:\n *\n * ```html\n * Original Node: <span ng-class=\"{'something': something}\" ng-show=\"!condition\"></span>\n * Replace Template: <span ng-class=\"{'else': else}\" ng-show=\"otherCondition\"></span>\n * Result: <span ng-class=\"{'something': something} {'else': else}\" ng-show=\"!condition otherCondition\"></span>\n * ```\n *\n * See issue [#5695](https://github.com/angular/angular.js/issues/5695).\n *\n * #### Directives are not deduplicated before compilation\n *\n * When the original node and the replace template declare the same directive(s), they will be\n * {@link guide/compiler#double-compilation-and-how-to-avoid-it compiled twice} because the compiler\n * does not deduplicate them. In many cases, this is not noticeable, but e.g. {@link ngModel} will\n * attach `$formatters` and `$parsers` twice.\n *\n * See issue [#2573](https://github.com/angular/angular.js/issues/2573).\n *\n * #### `transclude: element` in the replace template root can have unexpected effects\n *\n * When the replace template has a directive at the root node that uses\n * {@link $compile#-transclude- `transclude: element`}, e.g.\n * {@link ngIf} or {@link ngRepeat}, the DOM structure or scope inheritance can be incorrect.\n * See the following issues:\n *\n * - Incorrect scope on replaced element:\n * [#9837](https://github.com/angular/angular.js/issues/9837)\n * - Different DOM between `template` and `templateUrl`:\n * [#10612](https://github.com/angular/angular.js/issues/14326)\n *\n */\n\n/**\n * @ngdoc directive\n * @name ngProp\n * @restrict A\n * @element ANY\n *\n * @usage\n *\n * ```html\n * <ANY ng-prop-propname=\"expression\">\n * </ANY>\n * ```\n *\n * or with uppercase letters in property (e.g. \"propName\"):\n *\n *\n * ```html\n * <ANY ng-prop-prop_name=\"expression\">\n * </ANY>\n * ```\n *\n *\n * @description\n * The `ngProp` directive binds an expression to a DOM element property.\n * `ngProp` allows writing to arbitrary properties by including\n * the property name in the attribute, e.g. `ng-prop-value=\"'my value'\"` binds 'my value' to\n * the `value` property.\n *\n * Usually, it's not necessary to write to properties in AngularJS, as the built-in directives\n * handle the most common use cases (instead of the above example, you would use {@link ngValue}).\n *\n * However, [custom elements](https://developer.mozilla.org/docs/Web/Web_Components/Using_custom_elements)\n * often use custom properties to hold data, and `ngProp` can be used to provide input to these\n * custom elements.\n *\n * ## Binding to camelCase properties\n *\n * Since HTML attributes are case-insensitive, camelCase properties like `innerHTML` must be escaped.\n * AngularJS uses the underscore (_) in front of a character to indicate that it is uppercase, so\n * `innerHTML` must be written as `ng-prop-inner_h_t_m_l=\"expression\"` (Note that this is just an\n * example, and for binding HTML {@link ngBindHtml} should be used.\n *\n * ## Security\n *\n * Binding expressions to arbitrary properties poses a security risk, as properties like `innerHTML`\n * can insert potentially dangerous HTML into the application, e.g. script tags that execute\n * malicious code.\n * For this reason, `ngProp` applies Strict Contextual Escaping with the {@link ng.$sce $sce service}.\n * This means vulnerable properties require their content to be \"trusted\", based on the\n * context of the property. For example, the `innerHTML` is in the `HTML` context, and the\n * `iframe.src` property is in the `RESOURCE_URL` context, which requires that values written to\n * this property are trusted as a `RESOURCE_URL`.\n *\n * This can be set explicitly by calling $sce.trustAs(type, value) on the value that is\n * trusted before passing it to the `ng-prop-*` directive. There are exist shorthand methods for\n * each context type in the form of {@link ng.$sce#trustAsResourceUrl $sce.trustAsResourceUrl()} et al.\n *\n * In some cases you can also rely upon automatic sanitization of untrusted values - see below.\n *\n * Based on the context, other options may exist to mark a value as trusted / configure the behavior\n * of {@link ng.$sce}. For example, to restrict the `RESOURCE_URL` context to specific origins, use\n * the {@link $sceDelegateProvider#trustedResourceUrlList trustedResourceUrlList()}\n * and {@link $sceDelegateProvider#bannedResourceUrlList bannedResourceUrlList()}.\n *\n * {@link ng.$sce#what-trusted-context-types-are-supported- Find out more about the different context types}.\n *\n * ### HTML Sanitization\n *\n * By default, `$sce` will throw an error if it detects untrusted HTML content, and will not bind the\n * content.\n * However, if you include the {@link ngSanitize ngSanitize module}, it will try to sanitize the\n * potentially dangerous HTML, e.g. strip non-trusted tags and attributes when binding to\n * `innerHTML`.\n *\n * @example\n * ### Binding to different contexts\n *\n * <example name=\"ngProp\" module=\"exampleNgProp\">\n * <file name=\"app.js\">\n * angular.module('exampleNgProp', [])\n * .component('main', {\n * templateUrl: 'main.html',\n * controller: function($sce) {\n * this.safeContent = '<strong>Safe content</strong>';\n * this.unsafeContent = '<button onclick=\"alert(\\'Hello XSS!\\')\">Click for XSS</button>';\n * this.trustedUnsafeContent = $sce.trustAsHtml(this.unsafeContent);\n * }\n * });\n * </file>\n * <file name=\"main.html\">\n * <div>\n * <div class=\"prop-unit\">\n * Binding to a property without security context:\n * <div class=\"prop-binding\" ng-prop-inner_text=\"$ctrl.safeContent\"></div>\n * <span class=\"prop-note\">innerText</span> (safeContent)\n * </div>\n *\n * <div class=\"prop-unit\">\n * \"Safe\" content that requires a security context will throw because the contents could potentially be dangerous ...\n * <div class=\"prop-binding\" ng-prop-inner_h_t_m_l=\"$ctrl.safeContent\"></div>\n * <span class=\"prop-note\">innerHTML</span> (safeContent)\n * </div>\n *\n * <div class=\"prop-unit\">\n * ... so that actually dangerous content cannot be executed:\n * <div class=\"prop-binding\" ng-prop-inner_h_t_m_l=\"$ctrl.unsafeContent\"></div>\n * <span class=\"prop-note\">innerHTML</span> (unsafeContent)\n * </div>\n *\n * <div class=\"prop-unit\">\n * ... but unsafe Content that has been trusted explicitly works - only do this if you are 100% sure!\n * <div class=\"prop-binding\" ng-prop-inner_h_t_m_l=\"$ctrl.trustedUnsafeContent\"></div>\n * <span class=\"prop-note\">innerHTML</span> (trustedUnsafeContent)\n * </div>\n * </div>\n * </file>\n * <file name=\"index.html\">\n * <main></main>\n * </file>\n * <file name=\"styles.css\">\n * .prop-unit {\n * margin-bottom: 10px;\n * }\n *\n * .prop-binding {\n * min-height: 30px;\n * border: 1px solid blue;\n * }\n *\n * .prop-note {\n * font-family: Monospace;\n * }\n * </file>\n * </example>\n *\n *\n * @example\n * ### Binding to innerHTML with ngSanitize\n *\n * <example name=\"ngProp\" module=\"exampleNgProp\" deps=\"angular-sanitize.js\">\n * <file name=\"app.js\">\n * angular.module('exampleNgProp', ['ngSanitize'])\n * .component('main', {\n * templateUrl: 'main.html',\n * controller: function($sce) {\n * this.safeContent = '<strong>Safe content</strong>';\n * this.unsafeContent = '<button onclick=\"alert(\\'Hello XSS!\\')\">Click for XSS</button>';\n * this.trustedUnsafeContent = $sce.trustAsHtml(this.unsafeContent);\n * }\n * });\n * </file>\n * <file name=\"main.html\">\n * <div>\n * <div class=\"prop-unit\">\n * \"Safe\" content will be sanitized ...\n * <div class=\"prop-binding\" ng-prop-inner_h_t_m_l=\"$ctrl.safeContent\"></div>\n * <span class=\"prop-note\">innerHTML</span> (safeContent)\n * </div>\n *\n * <div class=\"prop-unit\">\n * ... as will dangerous content:\n * <div class=\"prop-binding\" ng-prop-inner_h_t_m_l=\"$ctrl.unsafeContent\"></div>\n * <span class=\"prop-note\">innerHTML</span> (unsafeContent)\n * </div>\n *\n * <div class=\"prop-unit\">\n * ... and content that has been trusted explicitly works the same as without ngSanitize:\n * <div class=\"prop-binding\" ng-prop-inner_h_t_m_l=\"$ctrl.trustedUnsafeContent\"></div>\n * <span class=\"prop-note\">innerHTML</span> (trustedUnsafeContent)\n * </div>\n * </div>\n * </file>\n * <file name=\"index.html\">\n * <main></main>\n * </file>\n * <file name=\"styles.css\">\n * .prop-unit {\n * margin-bottom: 10px;\n * }\n *\n * .prop-binding {\n * min-height: 30px;\n * border: 1px solid blue;\n * }\n *\n * .prop-note {\n * font-family: Monospace;\n * }\n * </file>\n * </example>\n *\n */\n\n/** @ngdoc directive\n * @name ngOn\n * @restrict A\n * @element ANY\n *\n * @usage\n *\n * ```html\n * <ANY ng-on-eventname=\"expression\">\n * </ANY>\n * ```\n *\n * or with uppercase letters in property (e.g. \"eventName\"):\n *\n *\n * ```html\n * <ANY ng-on-event_name=\"expression\">\n * </ANY>\n * ```\n *\n * @description\n * The `ngOn` directive adds an event listener to a DOM element via\n * {@link angular.element angular.element().on()}, and evaluates an expression when the event is\n * fired.\n * `ngOn` allows adding listeners for arbitrary events by including\n * the event name in the attribute, e.g. `ng-on-drop=\"onDrop()\"` executes the 'onDrop()' expression\n * when the `drop` event is fired.\n *\n * AngularJS provides specific directives for many events, such as {@link ngClick}, so in most\n * cases it is not necessary to use `ngOn`. However, AngularJS does not support all events\n * (e.g. the `drop` event in the example above), and new events might be introduced in later DOM\n * standards.\n *\n * Another use-case for `ngOn` is listening to\n * [custom events](https://developer.mozilla.org/docs/Web/Guide/Events/Creating_and_triggering_events)\n * fired by\n * [custom elements](https://developer.mozilla.org/docs/Web/Web_Components/Using_custom_elements).\n *\n * ## Binding to camelCase properties\n *\n * Since HTML attributes are case-insensitive, camelCase properties like `myEvent` must be escaped.\n * AngularJS uses the underscore (_) in front of a character to indicate that it is uppercase, so\n * `myEvent` must be written as `ng-on-my_event=\"expression\"`.\n *\n * @example\n * ### Bind to built-in DOM events\n *\n * <example name=\"ngOn\" module=\"exampleNgOn\">\n * <file name=\"app.js\">\n * angular.module('exampleNgOn', [])\n * .component('main', {\n * templateUrl: 'main.html',\n * controller: function() {\n * this.clickCount = 0;\n * this.mouseoverCount = 0;\n *\n * this.loadingState = 0;\n * }\n * });\n * </file>\n * <file name=\"main.html\">\n * <div>\n * This is equivalent to `ngClick` and `ngMouseover`:<br>\n * <button\n * ng-on-click=\"$ctrl.clickCount = $ctrl.clickCount + 1\"\n * ng-on-mouseover=\"$ctrl.mouseoverCount = $ctrl.mouseoverCount + 1\">Click or mouseover</button><br>\n * clickCount: {{$ctrl.clickCount}}<br>\n * mouseover: {{$ctrl.mouseoverCount}}\n *\n * <hr>\n *\n * For the `error` and `load` event on images no built-in AngularJS directives exist:<br>\n * <img src=\"thisimagedoesnotexist.png\" ng-on-error=\"$ctrl.loadingState = -1\" ng-on-load=\"$ctrl.loadingState = 1\"><br>\n * <div ng-switch=\"$ctrl.loadingState\">\n * <span ng-switch-when=\"0\">Image is loading</span>\n * <span ng-switch-when=\"-1\">Image load error</span>\n * <span ng-switch-when=\"1\">Image loaded successfully</span>\n * </div>\n * </div>\n * </file>\n * <file name=\"index.html\">\n * <main></main>\n * </file>\n * </example>\n *\n *\n * @example\n * ### Bind to custom DOM events\n *\n * <example name=\"ngOnCustom\" module=\"exampleNgOn\">\n * <file name=\"app.js\">\n * angular.module('exampleNgOn', [])\n * .component('main', {\n * templateUrl: 'main.html',\n * controller: function() {\n * this.eventLog = '';\n *\n * this.listener = function($event) {\n * this.eventLog = 'Event with type \"' + $event.type + '\" fired at ' + $event.detail;\n * };\n * }\n * })\n * .component('childComponent', {\n * templateUrl: 'child.html',\n * controller: function($element) {\n * this.fireEvent = function() {\n * var event = new CustomEvent('customtype', { detail: new Date()});\n *\n * $element[0].dispatchEvent(event);\n * };\n * }\n * });\n * </file>\n * <file name=\"main.html\">\n * <child-component ng-on-customtype=\"$ctrl.listener($event)\"></child-component><br>\n * <span>Event log: {{$ctrl.eventLog}}</span>\n * </file>\n * <file name=\"child.html\">\n <button ng-click=\"$ctrl.fireEvent()\">Fire custom event</button>\n * </file>\n * <file name=\"index.html\">\n * <main></main>\n * </file>\n * </example>\n */\n\nvar $compileMinErr = minErr('$compile');\n\nfunction UNINITIALIZED_VALUE() {}\nvar _UNINITIALIZED_VALUE = new UNINITIALIZED_VALUE();\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\n/** @this */\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive:\\s*([\\w-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\w-]+)(?::([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),\n REQUIRE_PREFIX_REGEXP = /^(?:(\\^\\^?)?(\\?)?(\\^\\^?)?)?/;\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n var bindingCache = createMap();\n\n function parseIsolateBindings(scope, directiveName, isController) {\n var LOCAL_REGEXP = /^([@&]|[=<](\\*?))(\\??)\\s*([\\w$]*)$/;\n\n var bindings = createMap();\n\n forEach(scope, function(definition, scopeName) {\n definition = definition.trim();\n\n if (definition in bindingCache) {\n bindings[scopeName] = bindingCache[definition];\n return;\n }\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n 'Invalid {3} for directive \\'{0}\\'.' +\n ' Definition: {... {1}: \\'{2}\\' ...}',\n directiveName, scopeName, definition,\n (isController ? 'controller bindings definition' :\n 'isolate scope definition'));\n }\n\n bindings[scopeName] = {\n mode: match[1][0],\n collection: match[2] === '*',\n optional: match[3] === '?',\n attrName: match[4] || scopeName\n };\n if (match[4]) {\n bindingCache[definition] = bindings[scopeName];\n }\n });\n\n return bindings;\n }\n\n function parseDirectiveBindings(directive, directiveName) {\n var bindings = {\n isolateScope: null,\n bindToController: null\n };\n if (isObject(directive.scope)) {\n if (directive.bindToController === true) {\n bindings.bindToController = parseIsolateBindings(directive.scope,\n directiveName, true);\n bindings.isolateScope = {};\n } else {\n bindings.isolateScope = parseIsolateBindings(directive.scope,\n directiveName, false);\n }\n }\n if (isObject(directive.bindToController)) {\n bindings.bindToController =\n parseIsolateBindings(directive.bindToController, directiveName, true);\n }\n if (bindings.bindToController && !directive.controller) {\n // There is no controller\n throw $compileMinErr('noctrl',\n 'Cannot bind to controller without directive \\'{0}\\'s controller.',\n directiveName);\n }\n return bindings;\n }\n\n function assertValidDirectiveName(name) {\n var letter = name.charAt(0);\n if (!letter || letter !== lowercase(letter)) {\n throw $compileMinErr('baddir', 'Directive/Component name \\'{0}\\' is invalid. The first character must be a lowercase letter', name);\n }\n if (name !== name.trim()) {\n throw $compileMinErr('baddir',\n 'Directive/Component name \\'{0}\\' is invalid. The name should not contain leading or trailing whitespaces',\n name);\n }\n }\n\n function getDirectiveRequire(directive) {\n var require = directive.require || (directive.controller && directive.name);\n\n if (!isArray(require) && isObject(require)) {\n forEach(require, function(value, key) {\n var match = value.match(REQUIRE_PREFIX_REGEXP);\n var name = value.substring(match[0].length);\n if (!name) require[key] = match[0] + key;\n });\n }\n\n return require;\n }\n\n function getDirectiveRestrict(restrict, name) {\n if (restrict && !(isString(restrict) && /[EACM]/.test(restrict))) {\n throw $compileMinErr('badrestrict',\n 'Restrict property \\'{0}\\' of directive \\'{1}\\' is invalid',\n restrict,\n name);\n }\n\n return restrict || 'EA';\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match\n * as `ng-bind`), or an object map of directives where the keys are the names and the values\n * are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See the\n * {@link guide/directive directive guide} and the {@link $compile compile API} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertArg(name, 'name');\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertValidDirectiveName(name);\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = getDirectiveRequire(directive);\n directive.restrict = getDirectiveRestrict(directive.restrict, name);\n directive.$$moduleName = directiveFactory.$$moduleName;\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#component\n * @module ng\n * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),\n * or an object map of components where the keys are the names and the values are the component definition objects.\n * @param {Object} options Component definition object (a simplified\n * {@link ng.$compile#directive-definition-object directive definition object}),\n * with the following properties (all optional):\n *\n * - `controller` – `{(string|function()=}` – controller constructor function that should be\n * associated with newly created scope or the name of a {@link ng.$compile#-controller-\n * registered controller} if passed as a string. An empty `noop` function by default.\n * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.\n * If present, the controller will be published to scope under the `controllerAs` name.\n * If not present, this will default to be `$ctrl`.\n * - `template` – `{string=|function()=}` – html template as a string or a function that\n * returns an html template as a string which should be used as the contents of this component.\n * Empty string by default.\n *\n * If `template` is a function, then it is {@link auto.$injector#invoke injected} with\n * the following locals:\n *\n * - `$element` - Current element\n * - `$attrs` - Current attributes object for the element\n *\n * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html\n * template that should be used as the contents of this component.\n *\n * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with\n * the following locals:\n *\n * - `$element` - Current element\n * - `$attrs` - Current attributes object for the element\n *\n * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.\n * Component properties are always bound to the component controller and not to the scope.\n * See {@link ng.$compile#-bindtocontroller- `bindToController`}.\n * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.\n * Disabled by default.\n * - `require` - `{Object<string, string>=}` - requires the controllers of other directives and binds them to\n * this component's controller. The object keys specify the property names under which the required\n * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}.\n * - `$...` – additional properties to attach to the directive factory function and the controller\n * constructor function. (This is used by the component router to annotate)\n *\n * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.\n * @description\n * Register a **component definition** with the compiler. This is a shorthand for registering a special\n * type of directive, which represents a self-contained UI component in your application. Such components\n * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).\n *\n * Component definitions are very simple and do not require as much configuration as defining general\n * directives. Component definitions usually consist only of a template and a controller backing it.\n *\n * In order to make the definition easier, components enforce best practices like use of `controllerAs`,\n * `bindToController`. They always have **isolate scope** and are restricted to elements.\n *\n * Here are a few examples of how you would usually define components:\n *\n * ```js\n * var myMod = angular.module(...);\n * myMod.component('myComp', {\n * template: '<div>My name is {{$ctrl.name}}</div>',\n * controller: function() {\n * this.name = 'shahar';\n * }\n * });\n *\n * myMod.component('myComp', {\n * template: '<div>My name is {{$ctrl.name}}</div>',\n * bindings: {name: '@'}\n * });\n *\n * myMod.component('myComp', {\n * templateUrl: 'views/my-comp.html',\n * controller: 'MyCtrl',\n * controllerAs: 'ctrl',\n * bindings: {name: '@'}\n * });\n *\n * ```\n * For more examples, and an in-depth guide, see the {@link guide/component component guide}.\n *\n * <br />\n * See also {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n this.component = function registerComponent(name, options) {\n if (!isString(name)) {\n forEach(name, reverseParams(bind(this, registerComponent)));\n return this;\n }\n\n var controller = options.controller || function() {};\n\n function factory($injector) {\n function makeInjectable(fn) {\n if (isFunction(fn) || isArray(fn)) {\n return /** @this */ function(tElement, tAttrs) {\n return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs});\n };\n } else {\n return fn;\n }\n }\n\n var template = (!options.template && !options.templateUrl ? '' : options.template);\n var ddo = {\n controller: controller,\n controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl',\n template: makeInjectable(template),\n templateUrl: makeInjectable(options.templateUrl),\n transclude: options.transclude,\n scope: {},\n bindToController: options.bindings || {},\n restrict: 'E',\n require: options.require\n };\n\n // Copy annotations (starting with $) over to the DDO\n forEach(options, function(val, key) {\n if (key.charAt(0) === '$') ddo[key] = val;\n });\n\n return ddo;\n }\n\n // TODO(pete) remove the following `forEach` before we release 1.6.0\n // The component-router@0.2.0 looks for the annotations on the controller constructor\n // Nothing in AngularJS looks for annotations on the factory function but we can't remove\n // it from 1.5.x yet.\n\n // Copy any annotation properties (starting with $) over to the factory and controller constructor functions\n // These could be used by libraries such as the new component router\n forEach(options, function(val, key) {\n if (key.charAt(0) === '$') {\n factory[key] = val;\n // Don't try to copy over annotations to named controller\n if (isFunction(controller)) controller[key] = val;\n }\n });\n\n factory.$inject = ['$injector'];\n\n return this.directive(name, factory);\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationTrustedUrlList\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for determining trusted safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at preventing XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationTrustedUrlList`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to trust urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationTrustedUrlList = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationTrustedUrlList(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationTrustedUrlList();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @deprecated\n * sinceVersion=\"1.8.1\"\n *\n * This method is deprecated. Use {@link $compileProvider#aHrefSanitizationTrustedUrlList\n * aHrefSanitizationTrustedUrlList} instead.\n */\n Object.defineProperty(this, 'aHrefSanitizationWhitelist', {\n get: function() {\n return this.aHrefSanitizationTrustedUrlList;\n },\n set: function(value) {\n this.aHrefSanitizationTrustedUrlList = value;\n }\n });\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationTrustedUrlList\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for determining trusted safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationTrustedUrlList`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to trust urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationTrustedUrlList = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @deprecated\n * sinceVersion=\"1.8.1\"\n *\n * This method is deprecated. Use {@link $compileProvider#imgSrcSanitizationTrustedUrlList\n * imgSrcSanitizationTrustedUrlList} instead.\n */\n Object.defineProperty(this, 'imgSrcSanitizationWhitelist', {\n get: function() {\n return this.imgSrcSanitizationTrustedUrlList;\n },\n set: function(value) {\n this.imgSrcSanitizationTrustedUrlList = value;\n }\n });\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `ng-scope` and `ng-isolated-scope` CSS classes\n * * `$binding` data property containing an array of the binding expressions\n * * Data properties used by the {@link angular.element#methods `scope()`/`isolateScope()` methods} to return\n * the element's scope.\n * * Placeholder comments will contain information about what directive and binding caused the placeholder.\n * E.g. `<!-- ngIf: shouldShow() -->`.\n *\n * You may want to disable this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if (isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#strictComponentBindingsEnabled\n *\n * @param {boolean=} enabled update the strictComponentBindingsEnabled state if provided,\n * otherwise return the current strictComponentBindingsEnabled state.\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable / disable the strict component bindings check. If enabled, the\n * compiler will enforce that all scope / controller bindings of a\n * {@link $compileProvider#directive directive} / {@link $compileProvider#component component}\n * that are not set as optional with `?`, must be provided when the directive is instantiated.\n * If not provided, the compiler will throw the\n * {@link error/$compile/missingattr $compile:missingattr error}.\n *\n * The default value is false.\n */\n var strictComponentBindingsEnabled = false;\n this.strictComponentBindingsEnabled = function(enabled) {\n if (isDefined(enabled)) {\n strictComponentBindingsEnabled = enabled;\n return this;\n }\n return strictComponentBindingsEnabled;\n };\n\n var TTL = 10;\n /**\n * @ngdoc method\n * @name $compileProvider#onChangesTtl\n * @description\n *\n * Sets the number of times `$onChanges` hooks can trigger new changes before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that dependencies between `$onChanges` hooks and bindings will result\n * in several iterations of calls to these hooks. However if an application needs more than the default 10\n * iterations to stabilize then you should investigate what is causing the model to continuously change during\n * the `$onChanges` hook execution.\n *\n * Increasing the TTL could have performance implications, so you should not change it without proper justification.\n *\n * @param {number} limit The number of `$onChanges` hook iterations.\n * @returns {number|object} the current limit (or `this` if called as a setter for chaining)\n */\n this.onChangesTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n return this;\n }\n return TTL;\n };\n\n var commentDirectivesEnabledConfig = true;\n /**\n * @ngdoc method\n * @name $compileProvider#commentDirectivesEnabled\n * @description\n *\n * It indicates to the compiler\n * whether or not directives on comments should be compiled.\n * Defaults to `true`.\n *\n * Calling this function with false disables the compilation of directives\n * on comments for the whole application.\n * This results in a compilation performance gain,\n * as the compiler doesn't have to check comments when looking for directives.\n * This should however only be used if you are sure that no comment directives are used in\n * the application (including any 3rd party directives).\n *\n * @param {boolean} enabled `false` if the compiler may ignore directives on comments\n * @returns {boolean|object} the current value (or `this` if called as a setter for chaining)\n */\n this.commentDirectivesEnabled = function(value) {\n if (arguments.length) {\n commentDirectivesEnabledConfig = value;\n return this;\n }\n return commentDirectivesEnabledConfig;\n };\n\n\n var cssClassDirectivesEnabledConfig = true;\n /**\n * @ngdoc method\n * @name $compileProvider#cssClassDirectivesEnabled\n * @description\n *\n * It indicates to the compiler\n * whether or not directives on element classes should be compiled.\n * Defaults to `true`.\n *\n * Calling this function with false disables the compilation of directives\n * on element classes for the whole application.\n * This results in a compilation performance gain,\n * as the compiler doesn't have to check element classes when looking for directives.\n * This should however only be used if you are sure that no class directives are used in\n * the application (including any 3rd party directives).\n *\n * @param {boolean} enabled `false` if the compiler may ignore directives on element classes\n * @returns {boolean|object} the current value (or `this` if called as a setter for chaining)\n */\n this.cssClassDirectivesEnabled = function(value) {\n if (arguments.length) {\n cssClassDirectivesEnabledConfig = value;\n return this;\n }\n return cssClassDirectivesEnabledConfig;\n };\n\n\n /**\n * The security context of DOM Properties.\n * @private\n */\n var PROP_CONTEXTS = createMap();\n\n /**\n * @ngdoc method\n * @name $compileProvider#addPropertySecurityContext\n * @description\n *\n * Defines the security context for DOM properties bound by ng-prop-*.\n *\n * @param {string} elementName The element name or '*' to match any element.\n * @param {string} propertyName The DOM property name.\n * @param {string} ctx The {@link $sce} security context in which this value is safe for use, e.g. `$sce.URL`\n * @returns {object} `this` for chaining\n */\n this.addPropertySecurityContext = function(elementName, propertyName, ctx) {\n var key = (elementName.toLowerCase() + '|' + propertyName.toLowerCase());\n\n if (key in PROP_CONTEXTS && PROP_CONTEXTS[key] !== ctx) {\n throw $compileMinErr('ctxoverride', 'Property context \\'{0}.{1}\\' already set to \\'{2}\\', cannot override to \\'{3}\\'.', elementName, propertyName, PROP_CONTEXTS[key], ctx);\n }\n\n PROP_CONTEXTS[key] = ctx;\n return this;\n };\n\n /* Default property contexts.\n *\n * Copy of https://github.com/angular/angular/blob/6.0.6/packages/compiler/src/schema/dom_security_schema.ts#L31-L58\n * Changing:\n * - SecurityContext.* => SCE_CONTEXTS/$sce.*\n * - STYLE => CSS\n * - various URL => MEDIA_URL\n * - *|formAction, form|action URL => RESOURCE_URL (like the attribute)\n */\n (function registerNativePropertyContexts() {\n function registerContext(ctx, values) {\n forEach(values, function(v) { PROP_CONTEXTS[v.toLowerCase()] = ctx; });\n }\n\n registerContext(SCE_CONTEXTS.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML'\n ]);\n registerContext(SCE_CONTEXTS.CSS, ['*|style']);\n registerContext(SCE_CONTEXTS.URL, [\n 'area|href', 'area|ping',\n 'a|href', 'a|ping',\n 'blockquote|cite',\n 'body|background',\n 'del|cite',\n 'input|src',\n 'ins|cite',\n 'q|cite'\n ]);\n registerContext(SCE_CONTEXTS.MEDIA_URL, [\n 'audio|src',\n 'img|src', 'img|srcset',\n 'source|src', 'source|srcset',\n 'track|src',\n 'video|src', 'video|poster'\n ]);\n registerContext(SCE_CONTEXTS.RESOURCE_URL, [\n '*|formAction',\n 'applet|code', 'applet|codebase',\n 'base|href',\n 'embed|src',\n 'frame|src',\n 'form|action',\n 'head|profile',\n 'html|manifest',\n 'iframe|src',\n 'link|href',\n 'media|src',\n 'object|codebase', 'object|data',\n 'script|src'\n ]);\n })();\n\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$sce', '$animate',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $sce, $animate) {\n\n var SIMPLE_ATTR_NAME = /^\\w/;\n var specialAttrHolder = window.document.createElement('div');\n\n\n var commentDirectivesEnabled = commentDirectivesEnabledConfig;\n var cssClassDirectivesEnabled = cssClassDirectivesEnabledConfig;\n\n\n var onChangesTtl = TTL;\n // The onChanges hooks should all be run together in a single digest\n // When changes occur, the call to trigger their hooks will be added to this queue\n var onChangesQueue;\n\n // This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest\n function flushOnChangesQueue() {\n try {\n if (!(--onChangesTtl)) {\n // We have hit the TTL limit so reset everything\n onChangesQueue = undefined;\n throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\\n', TTL);\n }\n // We must run this hook in an apply since the $$postDigest runs outside apply\n $rootScope.$apply(function() {\n for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {\n try {\n onChangesQueue[i]();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n // Reset the queue to trigger a new schedule next time there is a change\n onChangesQueue = undefined;\n });\n } finally {\n onChangesTtl++;\n }\n }\n\n\n function sanitizeSrcset(value, invokeType) {\n if (!value) {\n return value;\n }\n if (!isString(value)) {\n throw $compileMinErr('srcset', 'Can\\'t pass trusted values to `{0}`: \"{1}\"', invokeType, value.toString());\n }\n\n // Such values are a bit too complex to handle automatically inside $sce.\n // Instead, we sanitize each of the URIs individually, which works, even dynamically.\n\n // It's not possible to work around this using `$sce.trustAsMediaUrl`.\n // If you want to programmatically set explicitly trusted unsafe URLs, you should use\n // `$sce.trustAsHtml` on the whole `img` tag and inject it into the DOM using the\n // `ng-bind-html` directive.\n\n var result = '';\n\n // first check if there are spaces because it's not the same pattern\n var trimmedSrcset = trim(value);\n // ( 999x ,| 999w ,| ,|, )\n var srcPattern = /(\\s+\\d+x\\s*,|\\s+\\d+w\\s*,|\\s+,|,\\s+)/;\n var pattern = /\\s/.test(trimmedSrcset) ? srcPattern : /(,)/;\n\n // split srcset into tuple of uri and descriptor except for the last item\n var rawUris = trimmedSrcset.split(pattern);\n\n // for each tuples\n var nbrUrisWith2parts = Math.floor(rawUris.length / 2);\n for (var i = 0; i < nbrUrisWith2parts; i++) {\n var innerIdx = i * 2;\n // sanitize the uri\n result += $sce.getTrustedMediaUrl(trim(rawUris[innerIdx]));\n // add the descriptor\n result += ' ' + trim(rawUris[innerIdx + 1]);\n }\n\n // split the last item into uri and descriptor\n var lastTuple = trim(rawUris[i * 2]).split(/\\s/);\n\n // sanitize the last uri\n result += $sce.getTrustedMediaUrl(trim(lastTuple[0]));\n\n // and add the last descriptor if any\n if (lastTuple.length === 2) {\n result += (' ' + trim(lastTuple[1]));\n }\n return result;\n }\n\n\n function Attributes(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n }\n\n Attributes.prototype = {\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$normalize\n * @kind function\n *\n * @description\n * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or\n * `data-`) to its normalized, camelCase form.\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n *\n * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n *\n * @param {string} name Name to normalize\n */\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass: function(classVal) {\n if (classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass: function(classVal) {\n if (classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass: function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n // is set through this function since it may cause $updateClass to\n // become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(key),\n observer = key,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if (aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n // Sanitize img[srcset] values.\n if (nodeName === 'img' && key === 'srcset') {\n this[key] = value = sanitizeSrcset(value, '$set(\\'srcset\\', value)');\n }\n\n if (writeAttr !== false) {\n if (value === null || isUndefined(value)) {\n this.$$element.removeAttr(attrName);\n } else {\n if (SIMPLE_ATTR_NAME.test(attrName)) {\n // jQuery skips special boolean attrs treatment in XML nodes for\n // historical reasons and hence AngularJS cannot freely call\n // `.attr(attrName, false) with such attributes. To avoid issues\n // in XHTML, call `removeAttr` in such cases instead.\n // See https://github.com/jquery/jquery/issues/4249\n if (booleanKey && value === false) {\n this.$$element.removeAttr(attrName);\n } else {\n this.$$element.attr(attrName, value);\n }\n } else {\n setSpecialAttr(this.$$element[0], attrName, value);\n }\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n if ($$observers) {\n forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n }\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation\n * guide} for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n function setSpecialAttr(element, attrName, value) {\n // Attributes names that do not start with letters (such as `(click)`) cannot be set using `setAttribute`\n // so we have to jump through some hoops to get such an attribute\n // https://github.com/angular/angular.js/pull/13318\n specialAttrHolder.innerHTML = '<span ' + attrName + '>';\n var attributes = specialAttrHolder.firstChild.attributes;\n var attribute = attributes[0];\n // We have to remove the attribute from its container element before we can add it to the destination element\n attributes.removeNamedItem(attribute.name);\n attribute.value = value;\n element.attributes.setNamedItem(attribute);\n }\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch (e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol === '{{' && endSymbol === '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_PREFIX_BINDING = /^ng(Attr|Prop|On)([A-Z].*)$/;\n var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n compile.$$createComment = function(directiveName, comment) {\n var content = '';\n if (debugInfoEnabled) {\n content = ' ' + (directiveName || '') + ': ';\n if (comment) content += comment + ' ';\n }\n return window.document.createComment(content);\n };\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n return function publicLinkFn(scope, cloneConnectFn, options) {\n if (!$compileNodes) {\n throw $compileMinErr('multilink', 'This element has already been linked.');\n }\n assertArg(scope, 'scope');\n\n if (previousCompileContext && previousCompileContext.needsNewScope) {\n // A parent directive did a replace and a directive on this element asked\n // for transclusion, which caused us to lose a layer of element on which\n // we could hold the new transclusion scope, so we will create it manually\n // here.\n scope = scope.$parent.$new();\n }\n\n options = options || {};\n var parentBoundTranscludeFn = options.parentBoundTranscludeFn,\n transcludeControllers = options.transcludeControllers,\n futureParentElement = options.futureParentElement;\n\n // When `parentBoundTranscludeFn` is passed, it is a\n // `controllersBoundTransclude` function (it was previously passed\n // as `transclude` to directive.link) so we must unwrap it to get\n // its `boundTranscludeFn`\n if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {\n parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;\n }\n\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n var $linkNode;\n if (namespace !== 'html') {\n // When using a directive with replace:true and templateUrl the $compileNodes\n // (or a child element inside of them)\n // might change, so we need to recreate the namespace adapted compileNodes\n // for call to the link function.\n // Note: This will already clone the nodes...\n $linkNode = jqLite(\n wrapTemplate(namespace, jqLite('<div></div>').append($compileNodes).html())\n );\n } else if (cloneConnectFn) {\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n $linkNode = JQLitePrototype.clone.call($compileNodes);\n } else {\n $linkNode = $compileNodes;\n }\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n\n if (!cloneConnectFn) {\n $compileNodes = compositeLinkFn = null;\n }\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && toString.call(node).match(/SVG/) ? 'svg' : 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n // `nodeList` can be either an element's `.childNodes` (live NodeList)\n // or a jqLite/jQuery collection or an array\n notLiveList = isArray(nodeList) || (nodeList instanceof jqLite),\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // Support: IE 11 only\n // Workaround for #11781 and #14924\n if (msie === 11) {\n mergeConsecutiveTextNodes(nodeList, i, notLiveList);\n }\n\n // We must always refer to `nodeList[i]` hereafter,\n // since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i += 3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for (i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if (nodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function mergeConsecutiveTextNodes(nodeList, idx, notLiveList) {\n var node = nodeList[idx];\n var parent = node.parentNode;\n var sibling;\n\n if (node.nodeType !== NODE_TYPE_TEXT) {\n return;\n }\n\n while (true) {\n sibling = parent ? node.nextSibling : nodeList[idx + 1];\n if (!sibling || sibling.nodeType !== NODE_TYPE_TEXT) {\n break;\n }\n\n node.nodeValue = node.nodeValue + sibling.nodeValue;\n\n if (sibling.parentNode) {\n sibling.parentNode.removeChild(sibling);\n }\n if (notLiveList && sibling === nodeList[idx + 1]) {\n nodeList.splice(idx + 1, 1);\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {\n function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {\n\n if (!transcludedScope) {\n transcludedScope = scope.$new(false, containingScope);\n transcludedScope.$$transcluded = true;\n }\n\n return transcludeFn(transcludedScope, cloneFn, {\n parentBoundTranscludeFn: previousBoundTranscludeFn,\n transcludeControllers: controllers,\n futureParentElement: futureParentElement\n });\n }\n\n // We need to attach the transclusion slots onto the `boundTranscludeFn`\n // so that they are available inside the `controllersBoundTransclude` function\n var boundSlots = boundTranscludeFn.$$slots = createMap();\n for (var slotName in transcludeFn.$$slots) {\n if (transcludeFn.$$slots[slotName]) {\n boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);\n } else {\n boundSlots[slotName] = null;\n }\n }\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n nodeName,\n className;\n\n switch (nodeType) {\n case NODE_TYPE_ELEMENT: /* Element */\n\n nodeName = nodeName_(node);\n\n // use the node name: <directive>\n addDirective(directives,\n directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, value, ngPrefixMatch, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n var isNgAttr = false, isNgProp = false, isNgEvent = false;\n var multiElementMatch;\n\n attr = nAttrs[j];\n name = attr.name;\n value = attr.value;\n\n nName = directiveNormalize(name.toLowerCase());\n\n // Support ng-attr-*, ng-prop-* and ng-on-*\n if ((ngPrefixMatch = nName.match(NG_PREFIX_BINDING))) {\n isNgAttr = ngPrefixMatch[1] === 'Attr';\n isNgProp = ngPrefixMatch[1] === 'Prop';\n isNgEvent = ngPrefixMatch[1] === 'On';\n\n // Normalize the non-prefixed name\n name = name.replace(PREFIX_REGEXP, '')\n .toLowerCase()\n .substr(4 + ngPrefixMatch[1].length).replace(/_(.)/g, function(match, letter) {\n return letter.toUpperCase();\n });\n\n // Support *-start / *-end multi element directives\n } else if ((multiElementMatch = nName.match(MULTI_ELEMENT_DIR_RE)) && directiveIsMultiElement(multiElementMatch[1])) {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n\n if (isNgProp || isNgEvent) {\n attrs[nName] = value;\n attrsMap[nName] = attr.name;\n\n if (isNgProp) {\n addPropertyDirective(node, directives, nName, name);\n } else {\n addEventDirective(directives, nName, name);\n }\n } else {\n // Update nName for cases where a prefix was removed\n // NOTE: the .toLowerCase() is unnecessary and causes https://github.com/angular/angular.js/issues/16624 for ng-attr-*\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n }\n\n if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {\n // Hidden input elements can have strange behaviour when navigating back to the page\n // This tells the browser not to try to cache and reinstate previous values\n node.setAttribute('autocomplete', 'off');\n }\n\n // use class as directive\n if (!cssClassDirectivesEnabled) break;\n className = node.className;\n if (isObject(className)) {\n // Maybe SVGAnimatedString\n className = className.animVal;\n }\n if (isString(className) && className !== '') {\n while ((match = CLASS_DIRECTIVE_REGEXP.exec(className))) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case NODE_TYPE_TEXT: /* Text Node */\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case NODE_TYPE_COMMENT: /* Comment */\n if (!commentDirectivesEnabled) break;\n collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective);\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n // function created because of performance, try/catch disables\n // the optimization of the whole function #14848\n try {\n var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n var nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n }\n\n /**\n * Given a node with a directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n 'Unterminated attribute, found \\'{0}\\' but no matching \\'{1}\\' found.',\n attrStart, attrEnd);\n }\n if (node.nodeType === NODE_TYPE_ELEMENT) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function groupedElementsLink(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * A function generator that is used to support both eager and lazy compilation\n * linking function.\n * @param eager\n * @param $compileNodes\n * @param transcludeFn\n * @param maxPriority\n * @param ignoreDirective\n * @param previousCompileContext\n * @returns {Function}\n */\n function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {\n var compiled;\n\n if (eager) {\n return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);\n }\n return /** @this */ function lazyCompilation() {\n if (!compiled) {\n compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);\n\n // Null out all of these references in order to make them eligible for garbage collection\n // since this is a potentially long lived closure\n $compileNodes = transcludeFn = previousCompileContext = null;\n }\n return compiled.apply(this, arguments);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.<Function>} preLinkFns\n * @param {Array.<Function>} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective = previousCompileContext.newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n didScanForMultipleTransclusion = false,\n mightHaveMultipleTransclusionError = false,\n directiveValue;\n\n // executes all directives on the current element\n for (var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n directiveValue = directive.scope;\n\n if (directiveValue) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n // If we encounter a condition that can result in transclusion on the directive,\n // then scan ahead in the remaining directives for others that may cause a multiple\n // transclusion error to be thrown during the compilation process. If a matching directive\n // is found, then we know that when we encounter a transcluded directive, we need to eagerly\n // compile the `transclude` function rather than doing it lazily in order to throw\n // exceptions at the correct time\n if (!didScanForMultipleTransclusion && ((directive.replace && (directive.templateUrl || directive.template))\n || (directive.transclude && !directive.$$tlb))) {\n var candidateDirective;\n\n for (var scanningIndex = i + 1; (candidateDirective = directives[scanningIndex++]);) {\n if ((candidateDirective.transclude && !candidateDirective.$$tlb)\n || (candidateDirective.replace && (candidateDirective.templateUrl || candidateDirective.template))) {\n mightHaveMultipleTransclusionError = true;\n break;\n }\n }\n\n didScanForMultipleTransclusion = true;\n }\n\n if (!directive.templateUrl && directive.controller) {\n controllerDirectives = controllerDirectives || createMap();\n assertNoDuplicate('\\'' + directiveName + '\\' controller',\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n directiveValue = directive.transclude;\n\n if (directiveValue) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue === 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(compile.$$createComment(directiveName, templateAttrs[directiveName]));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n\n var slots = createMap();\n\n if (!isObject(directiveValue)) {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n } else {\n\n // We have transclusion slots,\n // collect them up, compile them and store their transclusion functions\n $template = window.document.createDocumentFragment();\n\n var slotMap = createMap();\n var filledSlots = createMap();\n\n // Parse the element selectors\n forEach(directiveValue, function(elementSelector, slotName) {\n // If an element selector starts with a ? then it is optional\n var optional = (elementSelector.charAt(0) === '?');\n elementSelector = optional ? elementSelector.substring(1) : elementSelector;\n\n slotMap[elementSelector] = slotName;\n\n // We explicitly assign `null` since this implies that a slot was defined but not filled.\n // Later when calling boundTransclusion functions with a slot name we only error if the\n // slot is `undefined`\n slots[slotName] = null;\n\n // filledSlots contains `true` for all slots that are either optional or have been\n // filled. This is used to check that we have not missed any required slots\n filledSlots[slotName] = optional;\n });\n\n // Add the matching elements into their slot\n forEach($compileNode.contents(), function(node) {\n var slotName = slotMap[directiveNormalize(nodeName_(node))];\n if (slotName) {\n filledSlots[slotName] = true;\n slots[slotName] = slots[slotName] || window.document.createDocumentFragment();\n slots[slotName].appendChild(node);\n } else {\n $template.appendChild(node);\n }\n });\n\n // Check for required slots that were not filled\n forEach(filledSlots, function(filled, slotName) {\n if (!filled) {\n throw $compileMinErr('reqslot', 'Required transclusion slot `{0}` was not filled.', slotName);\n }\n });\n\n for (var slotName in slots) {\n if (slots[slotName]) {\n // Only define a transclusion function if the slot was filled\n var slotCompileNodes = jqLite(slots[slotName].childNodes);\n slots[slotName] = compilationGenerator(mightHaveMultipleTransclusionError, slotCompileNodes, transcludeFn);\n }\n }\n\n $template = jqLite($template.childNodes);\n }\n\n $compileNode.empty(); // clear contents\n childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, undefined,\n undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});\n childTranscludeFn.$$slots = slots;\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n throw $compileMinErr('tplrt',\n 'Template for directive \\'{0}\\' must have exactly one root element. {1}',\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective || newScopeDirective) {\n // The original directive caused the current element to be replaced but this element\n // also needs to have a new scope, so we need to tell the template directives\n // that they would need to get their scope from further up, if they require transclusion\n markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n // eslint-disable-next-line no-func-assign\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n var context = directive.$$originalDirective || directive;\n if (isFunction(linkFn)) {\n addLinkFns(null, bind(context, linkFn), attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(bind(context, linkFn.pre), bind(context, linkFn.post), attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,\n attrs, scopeBindingInfo;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n controllerScope = scope;\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n } else if (newScopeDirective) {\n controllerScope = scope.$parent;\n }\n\n if (boundTranscludeFn) {\n // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`\n // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`\n transcludeFn = controllersBoundTransclude;\n transcludeFn.$$boundTransclude = boundTranscludeFn;\n // expose the slots on the `$transclude` function\n transcludeFn.isSlotFilled = function(slotName) {\n return !!boundTranscludeFn.$$slots[slotName];\n };\n }\n\n if (controllerDirectives) {\n elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective);\n }\n\n if (newIsolateScopeDirective) {\n // Initialize isolate scope bindings for new isolate scope directive.\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n isolateScope.$$isolateBindings =\n newIsolateScopeDirective.$$isolateBindings;\n scopeBindingInfo = initializeDirectiveBindings(scope, attrs, isolateScope,\n isolateScope.$$isolateBindings,\n newIsolateScopeDirective);\n if (scopeBindingInfo.removeWatches) {\n isolateScope.$on('$destroy', scopeBindingInfo.removeWatches);\n }\n }\n\n // Initialize bindToController bindings\n for (var name in elementControllers) {\n var controllerDirective = controllerDirectives[name];\n var controller = elementControllers[name];\n var bindings = controllerDirective.$$bindings.bindToController;\n\n controller.instance = controller();\n $element.data('$' + controllerDirective.name + 'Controller', controller.instance);\n controller.bindingInfo =\n initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n }\n\n // Bind the required controllers to the controller, if `require` is an object and `bindToController` is truthy\n forEach(controllerDirectives, function(controllerDirective, name) {\n var require = controllerDirective.require;\n if (controllerDirective.bindToController && !isArray(require) && isObject(require)) {\n extend(elementControllers[name].instance, getControllers(name, require, $element, elementControllers));\n }\n });\n\n // Handle the init and destroy lifecycle hooks on all controllers that have them\n forEach(elementControllers, function(controller) {\n var controllerInstance = controller.instance;\n if (isFunction(controllerInstance.$onChanges)) {\n try {\n controllerInstance.$onChanges(controller.bindingInfo.initialChanges);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n if (isFunction(controllerInstance.$onInit)) {\n try {\n controllerInstance.$onInit();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n if (isFunction(controllerInstance.$doCheck)) {\n controllerScope.$watch(function() { controllerInstance.$doCheck(); });\n controllerInstance.$doCheck();\n }\n if (isFunction(controllerInstance.$onDestroy)) {\n controllerScope.$on('$destroy', function callOnDestroyHook() {\n controllerInstance.$onDestroy();\n });\n }\n });\n\n // PRELINKING\n for (i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n if (childLinkFn) {\n childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n }\n\n // POSTLINKING\n for (i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // Trigger $postLink lifecycle hooks\n forEach(elementControllers, function(controller) {\n var controllerInstance = controller.instance;\n if (isFunction(controllerInstance.$postLink)) {\n controllerInstance.$postLink();\n }\n });\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) {\n var transcludeControllers;\n // No scope passed in:\n if (!isScope(scope)) {\n slotName = futureParentElement;\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n if (slotName) {\n // slotTranscludeFn can be one of three things:\n // * a transclude function - a filled slot\n // * `null` - an optional slot that was not filled\n // * `undefined` - a slot that was not declared (i.e. invalid)\n var slotTranscludeFn = boundTranscludeFn.$$slots[slotName];\n if (slotTranscludeFn) {\n return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n } else if (isUndefined(slotTranscludeFn)) {\n throw $compileMinErr('noslot',\n 'No parent directive that requires a transclusion with slot name \"{0}\". ' +\n 'Element: {1}',\n slotName, startingTag($element));\n }\n } else {\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n }\n }\n }\n }\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value;\n\n if (isString(require)) {\n var match = require.match(REQUIRE_PREFIX_REGEXP);\n var name = require.substring(match[0].length);\n var inheritType = match[1] || match[3];\n var optional = match[2] === '?';\n\n //If only parents then start at the parent element\n if (inheritType === '^^') {\n $element = $element.parent();\n //Otherwise attempt getting the controller from elementControllers in case\n //the element is transcluded (and has no data) and to avoid .data if possible\n } else {\n value = elementControllers && elementControllers[name];\n value = value && value.instance;\n }\n\n if (!value) {\n var dataName = '$' + name + 'Controller';\n\n if (inheritType === '^^' && $element[0] && $element[0].nodeType === NODE_TYPE_DOCUMENT) {\n // inheritedData() uses the documentElement when it finds the document, so we would\n // require from the element itself.\n value = null;\n } else {\n value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);\n }\n }\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n 'Controller \\'{0}\\', required by directive \\'{1}\\', can\\'t be found!',\n name, directiveName);\n }\n } else if (isArray(require)) {\n value = [];\n for (var i = 0, ii = require.length; i < ii; i++) {\n value[i] = getControllers(directiveName, require[i], $element, elementControllers);\n }\n } else if (isObject(require)) {\n value = {};\n forEach(require, function(controller, property) {\n value[property] = getControllers(directiveName, controller, $element, elementControllers);\n });\n }\n\n return value || null;\n }\n\n function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective) {\n var elementControllers = createMap();\n for (var controllerKey in controllerDirectives) {\n var directive = controllerDirectives[controllerKey];\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n };\n\n var controller = directive.controller;\n if (controller === '@') {\n controller = attrs[directive.name];\n }\n\n var controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment.\n // In this case .data will not attach any data.\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n return elementControllers;\n }\n\n // Depending upon the context in which a directive finds itself it might need to have a new isolated\n // or child scope created. For instance:\n // * if the directive has been pulled into a template because another directive with a higher priority\n // asked for element transclusion\n // * if the directive itself asks for transclusion but it is at the root of a template and the original\n // element was replaced. See https://github.com/angular/angular.js/issues/12936\n function markDirectiveScope(directives, isolateScope, newScope) {\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for (var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&\n directive.restrict.indexOf(location) !== -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n if (!directive.$$bindings) {\n var bindings = directive.$$bindings =\n parseDirectiveBindings(directive, directive.name);\n if (isObject(bindings.isolateScope)) {\n directive.$$isolateBindings = bindings.isolateScope;\n }\n }\n tDirectives.push(directive);\n match = directive;\n }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for (var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n if (directive.multiElement) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * When the element is replaced with HTML template then the new attributes\n * on the template need to be merged with the existing attributes in the DOM.\n * The desired effect is to have both of the attributes present.\n *\n * @param {object} dst destination attributes (original DOM)\n * @param {object} src source attributes (from the directive template)\n */\n function mergeTemplateAttributes(dst, src) {\n var srcAttr = src.$attr,\n dstAttr = dst.$attr;\n\n // reapply the old attributes to the new element\n forEach(dst, function(value, key) {\n if (key.charAt(0) !== '$') {\n if (src[key] && src[key] !== value) {\n if (value.length) {\n value += (key === 'style' ? ';' : ' ') + src[key];\n } else {\n value = src[key];\n }\n }\n dst.$set(key, value, true, srcAttr[key]);\n }\n });\n\n // copy the new attributes on the old attrs object\n forEach(src, function(value, key) {\n // Check if we already set this attribute in the loop above.\n // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') {\n dst[key] = value;\n\n if (key !== 'class' && key !== 'style') {\n dstAttr[key] = srcAttr[key];\n }\n }\n });\n }\n\n\n function compileTemplateUrl(directives, $compileNode, tAttrs,\n $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n var linkQueue = [],\n afterTemplateNodeLinkFn,\n afterTemplateChildLinkFn,\n beforeTemplateCompileNode = $compileNode[0],\n origAsyncDirective = directives.shift(),\n derivedSyncDirective = inherit(origAsyncDirective, {\n templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n }),\n templateUrl = (isFunction(origAsyncDirective.templateUrl))\n ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n : origAsyncDirective.templateUrl,\n templateNamespace = origAsyncDirective.templateNamespace;\n\n $compileNode.empty();\n\n $templateRequest(templateUrl)\n .then(function(content) {\n var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n content = denormalizeTemplate(content);\n\n if (origAsyncDirective.replace) {\n if (jqLiteIsTextNode(content)) {\n $template = [];\n } else {\n $template = removeComments(wrapTemplate(templateNamespace, trim(content)));\n }\n compileNode = $template[0];\n\n if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n throw $compileMinErr('tplrt',\n 'Template for directive \\'{0}\\' must have exactly one root element. {1}',\n origAsyncDirective.name, templateUrl);\n }\n\n tempTemplateAttrs = {$attr: {}};\n replaceWith($rootElement, $compileNode, compileNode);\n var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n if (isObject(origAsyncDirective.scope)) {\n // the original directive that caused the template to be loaded async required\n // an isolate scope\n markDirectiveScope(templateDirectives, true);\n }\n directives = templateDirectives.concat(directives);\n mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n } else {\n compileNode = beforeTemplateCompileNode;\n $compileNode.html(content);\n }\n\n directives.unshift(derivedSyncDirective);\n\n afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n previousCompileContext);\n forEach($rootElement, function(node, i) {\n if (node === compileNode) {\n $rootElement[i] = $compileNode[0];\n }\n });\n afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n while (linkQueue.length) {\n var scope = linkQueue.shift(),\n beforeTemplateLinkNode = linkQueue.shift(),\n linkRootElement = linkQueue.shift(),\n boundTranscludeFn = linkQueue.shift(),\n linkNode = $compileNode[0];\n\n if (scope.$$destroyed) continue;\n\n if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n var oldClasses = beforeTemplateLinkNode.className;\n\n if (!(previousCompileContext.hasElementTranscludeDirective &&\n origAsyncDirective.replace)) {\n // it was cloned therefore we have to clone as well.\n linkNode = jqLiteClone(compileNode);\n }\n replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n // Copy in CSS classes from original node\n safeAddClass(jqLite(linkNode), oldClasses);\n }\n if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n } else {\n childBoundTranscludeFn = boundTranscludeFn;\n }\n afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n childBoundTranscludeFn);\n }\n linkQueue = null;\n }).catch(function(error) {\n if (isError(error)) {\n $exceptionHandler(error);\n }\n });\n\n return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n var childBoundTranscludeFn = boundTranscludeFn;\n if (scope.$$destroyed) return;\n if (linkQueue) {\n linkQueue.push(scope,\n node,\n rootElement,\n childBoundTranscludeFn);\n } else {\n if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n }\n afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);\n }\n };\n }\n\n\n /**\n * Sorting function for bound directives.\n */\n function byPriority(a, b) {\n var diff = b.priority - a.priority;\n if (diff !== 0) return diff;\n if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n return a.index - b.index;\n }\n\n function assertNoDuplicate(what, previousDirective, directive, element) {\n\n function wrapModuleNameIfDefined(moduleName) {\n return moduleName ?\n (' (module: ' + moduleName + ')') :\n '';\n }\n\n if (previousDirective) {\n throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',\n previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),\n directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));\n }\n }\n\n\n function addTextInterpolateDirective(directives, text) {\n var interpolateFn = $interpolate(text, true);\n if (interpolateFn) {\n directives.push({\n priority: 0,\n compile: function textInterpolateCompileFn(templateNode) {\n var templateNodeParent = templateNode.parent(),\n hasCompileParent = !!templateNodeParent.length;\n\n // When transcluding a template that has bindings in the root\n // we don't have a parent and thus need to add the class during linking fn.\n if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);\n\n return function textInterpolateLinkFn(scope, node) {\n var parent = node.parent();\n if (!hasCompileParent) compile.$$addBindingClass(parent);\n compile.$$addBindingInfo(parent, interpolateFn.expressions);\n scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n node[0].nodeValue = value;\n });\n };\n }\n });\n }\n }\n\n\n function wrapTemplate(type, template) {\n type = lowercase(type || 'html');\n switch (type) {\n case 'svg':\n case 'math':\n var wrapper = window.document.createElement('div');\n wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedAttrContext(nodeName, attrNormalizedName) {\n if (attrNormalizedName === 'srcdoc') {\n return $sce.HTML;\n }\n // All nodes with src attributes require a RESOURCE_URL value, except for\n // img and various html5 media nodes, which require the MEDIA_URL context.\n if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') {\n if (['img', 'video', 'audio', 'source', 'track'].indexOf(nodeName) === -1) {\n return $sce.RESOURCE_URL;\n }\n return $sce.MEDIA_URL;\n } else if (attrNormalizedName === 'xlinkHref') {\n // Some xlink:href are okay, most aren't\n if (nodeName === 'image') return $sce.MEDIA_URL;\n if (nodeName === 'a') return $sce.URL;\n return $sce.RESOURCE_URL;\n } else if (\n // Formaction\n (nodeName === 'form' && attrNormalizedName === 'action') ||\n // If relative URLs can go where they are not expected to, then\n // all sorts of trust issues can arise.\n (nodeName === 'base' && attrNormalizedName === 'href') ||\n // links can be stylesheets or imports, which can run script in the current origin\n (nodeName === 'link' && attrNormalizedName === 'href')\n ) {\n return $sce.RESOURCE_URL;\n } else if (nodeName === 'a' && (attrNormalizedName === 'href' ||\n attrNormalizedName === 'ngHref')) {\n return $sce.URL;\n }\n }\n\n function getTrustedPropContext(nodeName, propNormalizedName) {\n var prop = propNormalizedName.toLowerCase();\n return PROP_CONTEXTS[nodeName + '|' + prop] || PROP_CONTEXTS['*|' + prop];\n }\n\n function sanitizeSrcsetPropertyValue(value) {\n return sanitizeSrcset($sce.valueOf(value), 'ng-prop-srcset');\n }\n function addPropertyDirective(node, directives, attrName, propName) {\n if (EVENT_HANDLER_ATTR_REGEXP.test(propName)) {\n throw $compileMinErr('nodomevents', 'Property bindings for HTML DOM event properties are disallowed');\n }\n\n var nodeName = nodeName_(node);\n var trustedContext = getTrustedPropContext(nodeName, propName);\n\n var sanitizer = identity;\n // Sanitize img[srcset] + source[srcset] values.\n if (propName === 'srcset' && (nodeName === 'img' || nodeName === 'source')) {\n sanitizer = sanitizeSrcsetPropertyValue;\n } else if (trustedContext) {\n sanitizer = $sce.getTrusted.bind($sce, trustedContext);\n }\n\n directives.push({\n priority: 100,\n compile: function ngPropCompileFn(_, attr) {\n var ngPropGetter = $parse(attr[attrName]);\n var ngPropWatch = $parse(attr[attrName], function sceValueOf(val) {\n // Unwrap the value to compare the actual inner safe value, not the wrapper object.\n return $sce.valueOf(val);\n });\n\n return {\n pre: function ngPropPreLinkFn(scope, $element) {\n function applyPropValue() {\n var propValue = ngPropGetter(scope);\n $element[0][propName] = sanitizer(propValue);\n }\n\n applyPropValue();\n scope.$watch(ngPropWatch, applyPropValue);\n }\n };\n }\n });\n }\n\n function addEventDirective(directives, attrName, eventName) {\n directives.push(\n createEventDirective($parse, $rootScope, $exceptionHandler, attrName, eventName, /*forceAsync=*/false)\n );\n }\n\n function addAttrInterpolateDirective(node, directives, value, name, isNgAttr) {\n var nodeName = nodeName_(node);\n var trustedContext = getTrustedAttrContext(nodeName, name);\n var mustHaveExpression = !isNgAttr;\n var allOrNothing = ALL_OR_NOTHING_ATTRS[name] || isNgAttr;\n\n var interpolateFn = $interpolate(value, mustHaveExpression, trustedContext, allOrNothing);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n if (name === 'multiple' && nodeName === 'select') {\n throw $compileMinErr('selmulti',\n 'Binding to the \\'multiple\\' attribute is not supported. Element: {0}',\n startingTag(node));\n }\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents', 'Interpolations for HTML DOM event attributes are disallowed');\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = createMap()));\n\n // If the attribute has changed since last $interpolate()ed\n var newValue = attr[name];\n if (newValue !== value) {\n // we need to interpolate again since the attribute value has been updated\n // (e.g. by another directive's compile function)\n // ensure unset/empty values make interpolateFn falsy\n interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);\n value = newValue;\n }\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if (name === 'class' && newValue !== oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for (i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] === firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // Append all the `elementsToRemove` to a fragment. This will...\n // - remove them from the DOM\n // - allow them to still be traversed with .nextSibling\n // - allow a single fragment.qSA to fetch all elements being removed\n var fragment = window.document.createDocumentFragment();\n for (i = 0; i < removeCount; i++) {\n fragment.appendChild(elementsToRemove[i]);\n }\n\n if (jqLite.hasData(firstElementToRemove)) {\n // Copy over user data (that includes AngularJS's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite.data(newNode, jqLite.data(firstElementToRemove));\n\n // Remove $destroy event listeners from `firstElementToRemove`\n jqLite(firstElementToRemove).off('$destroy');\n }\n\n // Cleanup any data/listeners on the elements and children.\n // This includes invoking the $destroy event on any elements with listeners.\n jqLite.cleanData(fragment.querySelectorAll('*'));\n\n // Update the jqLite collection to only contain the `newNode`\n for (i = 1; i < removeCount; i++) {\n delete elementsToRemove[i];\n }\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch (e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n\n function strictBindingsCheck(attrName, directiveName) {\n if (strictComponentBindingsEnabled) {\n throw $compileMinErr('missingattr',\n 'Attribute \\'{0}\\' of \\'{1}\\' is non-optional and must be set!',\n attrName, directiveName);\n }\n }\n\n // Set up $watches for isolate scope and controller bindings.\n function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {\n var removeWatchCollection = [];\n var initialChanges = {};\n var changes;\n\n forEach(bindings, function initializeBinding(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, <, or &\n lastValue,\n parentGet, parentSet, compare, removeWatch;\n\n switch (mode) {\n\n case '@':\n if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n strictBindingsCheck(attrName, directive.name);\n destination[scopeName] = attrs[attrName] = undefined;\n\n }\n removeWatch = attrs.$observe(attrName, function(value) {\n if (isString(value) || isBoolean(value)) {\n var oldValue = destination[scopeName];\n recordChanges(scopeName, value, oldValue);\n destination[scopeName] = value;\n }\n });\n attrs.$$observers[attrName].$$scope = scope;\n lastValue = attrs[attrName];\n if (isString(lastValue)) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n destination[scopeName] = $interpolate(lastValue)(scope);\n } else if (isBoolean(lastValue)) {\n // If the attributes is one of the BOOLEAN_ATTR then AngularJS will have converted\n // the value to boolean rather than a string, so we special case this situation\n destination[scopeName] = lastValue;\n }\n initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]);\n removeWatchCollection.push(removeWatch);\n break;\n\n case '=':\n if (!hasOwnProperty.call(attrs, attrName)) {\n if (optional) break;\n strictBindingsCheck(attrName, directive.name);\n attrs[attrName] = undefined;\n }\n if (optional && !attrs[attrName]) break;\n\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = simpleCompare;\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = destination[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n 'Expression \\'{0}\\' in attribute \\'{1}\\' used with directive \\'{2}\\' is non-assignable!',\n attrs[attrName], attrName, directive.name);\n };\n lastValue = destination[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, destination[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n destination[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = destination[scopeName]);\n }\n }\n lastValue = parentValue;\n return lastValue;\n };\n parentValueWatch.$stateful = true;\n if (definition.collection) {\n removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);\n } else {\n removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n }\n removeWatchCollection.push(removeWatch);\n break;\n\n case '<':\n if (!hasOwnProperty.call(attrs, attrName)) {\n if (optional) break;\n strictBindingsCheck(attrName, directive.name);\n attrs[attrName] = undefined;\n }\n if (optional && !attrs[attrName]) break;\n\n parentGet = $parse(attrs[attrName]);\n var isLiteral = parentGet.literal;\n\n var initialValue = destination[scopeName] = parentGet(scope);\n initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]);\n\n removeWatch = scope[definition.collection ? '$watchCollection' : '$watch'](parentGet, function parentValueWatchAction(newValue, oldValue) {\n if (oldValue === newValue) {\n if (oldValue === initialValue || (isLiteral && equals(oldValue, initialValue))) {\n return;\n }\n oldValue = initialValue;\n }\n recordChanges(scopeName, newValue, oldValue);\n destination[scopeName] = newValue;\n });\n\n removeWatchCollection.push(removeWatch);\n break;\n\n case '&':\n if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n strictBindingsCheck(attrName, directive.name);\n }\n // Don't assign Object.prototype method to scope\n parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;\n\n // Don't assign noop to destination if expression is not valid\n if (parentGet === noop && optional) break;\n\n destination[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n\n function recordChanges(key, currentValue, previousValue) {\n if (isFunction(destination.$onChanges) && !simpleCompare(currentValue, previousValue)) {\n // If we have not already scheduled the top level onChangesQueue handler then do so now\n if (!onChangesQueue) {\n scope.$$postDigest(flushOnChangesQueue);\n onChangesQueue = [];\n }\n // If we have not already queued a trigger of onChanges for this controller then do so now\n if (!changes) {\n changes = {};\n onChangesQueue.push(triggerOnChangesHook);\n }\n // If the has been a change on this property already then we need to reuse the previous value\n if (changes[key]) {\n previousValue = changes[key].previousValue;\n }\n // Store this change\n changes[key] = new SimpleChange(previousValue, currentValue);\n }\n }\n\n function triggerOnChangesHook() {\n destination.$onChanges(changes);\n // Now clear the changes so that we schedule onChanges when more changes arrive\n changes = undefined;\n }\n\n return {\n initialChanges: initialChanges,\n removeWatches: removeWatchCollection.length && function removeWatches() {\n for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {\n removeWatchCollection[i]();\n }\n }\n };\n }\n }];\n}\n\nfunction SimpleChange(previous, current) {\n this.previousValue = previous;\n this.currentValue = current;\n}\nSimpleChange.prototype.isFirstChange = function() { return this.previousValue === _UNINITIALIZED_VALUE; };\n\n\nvar PREFIX_REGEXP = /^((?:x|data)[:\\-_])/i;\nvar SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\n\n/**\n * Converts all accepted directives format into proper directive name.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return name\n .replace(PREFIX_REGEXP, '')\n .replace(SPECIAL_CHARS_REGEXP, function(_, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n });\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in AngularJS:\n *\n * ```\n * <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for (var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for (var j = 0; j < tokens2.length; j++) {\n if (token === tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\nfunction removeComments(jqNodes) {\n jqNodes = jqLite(jqNodes);\n var i = jqNodes.length;\n\n if (i <= 1) {\n return jqNodes;\n }\n\n while (i--) {\n var node = jqNodes[i];\n if (node.nodeType === NODE_TYPE_COMMENT ||\n (node.nodeType === NODE_TYPE_TEXT && node.nodeValue.trim() === '')) {\n splice.call(jqNodes, i, 1);\n }\n }\n return jqNodes;\n}\n\nvar $controllerMinErr = minErr('$controller');\n\n\nvar CNTRL_REG = /^(\\S+)(\\s+as\\s+([\\w$]+))?$/;\nfunction identifierForController(controller, ident) {\n if (ident && isString(ident)) return ident;\n if (isString(controller)) {\n var match = CNTRL_REG.exec(controller);\n if (match) return match[3];\n }\n}\n\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @this\n *\n * @description\n * The {@link ng.$controller $controller service} is used by AngularJS to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {};\n\n /**\n * @ngdoc method\n * @name $controllerProvider#has\n * @param {string} name Controller name to check.\n */\n this.has = function(name) {\n return controllers.hasOwnProperty(name);\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n this.$get = ['$injector', function($injector) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n *\n * The string can use the `controller as property` syntax, where the controller instance is published\n * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this\n * to work correctly.\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function $controller(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if (isString(expression)) {\n match = expression.match(CNTRL_REG);\n if (!match) {\n throw $controllerMinErr('ctrlfmt',\n 'Badly formed controller string \\'{0}\\'. ' +\n 'Must match `__name__ as __id__` or `__name__`.', expression);\n }\n constructor = match[1];\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true);\n\n if (!expression) {\n throw $controllerMinErr('ctrlreg',\n 'The controller with the name \\'{0}\\' is not registered.', constructor);\n }\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n // Object creation: http://jsperf.com/create-constructor/2\n var controllerPrototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = Object.create(controllerPrototype || null);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return extend(function $controllerInit() {\n var result = $injector.invoke(expression, instance, locals, constructor);\n if (result !== instance && (isObject(result) || isFunction(result))) {\n instance = result;\n if (identifier) {\n // If result changed, re-assign controllerAs value to scope.\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n }\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n 'Cannot export controller \\'{0}\\' as \\'{1}\\'! No $scope object provided via `locals`.',\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n * @this\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n <example module=\"documentExample\" name=\"document\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <p>$document title: <b ng-bind=\"title\"></b></p>\n <p>window.document title: <b ng-bind=\"windowTitle\"></b></p>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n </file>\n </example>\n */\nfunction $DocumentProvider() {\n this.$get = ['$window', function(window) {\n return jqLite(window.document);\n }];\n}\n\n\n/**\n * @private\n * @this\n * Listens for document visibility change and makes the current status accessible.\n */\nfunction $$IsDocumentHiddenProvider() {\n this.$get = ['$document', '$rootScope', function($document, $rootScope) {\n var doc = $document[0];\n var hidden = doc && doc.hidden;\n\n $document.on('visibilitychange', changeListener);\n\n $rootScope.$on('$destroy', function() {\n $document.off('visibilitychange', changeListener);\n });\n\n function changeListener() {\n hidden = doc.hidden;\n }\n\n return function() {\n return hidden;\n };\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n * @this\n *\n * @description\n * Any uncaught exception in AngularJS expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught\n * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead\n * of `$log.error()`.\n *\n * ```js\n * angular.\n * module('exceptionOverwrite', []).\n * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {\n * return function myExceptionHandler(exception, cause) {\n * logErrorsToBackend(exception, cause);\n * $log.warn(exception, cause);\n * };\n * }]);\n * ```\n *\n * <hr />\n * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`\n * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}\n * (unless executed during a digest).\n *\n * If you wish, you can manually delegate exceptions, e.g.\n * `try { ... } catch(e) { $exceptionHandler(e); }`\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause Optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\nvar $$ForceReflowProvider = /** @this */ function() {\n this.$get = ['$document', function($document) {\n return function(domNode) {\n //the line below will force the browser to perform a repaint so\n //that all the animated elements within the animation frame will\n //be properly updated and drawn on screen. This is required to\n //ensure that the preparation animation is properly flushed so that\n //the active state picks up from there. DO NOT REMOVE THIS LINE.\n //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH\n //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND\n //WILL TAKE YEARS AWAY FROM YOUR LIFE.\n if (domNode) {\n if (!domNode.nodeType && domNode instanceof jqLite) {\n domNode = domNode[0];\n }\n } else {\n domNode = $document[0].body;\n }\n return domNode.offsetWidth + 1;\n };\n }];\n};\n\nvar APPLICATION_JSON = 'application/json';\nvar CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};\nvar JSON_START = /^\\[|^\\{(?!\\{)/;\nvar JSON_ENDS = {\n '[': /]$/,\n '{': /}$/\n};\nvar JSON_PROTECTION_PREFIX = /^\\)]\\}',?\\n/;\nvar $httpMinErr = minErr('$http');\n\nfunction serializeValue(v) {\n if (isObject(v)) {\n return isDate(v) ? v.toISOString() : toJson(v);\n }\n return v;\n}\n\n\n/** @this */\nfunction $HttpParamSerializerProvider() {\n /**\n * @ngdoc service\n * @name $httpParamSerializer\n * @description\n *\n * Default {@link $http `$http`} params serializer that converts objects to strings\n * according to the following rules:\n *\n * * `{'foo': 'bar'}` results in `foo=bar`\n * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)\n * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)\n * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)\n *\n * Note that serializer will sort the request parameters alphabetically.\n */\n\n this.$get = function() {\n return function ngParamSerializer(params) {\n if (!params) return '';\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value) || isFunction(value)) return;\n if (isArray(value)) {\n forEach(value, function(v) {\n parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));\n });\n } else {\n parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));\n }\n });\n\n return parts.join('&');\n };\n };\n}\n\n/** @this */\nfunction $HttpParamSerializerJQLikeProvider() {\n /**\n * @ngdoc service\n * @name $httpParamSerializerJQLike\n *\n * @description\n *\n * Alternative {@link $http `$http`} params serializer that follows\n * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.\n * The serializer will also sort the params alphabetically.\n *\n * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:\n *\n * ```js\n * $http({\n * url: myUrl,\n * method: 'GET',\n * params: myParams,\n * paramSerializer: '$httpParamSerializerJQLike'\n * });\n * ```\n *\n * It is also possible to set it as the default `paramSerializer` in the\n * {@link $httpProvider#defaults `$httpProvider`}.\n *\n * Additionally, you can inject the serializer and use it explicitly, for example to serialize\n * form data for submission:\n *\n * ```js\n * .controller(function($http, $httpParamSerializerJQLike) {\n * //...\n *\n * $http({\n * url: myUrl,\n * method: 'POST',\n * data: $httpParamSerializerJQLike(myData),\n * headers: {\n * 'Content-Type': 'application/x-www-form-urlencoded'\n * }\n * });\n *\n * });\n * ```\n *\n */\n this.$get = function() {\n return function jQueryLikeParamSerializer(params) {\n if (!params) return '';\n var parts = [];\n serialize(params, '', true);\n return parts.join('&');\n\n function serialize(toSerialize, prefix, topLevel) {\n if (isArray(toSerialize)) {\n forEach(toSerialize, function(value, index) {\n serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');\n });\n } else if (isObject(toSerialize) && !isDate(toSerialize)) {\n forEachSorted(toSerialize, function(value, key) {\n serialize(value, prefix +\n (topLevel ? '' : '[') +\n key +\n (topLevel ? '' : ']'));\n });\n } else {\n if (isFunction(toSerialize)) {\n toSerialize = toSerialize();\n }\n parts.push(encodeUriQuery(prefix) + '=' +\n (toSerialize == null ? '' : encodeUriQuery(serializeValue(toSerialize))));\n }\n }\n };\n };\n}\n\nfunction defaultHttpResponseTransform(data, headers) {\n if (isString(data)) {\n // Strip json vulnerability protection prefix and trim whitespace\n var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();\n\n if (tempData) {\n var contentType = headers('Content-Type');\n var hasJsonContentType = contentType && (contentType.indexOf(APPLICATION_JSON) === 0);\n\n if (hasJsonContentType || isJsonLike(tempData)) {\n try {\n data = fromJson(tempData);\n } catch (e) {\n if (!hasJsonContentType) {\n return data;\n }\n throw $httpMinErr('baddata', 'Data must be a valid JSON object. Received: \"{0}\". ' +\n 'Parse error: \"{1}\"', data, e);\n }\n }\n }\n }\n\n return data;\n}\n\nfunction isJsonLike(str) {\n var jsonStart = str.match(JSON_START);\n return jsonStart && JSON_ENDS[jsonStart[0]].test(str);\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = createMap(), i;\n\n function fillInParsed(key, val) {\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n\n if (isString(headers)) {\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));\n });\n } else if (isObject(headers)) {\n forEach(headers, function(headerVal, headerKey) {\n fillInParsed(lowercase(headerKey), trim(headerVal));\n });\n }\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n var value = headersObj[lowercase(name)];\n if (value === undefined) {\n value = null;\n }\n return value;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers HTTP headers getter fn.\n * @param {number} status HTTP status code of the response.\n * @param {(Function|Array.<Function>)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, status, fns) {\n if (isFunction(fns)) {\n return fns(data, headers, status);\n }\n\n forEach(fns, function(fn) {\n data = fn(data, headers, status);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @this\n *\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n */\nfunction $HttpProvider() {\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with\n * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses\n * by default. See {@link $http#caching $http Caching} for more information.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n *\n * - **`defaults.jsonpCallbackParam`** - `{string}` - the name of the query parameter that passes the name of the\n * callback in a JSONP request. The value of this parameter will be replaced with the expression generated by the\n * {@link $jsonpCallbacks} service. Defaults to `'callback'`.\n *\n * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function\n * used to the prepare string representation of request parameters (specified as an object).\n * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.\n * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.\n *\n * - **`defaults.transformRequest`** -\n * `{Array<function(data, headersGetter)>|function(data, headersGetter)}` -\n * An array of functions (or a single function) which are applied to the request data.\n * By default, this is an array with one request transformation function:\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * - **`defaults.transformResponse`** -\n * `{Array<function(data, headersGetter, status)>|function(data, headersGetter, status)}` -\n * An array of functions (or a single function) which are applied to the response data. By default,\n * this is an array which applies one response transformation function that does two things:\n *\n * - If XSRF prefix is detected, strip it\n * (see {@link ng.$http#security-considerations Security Considerations in the $http docs}).\n * - If the `Content-Type` is `application/json` or the response looks like JSON,\n * deserialize it using a JSON parser.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n */\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [defaultHttpResponseTransform],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n paramSerializer: '$httpParamSerializer',\n\n jsonpCallbackParam: 'callback'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specified, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n */\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n /**\n * @ngdoc property\n * @name $httpProvider#interceptors\n * @description\n *\n * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}\n * pre-processing of request or postprocessing of responses.\n *\n * These service factories are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n *\n * {@link ng.$http#interceptors Interceptors detailed info}\n */\n var interceptorFactories = this.interceptors = [];\n\n /**\n * @ngdoc property\n * @name $httpProvider#xsrfTrustedOrigins\n * @description\n *\n * Array containing URLs whose origins are trusted to receive the XSRF token. See the\n * {@link ng.$http#security-considerations Security Considerations} sections for more details on\n * XSRF.\n *\n * **Note:** An \"origin\" consists of the [URI scheme](https://en.wikipedia.org/wiki/URI_scheme),\n * the [hostname](https://en.wikipedia.org/wiki/Hostname) and the\n * [port number](https://en.wikipedia.org/wiki/Port_(computer_networking). For `http:` and\n * `https:`, the port number can be omitted if using th default ports (80 and 443 respectively).\n * Examples: `http://example.com`, `https://api.example.com:9876`\n *\n * <div class=\"alert alert-warning\">\n * It is not possible to trust specific URLs/paths. The `path`, `query` and `fragment` parts\n * of a URL will be ignored. For example, `https://foo.com/path/bar?query=baz#fragment` will be\n * treated as `https://foo.com`, meaning that **all** requests to URLs starting with\n * `https://foo.com/` will include the XSRF token.\n * </div>\n *\n * @example\n *\n * ```js\n * // App served from `https://example.com/`.\n * angular.\n * module('xsrfTrustedOriginsExample', []).\n * config(['$httpProvider', function($httpProvider) {\n * $httpProvider.xsrfTrustedOrigins.push('https://api.example.com');\n * }]).\n * run(['$http', function($http) {\n * // The XSRF token will be sent.\n * $http.get('https://api.example.com/preferences').then(...);\n *\n * // The XSRF token will NOT be sent.\n * $http.get('https://stats.example.com/activity').then(...);\n * }]);\n * ```\n */\n var xsrfTrustedOrigins = this.xsrfTrustedOrigins = [];\n\n /**\n * @ngdoc property\n * @name $httpProvider#xsrfWhitelistedOrigins\n * @description\n *\n * @deprecated\n * sinceVersion=\"1.8.1\"\n *\n * This property is deprecated. Use {@link $httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins}\n * instead.\n */\n Object.defineProperty(this, 'xsrfWhitelistedOrigins', {\n get: function() {\n return this.xsrfTrustedOrigins;\n },\n set: function(origins) {\n this.xsrfTrustedOrigins = origins;\n }\n });\n\n this.$get = ['$browser', '$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector', '$sce',\n function($browser, $httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector, $sce) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Make sure that default param serializer is exposed as a function\n */\n defaults.paramSerializer = isString(defaults.paramSerializer) ?\n $injector.get(defaults.paramSerializer) : defaults.paramSerializer;\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * A function to check request URLs against a list of allowed origins.\n */\n var urlIsAllowedOrigin = urlIsAllowedOriginFactory(xsrfTrustedOrigins);\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core AngularJS service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise} that is\n * resolved (request success) or rejected (request failure) with a\n * {@link ng.$http#$http-returns response} object.\n *\n * ```js\n * // Simple GET request example:\n * $http({\n * method: 'GET',\n * url: '/someUrl'\n * }).then(function successCallback(response) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }, function errorCallback(response) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests. An optional config can be passed as the\n * last argument.\n *\n * ```js\n * $http.get('/someUrl', config).then(successCallback, errorCallback);\n * $http.post('/someUrl', data, config).then(successCallback, errorCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - <code>Accept: application/json, text/plain, \\*/\\*</code>\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w';\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,\n * Use the `headers` property, setting the desired header to `undefined`. For example:\n *\n * ```js\n * var req = {\n * method: 'POST',\n * url: 'http://example.com',\n * headers: {\n * 'Content-Type': undefined\n * },\n * data: { test: 'test' }\n * }\n *\n * $http(req).then(function(){...}, function(){...});\n * ```\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** AngularJS does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline.\n * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference).\n * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest\n * function will be reflected on the scope and in any templates where the object is data-bound.\n * To prevent this, transform functions should have no side-effects.\n * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return.\n * </div>\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * AngularJS provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`) is\n * an array with one function that does the following:\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`) is\n * an array with one function that does the following:\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If the `Content-Type` is `application/json` or the response looks like JSON,\n * deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish to override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must\n * set the config.cache value or the default cache value to TRUE or to a cache object (created\n * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes\n * precedence over the default cache value.\n *\n * In order to:\n * * cache all responses - set the default cache value to TRUE or to a cache object\n * * cache a specific response - set config.cache value to TRUE or to a cache object\n *\n * If caching is enabled, but neither the default cache nor config.cache are set to a cache object,\n * then the default `$cacheFactory(\"$http\")` object is used.\n *\n * The default cache value can be set by updating the\n * {@link ng.$http#defaults `$http.defaults.cache`} property or the\n * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property.\n *\n * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using\n * the relevant cache object. The next time the same request is made, the response is returned\n * from the cache without sending a request to the server.\n *\n * Take note that:\n *\n * * Only GET and JSONP requests are cached.\n * * The cache key is the request URL including search parameters; headers are not considered.\n * * Cached responses are returned asynchronously, in the same way as responses from the server.\n * * If multiple identical requests are made using the same cache, which is not yet populated,\n * one request will be made to the server and remaining requests will return the same response.\n * * A cache-control header on the response does not affect if or how responses are cached.\n *\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. AngularJS comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * AngularJS will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * AngularJS will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by\n * which the attacker can trick an authenticated user into unknowingly executing actions on your\n * website. AngularJS provides a mechanism to counter XSRF. When performing XHR requests, the\n * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP\n * header (by default `X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read\n * the cookie, your server can be assured that the XHR came from JavaScript running on your\n * domain.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches the `X-XSRF-TOKEN` HTTP header, and therefore be\n * sure that only JavaScript running on your domain could have sent the request. The token must\n * be unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n * for added security.\n *\n * The header will — by default — **not** be set for cross-domain requests. This\n * prevents unauthorized servers (e.g. malicious or compromised 3rd-party APIs) from gaining\n * access to your users' XSRF tokens and exposing them to Cross Site Request Forgery. If you\n * want to, you can trust additional origins to also receive the XSRF token, by adding them\n * to {@link ng.$httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins}. This might be\n * useful, for example, if your application, served from `example.com`, needs to access your API\n * at `api.example.com`.\n * See {@link ng.$httpProvider#xsrfTrustedOrigins $httpProvider.xsrfTrustedOrigins} for\n * more details.\n *\n * <div class=\"alert alert-danger\">\n * **Warning**<br />\n * Only trusted origins that you have control over and make sure you understand the\n * implications of doing so.\n * </div>\n *\n * The name of the cookie and the header can be specified using the `xsrfCookieName` and\n * `xsrfHeaderName` properties of either `$httpProvider.defaults` at config-time,\n * `$http.defaults` at run-time, or the per-request config object.\n *\n * In order to prevent collisions in environments where multiple AngularJS apps share the\n * same domain or subdomain, we recommend that each application uses a unique cookie name.\n *\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** – `{string|TrustedObject}` – Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be serialized\n * with the `paramSerializer` and appended as GET parameters.\n * - **data** – `{string|Object}` – Data to be sent as the request message data.\n * - **headers** – `{Object}` – Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent. Functions accept a config object as an argument.\n * - **eventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest object.\n * To bind events to the XMLHttpRequest upload object, use `uploadEventHandlers`.\n * The handler will be called in the context of a `$apply` block.\n * - **uploadEventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest upload\n * object. To bind events to the XMLHttpRequest object, use `eventHandlers`.\n * The handler will be called in the context of a `$apply` block.\n * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n * - **transformRequest** –\n * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link ng.$http#overriding-the-default-transformations-per-request\n * Overriding the Default Transformations}\n * - **transformResponse** –\n * `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body, headers and status and returns its transformed (typically deserialized) version.\n * See {@link ng.$http#overriding-the-default-transformations-per-request\n * Overriding the Default Transformations}\n * - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to\n * prepare the string representation of request parameters (specified as an object).\n * If specified as string, it is interpreted as function registered with the\n * {@link $injector $injector}, which means you can create your own serializer\n * by registering it as a {@link auto.$provide#service service}.\n * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};\n * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}\n * - **cache** – `{boolean|Object}` – A boolean value or object created with\n * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response.\n * See {@link $http#caching $http Caching} for more information.\n * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n *\n * A numerical timeout or a promise returned from {@link ng.$timeout $timeout}, will set\n * the `xhrStatus` in the {@link $http#$http-returns response} to \"timeout\", and any other\n * resolved promise will set it to \"abort\", following standard XMLHttpRequest behavior.\n *\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).\n *\n * @returns {HttpPromise} A {@link ng.$q `Promise}` that will be resolved (request success)\n * or rejected (request failure) with a response object.\n *\n * The response object has these properties:\n *\n * - **data** – `{string|Object}` – The response body transformed with\n * the transform functions.\n * - **status** – `{number}` – HTTP status code of the response.\n * - **headers** – `{function([headerName])}` – Header getter function.\n * - **config** – `{Object}` – The configuration object that was used\n * to generate the request.\n * - **statusText** – `{string}` – HTTP status text of the response.\n * - **xhrStatus** – `{string}` – Status of the XMLHttpRequest\n * (`complete`, `error`, `timeout` or `abort`).\n *\n *\n * A response status code between 200 and 299 is considered a success status\n * and will result in the success callback being called. Any response status\n * code outside of that range is considered an error status and will result\n * in the error callback being called.\n * Also, status codes less than -1 are normalized to zero. -1 usually means\n * the request was aborted, e.g. using a `config.timeout`. More information\n * about the status might be available in the `xhrStatus` property.\n *\n * Note that if the response is a redirect, XMLHttpRequest will transparently\n * follow it, meaning that the outcome (success or error) will be determined\n * by the final response status code.\n *\n *\n * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n<example module=\"httpExample\" name=\"http-service\">\n<file name=\"index.html\">\n <div ng-controller=\"FetchController\">\n <select ng-model=\"method\" aria-label=\"Request method\">\n <option>GET</option>\n <option>JSONP</option>\n </select>\n <input type=\"text\" ng-model=\"url\" size=\"80\" aria-label=\"URL\" />\n <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n <button id=\"samplejsonpbtn\"\n ng-click=\"updateModel('JSONP',\n 'https://angularjs.org/greet.php?name=Super%20Hero')\">\n Sample JSONP\n </button>\n <button id=\"invalidjsonpbtn\"\n ng-click=\"updateModel('JSONP', 'https://angularjs.org/doesntexist')\">\n Invalid JSONP\n </button>\n <pre>http status code: {{status}}</pre>\n <pre>http response data: {{data}}</pre>\n </div>\n</file>\n<file name=\"script.js\">\n angular.module('httpExample', [])\n .config(['$sceDelegateProvider', function($sceDelegateProvider) {\n // We must add the JSONP endpoint that we are using to the trusted list to show that we trust it\n $sceDelegateProvider.trustedResourceUrlList([\n 'self',\n 'https://angularjs.org/**'\n ]);\n }])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n then(function(response) {\n $scope.status = response.status;\n $scope.data = response.data;\n }, function(response) {\n $scope.data = response.data || 'Request failed';\n $scope.status = response.status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n</file>\n<file name=\"http-hello.html\">\n Hello, $http!\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n</file>\n</example>\n */\n function $http(requestConfig) {\n\n if (!isObject(requestConfig)) {\n throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);\n }\n\n if (!isString($sce.valueOf(requestConfig.url))) {\n throw minErr('$http')('badreq', 'Http request configuration url must be a string or a $sce trusted object. Received: {0}', requestConfig.url);\n }\n\n var config = extend({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse,\n paramSerializer: defaults.paramSerializer,\n jsonpCallbackParam: defaults.jsonpCallbackParam\n }, requestConfig);\n\n config.headers = mergeHeaders(requestConfig);\n config.method = uppercase(config.method);\n config.paramSerializer = isString(config.paramSerializer) ?\n $injector.get(config.paramSerializer) : config.paramSerializer;\n\n $browser.$$incOutstandingRequestCount('$http');\n\n var requestInterceptors = [];\n var responseInterceptors = [];\n var promise = $q.resolve(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n requestInterceptors.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n responseInterceptors.push(interceptor.response, interceptor.responseError);\n }\n });\n\n promise = chainInterceptors(promise, requestInterceptors);\n promise = promise.then(serverRequest);\n promise = chainInterceptors(promise, responseInterceptors);\n promise = promise.finally(completeOutstandingRequest);\n\n return promise;\n\n\n function chainInterceptors(promise, interceptors) {\n for (var i = 0, ii = interceptors.length; i < ii;) {\n var thenFn = interceptors[i++];\n var rejectFn = interceptors[i++];\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n interceptors.length = 0;\n\n return promise;\n }\n\n function completeOutstandingRequest() {\n $browser.$$completeOutstandingRequest(noop, '$http');\n }\n\n function executeHeaderFns(headers, config) {\n var headerContent, processedHeaders = {};\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn(config);\n if (headerContent != null) {\n processedHeaders[header] = headerContent;\n }\n } else {\n processedHeaders[header] = headerFn;\n }\n });\n\n return processedHeaders;\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unnecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n return executeHeaderFns(reqHeaders, shallowCopy(config));\n }\n\n function serverRequest(config) {\n var headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData).then(transformResponse, transformResponse);\n }\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response);\n resp.data = transformData(response.data, response.headers, response.status,\n config.transformResponse);\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * Note that, since JSONP requests are sensitive because the response is given full access to the browser,\n * the url must be declared, via {@link $sce} as a trusted resource URL.\n * You can trust a URL by adding it to the trusted resource URL list via\n * {@link $sceDelegateProvider#trustedResourceUrlList `$sceDelegateProvider.trustedResourceUrlList`} or\n * by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}.\n *\n * You should avoid generating the URL for the JSONP request from user provided data.\n * Provide additional query parameters via `params` property of the `config` parameter, rather than\n * modifying the URL itself.\n *\n * JSONP requests must specify a callback to be used in the response from the server. This callback\n * is passed as a query parameter in the request. You must specify the name of this parameter by\n * setting the `jsonpCallbackParam` property on the request config object.\n *\n * ```\n * $http.jsonp('some/trusted/url', {jsonpCallbackParam: 'callback'})\n * ```\n *\n * You can also specify a default callback parameter name in `$http.defaults.jsonpCallbackParam`.\n * Initially this is set to `'callback'`.\n *\n * <div class=\"alert alert-danger\">\n * You can no longer use the `JSON_CALLBACK` string as a placeholder for specifying where the callback\n * parameter value should go.\n * </div>\n *\n * If you would like to customise where and how the callbacks are stored then try overriding\n * or decorating the {@link $jsonpCallbacks} service.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend({}, config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend({}, config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n reqHeaders = config.headers,\n isJsonp = lowercase(config.method) === 'jsonp',\n url = config.url;\n\n if (isJsonp) {\n // JSONP is a pretty sensitive operation where we're allowing a script to have full access to\n // our DOM and JS space. So we require that the URL satisfies SCE.RESOURCE_URL.\n url = $sce.getTrustedResourceUrl(url);\n } else if (!isString(url)) {\n // If it is not a string then the URL must be a $sce trusted object\n url = $sce.valueOf(url);\n }\n\n url = buildUrl(url, config.paramSerializer(config.params));\n\n if (isJsonp) {\n // Check the url and add the JSONP callback placeholder\n url = sanitizeJsonpCallbackParam(url, config.jsonpCallbackParam);\n }\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(/** @type {?} */ (defaults).cache)\n ? /** @type {?} */ (defaults).cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3], cachedResp[4]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK', 'complete');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsAllowedOrigin(config.url)\n ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType,\n createApplyHandlers(config.eventHandlers),\n createApplyHandlers(config.uploadEventHandlers));\n }\n\n return promise;\n\n function createApplyHandlers(eventHandlers) {\n if (eventHandlers) {\n var applyHandlers = {};\n forEach(eventHandlers, function(eventHandler, key) {\n applyHandlers[key] = function(event) {\n if (useApplyAsync) {\n $rootScope.$applyAsync(callEventHandler);\n } else if ($rootScope.$$phase) {\n callEventHandler();\n } else {\n $rootScope.$apply(callEventHandler);\n }\n\n function callEventHandler() {\n eventHandler(event);\n }\n };\n });\n return applyHandlers;\n }\n }\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText, xhrStatus) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText, xhrStatus);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText, xhrStatus) {\n //status: HTTP response status code, 0, -1 (aborted by timeout / promise)\n status = status >= -1 ? status : 0;\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText: statusText,\n xhrStatus: xhrStatus\n });\n }\n\n function resolvePromiseWithResult(result) {\n resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus);\n }\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, serializedParams) {\n if (serializedParams.length > 0) {\n url += ((url.indexOf('?') === -1) ? '?' : '&') + serializedParams;\n }\n return url;\n }\n\n function sanitizeJsonpCallbackParam(url, cbKey) {\n var parts = url.split('?');\n if (parts.length > 2) {\n // Throw if the url contains more than one `?` query indicator\n throw $httpMinErr('badjsonp', 'Illegal use more than one \"?\", in url, \"{1}\"', url);\n }\n var params = parseKeyValue(parts[1]);\n forEach(params, function(value, key) {\n if (value === 'JSON_CALLBACK') {\n // Throw if the url already contains a reference to JSON_CALLBACK\n throw $httpMinErr('badjsonp', 'Illegal use of JSON_CALLBACK in url, \"{0}\"', url);\n }\n if (key === cbKey) {\n // Throw if the callback param was already provided\n throw $httpMinErr('badjsonp', 'Illegal use of callback param, \"{0}\", in url, \"{1}\"', cbKey, url);\n }\n });\n\n // Add in the JSON_CALLBACK callback param value\n url += ((url.indexOf('?') === -1) ? '?' : '&') + cbKey + '=JSON_CALLBACK';\n\n return url;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $xhrFactory\n * @this\n *\n * @description\n * Factory function used to create XMLHttpRequest objects.\n *\n * Replace or decorate this service to create your own custom XMLHttpRequest objects.\n *\n * ```\n * angular.module('myApp', [])\n * .factory('$xhrFactory', function() {\n * return function createXhr(method, url) {\n * return new window.XMLHttpRequest({mozSystem: true});\n * };\n * });\n * ```\n *\n * @param {string} method HTTP method of the request (GET, POST, PUT, ..)\n * @param {string} url URL of the request.\n */\nfunction $xhrFactoryProvider() {\n this.$get = function() {\n return function createXhr() {\n return new window.XMLHttpRequest();\n };\n };\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $jsonpCallbacks\n * @requires $document\n * @requires $xhrFactory\n * @this\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) {\n return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) {\n url = url || $browser.url();\n\n if (lowercase(method) === 'jsonp') {\n var callbackPath = callbacks.createCallback(url);\n var jsonpDone = jsonpReq(url, callbackPath, function(status, text) {\n // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING)\n var response = (status === 200) && callbacks.getResponse(callbackPath);\n completeRequest(callback, status, response, '', text, 'complete');\n callbacks.removeCallback(callbackPath);\n });\n } else {\n\n var xhr = createXhr(method, url);\n var abortedByTimeout = false;\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n xhr.onload = function requestLoaded() {\n var statusText = xhr.statusText || '';\n\n // responseText is the old-school way of retrieving response (supported by IE9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n var response = ('response' in xhr) ? xhr.response : xhr.responseText;\n\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = xhr.status === 1223 ? 204 : xhr.status;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol === 'file' ? 404 : 0;\n }\n\n completeRequest(callback,\n status,\n response,\n xhr.getAllResponseHeaders(),\n statusText,\n 'complete');\n };\n\n var requestError = function() {\n // The response is always empty\n // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n completeRequest(callback, -1, null, null, '', 'error');\n };\n\n var requestAborted = function() {\n completeRequest(callback, -1, null, null, '', abortedByTimeout ? 'timeout' : 'abort');\n };\n\n var requestTimeout = function() {\n // The response is always empty\n // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n completeRequest(callback, -1, null, null, '', 'timeout');\n };\n\n xhr.onerror = requestError;\n xhr.ontimeout = requestTimeout;\n xhr.onabort = requestAborted;\n\n forEach(eventHandlers, function(value, key) {\n xhr.addEventListener(key, value);\n });\n\n forEach(uploadEventHandlers, function(value, key) {\n xhr.upload.addEventListener(key, value);\n });\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(isUndefined(post) ? null : post);\n }\n\n // Since we are using xhr.abort() when a request times out, we have to set a flag that\n // indicates to requestAborted if the request timed out or was aborted.\n //\n // http.timeout = numerical timeout timeout\n // http.timeout = $timeout timeout\n // http.timeout = promise abort\n // xhr.abort() abort (The xhr object is normally inaccessible, but\n // can be exposed with the xhrFactory)\n if (timeout > 0) {\n var timeoutId = $browserDefer(function() {\n timeoutRequest('timeout');\n }, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(function() {\n timeoutRequest(isDefined(timeout.$$timeoutId) ? 'timeout' : 'abort');\n });\n }\n\n function timeoutRequest(reason) {\n abortedByTimeout = reason === 'timeout';\n if (jsonpDone) {\n jsonpDone();\n }\n if (xhr) {\n xhr.abort();\n }\n }\n\n function completeRequest(callback, status, response, headersString, statusText, xhrStatus) {\n // cancel timeout and subsequent timeout promise resolution\n if (isDefined(timeoutId)) {\n $browserDefer.cancel(timeoutId);\n }\n jsonpDone = xhr = null;\n\n callback(status, response, headersString, statusText, xhrStatus);\n }\n };\n\n function jsonpReq(url, callbackPath, done) {\n url = url.replace('JSON_CALLBACK', callbackPath);\n // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = 'text/javascript';\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n script.removeEventListener('load', callback);\n script.removeEventListener('error', callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = 'unknown';\n\n if (event) {\n if (event.type === 'load' && !callbacks.wasCalled(callbackPath)) {\n event = { type: 'error' };\n }\n text = event.type;\n status = event.type === 'error' ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n script.addEventListener('load', callback);\n script.addEventListener('error', callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');\n$interpolateMinErr.throwNoconcat = function(text) {\n throw $interpolateMinErr('noconcat',\n 'Error while interpolating: {0}\\nStrict Contextual Escaping disallows ' +\n 'interpolations that concatenate multiple expressions when a trusted value is ' +\n 'required. See http://docs.angularjs.org/api/ng.$sce', text);\n};\n\n$interpolateMinErr.interr = function(text, err) {\n return $interpolateMinErr('interr', 'Can\\'t interpolate: {0}\\n{1}', text, err.toString());\n};\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n * @this\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * <div class=\"alert alert-danger\">\n * This feature is sometimes used to mix different markup languages, e.g. to wrap an AngularJS\n * template within a Python Jinja template (or any other template language). Mixing templating\n * languages is **very dangerous**. The embedding template language will not safely escape AngularJS\n * expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS)\n * security bugs!\n * </div>\n *\n * @example\n<example name=\"custom-interpolation-markup\" module=\"customInterpolationApp\">\n<file name=\"index.html\">\n<script>\n var customInterpolationApp = angular.module('customInterpolationApp', []);\n\n customInterpolationApp.config(function($interpolateProvider) {\n $interpolateProvider.startSymbol('//');\n $interpolateProvider.endSymbol('//');\n });\n\n\n customInterpolationApp.controller('DemoController', function() {\n this.label = \"This binding is brought you by // interpolation symbols.\";\n });\n</script>\n<div ng-controller=\"DemoController as demo\">\n //demo.label//\n</div>\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n</file>\n</example>\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value) {\n if (value) {\n startSymbol = value;\n return this;\n }\n return startSymbol;\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value) {\n if (value) {\n endSymbol = value;\n return this;\n }\n return endSymbol;\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n // TODO: this is the same as the constantWatchDelegate in parse.js\n function constantWatchDelegate(scope, listener, objectEquality, constantInterp) {\n var unwatch = scope.$watch(function constantInterpolateWatch(scope) {\n unwatch();\n return constantInterp(scope);\n }, listener, objectEquality);\n return unwatch;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'AngularJS'})).toEqual('Hello ANGULARJS!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'AngularJS';\n * expect(exp(context)).toEqual('Hello AngularJS!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * #### Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * <example name=\"interpolation\">\n * <file name=\"index.html\">\n * <div ng-init=\"username='A user'\">\n * <p ng-init=\"apptitle='Escaping demo'\">{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n * </p>\n * <p><strong>{{username}}</strong> attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.</p>\n * <p>Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.</p>\n * </div>\n * </file>\n * </example>\n *\n * @knownIssue\n * It is currently not possible for an interpolated expression to contain the interpolation end\n * symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e.\n * an interpolated expression consisting of a single-quote (`'`) and the `' }}` string.\n *\n * @knownIssue\n * All directives and components must use the standard `{{` `}}` interpolation symbols\n * in their templates. If you change the application interpolation symbols the {@link $compile}\n * service will attempt to denormalize the standard symbols to the custom symbols.\n * The denormalization process is not clever enough to know not to replace instances of the standard\n * symbols where they would not normally be treated as interpolation symbols. For example in the following\n * code snippet the closing braces of the literal object will get incorrectly denormalized:\n *\n * ```\n * <div data-context='{\"context\":{\"id\":3,\"type\":\"page\"}}\">\n * ```\n *\n * The workaround is to ensure that such instances are separated by whitespace:\n * ```\n * <div data-context='{\"context\":{\"id\":3,\"type\":\"page\"} }\">\n * ```\n *\n * See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information.\n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n var contextAllowsConcatenation = trustedContext === $sce.URL || trustedContext === $sce.MEDIA_URL;\n\n // Provide a quick exit and simplified result function for text with no interpolation\n if (!text.length || text.indexOf(startSymbol) === -1) {\n if (mustHaveExpression) return;\n\n var unescapedText = unescapeText(text);\n if (contextAllowsConcatenation) {\n unescapedText = $sce.getTrusted(trustedContext, unescapedText);\n }\n var constantInterp = valueFn(unescapedText);\n constantInterp.exp = text;\n constantInterp.expressions = [];\n constantInterp.$$watchDelegate = constantWatchDelegate;\n\n return constantInterp;\n }\n\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns,\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [],\n singleExpression;\n\n\n while (index < textLength) {\n if (((startIndex = text.indexOf(startSymbol, index)) !== -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) !== -1)) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push(''); // Placeholder that will get replaced with the evaluated expression.\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n singleExpression = concat.length === 1 && expressionPositions.length === 1;\n // Intercept expression if we need to stringify concatenated inputs, which may be SCE trusted\n // objects rather than simple strings\n // (we don't modify the expression if the input consists of only a single trusted input)\n var interceptor = contextAllowsConcatenation && singleExpression ? undefined : parseStringifyInterceptor;\n parseFns = expressions.map(function(exp) { return $parse(exp, interceptor); });\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for some $sce-managed secure contexts (RESOURCE_URLs mostly),\n // we ensure that the value that's used is assigned or constructed by some JS code somewhere\n // that is more testable or make it obvious that you bound the value to some user controlled\n // value. This helps reduce the load when auditing for XSS issues.\n\n // Note that URL and MEDIA_URL $sce contexts do not need this, since `$sce` can sanitize the values\n // passed to it. In that case, `$sce.getTrusted` will be called on either the single expression\n // or on the overall concatenated string (losing trusted types used in the mix, by design).\n // Both these methods will sanitize plain strings. Also, HTML could be included, but since it's\n // only used in srcdoc attributes, this would not be very useful.\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for (var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n\n if (contextAllowsConcatenation) {\n // If `singleExpression` then `concat[0]` might be a \"trusted\" value or `null`, rather than a string\n return $sce.getTrusted(trustedContext, singleExpression ? concat[0] : concat.join(''));\n } else if (trustedContext && concat.length > 1) {\n // This context does not allow more than one part, e.g. expr + string or exp + exp.\n $interpolateMinErr.throwNoconcat(text);\n }\n // In an unprivileged context or only one part: just concatenate and return.\n return concat.join('');\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch (err) {\n $exceptionHandler($interpolateMinErr.interr(text, err));\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function(scope, listener) {\n var lastValue;\n return scope.$watchGroup(parseFns, /** @this */ function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n lastValue = currValue;\n });\n }\n });\n }\n\n function parseStringifyInterceptor(value) {\n try {\n // In concatenable contexts, getTrusted comes at the end, to avoid sanitizing individual\n // parts of a full URL. We don't care about losing the trustedness here.\n // In non-concatenable contexts, where there is only one expression, this interceptor is\n // not applied to the expression.\n value = (trustedContext && !contextAllowsConcatenation) ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n return allOrNothing && !isDefined(value) ? value : stringify(value);\n } catch (err) {\n $exceptionHandler($interpolateMinErr.interr(text, err));\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nvar $intervalMinErr = minErr('$interval');\n\n/** @this */\nfunction $IntervalProvider() {\n this.$get = ['$$intervalFactory', '$window',\n function($$intervalFactory, $window) {\n var intervals = {};\n var setIntervalFn = function(tick, delay, deferred) {\n var id = $window.setInterval(tick, delay);\n intervals[id] = deferred;\n return id;\n };\n var clearIntervalFn = function(id) {\n $window.clearInterval(id);\n delete intervals[id];\n };\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * AngularJS's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n * </div>\n *\n * @param {function()} fn A function that should be called repeatedly. If no additional arguments\n * are passed (see below), the function is called with the current iteration count.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @param {...*=} Pass additional parameters to the executed function.\n * @returns {promise} A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete.\n *\n * @example\n * <example module=\"intervalExample\" name=\"interval-service\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('intervalExample', [])\n * .controller('ExampleController', ['$scope', '$interval',\n * function($scope, $interval) {\n * $scope.format = 'M/d/yy h:mm:ss a';\n * $scope.blood_1 = 100;\n * $scope.blood_2 = 120;\n *\n * var stop;\n * $scope.fight = function() {\n * // Don't start a new fight if we are already fighting\n * if ( angular.isDefined(stop) ) return;\n *\n * stop = $interval(function() {\n * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n * $scope.blood_1 = $scope.blood_1 - 3;\n * $scope.blood_2 = $scope.blood_2 - 4;\n * } else {\n * $scope.stopFight();\n * }\n * }, 100);\n * };\n *\n * $scope.stopFight = function() {\n * if (angular.isDefined(stop)) {\n * $interval.cancel(stop);\n * stop = undefined;\n * }\n * };\n *\n * $scope.resetFight = function() {\n * $scope.blood_1 = 100;\n * $scope.blood_2 = 120;\n * };\n *\n * $scope.$on('$destroy', function() {\n * // Make sure that the interval is destroyed too\n * $scope.stopFight();\n * });\n * }])\n * // Register the 'myCurrentTime' directive factory method.\n * // We inject $interval and dateFilter service since the factory method is DI.\n * .directive('myCurrentTime', ['$interval', 'dateFilter',\n * function($interval, dateFilter) {\n * // return the directive link function. (compile function not needed)\n * return function(scope, element, attrs) {\n * var format, // date format\n * stopTime; // so that we can cancel the time updates\n *\n * // used to update the UI\n * function updateTime() {\n * element.text(dateFilter(new Date(), format));\n * }\n *\n * // watch the expression, and update the UI on change.\n * scope.$watch(attrs.myCurrentTime, function(value) {\n * format = value;\n * updateTime();\n * });\n *\n * stopTime = $interval(updateTime, 1000);\n *\n * // listen on DOM destroy (removal) event, and cancel the next UI update\n * // to prevent updating time after the DOM element was removed.\n * element.on('$destroy', function() {\n * $interval.cancel(stopTime);\n * });\n * }\n * }]);\n * </script>\n *\n * <div>\n * <div ng-controller=\"ExampleController\">\n * <label>Date format: <input ng-model=\"format\"></label> <hr/>\n * Current time is: <span my-current-time=\"format\"></span>\n * <hr/>\n * Blood 1 : <font color='red'>{{blood_1}}</font>\n * Blood 2 : <font color='red'>{{blood_2}}</font>\n * <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n * <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n * <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n * </div>\n * </div>\n *\n * </file>\n * </example>\n */\n var interval = $$intervalFactory(setIntervalFn, clearIntervalFn);\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {Promise=} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (!promise) return false;\n\n if (!promise.hasOwnProperty('$$intervalId')) {\n throw $intervalMinErr('badprom',\n '`$interval.cancel()` called with a promise that was not generated by `$interval()`.');\n }\n\n if (!intervals.hasOwnProperty(promise.$$intervalId)) return false;\n\n var id = promise.$$intervalId;\n var deferred = intervals[id];\n\n // Interval cancels should not report an unhandled promise.\n markQExceptionHandled(deferred.promise);\n deferred.reject('canceled');\n clearIntervalFn(id);\n\n return true;\n };\n\n return interval;\n }];\n}\n\n/** @this */\nfunction $$IntervalFactoryProvider() {\n this.$get = ['$browser', '$q', '$$q', '$rootScope',\n function($browser, $q, $$q, $rootScope) {\n return function intervalFactory(setIntervalFn, clearIntervalFn) {\n return function intervalFn(fn, delay, count, invokeApply) {\n var hasParams = arguments.length > 4,\n args = hasParams ? sliceArgs(arguments, 4) : [],\n iteration = 0,\n skipApply = isDefined(invokeApply) && !invokeApply,\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n function callback() {\n if (!hasParams) {\n fn(iteration);\n } else {\n fn.apply(null, args);\n }\n }\n\n function tick() {\n if (skipApply) {\n $browser.defer(callback);\n } else {\n $rootScope.$evalAsync(callback);\n }\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearIntervalFn(promise.$$intervalId);\n }\n\n if (!skipApply) $rootScope.$apply();\n }\n\n promise.$$intervalId = setIntervalFn(tick, delay, deferred, skipApply);\n\n return promise;\n };\n };\n }];\n}\n\n/**\n * @ngdoc service\n * @name $jsonpCallbacks\n * @requires $window\n * @description\n * This service handles the lifecycle of callbacks to handle JSONP requests.\n * Override this service if you wish to customise where the callbacks are stored and\n * how they vary compared to the requested url.\n */\nvar $jsonpCallbacksProvider = /** @this */ function() {\n this.$get = function() {\n var callbacks = angular.callbacks;\n var callbackMap = {};\n\n function createCallback(callbackId) {\n var callback = function(data) {\n callback.data = data;\n callback.called = true;\n };\n callback.id = callbackId;\n return callback;\n }\n\n return {\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#createCallback\n * @param {string} url the url of the JSONP request\n * @returns {string} the callback path to send to the server as part of the JSONP request\n * @description\n * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback\n * to pass to the server, which will be used to call the callback with its payload in the JSONP response.\n */\n createCallback: function(url) {\n var callbackId = '_' + (callbacks.$$counter++).toString(36);\n var callbackPath = 'angular.callbacks.' + callbackId;\n var callback = createCallback(callbackId);\n callbackMap[callbackPath] = callbacks[callbackId] = callback;\n return callbackPath;\n },\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#wasCalled\n * @param {string} callbackPath the path to the callback that was sent in the JSONP request\n * @returns {boolean} whether the callback has been called, as a result of the JSONP response\n * @description\n * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the\n * callback that was passed in the request.\n */\n wasCalled: function(callbackPath) {\n return callbackMap[callbackPath].called;\n },\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#getResponse\n * @param {string} callbackPath the path to the callback that was sent in the JSONP request\n * @returns {*} the data received from the response via the registered callback\n * @description\n * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback\n * in the JSONP response.\n */\n getResponse: function(callbackPath) {\n return callbackMap[callbackPath].data;\n },\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#removeCallback\n * @param {string} callbackPath the path to the callback that was sent in the JSONP request\n * @description\n * {@link $httpBackend} calls this method to remove the callback after the JSONP request has\n * completed or timed-out.\n */\n removeCallback: function(callbackPath) {\n var callback = callbackMap[callbackPath];\n delete callbacks[callback.id];\n delete callbackMap[callbackPath];\n }\n };\n };\n};\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various AngularJS components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\n\n/* global stripHash: true */\n\nvar PATH_MATCH = /^([^?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n // decode forward slashes to prevent them from being double encoded\n segments[i] = encodeUriSegment(segments[i].replace(/%2F/g, '/'));\n }\n\n return segments.join('/');\n}\n\nfunction decodePath(path, html5Mode) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = decodeURIComponent(segments[i]);\n if (html5Mode) {\n // encode forward slashes to prevent them from being mistaken for path separators\n segments[i] = segments[i].replace(/\\//g, '%2F');\n }\n }\n\n return segments.join('/');\n}\n\nfunction normalizePath(pathValue, searchValue, hashValue) {\n var search = toKeyValue(searchValue),\n hash = hashValue ? '#' + encodeUriSegment(hashValue) : '',\n path = encodePath(pathValue);\n\n return path + (search ? '?' + search : '') + hash;\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj) {\n var parsedUrl = urlResolve(absoluteUrl);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\nvar DOUBLE_SLASH_REGEX = /^\\s*[\\\\/]{2,}/;\nfunction parseAppUrl(url, locationObj, html5Mode) {\n\n if (DOUBLE_SLASH_REGEX.test(url)) {\n throw $locationMinErr('badpath', 'Invalid url \"{0}\".', url);\n }\n\n var prefixed = (url.charAt(0) !== '/');\n if (prefixed) {\n url = '/' + url;\n }\n var match = urlResolve(url);\n var path = prefixed && match.pathname.charAt(0) === '/' ? match.pathname.substring(1) : match.pathname;\n locationObj.$$path = decodePath(path, html5Mode);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) !== '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\nfunction startsWith(str, search) {\n return str.slice(0, search.length) === search;\n}\n\n/**\n *\n * @param {string} base\n * @param {string} url\n * @returns {string} returns text from `url` after `base` or `undefined` if it does not begin with\n * the expected string.\n */\nfunction stripBaseUrl(base, url) {\n if (startsWith(url, base)) {\n return url.substr(base.length);\n }\n}\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index === -1 ? url : url.substr(0, index);\n}\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents a URL\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} basePrefix URL path prefix\n */\nfunction LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n parseAbsoluteUrl(appBase, this);\n\n\n /**\n * Parse given HTML5 (regular) URL string into properties\n * @param {string} url HTML5 URL\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = stripBaseUrl(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this, true);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n this.$$normalizeUrl = function(url) {\n return appBaseNoFile + url.substr(1); // first char is always '/'\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n\n if (isDefined(appUrl = stripBaseUrl(appBase, url))) {\n prevAppUrl = appUrl;\n if (basePrefix && isDefined(appUrl = stripBaseUrl(basePrefix, appUrl))) {\n rewrittenUrl = appBaseNoFile + (stripBaseUrl('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if (isDefined(appUrl = stripBaseUrl(appBaseNoFile, url))) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents URL\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {\n\n parseAbsoluteUrl(appBase, this);\n\n\n /**\n * Parse given hashbang URL into properties\n * @param {string} url Hashbang URL\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = stripBaseUrl(appBase, url) || stripBaseUrl(appBaseNoFile, url);\n var withoutHashUrl;\n\n if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {\n\n // The rest of the URL starts with a hash so we have\n // got either a hashbang path or a plain hash fragment\n withoutHashUrl = stripBaseUrl(hashPrefix, withoutBaseUrl);\n if (isUndefined(withoutHashUrl)) {\n // There was no hashbang prefix so we just have a hash fragment\n withoutHashUrl = withoutBaseUrl;\n }\n\n } else {\n // There was no hashbang path nor hash fragment:\n // If we are in HTML5 mode we use what is left as the path;\n // Otherwise we ignore what is left\n if (this.$$html5) {\n withoutHashUrl = withoutBaseUrl;\n } else {\n withoutHashUrl = '';\n if (isUndefined(withoutBaseUrl)) {\n appBase = url;\n /** @type {?} */ (this).replace();\n }\n }\n }\n\n parseAppUrl(withoutHashUrl, this, false);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of AngularJS, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName(path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (startsWith(url, base)) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n this.$$normalizeUrl = function(url) {\n return appBase + (url ? hashPrefix + url : '');\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (stripHash(appBase) === stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents URL\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if (appBase === stripHash(url)) {\n rewrittenUrl = url;\n } else if ((appUrl = stripBaseUrl(appBaseNoFile, url))) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if (appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$normalizeUrl = function(url) {\n // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'\n return appBase + hashPrefix + url;\n };\n}\n\n\nvar locationPrototype = {\n\n /**\n * Ensure absolute URL is initialized.\n * @private\n */\n $$absUrl:'',\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing?\n * @private\n */\n $$replace: false,\n\n /**\n * Compose url and update `url` and `absUrl` property\n * @private\n */\n $$compose: function() {\n this.$$url = normalizePath(this.$$path, this.$$search, this.$$hash);\n this.$$absUrl = this.$$normalizeUrl(this.$$url);\n this.$$urlUpdatedByLocation = true;\n },\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full URL representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var absUrl = $location.absUrl();\n * // => \"http://example.com/#/some/path?foo=bar&baz=xoxo\"\n * ```\n *\n * @return {string} full URL\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return URL (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var url = $location.url();\n * // => \"/some/path?foo=bar&baz=xoxo\"\n * ```\n *\n * @param {string=} url New URL without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url)) {\n return this.$$url;\n }\n\n var match = PATH_MATCH.exec(url);\n if (match[1] || url === '') this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1] || url === '') this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current URL.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var protocol = $location.protocol();\n * // => \"http\"\n * ```\n *\n * @return {string} protocol of current URL\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current URL.\n *\n * Note: compared to the non-AngularJS version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var host = $location.host();\n * // => \"example.com\"\n *\n * // given URL http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo\n * host = $location.host();\n * // => \"example.com\"\n * host = location.host;\n * // => \"example.com:8080\"\n * ```\n *\n * @return {string} host of current URL.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current URL.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var port = $location.port();\n * // => 80\n * ```\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current URL when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var path = $location.path();\n * // => \"/some/path\"\n * ```\n *\n * @param {(string|number)=} path New path\n * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path !== null ? path.toString() : '';\n return path.charAt(0) === '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current URL when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // $location.search() => {foo: 'yipee', baz: 'xoxo'}\n * ```\n *\n * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the URL.\n *\n * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n search = copy(search, {});\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Returns the hash fragment when called without any parameters.\n *\n * Changes the hash fragment when called with a parameter and returns `$location`.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue\n * var hash = $location.hash();\n * // => \"hashValue\"\n * ```\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash !== null ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during the current `$digest` will replace the current history\n * record, instead of adding a new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nforEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {\n Location.prototype = Object.create(locationPrototype);\n\n /**\n * @ngdoc method\n * @name $location#state\n *\n * @description\n * This method is getter / setter.\n *\n * Return the history state object when called without any parameter.\n *\n * Change the history state object when called with one parameter and return `$location`.\n * The state object is later passed to `pushState` or `replaceState`.\n *\n * NOTE: This method is supported only in HTML5 mode and only in browsers supporting\n * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support\n * older browsers (like IE9 or Android < 4.0), don't use this method.\n *\n * @param {object=} state State object for pushState or replaceState\n * @return {object} state\n */\n Location.prototype.state = function(state) {\n if (!arguments.length) {\n return this.$$state;\n }\n\n if (Location !== LocationHtml5Url || !this.$$html5) {\n throw $locationMinErr('nostate', 'History API state support is available only ' +\n 'in HTML5 mode and only in browsers supporting HTML5 History API');\n }\n // The user might modify `stateObject` after invoking `$location.state(stateObject)`\n // but we're changing the $$state reference to $browser.state() during the $digest\n // so the modification window is narrow.\n this.$$state = isUndefined(state) ? null : state;\n this.$$urlUpdatedByLocation = true;\n\n return this;\n };\n});\n\n\nfunction locationGetter(property) {\n return /** @this */ function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return /** @this */ function(value) {\n if (isUndefined(value)) {\n return this[property];\n }\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @this\n *\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider() {\n var hashPrefix = '!',\n html5Mode = {\n enabled: false,\n requireBase: true,\n rewriteLinks: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * The default value for the prefix is `'!'`.\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported\n * properties:\n * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to\n * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not\n * support `pushState`.\n * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies\n * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are\n * true, and a base tag is not present, an error will be thrown when `$location` is injected.\n * See the {@link guide/$location $location guide for more information}\n * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled,\n * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will\n * only happen on links with an attribute that matches the given string. For example, if set\n * to `'internal-link'`, then the URL will only be rewritten for `<a internal-link>` links.\n * Note that [attribute name normalization](guide/directive#normalization) does not apply\n * here, so `'internalLink'` will **not** match `'internal-link'`.\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n\n if (isBoolean(mode.enabled)) {\n html5Mode.enabled = mode.enabled;\n }\n\n if (isBoolean(mode.requireBase)) {\n html5Mode.requireBase = mode.requireBase;\n }\n\n if (isBoolean(mode.rewriteLinks) || isString(mode.rewriteLinks)) {\n html5Mode.rewriteLinks = mode.rewriteLinks;\n }\n\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change.\n *\n * This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n * the browser supports the HTML5 History API.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n * @param {string=} newState New history state object\n * @param {string=} oldState History state object that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n * the browser supports the HTML5 History API.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n * @param {string=} newState New history state object\n * @param {string=} oldState History state object that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',\n function($rootScope, $browser, $sniffer, $rootElement, $window) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n '$location in HTML5 mode requires a <base> tag to be present!');\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n var appBaseNoFile = stripFile(appBase);\n\n $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n $location.$$state = $browser.state();\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n // Determine if two URLs are equal despite potentially having different encoding/normalizing\n // such as $location.absUrl() vs $browser.url()\n // See https://github.com/angular/angular.js/issues/16592\n function urlsEqual(a, b) {\n return a === b || urlResolve(a).href === urlResolve(b).href;\n }\n\n function setBrowserUrlWithFallback(url, replace, state) {\n var oldUrl = $location.url();\n var oldState = $location.$$state;\n try {\n $browser.url(url, replace, state);\n\n // Make sure $location.state() returns referentially identical (not just deeply equal)\n // state object; this makes possible quick checking if the state changed in the digest\n // loop. Checking deep equality would be too expensive.\n $location.$$state = $browser.state();\n } catch (e) {\n // Restore old values if pushState fails\n $location.url(oldUrl);\n $location.$$state = oldState;\n\n throw e;\n }\n }\n\n $rootElement.on('click', function(event) {\n var rewriteLinks = html5Mode.rewriteLinks;\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (!rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which === 2 || event.button === 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n if (isString(rewriteLinks) && isUndefined(elm.attr(rewriteLinks))) return;\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n // We do a preventDefault for all urls that are part of the AngularJS application,\n // in html5mode and also without, so that we are able to abort navigation without\n // getting double entries in the location history.\n event.preventDefault();\n // update location manually\n if ($location.absUrl() !== $browser.url()) {\n $rootScope.$apply();\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if ($location.absUrl() !== initialUrl) {\n $browser.url($location.absUrl(), true);\n }\n\n var initializing = true;\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl, newState) {\n\n if (!startsWith(newUrl, appBaseNoFile)) {\n // If we are navigating outside of the app then force a reload\n $window.location.href = newUrl;\n return;\n }\n\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n var oldState = $location.$$state;\n var defaultPrevented;\n $location.$$parse(newUrl);\n $location.$$state = newState;\n\n defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n newState, oldState).defaultPrevented;\n\n // if the location was changed by a `$locationChangeStart` handler then stop\n // processing this location change\n if ($location.absUrl() !== newUrl) return;\n\n if (defaultPrevented) {\n $location.$$parse(oldUrl);\n $location.$$state = oldState;\n setBrowserUrlWithFallback(oldUrl, false, oldState);\n } else {\n initializing = false;\n afterLocationChange(oldUrl, oldState);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n });\n\n // update browser\n $rootScope.$watch(function $locationWatch() {\n if (initializing || $location.$$urlUpdatedByLocation) {\n $location.$$urlUpdatedByLocation = false;\n\n var oldUrl = $browser.url();\n var newUrl = $location.absUrl();\n var oldState = $browser.state();\n var currentReplace = $location.$$replace;\n var urlOrStateChanged = !urlsEqual(oldUrl, newUrl) ||\n ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);\n\n if (initializing || urlOrStateChanged) {\n initializing = false;\n\n $rootScope.$evalAsync(function() {\n var newUrl = $location.absUrl();\n var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n $location.$$state, oldState).defaultPrevented;\n\n // if the location was changed by a `$locationChangeStart` handler then stop\n // processing this location change\n if ($location.absUrl() !== newUrl) return;\n\n if (defaultPrevented) {\n $location.$$parse(oldUrl);\n $location.$$state = oldState;\n } else {\n if (urlOrStateChanged) {\n setBrowserUrlWithFallback(newUrl, currentReplace,\n oldState === $location.$$state ? null : $location.$$state);\n }\n afterLocationChange(oldUrl, oldState);\n }\n });\n }\n }\n\n $location.$$replace = false;\n\n // we don't need to return anything because $evalAsync will make the digest loop dirty when\n // there is a change\n });\n\n return $location;\n\n function afterLocationChange(oldUrl, oldState) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,\n $location.$$state, oldState);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * To reveal the location of the calls to `$log` in the JavaScript console,\n * you can \"blackbox\" the AngularJS source in your browser:\n *\n * [Mozilla description of blackboxing](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Black_box_a_source).\n * [Chrome description of blackboxing](https://developer.chrome.com/devtools/docs/blackboxing).\n *\n * Note: Not all browsers support blackboxing.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n <example module=\"logExample\" name=\"log-service\">\n <file name=\"script.js\">\n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n </file>\n <file name=\"index.html\">\n <div ng-controller=\"LogController\">\n <p>Reload this page with open console, enter text and hit the log button...</p>\n <label>Message:\n <input type=\"text\" ng-model=\"message\" /></label>\n <button ng-click=\"$log.log(message)\">log</button>\n <button ng-click=\"$log.warn(message)\">warn</button>\n <button ng-click=\"$log.info(message)\">info</button>\n <button ng-click=\"$log.error(message)\">error</button>\n <button ng-click=\"$log.debug(message)\">debug</button>\n </div>\n </file>\n </example>\n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @this\n *\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider() {\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window) {\n // Support: IE 9-11, Edge 12-14+\n // IE/Edge display errors in such a way that it requires the user to click in 4 places\n // to see the stack trace. There is no way to feature-detect it so there's a chance\n // of the user agent sniffing to go wrong but since it's only about logging, this shouldn't\n // break apps. Other browsers display errors in a sensible way and some of them map stack\n // traces along source maps if available so it makes sense to let browsers display it\n // as they want.\n var formatStackTrace = msie || /\\bEdge\\//.test($window.navigator && $window.navigator.userAgent);\n\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function() {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n })()\n };\n\n function formatError(arg) {\n if (isError(arg)) {\n if (arg.stack && formatStackTrace) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop;\n\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n // Support: IE 9 only\n // console methods don't inherit from Function.prototype in IE 9 so we can't\n // call `logFn.apply(console, args)` directly.\n return Function.prototype.apply.call(logFn, console, args);\n };\n }\n }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $parseMinErr = minErr('$parse');\n\nvar objectValueOf = {}.constructor.prototype.valueOf;\n\n// Sandboxing AngularJS Expressions\n// ------------------------------\n// AngularJS expressions are no longer sandboxed. So it is now even easier to access arbitrary JS code by\n// various means such as obtaining a reference to native JS functions like the Function constructor.\n//\n// As an example, consider the following AngularJS expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// It is important to realize that if you create an expression from a string that contains user provided\n// content then it is possible that your application contains a security vulnerability to an XSS style attack.\n//\n// See https://docs.angularjs.org/guide/security\n\n\nfunction getStringValue(name) {\n // Property names must be strings. This means that non-string objects cannot be used\n // as keys in an object. Any non-string object, including a number, is typecasted\n // into a string via the toString method.\n // -- MDN, https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names\n //\n // So, to ensure that we are checking the same `name` that JavaScript would use, we cast it\n // to a string. It's not always possible. If `name` is an object and its `toString` method is\n // 'broken' (doesn't return a string, isn't a function, etc.), an error will be thrown:\n //\n // TypeError: Cannot convert object to primitive value\n //\n // For performance reasons, we don't catch this error here and allow it to propagate up the call\n // stack. Note that you'll get the same error in JavaScript if you try to access a property using\n // such a 'broken' object as a key.\n return name + '';\n}\n\n\nvar OPERATORS = createMap();\nforEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });\nvar ESCAPE = {'n':'\\n', 'f':'\\f', 'r':'\\r', 't':'\\t', 'v':'\\v', '\\'':'\\'', '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function Lexer(options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function(text) {\n this.text = text;\n this.index = 0;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n if (ch === '\"' || ch === '\\'') {\n this.readString(ch);\n } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdentifierStart(this.peekMultichar())) {\n this.readIdent();\n } else if (this.is(ch, '(){}[].,;:?')) {\n this.tokens.push({index: this.index, text: ch});\n this.index++;\n } else if (this.isWhitespace(ch)) {\n this.index++;\n } else {\n var ch2 = ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var op1 = OPERATORS[ch];\n var op2 = OPERATORS[ch2];\n var op3 = OPERATORS[ch3];\n if (op1 || op2 || op3) {\n var token = op3 ? ch3 : (op2 ? ch2 : ch);\n this.tokens.push({index: this.index, text: token, operator: true});\n this.index += token.length;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(ch, chars) {\n return chars.indexOf(ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9') && typeof ch === 'string';\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdentifierStart: function(ch) {\n return this.options.isIdentifierStart ?\n this.options.isIdentifierStart(ch, this.codePointAt(ch)) :\n this.isValidIdentifierStart(ch);\n },\n\n isValidIdentifierStart: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isIdentifierContinue: function(ch) {\n return this.options.isIdentifierContinue ?\n this.options.isIdentifierContinue(ch, this.codePointAt(ch)) :\n this.isValidIdentifierContinue(ch);\n },\n\n isValidIdentifierContinue: function(ch, cp) {\n return this.isValidIdentifierStart(ch, cp) || this.isNumber(ch);\n },\n\n codePointAt: function(ch) {\n if (ch.length === 1) return ch.charCodeAt(0);\n // eslint-disable-next-line no-bitwise\n return (ch.charCodeAt(0) << 10) + ch.charCodeAt(1) - 0x35FDC00;\n },\n\n peekMultichar: function() {\n var ch = this.text.charAt(this.index);\n var peek = this.peek();\n if (!peek) {\n return ch;\n }\n var cp1 = ch.charCodeAt(0);\n var cp2 = peek.charCodeAt(0);\n if (cp1 >= 0xD800 && cp1 <= 0xDBFF && cp2 >= 0xDC00 && cp2 <= 0xDFFF) {\n return ch + peek;\n }\n return ch;\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch === '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch === 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) === 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) === 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n value: Number(number)\n });\n },\n\n readIdent: function() {\n var start = this.index;\n this.index += this.peekMultichar().length;\n while (this.index < this.text.length) {\n var ch = this.peekMultichar();\n if (!this.isIdentifierContinue(ch)) {\n break;\n }\n this.index += ch.length;\n }\n this.tokens.push({\n index: start,\n text: this.text.slice(start, this.index),\n identifier: true\n });\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i)) {\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n }\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n constant: true,\n value: string\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\nvar AST = function AST(lexer, options) {\n this.lexer = lexer;\n this.options = options;\n};\n\nAST.Program = 'Program';\nAST.ExpressionStatement = 'ExpressionStatement';\nAST.AssignmentExpression = 'AssignmentExpression';\nAST.ConditionalExpression = 'ConditionalExpression';\nAST.LogicalExpression = 'LogicalExpression';\nAST.BinaryExpression = 'BinaryExpression';\nAST.UnaryExpression = 'UnaryExpression';\nAST.CallExpression = 'CallExpression';\nAST.MemberExpression = 'MemberExpression';\nAST.Identifier = 'Identifier';\nAST.Literal = 'Literal';\nAST.ArrayExpression = 'ArrayExpression';\nAST.Property = 'Property';\nAST.ObjectExpression = 'ObjectExpression';\nAST.ThisExpression = 'ThisExpression';\nAST.LocalsExpression = 'LocalsExpression';\n\n// Internal use only\nAST.NGValueParameter = 'NGValueParameter';\n\nAST.prototype = {\n ast: function(text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.program();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n return value;\n },\n\n program: function() {\n var body = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n body.push(this.expressionStatement());\n if (!this.expect(';')) {\n return { type: AST.Program, body: body};\n }\n }\n },\n\n expressionStatement: function() {\n return { type: AST.ExpressionStatement, expression: this.filterChain() };\n },\n\n filterChain: function() {\n var left = this.expression();\n while (this.expect('|')) {\n left = this.filter(left);\n }\n return left;\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var result = this.ternary();\n if (this.expect('=')) {\n if (!isAssignable(result)) {\n throw $parseMinErr('lval', 'Trying to assign a value to a non l-value');\n }\n\n result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};\n }\n return result;\n },\n\n ternary: function() {\n var test = this.logicalOR();\n var alternate;\n var consequent;\n if (this.expect('?')) {\n alternate = this.expression();\n if (this.consume(':')) {\n consequent = this.expression();\n return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};\n }\n }\n return test;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n while (this.expect('||')) {\n left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n while (this.expect('&&')) {\n left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n while ((token = this.expect('==','!=','===','!=='))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n while ((token = this.expect('<', '>', '<=', '>='))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };\n }\n return left;\n },\n\n unary: function() {\n var token;\n if ((token = this.expect('+', '-', '!'))) {\n return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };\n } else {\n return this.primary();\n }\n },\n\n primary: function() {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else if (this.selfReferential.hasOwnProperty(this.peek().text)) {\n primary = copy(this.selfReferential[this.consume().text]);\n } else if (this.options.literals.hasOwnProperty(this.peek().text)) {\n primary = { type: AST.Literal, value: this.options.literals[this.consume().text]};\n } else if (this.peek().identifier) {\n primary = this.identifier();\n } else if (this.peek().constant) {\n primary = this.constant();\n } else {\n this.throwError('not a primary expression', this.peek());\n }\n\n var next;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };\n this.consume(')');\n } else if (next.text === '[') {\n primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };\n this.consume(']');\n } else if (next.text === '.') {\n primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n filter: function(baseExpression) {\n var args = [baseExpression];\n var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};\n\n while (this.expect(':')) {\n args.push(this.expression());\n }\n\n return result;\n },\n\n parseArguments: function() {\n var args = [];\n if (this.peekToken().text !== ')') {\n do {\n args.push(this.filterChain());\n } while (this.expect(','));\n }\n return args;\n },\n\n identifier: function() {\n var token = this.consume();\n if (!token.identifier) {\n this.throwError('is not a valid identifier', token);\n }\n return { type: AST.Identifier, name: token.text };\n },\n\n constant: function() {\n // TODO check that it is a constant\n return { type: AST.Literal, value: this.consume().value };\n },\n\n arrayDeclaration: function() {\n var elements = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n elements.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(']');\n\n return { type: AST.ArrayExpression, elements: elements };\n },\n\n object: function() {\n var properties = [], property;\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n property = {type: AST.Property, kind: 'init'};\n if (this.peek().constant) {\n property.key = this.constant();\n property.computed = false;\n this.consume(':');\n property.value = this.expression();\n } else if (this.peek().identifier) {\n property.key = this.identifier();\n property.computed = false;\n if (this.peek(':')) {\n this.consume(':');\n property.value = this.expression();\n } else {\n property.value = property.key;\n }\n } else if (this.peek('[')) {\n this.consume('[');\n property.key = this.expression();\n this.consume(']');\n property.computed = true;\n this.consume(':');\n property.value = this.expression();\n } else {\n this.throwError('invalid key', this.peek());\n }\n properties.push(property);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return {type: AST.ObjectExpression, properties: properties };\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n consume: function(e1) {\n if (this.tokens.length === 0) {\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n }\n\n var token = this.expect(e1);\n if (!token) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n return token;\n },\n\n peekToken: function() {\n if (this.tokens.length === 0) {\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n }\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n return this.peekAhead(0, e1, e2, e3, e4);\n },\n\n peekAhead: function(i, e1, e2, e3, e4) {\n if (this.tokens.length > i) {\n var token = this.tokens[i];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4) {\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n selfReferential: {\n 'this': {type: AST.ThisExpression },\n '$locals': {type: AST.LocalsExpression }\n }\n};\n\nfunction ifDefined(v, d) {\n return typeof v !== 'undefined' ? v : d;\n}\n\nfunction plusFn(l, r) {\n if (typeof l === 'undefined') return r;\n if (typeof r === 'undefined') return l;\n return l + r;\n}\n\nfunction isStateless($filter, filterName) {\n var fn = $filter(filterName);\n return !fn.$stateful;\n}\n\nvar PURITY_ABSOLUTE = 1;\nvar PURITY_RELATIVE = 2;\n\n// Detect nodes which could depend on non-shallow state of objects\nfunction isPure(node, parentIsPure) {\n switch (node.type) {\n // Computed members might invoke a stateful toString()\n case AST.MemberExpression:\n if (node.computed) {\n return false;\n }\n break;\n\n // Unary always convert to primative\n case AST.UnaryExpression:\n return PURITY_ABSOLUTE;\n\n // The binary + operator can invoke a stateful toString().\n case AST.BinaryExpression:\n return node.operator !== '+' ? PURITY_ABSOLUTE : false;\n\n // Functions / filters probably read state from within objects\n case AST.CallExpression:\n return false;\n }\n\n return (undefined === parentIsPure) ? PURITY_RELATIVE : parentIsPure;\n}\n\nfunction findConstantAndWatchExpressions(ast, $filter, parentIsPure) {\n var allConstants;\n var argsToWatch;\n var isStatelessFilter;\n\n var astIsPure = ast.isPure = isPure(ast, parentIsPure);\n\n switch (ast.type) {\n case AST.Program:\n allConstants = true;\n forEach(ast.body, function(expr) {\n findConstantAndWatchExpressions(expr.expression, $filter, astIsPure);\n allConstants = allConstants && expr.expression.constant;\n });\n ast.constant = allConstants;\n break;\n case AST.Literal:\n ast.constant = true;\n ast.toWatch = [];\n break;\n case AST.UnaryExpression:\n findConstantAndWatchExpressions(ast.argument, $filter, astIsPure);\n ast.constant = ast.argument.constant;\n ast.toWatch = ast.argument.toWatch;\n break;\n case AST.BinaryExpression:\n findConstantAndWatchExpressions(ast.left, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.right, $filter, astIsPure);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);\n break;\n case AST.LogicalExpression:\n findConstantAndWatchExpressions(ast.left, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.right, $filter, astIsPure);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.ConditionalExpression:\n findConstantAndWatchExpressions(ast.test, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.alternate, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.consequent, $filter, astIsPure);\n ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.Identifier:\n ast.constant = false;\n ast.toWatch = [ast];\n break;\n case AST.MemberExpression:\n findConstantAndWatchExpressions(ast.object, $filter, astIsPure);\n if (ast.computed) {\n findConstantAndWatchExpressions(ast.property, $filter, astIsPure);\n }\n ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.CallExpression:\n isStatelessFilter = ast.filter ? isStateless($filter, ast.callee.name) : false;\n allConstants = isStatelessFilter;\n argsToWatch = [];\n forEach(ast.arguments, function(expr) {\n findConstantAndWatchExpressions(expr, $filter, astIsPure);\n allConstants = allConstants && expr.constant;\n argsToWatch.push.apply(argsToWatch, expr.toWatch);\n });\n ast.constant = allConstants;\n ast.toWatch = isStatelessFilter ? argsToWatch : [ast];\n break;\n case AST.AssignmentExpression:\n findConstantAndWatchExpressions(ast.left, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.right, $filter, astIsPure);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = [ast];\n break;\n case AST.ArrayExpression:\n allConstants = true;\n argsToWatch = [];\n forEach(ast.elements, function(expr) {\n findConstantAndWatchExpressions(expr, $filter, astIsPure);\n allConstants = allConstants && expr.constant;\n argsToWatch.push.apply(argsToWatch, expr.toWatch);\n });\n ast.constant = allConstants;\n ast.toWatch = argsToWatch;\n break;\n case AST.ObjectExpression:\n allConstants = true;\n argsToWatch = [];\n forEach(ast.properties, function(property) {\n findConstantAndWatchExpressions(property.value, $filter, astIsPure);\n allConstants = allConstants && property.value.constant;\n argsToWatch.push.apply(argsToWatch, property.value.toWatch);\n if (property.computed) {\n //`{[key]: value}` implicitly does `key.toString()` which may be non-pure\n findConstantAndWatchExpressions(property.key, $filter, /*parentIsPure=*/false);\n allConstants = allConstants && property.key.constant;\n argsToWatch.push.apply(argsToWatch, property.key.toWatch);\n }\n });\n ast.constant = allConstants;\n ast.toWatch = argsToWatch;\n break;\n case AST.ThisExpression:\n ast.constant = false;\n ast.toWatch = [];\n break;\n case AST.LocalsExpression:\n ast.constant = false;\n ast.toWatch = [];\n break;\n }\n}\n\nfunction getInputs(body) {\n if (body.length !== 1) return;\n var lastExpression = body[0].expression;\n var candidate = lastExpression.toWatch;\n if (candidate.length !== 1) return candidate;\n return candidate[0] !== lastExpression ? candidate : undefined;\n}\n\nfunction isAssignable(ast) {\n return ast.type === AST.Identifier || ast.type === AST.MemberExpression;\n}\n\nfunction assignableAST(ast) {\n if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {\n return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};\n }\n}\n\nfunction isLiteral(ast) {\n return ast.body.length === 0 ||\n ast.body.length === 1 && (\n ast.body[0].expression.type === AST.Literal ||\n ast.body[0].expression.type === AST.ArrayExpression ||\n ast.body[0].expression.type === AST.ObjectExpression);\n}\n\nfunction isConstant(ast) {\n return ast.constant;\n}\n\nfunction ASTCompiler($filter) {\n this.$filter = $filter;\n}\n\nASTCompiler.prototype = {\n compile: function(ast) {\n var self = this;\n this.state = {\n nextId: 0,\n filters: {},\n fn: {vars: [], body: [], own: {}},\n assign: {vars: [], body: [], own: {}},\n inputs: []\n };\n findConstantAndWatchExpressions(ast, self.$filter);\n var extra = '';\n var assignable;\n this.stage = 'assign';\n if ((assignable = assignableAST(ast))) {\n this.state.computing = 'assign';\n var result = this.nextId();\n this.recurse(assignable, result);\n this.return_(result);\n extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');\n }\n var toWatch = getInputs(ast.body);\n self.stage = 'inputs';\n forEach(toWatch, function(watch, key) {\n var fnKey = 'fn' + key;\n self.state[fnKey] = {vars: [], body: [], own: {}};\n self.state.computing = fnKey;\n var intoId = self.nextId();\n self.recurse(watch, intoId);\n self.return_(intoId);\n self.state.inputs.push({name: fnKey, isPure: watch.isPure});\n watch.watchId = key;\n });\n this.state.computing = 'fn';\n this.stage = 'main';\n this.recurse(ast);\n var fnString =\n // The build and minification steps remove the string \"use strict\" from the code, but this is done using a regex.\n // This is a workaround for this until we do a better job at only removing the prefix only when we should.\n '\"' + this.USE + ' ' + this.STRICT + '\";\\n' +\n this.filterPrefix() +\n 'var fn=' + this.generateFunction('fn', 's,l,a,i') +\n extra +\n this.watchFns() +\n 'return fn;';\n\n // eslint-disable-next-line no-new-func\n var fn = (new Function('$filter',\n 'getStringValue',\n 'ifDefined',\n 'plus',\n fnString))(\n this.$filter,\n getStringValue,\n ifDefined,\n plusFn);\n this.state = this.stage = undefined;\n return fn;\n },\n\n USE: 'use',\n\n STRICT: 'strict',\n\n watchFns: function() {\n var result = [];\n var inputs = this.state.inputs;\n var self = this;\n forEach(inputs, function(input) {\n result.push('var ' + input.name + '=' + self.generateFunction(input.name, 's'));\n if (input.isPure) {\n result.push(input.name, '.isPure=' + JSON.stringify(input.isPure) + ';');\n }\n });\n if (inputs.length) {\n result.push('fn.inputs=[' + inputs.map(function(i) { return i.name; }).join(',') + '];');\n }\n return result.join('');\n },\n\n generateFunction: function(name, params) {\n return 'function(' + params + '){' +\n this.varsPrefix(name) +\n this.body(name) +\n '};';\n },\n\n filterPrefix: function() {\n var parts = [];\n var self = this;\n forEach(this.state.filters, function(id, filter) {\n parts.push(id + '=$filter(' + self.escape(filter) + ')');\n });\n if (parts.length) return 'var ' + parts.join(',') + ';';\n return '';\n },\n\n varsPrefix: function(section) {\n return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';\n },\n\n body: function(section) {\n return this.state[section].body.join('');\n },\n\n recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n var left, right, self = this, args, expression, computed;\n recursionFn = recursionFn || noop;\n if (!skipWatchIdCheck && isDefined(ast.watchId)) {\n intoId = intoId || this.nextId();\n this.if_('i',\n this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),\n this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)\n );\n return;\n }\n switch (ast.type) {\n case AST.Program:\n forEach(ast.body, function(expression, pos) {\n self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });\n if (pos !== ast.body.length - 1) {\n self.current().body.push(right, ';');\n } else {\n self.return_(right);\n }\n });\n break;\n case AST.Literal:\n expression = this.escape(ast.value);\n this.assign(intoId, expression);\n recursionFn(intoId || expression);\n break;\n case AST.UnaryExpression:\n this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });\n expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.BinaryExpression:\n this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });\n this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });\n if (ast.operator === '+') {\n expression = this.plus(left, right);\n } else if (ast.operator === '-') {\n expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);\n } else {\n expression = '(' + left + ')' + ast.operator + '(' + right + ')';\n }\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.LogicalExpression:\n intoId = intoId || this.nextId();\n self.recurse(ast.left, intoId);\n self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));\n recursionFn(intoId);\n break;\n case AST.ConditionalExpression:\n intoId = intoId || this.nextId();\n self.recurse(ast.test, intoId);\n self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));\n recursionFn(intoId);\n break;\n case AST.Identifier:\n intoId = intoId || this.nextId();\n if (nameId) {\n nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');\n nameId.computed = false;\n nameId.name = ast.name;\n }\n self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),\n function() {\n self.if_(self.stage === 'inputs' || 's', function() {\n if (create && create !== 1) {\n self.if_(\n self.isNull(self.nonComputedMember('s', ast.name)),\n self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));\n }\n self.assign(intoId, self.nonComputedMember('s', ast.name));\n });\n }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))\n );\n recursionFn(intoId);\n break;\n case AST.MemberExpression:\n left = nameId && (nameId.context = this.nextId()) || this.nextId();\n intoId = intoId || this.nextId();\n self.recurse(ast.object, left, undefined, function() {\n self.if_(self.notNull(left), function() {\n if (ast.computed) {\n right = self.nextId();\n self.recurse(ast.property, right);\n self.getStringValue(right);\n if (create && create !== 1) {\n self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));\n }\n expression = self.computedMember(left, right);\n self.assign(intoId, expression);\n if (nameId) {\n nameId.computed = true;\n nameId.name = right;\n }\n } else {\n if (create && create !== 1) {\n self.if_(self.isNull(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));\n }\n expression = self.nonComputedMember(left, ast.property.name);\n self.assign(intoId, expression);\n if (nameId) {\n nameId.computed = false;\n nameId.name = ast.property.name;\n }\n }\n }, function() {\n self.assign(intoId, 'undefined');\n });\n recursionFn(intoId);\n }, !!create);\n break;\n case AST.CallExpression:\n intoId = intoId || this.nextId();\n if (ast.filter) {\n right = self.filter(ast.callee.name);\n args = [];\n forEach(ast.arguments, function(expr) {\n var argument = self.nextId();\n self.recurse(expr, argument);\n args.push(argument);\n });\n expression = right + '(' + args.join(',') + ')';\n self.assign(intoId, expression);\n recursionFn(intoId);\n } else {\n right = self.nextId();\n left = {};\n args = [];\n self.recurse(ast.callee, right, left, function() {\n self.if_(self.notNull(right), function() {\n forEach(ast.arguments, function(expr) {\n self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) {\n args.push(argument);\n });\n });\n if (left.name) {\n expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';\n } else {\n expression = right + '(' + args.join(',') + ')';\n }\n self.assign(intoId, expression);\n }, function() {\n self.assign(intoId, 'undefined');\n });\n recursionFn(intoId);\n });\n }\n break;\n case AST.AssignmentExpression:\n right = this.nextId();\n left = {};\n this.recurse(ast.left, undefined, left, function() {\n self.if_(self.notNull(left.context), function() {\n self.recurse(ast.right, right);\n expression = self.member(left.context, left.name, left.computed) + ast.operator + right;\n self.assign(intoId, expression);\n recursionFn(intoId || expression);\n });\n }, 1);\n break;\n case AST.ArrayExpression:\n args = [];\n forEach(ast.elements, function(expr) {\n self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) {\n args.push(argument);\n });\n });\n expression = '[' + args.join(',') + ']';\n this.assign(intoId, expression);\n recursionFn(intoId || expression);\n break;\n case AST.ObjectExpression:\n args = [];\n computed = false;\n forEach(ast.properties, function(property) {\n if (property.computed) {\n computed = true;\n }\n });\n if (computed) {\n intoId = intoId || this.nextId();\n this.assign(intoId, '{}');\n forEach(ast.properties, function(property) {\n if (property.computed) {\n left = self.nextId();\n self.recurse(property.key, left);\n } else {\n left = property.key.type === AST.Identifier ?\n property.key.name :\n ('' + property.key.value);\n }\n right = self.nextId();\n self.recurse(property.value, right);\n self.assign(self.member(intoId, left, property.computed), right);\n });\n } else {\n forEach(ast.properties, function(property) {\n self.recurse(property.value, ast.constant ? undefined : self.nextId(), undefined, function(expr) {\n args.push(self.escape(\n property.key.type === AST.Identifier ? property.key.name :\n ('' + property.key.value)) +\n ':' + expr);\n });\n });\n expression = '{' + args.join(',') + '}';\n this.assign(intoId, expression);\n }\n recursionFn(intoId || expression);\n break;\n case AST.ThisExpression:\n this.assign(intoId, 's');\n recursionFn(intoId || 's');\n break;\n case AST.LocalsExpression:\n this.assign(intoId, 'l');\n recursionFn(intoId || 'l');\n break;\n case AST.NGValueParameter:\n this.assign(intoId, 'v');\n recursionFn(intoId || 'v');\n break;\n }\n },\n\n getHasOwnProperty: function(element, property) {\n var key = element + '.' + property;\n var own = this.current().own;\n if (!own.hasOwnProperty(key)) {\n own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');\n }\n return own[key];\n },\n\n assign: function(id, value) {\n if (!id) return;\n this.current().body.push(id, '=', value, ';');\n return id;\n },\n\n filter: function(filterName) {\n if (!this.state.filters.hasOwnProperty(filterName)) {\n this.state.filters[filterName] = this.nextId(true);\n }\n return this.state.filters[filterName];\n },\n\n ifDefined: function(id, defaultValue) {\n return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';\n },\n\n plus: function(left, right) {\n return 'plus(' + left + ',' + right + ')';\n },\n\n return_: function(id) {\n this.current().body.push('return ', id, ';');\n },\n\n if_: function(test, alternate, consequent) {\n if (test === true) {\n alternate();\n } else {\n var body = this.current().body;\n body.push('if(', test, '){');\n alternate();\n body.push('}');\n if (consequent) {\n body.push('else{');\n consequent();\n body.push('}');\n }\n }\n },\n\n not: function(expression) {\n return '!(' + expression + ')';\n },\n\n isNull: function(expression) {\n return expression + '==null';\n },\n\n notNull: function(expression) {\n return expression + '!=null';\n },\n\n nonComputedMember: function(left, right) {\n var SAFE_IDENTIFIER = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/;\n var UNSAFE_CHARACTERS = /[^$_a-zA-Z0-9]/g;\n if (SAFE_IDENTIFIER.test(right)) {\n return left + '.' + right;\n } else {\n return left + '[\"' + right.replace(UNSAFE_CHARACTERS, this.stringEscapeFn) + '\"]';\n }\n },\n\n computedMember: function(left, right) {\n return left + '[' + right + ']';\n },\n\n member: function(left, right, computed) {\n if (computed) return this.computedMember(left, right);\n return this.nonComputedMember(left, right);\n },\n\n getStringValue: function(item) {\n this.assign(item, 'getStringValue(' + item + ')');\n },\n\n lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n var self = this;\n return function() {\n self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);\n };\n },\n\n lazyAssign: function(id, value) {\n var self = this;\n return function() {\n self.assign(id, value);\n };\n },\n\n stringEscapeRegex: /[^ a-zA-Z0-9]/g,\n\n stringEscapeFn: function(c) {\n return '\\\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);\n },\n\n escape: function(value) {\n if (isString(value)) return '\\'' + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + '\\'';\n if (isNumber(value)) return value.toString();\n if (value === true) return 'true';\n if (value === false) return 'false';\n if (value === null) return 'null';\n if (typeof value === 'undefined') return 'undefined';\n\n throw $parseMinErr('esc', 'IMPOSSIBLE');\n },\n\n nextId: function(skip, init) {\n var id = 'v' + (this.state.nextId++);\n if (!skip) {\n this.current().vars.push(id + (init ? '=' + init : ''));\n }\n return id;\n },\n\n current: function() {\n return this.state[this.state.computing];\n }\n};\n\n\nfunction ASTInterpreter($filter) {\n this.$filter = $filter;\n}\n\nASTInterpreter.prototype = {\n compile: function(ast) {\n var self = this;\n findConstantAndWatchExpressions(ast, self.$filter);\n var assignable;\n var assign;\n if ((assignable = assignableAST(ast))) {\n assign = this.recurse(assignable);\n }\n var toWatch = getInputs(ast.body);\n var inputs;\n if (toWatch) {\n inputs = [];\n forEach(toWatch, function(watch, key) {\n var input = self.recurse(watch);\n input.isPure = watch.isPure;\n watch.input = input;\n inputs.push(input);\n watch.watchId = key;\n });\n }\n var expressions = [];\n forEach(ast.body, function(expression) {\n expressions.push(self.recurse(expression.expression));\n });\n var fn = ast.body.length === 0 ? noop :\n ast.body.length === 1 ? expressions[0] :\n function(scope, locals) {\n var lastValue;\n forEach(expressions, function(exp) {\n lastValue = exp(scope, locals);\n });\n return lastValue;\n };\n if (assign) {\n fn.assign = function(scope, value, locals) {\n return assign(scope, locals, value);\n };\n }\n if (inputs) {\n fn.inputs = inputs;\n }\n return fn;\n },\n\n recurse: function(ast, context, create) {\n var left, right, self = this, args;\n if (ast.input) {\n return this.inputs(ast.input, ast.watchId);\n }\n switch (ast.type) {\n case AST.Literal:\n return this.value(ast.value, context);\n case AST.UnaryExpression:\n right = this.recurse(ast.argument);\n return this['unary' + ast.operator](right, context);\n case AST.BinaryExpression:\n left = this.recurse(ast.left);\n right = this.recurse(ast.right);\n return this['binary' + ast.operator](left, right, context);\n case AST.LogicalExpression:\n left = this.recurse(ast.left);\n right = this.recurse(ast.right);\n return this['binary' + ast.operator](left, right, context);\n case AST.ConditionalExpression:\n return this['ternary?:'](\n this.recurse(ast.test),\n this.recurse(ast.alternate),\n this.recurse(ast.consequent),\n context\n );\n case AST.Identifier:\n return self.identifier(ast.name, context, create);\n case AST.MemberExpression:\n left = this.recurse(ast.object, false, !!create);\n if (!ast.computed) {\n right = ast.property.name;\n }\n if (ast.computed) right = this.recurse(ast.property);\n return ast.computed ?\n this.computedMember(left, right, context, create) :\n this.nonComputedMember(left, right, context, create);\n case AST.CallExpression:\n args = [];\n forEach(ast.arguments, function(expr) {\n args.push(self.recurse(expr));\n });\n if (ast.filter) right = this.$filter(ast.callee.name);\n if (!ast.filter) right = this.recurse(ast.callee, true);\n return ast.filter ?\n function(scope, locals, assign, inputs) {\n var values = [];\n for (var i = 0; i < args.length; ++i) {\n values.push(args[i](scope, locals, assign, inputs));\n }\n var value = right.apply(undefined, values, inputs);\n return context ? {context: undefined, name: undefined, value: value} : value;\n } :\n function(scope, locals, assign, inputs) {\n var rhs = right(scope, locals, assign, inputs);\n var value;\n if (rhs.value != null) {\n var values = [];\n for (var i = 0; i < args.length; ++i) {\n values.push(args[i](scope, locals, assign, inputs));\n }\n value = rhs.value.apply(rhs.context, values);\n }\n return context ? {value: value} : value;\n };\n case AST.AssignmentExpression:\n left = this.recurse(ast.left, true, 1);\n right = this.recurse(ast.right);\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n lhs.context[lhs.name] = rhs;\n return context ? {value: rhs} : rhs;\n };\n case AST.ArrayExpression:\n args = [];\n forEach(ast.elements, function(expr) {\n args.push(self.recurse(expr));\n });\n return function(scope, locals, assign, inputs) {\n var value = [];\n for (var i = 0; i < args.length; ++i) {\n value.push(args[i](scope, locals, assign, inputs));\n }\n return context ? {value: value} : value;\n };\n case AST.ObjectExpression:\n args = [];\n forEach(ast.properties, function(property) {\n if (property.computed) {\n args.push({key: self.recurse(property.key),\n computed: true,\n value: self.recurse(property.value)\n });\n } else {\n args.push({key: property.key.type === AST.Identifier ?\n property.key.name :\n ('' + property.key.value),\n computed: false,\n value: self.recurse(property.value)\n });\n }\n });\n return function(scope, locals, assign, inputs) {\n var value = {};\n for (var i = 0; i < args.length; ++i) {\n if (args[i].computed) {\n value[args[i].key(scope, locals, assign, inputs)] = args[i].value(scope, locals, assign, inputs);\n } else {\n value[args[i].key] = args[i].value(scope, locals, assign, inputs);\n }\n }\n return context ? {value: value} : value;\n };\n case AST.ThisExpression:\n return function(scope) {\n return context ? {value: scope} : scope;\n };\n case AST.LocalsExpression:\n return function(scope, locals) {\n return context ? {value: locals} : locals;\n };\n case AST.NGValueParameter:\n return function(scope, locals, assign) {\n return context ? {value: assign} : assign;\n };\n }\n },\n\n 'unary+': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = argument(scope, locals, assign, inputs);\n if (isDefined(arg)) {\n arg = +arg;\n } else {\n arg = 0;\n }\n return context ? {value: arg} : arg;\n };\n },\n 'unary-': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = argument(scope, locals, assign, inputs);\n if (isDefined(arg)) {\n arg = -arg;\n } else {\n arg = -0;\n }\n return context ? {value: arg} : arg;\n };\n },\n 'unary!': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = !argument(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary+': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n var arg = plusFn(lhs, rhs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary-': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);\n return context ? {value: arg} : arg;\n };\n },\n 'binary*': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary/': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary%': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary===': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary!==': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary==': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n // eslint-disable-next-line eqeqeq\n var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary!=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n // eslint-disable-next-line eqeqeq\n var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary<': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary>': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary<=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary>=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary&&': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary||': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'ternary?:': function(test, alternate, consequent, context) {\n return function(scope, locals, assign, inputs) {\n var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n value: function(value, context) {\n return function() { return context ? {context: undefined, name: undefined, value: value} : value; };\n },\n identifier: function(name, context, create) {\n return function(scope, locals, assign, inputs) {\n var base = locals && (name in locals) ? locals : scope;\n if (create && create !== 1 && base && base[name] == null) {\n base[name] = {};\n }\n var value = base ? base[name] : undefined;\n if (context) {\n return {context: base, name: name, value: value};\n } else {\n return value;\n }\n };\n },\n computedMember: function(left, right, context, create) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs;\n var value;\n if (lhs != null) {\n rhs = right(scope, locals, assign, inputs);\n rhs = getStringValue(rhs);\n if (create && create !== 1) {\n if (lhs && !(lhs[rhs])) {\n lhs[rhs] = {};\n }\n }\n value = lhs[rhs];\n }\n if (context) {\n return {context: lhs, name: rhs, value: value};\n } else {\n return value;\n }\n };\n },\n nonComputedMember: function(left, right, context, create) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n if (create && create !== 1) {\n if (lhs && lhs[right] == null) {\n lhs[right] = {};\n }\n }\n var value = lhs != null ? lhs[right] : undefined;\n if (context) {\n return {context: lhs, name: right, value: value};\n } else {\n return value;\n }\n };\n },\n inputs: function(input, watchId) {\n return function(scope, value, locals, inputs) {\n if (inputs) return inputs[watchId];\n return input(scope, value, locals);\n };\n }\n};\n\n/**\n * @constructor\n */\nfunction Parser(lexer, $filter, options) {\n this.ast = new AST(lexer, options);\n this.astCompiler = options.csp ? new ASTInterpreter($filter) :\n new ASTCompiler($filter);\n}\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function(text) {\n var ast = this.getAst(text);\n var fn = this.astCompiler.compile(ast.ast);\n fn.literal = isLiteral(ast.ast);\n fn.constant = isConstant(ast.ast);\n fn.oneTime = ast.oneTime;\n return fn;\n },\n\n getAst: function(exp) {\n var oneTime = false;\n exp = exp.trim();\n\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n return {\n ast: this.ast.ast(exp),\n oneTime: oneTime\n };\n }\n};\n\nfunction getValueOf(value) {\n return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts AngularJS {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'AngularJS'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('AngularJS');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n * @this\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cache = createMap();\n var literals = {\n 'true': true,\n 'false': false,\n 'null': null,\n 'undefined': undefined\n };\n var identStart, identContinue;\n\n /**\n * @ngdoc method\n * @name $parseProvider#addLiteral\n * @description\n *\n * Configure $parse service to add literal values that will be present as literal at expressions.\n *\n * @param {string} literalName Token for the literal value. The literal name value must be a valid literal name.\n * @param {*} literalValue Value for this literal. All literal values must be primitives or `undefined`.\n *\n **/\n this.addLiteral = function(literalName, literalValue) {\n literals[literalName] = literalValue;\n };\n\n /**\n * @ngdoc method\n * @name $parseProvider#setIdentifierFns\n *\n * @description\n *\n * Allows defining the set of characters that are allowed in AngularJS expressions. The function\n * `identifierStart` will get called to know if a given character is a valid character to be the\n * first character for an identifier. The function `identifierContinue` will get called to know if\n * a given character is a valid character to be a follow-up identifier character. The functions\n * `identifierStart` and `identifierContinue` will receive as arguments the single character to be\n * identifier and the character code point. These arguments will be `string` and `numeric`. Keep in\n * mind that the `string` parameter can be two characters long depending on the character\n * representation. It is expected for the function to return `true` or `false`, whether that\n * character is allowed or not.\n *\n * Since this function will be called extensively, keep the implementation of these functions fast,\n * as the performance of these functions have a direct impact on the expressions parsing speed.\n *\n * @param {function=} identifierStart The function that will decide whether the given character is\n * a valid identifier start character.\n * @param {function=} identifierContinue The function that will decide whether the given character is\n * a valid identifier continue character.\n */\n this.setIdentifierFns = function(identifierStart, identifierContinue) {\n identStart = identifierStart;\n identContinue = identifierContinue;\n return this;\n };\n\n this.$get = ['$filter', function($filter) {\n var noUnsafeEval = csp().noUnsafeEval;\n var $parseOptions = {\n csp: noUnsafeEval,\n literals: copy(literals),\n isIdentifierStart: isFunction(identStart) && identStart,\n isIdentifierContinue: isFunction(identContinue) && identContinue\n };\n $parse.$$getAst = $$getAst;\n return $parse;\n\n function $parse(exp, interceptorFn) {\n var parsedExpression, cacheKey;\n\n switch (typeof exp) {\n case 'string':\n exp = exp.trim();\n cacheKey = exp;\n\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n parsedExpression = parser.parse(exp);\n\n cache[cacheKey] = addWatchDelegate(parsedExpression);\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n }\n\n function $$getAst(exp) {\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n return parser.getAst(exp).ast;\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue, compareObjectIdentity) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = getValueOf(newValue);\n\n if (typeof newValue === 'object' && !compareObjectIdentity) {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n // eslint-disable-next-line no-self-compare\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n var inputExpressions = parsedExpression.inputs;\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf, inputExpressions.isPure)) {\n lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);\n oldInputValueOf = newInputValue && getValueOf(newInputValue);\n }\n return lastResult;\n }, listener, objectEquality, prettyPrintExpression);\n }\n\n var oldInputValueOfValues = [];\n var oldInputValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n oldInputValues[i] = null;\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i], inputExpressions[i].isPure))) {\n oldInputValues[i] = newInputValue;\n oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);\n }\n\n return lastResult;\n }, listener, objectEquality, prettyPrintExpression);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n var isDone = parsedExpression.literal ? isAllDefined : isDefined;\n var unwatch, lastValue;\n\n var exp = parsedExpression.$$intercepted || parsedExpression;\n var post = parsedExpression.$$interceptor || identity;\n\n var useInputs = parsedExpression.inputs && !exp.inputs;\n\n // Propagate the literal/inputs/constant attributes\n // ... but not oneTime since we are handling it\n oneTimeWatch.literal = parsedExpression.literal;\n oneTimeWatch.constant = parsedExpression.constant;\n oneTimeWatch.inputs = parsedExpression.inputs;\n\n // Allow other delegates to run on this wrapped expression\n addWatchDelegate(oneTimeWatch);\n\n unwatch = scope.$watch(oneTimeWatch, listener, objectEquality, prettyPrintExpression);\n\n return unwatch;\n\n function unwatchIfDone() {\n if (isDone(lastValue)) {\n unwatch();\n }\n }\n\n function oneTimeWatch(scope, locals, assign, inputs) {\n lastValue = useInputs && inputs ? inputs[0] : exp(scope, locals, assign, inputs);\n if (isDone(lastValue)) {\n scope.$$postDigest(unwatchIfDone);\n }\n return post(lastValue);\n }\n }\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function(val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch = scope.$watch(function constantWatch(scope) {\n unwatch();\n return parsedExpression(scope);\n }, listener, objectEquality);\n return unwatch;\n }\n\n function addWatchDelegate(parsedExpression) {\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (parsedExpression.oneTime) {\n parsedExpression.$$watchDelegate = oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n\n return parsedExpression;\n }\n\n function chainInterceptors(first, second) {\n function chainedInterceptor(value) {\n return second(first(value));\n }\n chainedInterceptor.$stateful = first.$stateful || second.$stateful;\n chainedInterceptor.$$pure = first.$$pure && second.$$pure;\n\n return chainedInterceptor;\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n\n // Extract any existing interceptors out of the parsedExpression\n // to ensure the original parsedExpression is always the $$intercepted\n if (parsedExpression.$$interceptor) {\n interceptorFn = chainInterceptors(parsedExpression.$$interceptor, interceptorFn);\n parsedExpression = parsedExpression.$$intercepted;\n }\n\n var useInputs = false;\n\n var fn = function interceptedExpression(scope, locals, assign, inputs) {\n var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);\n return interceptorFn(value);\n };\n\n // Maintain references to the interceptor/intercepted\n fn.$$intercepted = parsedExpression;\n fn.$$interceptor = interceptorFn;\n\n // Propagate the literal/oneTime/constant attributes\n fn.literal = parsedExpression.literal;\n fn.oneTime = parsedExpression.oneTime;\n fn.constant = parsedExpression.constant;\n\n // Treat the interceptor like filters.\n // If it is not $stateful then only watch its inputs.\n // If the expression itself has no inputs then use the full expression as an input.\n if (!interceptorFn.$stateful) {\n useInputs = !parsedExpression.inputs;\n fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];\n\n if (!interceptorFn.$$pure) {\n fn.inputs = fn.inputs.map(function(e) {\n // Remove the isPure flag of inputs when it is not absolute because they are now wrapped in a\n // non-pure interceptor function.\n if (e.isPure === PURITY_RELATIVE) {\n return function depurifier(s) { return e(s); };\n }\n return e;\n });\n }\n }\n\n return addWatchDelegate(fn);\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A service that helps you run functions asynchronously, and use their return values (or exceptions)\n * when they are done processing.\n *\n * This is a [Promises/A+](https://promisesaplus.com/)-compliant implementation of promises/deferred\n * objects inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 (ES2015) promises to some degree.\n *\n * ## $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * return $q(function(resolve, reject) {\n * setTimeout(function() {\n * if (okToGreet(name)) {\n * resolve('Hello, ' + name + '!');\n * } else {\n * reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n * });\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * ## The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * ## The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved\n * with the value which is resolved in that promise using\n * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).\n * It also notifies via the return value of the `notifyCallback` method. The promise cannot be\n * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback\n * arguments are optional.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * ## Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * ## Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in AngularJS, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * ## Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\n/**\n * @ngdoc provider\n * @name $qProvider\n * @this\n *\n * @description\n */\nfunction $QProvider() {\n var errorOnUnhandledRejections = true;\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler, errorOnUnhandledRejections);\n }];\n\n /**\n * @ngdoc method\n * @name $qProvider#errorOnUnhandledRejections\n * @kind function\n *\n * @description\n * Retrieves or overrides whether to generate an error when a rejected promise is not handled.\n * This feature is enabled by default.\n *\n * @param {boolean=} value Whether to generate an error when a rejected promise is not handled.\n * @returns {boolean|ng.$qProvider} Current value when called without a new value or self for\n * chaining otherwise.\n */\n this.errorOnUnhandledRejections = function(value) {\n if (isDefined(value)) {\n errorOnUnhandledRejections = value;\n return this;\n } else {\n return errorOnUnhandledRejections;\n }\n };\n}\n\n/** @this */\nfunction $$QProvider() {\n var errorOnUnhandledRejections = true;\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler, errorOnUnhandledRejections);\n }];\n\n this.errorOnUnhandledRejections = function(value) {\n if (isDefined(value)) {\n errorOnUnhandledRejections = value;\n return this;\n } else {\n return errorOnUnhandledRejections;\n }\n };\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @param {boolean=} errorOnUnhandledRejections Whether an error should be generated on unhandled\n * promises rejections.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler, errorOnUnhandledRejections) {\n var $qMinErr = minErr('$q', TypeError);\n var queueSize = 0;\n var checkQueue = [];\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n function defer() {\n return new Deferred();\n }\n\n function Deferred() {\n var promise = this.promise = new Promise();\n //Non prototype methods necessary to support unbound execution :/\n this.resolve = function(val) { resolvePromise(promise, val); };\n this.reject = function(reason) { rejectPromise(promise, reason); };\n this.notify = function(progress) { notifyPromise(promise, progress); };\n }\n\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n extend(Promise.prototype, {\n then: function(onFulfilled, onRejected, progressBack) {\n if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {\n return this;\n }\n var result = new Promise();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result;\n },\n\n 'catch': function(callback) {\n return this.then(null, callback);\n },\n\n 'finally': function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, resolve, callback);\n }, function(error) {\n return handleCallback(error, reject, callback);\n }, progressBack);\n }\n });\n\n function processQueue(state) {\n var fn, promise, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n try {\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n markQStateExceptionHandled(state);\n promise = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n resolvePromise(promise, fn(state.value));\n } else if (state.status === 1) {\n resolvePromise(promise, state.value);\n } else {\n rejectPromise(promise, state.value);\n }\n } catch (e) {\n rejectPromise(promise, e);\n // This error is explicitly marked for being passed to the $exceptionHandler\n if (e && e.$$passToExceptionHandler === true) {\n exceptionHandler(e);\n }\n }\n }\n } finally {\n --queueSize;\n if (errorOnUnhandledRejections && queueSize === 0) {\n nextTick(processChecks);\n }\n }\n }\n\n function processChecks() {\n // eslint-disable-next-line no-unmodified-loop-condition\n while (!queueSize && checkQueue.length) {\n var toCheck = checkQueue.shift();\n if (!isStateExceptionHandled(toCheck)) {\n markQStateExceptionHandled(toCheck);\n var errorMessage = 'Possibly unhandled rejection: ' + toDebugString(toCheck.value);\n if (isError(toCheck.value)) {\n exceptionHandler(toCheck.value, errorMessage);\n } else {\n exceptionHandler(errorMessage);\n }\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (errorOnUnhandledRejections && !state.pending && state.status === 2 && !isStateExceptionHandled(state)) {\n if (queueSize === 0 && checkQueue.length === 0) {\n nextTick(processChecks);\n }\n checkQueue.push(state);\n }\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n ++queueSize;\n nextTick(function() { processQueue(state); });\n }\n\n function resolvePromise(promise, val) {\n if (promise.$$state.status) return;\n if (val === promise) {\n $$reject(promise, $qMinErr(\n 'qcycle',\n 'Expected promise to be resolved with value other than itself \\'{0}\\'',\n val));\n } else {\n $$resolve(promise, val);\n }\n\n }\n\n function $$resolve(promise, val) {\n var then;\n var done = false;\n try {\n if (isObject(val) || isFunction(val)) then = val.then;\n if (isFunction(then)) {\n promise.$$state.status = -1;\n then.call(val, doResolve, doReject, doNotify);\n } else {\n promise.$$state.value = val;\n promise.$$state.status = 1;\n scheduleProcessQueue(promise.$$state);\n }\n } catch (e) {\n doReject(e);\n }\n\n function doResolve(val) {\n if (done) return;\n done = true;\n $$resolve(promise, val);\n }\n function doReject(val) {\n if (done) return;\n done = true;\n $$reject(promise, val);\n }\n function doNotify(progress) {\n notifyPromise(promise, progress);\n }\n }\n\n function rejectPromise(promise, reason) {\n if (promise.$$state.status) return;\n $$reject(promise, reason);\n }\n\n function $$reject(promise, reason) {\n promise.$$state.value = reason;\n promise.$$state.status = 2;\n scheduleProcessQueue(promise.$$state);\n }\n\n function notifyPromise(promise, progress) {\n var callbacks = promise.$$state.pending;\n\n if ((promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n notifyPromise(result, isFunction(callback) ? callback(progress) : progress);\n } catch (e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n function reject(reason) {\n var result = new Promise();\n rejectPromise(result, reason);\n return result;\n }\n\n function handleCallback(value, resolver, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch (e) {\n return reject(e);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return resolver(value);\n }, reject);\n } else {\n return resolver(value);\n }\n }\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @param {Function=} successCallback\n * @param {Function=} errorCallback\n * @param {Function=} progressCallback\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n function when(value, callback, errback, progressBack) {\n var result = new Promise();\n resolvePromise(result, value);\n return result.then(callback, errback, progressBack);\n }\n\n /**\n * @ngdoc method\n * @name $q#resolve\n * @kind function\n *\n * @description\n * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.\n *\n * @param {*} value Value or a promise\n * @param {Function=} successCallback\n * @param {Function=} errorCallback\n * @param {Function=} progressCallback\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n var resolve = when;\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var result = new Promise(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n results[key] = value;\n if (!(--counter)) resolvePromise(result, results);\n }, function(reason) {\n rejectPromise(result, reason);\n });\n });\n\n if (counter === 0) {\n resolvePromise(result, results);\n }\n\n return result;\n }\n\n /**\n * @ngdoc method\n * @name $q#race\n * @kind function\n *\n * @description\n * Returns a promise that resolves or rejects as soon as one of those promises\n * resolves or rejects, with the value or reason from that promise.\n *\n * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises`\n * resolves or rejects, with the value or reason from that promise.\n */\n\n function race(promises) {\n var deferred = defer();\n\n forEach(promises, function(promise) {\n when(promise).then(deferred.resolve, deferred.reject);\n });\n\n return deferred.promise;\n }\n\n function $Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', 'Expected resolverFn, got \\'{0}\\'', resolver);\n }\n\n var promise = new Promise();\n\n function resolveFn(value) {\n resolvePromise(promise, value);\n }\n\n function rejectFn(reason) {\n rejectPromise(promise, reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return promise;\n }\n\n // Let's make the instanceof operator work for promises, so that\n // `new $q(fn) instanceof $q` would evaluate to true.\n $Q.prototype = Promise.prototype;\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.resolve = resolve;\n $Q.all = all;\n $Q.race = race;\n\n return $Q;\n}\n\nfunction isStateExceptionHandled(state) {\n return !!state.pur;\n}\nfunction markQStateExceptionHandled(state) {\n state.pur = true;\n}\nfunction markQExceptionHandled(q) {\n // Built-in `$q` promises will always have a `$$state` property. This check is to allow\n // overwriting `$q` with a different promise library (e.g. Bluebird + angular-bluebird-promises).\n // (Currently, this is the only method that might be called with a promise, even if it is not\n // created by the built-in `$q`.)\n if (q.$$state) {\n markQStateExceptionHandled(q.$$state);\n }\n}\n\n/** @this */\nfunction $$RAFProvider() { //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - This means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists\n *\n * There are fewer watches than observers. This is why you don't want the observer to be implemented\n * in the same way as watch. Watch requires return of the initialization function which is expensive\n * to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @this\n *\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider() {\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n function createChildScopeClass(parent) {\n function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$watchersCount = 0;\n this.$id = nextUid();\n this.$$ChildScope = null;\n this.$$suspended = false;\n }\n ChildScope.prototype = parent;\n return ChildScope;\n }\n\n this.$get = ['$exceptionHandler', '$parse', '$browser',\n function($exceptionHandler, $parse, $browser) {\n\n function destroyChildScope($event) {\n $event.currentScope.$$destroyed = true;\n }\n\n function cleanUpScope($scope) {\n\n // Support: IE 9 only\n if (msie === 9) {\n // There is a memory leak in IE9 if all child scopes are not disconnected\n // completely when a scope is destroyed. So this code will recurse up through\n // all this scopes children\n //\n // See issue https://github.com/angular/angular.js/issues/10706\n if ($scope.$$childHead) {\n cleanUpScope($scope.$$childHead);\n }\n if ($scope.$$nextSibling) {\n cleanUpScope($scope.$$nextSibling);\n }\n }\n\n // The code below works around IE9 and V8's memory leaks\n //\n // See:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =\n $scope.$$childTail = $scope.$root = $scope.$$watchers = null;\n }\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for\n * an in-depth introduction and usage examples.\n *\n *\n * ## Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n * When interacting with `Scope` in tests, additional helper methods are available on the\n * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional\n * details.\n *\n *\n * @param {Object.<string, function()>=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this.$root = this;\n this.$$destroyed = false;\n this.$$suspended = false;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$watchersCount = 0;\n this.$$isolateBindings = null;\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`\n * of the newly created scope. Defaults to `this` scope if not provided.\n * This is used when creating a transclude scope to correctly place it\n * in the scope hierarchy while maintaining the correct prototypical\n * inheritance.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate, parent) {\n var child;\n\n parent = parent || this;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = createChildScopeClass(this);\n }\n child = new this.$$ChildScope();\n }\n child.$parent = parent;\n child.$$prevSibling = parent.$$childTail;\n if (parent.$$childHead) {\n parent.$$childTail.$$nextSibling = child;\n parent.$$childTail = child;\n } else {\n parent.$$childHead = parent.$$childTail = child;\n }\n\n // When the new scope is not isolated or we inherit from `this`, and\n // the parent scope is destroyed, the property `$$destroyed` is inherited\n // prototypically. In all other cases, this property needs to be set\n // when the parent scope is destroyed.\n // The listener needs to be added after the parent is set\n if (isolate || parent !== this) child.$on('$destroy', destroyChildScope);\n\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (`watchExpression` should not change\n * its value when executed multiple times with the same input because it may be executed multiple\n * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be\n * [idempotent](http://en.wikipedia.org/wiki/Idempotence).)\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - This should not be used to watch for changes in objects that are (or contain)\n * [File](https://developer.mozilla.org/docs/Web/API/File) objects due to limitations with {@link angular.copy `angular.copy`}.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Be prepared for\n * multiple calls to your `watchExpression` because it will execute multiple times in a\n * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * @example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {\n var get = $parse(watchExp);\n var fn = isFunction(listener) ? listener : noop;\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, fn, objectEquality, get, watchExp);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: fn,\n last: initWatchVal,\n get: get,\n exp: prettyPrintExpression || watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!array) {\n array = scope.$$watchers = [];\n array.$$digestWatchIndex = -1;\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n array.$$digestWatchIndex++;\n incrementWatchersCount(this, 1);\n\n return function deregisterWatch() {\n var index = arrayRemove(array, watcher);\n if (index >= 0) {\n incrementWatchersCount(scope, -1);\n if (index < array.$$digestWatchIndex) {\n array.$$digestWatchIndex--;\n }\n }\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via the standard `$watch` operation. Their return\n * values are examined for changes on every call to `$digest`.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function() {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function(expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value) {\n newValues[i] = value;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n try {\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n } finally {\n for (var i = 0; i < watchExpressions.length; i++) {\n oldValues[i] = newValues[i];\n }\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * @example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n // Mark the interceptor as\n // ... $$pure when literal since the instance will change when any input changes\n $watchCollectionInterceptor.$$pure = $parse(obj).literal;\n // ... $stateful when non-literal since we must read the state of the collection\n $watchCollectionInterceptor.$stateful = !$watchCollectionInterceptor.$$pure;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n // If the new value is undefined, then return undefined as the watch may be a one-time watch\n if (isUndefined(newValue)) return;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n // eslint-disable-next-line no-self-compare\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n // eslint-disable-next-line no-self-compare\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for (key in oldValue) {\n if (!hasOwnProperty.call(newValue, key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * @example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last, fn, get,\n watchers,\n dirty, ttl = TTL,\n next, current, target = asyncQueue.length ? $rootScope : this,\n watchLog = [],\n logIdx, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n // It's safe for asyncQueuePosition to be a local variable here because this loop can't\n // be reentered recursively. Calling $digest from a function passed to $evalAsync would\n // lead to a '$digest already in progress' error.\n for (var asyncQueuePosition = 0; asyncQueuePosition < asyncQueue.length; asyncQueuePosition++) {\n try {\n asyncTask = asyncQueue[asyncQueuePosition];\n fn = asyncTask.fn;\n fn(asyncTask.scope, asyncTask.locals);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n asyncQueue.length = 0;\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = !current.$$suspended && current.$$watchers)) {\n // process our watches\n watchers.$$digestWatchIndex = watchers.length;\n while (watchers.$$digestWatchIndex--) {\n try {\n watch = watchers[watchers.$$digestWatchIndex];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n get = watch.get;\n if ((value = get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (isNumberNaN(value) && isNumberNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n fn = watch.fn;\n fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n watchLog[logIdx].push({\n msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,\n newVal: value,\n oldVal: last\n });\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n // (though it differs due to having the extra check for $$suspended and does not\n // check $$listenerCount)\n if (!(next = ((!current.$$suspended && current.$$watchersCount && current.$$childHead) ||\n (current !== target && current.$$nextSibling)))) {\n while (current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if ((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, watchLog);\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n // postDigestQueuePosition isn't local here because this loop can be reentered recursively.\n while (postDigestQueuePosition < postDigestQueue.length) {\n try {\n postDigestQueue[postDigestQueuePosition++]();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n postDigestQueue.length = postDigestQueuePosition = 0;\n\n // Check for changes to browser url that happened during the $digest\n // (for which no event is fired; e.g. via `history.pushState()`)\n $browser.$$checkUrlChange();\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$suspend\n * @kind function\n *\n * @description\n * Suspend watchers of this scope subtree so that they will not be invoked during digest.\n *\n * This can be used to optimize your application when you know that running those watchers\n * is redundant.\n *\n * **Warning**\n *\n * Suspending scopes from the digest cycle can have unwanted and difficult to debug results.\n * Only use this approach if you are confident that you know what you are doing and have\n * ample tests to ensure that bindings get updated as you expect.\n *\n * Some of the things to consider are:\n *\n * * Any external event on a directive/component will not trigger a digest while the hosting\n * scope is suspended - even if the event handler calls `$apply()` or `$rootScope.$digest()`.\n * * Transcluded content exists on a scope that inherits from outside a directive but exists\n * as a child of the directive's containing scope. If the containing scope is suspended the\n * transcluded scope will also be suspended, even if the scope from which the transcluded\n * scope inherits is not suspended.\n * * Multiple directives trying to manage the suspended status of a scope can confuse each other:\n * * A call to `$suspend()` on an already suspended scope is a no-op.\n * * A call to `$resume()` on a non-suspended scope is a no-op.\n * * If two directives suspend a scope, then one of them resumes the scope, the scope will no\n * longer be suspended. This could result in the other directive believing a scope to be\n * suspended when it is not.\n * * If a parent scope is suspended then all its descendants will be also excluded from future\n * digests whether or not they have been suspended themselves. Note that this also applies to\n * isolate child scopes.\n * * Calling `$digest()` directly on a descendant of a suspended scope will still run the watchers\n * for that scope and its descendants. When digesting we only check whether the current scope is\n * locally suspended, rather than checking whether it has a suspended ancestor.\n * * Calling `$resume()` on a scope that has a suspended ancestor will not cause the scope to be\n * included in future digests until all its ancestors have been resumed.\n * * Resolved promises, e.g. from explicit `$q` deferreds and `$http` calls, trigger `$apply()`\n * against the `$rootScope` and so will still trigger a global digest even if the promise was\n * initiated by a component that lives on a suspended scope.\n */\n $suspend: function() {\n this.$$suspended = true;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$isSuspended\n * @kind function\n *\n * @description\n * Call this method to determine if this scope has been explicitly suspended. It will not\n * tell you whether an ancestor has been suspended.\n * To determine if this scope will be excluded from a digest triggered at the $rootScope,\n * for example, you must check all its ancestors:\n *\n * ```\n * function isExcludedFromDigest(scope) {\n * while(scope) {\n * if (scope.$isSuspended()) return true;\n * scope = scope.$parent;\n * }\n * return false;\n * ```\n *\n * Be aware that a scope may not be included in digests if it has a suspended ancestor,\n * even if `$isSuspended()` returns false.\n *\n * @returns true if the current scope has been suspended.\n */\n $isSuspended: function() {\n return this.$$suspended;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$resume\n * @kind function\n *\n * @description\n * Resume watchers of this scope subtree in case it was suspended.\n *\n * See {@link $rootScope.Scope#$suspend} for information about the dangers of using this approach.\n */\n $resume: function() {\n this.$$suspended = false;\n },\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // We can't destroy a scope that has been already destroyed.\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n\n if (this === $rootScope) {\n //Remove handlers attached to window when $rootScope is removed\n $browser.$$applicationDestroyed();\n }\n\n incrementWatchersCount(this, -this.$$watchersCount);\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent && parent.$$childHead === this) parent.$$childHead = this.$$nextSibling;\n if (parent && parent.$$childTail === this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n // Disable listeners, watchers and apply/digest methods\n this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n this.$$listeners = {};\n\n // Disconnect the next sibling to prevent `cleanUpScope` destroying those too\n this.$$nextSibling = null;\n cleanUpScope(this);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating AngularJS\n * expressions.\n *\n * @example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n */\n $evalAsync: function(expr, locals) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !asyncQueue.length) {\n $browser.defer(function() {\n if (asyncQueue.length) {\n $rootScope.$digest();\n }\n }, null, '$evalAsync');\n }\n\n asyncQueue.push({scope: this, fn: $parse(expr), locals: locals});\n },\n\n $$postDigest: function(fn) {\n postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in AngularJS from outside of the AngularJS\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the AngularJS framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * **Life cycle: Pseudo-Code of `$apply()`**\n *\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n try {\n return this.$eval(expr);\n } finally {\n clearPhase();\n }\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n // eslint-disable-next-line no-unsafe-finally\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invocation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n if (expr) {\n applyAsyncQueue.push($applyAsyncExpression);\n }\n expr = $parse(expr);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n var indexOfListener = namedListeners.indexOf(listener);\n if (indexOfListener !== -1) {\n // Use delete in the hope of the browser deallocating the memory for the array entry,\n // while not shifting the array indexes of other listeners.\n // See issue https://github.com/angular/angular.js/issues/16135\n delete namedListeners[indexOfListener];\n decrementListenerCount(self, 1, name);\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i = 0, length = namedListeners.length; i < length; i++) {\n\n // if listeners were deregistered, defragment the array\n if (!namedListeners[i]) {\n namedListeners.splice(i, 1);\n i--;\n length--;\n continue;\n }\n try {\n //allow all listeners attached to the current scope to run\n namedListeners[i].apply(null, listenerArgs);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n //if any listener on the current scope stops propagation, prevent bubbling\n if (stopPropagation) {\n break;\n }\n //traverse upwards\n scope = scope.$parent;\n } while (scope);\n\n event.currentScope = null;\n\n return event;\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$broadcast\n * @kind function\n *\n * @description\n * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$broadcast` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n * scope and calls all registered listeners along the way. The event cannot be canceled.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to broadcast.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}\n */\n $broadcast: function(name, args) {\n var target = this,\n current = target,\n next = target,\n event = {\n name: name,\n targetScope: target,\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n };\n\n if (!target.$$listenerCount[name]) return event;\n\n var listenerArgs = concat([event], arguments, 1),\n listeners, i, length;\n\n //down while you can, then up and next sibling or up and next sibling until back at root\n while ((current = next)) {\n event.currentScope = current;\n listeners = current.$$listeners[name] || [];\n for (i = 0, length = listeners.length; i < length; i++) {\n // if listeners were deregistered, defragment the array\n if (!listeners[i]) {\n listeners.splice(i, 1);\n i--;\n length--;\n continue;\n }\n\n try {\n listeners[i].apply(null, listenerArgs);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $digest\n // (though it differs due to having the extra check for $$listenerCount and\n // does not check $$suspended)\n if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n (current !== target && current.$$nextSibling)))) {\n while (current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n }\n\n event.currentScope = null;\n return event;\n }\n };\n\n var $rootScope = new Scope();\n\n //The internal queues. Expose them on the $rootScope for debugging/testing purposes.\n var asyncQueue = $rootScope.$$asyncQueue = [];\n var postDigestQueue = $rootScope.$$postDigestQueue = [];\n var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];\n\n var postDigestQueuePosition = 0;\n\n return $rootScope;\n\n\n function beginPhase(phase) {\n if ($rootScope.$$phase) {\n throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n }\n\n $rootScope.$$phase = phase;\n }\n\n function clearPhase() {\n $rootScope.$$phase = null;\n }\n\n function incrementWatchersCount(current, count) {\n do {\n current.$$watchersCount += count;\n } while ((current = current.$parent));\n }\n\n function decrementListenerCount(current, count, name) {\n do {\n current.$$listenerCount[name] -= count;\n\n if (current.$$listenerCount[name] === 0) {\n delete current.$$listenerCount[name];\n }\n } while ((current = current.$parent));\n }\n\n /**\n * function used as an initial value for watchers.\n * because it's unique we can easily tell it apart from other values\n */\n function initWatchVal() {}\n\n function flushApplyAsync() {\n while (applyAsyncQueue.length) {\n try {\n applyAsyncQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n applyAsyncId = null;\n }\n\n function scheduleApplyAsync() {\n if (applyAsyncId === null) {\n applyAsyncId = $browser.defer(function() {\n $rootScope.$apply(flushApplyAsync);\n }, null, '$applyAsync');\n }\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $rootElement\n *\n * @description\n * The root element of AngularJS application. This is either the element where {@link\n * ng.directive:ngApp ngApp} was declared or the element passed into\n * {@link angular.bootstrap}. The element represents the root element of application. It is also the\n * location where the application's {@link auto.$injector $injector} service gets\n * published, and can be retrieved using `$rootElement.injector()`.\n */\n\n\n// the implementation is in angular.bootstrap\n\n/**\n * @this\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n\n var aHrefSanitizationTrustedUrlList = /^\\s*(https?|s?ftp|mailto|tel|file):/,\n imgSrcSanitizationTrustedUrlList = /^\\s*((https?|ftp|file|blob):|data:image\\/)/;\n\n /**\n * @description\n * Retrieves or overrides the default regular expression that is used for determining trusted safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via HTML anchor links.\n *\n * Any url due to be assigned to an `a[href]` attribute via interpolation is marked as requiring\n * the $sce.URL security context. When interpolation occurs a call is made to `$sce.trustAsUrl(url)`\n * which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize the potentially malicious URL.\n *\n * If the URL matches the `aHrefSanitizationTrustedUrlList` regular expression, it is returned unchanged.\n *\n * If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written\n * to the DOM it is inactive and potentially malicious code will not be executed.\n *\n * @param {RegExp=} regexp New regexp to trust urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationTrustedUrlList = function(regexp) {\n if (isDefined(regexp)) {\n aHrefSanitizationTrustedUrlList = regexp;\n return this;\n }\n return aHrefSanitizationTrustedUrlList;\n };\n\n\n /**\n * @description\n * Retrieves or overrides the default regular expression that is used for determining trusted safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via HTML image src links.\n *\n * Any URL due to be assigned to an `img[src]` attribute via interpolation is marked as requiring\n * the $sce.MEDIA_URL security context. When interpolation occurs a call is made to\n * `$sce.trustAsMediaUrl(url)` which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize\n * the potentially malicious URL.\n *\n * If the URL matches the `imgSrcSanitizationTrustedUrlList` regular expression, it is returned\n * unchanged.\n *\n * If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written\n * to the DOM it is inactive and potentially malicious code will not be executed.\n *\n * @param {RegExp=} regexp New regexp to trust urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationTrustedUrlList = function(regexp) {\n if (isDefined(regexp)) {\n imgSrcSanitizationTrustedUrlList = regexp;\n return this;\n }\n return imgSrcSanitizationTrustedUrlList;\n };\n\n this.$get = function() {\n return function sanitizeUri(uri, isMediaUrl) {\n // if (!uri) return uri;\n var regex = isMediaUrl ? imgSrcSanitizationTrustedUrlList : aHrefSanitizationTrustedUrlList;\n var normalizedVal = urlResolve(uri && uri.trim()).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:' + normalizedVal;\n }\n return uri;\n };\n };\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* exported $SceProvider, $SceDelegateProvider */\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n // HTML is used when there's HTML rendered (e.g. ng-bind-html, iframe srcdoc binding).\n HTML: 'html',\n\n // Style statements or stylesheets. Currently unused in AngularJS.\n CSS: 'css',\n\n // An URL used in a context where it refers to the source of media, which are not expected to be run\n // as scripts, such as an image, audio, video, etc.\n MEDIA_URL: 'mediaUrl',\n\n // An URL used in a context where it does not refer to a resource that loads code.\n // A value that can be trusted as a URL can also trusted as a MEDIA_URL.\n URL: 'url',\n\n // RESOURCE_URL is a subtype of URL used where the referred-to resource could be interpreted as\n // code. (e.g. ng-include, script src binding, templateUrl)\n // A value that can be trusted as a RESOURCE_URL, can also trusted as a URL and a MEDIA_URL.\n RESOURCE_URL: 'resourceUrl',\n\n // Script. Currently unused in AngularJS.\n JS: 'js'\n};\n\n// Helper functions follow.\n\nvar UNDERSCORE_LOWERCASE_REGEXP = /_([a-z])/g;\n\nfunction snakeToCamel(name) {\n return name\n .replace(UNDERSCORE_LOWERCASE_REGEXP, fnCamelCaseReplace);\n}\n\nfunction adjustMatcher(matcher) {\n if (matcher === 'self') {\n return matcher;\n } else if (isString(matcher)) {\n // Strings match exactly except for 2 wildcards - '*' and '**'.\n // '*' matches any character except those from the set ':/.?&'.\n // '**' matches any character (like .* in a RegExp).\n // More than 2 *'s raises an error as it's ill defined.\n if (matcher.indexOf('***') > -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace(/\\\\\\*\\\\\\*/g, '.*').\n replace(/\\\\\\*/g, '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * For an overview of this service and the functionnality it provides in AngularJS, see the main\n * page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how\n * SCE works in their application, which shouldn't be needed in most cases.\n *\n * <div class=\"alert alert-danger\">\n * AngularJS strongly relies on contextual escaping for the security of bindings: disabling or\n * modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners,\n * changes to this service will also influence users, so be extra careful and document your changes.\n * </div>\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own trusted and banned resource lists for trusting URLs used for loading AngularJS resources\n * such as templates. Refer {@link ng.$sceDelegateProvider#trustedResourceUrlList\n * $sceDelegateProvider.trustedResourceUrlList} and {@link\n * ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @this\n *\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}.\n *\n * The `$sceDelegateProvider` allows one to get/set the `trustedResourceUrlList` and\n * `bannedResourceUrlList` used to ensure that the URLs used for sourcing AngularJS templates and\n * other script-running URLs are safe (all places that use the `$sce.RESOURCE_URL` context). See\n * {@link ng.$sceDelegateProvider#trustedResourceUrlList\n * $sceDelegateProvider.trustedResourceUrlList} and\n * {@link ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList},\n *\n * For the general details about this service in AngularJS, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case. <a name=\"example\"></a>\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.trustedResourceUrlList([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The banned resource URL list overrides the trusted resource URL list so the open redirect\n * // here is blocked.\n * $sceDelegateProvider.bannedResourceUrlList([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n * Note that an empty trusted resource URL list will block every resource URL from being loaded, and will require\n * you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates\n * requested by {@link ng.$templateRequest $templateRequest} that are present in\n * {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism\n * to populate your templates in that cache at config time, then it is a good idea to remove 'self'\n * from the trusted resource URL lsit. This helps to mitigate the security impact of certain types\n * of issues, like for instance attacker-controlled `ng-includes`.\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var trustedResourceUrlList = ['self'],\n bannedResourceUrlList = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#trustedResourceUrlList\n * @kind function\n *\n * @param {Array=} trustedResourceUrlList When provided, replaces the trustedResourceUrlList with\n * the value provided. This must be an array or null. A snapshot of this array is used so\n * further changes to the array are ignored.\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * @return {Array} The currently set trusted resource URL array.\n *\n * @description\n * Sets/Gets the list trusted of resource URLs.\n *\n * The **default value** when no `trustedResourceUrlList` has been explicitly set is `['self']`\n * allowing only same origin resource requests.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** the default `trustedResourceUrlList` of 'self' is not recommended if your app shares\n * its origin with other apps! It is a good idea to limit it to only your application's directory.\n * </div>\n */\n this.trustedResourceUrlList = function(value) {\n if (arguments.length) {\n trustedResourceUrlList = adjustMatchers(value);\n }\n return trustedResourceUrlList;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @deprecated\n * sinceVersion=\"1.8.1\"\n *\n * This method is deprecated. Use {@link $sceDelegateProvider#trustedResourceUrlList\n * trustedResourceUrlList} instead.\n */\n Object.defineProperty(this, 'resourceUrlWhitelist', {\n get: function() {\n return this.trustedResourceUrlList;\n },\n set: function(value) {\n this.trustedResourceUrlList = value;\n }\n });\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#bannedResourceUrlList\n * @kind function\n *\n * @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with\n * the value provided. This must be an array or null. A snapshot of this array is used so\n * further changes to the array are ignored.</p><p>\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.</p><p>\n * The typical usage for the `bannedResourceUrlList` is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n * </p><p>\n * Finally, **the banned resource URL list overrides the trusted resource URL list** and has\n * the final say.\n *\n * @return {Array} The currently set `bannedResourceUrlList` array.\n *\n * @description\n * Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.\n *\n * The **default value** when no trusted resource URL list has been explicitly set is the empty\n * array (i.e. there is no `bannedResourceUrlList`.)\n */\n this.bannedResourceUrlList = function(value) {\n if (arguments.length) {\n bannedResourceUrlList = adjustMatchers(value);\n }\n return bannedResourceUrlList;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @deprecated\n * sinceVersion=\"1.8.1\"\n *\n * This method is deprecated. Use {@link $sceDelegateProvider#bannedResourceUrlList\n * bannedResourceUrlList} instead.\n */\n Object.defineProperty(this, 'resourceUrlBlacklist', {\n get: function() {\n return this.bannedResourceUrlList;\n },\n set: function(value) {\n this.bannedResourceUrlList = value;\n }\n });\n\n this.$get = ['$injector', '$$sanitizeUri', function($injector, $$sanitizeUri) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl) || urlIsSameOriginAsBaseUrl(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the trusted resource URL list allows this url.\n for (i = 0, n = trustedResourceUrlList.length; i < n; i++) {\n if (matchUrl(trustedResourceUrlList[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the banned resource URL list has blocked this url.\n for (i = 0, n = bannedResourceUrlList.length; i < n; i++) {\n if (matchUrl(bannedResourceUrlList[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.MEDIA_URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(byType[SCE_CONTEXTS.MEDIA_URL]);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns a trusted representation of the parameter for the specified context. This trusted\n * object will later on be used as-is, without any security check, by bindings or directives\n * that require this security context.\n * For instance, marking a string as trusted for the `$sce.HTML` context will entirely bypass\n * the potential `$sanitize` call in corresponding `$sce.HTML` bindings or directives, such as\n * `ng-bind-html`. Note that in most cases you won't need to call this function: if you have the\n * sanitizer loaded, passing the value itself will render all the HTML that does not pose a\n * security risk.\n *\n * See {@link ng.$sceDelegate#getTrusted getTrusted} for the function that will consume those\n * trusted values, and {@link ng.$sce $sce} for general documentation about strict contextual\n * escaping.\n *\n * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,\n * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.\n *\n * @param {*} value The value that should be considered trusted.\n * @return {*} A trusted representation of value, that can be used in the given context.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, it must be returned as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @return {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Given an object and a security context in which to assign it, returns a value that's safe to\n * use in this context, which was represented by the parameter. To do so, this function either\n * unwraps the safe type it has been given (for instance, a {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} result), or it might try to sanitize the value given, depending on\n * the context and sanitizer availablility.\n *\n * The contexts that can be sanitized are $sce.MEDIA_URL, $sce.URL and $sce.HTML. The first two are available\n * by default, and the third one relies on the `$sanitize` service (which may be loaded through\n * the `ngSanitize` module). Furthermore, for $sce.RESOURCE_URL context, a plain string may be\n * accepted if the resource url policy defined by {@link ng.$sceDelegateProvider#trustedResourceUrlList\n * `$sceDelegateProvider.trustedResourceUrlList`} and {@link ng.$sceDelegateProvider#bannedResourceUrlList\n * `$sceDelegateProvider.bannedResourceUrlList`} accepts that resource.\n *\n * This function will throw if the safe type isn't appropriate for this context, or if the\n * value given cannot be accepted in the context (which might be caused by sanitization not\n * being available, or the value not being recognized as safe).\n *\n * <div class=\"alert alert-danger\">\n * Disabling auto-escaping is extremely dangerous, it usually creates a Cross Site Scripting\n * (XSS) vulnerability in your application.\n * </div>\n *\n * @param {string} type The context in which this value is to be used (such as `$sce.HTML`).\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call, or anything else (which will not be considered trusted.)\n * @return {*} A version of the value that's safe to use in the given context, or throws an\n * exception if this is impossible.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n // If maybeTrusted is a trusted class instance or subclass instance, then unwrap and return\n // as-is.\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n\n // If maybeTrusted is a trusted class instance but not of the correct trusted type\n // then unwrap it and allow it to pass through to the rest of the checks\n if (isFunction(maybeTrusted.$$unwrapTrustedValue)) {\n maybeTrusted = maybeTrusted.$$unwrapTrustedValue();\n }\n\n // If we get here, then we will either sanitize the value or throw an exception.\n if (type === SCE_CONTEXTS.MEDIA_URL || type === SCE_CONTEXTS.URL) {\n // we attempt to sanitize non-resource URLs\n return $$sanitizeUri(maybeTrusted.toString(), type === SCE_CONTEXTS.MEDIA_URL);\n } else if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n // htmlSanitizer throws its own error when no sanitizer is available.\n return htmlSanitizer(maybeTrusted);\n }\n // Default error when the $sce service has no way to make the input safe.\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @this\n *\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * ## Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS constrains bindings to only render\n * trusted values. Its goal is to assist in writing code in a way that (a) is secure by default, and\n * (b) makes auditing for security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * ### Overview\n *\n * To systematically block XSS security bugs, AngularJS treats all values as untrusted by default in\n * HTML or sensitive URL bindings. When binding untrusted values, AngularJS will automatically\n * run security checks on them (sanitizations, trusted URL resource, depending on context), or throw\n * when it cannot guarantee the security of the result. That behavior depends strongly on contexts:\n * HTML can be sanitized, but template URLs cannot, for instance.\n *\n * To illustrate this, consider the `ng-bind-html` directive. It renders its value directly as HTML:\n * we call that the *context*. When given an untrusted input, AngularJS will attempt to sanitize it\n * before rendering if a sanitizer is available, and throw otherwise. To bypass sanitization and\n * render the input as-is, you will need to mark it as trusted for that context before attempting\n * to bind it.\n *\n * As of version 1.2, AngularJS ships with SCE enabled by default.\n *\n * ### In practice\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * <input ng-model=\"userHtml\" aria-label=\"User input\">\n * <div ng-bind-html=\"userHtml\"></div>\n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV, which would\n * be an XSS security bug. In a more realistic example, one may be rendering user comments, blog\n * articles, etc. via bindings. (HTML is just one example of a context where rendering user\n * controlled input creates security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, AngularJS makes sure bindings go through that sanitization, or\n * any similar validation process, unless there's a good reason to trust the given value in this\n * context. That trust is formalized with a function call. This means that as a developer, you\n * can assume all untrusted bindings are safe. Then, to audit your code for binding security issues,\n * you just need to ensure the values you mark as trusted indeed are safe - because they were\n * received from your server, sanitized by your library, etc. You can organize your codebase to\n * help with this - perhaps allowing only the files in a specific directory to do this.\n * Ensuring that the internal API exposed by that code doesn't markup arbitrary values as safe then\n * becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * build the trusted versions of your values.\n *\n * ### How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Think of this function as\n * a way to enforce the required security context in your data sink. Directives use {@link\n * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs\n * the {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals. Also,\n * when binding without directives, AngularJS will understand the context of your bindings\n * automatically.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ### Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, AngularJS only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either add them to the {@link ng.$sceDelegateProvider#trustedResourceUrlList\n * trustedResourceUrlList} or {@link ng.$sce#trustAsResourceUrl wrap them} into trusted values.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ### This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (e.g.\n * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works (remember to include the\n * `ngSanitize` module). The `$sceDelegate` will also use the `$sanitize` service if it is available\n * when binding untrusted values to `$sce.HTML` context.\n * AngularJS provides an implementation in `angular-sanitize.js`, and if you\n * wish to use it, you will also need to depend on the {@link ngSanitize `ngSanitize`} module in\n * your application.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#trustedResourceUrlList trusted resource URL list} and {@link\n * ng.$sceDelegateProvider#bannedResourceUrlList banned resource URL list} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * <a name=\"contexts\"></a>\n * ### What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.MEDIA_URL` | For URLs that are safe to render as media. Is automatically converted from string by sanitizing when needed. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Is automatically converted from string by sanitizing when needed. Note that `$sce.URL` makes a stronger statement about the URL than `$sce.MEDIA_URL` does and therefore contexts requiring values trusted for `$sce.URL` can be used anywhere that values trusted for `$sce.MEDIA_URL` are required.|\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` or `$sce.MEDIA_URL` do and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` or `$sce.MEDIA_URL` are required. <br><br> The {@link $sceDelegateProvider#trustedResourceUrlList $sceDelegateProvider#trustedResourceUrlList()} and {@link $sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider#bannedResourceUrlList()} can be used to restrict trusted origins for `RESOURCE_URL` |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n *\n * <div class=\"alert alert-warning\">\n * Be aware that, before AngularJS 1.7.0, `a[href]` and `img[src]` used to sanitize their\n * interpolated values directly rather than rely upon {@link ng.$sce#getTrusted `$sce.getTrusted`}.\n *\n * **As of 1.7.0, this is no longer the case.**\n *\n * Now such interpolations are marked as requiring `$sce.URL` (for `a[href]`) or `$sce.MEDIA_URL`\n * (for `img[src]`), so that the sanitization happens (via `$sce.getTrusted...`) when the `$interpolate`\n * service evaluates the expressions.\n * </div>\n *\n * There are no CSS or JS context bindings in AngularJS currently, so their corresponding `$sce.trustAs`\n * functions aren't useful yet. This might evolve.\n *\n * ### Format of items in {@link ng.$sceDelegateProvider#trustedResourceUrlList trustedResourceUrlList}/{@link ng.$sceDelegateProvider#bannedResourceUrlList bannedResourceUrlList} <a name=\"resourceUrlPatternItem\"></a>\n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use\n * for matching resource URL lists.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. E.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ### Show me an example using SCE.\n *\n * <example module=\"mySceApp\" deps=\"angular-sanitize.js\" name=\"sce-service\">\n * <file name=\"index.html\">\n * <div ng-controller=\"AppController as myCtrl\">\n * <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n * <b>User comments</b><br>\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n * <div class=\"well\">\n * <div ng-repeat=\"userComment in myCtrl.userComments\">\n * <b>{{userComment.name}}</b>:\n * <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n * <br>\n * </div>\n * </div>\n * </div>\n * </file>\n *\n * <file name=\"script.js\">\n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function AppController($http, $templateCache, $sce) {\n * var self = this;\n * $http.get('test_data.json', {cache: $templateCache}).then(function(response) {\n * self.userComments = response.data;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * '<span onmouseover=\"this.textContent="Explicitly trusted HTML bypasses ' +\n * 'sanitization."\">Hover over this text.</span>');\n * }]);\n * </file>\n *\n * <file name=\"test_data.json\">\n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"<i>Yes!</i> Am I the only other one?\"\n * }\n * ]\n * </file>\n *\n * <file name=\"protractor.js\" type=\"protractor\">\n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML'))\n * .toBe('<span>Is <i>anyone</i> reading this?</span>');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe(\n * '<span onmouseover=\"this.textContent="Explicitly trusted HTML bypasses ' +\n * 'sanitization."\">Hover over this text.</span>');\n * });\n * });\n * </file>\n * </example>\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time. Also do note that this is an app-wide setting, so if\n * you are writing a library, you will cause security bugs applications using it.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects or libraries.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE application-wide.\n * @return {boolean} True if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function(value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we may not use\n * inheritance anymore. That is OK because no code outside of sce.js and sceSpecs.js would need to\n * be aware of this detail.\n */\n\n this.$get = ['$parse', '$sceDelegate', function(\n $parse, $sceDelegate) {\n // Support: IE 9-11 only\n // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && msie < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +\n 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} True if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function() {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts AngularJS {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function(value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, returns a\n * wrapped object that represents your value, and the trust you have in its safety for the given\n * context. AngularJS can then use that value as-is in bindings of the specified secure context.\n * This is used in bindings for `ng-bind-html`, `ng-include`, and most `src` attribute\n * interpolations. See {@link ng.$sce $sce} for strict contextual escaping.\n *\n * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,\n * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.\n *\n * @param {*} value The value that that should be considered trusted.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in the context you specified.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.HTML` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.HTML` context (like `ng-bind-html`).\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsCss\n *\n * @description\n * Shorthand method. `$sce.trustAsCss(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.CSS, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.CSS` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant\n * of your `value` in `$sce.CSS` context. This context is currently unused, so there are\n * almost no reasons to use this function so far.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.URL` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.URL` context. That context is currently unused, so there are almost no reasons\n * to use this function so far.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.RESOURCE_URL` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.RESOURCE_URL` context (template URLs in `ng-include`, most `src` attribute\n * bindings, ...)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.JS` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.JS` context. That context is currently unused, so there are almost no reasons to\n * use this function so far.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes any input, and either returns a value that's safe to use in the specified context,\n * or throws an exception. This function is aware of trusted values created by the `trustAs`\n * function and its shorthands, and when contexts are appropriate, returns the unwrapped value\n * as-is. Finally, this function can also throw when there is no way to turn `maybeTrusted` in a\n * safe value (e.g., no sanitization is available or possible.)\n *\n * @param {string} type The context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs\n * `$sce.trustAs`} call, or anything else (which will not be considered trusted.)\n * @return {*} A version of the value that's safe to use in the given context, or throws an\n * exception if this is impossible.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function(enumValue, name) {\n var lName = lowercase(name);\n sce[snakeToCamel('parse_as_' + lName)] = function(expr) {\n return parse(enumValue, expr);\n };\n sce[snakeToCamel('get_trusted_' + lName)] = function(value) {\n return getTrusted(enumValue, value);\n };\n sce[snakeToCamel('trust_as_' + lName)] = function(value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/* exported $SnifferProvider */\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n * @this\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n // Chrome Packaged Apps are not allowed to access `history.pushState`.\n // If not sandboxed, they can be detected by the presence of `chrome.app.runtime`\n // (see https://developer.chrome.com/apps/api_index). If sandboxed, they can be detected by\n // the presence of an extension runtime ID and the absence of other Chrome runtime APIs\n // (see https://developer.chrome.com/apps/manifest/sandbox).\n // (NW.js apps have access to Chrome APIs, but do support `history`.)\n isNw = $window.nw && $window.nw.process,\n isChromePackagedApp =\n !isNw &&\n $window.chrome &&\n ($window.chrome.app && $window.chrome.app.runtime ||\n !$window.chrome.app && $window.chrome.runtime && $window.chrome.runtime.id),\n hasHistoryPushState = !isChromePackagedApp && $window.history && $window.history.pushState,\n android =\n toInt((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false;\n\n if (bodyStyle) {\n // Support: Android <5, Blackberry Browser 10, default Chrome in Android 4.4.x\n // Mentioned browsers need a -webkit- prefix for transitions & animations.\n transitions = !!('transition' in bodyStyle || 'webkitTransition' in bodyStyle);\n animations = !!('animation' in bodyStyle || 'webkitAnimation' in bodyStyle);\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n history: !!(hasHistoryPushState && !(android < 4) && !boxee),\n hasEvent: function(event) {\n // Support: IE 9-11 only\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n // IE10+ implements 'input' event but it erroneously fires under various situations,\n // e.g. when placeholder changes, or a form is focused.\n if (event === 'input' && msie) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n transitions: transitions,\n animations: animations,\n android: android\n };\n }];\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $$taskTrackerFactory\n * @description\n * A function to create `TaskTracker` instances.\n *\n * A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested\n * parties when all pending tasks (or tasks of a specific type) have been completed.\n *\n * @param {$log} log - A logger instance (such as `$log`). Used to log error during callback\n * execution.\n *\n * @this\n */\nfunction $$TaskTrackerFactoryProvider() {\n this.$get = valueFn(function(log) { return new TaskTracker(log); });\n}\n\nfunction TaskTracker(log) {\n var self = this;\n var taskCounts = {};\n var taskCallbacks = [];\n\n var ALL_TASKS_TYPE = self.ALL_TASKS_TYPE = '$$all$$';\n var DEFAULT_TASK_TYPE = self.DEFAULT_TASK_TYPE = '$$default$$';\n\n /**\n * Execute the specified function and decrement the appropriate `taskCounts` counter.\n * If the counter reaches 0, all corresponding `taskCallbacks` are executed.\n *\n * @param {Function} fn - The function to execute.\n * @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task that is being completed.\n */\n self.completeTask = completeTask;\n\n /**\n * Increase the task count for the specified task type (or the default task type if non is\n * specified).\n *\n * @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task whose count will be increased.\n */\n self.incTaskCount = incTaskCount;\n\n /**\n * Execute the specified callback when all pending tasks have been completed.\n *\n * If there are no pending tasks, the callback is executed immediately. You can optionally limit\n * the tasks that will be waited for to a specific type, by passing a `taskType`.\n *\n * @param {function} callback - The function to call when there are no pending tasks.\n * @param {string=} [taskType=ALL_TASKS_TYPE] - The type of tasks that will be waited for.\n */\n self.notifyWhenNoPendingTasks = notifyWhenNoPendingTasks;\n\n function completeTask(fn, taskType) {\n taskType = taskType || DEFAULT_TASK_TYPE;\n\n try {\n fn();\n } finally {\n decTaskCount(taskType);\n\n var countForType = taskCounts[taskType];\n var countForAll = taskCounts[ALL_TASKS_TYPE];\n\n // If at least one of the queues (`ALL_TASKS_TYPE` or `taskType`) is empty, run callbacks.\n if (!countForAll || !countForType) {\n var getNextCallback = !countForAll ? getLastCallback : getLastCallbackForType;\n var nextCb;\n\n while ((nextCb = getNextCallback(taskType))) {\n try {\n nextCb();\n } catch (e) {\n log.error(e);\n }\n }\n }\n }\n }\n\n function decTaskCount(taskType) {\n taskType = taskType || DEFAULT_TASK_TYPE;\n if (taskCounts[taskType]) {\n taskCounts[taskType]--;\n taskCounts[ALL_TASKS_TYPE]--;\n }\n }\n\n function getLastCallback() {\n var cbInfo = taskCallbacks.pop();\n return cbInfo && cbInfo.cb;\n }\n\n function getLastCallbackForType(taskType) {\n for (var i = taskCallbacks.length - 1; i >= 0; --i) {\n var cbInfo = taskCallbacks[i];\n if (cbInfo.type === taskType) {\n taskCallbacks.splice(i, 1);\n return cbInfo.cb;\n }\n }\n }\n\n function incTaskCount(taskType) {\n taskType = taskType || DEFAULT_TASK_TYPE;\n taskCounts[taskType] = (taskCounts[taskType] || 0) + 1;\n taskCounts[ALL_TASKS_TYPE] = (taskCounts[ALL_TASKS_TYPE] || 0) + 1;\n }\n\n function notifyWhenNoPendingTasks(callback, taskType) {\n taskType = taskType || ALL_TASKS_TYPE;\n if (!taskCounts[taskType]) {\n callback();\n } else {\n taskCallbacks.push({type: taskType, cb: callback});\n }\n }\n}\n\nvar $templateRequestMinErr = minErr('$templateRequest');\n\n/**\n * @ngdoc provider\n * @name $templateRequestProvider\n * @this\n *\n * @description\n * Used to configure the options passed to the {@link $http} service when making a template request.\n *\n * For example, it can be used for specifying the \"Accept\" header that is sent to the server, when\n * requesting a template.\n */\nfunction $TemplateRequestProvider() {\n\n var httpOptions;\n\n /**\n * @ngdoc method\n * @name $templateRequestProvider#httpOptions\n * @description\n * The options to be passed to the {@link $http} service when making the request.\n * You can use this to override options such as the \"Accept\" header for template requests.\n *\n * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the\n * options if not overridden here.\n *\n * @param {string=} value new value for the {@link $http} options.\n * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter.\n */\n this.httpOptions = function(val) {\n if (val) {\n httpOptions = val;\n return this;\n }\n return httpOptions;\n };\n\n /**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service runs security checks then downloads the provided template using\n * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request\n * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the\n * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the\n * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted\n * when `tpl` is of type string and `$templateCache` has the matching entry.\n *\n * If you want to pass custom options to the `$http` service, such as setting the Accept header you\n * can configure this via {@link $templateRequestProvider#httpOptions}.\n *\n * `$templateRequest` is used internally by {@link $compile}, {@link ngRoute.$route}, and directives such\n * as {@link ngInclude} to download and cache templates.\n *\n * 3rd party modules should use `$templateRequest` if their services or directives are loading\n * templates.\n *\n * @param {string|TrustedResourceUrl} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} a promise for the HTTP response data of the given URL.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\n this.$get = ['$exceptionHandler', '$templateCache', '$http', '$q', '$sce',\n function($exceptionHandler, $templateCache, $http, $q, $sce) {\n\n function handleRequestFn(tpl, ignoreRequestError) {\n handleRequestFn.totalPendingRequests++;\n\n // We consider the template cache holds only trusted templates, so\n // there's no need to go through adding the template again to the trusted\n // resources for keys that already are included in there. This also makes\n // AngularJS accept any script directive, no matter its name. However, we\n // still need to unwrap trusted types.\n if (!isString(tpl) || isUndefined($templateCache.get(tpl))) {\n tpl = $sce.getTrustedResourceUrl(tpl);\n }\n\n var transformResponse = $http.defaults && $http.defaults.transformResponse;\n\n if (isArray(transformResponse)) {\n transformResponse = transformResponse.filter(function(transformer) {\n return transformer !== defaultHttpResponseTransform;\n });\n } else if (transformResponse === defaultHttpResponseTransform) {\n transformResponse = null;\n }\n\n return $http.get(tpl, extend({\n cache: $templateCache,\n transformResponse: transformResponse\n }, httpOptions))\n .finally(function() {\n handleRequestFn.totalPendingRequests--;\n })\n .then(function(response) {\n return $templateCache.put(tpl, response.data);\n }, handleError);\n\n function handleError(resp) {\n if (!ignoreRequestError) {\n resp = $templateRequestMinErr('tpload',\n 'Failed to load template: {0} (HTTP status: {1} {2})',\n tpl, resp.status, resp.statusText);\n\n $exceptionHandler(resp);\n }\n\n return $q.reject(resp);\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }\n ];\n}\n\n/** @this */\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + escapeForRegexp(expression) + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) !== -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when all pending tasks are completed.\n *\n * Types of tasks waited for include:\n * - Pending timeouts (via {@link $timeout}).\n * - Pending HTTP requests (via {@link $http}).\n * - In-progress route transitions (via {@link $route}).\n * - Pending tasks scheduled via {@link $rootScope#$applyAsync}.\n * - Pending tasks scheduled via {@link $rootScope#$evalAsync}.\n * These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nvar $timeoutMinErr = minErr('$timeout');\n\n/** @this */\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * AngularJS's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of calling `$timeout` is a promise, which will be resolved when\n * the delay has passed and the timeout function, if provided, is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * If you only want a promise that will be resolved after some specified delay\n * then you can call `$timeout` without the `fn` function.\n *\n * @param {function()=} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @param {...*=} Pass additional parameters to the executed function.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise\n * will be resolved with the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n if (!isFunction(fn)) {\n invokeApply = delay;\n delay = fn;\n fn = noop;\n }\n\n var args = sliceArgs(arguments, 3),\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn.apply(null, args));\n } catch (e) {\n deferred.reject(e);\n $exceptionHandler(e);\n } finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay, '$timeout');\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (!promise) return false;\n\n if (!promise.hasOwnProperty('$$timeoutId')) {\n throw $timeoutMinErr('badprom',\n '`$timeout.cancel()` called with a promise that was not generated by `$timeout()`.');\n }\n\n if (!deferreds.hasOwnProperty(promise.$$timeoutId)) return false;\n\n var id = promise.$$timeoutId;\n var deferred = deferreds[id];\n\n // Timeout cancels should not report an unhandled promise.\n markQExceptionHandled(deferred.promise);\n deferred.reject('canceled');\n delete deferreds[id];\n\n return $browser.defer.cancel(id);\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = window.document.createElement('a');\nvar originUrl = urlResolve(window.location.href);\nvar baseUrlParsingNode;\n\nurlParsingNode.href = 'http://[::1]';\n\n// Support: IE 9-11 only, Edge 16-17 only (fixed in 18 Preview)\n// IE/Edge don't wrap IPv6 addresses' hostnames in square brackets\n// when parsed out of an anchor element.\nvar ipv6InBrackets = urlParsingNode.hostname === '[::1]';\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+ etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string|object} url The URL to be parsed. If `url` is not a string, it will be returned\n * unchanged.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|------------------------------------------------------------------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol without the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol |\n * | hostname | The hostname |\n * | port | The port, without \":\" |\n * | pathname | The pathname, beginning with \"/\" |\n *\n */\nfunction urlResolve(url) {\n if (!isString(url)) return url;\n\n var href = url;\n\n // Support: IE 9-11 only\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n var hostname = urlParsingNode.hostname;\n\n if (!ipv6InBrackets && hostname.indexOf(':') > -1) {\n hostname = '[' + hostname + ']';\n }\n\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application\n * document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n return urlsAreSameOrigin(requestUrl, originUrl);\n}\n\n/**\n * Parse a request URL and determine whether it is same-origin as the current document base URL.\n *\n * Note: The base URL is usually the same as the document location (`location.href`) but can\n * be overriden by using the `<base>` tag.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the URL is same-origin as the document base URL.\n */\nfunction urlIsSameOriginAsBaseUrl(requestUrl) {\n return urlsAreSameOrigin(requestUrl, getBaseUrl());\n}\n\n/**\n * Create a function that can check a URL's origin against a list of allowed/trusted origins.\n * The current location's origin is implicitly trusted.\n *\n * @param {string[]} trustedOriginUrls - A list of URLs (strings), whose origins are trusted.\n *\n * @returns {Function} - A function that receives a URL (string or parsed URL object) and returns\n * whether it is of an allowed origin.\n */\nfunction urlIsAllowedOriginFactory(trustedOriginUrls) {\n var parsedAllowedOriginUrls = [originUrl].concat(trustedOriginUrls.map(urlResolve));\n\n /**\n * Check whether the specified URL (string or parsed URL object) has an origin that is allowed\n * based on a list of trusted-origin URLs. The current location's origin is implicitly\n * trusted.\n *\n * @param {string|Object} requestUrl - The URL to be checked (provided as a string that will be\n * resolved or a parsed URL object).\n *\n * @returns {boolean} - Whether the specified URL is of an allowed origin.\n */\n return function urlIsAllowedOrigin(requestUrl) {\n var parsedUrl = urlResolve(requestUrl);\n return parsedAllowedOriginUrls.some(urlsAreSameOrigin.bind(null, parsedUrl));\n };\n}\n\n/**\n * Determine if two URLs share the same origin.\n *\n * @param {string|Object} url1 - First URL to compare as a string or a normalized URL in the form of\n * a dictionary object returned by `urlResolve()`.\n * @param {string|object} url2 - Second URL to compare as a string or a normalized URL in the form\n * of a dictionary object returned by `urlResolve()`.\n *\n * @returns {boolean} - True if both URLs have the same origin, and false otherwise.\n */\nfunction urlsAreSameOrigin(url1, url2) {\n url1 = urlResolve(url1);\n url2 = urlResolve(url2);\n\n return (url1.protocol === url2.protocol &&\n url1.host === url2.host);\n}\n\n/**\n * Returns the current document base URL.\n * @returns {string}\n */\nfunction getBaseUrl() {\n if (window.document.baseURI) {\n return window.document.baseURI;\n }\n\n // `document.baseURI` is available everywhere except IE\n if (!baseUrlParsingNode) {\n baseUrlParsingNode = window.document.createElement('a');\n baseUrlParsingNode.href = '.';\n\n // Work-around for IE bug described in Implementation Notes. The fix in `urlResolve()` is not\n // suitable here because we need to track changes to the base URL.\n baseUrlParsingNode = baseUrlParsingNode.cloneNode(false);\n }\n return baseUrlParsingNode.href;\n}\n\n/**\n * @ngdoc service\n * @name $window\n * @this\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In AngularJS we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n <example module=\"windowExample\" name=\"window-service\">\n <file name=\"index.html\">\n <script>\n angular.module('windowExample', [])\n .controller('ExampleController', ['$scope', '$window', function($scope, $window) {\n $scope.greeting = 'Hello, World!';\n $scope.doGreeting = function(greeting) {\n $window.alert(greeting);\n };\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <input type=\"text\" ng-model=\"greeting\" aria-label=\"greeting\" />\n <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n </file>\n </example>\n */\nfunction $WindowProvider() {\n this.$get = valueFn(window);\n}\n\n/**\n * @name $$cookieReader\n * @requires $document\n *\n * @description\n * This is a private service for reading cookies used by $http and ngCookies\n *\n * @return {Object} a key/value map of the current cookies\n */\nfunction $$CookieReader($document) {\n var rawDocument = $document[0] || {};\n var lastCookies = {};\n var lastCookieString = '';\n\n function safeGetCookie(rawDocument) {\n try {\n return rawDocument.cookie || '';\n } catch (e) {\n return '';\n }\n }\n\n function safeDecodeURIComponent(str) {\n try {\n return decodeURIComponent(str);\n } catch (e) {\n return str;\n }\n }\n\n return function() {\n var cookieArray, cookie, i, index, name;\n var currentCookieString = safeGetCookie(rawDocument);\n\n if (currentCookieString !== lastCookieString) {\n lastCookieString = currentCookieString;\n cookieArray = lastCookieString.split('; ');\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = safeDecodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (isUndefined(lastCookies[name])) {\n lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n };\n}\n\n$$CookieReader.$inject = ['$document'];\n\n/** @this */\nfunction $$CookieReaderProvider() {\n this.$get = $$CookieReader;\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how AngularJS filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the AngularJS Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * They can be used in view templates, controllers or services. AngularJS comes\n * with a collection of [built-in filters](api/ng/filter), but it is easy to\n * define your own as well.\n *\n * The general syntax in templates is as follows:\n *\n * ```html\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n * ```\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n <example name=\"$filter\" module=\"filterExample\">\n <file name=\"index.html\">\n <div ng-controller=\"MainCtrl\">\n <h3>{{ originalText }}</h3>\n <h3>{{ filteredText }}</h3>\n </div>\n </file>\n\n <file name=\"script.js\">\n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n </file>\n </example>\n */\n$FilterProvider.$inject = ['$provide'];\n/** @this */\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if (isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * <div class=\"alert alert-info\">\n * **Note**: If the array contains objects that reference themselves, filtering is not possible.\n * </div>\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is used for matching against the contents of the `array`. All strings or\n * objects with string properties in `array` that match this string will be returned. This also\n * applies to nested object properties.\n * The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name (`$` by default) can be used (e.g. as in `{$: \"text\"}`) to accept a match\n * against any property of the object or its nested object properties. That's equivalent to the\n * simple substring match with a `string` as described above. The special property name can be\n * overwritten, using the `anyPropertyKey` parameter.\n * The predicate can be negated by prefixing the string with `!`.\n * For example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * Note that a named property will match properties on the same level only, while the special\n * `$` property will match properties on the same level or deeper. E.g. an array item like\n * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but\n * **will** be matched by `{$: 'John'}`.\n *\n * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.\n * The function is called for each element of the array, with the element, its index, and\n * the entire array itself as arguments.\n *\n * The final result is an array of those elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|false} [comparator] Comparator which is used in\n * determining if values retrieved using `expression` (when it is not a function) should be\n * considered a match based on the expected value (from the filter expression) and actual\n * value (from the object in the array).\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if both values should be considered equal.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.\n * This is essentially strict comparison of expected and actual.\n *\n * - `false`: A short hand for a function which will look for a substring match in a case\n * insensitive way. Primitive values are converted to strings. Objects are not compared against\n * primitives, unless they have a custom `toString` method (e.g. `Date` objects).\n *\n *\n * Defaults to `false`.\n *\n * @param {string} [anyPropertyKey] The special property name that matches against any property.\n * By default `$`.\n *\n * @example\n <example name=\"filter-filter\">\n <file name=\"index.html\">\n <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n {name:'Mary', phone:'800-BIG-MARY'},\n {name:'Mike', phone:'555-4321'},\n {name:'Adam', phone:'555-5678'},\n {name:'Julie', phone:'555-8765'},\n {name:'Juliette', phone:'555-5678'}]\"></div>\n\n <label>Search: <input ng-model=\"searchText\"></label>\n <table id=\"searchTextResults\">\n <tr><th>Name</th><th>Phone</th></tr>\n <tr ng-repeat=\"friend in friends | filter:searchText\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n </tr>\n </table>\n <hr>\n <label>Any: <input ng-model=\"search.$\"></label> <br>\n <label>Name only <input ng-model=\"search.name\"></label><br>\n <label>Phone only <input ng-model=\"search.phone\"></label><br>\n <label>Equality <input type=\"checkbox\" ng-model=\"strict\"></label><br>\n <table id=\"searchObjResults\">\n <tr><th>Name</th><th>Phone</th></tr>\n <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n <td>{{friendObj.name}}</td>\n <td>{{friendObj.phone}}</td>\n </tr>\n </table>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n </file>\n </example>\n */\n\nfunction filterFilter() {\n return function(array, expression, comparator, anyPropertyKey) {\n if (!isArrayLike(array)) {\n if (array == null) {\n return array;\n } else {\n throw minErr('filter')('notarray', 'Expected array but received: {0}', array);\n }\n }\n\n anyPropertyKey = anyPropertyKey || '$';\n var expressionType = getTypeForFilter(expression);\n var predicateFn;\n var matchAgainstAnyProp;\n\n switch (expressionType) {\n case 'function':\n predicateFn = expression;\n break;\n case 'boolean':\n case 'null':\n case 'number':\n case 'string':\n matchAgainstAnyProp = true;\n // falls through\n case 'object':\n predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp);\n break;\n default:\n return array;\n }\n\n return Array.prototype.filter.call(array, predicateFn);\n };\n}\n\n// Helper functions for `filterFilter`\nfunction createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) {\n var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression);\n var predicateFn;\n\n if (comparator === true) {\n comparator = equals;\n } else if (!isFunction(comparator)) {\n comparator = function(actual, expected) {\n if (isUndefined(actual)) {\n // No substring matching against `undefined`\n return false;\n }\n if ((actual === null) || (expected === null)) {\n // No substring matching against `null`; only match against `null`\n return actual === expected;\n }\n if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {\n // Should not compare primitives against objects, unless they have custom `toString` method\n return false;\n }\n\n actual = lowercase('' + actual);\n expected = lowercase('' + expected);\n return actual.indexOf(expected) !== -1;\n };\n }\n\n predicateFn = function(item) {\n if (shouldMatchPrimitives && !isObject(item)) {\n return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false);\n }\n return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp);\n };\n\n return predicateFn;\n}\n\nfunction deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {\n var actualType = getTypeForFilter(actual);\n var expectedType = getTypeForFilter(expected);\n\n if ((expectedType === 'string') && (expected.charAt(0) === '!')) {\n return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp);\n } else if (isArray(actual)) {\n // In case `actual` is an array, consider it a match\n // if ANY of it's items matches `expected`\n return actual.some(function(item) {\n return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp);\n });\n }\n\n switch (actualType) {\n case 'object':\n var key;\n if (matchAgainstAnyProp) {\n for (key in actual) {\n // Under certain, rare, circumstances, key may not be a string and `charAt` will be undefined\n // See: https://github.com/angular/angular.js/issues/15644\n if (key.charAt && (key.charAt(0) !== '$') &&\n deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {\n return true;\n }\n }\n return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false);\n } else if (expectedType === 'object') {\n for (key in expected) {\n var expectedVal = expected[key];\n if (isFunction(expectedVal) || isUndefined(expectedVal)) {\n continue;\n }\n\n var matchAnyProperty = key === anyPropertyKey;\n var actualVal = matchAnyProperty ? actual : actual[key];\n if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) {\n return false;\n }\n }\n return true;\n } else {\n return comparator(actual, expected);\n }\n case 'function':\n return false;\n default:\n return comparator(actual, expected);\n }\n}\n\n// Used for easily differentiating between `null` and actual `object`\nfunction getTypeForFilter(val) {\n return (val === null) ? 'null' : typeof val;\n}\n\nvar MAX_DIGITS = 22;\nvar DECIMAL_SEP = '.';\nvar ZERO_CHAR = '0';\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale\n * @returns {string} Formatted number.\n *\n *\n * @example\n <example module=\"currencyExample\" name=\"currency-filter\">\n <file name=\"index.html\">\n <script>\n angular.module('currencyExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.amount = 1234.56;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <input type=\"number\" ng-model=\"amount\" aria-label=\"amount\"> <br>\n default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n custom currency identifier (USD$): <span id=\"currency-custom\">{{amount | currency:\"USD$\"}}</span><br>\n no fractions (0): <span id=\"currency-no-fractions\">{{amount | currency:\"USD$\":0}}</span>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');\n expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');\n });\n it('should update', function() {\n if (browser.params.browser === 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');\n expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');\n expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');\n });\n </file>\n </example>\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol, fractionSize) {\n if (isUndefined(currencySymbol)) {\n currencySymbol = formats.CURRENCY_SYM;\n }\n\n if (isUndefined(fractionSize)) {\n fractionSize = formats.PATTERNS[1].maxFrac;\n }\n\n // If the currency symbol is empty, trim whitespace around the symbol\n var currencySymbolRe = !currencySymbol ? /\\s*\\u00A4\\s*/g : /\\u00A4/g;\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).\n replace(currencySymbolRe, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is null or undefined, it will just be returned.\n * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively.\n * If the input is not a number an empty string is returned.\n *\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to `fractionSize` appropriately formatted based on the current\n * locale (e.g., in the en_US locale it will have \".\" as the decimal separator and\n * include \",\" group separators after each third digit).\n *\n * @example\n <example module=\"numberFilterExample\" name=\"number-filter\">\n <file name=\"index.html\">\n <script>\n angular.module('numberFilterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.val = 1234.56789;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Enter number: <input ng-model='val'></label><br>\n Default formatting: <span id='number-default'>{{val | number}}</span><br>\n No fractions: <span>{{val | number:0}}</span><br>\n Negative number: <span>{{-val | number:4}}</span>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n </file>\n </example>\n */\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\n/**\n * Parse a number (as a string) into three components that can be used\n * for formatting the number.\n *\n * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/)\n *\n * @param {string} numStr The number to parse\n * @return {object} An object describing this number, containing the following keys:\n * - d : an array of digits containing leading zeros as necessary\n * - i : the number of the digits in `d` that are to the left of the decimal point\n * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n *\n */\nfunction parse(numStr) {\n var exponent = 0, digits, numberOfIntegerDigits;\n var i, j, zeros;\n\n // Decimal point?\n if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i;\n numberOfIntegerDigits += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n } else if (numberOfIntegerDigits < 0) {\n // There was no decimal point or exponent so it is an integer.\n numberOfIntegerDigits = numStr.length;\n }\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 numberOfIntegerDigits = 1;\n } else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;\n\n // Trailing zeros are insignificant so ignore them\n numberOfIntegerDigits -= 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] = +numStr.charAt(i);\n }\n }\n\n // If the number overflows the maximum allowed digits then use an exponent.\n if (numberOfIntegerDigits > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = numberOfIntegerDigits - 1;\n numberOfIntegerDigits = 1;\n }\n\n return { d: digits, e: exponent, i: numberOfIntegerDigits };\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changed the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {\n var digits = parsedNumber.d;\n var fractionLen = digits.length - parsedNumber.i;\n\n // determine fractionSize if it is not specified; `+fractionSize` converts it to a number\n fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize;\n\n // The index of the digit to where rounding is to occur\n var roundAt = fractionSize + parsedNumber.i;\n var digit = digits[roundAt];\n\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.i, roundAt));\n\n // Set non-fractional digits beyond `roundAt` to 0\n for (var j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\n } else {\n // We rounded to zero so reset the parsedNumber\n fractionLen = Math.max(0, fractionLen);\n parsedNumber.i = 1;\n digits.length = Math.max(1, roundAt = fractionSize + 1);\n digits[0] = 0;\n for (var i = 1; i < roundAt; i++) digits[i] = 0;\n }\n\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (var k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.i++;\n }\n digits.unshift(1);\n parsedNumber.i++;\n } else {\n digits[roundAt - 1]++;\n }\n }\n\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n\n\n // Do any carrying, e.g. a digit was rounded up to 10\n var carry = digits.reduceRight(function(carry, d, i, digits) {\n d = d + carry;\n digits[i] = d % 10;\n return Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.i++;\n }\n}\n\n/**\n * Format a number into a string\n * @param {number} number The number to format\n * @param {{\n * minFrac, // the minimum number of digits required in the fraction part of the number\n * maxFrac, // the maximum number of digits required in the fraction part of the number\n * gSize, // number of digits in each group of separated digits\n * lgSize, // number of digits in the last group of digits before the decimal separator\n * negPre, // the string to go in front of a negative number (e.g. `-` or `(`))\n * posPre, // the string to go in front of a positive number\n * negSuf, // the string to go after a negative number (e.g. `)`)\n * posSuf // the string to go after a positive number\n * }} pattern\n * @param {string} groupSep The string to separate groups of number (e.g. `,`)\n * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`)\n * @param {[type]} fractionSize The size of the fractional part of the number\n * @return {string} The number formatted as a string\n */\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n\n if (!(isString(number) || isNumber(number)) || isNaN(number)) return '';\n\n var isInfinity = !isFinite(number);\n var isZero = false;\n var numStr = Math.abs(number) + '',\n formattedText = '',\n parsedNumber;\n\n if (isInfinity) {\n formattedText = '\\u221e';\n } else {\n parsedNumber = parse(numStr);\n\n roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac);\n\n var digits = parsedNumber.d;\n var integerLen = parsedNumber.i;\n var exponent = parsedNumber.e;\n var decimals = [];\n isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true);\n\n // pad zeros for small numbers\n while (integerLen < 0) {\n digits.unshift(0);\n integerLen++;\n }\n\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n } else {\n decimals = digits;\n digits = [0];\n }\n\n // format the integer digits with grouping separators\n var 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(groupSep);\n\n // append the decimal digits\n if (decimals.length) {\n formattedText += decimalSep + decimals.join('');\n }\n\n if (exponent) {\n formattedText += 'e+' + exponent;\n }\n }\n if (number < 0 && !isZero) {\n return pattern.negPre + formattedText + pattern.negSuf;\n } else {\n return pattern.posPre + formattedText + pattern.posSuf;\n }\n}\n\nfunction padNumber(num, digits, trim, negWrap) {\n var neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n } else {\n num = -num;\n neg = '-';\n }\n }\n num = '' + num;\n while (num.length < digits) num = ZERO_CHAR + num;\n if (trim) {\n num = num.substr(num.length - digits);\n }\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim, negWrap) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset) {\n value += offset;\n }\n if (value === 0 && offset === -12) value = 12;\n return padNumber(value, size, trim, negWrap);\n };\n}\n\nfunction dateStrGetter(name, shortForm, standAlone) {\n return function(date, formats) {\n var value = date['get' + name]();\n var propPrefix = (standAlone ? 'STANDALONE' : '') + (shortForm ? 'SHORT' : '');\n var get = uppercase(propPrefix + name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date, formats, offset) {\n var zone = -1 * offset;\n var paddedZone = (zone >= 0) ? '+' : '';\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nfunction eraGetter(date, formats) {\n return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];\n}\n\nfunction longEraGetter(date, formats) {\n return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4, 0, false, true),\n yy: dateGetter('FullYear', 2, 0, true, true),\n y: dateGetter('FullYear', 1, 0, false, true),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n LLLL: dateStrGetter('Month', false, true),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1),\n G: eraGetter,\n GG: eraGetter,\n GGG: eraGetter,\n GGGG: longEraGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\\s\\S]*)/,\n NUMBER_STRING = /^-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'LLLL'`: Stand-alone month in year (January-December)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year\n * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year\n * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')\n * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * Any other characters in the `format` string will be output as-is.\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the\n * continental US time zone abbreviations, but for general use, use a time zone offset, for\n * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n <example name=\"filter-date\">\n <file name=\"index.html\">\n <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n <span>{{1288323623006 | date:'medium'}}</span><br>\n <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n <span ng-non-bindable>{{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}</span>:\n <span>{{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}</span><br>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010-10-2\\d \\d{2}:\\d{2}:\\d{2} (-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n </file>\n </example>\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\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\n function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date) || !isFinite(date.getTime())) {\n return date;\n }\n\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n var dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n forEach(parts, function(value) {\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)\n : value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.\n * @returns {string} JSON string.\n *\n *\n * @example\n <example name=\"filter-json\">\n <file name=\"index.html\">\n <pre id=\"default-spacing\">{{ {'name':'value'} | json }}</pre>\n <pre id=\"custom-spacing\">{{ {'name':'value'} | json:4 }}</pre>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should jsonify filtered objects', function() {\n expect(element(by.id('default-spacing')).getText()).toMatch(/\\{\\n {2}\"name\": ?\"value\"\\n}/);\n expect(element(by.id('custom-spacing')).getText()).toMatch(/\\{\\n {4}\"name\": ?\"value\"\\n}/);\n });\n </file>\n </example>\n *\n */\nfunction jsonFilter() {\n return function(object, spacing) {\n if (isUndefined(spacing)) {\n spacing = 2;\n }\n return toJson(object, spacing);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n *\n * See the {@link ng.uppercase uppercase filter documentation} for a functionally identical example.\n *\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @example\n <example module=\"uppercaseFilterExample\" name=\"filter-uppercase\">\n <file name=\"index.html\">\n <script>\n angular.module('uppercaseFilterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.title = 'This is a title';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <!-- This title should be formatted normally -->\n <h1>{{title}}</h1>\n <!-- This title should be capitalized -->\n <h1>{{title | uppercase}}</h1>\n </div>\n </file>\n </example>\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements are\n * taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported\n * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input,\n * it is converted to a string.\n *\n * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited.\n * @param {string|number} limit - The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,\n * the input will be returned unchanged.\n * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index,\n * `begin` indicates an offset from the end of `input`. Defaults to `0`.\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had\n * less than `limit` elements.\n *\n * @example\n <example module=\"limitToExample\" name=\"limit-to-filter\">\n <file name=\"index.html\">\n <script>\n angular.module('limitToExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.numbers = [1,2,3,4,5,6,7,8,9];\n $scope.letters = \"abcdefghi\";\n $scope.longNumber = 2345432342;\n $scope.numLimit = 3;\n $scope.letterLimit = 3;\n $scope.longNumberLimit = 3;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>\n Limit {{numbers}} to:\n <input type=\"number\" step=\"1\" ng-model=\"numLimit\">\n </label>\n <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n <label>\n Limit {{letters}} to:\n <input type=\"number\" step=\"1\" ng-model=\"letterLimit\">\n </label>\n <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n <label>\n Limit {{longNumber}} to:\n <input type=\"number\" step=\"1\" ng-model=\"longNumberLimit\">\n </label>\n <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n </file>\n </example>\n*/\nfunction limitToFilter() {\n return function(input, limit, begin) {\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = toInt(limit);\n }\n if (isNumberNaN(limit)) return input;\n\n if (isNumber(input)) input = input.toString();\n if (!isArrayLike(input)) return input;\n\n begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);\n begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;\n\n if (limit >= 0) {\n return sliceFn(input, begin, begin + limit);\n } else {\n if (begin === 0) {\n return sliceFn(input, limit, input.length);\n } else {\n return sliceFn(input, Math.max(0, begin + limit), begin);\n }\n }\n };\n}\n\nfunction sliceFn(input, begin, end) {\n if (isString(input)) return input.slice(begin, end);\n\n return slice.call(input, begin, end);\n}\n\n/**\n * @ngdoc filter\n * @name orderBy\n * @kind function\n *\n * @description\n * Returns an array containing the items from the specified `collection`, ordered by a `comparator`\n * function based on the values computed using the `expression` predicate.\n *\n * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in\n * `[{id: 'bar'}, {id: 'foo'}]`.\n *\n * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray,\n * String, etc).\n *\n * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker\n * for the preceding one. The `expression` is evaluated against each item and the output is used\n * for comparing with other items.\n *\n * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in\n * ascending order.\n *\n * The comparison is done using the `comparator` function. If none is specified, a default, built-in\n * comparator is used (see below for details - in a nutshell, it compares numbers numerically and\n * strings alphabetically).\n *\n * ### Under the hood\n *\n * Ordering the specified `collection` happens in two phases:\n *\n * 1. All items are passed through the predicate (or predicates), and the returned values are saved\n * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed\n * through a predicate that extracts the value of the `label` property, would be transformed to:\n * ```\n * {\n * value: 'foo',\n * type: 'string',\n * index: ...\n * }\n * ```\n * **Note:** `null` values use `'null'` as their type.\n * 2. The comparator function is used to sort the items, based on the derived values, types and\n * indices.\n *\n * If you use a custom comparator, it will be called with pairs of objects of the form\n * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal\n * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the\n * second, or `1` otherwise.\n *\n * In order to ensure that the sorting will be deterministic across platforms, if none of the\n * specified predicates can distinguish between two items, `orderBy` will automatically introduce a\n * dummy predicate that returns the item's index as `value`.\n * (If you are using a custom comparator, make sure it can handle this predicate as well.)\n *\n * If a custom comparator still can't distinguish between two items, then they will be sorted based\n * on their index using the built-in comparator.\n *\n * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted\n * value for an item, `orderBy` will try to convert that object to a primitive value, before passing\n * it to the comparator. The following rules govern the conversion:\n *\n * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be\n * used instead.<br />\n * (If the object has a `valueOf()` method that returns another object, then the returned object\n * will be used in subsequent steps.)\n * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that\n * returns a primitive, its return value will be used instead.<br />\n * (If the object has a `toString()` method that returns another object, then the returned object\n * will be used in subsequent steps.)\n * 3. No conversion; the object itself is used.\n *\n * ### The default comparator\n *\n * The default, built-in comparator should be sufficient for most usecases. In short, it compares\n * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to\n * using their index in the original collection, sorts values of different types by type and puts\n * `undefined` and `null` values at the end of the sorted list.\n *\n * More specifically, it follows these steps to determine the relative order of items:\n *\n * 1. If the compared values are of different types:\n * - If one of the values is undefined, consider it \"greater than\" the other.\n * - Else if one of the values is null, consider it \"greater than\" the other.\n * - Else compare the types themselves alphabetically.\n * 2. If both values are of type `string`, compare them alphabetically in a case- and\n * locale-insensitive way.\n * 3. If both values are objects, compare their indices instead.\n * 4. Otherwise, return:\n * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`).\n * - `-1`, if the 1st value is \"less than\" the 2nd value (compared using the `<` operator).\n * - `1`, otherwise.\n *\n * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being\n * saved as numbers and not strings.\n * **Note:** For the purpose of sorting, `null` and `undefined` are considered \"greater than\"\n * any other value (with undefined \"greater than\" null). This effectively means that `null`\n * and `undefined` values end up at the end of a list sorted in ascending order.\n * **Note:** `null` values use `'null'` as their type to be able to distinguish them from objects.\n *\n * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.\n * @param {(Function|string|Array.<Function|string>)=} expression - A predicate (or list of\n * predicates) to be used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `Function`: A getter function. This function will be called with each item as argument and\n * the return value will be used for sorting.\n * - `string`: An AngularJS expression. This expression will be evaluated against each item and the\n * result will be used for sorting. For example, use `'label'` to sort by a property called\n * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label`\n * property.<br />\n * (The result of a constant expression is interpreted as a property name to be used for\n * comparison. For example, use `'\"special name\"'` (note the extra pair of quotes) to sort by a\n * property called `special name`.)<br />\n * An expression can be optionally prefixed with `+` or `-` to control the sorting direction,\n * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided,\n * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons.\n * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the\n * relative order of two items, the next predicate is used as a tie-breaker.\n *\n * **Note:** If the predicate is missing or empty then it defaults to `'+'`.\n *\n * @param {boolean=} reverse - If `true`, reverse the sorting order.\n * @param {(Function)=} comparator - The comparator function used to determine the relative order of\n * value pairs. If omitted, the built-in comparator will be used.\n *\n * @returns {Array} - The sorted array.\n *\n *\n * @example\n * ### Ordering a table with `ngRepeat`\n *\n * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by\n * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means\n * it defaults to the built-in comparator.\n *\n <example name=\"orderBy-static\" module=\"orderByExample1\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <table class=\"friends\">\n <tr>\n <th>Name</th>\n <th>Phone Number</th>\n <th>Age</th>\n </tr>\n <tr ng-repeat=\"friend in friends | orderBy:'-age'\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n <td>{{friend.age}}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('orderByExample1', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.friends = [\n {name: 'John', phone: '555-1212', age: 10},\n {name: 'Mary', phone: '555-9876', age: 19},\n {name: 'Mike', phone: '555-4321', age: 21},\n {name: 'Adam', phone: '555-5678', age: 35},\n {name: 'Julie', phone: '555-8765', age: 29}\n ];\n }]);\n </file>\n <file name=\"style.css\">\n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n // Element locators\n var names = element.all(by.repeater('friends').column('friend.name'));\n\n it('should sort friends by age in reverse order', function() {\n expect(names.get(0).getText()).toBe('Adam');\n expect(names.get(1).getText()).toBe('Julie');\n expect(names.get(2).getText()).toBe('Mike');\n expect(names.get(3).getText()).toBe('Mary');\n expect(names.get(4).getText()).toBe('John');\n });\n </file>\n </example>\n * <hr />\n *\n * @example\n * ### Changing parameters dynamically\n *\n * All parameters can be changed dynamically. The next example shows how you can make the columns of\n * a table sortable, by binding the `expression` and `reverse` parameters to scope properties.\n *\n <example name=\"orderBy-dynamic\" module=\"orderByExample2\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <pre>Sort by = {{propertyName}}; reverse = {{reverse}}</pre>\n <hr/>\n <button ng-click=\"propertyName = null; reverse = false\">Set to unsorted</button>\n <hr/>\n <table class=\"friends\">\n <tr>\n <th>\n <button ng-click=\"sortBy('name')\">Name</button>\n <span class=\"sortorder\" ng-show=\"propertyName === 'name'\" ng-class=\"{reverse: reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"sortBy('phone')\">Phone Number</button>\n <span class=\"sortorder\" ng-show=\"propertyName === 'phone'\" ng-class=\"{reverse: reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"sortBy('age')\">Age</button>\n <span class=\"sortorder\" ng-show=\"propertyName === 'age'\" ng-class=\"{reverse: reverse}\"></span>\n </th>\n </tr>\n <tr ng-repeat=\"friend in friends | orderBy:propertyName:reverse\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n <td>{{friend.age}}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('orderByExample2', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var friends = [\n {name: 'John', phone: '555-1212', age: 10},\n {name: 'Mary', phone: '555-9876', age: 19},\n {name: 'Mike', phone: '555-4321', age: 21},\n {name: 'Adam', phone: '555-5678', age: 35},\n {name: 'Julie', phone: '555-8765', age: 29}\n ];\n\n $scope.propertyName = 'age';\n $scope.reverse = true;\n $scope.friends = friends;\n\n $scope.sortBy = function(propertyName) {\n $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false;\n $scope.propertyName = propertyName;\n };\n }]);\n </file>\n <file name=\"style.css\">\n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n\n .sortorder:after {\n content: '\\25b2'; // BLACK UP-POINTING TRIANGLE\n }\n .sortorder.reverse:after {\n content: '\\25bc'; // BLACK DOWN-POINTING TRIANGLE\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n // Element locators\n var unsortButton = element(by.partialButtonText('unsorted'));\n var nameHeader = element(by.partialButtonText('Name'));\n var phoneHeader = element(by.partialButtonText('Phone'));\n var ageHeader = element(by.partialButtonText('Age'));\n var firstName = element(by.repeater('friends').column('friend.name').row(0));\n var lastName = element(by.repeater('friends').column('friend.name').row(4));\n\n it('should sort friends by some property, when clicking on the column header', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n phoneHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Mary');\n\n nameHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('Mike');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n });\n\n it('should sort friends in reverse order, when clicking on the same column', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n });\n\n it('should restore the original order, when clicking \"Set to unsorted\"', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n unsortButton.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Julie');\n });\n </file>\n </example>\n * <hr />\n *\n * @example\n * ### Using `orderBy` inside a controller\n *\n * It is also possible to call the `orderBy` filter manually, by injecting `orderByFilter`, and\n * calling it with the desired parameters. (Alternatively, you could inject the `$filter` factory\n * and retrieve the `orderBy` filter with `$filter('orderBy')`.)\n *\n <example name=\"orderBy-call-manually\" module=\"orderByExample3\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <pre>Sort by = {{propertyName}}; reverse = {{reverse}}</pre>\n <hr/>\n <button ng-click=\"sortBy(null)\">Set to unsorted</button>\n <hr/>\n <table class=\"friends\">\n <tr>\n <th>\n <button ng-click=\"sortBy('name')\">Name</button>\n <span class=\"sortorder\" ng-show=\"propertyName === 'name'\" ng-class=\"{reverse: reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"sortBy('phone')\">Phone Number</button>\n <span class=\"sortorder\" ng-show=\"propertyName === 'phone'\" ng-class=\"{reverse: reverse}\"></span>\n </th>\n <th>\n <button ng-click=\"sortBy('age')\">Age</button>\n <span class=\"sortorder\" ng-show=\"propertyName === 'age'\" ng-class=\"{reverse: reverse}\"></span>\n </th>\n </tr>\n <tr ng-repeat=\"friend in friends\">\n <td>{{friend.name}}</td>\n <td>{{friend.phone}}</td>\n <td>{{friend.age}}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('orderByExample3', [])\n .controller('ExampleController', ['$scope', 'orderByFilter', function($scope, orderBy) {\n var friends = [\n {name: 'John', phone: '555-1212', age: 10},\n {name: 'Mary', phone: '555-9876', age: 19},\n {name: 'Mike', phone: '555-4321', age: 21},\n {name: 'Adam', phone: '555-5678', age: 35},\n {name: 'Julie', phone: '555-8765', age: 29}\n ];\n\n $scope.propertyName = 'age';\n $scope.reverse = true;\n $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse);\n\n $scope.sortBy = function(propertyName) {\n $scope.reverse = (propertyName !== null && $scope.propertyName === propertyName)\n ? !$scope.reverse : false;\n $scope.propertyName = propertyName;\n $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse);\n };\n }]);\n </file>\n <file name=\"style.css\">\n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n\n .sortorder:after {\n content: '\\25b2'; // BLACK UP-POINTING TRIANGLE\n }\n .sortorder.reverse:after {\n content: '\\25bc'; // BLACK DOWN-POINTING TRIANGLE\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n // Element locators\n var unsortButton = element(by.partialButtonText('unsorted'));\n var nameHeader = element(by.partialButtonText('Name'));\n var phoneHeader = element(by.partialButtonText('Phone'));\n var ageHeader = element(by.partialButtonText('Age'));\n var firstName = element(by.repeater('friends').column('friend.name').row(0));\n var lastName = element(by.repeater('friends').column('friend.name').row(4));\n\n it('should sort friends by some property, when clicking on the column header', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n phoneHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Mary');\n\n nameHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('Mike');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n });\n\n it('should sort friends in reverse order, when clicking on the same column', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n });\n\n it('should restore the original order, when clicking \"Set to unsorted\"', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n unsortButton.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Julie');\n });\n </file>\n </example>\n * <hr />\n *\n * @example\n * ### Using a custom comparator\n *\n * If you have very specific requirements about the way items are sorted, you can pass your own\n * comparator function. For example, you might need to compare some strings in a locale-sensitive\n * way. (When specifying a custom comparator, you also need to pass a value for the `reverse`\n * argument - passing `false` retains the default sorting order, i.e. ascending.)\n *\n <example name=\"orderBy-custom-comparator\" module=\"orderByExample4\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <div class=\"friends-container custom-comparator\">\n <h3>Locale-sensitive Comparator</h3>\n <table class=\"friends\">\n <tr>\n <th>Name</th>\n <th>Favorite Letter</th>\n </tr>\n <tr ng-repeat=\"friend in friends | orderBy:'favoriteLetter':false:localeSensitiveComparator\">\n <td>{{friend.name}}</td>\n <td>{{friend.favoriteLetter}}</td>\n </tr>\n </table>\n </div>\n <div class=\"friends-container default-comparator\">\n <h3>Default Comparator</h3>\n <table class=\"friends\">\n <tr>\n <th>Name</th>\n <th>Favorite Letter</th>\n </tr>\n <tr ng-repeat=\"friend in friends | orderBy:'favoriteLetter'\">\n <td>{{friend.name}}</td>\n <td>{{friend.favoriteLetter}}</td>\n </tr>\n </table>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('orderByExample4', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.friends = [\n {name: 'John', favoriteLetter: 'Ä'},\n {name: 'Mary', favoriteLetter: 'Ãœ'},\n {name: 'Mike', favoriteLetter: 'Ö'},\n {name: 'Adam', favoriteLetter: 'H'},\n {name: 'Julie', favoriteLetter: 'Z'}\n ];\n\n $scope.localeSensitiveComparator = function(v1, v2) {\n // If we don't get strings, just compare by index\n if (v1.type !== 'string' || v2.type !== 'string') {\n return (v1.index < v2.index) ? -1 : 1;\n }\n\n // Compare strings alphabetically, taking locale into account\n return v1.value.localeCompare(v2.value);\n };\n }]);\n </file>\n <file name=\"style.css\">\n .friends-container {\n display: inline-block;\n margin: 0 30px;\n }\n\n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n // Element locators\n var container = element(by.css('.custom-comparator'));\n var names = container.all(by.repeater('friends').column('friend.name'));\n\n it('should sort friends by favorite letter (in correct alphabetical order)', function() {\n expect(names.get(0).getText()).toBe('John');\n expect(names.get(1).getText()).toBe('Adam');\n expect(names.get(2).getText()).toBe('Mike');\n expect(names.get(3).getText()).toBe('Mary');\n expect(names.get(4).getText()).toBe('Julie');\n });\n </file>\n </example>\n *\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse) {\n return function(array, sortPredicate, reverseOrder, compareFn) {\n\n if (array == null) return array;\n if (!isArrayLike(array)) {\n throw minErr('orderBy')('notarray', 'Expected array but received: {0}', array);\n }\n\n if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }\n if (sortPredicate.length === 0) { sortPredicate = ['+']; }\n\n var predicates = processPredicates(sortPredicate);\n\n var descending = reverseOrder ? -1 : 1;\n\n // Define the `compare()` function. Use a default comparator if none is specified.\n var compare = isFunction(compareFn) ? compareFn : defaultCompare;\n\n // The next three lines are a version of a Swartzian Transform idiom from Perl\n // (sometimes called the Decorate-Sort-Undecorate idiom)\n // See https://en.wikipedia.org/wiki/Schwartzian_transform\n var compareValues = Array.prototype.map.call(array, getComparisonObject);\n compareValues.sort(doComparison);\n array = compareValues.map(function(item) { return item.value; });\n\n return array;\n\n function getComparisonObject(value, index) {\n // NOTE: We are adding an extra `tieBreaker` value based on the element's index.\n // This will be used to keep the sort stable when none of the input predicates can\n // distinguish between two elements.\n return {\n value: value,\n tieBreaker: {value: index, type: 'number', index: index},\n predicateValues: predicates.map(function(predicate) {\n return getPredicateValue(predicate.get(value), index);\n })\n };\n }\n\n function doComparison(v1, v2) {\n for (var i = 0, ii = predicates.length; i < ii; i++) {\n var result = compare(v1.predicateValues[i], v2.predicateValues[i]);\n if (result) {\n return result * predicates[i].descending * descending;\n }\n }\n\n return (compare(v1.tieBreaker, v2.tieBreaker) || defaultCompare(v1.tieBreaker, v2.tieBreaker)) * descending;\n }\n };\n\n function processPredicates(sortPredicates) {\n return sortPredicates.map(function(predicate) {\n var descending = 1, get = identity;\n\n if (isFunction(predicate)) {\n get = predicate;\n } else if (isString(predicate)) {\n if ((predicate.charAt(0) === '+' || predicate.charAt(0) === '-')) {\n descending = predicate.charAt(0) === '-' ? -1 : 1;\n predicate = predicate.substring(1);\n }\n if (predicate !== '') {\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n get = function(value) { return value[key]; };\n }\n }\n }\n return {get: get, descending: descending};\n });\n }\n\n function isPrimitive(value) {\n switch (typeof value) {\n case 'number': /* falls through */\n case 'boolean': /* falls through */\n case 'string':\n return true;\n default:\n return false;\n }\n }\n\n function objectValue(value) {\n // If `valueOf` is a valid function use that\n if (isFunction(value.valueOf)) {\n value = value.valueOf();\n if (isPrimitive(value)) return value;\n }\n // If `toString` is a valid function and not the one from `Object.prototype` use that\n if (hasCustomToString(value)) {\n value = value.toString();\n if (isPrimitive(value)) return value;\n }\n\n return value;\n }\n\n function getPredicateValue(value, index) {\n var type = typeof value;\n if (value === null) {\n type = 'null';\n } else if (type === 'object') {\n value = objectValue(value);\n }\n return {value: value, type: type, index: index};\n }\n\n function defaultCompare(v1, v2) {\n var result = 0;\n var type1 = v1.type;\n var type2 = v2.type;\n\n if (type1 === type2) {\n var value1 = v1.value;\n var value2 = v2.value;\n\n if (type1 === 'string') {\n // Compare strings case-insensitively\n value1 = value1.toLowerCase();\n value2 = value2.toLowerCase();\n } else if (type1 === 'object') {\n // For basic objects, use the position of the object\n // in the collection instead of the value\n if (isObject(value1)) value1 = v1.index;\n if (isObject(value2)) value2 = v2.index;\n }\n\n if (value1 !== value2) {\n result = value1 < value2 ? -1 : 1;\n }\n } else {\n result = (type1 === 'undefined') ? 1 :\n (type2 === 'undefined') ? -1 :\n (type1 === 'null') ? 1 :\n (type2 === 'null') ? -1 :\n (type1 < type2) ? -1 : 1;\n }\n\n return result;\n }\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html a tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * For dynamically creating `href` attributes for a tags, see the {@link ng.ngHref `ngHref`} directive.\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n if (!attr.href && !attr.xlinkHref) {\n return function(scope, element) {\n // If the linked element is not an anchor tag anymore, do nothing\n if (element[0].nodeName.toLowerCase() !== 'a') return;\n\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event) {\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using AngularJS markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * AngularJS has a chance to replace the `{{hash}}` markup with its\n * value. Until AngularJS replaces the markup the link will be broken\n * and will most likely return a 404 error. The `ngHref` directive\n * solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * <a href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n <example name=\"ng-href\">\n <file name=\"index.html\">\n <input ng-model=\"value\" /><br />\n <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an AngularJS page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n it('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an AngularJS page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using AngularJS markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until AngularJS replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\" />\n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using AngularJS markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until AngularJS replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\" />\n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * This directive sets the `disabled` attribute on the element (typically a form control,\n * e.g. `input`, `button`, `select` etc.) if the\n * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `disabled`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example name=\"ng-disabled\">\n <file name=\"index.html\">\n <label>Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then the `disabled` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.\n *\n * Note that this directive should not be used together with {@link ngModel `ngModel`},\n * as this can lead to unexpected behavior.\n *\n * A special directive is necessary because we cannot use interpolation inside the `checked`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example name=\"ng-checked\">\n <file name=\"index.html\">\n <label>Check me to check both: <input type=\"checkbox\" ng-model=\"leader\"></label><br/>\n <input id=\"checkFollower\" type=\"checkbox\" ng-checked=\"leader\" aria-label=\"Follower input\">\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check both checkBoxes', function() {\n expect(element(by.id('checkFollower')).getAttribute('checked')).toBeFalsy();\n element(by.model('leader')).click();\n expect(element(by.id('checkFollower')).getAttribute('checked')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then the `checked` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.\n * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on\n * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information.\n *\n * A special directive is necessary because we cannot use interpolation inside the `readonly`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n <example name=\"ng-readonly\">\n <file name=\"index.html\">\n <label>Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n <input type=\"text\" ng-readonly=\"checked\" value=\"I'm AngularJS\" aria-label=\"Readonly field\" />\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `selected`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only\n * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you\n * should not use `ngSelected` on the options, as `ngModel` will set the select value and\n * selected options.\n * </div>\n *\n * @example\n <example name=\"ng-selected\">\n <file name=\"index.html\">\n <label>Check me to select: <input type=\"checkbox\" ng-model=\"selected\"></label><br/>\n <select aria-label=\"ngSelected demo\">\n <option>Hello!</option>\n <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n </select>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `open`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * ## A note about browser compatibility\n *\n * Internet Explorer and Edge do not support the `details` element, it is\n * recommended to use {@link ng.ngShow} and {@link ng.ngHide} instead.\n *\n * @example\n <example name=\"ng-open\">\n <file name=\"index.html\">\n <label>Toggle details: <input type=\"checkbox\" ng-model=\"open\"></label><br/>\n <details id=\"details\" ng-open=\"open\">\n <summary>List</summary>\n <ul>\n <li>Apple</li>\n <li>Orange</li>\n <li>Durian</li>\n </ul>\n </details>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n </file>\n </example>\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName === 'multiple') return;\n\n function defaultLinkFn(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n\n var normalized = directiveNormalize('ng-' + attrName);\n var linkFn = defaultLinkFn;\n\n if (propName === 'checked') {\n linkFn = function(scope, element, attr) {\n // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input\n if (attr.ngModel !== attr[normalized]) {\n defaultLinkFn(scope, element, attr);\n }\n };\n }\n\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: linkFn\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === 'ngPattern' && attr.ngPattern.charAt(0) === '/') {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set('ngPattern', new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = ['$sce', function($sce) {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n // We need to sanitize the url at least once, in case it is a constant\n // non-interpolated attribute.\n attr.$set(normalized, $sce.getTrustedMediaUrl(attr[normalized]));\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // Support: IE 9-11 only\n // On IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // We use attr[attrName] value since $set might have sanitized the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n }];\n});\n\n/* global -nullFormCtrl, -PENDING_CLASS, -SUBMITTED_CLASS\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $getControls: valueFn([]),\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop,\n $$setSubmitted: noop\n},\nPENDING_CLASS = 'ng-pending',\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $pending An object hash, containing references to controls or forms with\n * pending validators, where:\n *\n * - keys are validations tokens (error names).\n * - values are arrays of controls or forms that have a pending validator for the given error name.\n *\n * See {@link form.FormController#$error $error} for a list of built-in validation tokens.\n *\n * @property {Object} $error An object hash, containing references to controls or forms with failing\n * validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for the given error name.\n *\n * Built-in validation tokens:\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n * - `date`\n * - `datetimelocal`\n * - `time`\n * - `week`\n * - `month`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController($element, $attrs, $scope, $animate, $interpolate) {\n this.$$controls = [];\n\n // init state\n this.$error = {};\n this.$$success = {};\n this.$pending = undefined;\n this.$name = $interpolate($attrs.name || $attrs.ngForm || '')($scope);\n this.$dirty = false;\n this.$pristine = true;\n this.$valid = true;\n this.$invalid = false;\n this.$submitted = false;\n this.$$parentForm = nullFormCtrl;\n\n this.$$element = $element;\n this.$$animate = $animate;\n\n setupValidity(this);\n}\n\nFormController.prototype = {\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n $rollbackViewValue: function() {\n forEach(this.$$controls, function(control) {\n control.$rollbackViewValue();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n $commitViewValue: function() {\n forEach(this.$$controls, function(control) {\n control.$commitViewValue();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n * @param {object} control control object, either a {@link form.FormController} or an\n * {@link ngModel.NgModelController}\n *\n * @description\n * Register a control with the form. Input elements using ngModelController do this automatically\n * when they are linked.\n *\n * Note that the current state of the control will not be reflected on the new parent form. This\n * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`\n * state.\n *\n * However, if the method is used programmatically, for example by adding dynamically created controls,\n * or controls that have been previously removed without destroying their corresponding DOM element,\n * it's the developers responsibility to make sure the current state propagates to the parent form.\n *\n * For example, if an input control is added that is already `$dirty` and has `$error` properties,\n * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.\n */\n $addControl: function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n this.$$controls.push(control);\n\n if (control.$name) {\n this[control.$name] = control;\n }\n\n control.$$parentForm = this;\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$getControls\n * @returns {Array} the controls that are currently part of this form\n *\n * @description\n * This method returns a **shallow copy** of the controls that are currently part of this form.\n * The controls can be instances of {@link form.FormController `FormController`}\n * ({@link ngForm \"child-forms\"}) and of {@link ngModel.NgModelController `NgModelController`}.\n * If you need access to the controls of child-forms, you have to call `$getControls()`\n * recursively on them.\n * This can be used for example to iterate over all controls to validate them.\n *\n * The controls can be accessed normally, but adding to, or removing controls from the array has\n * no effect on the form. Instead, use {@link form.FormController#$addControl `$addControl()`} and\n * {@link form.FormController#$removeControl `$removeControl()`} for this use-case.\n * Likewise, adding a control to, or removing a control from the form is not reflected\n * in the shallow copy. That means you should get a fresh copy from `$getControls()` every time\n * you need access to the controls.\n */\n $getControls: function() {\n return shallowCopy(this.$$controls);\n },\n\n // Private API: rename a form control\n $$renameControl: function(control, newName) {\n var oldName = control.$name;\n\n if (this[oldName] === control) {\n delete this[oldName];\n }\n this[newName] = control;\n control.$name = newName;\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n * @param {object} control control object, either a {@link form.FormController} or an\n * {@link ngModel.NgModelController}\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n *\n * Note that only the removed control's validation state (`$errors`etc.) will be removed from the\n * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be\n * different from case to case. For example, removing the only `$dirty` control from a form may or\n * may not mean that the form is still `$dirty`.\n */\n $removeControl: function(control) {\n if (control.$name && this[control.$name] === control) {\n delete this[control.$name];\n }\n forEach(this.$pending, function(value, name) {\n // eslint-disable-next-line no-invalid-this\n this.$setValidity(name, null, control);\n }, this);\n forEach(this.$error, function(value, name) {\n // eslint-disable-next-line no-invalid-this\n this.$setValidity(name, null, control);\n }, this);\n forEach(this.$$success, function(value, name) {\n // eslint-disable-next-line no-invalid-this\n this.$setValidity(name, null, control);\n }, this);\n\n arrayRemove(this.$$controls, control);\n control.$$parentForm = nullFormCtrl;\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n $setDirty: function() {\n this.$$animate.removeClass(this.$$element, PRISTINE_CLASS);\n this.$$animate.addClass(this.$$element, DIRTY_CLASS);\n this.$dirty = true;\n this.$pristine = false;\n this.$$parentForm.$setDirty();\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes\n * the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted`\n * state to false.\n *\n * This method will also propagate to all the controls contained in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n $setPristine: function() {\n this.$$animate.setClass(this.$$element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n this.$dirty = false;\n this.$pristine = true;\n this.$submitted = false;\n forEach(this.$$controls, function(control) {\n control.$setPristine();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n $setUntouched: function() {\n forEach(this.$$controls, function(control) {\n control.$setUntouched();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its `$submitted` state. This will also set `$submitted` on all child and\n * parent forms of the form.\n */\n $setSubmitted: function() {\n var rootForm = this;\n while (rootForm.$$parentForm && (rootForm.$$parentForm !== nullFormCtrl)) {\n rootForm = rootForm.$$parentForm;\n }\n rootForm.$$setSubmitted();\n },\n\n $$setSubmitted: function() {\n this.$$animate.addClass(this.$$element, SUBMITTED_CLASS);\n this.$submitted = true;\n forEach(this.$$controls, function(control) {\n if (control.$$setSubmitted) {\n control.$$setSubmitted();\n }\n });\n }\n};\n\n/**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Change the validity state of the form, and notify the parent form (if any).\n *\n * Application developers will rarely need to call this method directly. It is used internally, by\n * {@link ngModel.NgModelController#$setValidity NgModelController.$setValidity()}, to propagate a\n * control's validity state to the parent `FormController`.\n *\n * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be\n * assigned to either `$error[validationErrorKey]` or `$pending[validationErrorKey]` (for\n * unfulfilled `$asyncValidators`), so that it is available for data-binding. The\n * `validationErrorKey` should be in camelCase and will get converted into dash-case for\n * class name. Example: `myError` will result in `ng-valid-my-error` and\n * `ng-invalid-my-error` classes and can be bound to as `{{ someForm.$error.myError }}`.\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending\n * (undefined), or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n * Skipped is used by AngularJS when validators do not run because of parse errors and when\n * `$asyncValidators` do not run because any of the `$validators` failed.\n * @param {NgModelController | FormController} controller - The controller whose validity state is\n * triggering the change.\n */\naddSetValidityMethod({\n clazz: FormController,\n set: function(object, property, controller) {\n var list = object[property];\n if (!list) {\n object[property] = [controller];\n } else {\n var index = list.indexOf(controller);\n if (index === -1) {\n list.push(controller);\n }\n }\n },\n unset: function(object, property, controller) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, controller);\n if (list.length === 0) {\n delete object[property];\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Helper directive that makes it possible to create control groups inside a\n * {@link ng.directive:form `form`} directive.\n * These \"child forms\" can be used, for example, to determine the validity of a sub-group of\n * controls.\n *\n * <div class=\"alert alert-danger\">\n * **Note**: `ngForm` cannot be used as a replacement for `<form>`, because it lacks its\n * [built-in HTML functionality](https://html.spec.whatwg.org/#the-form-element).\n * Specifically, you cannot submit `ngForm` like a `<form>` tag. That means,\n * you cannot send data to the server with `ngForm`, or integrate it with\n * {@link ng.directive:ngSubmit `ngSubmit`}.\n * </div>\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will\n * be published into the related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * ## Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In AngularJS, forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n * AngularJS provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to\n * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group\n * of controls needs to be determined.\n *\n * ## CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pending` is set if the form is pending.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * ## Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side AngularJS applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, AngularJS prevents the default action (form submission to the server) unless the\n * `<form>` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * @animations\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-form.ng-invalid {\n * background: red;\n * color:white;\n * }\n * </pre>\n *\n * @example\n <example name=\"ng-form\" deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"formExample\">\n <file name=\"index.html\">\n <script>\n angular.module('formExample', [])\n .controller('FormController', ['$scope', function($scope) {\n $scope.userType = 'guest';\n }]);\n </script>\n <style>\n .my-form {\n transition:all linear 0.5s;\n background: transparent;\n }\n .my-form.ng-invalid {\n background: red;\n }\n </style>\n <form name=\"myForm\" ng-controller=\"FormController\" class=\"my-form\">\n userType: <input name=\"input\" ng-model=\"userType\" required>\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n <code>userType = {{userType}}</code><br>\n <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>\n <code>myForm.input.$error = {{myForm.input.$error}}</code><br>\n <code>myForm.$valid = {{myForm.$valid}}</code><br>\n <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', '$parse', function($timeout, $parse) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form\n controller: FormController,\n compile: function ngFormCompile(formElement, attr) {\n // Setup initial state of the control\n formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);\n\n var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);\n\n return {\n pre: function ngFormPreLink(scope, formElement, attr, ctrls) {\n var controller = ctrls[0];\n\n // if `action` attr is not present on the form, prevent the default action (submission)\n if (!('action' in attr)) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault();\n };\n\n formElement[0].addEventListener('submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n formElement[0].removeEventListener('submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = ctrls[1] || controller.$$parentForm;\n parentFormCtrl.$addControl(controller);\n\n var setter = nameAttr ? getSetter(controller.$name) : noop;\n\n if (nameAttr) {\n setter(scope, controller);\n attr.$observe(nameAttr, function(newValue) {\n if (controller.$name === newValue) return;\n setter(scope, undefined);\n controller.$$parentForm.$$renameControl(controller, newValue);\n setter = getSetter(controller.$name);\n setter(scope, controller);\n });\n }\n formElement.on('$destroy', function() {\n controller.$$parentForm.$removeControl(controller);\n setter(scope, undefined);\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n };\n }\n };\n\n return formDirective;\n\n function getSetter(expression) {\n if (expression === '') {\n //create an assignable expression, so forms with an empty name can be renamed later\n return $parse('this[\"\"]').assign;\n }\n return $parse(expression).assign || noop;\n }\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n\n\n// helper methods\nfunction setupValidity(instance) {\n instance.$$classCache = {};\n instance.$$classCache[INVALID_CLASS] = !(instance.$$classCache[VALID_CLASS] = instance.$$element.hasClass(VALID_CLASS));\n}\nfunction addSetValidityMethod(context) {\n var clazz = context.clazz,\n set = context.set,\n unset = context.unset;\n\n clazz.prototype.$setValidity = function(validationErrorKey, state, controller) {\n if (isUndefined(state)) {\n createAndSet(this, '$pending', validationErrorKey, controller);\n } else {\n unsetAndCleanup(this, '$pending', validationErrorKey, controller);\n }\n if (!isBoolean(state)) {\n unset(this.$error, validationErrorKey, controller);\n unset(this.$$success, validationErrorKey, controller);\n } else {\n if (state) {\n unset(this.$error, validationErrorKey, controller);\n set(this.$$success, validationErrorKey, controller);\n } else {\n set(this.$error, validationErrorKey, controller);\n unset(this.$$success, validationErrorKey, controller);\n }\n }\n if (this.$pending) {\n cachedToggleClass(this, PENDING_CLASS, true);\n this.$valid = this.$invalid = undefined;\n toggleValidationCss(this, '', null);\n } else {\n cachedToggleClass(this, PENDING_CLASS, false);\n this.$valid = isObjectEmpty(this.$error);\n this.$invalid = !this.$valid;\n toggleValidationCss(this, '', this.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in this.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (this.$pending && this.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (this.$error[validationErrorKey]) {\n combinedState = false;\n } else if (this.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n\n toggleValidationCss(this, validationErrorKey, combinedState);\n this.$$parentForm.$setValidity(validationErrorKey, combinedState, this);\n };\n\n function createAndSet(ctrl, name, value, controller) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, controller);\n }\n\n function unsetAndCleanup(ctrl, name, value, controller) {\n if (ctrl[name]) {\n unset(ctrl[name], value, controller);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(ctrl, className, switchValue) {\n if (switchValue && !ctrl.$$classCache[className]) {\n ctrl.$$animate.addClass(ctrl.$$element, className);\n ctrl.$$classCache[className] = true;\n } else if (!switchValue && ctrl.$$classCache[className]) {\n ctrl.$$animate.removeClass(ctrl.$$element, className);\n ctrl.$$classCache[className] = false;\n }\n }\n\n function toggleValidationCss(ctrl, validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(ctrl, VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(ctrl, INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n }\n return true;\n}\n\n/* global\n VALID_CLASS: false,\n INVALID_CLASS: false,\n PRISTINE_CLASS: false,\n DIRTY_CLASS: false,\n ngModelMinErr: false\n*/\n\n// Regex code was initially obtained from SO prior to modification: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/;\n// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)\n// Note: We are being more lenient, because browsers are too.\n// 1. Scheme\n// 2. Slashes\n// 3. Username\n// 4. Password\n// 5. Hostname\n// 6. Port\n// 7. Path\n// 8. Query\n// 9. Fragment\n// 1111111111111111 222 333333 44444 55555555555555555555555 666 77777777 8888888 999\nvar URL_REGEXP = /^[a-z][a-z\\d.+-]*:\\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\\s:/?#]+|\\[[a-f\\d:]+])(?::\\d+)?(?:\\/[^?#]*)?(?:\\?[^#]*)?(?:#.*)?$/i;\n// eslint-disable-next-line max-len\nvar EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[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])?)*$/;\nvar NUMBER_REGEXP = /^\\s*(-|\\+)?(\\d+|(\\d*(\\.\\d*)))([eE][+-]?\\d+)?\\s*$/;\nvar DATE_REGEXP = /^(\\d{4,})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4,})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4,})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4,})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\n\nvar PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown';\nvar PARTIAL_VALIDATION_TYPES = createMap();\nforEach('date,datetime-local,month,time,week'.split(','), function(type) {\n PARTIAL_VALIDATION_TYPES[type] = true;\n});\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with AngularJS data binding, inherited by most of the `input` elements.\n *\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n <example name=\"text-input-directive\" module=\"textInputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('textInputExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.example = {\n text: 'guest',\n word: /^\\s*\\w*\\s*$/\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Single word:\n <input type=\"text\" name=\"input\" ng-model=\"example.text\"\n ng-pattern=\"example.word\" required ng-trim=\"false\">\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n Single word only!</span>\n </div>\n <code>text = {{example.text}}</code><br/>\n <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br/>\n <code>myForm.input.$error = {{myForm.input.$error}}</code><br/>\n <code>myForm.$valid = {{myForm.$valid}}</code><br/>\n <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var text = element(by.binding('example.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n * (e.g. `min=\"{{minDate | date:'yyyy-MM-dd'}}\"`). Note that `min` will also add native HTML5\n * constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n * (e.g. `max=\"{{maxDate | date:'yyyy-MM-dd'}}\"`). Note that `max` will also add native HTML5\n * constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"date-input-directive\" module=\"dateInputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('dateInputExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2013, 9, 22)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a date in 2013:</label>\n <input type=\"date\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"yyyy-MM-dd\" min=\"2013-01-01\" max=\"2013-12-31\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.date\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-MM-dd\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[datetime-local]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * The format of the displayed time can be adjusted with the\n * {@link ng.directive:ngModelOptions#ngModelOptions-arguments ngModelOptions} `timeSecondsFormat`\n * and `timeStripZeroSeconds`.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n * inside this attribute (e.g. `min=\"{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n * Note that `min` will also add native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n * inside this attribute (e.g. `max=\"{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n * Note that `max` will also add native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"datetimelocal-input-directive\" module=\"dateExample\">\n <file name=\"index.html\">\n <script>\n angular.module('dateExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2010, 11, 28, 14, 57)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a date between in 2013:</label>\n <input type=\"datetime-local\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"yyyy-MM-ddTHH:mm:ss\" min=\"2001-01-01T00:00:00\" max=\"2013-12-31T00:00:00\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.datetimelocal\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-MM-ddTHH:mm:ss\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions#ngModelOptions-arguments ngModelOptions}. By default,\n * this is the timezone of the browser.\n *\n * The format of the displayed time can be adjusted with the\n * {@link ng.directive:ngModelOptions#ngModelOptions-arguments ngModelOptions} `timeSecondsFormat`\n * and `timeStripZeroSeconds`.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minTime | date:'HH:mm:ss'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxTime | date:'HH:mm:ss'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the\n * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the\n * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"time-input-directive\" module=\"timeExample\">\n <file name=\"index.html\">\n <script>\n angular.module('timeExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(1970, 0, 1, 14, 57, 0)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a time between 8am and 5pm:</label>\n <input type=\"time\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"HH:mm:ss\" min=\"08:00:00\" max=\"17:00:00\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.time\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"HH:mm:ss\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The value of the resulting Date object will be set to Thursday at 00:00:00 of the requested week,\n * due to ISO-8601 week numbering standards. Information on ISO's system for numbering the weeks of the\n * year can be found at: https://en.wikipedia.org/wiki/ISO_8601#Week_dates\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minWeek | date:'yyyy-Www'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxWeek | date:'yyyy-Www'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"week-input-directive\" module=\"weekExample\">\n <file name=\"index.html\">\n <script>\n angular.module('weekExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2013, 0, 3)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label>Pick a date between in 2013:\n <input id=\"exampleInput\" type=\"week\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"YYYY-W##\" min=\"2012-W32\"\n max=\"2013-W52\" required />\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.week\">\n Not a valid date!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-Www\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n * If the model is not set to the first of the month, the next view to model update will set it\n * to the first of the month.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minMonth | date:'yyyy-MM'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxMonth | date:'yyyy-MM'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"month-input-directive\" module=\"monthExample\">\n <file name=\"index.html\">\n <script>\n angular.module('monthExample', [])\n .controller('DateController', ['$scope', function($scope) {\n $scope.example = {\n value: new Date(2013, 9, 1)\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n <label for=\"exampleInput\">Pick a month in 2013:</label>\n <input id=\"exampleInput\" type=\"month\" name=\"input\" ng-model=\"example.value\"\n placeholder=\"yyyy-MM\" min=\"2013-01\" max=\"2013-12\" required />\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.month\">\n Not a valid month!</span>\n </div>\n <tt>value = {{example.value | date: \"yyyy-MM\"}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n </file>\n </example>\n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n * <div class=\"alert alert-warning\">\n * The model must always be of type `number` otherwise AngularJS will throw an error.\n * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}\n * error docs for more information and an example of how to convert your model if necessary.\n * </div>\n *\n *\n *\n * @knownIssue\n *\n * ### HTML5 constraint validation and `allowInvalid`\n *\n * In browsers that follow the\n * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),\n * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.\n * If a non-number is entered in the input, the browser will report the value as an empty string,\n * which means the view / model values in `ngModel` and subsequently the scope value\n * will also be an empty string.\n *\n * @knownIssue\n *\n * ### Large numbers and `step` validation\n *\n * The `step` validation will not work correctly for very large numbers (e.g. 9999999999) due to\n * Javascript's arithmetic limitations. If you need to handle large numbers, purpose-built\n * libraries (e.g. https://github.com/MikeMcl/big.js/), can be included into AngularJS by\n * {@link guide/forms#modifying-built-in-validators overwriting the validators}\n * for `number` and / or `step`, or by {@link guide/forms#custom-validation applying custom validators}\n * to an `input[text]` element. The source for `input[number]` type can be used as a starting\n * point for both implementations.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * Can be interpolated.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * Can be interpolated.\n * @param {string=} ngMin Like `min`, sets the `min` validation error key if the value entered is less than `ngMin`,\n * but does not trigger HTML5 native validation. Takes an expression.\n * @param {string=} ngMax Like `max`, sets the `max` validation error key if the value entered is greater than `ngMax`,\n * but does not trigger HTML5 native validation. Takes an expression.\n * @param {string=} step Sets the `step` validation error key if the value entered does not fit the `step` constraint.\n * Can be interpolated.\n * @param {string=} ngStep Like `step`, sets the `step` validation error key if the value entered does not fit the `ngStep` constraint,\n * but does not trigger HTML5 native validation. Takes an expression.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"number-input-directive\" module=\"numberExample\">\n <file name=\"index.html\">\n <script>\n angular.module('numberExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.example = {\n value: 12\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Number:\n <input type=\"number\" name=\"input\" ng-model=\"example.value\"\n min=\"0\" max=\"99\" required>\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n Not valid number!</span>\n </div>\n <tt>value = {{example.value}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var value = element(by.binding('example.value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex\n * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify\n * the built-in validators (see the {@link guide/forms Forms guide})\n * </div>\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"url-input-directive\" module=\"urlExample\">\n <file name=\"index.html\">\n <script>\n angular.module('urlExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.url = {\n text: 'http://google.com'\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>URL:\n <input type=\"url\" name=\"input\" ng-model=\"url.text\" required>\n <label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n Not valid url!</span>\n </div>\n <tt>text = {{url.text}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var text = element(by.binding('url.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('url.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex\n * used in Chromium, which may not fulfill your app's requirements.\n * If you need stricter (e.g. requiring a top-level domain), or more relaxed validation\n * (e.g. allowing IPv6 address literals) you can use `ng-pattern` or\n * modify the built-in validators (see the {@link guide/forms Forms guide}).\n * </div>\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"email-input-directive\" module=\"emailExample\">\n <file name=\"index.html\">\n <script>\n angular.module('emailExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.email = {\n text: 'me@example.com'\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Email:\n <input type=\"email\" name=\"input\" ng-model=\"email.text\" required>\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n Required!</span>\n <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n Not valid email!</span>\n </div>\n <tt>text = {{email.text}}</tt><br/>\n <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var text = element(by.binding('email.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('email.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n </file>\n </example>\n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * **Note:**<br>\n * All inputs controlled by {@link ngModel ngModel} (including those of type `radio`) will use the\n * value of their `name` attribute to determine the property under which their\n * {@link ngModel.NgModelController NgModelController} will be published on the parent\n * {@link form.FormController FormController}. Thus, if you use the same `name` for multiple\n * inputs of a form (e.g. a group of radio inputs), only _one_ `NgModelController` will be\n * published on the parent `FormController` under that name. The rest of the controllers will\n * continue to work as expected, but you won't be able to access them as properties on the parent\n * `FormController`.\n *\n * <div class=\"alert alert-info\">\n * <p>\n * In plain HTML forms, the `name` attribute is used to identify groups of radio inputs, so\n * that the browser can manage their state (checked/unchecked) based on the state of other\n * inputs in the same group.\n * </p>\n * <p>\n * In AngularJS forms, this is not necessary. The input's state will be updated based on the\n * value of the underlying model data.\n * </p>\n * </div>\n *\n * <div class=\"alert alert-success\">\n * If you omit the `name` attribute on a radio input, `ngModel` will automatically assign it a\n * unique name.\n * </div>\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string} value The value to which the `ngModel` expression should be set when selected.\n * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,\n * too. Use `ngValue` if you need complex models (`number`, `object`, ...).\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue AngularJS expression to which `ngModel` will be be set when the radio\n * is selected. Should be used instead of the `value` attribute if you need\n * a non-string `ngModel` (`boolean`, `array`, ...).\n *\n * @example\n <example name=\"radio-input-directive\" module=\"radioExample\">\n <file name=\"index.html\">\n <script>\n angular.module('radioExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.color = {\n name: 'blue'\n };\n $scope.specialValue = {\n \"id\": \"12345\",\n \"value\": \"green\"\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>\n <input type=\"radio\" ng-model=\"color.name\" value=\"red\">\n Red\n </label><br/>\n <label>\n <input type=\"radio\" ng-model=\"color.name\" ng-value=\"specialValue\">\n Green\n </label><br/>\n <label>\n <input type=\"radio\" ng-model=\"color.name\" value=\"blue\">\n Blue\n </label><br/>\n <tt>color = {{color.name | json}}</tt><br/>\n </form>\n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should change state', function() {\n var inputs = element.all(by.model('color.name'));\n var color = element(by.binding('color.name'));\n\n expect(color.getText()).toContain('blue');\n\n inputs.get(0).click();\n expect(color.getText()).toContain('red');\n\n inputs.get(1).click();\n expect(color.getText()).toContain('green');\n });\n </file>\n </example>\n */\n 'radio': radioInputType,\n\n /**\n * @ngdoc input\n * @name input[range]\n *\n * @description\n * Native range input with validation and transformation.\n *\n * The model for the range input must always be a `Number`.\n *\n * IE9 and other browsers that do not support the `range` type fall back\n * to a text input without any default values for `min`, `max` and `step`. Model binding,\n * validation and number parsing are nevertheless supported.\n *\n * Browsers that support range (latest Chrome, Safari, Firefox, Edge) treat `input[range]`\n * in a way that never allows the input to hold an invalid value. That means:\n * - any non-numerical value is set to `(max + min) / 2`.\n * - any numerical value that is less than the current min val, or greater than the current max val\n * is set to the min / max val respectively.\n * - additionally, the current `step` is respected, so the nearest value that satisfies a step\n * is used.\n *\n * See the [HTML Spec on input[type=range]](https://www.w3.org/TR/html5/forms.html#range-state-(type=range))\n * for more info.\n *\n * This has the following consequences for AngularJS:\n *\n * Since the element value should always reflect the current model value, a range input\n * will set the bound ngModel expression to the value that the browser has set for the\n * input element. For example, in the following input `<input type=\"range\" ng-model=\"model.value\">`,\n * if the application sets `model.value = null`, the browser will set the input to `'50'`.\n * AngularJS will then set the model to `50`, to prevent input and model value being out of sync.\n *\n * That means the model for range will immediately be set to `50` after `ngModel` has been\n * initialized. It also means a range input can never have the required error.\n *\n * This does not only affect changes to the model value, but also to the values of the `min`,\n * `max`, and `step` attributes. When these change in a way that will cause the browser to modify\n * the input value, AngularJS will also update the model value.\n *\n * Automatic value adjustment also means that a range input element can never have the `required`,\n * `min`, or `max` errors.\n *\n * However, `step` is currently only fully implemented by Firefox. Other browsers have problems\n * when the step value changes dynamically - they do not adjust the element value correctly, but\n * instead may set the `stepMismatch` error. If that's the case, the AngularJS will set the `step`\n * error on the input, and set the model to `undefined`.\n *\n * Note that `input[range]` is not compatible with`ngMax`, `ngMin`, and `ngStep`, because they do\n * not set the `min` and `max` attributes, which means that the browser won't automatically adjust\n * the input value based on their values, and will always assume min = 0, max = 100, and step = 1.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation to ensure that the value entered is greater\n * than `min`. Can be interpolated.\n * @param {string=} max Sets the `max` validation to ensure that the value entered is less than `max`.\n * Can be interpolated.\n * @param {string=} step Sets the `step` validation to ensure that the value entered matches the `step`\n * Can be interpolated.\n * @param {expression=} ngChange AngularJS expression to be executed when the ngModel value changes due\n * to user interaction with the input element.\n * @param {expression=} ngChecked If the expression is truthy, then the `checked` attribute will be set on the\n * element. **Note** : `ngChecked` should not be used alongside `ngModel`.\n * Checkout {@link ng.directive:ngChecked ngChecked} for usage.\n *\n * @example\n <example name=\"range-input-directive\" module=\"rangeExample\">\n <file name=\"index.html\">\n <script>\n angular.module('rangeExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.value = 75;\n $scope.min = 10;\n $scope.max = 90;\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n\n Model as range: <input type=\"range\" name=\"range\" ng-model=\"value\" min=\"{{min}}\" max=\"{{max}}\">\n <hr>\n Model as number: <input type=\"number\" ng-model=\"value\"><br>\n Min: <input type=\"number\" ng-model=\"min\"><br>\n Max: <input type=\"number\" ng-model=\"max\"><br>\n value = <code>{{value}}</code><br/>\n myForm.range.$valid = <code>{{myForm.range.$valid}}</code><br/>\n myForm.range.$error = <code>{{myForm.range.$error}}</code>\n </form>\n </file>\n </example>\n\n * ## Range Input with ngMin & ngMax attributes\n\n * @example\n <example name=\"range-input-directive-ng\" module=\"rangeExample\">\n <file name=\"index.html\">\n <script>\n angular.module('rangeExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.value = 75;\n $scope.min = 10;\n $scope.max = 90;\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n Model as range: <input type=\"range\" name=\"range\" ng-model=\"value\" ng-min=\"min\" ng-max=\"max\">\n <hr>\n Model as number: <input type=\"number\" ng-model=\"value\"><br>\n Min: <input type=\"number\" ng-model=\"min\"><br>\n Max: <input type=\"number\" ng-model=\"max\"><br>\n value = <code>{{value}}</code><br/>\n myForm.range.$valid = <code>{{myForm.range.$valid}}</code><br/>\n myForm.range.$error = <code>{{myForm.range.$error}}</code>\n </form>\n </file>\n </example>\n\n */\n 'range': rangeInputType,\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n <example name=\"checkbox-input-directive\" module=\"checkboxExample\">\n <file name=\"index.html\">\n <script>\n angular.module('checkboxExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.checkboxModel = {\n value1 : true,\n value2 : 'YES'\n };\n }]);\n </script>\n <form name=\"myForm\" ng-controller=\"ExampleController\">\n <label>Value1:\n <input type=\"checkbox\" ng-model=\"checkboxModel.value1\">\n </label><br/>\n <label>Value2:\n <input type=\"checkbox\" ng-model=\"checkboxModel.value2\"\n ng-true-value=\"'YES'\" ng-false-value=\"'NO'\">\n </label><br/>\n <tt>value1 = {{checkboxModel.value1}}</tt><br/>\n <tt>value2 = {{checkboxModel.value2}}</tt><br/>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should change state', function() {\n var value1 = element(by.binding('checkboxModel.value1'));\n var value2 = element(by.binding('checkboxModel.value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('checkboxModel.value1')).click();\n element(by.model('checkboxModel.value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n </file>\n </example>\n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction stringBasedInputType(ctrl) {\n ctrl.$formatters.push(function(value) {\n return ctrl.$isEmpty(value) ? value : value.toString();\n });\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n}\n\nfunction baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n var type = lowercase(element[0].type);\n\n // In composition mode, users are still inputting intermediate text buffer,\n // hold the listener until composition is done.\n // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n if (!$sniffer.android) {\n var composing = false;\n\n element.on('compositionstart', function() {\n composing = true;\n });\n\n // Support: IE9+\n element.on('compositionupdate', function(ev) {\n // End composition when ev.data is empty string on 'compositionupdate' event.\n // When the input de-focusses (e.g. by clicking away), IE triggers 'compositionupdate'\n // instead of 'compositionend'.\n if (isUndefined(ev.data) || ev.data === '') {\n composing = false;\n }\n });\n\n element.on('compositionend', function() {\n composing = false;\n listener();\n });\n }\n\n var timeout;\n\n var listener = function(ev) {\n if (timeout) {\n $browser.defer.cancel(timeout);\n timeout = null;\n }\n if (composing) return;\n var value = element.val(),\n event = ev && ev.type;\n\n // By default we will trim the value\n // If the attribute ng-trim exists we will avoid trimming\n // If input type is 'password', the value is never trimmed\n if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {\n value = trim(value);\n }\n\n // If a control is suffering from bad input (due to native validators), browsers discard its\n // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the\n // control's value is the same empty value twice in a row.\n if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {\n ctrl.$setViewValue(value, event);\n }\n };\n\n // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n // input event on backspace, delete or cut\n if ($sniffer.hasEvent('input')) {\n element.on('input', listener);\n } else {\n var deferListener = function(ev, input, origValue) {\n if (!timeout) {\n timeout = $browser.defer(function() {\n timeout = null;\n if (!input || input.value !== origValue) {\n listener(ev);\n }\n });\n }\n };\n\n element.on('keydown', /** @this */ function(event) {\n var key = event.keyCode;\n\n // ignore\n // command modifiers arrows\n if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n deferListener(event, this, this.value);\n });\n\n // if user modifies input value using context menu in IE, we need \"paste\", \"cut\" and \"drop\" events to catch it\n if ($sniffer.hasEvent('paste')) {\n element.on('paste cut drop', deferListener);\n }\n }\n\n // if user paste into input using mouse on older browser\n // or form autocomplete on newer browser, we need \"change\" event to catch it\n element.on('change', listener);\n\n // Some native input types (date-family) have the ability to change validity without\n // firing any input/change events.\n // For these event types, when native validators are present and the browser supports the type,\n // check for validity changes on various DOM events.\n if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) {\n element.on(PARTIAL_VALIDATION_EVENTS, /** @this */ function(ev) {\n if (!timeout) {\n var validity = this[VALIDITY_STATE_PROPERTY];\n var origBadInput = validity.badInput;\n var origTypeMismatch = validity.typeMismatch;\n timeout = $browser.defer(function() {\n timeout = null;\n if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) {\n listener(ev);\n }\n });\n }\n });\n }\n\n ctrl.$render = function() {\n // Workaround for Firefox validation #12102.\n var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;\n if (element.val() !== value) {\n element.val(value);\n }\n };\n}\n\nfunction weekParser(isoWeek, existingDate) {\n if (isDate(isoWeek)) {\n return isoWeek;\n }\n\n if (isString(isoWeek)) {\n WEEK_REGEXP.lastIndex = 0;\n var parts = WEEK_REGEXP.exec(isoWeek);\n if (parts) {\n var year = +parts[1],\n week = +parts[2],\n hours = 0,\n minutes = 0,\n seconds = 0,\n milliseconds = 0,\n firstThurs = getFirstThursdayOfYear(year),\n addDays = (week - 1) * 7;\n\n if (existingDate) {\n hours = existingDate.getHours();\n minutes = existingDate.getMinutes();\n seconds = existingDate.getSeconds();\n milliseconds = existingDate.getMilliseconds();\n }\n\n return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);\n }\n }\n\n return NaN;\n}\n\nfunction createDateParser(regexp, mapping) {\n return function(iso, previousDate) {\n var parts, map;\n\n if (isDate(iso)) {\n return iso;\n }\n\n if (isString(iso)) {\n // When a date is JSON'ified to wraps itself inside of an extra\n // set of double quotes. This makes the date parsing code unable\n // to match the date string and parse it as a date.\n if (iso.charAt(0) === '\"' && iso.charAt(iso.length - 1) === '\"') {\n iso = iso.substring(1, iso.length - 1);\n }\n if (ISO_DATE_REGEXP.test(iso)) {\n return new Date(iso);\n }\n regexp.lastIndex = 0;\n parts = regexp.exec(iso);\n\n if (parts) {\n parts.shift();\n if (previousDate) {\n map = {\n yyyy: previousDate.getFullYear(),\n MM: previousDate.getMonth() + 1,\n dd: previousDate.getDate(),\n HH: previousDate.getHours(),\n mm: previousDate.getMinutes(),\n ss: previousDate.getSeconds(),\n sss: previousDate.getMilliseconds() / 1000\n };\n } else {\n map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };\n }\n\n forEach(parts, function(part, index) {\n if (index < mapping.length) {\n map[mapping[index]] = +part;\n }\n });\n\n var date = new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);\n if (map.yyyy < 100) {\n // In the constructor, 2-digit years map to 1900-1999.\n // Use `setFullYear()` to set the correct year.\n date.setFullYear(map.yyyy);\n }\n\n return date;\n }\n }\n\n return NaN;\n };\n}\n\nfunction createDateInputType(type, regexp, parseDate, format) {\n return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n badInputChecker(scope, element, attr, ctrl, type);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n var isTimeType = type === 'time' || type === 'datetimelocal';\n var previousDate;\n var previousTimezone;\n\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n\n if (regexp.test(value)) {\n // Note: We cannot read ctrl.$modelValue, as there might be a different\n // parser/formatter in the processing chain so that the model\n // contains some different data format!\n return parseDateAndConvertTimeZoneToLocal(value, previousDate);\n }\n ctrl.$$parserName = type;\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (value && !isDate(value)) {\n throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);\n }\n if (isValidDate(value)) {\n previousDate = value;\n var timezone = ctrl.$options.getOption('timezone');\n\n if (timezone) {\n previousTimezone = timezone;\n previousDate = convertTimezoneToLocal(previousDate, timezone, true);\n }\n\n return formatter(value, timezone);\n } else {\n previousDate = null;\n previousTimezone = null;\n return '';\n }\n });\n\n if (isDefined(attr.min) || attr.ngMin) {\n var minVal = attr.min || $parse(attr.ngMin)(scope);\n var parsedMinVal = parseObservedDateValue(minVal);\n\n ctrl.$validators.min = function(value) {\n return !isValidDate(value) || isUndefined(parsedMinVal) || parseDate(value) >= parsedMinVal;\n };\n attr.$observe('min', function(val) {\n if (val !== minVal) {\n parsedMinVal = parseObservedDateValue(val);\n minVal = val;\n ctrl.$validate();\n }\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal = attr.max || $parse(attr.ngMax)(scope);\n var parsedMaxVal = parseObservedDateValue(maxVal);\n\n ctrl.$validators.max = function(value) {\n return !isValidDate(value) || isUndefined(parsedMaxVal) || parseDate(value) <= parsedMaxVal;\n };\n attr.$observe('max', function(val) {\n if (val !== maxVal) {\n parsedMaxVal = parseObservedDateValue(val);\n maxVal = val;\n ctrl.$validate();\n }\n });\n }\n\n function isValidDate(value) {\n // Invalid Date: getTime() returns NaN\n return value && !(value.getTime && value.getTime() !== value.getTime());\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) && !isDate(val) ? parseDateAndConvertTimeZoneToLocal(val) || undefined : val;\n }\n\n function parseDateAndConvertTimeZoneToLocal(value, previousDate) {\n var timezone = ctrl.$options.getOption('timezone');\n\n if (previousTimezone && previousTimezone !== timezone) {\n // If the timezone has changed, adjust the previousDate to the default timezone\n // so that the new date is converted with the correct timezone offset\n previousDate = addDateMinutes(previousDate, timezoneToOffset(previousTimezone));\n }\n\n var parsedDate = parseDate(value, previousDate);\n\n if (!isNaN(parsedDate) && timezone) {\n parsedDate = convertTimezoneToLocal(parsedDate, timezone);\n }\n return parsedDate;\n }\n\n function formatter(value, timezone) {\n var targetFormat = format;\n\n if (isTimeType && isString(ctrl.$options.getOption('timeSecondsFormat'))) {\n targetFormat = format\n .replace('ss.sss', ctrl.$options.getOption('timeSecondsFormat'))\n .replace(/:$/, '');\n }\n\n var formatted = $filter('date')(value, targetFormat, timezone);\n\n if (isTimeType && ctrl.$options.getOption('timeStripZeroSeconds')) {\n formatted = formatted.replace(/(?::00)?(?:\\.000)?$/, '');\n }\n\n return formatted;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl, parserName) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n if (validity.badInput || validity.typeMismatch) {\n ctrl.$$parserName = parserName;\n return undefined;\n }\n\n return value;\n });\n }\n}\n\nfunction numberFormatterParser(ctrl) {\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n\n ctrl.$$parserName = 'number';\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n}\n\nfunction parseNumberAttrVal(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val);\n }\n return !isNumberNaN(val) ? val : undefined;\n}\n\nfunction isNumberInteger(num) {\n // See http://stackoverflow.com/questions/14636536/how-to-check-if-a-variable-is-an-integer-in-javascript#14794066\n // (minus the assumption that `num` is a number)\n\n // eslint-disable-next-line no-bitwise\n return (num | 0) === num;\n}\n\nfunction countDecimals(num) {\n var numString = num.toString();\n var decimalSymbolIndex = numString.indexOf('.');\n\n if (decimalSymbolIndex === -1) {\n if (-1 < num && num < 1) {\n // It may be in the exponential notation format (`1e-X`)\n var match = /e-(\\d+)$/.exec(numString);\n\n if (match) {\n return Number(match[1]);\n }\n }\n\n return 0;\n }\n\n return numString.length - decimalSymbolIndex - 1;\n}\n\nfunction isValidForStep(viewValue, stepBase, step) {\n // At this point `stepBase` and `step` are expected to be non-NaN values\n // and `viewValue` is expected to be a valid stringified number.\n var value = Number(viewValue);\n\n var isNonIntegerValue = !isNumberInteger(value);\n var isNonIntegerStepBase = !isNumberInteger(stepBase);\n var isNonIntegerStep = !isNumberInteger(step);\n\n // Due to limitations in Floating Point Arithmetic (e.g. `0.3 - 0.2 !== 0.1` or\n // `0.5 % 0.1 !== 0`), we need to convert all numbers to integers.\n if (isNonIntegerValue || isNonIntegerStepBase || isNonIntegerStep) {\n var valueDecimals = isNonIntegerValue ? countDecimals(value) : 0;\n var stepBaseDecimals = isNonIntegerStepBase ? countDecimals(stepBase) : 0;\n var stepDecimals = isNonIntegerStep ? countDecimals(step) : 0;\n\n var decimalCount = Math.max(valueDecimals, stepBaseDecimals, stepDecimals);\n var multiplier = Math.pow(10, decimalCount);\n\n value = value * multiplier;\n stepBase = stepBase * multiplier;\n step = step * multiplier;\n\n if (isNonIntegerValue) value = Math.round(value);\n if (isNonIntegerStepBase) stepBase = Math.round(stepBase);\n if (isNonIntegerStep) step = Math.round(step);\n }\n\n return (value - stepBase) % step === 0;\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n badInputChecker(scope, element, attr, ctrl, 'number');\n numberFormatterParser(ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n var parsedMinVal;\n\n if (isDefined(attr.min) || attr.ngMin) {\n var minVal = attr.min || $parse(attr.ngMin)(scope);\n parsedMinVal = parseNumberAttrVal(minVal);\n\n ctrl.$validators.min = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(parsedMinVal) || viewValue >= parsedMinVal;\n };\n\n attr.$observe('min', function(val) {\n if (val !== minVal) {\n parsedMinVal = parseNumberAttrVal(val);\n minVal = val;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal = attr.max || $parse(attr.ngMax)(scope);\n var parsedMaxVal = parseNumberAttrVal(maxVal);\n\n ctrl.$validators.max = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(parsedMaxVal) || viewValue <= parsedMaxVal;\n };\n\n attr.$observe('max', function(val) {\n if (val !== maxVal) {\n parsedMaxVal = parseNumberAttrVal(val);\n maxVal = val;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n });\n }\n\n if (isDefined(attr.step) || attr.ngStep) {\n var stepVal = attr.step || $parse(attr.ngStep)(scope);\n var parsedStepVal = parseNumberAttrVal(stepVal);\n\n ctrl.$validators.step = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(parsedStepVal) ||\n isValidForStep(viewValue, parsedMinVal || 0, parsedStepVal);\n };\n\n attr.$observe('step', function(val) {\n // TODO(matsko): implement validateLater to reduce number of validations\n if (val !== stepVal) {\n parsedStepVal = parseNumberAttrVal(val);\n stepVal = val;\n ctrl.$validate();\n }\n\n });\n\n }\n}\n\nfunction rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl, 'range');\n numberFormatterParser(ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n var supportsRange = ctrl.$$hasNativeValidators && element[0].type === 'range',\n minVal = supportsRange ? 0 : undefined,\n maxVal = supportsRange ? 100 : undefined,\n stepVal = supportsRange ? 1 : undefined,\n validity = element[0].validity,\n hasMinAttr = isDefined(attr.min),\n hasMaxAttr = isDefined(attr.max),\n hasStepAttr = isDefined(attr.step);\n\n var originalRender = ctrl.$render;\n\n ctrl.$render = supportsRange && isDefined(validity.rangeUnderflow) && isDefined(validity.rangeOverflow) ?\n //Browsers that implement range will set these values automatically, but reading the adjusted values after\n //$render would cause the min / max validators to be applied with the wrong value\n function rangeRender() {\n originalRender();\n ctrl.$setViewValue(element.val());\n } :\n originalRender;\n\n if (hasMinAttr) {\n minVal = parseNumberAttrVal(attr.min);\n\n ctrl.$validators.min = supportsRange ?\n // Since all browsers set the input to a valid value, we don't need to check validity\n function noopMinValidator() { return true; } :\n // non-support browsers validate the min val\n function minValidator(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(minVal) || viewValue >= minVal;\n };\n\n setInitialValueAndObserver('min', minChange);\n }\n\n if (hasMaxAttr) {\n maxVal = parseNumberAttrVal(attr.max);\n\n ctrl.$validators.max = supportsRange ?\n // Since all browsers set the input to a valid value, we don't need to check validity\n function noopMaxValidator() { return true; } :\n // non-support browsers validate the max val\n function maxValidator(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(maxVal) || viewValue <= maxVal;\n };\n\n setInitialValueAndObserver('max', maxChange);\n }\n\n if (hasStepAttr) {\n stepVal = parseNumberAttrVal(attr.step);\n\n ctrl.$validators.step = supportsRange ?\n function nativeStepValidator() {\n // Currently, only FF implements the spec on step change correctly (i.e. adjusting the\n // input element value to a valid value). It's possible that other browsers set the stepMismatch\n // validity error instead, so we can at least report an error in that case.\n return !validity.stepMismatch;\n } :\n // ngStep doesn't set the setp attr, so the browser doesn't adjust the input value as setting step would\n function stepValidator(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) ||\n isValidForStep(viewValue, minVal || 0, stepVal);\n };\n\n setInitialValueAndObserver('step', stepChange);\n }\n\n function setInitialValueAndObserver(htmlAttrName, changeFn) {\n // interpolated attributes set the attribute value only after a digest, but we need the\n // attribute value when the input is first rendered, so that the browser can adjust the\n // input value based on the min/max value\n element.attr(htmlAttrName, attr[htmlAttrName]);\n var oldVal = attr[htmlAttrName];\n attr.$observe(htmlAttrName, function wrappedObserver(val) {\n if (val !== oldVal) {\n oldVal = val;\n changeFn(val);\n }\n });\n }\n\n function minChange(val) {\n minVal = parseNumberAttrVal(val);\n // ignore changes before model is initialized\n if (isNumberNaN(ctrl.$modelValue)) {\n return;\n }\n\n if (supportsRange) {\n var elVal = element.val();\n // IE11 doesn't set the el val correctly if the minVal is greater than the element value\n if (minVal > elVal) {\n elVal = minVal;\n element.val(elVal);\n }\n ctrl.$setViewValue(elVal);\n } else {\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n }\n\n function maxChange(val) {\n maxVal = parseNumberAttrVal(val);\n // ignore changes before model is initialized\n if (isNumberNaN(ctrl.$modelValue)) {\n return;\n }\n\n if (supportsRange) {\n var elVal = element.val();\n // IE11 doesn't set the el val correctly if the maxVal is less than the element value\n if (maxVal < elVal) {\n element.val(maxVal);\n // IE11 and Chrome don't set the value to the minVal when max < min\n elVal = maxVal < minVal ? minVal : maxVal;\n }\n ctrl.$setViewValue(elVal);\n } else {\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n }\n\n function stepChange(val) {\n stepVal = parseNumberAttrVal(val);\n // ignore changes before model is initialized\n if (isNumberNaN(ctrl.$modelValue)) {\n return;\n }\n\n // Some browsers don't adjust the input value correctly, but set the stepMismatch error\n if (!supportsRange) {\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n } else if (ctrl.$viewValue !== element.val()) {\n ctrl.$setViewValue(element.val());\n }\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$validators.url = function(modelValue, viewValue) {\n var value = modelValue || viewValue;\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$validators.email = function(modelValue, viewValue) {\n var value = modelValue || viewValue;\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n var doTrim = !attr.ngTrim || trim(attr.ngTrim) !== 'false';\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n var value;\n if (element[0].checked) {\n value = attr.value;\n if (doTrim) {\n value = trim(value);\n }\n ctrl.$setViewValue(value, ev && ev.type);\n }\n };\n\n element.on('change', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n if (doTrim) {\n value = trim(value);\n }\n element[0].checked = (value === ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('change', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`\n // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert\n // it to a boolean.\n ctrl.$isEmpty = function(value) {\n return value === false;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with AngularJS data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n * length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.\n *\n * @knownIssue\n *\n * When specifying the `placeholder` attribute of `<textarea>`, Internet Explorer will temporarily\n * insert the placeholder value as the textarea's content. If the placeholder value contains\n * interpolation (`{{ ... }}`), an error will be logged in the console when AngularJS tries to update\n * the value of the by-then-removed text node. This doesn't affect the functionality of the\n * textarea, but can be undesirable.\n *\n * You can work around this Internet Explorer issue by using `ng-attr-placeholder` instead of\n * `placeholder` on textareas, whenever you need interpolation in the placeholder value. You can\n * find more details on `ngAttr` in the\n * [Interpolation](guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes) section of the\n * Developer Guide.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,\n * input state control, and validation.\n * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Not every feature offered is available for all input types.\n * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.\n * </div>\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n * length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * value does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.<br />\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n <example name=\"input-directive\" module=\"inputExample\">\n <file name=\"index.html\">\n <script>\n angular.module('inputExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = {name: 'guest', last: 'visitor'};\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <form name=\"myForm\">\n <label>\n User name:\n <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n Required!</span>\n </div>\n <label>\n Last name:\n <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n ng-minlength=\"3\" ng-maxlength=\"10\">\n </label>\n <div role=\"alert\">\n <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n Too short!</span>\n <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n Too long!</span>\n </div>\n </form>\n <hr>\n <tt>user = {{user}}</tt><br/>\n <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>\n <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>\n <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>\n <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>\n <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>\n <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var user = element(by.exactBinding('user'));\n var userNameValid = element(by.binding('myForm.userName.$valid'));\n var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n var lastNameError = element(by.binding('myForm.lastName.$error'));\n var formValid = element(by.binding('myForm.$valid'));\n var userNameInput = element(by.model('user.name'));\n var userLastInput = element(by.model('user.last'));\n\n it('should initialize to model', function() {\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if empty when required', function() {\n userNameInput.clear();\n userNameInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('false');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be valid if empty when min length is set', function() {\n userLastInput.clear();\n userLastInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n expect(lastNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if less than required min length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('xx');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('minlength');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be invalid if longer than max length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('some ridiculously long name');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('maxlength');\n expect(formValid.getText()).toContain('false');\n });\n </file>\n </example>\n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n function($browser, $sniffer, $filter, $parse) {\n return {\n restrict: 'E',\n require: ['?ngModel'],\n link: {\n pre: function(scope, element, attr, ctrls) {\n if (ctrls[0]) {\n (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n $browser, $filter, $parse);\n }\n }\n }\n };\n}];\n\n\nvar hiddenInputBrowserCacheDirective = function() {\n var valueProperty = {\n configurable: true,\n enumerable: false,\n get: function() {\n return this.getAttribute('value') || '';\n },\n set: function(val) {\n this.setAttribute('value', val);\n }\n };\n\n return {\n restrict: 'E',\n priority: 200,\n compile: function(_, attr) {\n if (lowercase(attr.type) !== 'hidden') {\n return;\n }\n\n return {\n pre: function(scope, element, attr, ctrls) {\n var node = element[0];\n\n // Support: Edge\n // Moving the DOM around prevents autofillling\n if (node.parentNode) {\n node.parentNode.insertBefore(node, node.nextSibling);\n }\n\n // Support: FF, IE\n // Avoiding direct assignment to .value prevents autofillling\n if (Object.defineProperty) {\n Object.defineProperty(node, 'value', valueProperty);\n }\n }\n };\n }\n };\n};\n\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n * @restrict A\n * @priority 100\n *\n * @description\n * Binds the given expression to the value of the element.\n *\n * It is mainly used on {@link input[radio] `input[radio]`} and option elements,\n * so that when the element is selected, the {@link ngModel `ngModel`} of that element (or its\n * {@link select `select`} parent element) is set to the bound value. It is especially useful\n * for dynamically generated lists using {@link ngRepeat `ngRepeat`}, as shown below.\n *\n * It can also be used to achieve one-way binding of a given expression to an input element\n * such as an `input[text]` or a `textarea`, when that element does not use ngModel.\n *\n * @element ANY\n * @param {string=} ngValue AngularJS expression, whose value will be bound to the `value` attribute\n * and `value` property of the element.\n *\n * @example\n <example name=\"ngValue-directive\" module=\"valueExample\">\n <file name=\"index.html\">\n <script>\n angular.module('valueExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.names = ['pizza', 'unicorns', 'robots'];\n $scope.my = { favorite: 'unicorns' };\n }]);\n </script>\n <form ng-controller=\"ExampleController\">\n <h2>Which is your favorite?</h2>\n <label ng-repeat=\"name in names\" for=\"{{name}}\">\n {{name}}\n <input type=\"radio\"\n ng-model=\"my.favorite\"\n ng-value=\"name\"\n id=\"{{name}}\"\n name=\"favorite\">\n </label>\n <div>You chose {{my.favorite}}</div>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var favorite = element(by.binding('my.favorite'));\n\n it('should initialize to model', function() {\n expect(favorite.getText()).toContain('unicorns');\n });\n it('should bind the values to the inputs', function() {\n element.all(by.model('my.favorite')).get(0).click();\n expect(favorite.getText()).toContain('pizza');\n });\n </file>\n </example>\n */\nvar ngValueDirective = function() {\n /**\n * inputs use the value attribute as their default value if the value property is not set.\n * Once the value property has been set (by adding input), it will not react to changes to\n * the value attribute anymore. Setting both attribute and property fixes this behavior, and\n * makes it possible to use ngValue as a sort of one-way bind.\n */\n function updateElementValue(element, attr, value) {\n // Support: IE9 only\n // In IE9 values are converted to string (e.g. `input.value = null` results in `input.value === 'null'`).\n var propValue = isDefined(value) ? value : (msie === 9) ? '' : null;\n element.prop('value', propValue);\n attr.$set('value', value);\n }\n\n return {\n restrict: 'A',\n priority: 100,\n compile: function(tpl, tplAttr) {\n if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n return function ngValueConstantLink(scope, elm, attr) {\n var value = scope.$eval(attr.ngValue);\n updateElementValue(elm, attr, value);\n };\n } else {\n return function ngValueLink(scope, elm, attr) {\n scope.$watch(attr.ngValue, function valueWatchAction(value) {\n updateElementValue(elm, attr, value);\n });\n };\n }\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells AngularJS to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before AngularJS compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n <example module=\"bindExample\" name=\"ng-bind\">\n <file name=\"index.html\">\n <script>\n angular.module('bindExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.name = 'Whirled';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Enter name: <input type=\"text\" ng-model=\"name\"></label><br>\n Hello <span ng-bind=\"name\"></span>!\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-bind', function() {\n var nameInput = element(by.model('name'));\n\n expect(element(by.binding('name')).getText()).toBe('Whirled');\n nameInput.clear();\n nameInput.sendKeys('world');\n expect(element(by.binding('name')).getText()).toBe('world');\n });\n </file>\n </example>\n */\nvar ngBindDirective = ['$compile', function($compile) {\n return {\n restrict: 'AC',\n compile: function ngBindCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBind);\n element = element[0];\n scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n element.textContent = stringify(value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n <example module=\"bindExample\" name=\"ng-bind-template\">\n <file name=\"index.html\">\n <script>\n angular.module('bindExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.salutation = 'Hello';\n $scope.name = 'World';\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Salutation: <input type=\"text\" ng-model=\"salutation\"></label><br>\n <label>Name: <input type=\"text\" ng-model=\"name\"></label><br>\n <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-bind', function() {\n var salutationElem = element(by.binding('salutation'));\n var salutationInput = element(by.model('salutation'));\n var nameInput = element(by.model('name'));\n\n expect(salutationElem.getText()).toBe('Hello World!');\n\n salutationInput.clear();\n salutationInput.sendKeys('Greetings');\n nameInput.clear();\n nameInput.sendKeys('user');\n\n expect(salutationElem.getText()).toBe('Greetings user!');\n });\n </file>\n </example>\n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n return {\n compile: function ngBindTemplateCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindTemplateLink(scope, element, attr) {\n var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n $compile.$$addBindingInfo(element, interpolateFn.expressions);\n element = element[0];\n attr.$observe('ngBindTemplate', function(value) {\n element.textContent = isUndefined(value) ? '' : value;\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,\n * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.\n * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link\n * ngSanitize} in your module's dependencies (not in core AngularJS). In order to use {@link ngSanitize}\n * in your module's dependencies, you need to include \"angular-sanitize.js\" in your application.\n *\n * You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n <example module=\"bindHtmlExample\" deps=\"angular-sanitize.js\" name=\"ng-bind-html\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <p ng-bind-html=\"myHTML\"></p>\n </div>\n </file>\n\n <file name=\"script.js\">\n angular.module('bindHtmlExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.myHTML =\n 'I am an <code>HTML</code>string with ' +\n '<a href=\"#\">links!</a> and other <em>stuff</em>';\n }]);\n </file>\n\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-bind-html', function() {\n expect(element(by.binding('myHTML')).getText()).toBe(\n 'I am an HTMLstring with links! and other stuff');\n });\n </file>\n </example>\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n return {\n restrict: 'A',\n compile: function ngBindHtmlCompile(tElement, tAttrs) {\n var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function sceValueOf(val) {\n // Unwrap the value to compare the actual inner safe value, not the wrapper object.\n return $sce.valueOf(val);\n });\n $compile.$$addBindingClass(tElement);\n\n return function ngBindHtmlLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n // The watched value is the unwrapped value. To avoid re-escaping, use the direct getter.\n var value = ngBindHtmlGetter(scope);\n element.html($sce.getTrustedHtml(value) || '');\n });\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngChange\n * @restrict A\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element ANY\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * <example name=\"ngChange-directive\" module=\"changeExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('changeExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.counter = 0;\n * $scope.change = function() {\n * $scope.counter++;\n * };\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n * <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n * <label for=\"ng-change-example2\">Confirmed</label><br />\n * <tt>debug = {{confirmed}}</tt><br/>\n * <tt>counter = {{counter}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * var counter = element(by.binding('counter'));\n * var debug = element(by.binding('confirmed'));\n *\n * it('should evaluate the expression if changing from view', function() {\n * expect(counter.getText()).toContain('0');\n *\n * element(by.id('ng-change-example1')).click();\n *\n * expect(counter.getText()).toContain('1');\n * expect(debug.getText()).toContain('true');\n * });\n *\n * it('should not evaluate the expression if changing from model', function() {\n * element(by.id('ng-change-example2')).click();\n\n * expect(counter.getText()).toContain('0');\n * expect(debug.getText()).toContain('true');\n * });\n * </file>\n * </example>\n */\nvar ngChangeDirective = valueFn({\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n ctrl.$viewChangeListeners.push(function() {\n scope.$eval(attr.ngChange);\n });\n }\n});\n\n/* exported\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective\n*/\n\nfunction classDirective(name, selector) {\n name = 'ngClass' + name;\n var indexWatchExpression;\n\n return ['$parse', function($parse) {\n return {\n restrict: 'AC',\n link: function(scope, element, attr) {\n var classCounts = element.data('$classCounts');\n var oldModulo = true;\n var oldClassString;\n\n if (!classCounts) {\n // Use createMap() to prevent class assumptions involving property\n // names in Object.prototype\n classCounts = createMap();\n element.data('$classCounts', classCounts);\n }\n\n if (name !== 'ngClass') {\n if (!indexWatchExpression) {\n indexWatchExpression = $parse('$index', function moduloTwo($index) {\n // eslint-disable-next-line no-bitwise\n return $index & 1;\n });\n }\n\n scope.$watch(indexWatchExpression, ngClassIndexWatchAction);\n }\n\n scope.$watch($parse(attr[name], toClassString), ngClassWatchAction);\n\n function addClasses(classString) {\n classString = digestClassCounts(split(classString), 1);\n attr.$addClass(classString);\n }\n\n function removeClasses(classString) {\n classString = digestClassCounts(split(classString), -1);\n attr.$removeClass(classString);\n }\n\n function updateClasses(oldClassString, newClassString) {\n var oldClassArray = split(oldClassString);\n var newClassArray = split(newClassString);\n\n var toRemoveArray = arrayDifference(oldClassArray, newClassArray);\n var toAddArray = arrayDifference(newClassArray, oldClassArray);\n\n var toRemoveString = digestClassCounts(toRemoveArray, -1);\n var toAddString = digestClassCounts(toAddArray, 1);\n\n attr.$addClass(toAddString);\n attr.$removeClass(toRemoveString);\n }\n\n function digestClassCounts(classArray, count) {\n var classesToUpdate = [];\n\n forEach(classArray, function(className) {\n if (count > 0 || classCounts[className]) {\n classCounts[className] = (classCounts[className] || 0) + count;\n if (classCounts[className] === +(count > 0)) {\n classesToUpdate.push(className);\n }\n }\n });\n\n return classesToUpdate.join(' ');\n }\n\n function ngClassIndexWatchAction(newModulo) {\n // This watch-action should run before the `ngClassWatchAction()`, thus it\n // adds/removes `oldClassString`. If the `ngClass` expression has changed as well, the\n // `ngClassWatchAction()` will update the classes.\n if (newModulo === selector) {\n addClasses(oldClassString);\n } else {\n removeClasses(oldClassString);\n }\n\n oldModulo = newModulo;\n }\n\n function ngClassWatchAction(newClassString) {\n if (oldModulo === selector) {\n updateClasses(oldClassString, newClassString);\n }\n\n oldClassString = newClassString;\n }\n }\n };\n }];\n\n // Helpers\n function arrayDifference(tokens1, tokens2) {\n if (!tokens1 || !tokens1.length) return [];\n if (!tokens2 || !tokens2.length) return tokens1;\n\n var values = [];\n\n outer:\n for (var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for (var j = 0; j < tokens2.length; j++) {\n if (token === tokens2[j]) continue outer;\n }\n values.push(token);\n }\n\n return values;\n }\n\n function split(classString) {\n return classString && classString.split(' ');\n }\n\n function toClassString(classValue) {\n if (!classValue) return classValue;\n\n var classString = classValue;\n\n if (isArray(classValue)) {\n classString = classValue.map(toClassString).join(' ');\n } else if (isObject(classValue)) {\n classString = Object.keys(classValue).\n filter(function(key) { return classValue[key]; }).\n join(' ');\n } else if (!isString(classValue)) {\n classString = classValue + '';\n }\n\n return classString;\n }\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n * @element ANY\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * 3. If the expression evaluates to an array, each element of the array should either be a string as in\n * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array\n * to give you more control over what CSS classes appear. See the code below for an example of this.\n *\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then are the\n * new classes added.\n *\n * @knownIssue\n * You should not use {@link guide/interpolation interpolation} in the value of the `class`\n * attribute, when using the `ngClass` directive on the same element.\n * See {@link guide/interpolation#known-issues here} for more info.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#addClass addClass} | just before the class is applied to the element |\n * | {@link ng.$animate#removeClass removeClass} | just before the class is removed from the element |\n * | {@link ng.$animate#setClass setClass} | just before classes are added and classes are removed from the element at the same time |\n *\n * ### ngClass and pre-existing CSS3 Transitions/Animations\n The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n to view the step by step details of {@link $animate#addClass $animate.addClass} and\n {@link $animate#removeClass $animate.removeClass}.\n *\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class\n * names, an array, or a map of class names to boolean values. In the case of a map, the\n * names of the properties whose values are truthy will be added as css classes to the\n * element.\n *\n * @example\n * ### Basic\n <example name=\"ng-class\">\n <file name=\"index.html\">\n <p ng-class=\"{strike: deleted, bold: important, 'has-error': error}\">Map Syntax Example</p>\n <label>\n <input type=\"checkbox\" ng-model=\"deleted\">\n deleted (apply \"strike\" class)\n </label><br>\n <label>\n <input type=\"checkbox\" ng-model=\"important\">\n important (apply \"bold\" class)\n </label><br>\n <label>\n <input type=\"checkbox\" ng-model=\"error\">\n error (apply \"has-error\" class)\n </label>\n <hr>\n <p ng-class=\"style\">Using String Syntax</p>\n <input type=\"text\" ng-model=\"style\"\n placeholder=\"Type: bold strike red\" aria-label=\"Type: bold strike red\">\n <hr>\n <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n <input ng-model=\"style1\"\n placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red\"><br>\n <input ng-model=\"style2\"\n placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 2\"><br>\n <input ng-model=\"style3\"\n placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 3\"><br>\n <hr>\n <p ng-class=\"[style4, {orange: warning}]\">Using Array and Map Syntax</p>\n <input ng-model=\"style4\" placeholder=\"Type: bold, strike\" aria-label=\"Type: bold, strike\"><br>\n <label><input type=\"checkbox\" ng-model=\"warning\"> warning (apply \"orange\" class)</label>\n </file>\n <file name=\"style.css\">\n .strike {\n text-decoration: line-through;\n }\n .bold {\n font-weight: bold;\n }\n .red {\n color: red;\n }\n .has-error {\n color: red;\n background-color: yellow;\n }\n .orange {\n color: orange;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var ps = element.all(by.css('p'));\n\n it('should let you toggle the class', function() {\n\n expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);\n\n element(by.model('important')).click();\n expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n element(by.model('error')).click();\n expect(ps.first().getAttribute('class')).toMatch(/has-error/);\n });\n\n it('should let you toggle string example', function() {\n expect(ps.get(1).getAttribute('class')).toBe('');\n element(by.model('style')).clear();\n element(by.model('style')).sendKeys('red');\n expect(ps.get(1).getAttribute('class')).toBe('red');\n });\n\n it('array example should have 3 classes', function() {\n expect(ps.get(2).getAttribute('class')).toBe('');\n element(by.model('style1')).sendKeys('bold');\n element(by.model('style2')).sendKeys('strike');\n element(by.model('style3')).sendKeys('red');\n expect(ps.get(2).getAttribute('class')).toBe('bold strike red');\n });\n\n it('array with map example should have 2 classes', function() {\n expect(ps.last().getAttribute('class')).toBe('');\n element(by.model('style4')).sendKeys('bold');\n element(by.model('warning')).click();\n expect(ps.last().getAttribute('class')).toBe('bold orange');\n });\n </file>\n </example>\n\n @example\n ### Animations\n\n The example below demonstrates how to perform animations using ngClass.\n\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-class\">\n <file name=\"index.html\">\n <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n <br>\n <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n </file>\n <file name=\"style.css\">\n .base-class {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .base-class.my-class {\n color: red;\n font-size:3em;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-class', function() {\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n\n element(by.id('setbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).\n toMatch(/my-class/);\n\n element(by.id('clearbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n });\n </file>\n </example>\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#addClass addClass} | just before the class is applied to the element |\n * | {@link ng.$animate#removeClass removeClass} | just before the class is removed from the element |\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n <example name=\"ng-class-odd\">\n <file name=\"index.html\">\n <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n <li ng-repeat=\"name in names\">\n <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n {{name}}\n </span>\n </li>\n </ol>\n </file>\n <file name=\"style.css\">\n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n </file>\n </example>\n *\n * <hr />\n * @example\n * An example on how to implement animations using `ngClassOdd`:\n *\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-class-odd-animate\">\n <file name=\"index.html\">\n <div ng-init=\"items=['Item 3', 'Item 2', 'Item 1', 'Item 0']\">\n <button ng-click=\"items.unshift('Item ' + items.length)\">Add item</button>\n <hr />\n <table>\n <tr ng-repeat=\"item in items\" ng-class-odd=\"'odd'\">\n <td>{{ item }}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"style.css\">\n .odd {\n background: rgba(255, 255, 0, 0.25);\n }\n\n .odd-add, .odd-remove {\n transition: 1.5s;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should add new entries to the beginning of the list', function() {\n var button = element(by.buttonText('Add item'));\n var rows = element.all(by.repeater('item in items'));\n\n expect(rows.count()).toBe(4);\n expect(rows.get(0).getText()).toBe('Item 3');\n expect(rows.get(1).getText()).toBe('Item 2');\n\n button.click();\n\n expect(rows.count()).toBe(5);\n expect(rows.get(0).getText()).toBe('Item 4');\n expect(rows.get(1).getText()).toBe('Item 3');\n });\n\n it('should add odd class to odd entries', function() {\n var button = element(by.buttonText('Add item'));\n var rows = element.all(by.repeater('item in items'));\n\n expect(rows.get(0).getAttribute('class')).toMatch(/odd/);\n expect(rows.get(1).getAttribute('class')).not.toMatch(/odd/);\n\n button.click();\n\n expect(rows.get(0).getAttribute('class')).toMatch(/odd/);\n expect(rows.get(1).getAttribute('class')).not.toMatch(/odd/);\n });\n </file>\n </example>\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#addClass addClass} | just before the class is applied to the element |\n * | {@link ng.$animate#removeClass removeClass} | just before the class is removed from the element |\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n * result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n <example name=\"ng-class-even\">\n <file name=\"index.html\">\n <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n <li ng-repeat=\"name in names\">\n <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n {{name}} \n </span>\n </li>\n </ol>\n </file>\n <file name=\"style.css\">\n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n </file>\n </example>\n *\n * <hr />\n * @example\n * An example on how to implement animations using `ngClassEven`:\n *\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-class-even-animate\">\n <file name=\"index.html\">\n <div ng-init=\"items=['Item 3', 'Item 2', 'Item 1', 'Item 0']\">\n <button ng-click=\"items.unshift('Item ' + items.length)\">Add item</button>\n <hr />\n <table>\n <tr ng-repeat=\"item in items\" ng-class-even=\"'even'\">\n <td>{{ item }}</td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"style.css\">\n .even {\n background: rgba(255, 255, 0, 0.25);\n }\n\n .even-add, .even-remove {\n transition: 1.5s;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should add new entries to the beginning of the list', function() {\n var button = element(by.buttonText('Add item'));\n var rows = element.all(by.repeater('item in items'));\n\n expect(rows.count()).toBe(4);\n expect(rows.get(0).getText()).toBe('Item 3');\n expect(rows.get(1).getText()).toBe('Item 2');\n\n button.click();\n\n expect(rows.count()).toBe(5);\n expect(rows.get(0).getText()).toBe('Item 4');\n expect(rows.get(1).getText()).toBe('Item 3');\n });\n\n it('should add even class to even entries', function() {\n var button = element(by.buttonText('Add item'));\n var rows = element.all(by.repeater('item in items'));\n\n expect(rows.get(0).getAttribute('class')).not.toMatch(/even/);\n expect(rows.get(1).getAttribute('class')).toMatch(/even/);\n\n button.click();\n\n expect(rows.get(0).getAttribute('class')).not.toMatch(/even/);\n expect(rows.get(1).getAttribute('class')).toMatch(/even/);\n });\n </file>\n </example>\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the AngularJS html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n * display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When AngularJS encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * @element ANY\n *\n * @example\n <example name=\"ng-cloak\">\n <file name=\"index.html\">\n <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n <div id=\"template2\" class=\"ng-cloak\">{{ 'world' }}</div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should remove the template directive and css class', function() {\n expect($('#template1').getAttribute('ng-cloak')).\n toBeNull();\n expect($('#template2').getAttribute('ng-cloak')).\n toBeNull();\n });\n </file>\n </example>\n *\n */\nvar ngCloakDirective = ngDirective({\n compile: function(element, attr) {\n attr.$set('ngCloak', undefined);\n element.removeClass('ng-cloak');\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n * are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n * logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself. This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the AngularJS markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the AngularJS community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * <example name=\"ngControllerAs\" module=\"controllerAsExample\">\n * <file name=\"index.html\">\n * <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n * <label>Name: <input type=\"text\" ng-model=\"settings.name\"/></label>\n * <button ng-click=\"settings.greet()\">greet</button><br/>\n * Contact:\n * <ul>\n * <li ng-repeat=\"contact in settings.contacts\">\n * <select ng-model=\"contact.type\" aria-label=\"Contact method\" id=\"select_{{$index}}\">\n * <option>phone</option>\n * <option>email</option>\n * </select>\n * <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n * <button ng-click=\"settings.clearContact(contact)\">clear</button>\n * <button ng-click=\"settings.removeContact(contact)\" aria-label=\"Remove\">X</button>\n * </li>\n * <li><button ng-click=\"settings.addContact()\">add</button></li>\n * </ul>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('controllerAsExample', [])\n * .controller('SettingsController1', SettingsController1);\n *\n * function SettingsController1() {\n * this.name = 'John Smith';\n * this.contacts = [\n * {type: 'phone', value: '408 555 1212'},\n * {type: 'email', value: 'john.smith@example.org'}\n * ];\n * }\n *\n * SettingsController1.prototype.greet = function() {\n * alert(this.name);\n * };\n *\n * SettingsController1.prototype.addContact = function() {\n * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n * };\n *\n * SettingsController1.prototype.removeContact = function(contactToRemove) {\n * var index = this.contacts.indexOf(contactToRemove);\n * this.contacts.splice(index, 1);\n * };\n *\n * SettingsController1.prototype.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should check controller as', function() {\n * var container = element(by.id('ctrl-as-exmpl'));\n * expect(container.element(by.model('settings.name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n *\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.buttonText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.buttonText('add')).click();\n *\n * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * </file>\n * </example>\n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * <example name=\"ngController\" module=\"controllerExample\">\n * <file name=\"index.html\">\n * <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n * <label>Name: <input type=\"text\" ng-model=\"name\"/></label>\n * <button ng-click=\"greet()\">greet</button><br/>\n * Contact:\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <select ng-model=\"contact.type\" id=\"select_{{$index}}\">\n * <option>phone</option>\n * <option>email</option>\n * </select>\n * <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n * <button ng-click=\"clearContact(contact)\">clear</button>\n * <button ng-click=\"removeContact(contact)\">X</button>\n * </li>\n * <li>[ <button ng-click=\"addContact()\">add</button> ]</li>\n * </ul>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('controllerExample', [])\n * .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n * function SettingsController2($scope) {\n * $scope.name = 'John Smith';\n * $scope.contacts = [\n * {type:'phone', value:'408 555 1212'},\n * {type:'email', value:'john.smith@example.org'}\n * ];\n *\n * $scope.greet = function() {\n * alert($scope.name);\n * };\n *\n * $scope.addContact = function() {\n * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n * };\n *\n * $scope.removeContact = function(contactToRemove) {\n * var index = $scope.contacts.indexOf(contactToRemove);\n * $scope.contacts.splice(index, 1);\n * };\n *\n * $scope.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * }\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should check controller', function() {\n * var container = element(by.id('ctrl-exmpl'));\n *\n * expect(container.element(by.model('name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.buttonText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.buttonText('add')).click();\n *\n * expect(container.element(by.repeater('contact in contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * </file>\n *</example>\n\n */\nvar ngControllerDirective = [function() {\n return {\n restrict: 'A',\n scope: true,\n controller: '@',\n priority: 500\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @restrict A\n * @element ANY\n * @description\n *\n * AngularJS has some features that can conflict with certain restrictions that are applied when using\n * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.\n *\n * If you intend to implement CSP with these rules then you must tell AngularJS not to use these\n * features.\n *\n * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.\n *\n *\n * The following default rules in CSP affect AngularJS:\n *\n * * The use of `eval()`, `Function(string)` and similar functions to dynamically create and execute\n * code from strings is forbidden. AngularJS makes use of this in the {@link $parse} service to\n * provide a 30% increase in the speed of evaluating AngularJS expressions. (This CSP rule can be\n * disabled with the CSP keyword `unsafe-eval`, but it is generally not recommended as it would\n * weaken the protections offered by CSP.)\n *\n * * The use of inline resources, such as inline `<script>` and `<style>` elements, are forbidden.\n * This prevents apps from injecting custom styles directly into the document. AngularJS makes use of\n * this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}). To make these\n * directives work when a CSP rule is blocking inline styles, you must link to the `angular-csp.css`\n * in your HTML manually. (This CSP rule can be disabled with the CSP keyword `unsafe-inline`, but\n * it is generally not recommended as it would weaken the protections offered by CSP.)\n *\n * If you do not provide `ngCsp` then AngularJS tries to autodetect if CSP is blocking dynamic code\n * creation from strings (e.g., `unsafe-eval` not specified in CSP header) and automatically\n * deactivates this feature in the {@link $parse} service. This autodetection, however, triggers a\n * CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on an element of the HTML document that appears before the `<script>` tag that loads\n * the `angular.js` file.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * You can specify which of the CSP related AngularJS features should be deactivated by providing\n * a value for the `ng-csp` attribute. The options are as follows:\n *\n * * no-inline-style: this stops AngularJS from injecting CSS styles into the DOM\n *\n * * no-unsafe-eval: this stops AngularJS from optimizing $parse with unsafe eval of strings\n *\n * You can use these values in the following combinations:\n *\n *\n * * No declaration means that AngularJS will assume that you can do inline styles, but it will do\n * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous\n * versions of AngularJS.\n *\n * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell AngularJS to deactivate both inline\n * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous\n * versions of AngularJS.\n *\n * * Specifying only `no-unsafe-eval` tells AngularJS that we must not use eval, but that we can\n * inject inline styles. E.g. `<body ng-csp=\"no-unsafe-eval\">`.\n *\n * * Specifying only `no-inline-style` tells AngularJS that we must not inject styles, but that we can\n * run eval - no automatic check for unsafe eval will occur. E.g. `<body ng-csp=\"no-inline-style\">`\n *\n * * Specifying both `no-unsafe-eval` and `no-inline-style` tells AngularJS that we must not inject\n * styles nor use eval, which is the same as an empty: ng-csp.\n * E.g.`<body ng-csp=\"no-inline-style;no-unsafe-eval\">`\n *\n * @example\n *\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n ```html\n <!doctype html>\n <html ng-app ng-csp>\n ...\n ...\n </html>\n ```\n\n <!-- Note: the `.csp` suffix in the example name triggers CSP mode in our http server! -->\n <example name=\"example.csp\" module=\"cspExample\" ng-csp=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"MainController as ctrl\">\n <div>\n <button ng-click=\"ctrl.inc()\" id=\"inc\">Increment</button>\n <span id=\"counter\">\n {{ctrl.counter}}\n </span>\n </div>\n\n <div>\n <button ng-click=\"ctrl.evil()\" id=\"evil\">Evil</button>\n <span id=\"evilError\">\n {{ctrl.evilError}}\n </span>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('cspExample', [])\n .controller('MainController', function MainController() {\n this.counter = 0;\n this.inc = function() {\n this.counter++;\n };\n this.evil = function() {\n try {\n eval('1+2'); // eslint-disable-line no-eval\n } catch (e) {\n this.evilError = e.message;\n }\n };\n });\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var util, webdriver;\n\n var incBtn = element(by.id('inc'));\n var counter = element(by.id('counter'));\n var evilBtn = element(by.id('evil'));\n var evilError = element(by.id('evilError'));\n\n function getAndClearSevereErrors() {\n return browser.manage().logs().get('browser').then(function(browserLog) {\n return browserLog.filter(function(logEntry) {\n return logEntry.level.value > webdriver.logging.Level.WARNING.value;\n });\n });\n }\n\n function clearErrors() {\n getAndClearSevereErrors();\n }\n\n function expectNoErrors() {\n getAndClearSevereErrors().then(function(filteredLog) {\n expect(filteredLog.length).toEqual(0);\n if (filteredLog.length) {\n console.log('browser console errors: ' + util.inspect(filteredLog));\n }\n });\n }\n\n function expectError(regex) {\n getAndClearSevereErrors().then(function(filteredLog) {\n var found = false;\n filteredLog.forEach(function(log) {\n if (log.message.match(regex)) {\n found = true;\n }\n });\n if (!found) {\n throw new Error('expected an error that matches ' + regex);\n }\n });\n }\n\n beforeEach(function() {\n util = require('util');\n webdriver = require('selenium-webdriver');\n });\n\n // For now, we only test on Chrome,\n // as Safari does not load the page with Protractor's injected scripts,\n // and Firefox webdriver always disables content security policy (#6358)\n if (browser.params.browser !== 'chrome') {\n return;\n }\n\n it('should not report errors when the page is loaded', function() {\n // clear errors so we are not dependent on previous tests\n clearErrors();\n // Need to reload the page as the page is already loaded when\n // we come here\n browser.driver.getCurrentUrl().then(function(url) {\n browser.get(url);\n });\n expectNoErrors();\n });\n\n it('should evaluate expressions', function() {\n expect(counter.getText()).toEqual('0');\n incBtn.click();\n expect(counter.getText()).toEqual('1');\n expectNoErrors();\n });\n\n it('should throw and report an error when using \"eval\"', function() {\n evilBtn.click();\n expect(evilError.getText()).toMatch(/Content Security Policy/);\n expectError(/Content Security Policy/);\n });\n </file>\n </example>\n */\n\n// `ngCsp` is not implemented as a proper directive any more, because we need it be processed while\n// we bootstrap the app (before `$parse` is instantiated). For this reason, we just have the `csp()`\n// fn that looks for the `ng-csp` attribute anywhere in the current doc.\n\n/**\n * @ngdoc directive\n * @name ngClick\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-click\">\n <file name=\"index.html\">\n <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n Increment\n </button>\n <span>\n count: {{count}}\n </span>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-click', function() {\n expect(element(by.binding('count')).getText()).toMatch('0');\n element(by.css('button')).click();\n expect(element(by.binding('count')).getText()).toMatch('1');\n });\n </file>\n </example>\n */\n/*\n * A collection of directives that allows creation of custom event handlers that are defined as\n * AngularJS expressions and are compiled and executed within the current scope.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n 'blur': true,\n 'focus': true\n};\nforEach(\n 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n function(eventName) {\n var directiveName = directiveNormalize('ng-' + eventName);\n ngEventDirectives[directiveName] = ['$parse', '$rootScope', '$exceptionHandler', function($parse, $rootScope, $exceptionHandler) {\n return createEventDirective($parse, $rootScope, $exceptionHandler, directiveName, eventName, forceAsyncEvents[eventName]);\n }];\n }\n);\n\nfunction createEventDirective($parse, $rootScope, $exceptionHandler, directiveName, eventName, forceAsync) {\n return {\n restrict: 'A',\n compile: function($element, attr) {\n // NOTE:\n // We expose the powerful `$event` object on the scope that provides access to the Window,\n // etc. This is OK, because expressions are not sandboxed any more (and the expression\n // sandbox was never meant to be a security feature anyway).\n var fn = $parse(attr[directiveName]);\n return function ngEventHandler(scope, element) {\n element.on(eventName, function(event) {\n var callback = function() {\n fn(scope, {$event: event});\n };\n\n if (!$rootScope.$$phase) {\n scope.$apply(callback);\n } else if (forceAsync) {\n scope.$evalAsync(callback);\n } else {\n try {\n callback();\n } catch (error) {\n $exceptionHandler(error);\n }\n }\n });\n };\n }\n };\n}\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n <example name=\"ng-dblclick\">\n <file name=\"index.html\">\n <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n Increment (on double click)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-mousedown\">\n <file name=\"index.html\">\n <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n Increment (on mouse down)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-mouseup\">\n <file name=\"index.html\">\n <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n Increment (on mouse up)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-mouseover\">\n <file name=\"index.html\">\n <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse is over)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-mouseenter\">\n <file name=\"index.html\">\n <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse enters)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-mouseleave\">\n <file name=\"index.html\">\n <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse leaves)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-mousemove\">\n <file name=\"index.html\">\n <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n Increment (when mouse moves)\n </button>\n count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n <example name=\"ng-keydown\">\n <file name=\"index.html\">\n <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n key down count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n * @restrict A\n * @element ANY\n * @priority 0\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n <example name=\"ng-keyup\">\n <file name=\"index.html\">\n <p>Typing in the input box below updates the key count</p>\n <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\"> key up count: {{count}}\n\n <p>Typing in the input box below updates the keycode</p>\n <input ng-keyup=\"event=$event\">\n <p>event keyCode: {{ event.keyCode }}</p>\n <p>event altKey: {{ event.altKey }}</p>\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n * @restrict A\n * @element ANY\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n <example name=\"ng-keypress\">\n <file name=\"index.html\">\n <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n key press count: {{count}}\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n * @restrict A\n * @element form\n * @priority 0\n *\n * @description\n * Enables binding AngularJS expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * <div class=\"alert alert-warning\">\n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n * </div>\n *\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example module=\"submitExample\" name=\"ng-submit\">\n <file name=\"index.html\">\n <script>\n angular.module('submitExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.list = [];\n $scope.text = 'hello';\n $scope.submit = function() {\n if ($scope.text) {\n $scope.list.push(this.text);\n $scope.text = '';\n }\n };\n }]);\n </script>\n <form ng-submit=\"submit()\" ng-controller=\"ExampleController\">\n Enter text and hit enter:\n <input type=\"text\" ng-model=\"text\" name=\"text\" />\n <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n <pre>list={{list}}</pre>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-submit', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n expect(element(by.model('text')).getAttribute('value')).toBe('');\n });\n it('should ignore empty strings', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n });\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n * @restrict A\n * @element window, input, select, textarea, a\n * @priority 0\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n * @restrict A\n * @element window, input, select, textarea, a\n * @priority 0\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n * @restrict A\n * @element window, input, select, textarea, a\n * @priority 0\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-copy\">\n <file name=\"index.html\">\n <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n copied: {{copied}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n * @restrict A\n * @element window, input, select, textarea, a\n * @priority 0\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-cut\">\n <file name=\"index.html\">\n <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n cut: {{cut}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n * @restrict A\n * @element window, input, select, textarea, a\n * @priority 0\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n <example name=\"ng-paste\">\n <file name=\"index.html\">\n <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n pasted: {{paste}}\n </file>\n </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n * @multiElement\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property. A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored. The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter} | just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container |\n * | {@link ng.$animate#leave leave} | just before the `ngIf` contents are removed from the DOM |\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n * element is added to the DOM tree.\n *\n * @example\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-if\">\n <file name=\"index.html\">\n <label>Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /></label><br/>\n Show when checked:\n <span ng-if=\"checked\" class=\"animate-if\">\n This is removed when the checkbox is unchecked.\n </span>\n </file>\n <file name=\"animations.css\">\n .animate-if {\n background:white;\n border:1px solid black;\n padding:10px;\n }\n\n .animate-if.ng-enter, .animate-if.ng-leave {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .animate-if.ng-enter,\n .animate-if.ng-leave.ng-leave-active {\n opacity:0;\n }\n\n .animate-if.ng-leave,\n .animate-if.ng-enter.ng-enter-active {\n opacity:1;\n }\n </file>\n </example>\n */\nvar ngIfDirective = ['$animate', '$compile', function($animate, $compile) {\n return {\n multiElement: true,\n transclude: 'element',\n priority: 600,\n terminal: true,\n restrict: 'A',\n $$tlb: true,\n link: function($scope, $element, $attr, ctrl, $transclude) {\n var block, childScope, previousElements;\n $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n if (value) {\n if (!childScope) {\n $transclude(function(clone, newScope) {\n childScope = newScope;\n clone[clone.length++] = $compile.$$createComment('end ngIf', $attr.ngIf);\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block = {\n clone: clone\n };\n $animate.enter(clone, $element.parent(), $element);\n });\n }\n } else {\n if (previousElements) {\n previousElements.remove();\n previousElements = null;\n }\n if (childScope) {\n childScope.$destroy();\n childScope = null;\n }\n if (block) {\n previousElements = getBlockNodes(block.clone);\n $animate.leave(previousElements).done(function(response) {\n if (response !== false) previousElements = null;\n });\n block = null;\n }\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n * @scope\n * @priority -400\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link $sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either add them to your {@link ng.$sceDelegateProvider#trustedResourceUrlList trusted\n * resource URL list} or {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to\n * AngularJS's {@link ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter} | when the expression changes, on the new include |\n * | {@link ng.$animate#leave leave} | when the expression changes, on the old include |\n *\n * The enter and leave animation occur concurrently.\n *\n * @param {string} ngInclude|src AngularJS expression evaluating to URL. If the source is a string constant,\n * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n * <div class=\"alert alert-warning\">\n * **Note:** When using onload on SVG elements in IE11, the browser will try to call\n * a function with the name on the window element, which will usually throw a\n * \"function is undefined\" error. To fix this, you can instead use `data-onload` or a\n * different form that {@link guide/directive#normalization matches} `onload`.\n * </div>\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the content is loaded.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n <example module=\"includeExample\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-include\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n <option value=\"\">(blank)</option>\n </select>\n url of the template: <code>{{template.url}}</code>\n <hr/>\n <div class=\"slide-animate-container\">\n <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('includeExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.templates =\n [{ name: 'template1.html', url: 'template1.html'},\n { name: 'template2.html', url: 'template2.html'}];\n $scope.template = $scope.templates[0];\n }]);\n </file>\n <file name=\"template1.html\">\n Content of template1.html\n </file>\n <file name=\"template2.html\">\n Content of template2.html\n </file>\n <file name=\"animations.css\">\n .slide-animate-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .slide-animate {\n padding:10px;\n }\n\n .slide-animate.ng-enter, .slide-animate.ng-leave {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n display:block;\n padding:10px;\n }\n\n .slide-animate.ng-enter {\n top:-50px;\n }\n .slide-animate.ng-enter.ng-enter-active {\n top:0;\n }\n\n .slide-animate.ng-leave {\n top:0;\n }\n .slide-animate.ng-leave.ng-leave-active {\n top:50px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var templateSelect = element(by.model('template'));\n var includeElem = element(by.css('[ng-include]'));\n\n it('should load template1.html', function() {\n expect(includeElem.getText()).toMatch(/Content of template1.html/);\n });\n\n it('should load template2.html', function() {\n if (browser.params.browser === 'firefox') {\n // Firefox can't handle using selects\n // See https://github.com/angular/protractor/issues/480\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(2).click();\n expect(includeElem.getText()).toMatch(/Content of template2.html/);\n });\n\n it('should change to blank', function() {\n if (browser.params.browser === 'firefox') {\n // Firefox can't handle using selects\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(0).click();\n expect(includeElem.isPresent()).toBe(false);\n });\n </file>\n </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',\n function($templateRequest, $anchorScroll, $animate) {\n return {\n restrict: 'ECA',\n priority: 400,\n terminal: true,\n transclude: 'element',\n controller: angular.noop,\n compile: function(element, attr) {\n var srcExp = attr.ngInclude || attr.src,\n onloadExp = attr.onload || '',\n autoScrollExp = attr.autoscroll;\n\n return function(scope, $element, $attr, ctrl, $transclude) {\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if (previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n if (currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentElement) {\n $animate.leave(currentElement).done(function(response) {\n if (response !== false) previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch(srcExp, function ngIncludeWatchAction(src) {\n var afterAnimation = function(response) {\n if (response !== false && isDefined(autoScrollExp) &&\n (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n };\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (scope.$$destroyed) return;\n\n if (thisChangeId !== changeCounter) return;\n var newScope = scope.$new();\n ctrl.template = response;\n\n // Note: This will also link all children of ng-include that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-include on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, null, $element).done(afterAnimation);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n scope.$eval(onloadExp);\n }, function() {\n if (scope.$$destroyed) return;\n\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n ctrl.template = null;\n }\n });\n };\n }\n };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n function($compile) {\n return {\n restrict: 'ECA',\n priority: -400,\n require: 'ngInclude',\n link: function(scope, $element, $attr, ctrl) {\n if (toString.call($element[0]).match(/SVG/)) {\n // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n // support innerHTML, so detect this here and try to generate the contents\n // specially.\n $element.empty();\n $compile(jqLiteBuildFragment(ctrl.template, window.document).childNodes)(scope,\n function namespaceAdaptedClone(clone) {\n $element.append(clone);\n }, {futureParentElement: $element});\n return;\n }\n\n $element.html(ctrl.template);\n $compile($element.contents())(scope);\n }\n };\n }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n * @priority 450\n * @element ANY\n *\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * <div class=\"alert alert-danger\">\n * This directive can be abused to add unnecessary amounts of logic into your templates.\n * There are only a few appropriate uses of `ngInit`:\n * <ul>\n * <li>aliasing special properties of {@link ng.directive:ngRepeat `ngRepeat`},\n * as seen in the demo below.</li>\n * <li>initializing data during development, or for examples, as seen throughout these docs.</li>\n * <li>injecting data via server side scripting.</li>\n * </ul>\n *\n * Besides these few cases, you should use {@link guide/component Components} or\n * {@link guide/controller Controllers} rather than `ngInit` to initialize values on a scope.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make\n * sure you have parentheses to ensure correct operator precedence:\n * <pre class=\"prettyprint\">\n * `<div ng-init=\"test1 = ($index | toString)\"></div>`\n * </pre>\n * </div>\n *\n * @example\n <example module=\"initExample\" name=\"ng-init\">\n <file name=\"index.html\">\n <script>\n angular.module('initExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.list = [['a', 'b'], ['c', 'd']];\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n </div>\n </div>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should alias index positions', function() {\n var elements = element.all(by.css('.example-init'));\n expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n });\n </file>\n </example>\n */\nvar ngInitDirective = ngDirective({\n priority: 450,\n compile: function() {\n return {\n pre: function(scope, element, attrs) {\n scope.$eval(attrs.ngInit);\n }\n };\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngList\n * @restrict A\n * @priority 100\n *\n * @param {string=} ngList optional delimiter that should be used to split the value.\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n * list item is respected. This implies that the user of the directive is responsible for\n * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n * tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n * when joining the list items back together) and whitespace around each list item is stripped\n * before it is added to the model.\n *\n * @example\n * ### Validation\n *\n * <example name=\"ngList-directive\" module=\"listExample\">\n * <file name=\"app.js\">\n * angular.module('listExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.names = ['morpheus', 'neo', 'trinity'];\n * }]);\n * </file>\n * <file name=\"index.html\">\n * <form name=\"myForm\" ng-controller=\"ExampleController\">\n * <label>List: <input name=\"namesInput\" ng-model=\"names\" ng-list required></label>\n * <span role=\"alert\">\n * <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n * Required!</span>\n * </span>\n * <br>\n * <tt>names = {{names}}</tt><br/>\n * <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n * <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n * <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n * <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n * </form>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * var listInput = element(by.model('names'));\n * var names = element(by.exactBinding('names'));\n * var valid = element(by.binding('myForm.namesInput.$valid'));\n * var error = element(by.css('span.error'));\n *\n * it('should initialize to model', function() {\n * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n * expect(valid.getText()).toContain('true');\n * expect(error.getCssValue('display')).toBe('none');\n * });\n *\n * it('should be invalid if empty', function() {\n * listInput.clear();\n * listInput.sendKeys('');\n *\n * expect(names.getText()).toContain('');\n * expect(valid.getText()).toContain('false');\n * expect(error.getCssValue('display')).not.toBe('none');\n * });\n * </file>\n * </example>\n *\n * @example\n * ### Splitting on newline\n *\n * <example name=\"ngList-directive-newlines\">\n * <file name=\"index.html\">\n * <textarea ng-model=\"list\" ng-list=\" \" ng-trim=\"false\"></textarea>\n * <pre>{{ list | json }}</pre>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * </file>\n * </example>\n *\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n var ngList = attr.ngList || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n PENDING_CLASS: true,\n addSetValidityMethod: true,\n setupValidity: true,\n defaultModelOptions: false\n*/\n\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n EMPTY_CLASS = 'ng-empty',\n NOT_EMPTY_CLASS = 'ng-not-empty';\n\nvar ngModelMinErr = minErr('ngModel');\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a\n * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue\n * is set.\n *\n * @property {*} $modelValue The value in the model that the control is bound to.\n *\n * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n * the control updates the ngModelController with a new {@link ngModel.NgModelController#$viewValue\n `$viewValue`} from the DOM, usually via user input.\n See {@link ngModel.NgModelController#$setViewValue `$setViewValue()`} for a detailed lifecycle explanation.\n Note that the `$parsers` are not called when the bound ngModel expression changes programmatically.\n\n The functions are called in array order, each passing\n its return value through to the next. The last return value is forwarded to the\n {@link ngModel.NgModelController#$validators `$validators`} collection.\n\n Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue\n `$viewValue`}.\n\n Returning `undefined` from a parser means a parse error occurred. In that case,\n no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`\n will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}\n is set to `true`. The parse error is stored in `ngModel.$error.parse`.\n\n This simple example shows a parser that would convert text input value to lowercase:\n * ```js\n * function parse(value) {\n * if (value) {\n * return value.toLowerCase();\n * }\n * }\n * ngModelController.$parsers.push(parse);\n * ```\n\n *\n * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n the bound ngModel expression changes programmatically. The `$formatters` are not called when the\n value of the control is changed by user interaction.\n\n Formatters are used to format / convert the {@link ngModel.NgModelController#$modelValue\n `$modelValue`} for display in the control.\n\n The functions are called in reverse array order, each passing the value through to the\n next. The last return value is used as the actual DOM value.\n\n This simple example shows a formatter that would convert the model value to uppercase:\n\n * ```js\n * function format(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(format);\n * ```\n *\n * @property {Object.<string, function>} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator\n * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators\n * will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever\n * a change to {@link ngModel.NgModelController#$viewValue `$viewValue`} has caused a change\n * to {@link ngModel.NgModelController#$modelValue `$modelValue`}.\n * It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n * @property {string} $name The name attribute of the control.\n *\n * @description\n *\n * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.\n * The controller contains services for data-binding, validation, CSS updates, and value formatting\n * and parsing. It purposefully does not contain any logic which deals with DOM rendering or\n * listening to DOM events.\n * Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding to control elements.\n * AngularJS provides this DOM logic for most {@link input `input`} elements.\n * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example\n * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.\n *\n * @example\n * ### Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. `<span onclick=\"...\">`).\n * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * <example name=\"NgModelController\" module=\"customControl\" deps=\"angular-sanitize.js\">\n <file name=\"style.css\">\n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n </file>\n <file name=\"script.js\">\n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$evalAsync(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a <br> behind\n // If strip-br attribute is provided then we strip this out\n if (attrs.stripBr && html === '<br>') {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n </file>\n <file name=\"index.html\">\n <form name=\"myForm\">\n <div contenteditable\n name=\"myWidget\" ng-model=\"userContent\"\n strip-br=\"true\"\n required>Change me!</div>\n <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n <hr>\n <textarea ng-model=\"userContent\" aria-label=\"Dynamic textarea\"></textarea>\n </form>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should data-bind and become invalid', function() {\n if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n </file>\n * </example>\n *\n *\n */\nNgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate'];\nfunction NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n this.$$parentForm = nullFormCtrl;\n this.$options = defaultModelOptions;\n this.$$updateEvents = '';\n // Attach the correct context to the event handler function for updateOn\n this.$$updateEventHandler = this.$$updateEventHandler.bind(this);\n\n this.$$parsedNgModel = $parse($attr.ngModel);\n this.$$parsedNgModelAssign = this.$$parsedNgModel.assign;\n this.$$ngModelGet = this.$$parsedNgModel;\n this.$$ngModelSet = this.$$parsedNgModelAssign;\n this.$$pendingDebounce = null;\n this.$$parserValid = undefined;\n this.$$parserName = 'parse';\n\n this.$$currentValidationRunId = 0;\n\n this.$$scope = $scope;\n this.$$rootScope = $scope.$root;\n this.$$attr = $attr;\n this.$$element = $element;\n this.$$animate = $animate;\n this.$$timeout = $timeout;\n this.$$parse = $parse;\n this.$$q = $q;\n this.$$exceptionHandler = $exceptionHandler;\n\n setupValidity(this);\n setupModelWatcher(this);\n}\n\nNgModelController.prototype = {\n $$initGetterSetters: function() {\n if (this.$options.getOption('getterSetter')) {\n var invokeModelGetter = this.$$parse(this.$$attr.ngModel + '()'),\n invokeModelSetter = this.$$parse(this.$$attr.ngModel + '($$$p)');\n\n this.$$ngModelGet = function($scope) {\n var modelValue = this.$$parsedNgModel($scope);\n if (isFunction(modelValue)) {\n modelValue = invokeModelGetter($scope);\n }\n return modelValue;\n };\n this.$$ngModelSet = function($scope, newValue) {\n if (isFunction(this.$$parsedNgModel($scope))) {\n invokeModelSetter($scope, {$$$p: newValue});\n } else {\n this.$$parsedNgModelAssign($scope, newValue);\n }\n };\n } else if (!this.$$parsedNgModel.assign) {\n throw ngModelMinErr('nonassign', 'Expression \\'{0}\\' is non-assignable. Element: {1}',\n this.$$attr.ngModel, startingTag(this.$$element));\n }\n },\n\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different from last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different from their previous values. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n $render: noop,\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of an input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n *\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different from the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value The value of the input to check for emptiness.\n * @returns {boolean} True if `value` is \"empty\".\n */\n $isEmpty: function(value) {\n // eslint-disable-next-line no-self-compare\n return isUndefined(value) || value === '' || value === null || value !== value;\n },\n\n $$updateEmptyClasses: function(value) {\n if (this.$isEmpty(value)) {\n this.$$animate.removeClass(this.$$element, NOT_EMPTY_CLASS);\n this.$$animate.addClass(this.$$element, EMPTY_CLASS);\n } else {\n this.$$animate.removeClass(this.$$element, EMPTY_CLASS);\n this.$$animate.addClass(this.$$element, NOT_EMPTY_CLASS);\n }\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the `ng-dirty` class and set the control to its pristine\n * state (`ng-pristine` class). A model is considered to be pristine when the control\n * has not been changed from when first compiled.\n */\n $setPristine: function() {\n this.$dirty = false;\n this.$pristine = true;\n this.$$animate.removeClass(this.$$element, DIRTY_CLASS);\n this.$$animate.addClass(this.$$element, PRISTINE_CLASS);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setDirty\n *\n * @description\n * Sets the control to its dirty state.\n *\n * This method can be called to remove the `ng-pristine` class and set the control to its dirty\n * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed\n * from when first compiled.\n */\n $setDirty: function() {\n this.$dirty = true;\n this.$pristine = false;\n this.$$animate.removeClass(this.$$element, PRISTINE_CLASS);\n this.$$animate.addClass(this.$$element, DIRTY_CLASS);\n this.$$parentForm.$setDirty();\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the `ng-touched` class and set the control to its\n * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n $setUntouched: function() {\n this.$touched = false;\n this.$untouched = true;\n this.$$animate.setClass(this.$$element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the `ng-untouched` class and set the control to its\n * touched state (`ng-touched` class). A model is considered to be touched when the user has\n * first focused the control element and then shifted focus away from the control (blur event).\n */\n $setTouched: function() {\n this.$touched = true;\n this.$untouched = false;\n this.$$animate.setClass(this.$$element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced updates or updates that\n * depend on special events such as `blur`, there can be a period when the `$viewValue` is out of\n * sync with the ngModel's `$modelValue`.\n *\n * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update\n * and reset the input to the last committed view value.\n *\n * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because AngularJS's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * @example\n * <example name=\"ng-model-cancel-update\" module=\"cancel-update-example\">\n * <file name=\"app.js\">\n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.model = {value1: '', value2: ''};\n *\n * $scope.setEmpty = function(e, value, rollback) {\n * if (e.keyCode === 27) {\n * e.preventDefault();\n * if (rollback) {\n * $scope.myForm[value].$rollbackViewValue();\n * }\n * $scope.model[value] = '';\n * }\n * };\n * }]);\n * </file>\n * <file name=\"index.html\">\n * <div ng-controller=\"CancelUpdateController\">\n * <p>Both of these inputs are only updated if they are blurred. Hitting escape should\n * empty them. Follow these steps and observe the difference:</p>\n * <ol>\n * <li>Type something in the input. You will see that the model is not yet updated</li>\n * <li>Press the Escape key.\n * <ol>\n * <li> In the first example, nothing happens, because the model is already '', and no\n * update is detected. If you blur the input, the model will be set to the current view.\n * </li>\n * <li> In the second example, the pending update is cancelled, and the input is set back\n * to the last committed view value (''). Blurring the input does nothing.\n * </li>\n * </ol>\n * </li>\n * </ol>\n *\n * <form name=\"myForm\" ng-model-options=\"{ updateOn: 'blur' }\">\n * <div>\n * <p id=\"inputDescription1\">Without $rollbackViewValue():</p>\n * <input name=\"value1\" aria-describedby=\"inputDescription1\" ng-model=\"model.value1\"\n * ng-keydown=\"setEmpty($event, 'value1')\">\n * value1: \"{{ model.value1 }}\"\n * </div>\n *\n * <div>\n * <p id=\"inputDescription2\">With $rollbackViewValue():</p>\n * <input name=\"value2\" aria-describedby=\"inputDescription2\" ng-model=\"model.value2\"\n * ng-keydown=\"setEmpty($event, 'value2', true)\">\n * value2: \"{{ model.value2 }}\"\n * </div>\n * </form>\n * </div>\n * </file>\n <file name=\"style.css\">\n div {\n display: table-cell;\n }\n div:nth-child(1) {\n padding-right: 30px;\n }\n\n </file>\n * </example>\n */\n $rollbackViewValue: function() {\n this.$$timeout.cancel(this.$$pendingDebounce);\n this.$viewValue = this.$$lastCommittedViewValue;\n this.$render();\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then\n * asynchronous validators).\n * If the validity changes to invalid, the model will be set to `undefined`,\n * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.\n * If the validity changes to valid, it will set the model to the last available valid\n * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.\n */\n $validate: function() {\n\n // ignore $validate before model is initialized\n if (isNumberNaN(this.$modelValue)) {\n return;\n }\n\n var viewValue = this.$$lastCommittedViewValue;\n // Note: we use the $$rawModelValue as $modelValue might have been\n // set to undefined during a view -> model update that found validation\n // errors. We can't parse the view here, since that could change\n // the model although neither viewValue nor the model on the scope changed\n var modelValue = this.$$rawModelValue;\n\n var prevValid = this.$valid;\n var prevModelValue = this.$modelValue;\n\n var allowInvalid = this.$options.getOption('allowInvalid');\n\n var that = this;\n this.$$runValidators(modelValue, viewValue, function(allValid) {\n // If there was no change in validity, don't update the model\n // This prevents changing an invalid modelValue to undefined\n if (!allowInvalid && prevValid !== allValid) {\n // Note: Don't check this.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n that.$modelValue = allValid ? modelValue : undefined;\n\n if (that.$modelValue !== prevModelValue) {\n that.$$writeModelToScope();\n }\n }\n });\n },\n\n $$runValidators: function(modelValue, viewValue, doneCallback) {\n this.$$currentValidationRunId++;\n var localValidationRunId = this.$$currentValidationRunId;\n var that = this;\n\n // check parser error\n if (!processParseErrors()) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors() {\n var errorKey = that.$$parserName;\n\n if (isUndefined(that.$$parserValid)) {\n setValidity(errorKey, null);\n } else {\n if (!that.$$parserValid) {\n forEach(that.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(that.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n }\n\n // Set the parse error last, to prevent unsetting it, should a $validators key == parserName\n setValidity(errorKey, that.$$parserValid);\n return that.$$parserValid;\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(that.$validators, function(validator, name) {\n var result = Boolean(validator(modelValue, viewValue));\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(that.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(that.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw ngModelMinErr('nopromise',\n 'Expected asynchronous validator to return a promise but got \\'{0}\\' instead.', promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function() {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n that.$$q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === that.$$currentValidationRunId) {\n that.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === that.$$currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n $commitViewValue: function() {\n var viewValue = this.$viewValue;\n\n this.$$timeout.cancel(this.$$pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (this.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !this.$$hasNativeValidators)) {\n return;\n }\n this.$$updateEmptyClasses(viewValue);\n this.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (this.$pristine) {\n this.$setDirty();\n }\n this.$$parseAndValidate();\n },\n\n $$parseAndValidate: function() {\n var viewValue = this.$$lastCommittedViewValue;\n var modelValue = viewValue;\n var that = this;\n\n this.$$parserValid = isUndefined(modelValue) ? undefined : true;\n\n // Reset any previous parse error\n this.$setValidity(this.$$parserName, null);\n this.$$parserName = 'parse';\n\n if (this.$$parserValid) {\n for (var i = 0; i < this.$parsers.length; i++) {\n modelValue = this.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n this.$$parserValid = false;\n break;\n }\n }\n }\n if (isNumberNaN(this.$modelValue)) {\n // this.$modelValue has not been touched yet...\n this.$modelValue = this.$$ngModelGet(this.$$scope);\n }\n var prevModelValue = this.$modelValue;\n var allowInvalid = this.$options.getOption('allowInvalid');\n this.$$rawModelValue = modelValue;\n\n if (allowInvalid) {\n this.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n\n // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.\n // This can happen if e.g. $setViewValue is called from inside a parser\n this.$$runValidators(modelValue, this.$$lastCommittedViewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check this.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n that.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (that.$modelValue !== prevModelValue) {\n that.$$writeModelToScope();\n }\n }\n },\n\n $$writeModelToScope: function() {\n this.$$ngModelSet(this.$$scope, this.$modelValue);\n forEach(this.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch (e) {\n // eslint-disable-next-line no-invalid-this\n this.$$exceptionHandler(e);\n }\n }, this);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when a control wants to change the view value; typically,\n * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}\n * directive calls it when the value of the input changes and {@link ng.directive:select select}\n * calls it when an option is selected.\n *\n * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and\n * `$asyncValidators` are called and the value is applied to `$modelValue`.\n * Finally, the value is set to the **expression** specified in the `ng-model` attribute and\n * all the registered change listeners, in the `$viewChangeListeners` list are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`\n * is specified, once the timer runs out.\n *\n * When used with standard inputs, the view value will always be a string (which is in some cases\n * parsed into another type, such as a `Date` object for `input[date]`.)\n * However, custom controls might also pass objects to this method. In this case, we should make\n * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not\n * perform a deep watch of objects, it only looks for a change of identity. If you only change\n * the property of the object then ngModel will not realize that the object has changed and\n * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should\n * not change properties of the copy once it has been passed to `$setViewValue`.\n * Otherwise you may cause the model value on the scope to change incorrectly.\n *\n * <div class=\"alert alert-info\">\n * In any case, the value passed to the method should always reflect the current value\n * of the control. For example, if you are calling `$setViewValue` for an input element,\n * you should pass the input DOM value. Otherwise, the control and the scope model become\n * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change\n * the control's DOM value in any way. If we want to change the control's DOM value\n * programmatically, we should update the `ngModel` scope expression. Its new value will be\n * picked up by the model controller, which will run it through the `$formatters`, `$render` it\n * to update the DOM, and finally call `$validate` on it.\n * </div>\n *\n * @param {*} value value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n $setViewValue: function(value, trigger) {\n this.$viewValue = value;\n if (this.$options.getOption('updateOnDefault')) {\n this.$$debounceViewValueCommit(trigger);\n }\n },\n\n $$debounceViewValueCommit: function(trigger) {\n var debounceDelay = this.$options.getOption('debounce');\n\n if (isNumber(debounceDelay[trigger])) {\n debounceDelay = debounceDelay[trigger];\n } else if (isNumber(debounceDelay['default']) &&\n this.$options.getOption('updateOn').indexOf(trigger) === -1\n ) {\n debounceDelay = debounceDelay['default'];\n } else if (isNumber(debounceDelay['*'])) {\n debounceDelay = debounceDelay['*'];\n }\n\n this.$$timeout.cancel(this.$$pendingDebounce);\n var that = this;\n if (debounceDelay > 0) { // this fails if debounceDelay is an object\n this.$$pendingDebounce = this.$$timeout(function() {\n that.$commitViewValue();\n }, debounceDelay);\n } else if (this.$$rootScope.$$phase) {\n this.$commitViewValue();\n } else {\n this.$$scope.$apply(function() {\n that.$commitViewValue();\n });\n }\n },\n\n /**\n * @ngdoc method\n *\n * @name ngModel.NgModelController#$overrideModelOptions\n *\n * @description\n *\n * Override the current model options settings programmatically.\n *\n * The previous `ModelOptions` value will not be modified. Instead, a\n * new `ModelOptions` object will inherit from the previous one overriding\n * or inheriting settings that are defined in the given parameter.\n *\n * See {@link ngModelOptions} for information about what options can be specified\n * and how model option inheritance works.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** this function only affects the options set on the `ngModelController`,\n * and not the options on the {@link ngModelOptions} directive from which they might have been\n * obtained initially.\n * </div>\n *\n * <div class=\"alert alert-danger\">\n * **Note:** it is not possible to override the `getterSetter` option.\n * </div>\n *\n * @param {Object} options a hash of settings to override the previous options\n *\n */\n $overrideModelOptions: function(options) {\n this.$options = this.$options.createChild(options);\n this.$$setUpdateOnEvents();\n },\n\n /**\n * @ngdoc method\n *\n * @name ngModel.NgModelController#$processModelValue\n\n * @description\n *\n * Runs the model -> view pipeline on the current\n * {@link ngModel.NgModelController#$modelValue $modelValue}.\n *\n * The following actions are performed by this method:\n *\n * - the `$modelValue` is run through the {@link ngModel.NgModelController#$formatters $formatters}\n * and the result is set to the {@link ngModel.NgModelController#$viewValue $viewValue}\n * - the `ng-empty` or `ng-not-empty` class is set on the element\n * - if the `$viewValue` has changed:\n * - {@link ngModel.NgModelController#$render $render} is called on the control\n * - the {@link ngModel.NgModelController#$validators $validators} are run and\n * the validation status is set.\n *\n * This method is called by ngModel internally when the bound scope value changes.\n * Application developers usually do not have to call this function themselves.\n *\n * This function can be used when the `$viewValue` or the rendered DOM value are not correctly\n * formatted and the `$modelValue` must be run through the `$formatters` again.\n *\n * @example\n * Consider a text input with an autocomplete list (for fruit), where the items are\n * objects with a name and an id.\n * A user enters `ap` and then selects `Apricot` from the list.\n * Based on this, the autocomplete widget will call `$setViewValue({name: 'Apricot', id: 443})`,\n * but the rendered value will still be `ap`.\n * The widget can then call `ctrl.$processModelValue()` to run the model -> view\n * pipeline again, which formats the object to the string `Apricot`,\n * then updates the `$viewValue`, and finally renders it in the DOM.\n *\n * <example module=\"inputExample\" name=\"ng-model-process\">\n <file name=\"index.html\">\n <div ng-controller=\"inputController\" style=\"display: flex;\">\n <div style=\"margin-right: 30px;\">\n Search Fruit:\n <basic-autocomplete items=\"items\" on-select=\"selectedFruit = item\"></basic-autocomplete>\n </div>\n <div>\n Model:<br>\n <pre>{{selectedFruit | json}}</pre>\n </div>\n </div>\n </file>\n <file name=\"app.js\">\n angular.module('inputExample', [])\n .controller('inputController', function($scope) {\n $scope.items = [\n {name: 'Apricot', id: 443},\n {name: 'Clementine', id: 972},\n {name: 'Durian', id: 169},\n {name: 'Jackfruit', id: 982},\n {name: 'Strawberry', id: 863}\n ];\n })\n .component('basicAutocomplete', {\n bindings: {\n items: '<',\n onSelect: '&'\n },\n templateUrl: 'autocomplete.html',\n controller: function($element, $scope) {\n var that = this;\n var ngModel;\n\n that.$postLink = function() {\n ngModel = $element.find('input').controller('ngModel');\n\n ngModel.$formatters.push(function(value) {\n return (value && value.name) || value;\n });\n\n ngModel.$parsers.push(function(value) {\n var match = value;\n for (var i = 0; i < that.items.length; i++) {\n if (that.items[i].name === value) {\n match = that.items[i];\n break;\n }\n }\n\n return match;\n });\n };\n\n that.selectItem = function(item) {\n ngModel.$setViewValue(item);\n ngModel.$processModelValue();\n that.onSelect({item: item});\n };\n }\n });\n </file>\n <file name=\"autocomplete.html\">\n <div>\n <input type=\"search\" ng-model=\"$ctrl.searchTerm\" />\n <ul>\n <li ng-repeat=\"item in $ctrl.items | filter:$ctrl.searchTerm\">\n <button ng-click=\"$ctrl.selectItem(item)\">{{ item.name }}</button>\n </li>\n </ul>\n </div>\n </file>\n * </example>\n *\n */\n $processModelValue: function() {\n var viewValue = this.$$format();\n\n if (this.$viewValue !== viewValue) {\n this.$$updateEmptyClasses(viewValue);\n this.$viewValue = this.$$lastCommittedViewValue = viewValue;\n this.$render();\n // It is possible that model and view value have been updated during render\n this.$$runValidators(this.$modelValue, this.$viewValue, noop);\n }\n },\n\n /**\n * This method is called internally to run the $formatters on the $modelValue\n */\n $$format: function() {\n var formatters = this.$formatters,\n idx = formatters.length;\n\n var viewValue = this.$modelValue;\n while (idx--) {\n viewValue = formatters[idx](viewValue);\n }\n\n return viewValue;\n },\n\n /**\n * This method is called internally when the bound scope value changes.\n */\n $$setModelValue: function(modelValue) {\n this.$modelValue = this.$$rawModelValue = modelValue;\n this.$$parserValid = undefined;\n this.$processModelValue();\n },\n\n $$setUpdateOnEvents: function() {\n if (this.$$updateEvents) {\n this.$$element.off(this.$$updateEvents, this.$$updateEventHandler);\n }\n\n this.$$updateEvents = this.$options.getOption('updateOn');\n if (this.$$updateEvents) {\n this.$$element.on(this.$$updateEvents, this.$$updateEventHandler);\n }\n },\n\n $$updateEventHandler: function(ev) {\n this.$$debounceViewValueCommit(ev && ev.type);\n }\n};\n\nfunction setupModelWatcher(ctrl) {\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n ctrl.$$scope.$watch(function ngModelWatch(scope) {\n var modelValue = ctrl.$$ngModelGet(scope);\n\n // if scope model value and ngModel value are out of sync\n // This cannot be moved to the action function, because it would not catch the\n // case where the model is changed in the ngChange function or the model setter\n if (modelValue !== ctrl.$modelValue &&\n // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator\n // eslint-disable-next-line no-self-compare\n (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)\n ) {\n ctrl.$$setModelValue(modelValue);\n }\n\n return modelValue;\n });\n}\n\n/**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notify the form.\n *\n * This method can be called within $parsers/$formatters or a custom validation implementation.\n * However, in most cases it should be sufficient to use the `ngModel.$validators` and\n * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.\n *\n * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned\n * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`\n * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * classes and can be bound to as `{{ someForm.someControl.$error.myError }}`.\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n * Skipped is used by AngularJS when validators do not run because of parse errors and\n * when `$asyncValidators` do not run because any of the `$validators` failed.\n */\naddSetValidityMethod({\n clazz: NgModelController,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n }\n});\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n * @restrict A\n * @priority 1\n * @param {expression} ngModel assignable {@link guide/expression Expression} to bind to.\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`,\n * `ng-untouched`, `ng-empty`, `ng-not-empty`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[datetime-local] datetime-local}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * ## Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the\n * object or collection change, `ngModel` will not be notified and so the input will not be re-rendered.\n *\n * The model must be assigned an entirely new object or collection before a re-rendering will occur.\n *\n * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression\n * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or\n * if the select is given the `multiple` attribute.\n *\n * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the\n * first level of the object (or only changing the properties of an item in the collection if it's an array) will still\n * not trigger a re-rendering of the model.\n *\n * ## CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid`: the model is valid\n * - `ng-invalid`: the model is invalid\n * - `ng-valid-[key]`: for each valid key added by `$setValidity`\n * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`\n * - `ng-pristine`: the control hasn't been interacted with yet\n * - `ng-dirty`: the control has been interacted with\n * - `ng-touched`: the control has been blurred\n * - `ng-untouched`: the control hasn't been blurred\n * - `ng-pending`: any `$asyncValidators` are unfulfilled\n * - `ng-empty`: the view does not contain a value or the value is deemed \"empty\", as defined\n * by the {@link ngModel.NgModelController#$isEmpty} method\n * - `ng-not-empty`: the view contains a non-empty value\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * @animations\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-input.ng-invalid {\n * background: red;\n * color:white;\n * }\n * </pre>\n *\n * @example\n * ### Basic Usage\n * <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"inputExample\" name=\"ng-model\">\n <file name=\"index.html\">\n <script>\n angular.module('inputExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.val = '1';\n }]);\n </script>\n <style>\n .my-input {\n transition:all linear 0.5s;\n background: transparent;\n }\n .my-input.ng-invalid {\n color:white;\n background: red;\n }\n </style>\n <p id=\"inputDescription\">\n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n </p>\n <form name=\"testForm\" ng-controller=\"ExampleController\">\n <input ng-model=\"val\" ng-pattern=\"/^\\d+$/\" name=\"anim\" class=\"my-input\"\n aria-describedby=\"inputDescription\" />\n </form>\n </file>\n * </example>\n *\n * @example\n * ### Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different from what the model exposes\n * to the view.\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's best to keep getters fast because AngularJS is likely to call them more\n * frequently than other parts of your code.\n * </div>\n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a `<form>`, which will enable this behavior for all `<input>`s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * <example name=\"ngModel-getter-setter\" module=\"getterSetterExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form name=\"userForm\">\n <label>Name:\n <input type=\"text\" name=\"userName\"\n ng-model=\"user.name\"\n ng-model-options=\"{ getterSetter: true }\" />\n </label>\n </form>\n <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n </div>\n </file>\n <file name=\"app.js\">\n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function(newName) {\n // Note that newName can be undefined for two reasons:\n // 1. Because it is called as a getter and thus called with no arguments\n // 2. Because the property should actually be set to undefined. This happens e.g. if the\n // input is invalid\n return arguments.length ? (_name = newName) : _name;\n }\n };\n }]);\n </file>\n * </example>\n */\nvar ngModelDirective = ['$rootScope', function($rootScope) {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n // Prelink needs to run before any input directive\n // so that we can set the NgModelOptions in NgModelController\n // before anyone else uses it.\n priority: 1,\n compile: function ngModelCompile(element) {\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);\n\n return {\n pre: function ngModelPreLink(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || modelCtrl.$$parentForm,\n optionsCtrl = ctrls[2];\n\n if (optionsCtrl) {\n modelCtrl.$options = optionsCtrl.$options;\n }\n\n modelCtrl.$$initGetterSetters();\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n modelCtrl.$$parentForm.$removeControl(modelCtrl);\n });\n },\n post: function ngModelPostLink(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n modelCtrl.$$setUpdateOnEvents();\n\n function setTouched() {\n modelCtrl.$setTouched();\n }\n\n element.on('blur', function() {\n if (modelCtrl.$touched) return;\n\n if ($rootScope.$$phase) {\n scope.$evalAsync(setTouched);\n } else {\n scope.$apply(setTouched);\n }\n });\n }\n };\n }\n };\n}];\n\n/* exported defaultModelOptions */\nvar defaultModelOptions;\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\n/**\n * @ngdoc type\n * @name ModelOptions\n * @description\n * A container for the options set by the {@link ngModelOptions} directive\n */\nfunction ModelOptions(options) {\n this.$$options = options;\n}\n\nModelOptions.prototype = {\n\n /**\n * @ngdoc method\n * @name ModelOptions#getOption\n * @param {string} name the name of the option to retrieve\n * @returns {*} the value of the option\n * @description\n * Returns the value of the given option\n */\n getOption: function(name) {\n return this.$$options[name];\n },\n\n /**\n * @ngdoc method\n * @name ModelOptions#createChild\n * @param {Object} options a hash of options for the new child that will override the parent's options\n * @return {ModelOptions} a new `ModelOptions` object initialized with the given options.\n */\n createChild: function(options) {\n var inheritAll = false;\n\n // make a shallow copy\n options = extend({}, options);\n\n // Inherit options from the parent if specified by the value `\"$inherit\"`\n forEach(options, /** @this */ function(option, key) {\n if (option === '$inherit') {\n if (key === '*') {\n inheritAll = true;\n } else {\n options[key] = this.$$options[key];\n // `updateOn` is special so we must also inherit the `updateOnDefault` option\n if (key === 'updateOn') {\n options.updateOnDefault = this.$$options.updateOnDefault;\n }\n }\n } else {\n if (key === 'updateOn') {\n // If the `updateOn` property contains the `default` event then we have to remove\n // it from the event list and set the `updateOnDefault` flag.\n options.updateOnDefault = false;\n options[key] = trim(option.replace(DEFAULT_REGEXP, function() {\n options.updateOnDefault = true;\n return ' ';\n }));\n }\n }\n }, this);\n\n if (inheritAll) {\n // We have a property of the form: `\"*\": \"$inherit\"`\n delete options['*'];\n defaults(options, this.$$options);\n }\n\n // Finally add in any missing defaults\n defaults(options, defaultModelOptions.$$options);\n\n return new ModelOptions(options);\n }\n};\n\n\ndefaultModelOptions = new ModelOptions({\n updateOn: '',\n updateOnDefault: true,\n debounce: 0,\n getterSetter: false,\n allowInvalid: false,\n timezone: null\n});\n\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n * @restrict A\n * @priority 10\n *\n * @description\n * This directive allows you to modify the behaviour of {@link ngModel} directives within your\n * application. You can specify an `ngModelOptions` directive on any element. All {@link ngModel}\n * directives will use the options of their nearest `ngModelOptions` ancestor.\n *\n * The `ngModelOptions` settings are found by evaluating the value of the attribute directive as\n * an AngularJS expression. This expression should evaluate to an object, whose properties contain\n * the settings. For example: `<div ng-model-options=\"{ debounce: 100 }\"`.\n *\n * ## Inheriting Options\n *\n * You can specify that an `ngModelOptions` setting should be inherited from a parent `ngModelOptions`\n * directive by giving it the value of `\"$inherit\"`.\n * Then it will inherit that setting from the first `ngModelOptions` directive found by traversing up the\n * DOM tree. If there is no ancestor element containing an `ngModelOptions` directive then default settings\n * will be used.\n *\n * For example given the following fragment of HTML\n *\n *\n * ```html\n * <div ng-model-options=\"{ allowInvalid: true, debounce: 200 }\">\n * <form ng-model-options=\"{ updateOn: 'blur', allowInvalid: '$inherit' }\">\n * <input ng-model-options=\"{ updateOn: 'default', allowInvalid: '$inherit' }\" />\n * </form>\n * </div>\n * ```\n *\n * the `input` element will have the following settings\n *\n * ```js\n * { allowInvalid: true, updateOn: 'default', debounce: 0 }\n * ```\n *\n * Notice that the `debounce` setting was not inherited and used the default value instead.\n *\n * You can specify that all undefined settings are automatically inherited from an ancestor by\n * including a property with key of `\"*\"` and value of `\"$inherit\"`.\n *\n * For example given the following fragment of HTML\n *\n *\n * ```html\n * <div ng-model-options=\"{ allowInvalid: true, debounce: 200 }\">\n * <form ng-model-options=\"{ updateOn: 'blur', \"*\": '$inherit' }\">\n * <input ng-model-options=\"{ updateOn: 'default', \"*\": '$inherit' }\" />\n * </form>\n * </div>\n * ```\n *\n * the `input` element will have the following settings\n *\n * ```js\n * { allowInvalid: true, updateOn: 'default', debounce: 200 }\n * ```\n *\n * Notice that the `debounce` setting now inherits the value from the outer `<div>` element.\n *\n * If you are creating a reusable component then you should be careful when using `\"*\": \"$inherit\"`\n * since you may inadvertently inherit a setting in the future that changes the behavior of your component.\n *\n *\n * ## Triggering and debouncing model updates\n *\n * The `updateOn` and `debounce` properties allow you to specify a custom list of events that will\n * trigger a model update and/or a debouncing delay so that the actual update only takes place when\n * a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different from the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController#$rollbackViewValue} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController#$rollbackViewValue}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ### Overriding immediate updates\n *\n * The following example shows how to override immediate updates. Changes on the inputs within the\n * form will update the model only when the control loses focus (blur event). If `escape` key is\n * pressed while the input field is focused, the value is reset to the value in the current model.\n *\n * <example name=\"ngModelOptions-directive-blur\" module=\"optionsExample\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"userForm\">\n * <label>\n * Name:\n * <input type=\"text\" name=\"userName\"\n * ng-model=\"user.name\"\n * ng-model-options=\"{ updateOn: 'blur' }\"\n * ng-keyup=\"cancel($event)\" />\n * </label><br />\n * <label>\n * Other data:\n * <input type=\"text\" ng-model=\"user.data\" />\n * </label><br />\n * </form>\n * <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('optionsExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.user = { name: 'say', data: '' };\n *\n * $scope.cancel = function(e) {\n * if (e.keyCode === 27) {\n * $scope.userForm.userName.$rollbackViewValue();\n * }\n * };\n * }]);\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * var model = element(by.binding('user.name'));\n * var input = element(by.model('user.name'));\n * var other = element(by.model('user.data'));\n *\n * it('should allow custom events', function() {\n * input.sendKeys(' hello');\n * input.click();\n * expect(model.getText()).toEqual('say');\n * other.click();\n * expect(model.getText()).toEqual('say hello');\n * });\n *\n * it('should $rollbackViewValue when model changes', function() {\n * input.sendKeys(' hello');\n * expect(input.getAttribute('value')).toEqual('say hello');\n * input.sendKeys(protractor.Key.ESCAPE);\n * expect(input.getAttribute('value')).toEqual('say');\n * other.click();\n * expect(model.getText()).toEqual('say');\n * });\n * </file>\n * </example>\n *\n * ### Debouncing updates\n *\n * The next example shows how to debounce model changes. Model will be updated only 1 sec after last change.\n * If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n *\n * <example name=\"ngModelOptions-directive-debounce\" module=\"optionsExample\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"userForm\">\n * Name:\n * <input type=\"text\" name=\"userName\"\n * ng-model=\"user.name\"\n * ng-model-options=\"{ debounce: 1000 }\" />\n * <button ng-click=\"userForm.userName.$rollbackViewValue(); user.name=''\">Clear</button><br />\n * </form>\n * <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('optionsExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.user = { name: 'say' };\n * }]);\n * </file>\n * </example>\n *\n * ### Default events, extra triggers, and catch-all debounce values\n *\n * This example shows the relationship between \"default\" update events and\n * additional `updateOn` triggers.\n *\n * `default` events are those that are bound to the control, and when fired, update the `$viewValue`\n * via {@link ngModel.NgModelController#$setViewValue $setViewValue}. Every event that is not listed\n * in `updateOn` is considered a \"default\" event, since different control types have different\n * default events.\n *\n * The control in this example updates by \"default\", \"click\", and \"blur\", with different `debounce`\n * values. You can see that \"click\" doesn't have an individual `debounce` value -\n * therefore it uses the `*` debounce value.\n *\n * There is also a button that calls {@link ngModel.NgModelController#$setViewValue $setViewValue}\n * directly with a \"custom\" event. Since \"custom\" is not defined in the `updateOn` list,\n * it is considered a \"default\" event and will update the\n * control if \"default\" is defined in `updateOn`, and will receive the \"default\" debounce value.\n * Note that this is just to illustrate how custom controls would possibly call `$setViewValue`.\n *\n * You can change the `updateOn` and `debounce` configuration to test different scenarios. This\n * is done with {@link ngModel.NgModelController#$overrideModelOptions $overrideModelOptions}.\n *\n <example name=\"ngModelOptions-advanced\" module=\"optionsExample\">\n <file name=\"index.html\">\n <model-update-demo></model-update-demo>\n </file>\n <file name=\"app.js\">\n angular.module('optionsExample', [])\n .component('modelUpdateDemo', {\n templateUrl: 'template.html',\n controller: function() {\n this.name = 'Chinua';\n\n this.options = {\n updateOn: 'default blur click',\n debounce: {\n default: 2000,\n blur: 0,\n '*': 1000\n }\n };\n\n this.updateEvents = function() {\n var eventList = this.options.updateOn.split(' ');\n eventList.push('*');\n var events = {};\n\n for (var i = 0; i < eventList.length; i++) {\n events[eventList[i]] = this.options.debounce[eventList[i]];\n }\n\n this.events = events;\n };\n\n this.updateOptions = function() {\n var options = angular.extend(this.options, {\n updateOn: Object.keys(this.events).join(' ').replace('*', ''),\n debounce: this.events\n });\n\n this.form.input.$overrideModelOptions(options);\n };\n\n // Initialize the event form\n this.updateEvents();\n }\n });\n </file>\n <file name=\"template.html\">\n <form name=\"$ctrl.form\">\n Input: <input type=\"text\" name=\"input\" ng-model=\"$ctrl.name\" ng-model-options=\"$ctrl.options\" />\n </form>\n Model: <tt>{{$ctrl.name}}</tt>\n <hr>\n <button ng-click=\"$ctrl.form.input.$setViewValue('some value', 'custom')\">Trigger setViewValue with 'some value' and 'custom' event</button>\n\n <hr>\n <form ng-submit=\"$ctrl.updateOptions()\">\n <b>updateOn</b><br>\n <input type=\"text\" ng-model=\"$ctrl.options.updateOn\" ng-change=\"$ctrl.updateEvents()\" ng-model-options=\"{debounce: 500}\">\n\n <table>\n <tr>\n <th>Option</th>\n <th>Debounce value</th>\n </tr>\n <tr ng-repeat=\"(key, value) in $ctrl.events\">\n <td>{{key}}</td>\n <td><input type=\"number\" ng-model=\"$ctrl.events[key]\" /></td>\n </tr>\n </table>\n\n <br>\n <input type=\"submit\" value=\"Update options\">\n </form>\n </file>\n </example>\n *\n *\n * ## Model updates and validation\n *\n * The default behaviour in `ngModel` is that the model value is set to `undefined` when the\n * validation determines that the value is invalid. By setting the `allowInvalid` property to true,\n * the model will still be updated even if the value is invalid.\n *\n *\n * ## Connecting to the scope\n *\n * By setting the `getterSetter` property to true you are telling ngModel that the `ngModel` expression\n * on the scope refers to a \"getter/setter\" function rather than the value itself.\n *\n * The following example shows how to bind to getter/setters:\n *\n * <example name=\"ngModelOptions-directive-getter-setter\" module=\"getterSetterExample\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"userForm\">\n * <label>\n * Name:\n * <input type=\"text\" name=\"userName\"\n * ng-model=\"user.name\"\n * ng-model-options=\"{ getterSetter: true }\" />\n * </label>\n * </form>\n * <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('getterSetterExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * var _name = 'Brian';\n * $scope.user = {\n * name: function(newName) {\n * return angular.isDefined(newName) ? (_name = newName) : _name;\n * }\n * };\n * }]);\n * </file>\n * </example>\n *\n *\n * ## Programmatically changing options\n *\n * The `ngModelOptions` expression is only evaluated once when the directive is linked; it is not\n * watched for changes. However, it is possible to override the options on a single\n * {@link ngModel.NgModelController} instance with\n * {@link ngModel.NgModelController#$overrideModelOptions `NgModelController#$overrideModelOptions()`}.\n * See also the example for\n * {@link ngModelOptions#default-events-extra-triggers-and-catch-all-debounce-values\n * Default events, extra triggers, and catch-all debounce values}.\n *\n *\n * ## Specifying timezones\n *\n * You can specify the timezone that date/time input directives expect by providing its name in the\n * `timezone` property.\n *\n *\n * ## Formatting the value of `time` and `datetime-local`\n *\n * With the options `timeSecondsFormat` and `timeStripZeroSeconds` it is possible to adjust the value\n * that is displayed in the control. Note that browsers may apply their own formatting\n * in the user interface.\n *\n <example name=\"ngModelOptions-time-format\" module=\"timeExample\">\n <file name=\"index.html\">\n <time-example></time-example>\n </file>\n <file name=\"script.js\">\n angular.module('timeExample', [])\n .component('timeExample', {\n templateUrl: 'timeExample.html',\n controller: function() {\n this.time = new Date(1970, 0, 1, 14, 57, 0);\n\n this.options = {\n timeSecondsFormat: 'ss',\n timeStripZeroSeconds: true\n };\n\n this.optionChange = function() {\n this.timeForm.timeFormatted.$overrideModelOptions(this.options);\n this.time = new Date(this.time);\n };\n }\n });\n </file>\n <file name=\"timeExample.html\">\n <form name=\"$ctrl.timeForm\">\n <strong>Default</strong>:\n <input type=\"time\" ng-model=\"$ctrl.time\" step=\"any\" /><br>\n <strong>With options</strong>:\n <input type=\"time\" name=\"timeFormatted\" ng-model=\"$ctrl.time\" step=\"any\" ng-model-options=\"$ctrl.options\" />\n <br>\n\n Options:<br>\n <code>timeSecondsFormat</code>:\n <input\n type=\"text\"\n ng-model=\"$ctrl.options.timeSecondsFormat\"\n ng-change=\"$ctrl.optionChange()\">\n <br>\n <code>timeStripZeroSeconds</code>:\n <input\n type=\"checkbox\"\n ng-model=\"$ctrl.options.timeStripZeroSeconds\"\n ng-change=\"$ctrl.optionChange()\">\n </form>\n </file>\n * </example>\n *\n * @param {Object} ngModelOptions options to apply to {@link ngModel} directives on this element and\n * and its descendents.\n *\n * **General options**:\n *\n * - `updateOn`: string specifying which event should the input be bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging to the control. These are the events that are bound to\n * the control, and when fired, update the `$viewValue` via `$setViewValue`.\n *\n * `ngModelOptions` considers every event that is not listed in `updateOn` a \"default\" event,\n * since different control types use different default events.\n *\n * See also the section {@link ngModelOptions#triggering-and-debouncing-model-updates\n * Triggering and debouncing model updates}.\n *\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * ```\n * ng-model-options=\"{\n * updateOn: 'default blur',\n * debounce: { 'default': 500, 'blur': 0 }\n * }\"\n * ```\n * You can use the `*` key to specify a debounce value that applies to all events that are not\n * specifically listed. In the following example, `mouseup` would have a debounce delay of 1000:\n * ```\n * ng-model-options=\"{\n * updateOn: 'default blur mouseup',\n * debounce: { 'default': 500, 'blur': 0, '*': 1000 }\n * }\"\n * ```\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n * `ngModel` as getters/setters.\n *\n *\n * **Input-type specific options**:\n *\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * `<input type=\"date\" />`, `<input type=\"time\" />`, ... . It understands UTC/GMT and the\n * continental US time zone abbreviations, but for general use, use a time zone offset, for\n * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n * If not specified, the timezone of the browser will be used.\n * Note that changing the timezone will have no effect on the current date, and is only applied after\n * the next input / model change.\n *\n * - `timeSecondsFormat`: Defines if the `time` and `datetime-local` types should show seconds and\n * milliseconds. The option follows the format string of {@link date date filter}.\n * By default, the options is `undefined` which is equal to `'ss.sss'` (seconds and milliseconds).\n * The other options are `'ss'` (strips milliseconds), and `''` (empty string), which strips both\n * seconds and milliseconds.\n * Note that browsers that support `time` and `datetime-local` require the hour and minutes\n * part of the time string, and may show the value differently in the user interface.\n * {@link ngModelOptions#formatting-the-value-of-time-and-datetime-local- See the example}.\n *\n * - `timeStripZeroSeconds`: Defines if the `time` and `datetime-local` types should strip the\n * seconds and milliseconds from the formatted value if they are zero. This option is applied\n * after `timeSecondsFormat`.\n * This option can be used to make the formatting consistent over different browsers, as some\n * browsers with support for `time` will natively hide the milliseconds and\n * seconds if they are zero, but others won't, and browsers that don't implement these input\n * types will always show the full string.\n * {@link ngModelOptions#formatting-the-value-of-time-and-datetime-local- See the example}.\n *\n */\nvar ngModelOptionsDirective = function() {\n NgModelOptionsController.$inject = ['$attrs', '$scope'];\n function NgModelOptionsController($attrs, $scope) {\n this.$$attrs = $attrs;\n this.$$scope = $scope;\n }\n NgModelOptionsController.prototype = {\n $onInit: function() {\n var parentOptions = this.parentCtrl ? this.parentCtrl.$options : defaultModelOptions;\n var modelOptionsDefinition = this.$$scope.$eval(this.$$attrs.ngModelOptions);\n\n this.$options = parentOptions.createChild(modelOptionsDefinition);\n }\n };\n\n return {\n restrict: 'A',\n // ngModelOptions needs to run before ngModel and input directives\n priority: 10,\n require: {parentCtrl: '?^^ngModelOptions'},\n bindToController: true,\n controller: NgModelOptionsController\n };\n};\n\n\n// shallow copy over values from `src` that are not already specified on `dst`\nfunction defaults(dst, src) {\n forEach(src, function(value, key) {\n if (!isDefined(dst[key])) {\n dst[key] = value;\n }\n });\n}\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n * @element ANY\n *\n * @description\n * The `ngNonBindable` directive tells AngularJS not to compile or bind the contents of the current\n * DOM element, including directives on the element itself that have a lower priority than\n * `ngNonBindable`. This is useful if the element contains what appears to be AngularJS directives\n * and bindings but which should be ignored by AngularJS. This could be the case if you have a site\n * that displays snippets of code, for instance.\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n <example name=\"ng-non-bindable\">\n <file name=\"index.html\">\n <div>Normal: {{1 + 2}}</div>\n <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n </file>\n </example>\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/* exported ngOptionsDirective */\n\n/* global jqLiteRemove */\n\nvar ngOptionsMinErr = minErr('ngOptions');\n\n/**\n * @ngdoc directive\n * @name ngOptions\n * @restrict A\n *\n * @description\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n * elements for the `<select>` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension expression.\n *\n * In many cases, {@link ng.directive:ngRepeat ngRepeat} can be used on `<option>` elements instead of\n * `ngOptions` to achieve a similar result. However, `ngOptions` provides some benefits:\n * - more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n * comprehension expression\n * - reduced memory consumption by not creating a new scope for each repeated instance\n * - increased render speed by creating the options in a documentFragment instead of individually\n *\n * When an item in the `<select>` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * ## Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding the select to a model that is an object or a collection.\n *\n * One issue occurs if you want to preselect an option. For example, if you set\n * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,\n * because the objects are not identical. So by default, you should always reference the item in your collection\n * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.\n *\n * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity\n * of the item not by reference, but by the result of the `track by` expression. For example, if your\n * collection items have an id property, you would `track by item.id`.\n *\n * A different issue with objects or collections is that ngModel won't detect if an object property or\n * a collection item changes. For that reason, `ngOptions` additionally watches the model using\n * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.\n * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection\n * has not changed identity, but only a property on the object or an item in the collection changes.\n *\n * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection\n * if the model is an array). This means that changing a property deeper than the first level inside the\n * object/collection will not trigger a re-rendering.\n *\n * ## `select` **`as`**\n *\n * Using `select` **`as`** will bind the result of the `select` expression to the model, but\n * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)\n * or property name (for object data sources) of the value within the collection. If a **`track by`** expression\n * is used, the result of that expression will be set as the value of the `option` and `select` elements.\n *\n *\n * ### `select` **`as`** and **`track by`**\n *\n * <div class=\"alert alert-warning\">\n * Be careful when using `select` **`as`** and **`track by`** in the same expression.\n * </div>\n *\n * Given this array of items on the $scope:\n *\n * ```js\n * $scope.items = [{\n * id: 1,\n * label: 'aLabel',\n * subItem: { name: 'aSubItem' }\n * }, {\n * id: 2,\n * label: 'bLabel',\n * subItem: { name: 'bSubItem' }\n * }];\n * ```\n *\n * This will work:\n *\n * ```html\n * <select ng-options=\"item as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n * ```\n * ```js\n * $scope.selected = $scope.items[0];\n * ```\n *\n * but this will not work:\n *\n * ```html\n * <select ng-options=\"item.subItem as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n * ```\n * ```js\n * $scope.selected = $scope.items[0].subItem;\n * ```\n *\n * In both examples, the **`track by`** expression is applied successfully to each `item` in the\n * `items` array. Because the selected option has been set programmatically in the controller, the\n * **`track by`** expression is also applied to the `ngModel` value. In the first example, the\n * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with\n * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**\n * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value\n * is not matched against any `<option>` and the `<select>` appears as having no selected value.\n *\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {comprehension_expression} ngOptions in one of the following forms:\n *\n * * for array data sources:\n * * `label` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`\n * (for including a filter with `track by`)\n * * for object data sources:\n * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`group by`** `group`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`disable when`** `disable`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n * * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n * * `value`: local variable which will refer to each item in the `array` or each property value\n * of `object` during iteration.\n * * `key`: local variable which will refer to a property name in `object` during iteration.\n * * `label`: The result of this expression will be the label for `<option>` element. The\n * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n * * `select`: The result of this expression will be bound to the model of the parent `<select>`\n * element. If not specified, `select` expression will default to `value`.\n * * `group`: The result of this expression will be used to group options using the `<optgroup>`\n * DOM element.\n * * `disable`: The result of this expression will be used to disable the rendered `<option>`\n * element. Return `true` to disable.\n * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n * `value` variable (e.g. `value.propertyName`). With this the selection is preserved\n * even when the options are recreated (e.g. reloaded from the server).\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngAttrSize sets the size of the select element dynamically. Uses the\n * {@link guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes ngAttr} directive.\n *\n * @example\n <example module=\"selectExample\" name=\"select\">\n <file name=\"index.html\">\n <script>\n angular.module('selectExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.colors = [\n {name:'black', shade:'dark'},\n {name:'white', shade:'light', notAnOption: true},\n {name:'red', shade:'dark'},\n {name:'blue', shade:'dark', notAnOption: true},\n {name:'yellow', shade:'light', notAnOption: false}\n ];\n $scope.myColor = $scope.colors[2]; // red\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <ul>\n <li ng-repeat=\"color in colors\">\n <label>Name: <input ng-model=\"color.name\"></label>\n <label><input type=\"checkbox\" ng-model=\"color.notAnOption\"> Disabled?</label>\n <button ng-click=\"colors.splice($index, 1)\" aria-label=\"Remove\">X</button>\n </li>\n <li>\n <button ng-click=\"colors.push({})\">add</button>\n </li>\n </ul>\n <hr/>\n <label>Color (null not allowed):\n <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\"></select>\n </label><br/>\n <label>Color (null allowed):\n <span class=\"nullable\">\n <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\">\n <option value=\"\">-- choose color --</option>\n </select>\n </span></label><br/>\n\n <label>Color grouped by shade:\n <select ng-model=\"myColor\" ng-options=\"color.name group by color.shade for color in colors\">\n </select>\n </label><br/>\n\n <label>Color grouped by shade, with some disabled:\n <select ng-model=\"myColor\"\n ng-options=\"color.name group by color.shade disable when color.notAnOption for color in colors\">\n </select>\n </label><br/>\n\n\n\n Select <button ng-click=\"myColor = { name:'not in list', shade: 'other' }\">bogus</button>.\n <br/>\n <hr/>\n Currently selected: {{ {selected_color:myColor} }}\n <div style=\"border:solid 1px black; height:20px\"\n ng-style=\"{'background-color':myColor.name}\">\n </div>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ng-options', function() {\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n element.all(by.model('myColor')).first().click();\n element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n });\n </file>\n </example>\n */\n\n/* eslint-disable max-len */\n// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555000000000666666666666600000007777777777777000000000000000888888888800000000000000000009999999999\nvar NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?(?:\\s+disable\\s+when\\s+([\\s\\S]+?))?\\s+for\\s+(?:([$\\w][$\\w]*)|(?:\\(\\s*([$\\w][$\\w]*)\\s*,\\s*([$\\w][$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/;\n // 1: value expression (valueFn)\n // 2: label expression (displayFn)\n // 3: group by expression (groupByFn)\n // 4: disable when expression (disableWhenFn)\n // 5: array item variable name\n // 6: object item key variable name\n // 7: object item value variable name\n // 8: collection expression\n // 9: track by expression\n/* eslint-enable */\n\n\nvar ngOptionsDirective = ['$compile', '$document', '$parse', function($compile, $document, $parse) {\n\n function parseOptionsExpression(optionsExp, selectElement, scope) {\n\n var match = optionsExp.match(NG_OPTIONS_REGEXP);\n if (!(match)) {\n throw ngOptionsMinErr('iexp',\n 'Expected expression in form of ' +\n '\\'_select_ (as _label_)? for (_key_,)?_value_ in _collection_\\'' +\n ' but got \\'{0}\\'. Element: {1}',\n optionsExp, startingTag(selectElement));\n }\n\n // Extract the parts from the ngOptions expression\n\n // The variable name for the value of the item in the collection\n var valueName = match[5] || match[7];\n // The variable name for the key of the item in the collection\n var keyName = match[6];\n\n // An expression that generates the viewValue for an option if there is a label expression\n var selectAs = / as /.test(match[0]) && match[1];\n // An expression that is used to track the id of each object in the options collection\n var trackBy = match[9];\n // An expression that generates the viewValue for an option if there is no label expression\n var valueFn = $parse(match[2] ? match[1] : valueName);\n var selectAsFn = selectAs && $parse(selectAs);\n var viewValueFn = selectAsFn || valueFn;\n var trackByFn = trackBy && $parse(trackBy);\n\n // Get the value by which we are going to track the option\n // if we have a trackFn then use that (passing scope and locals)\n // otherwise just hash the given viewValue\n var getTrackByValueFn = trackBy ?\n function(value, locals) { return trackByFn(scope, locals); } :\n function getHashOfValue(value) { return hashKey(value); };\n var getTrackByValue = function(value, key) {\n return getTrackByValueFn(value, getLocals(value, key));\n };\n\n var displayFn = $parse(match[2] || match[1]);\n var groupByFn = $parse(match[3] || '');\n var disableWhenFn = $parse(match[4] || '');\n var valuesFn = $parse(match[8]);\n\n var locals = {};\n var getLocals = keyName ? function(value, key) {\n locals[keyName] = key;\n locals[valueName] = value;\n return locals;\n } : function(value) {\n locals[valueName] = value;\n return locals;\n };\n\n\n function Option(selectValue, viewValue, label, group, disabled) {\n this.selectValue = selectValue;\n this.viewValue = viewValue;\n this.label = label;\n this.group = group;\n this.disabled = disabled;\n }\n\n function getOptionValuesKeys(optionValues) {\n var optionValuesKeys;\n\n if (!keyName && isArrayLike(optionValues)) {\n optionValuesKeys = optionValues;\n } else {\n // if object, extract keys, in enumeration order, unsorted\n optionValuesKeys = [];\n for (var itemKey in optionValues) {\n if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {\n optionValuesKeys.push(itemKey);\n }\n }\n }\n return optionValuesKeys;\n }\n\n return {\n trackBy: trackBy,\n getTrackByValue: getTrackByValue,\n getWatchables: $parse(valuesFn, function(optionValues) {\n // Create a collection of things that we would like to watch (watchedArray)\n // so that they can all be watched using a single $watchCollection\n // that only runs the handler once if anything changes\n var watchedArray = [];\n optionValues = optionValues || [];\n\n var optionValuesKeys = getOptionValuesKeys(optionValues);\n var optionValuesLength = optionValuesKeys.length;\n for (var index = 0; index < optionValuesLength; index++) {\n var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n var value = optionValues[key];\n\n var locals = getLocals(value, key);\n var selectValue = getTrackByValueFn(value, locals);\n watchedArray.push(selectValue);\n\n // Only need to watch the displayFn if there is a specific label expression\n if (match[2] || match[1]) {\n var label = displayFn(scope, locals);\n watchedArray.push(label);\n }\n\n // Only need to watch the disableWhenFn if there is a specific disable expression\n if (match[4]) {\n var disableWhen = disableWhenFn(scope, locals);\n watchedArray.push(disableWhen);\n }\n }\n return watchedArray;\n }),\n\n getOptions: function() {\n\n var optionItems = [];\n var selectValueMap = {};\n\n // The option values were already computed in the `getWatchables` fn,\n // which must have been called to trigger `getOptions`\n var optionValues = valuesFn(scope) || [];\n var optionValuesKeys = getOptionValuesKeys(optionValues);\n var optionValuesLength = optionValuesKeys.length;\n\n for (var index = 0; index < optionValuesLength; index++) {\n var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n var value = optionValues[key];\n var locals = getLocals(value, key);\n var viewValue = viewValueFn(scope, locals);\n var selectValue = getTrackByValueFn(viewValue, locals);\n var label = displayFn(scope, locals);\n var group = groupByFn(scope, locals);\n var disabled = disableWhenFn(scope, locals);\n var optionItem = new Option(selectValue, viewValue, label, group, disabled);\n\n optionItems.push(optionItem);\n selectValueMap[selectValue] = optionItem;\n }\n\n return {\n items: optionItems,\n selectValueMap: selectValueMap,\n getOptionFromViewValue: function(value) {\n return selectValueMap[getTrackByValue(value)];\n },\n getViewValueFromOption: function(option) {\n // If the viewValue could be an object that may be mutated by the application,\n // we need to make a copy and not return the reference to the value on the option.\n return trackBy ? copy(option.viewValue) : option.viewValue;\n }\n };\n }\n };\n }\n\n\n // Support: IE 9 only\n // We can't just jqLite('<option>') since jqLite is not smart enough\n // to create it in <select> and IE barfs otherwise.\n var optionTemplate = window.document.createElement('option'),\n optGroupTemplate = window.document.createElement('optgroup');\n\n function ngOptionsPostLink(scope, selectElement, attr, ctrls) {\n\n var selectCtrl = ctrls[0];\n var ngModelCtrl = ctrls[1];\n var multiple = attr.multiple;\n\n // The emptyOption allows the application developer to provide their own custom \"empty\"\n // option when the viewValue does not match any of the option values.\n for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {\n if (children[i].value === '') {\n selectCtrl.hasEmptyOption = true;\n selectCtrl.emptyOption = children.eq(i);\n break;\n }\n }\n\n // The empty option will be compiled and rendered before we first generate the options\n selectElement.empty();\n\n var providedEmptyOption = !!selectCtrl.emptyOption;\n\n var unknownOption = jqLite(optionTemplate.cloneNode(false));\n unknownOption.val('?');\n\n var options;\n var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);\n // This stores the newly created options before they are appended to the select.\n // Since the contents are removed from the fragment when it is appended,\n // we only need to create it once.\n var listFragment = $document[0].createDocumentFragment();\n\n // Overwrite the implementation. ngOptions doesn't use hashes\n selectCtrl.generateUnknownOptionValue = function(val) {\n return '?';\n };\n\n // Update the controller methods for multiple selectable options\n if (!multiple) {\n\n selectCtrl.writeValue = function writeNgOptionsValue(value) {\n // The options might not be defined yet when ngModel tries to render\n if (!options) return;\n\n var selectedOption = selectElement[0].options[selectElement[0].selectedIndex];\n var option = options.getOptionFromViewValue(value);\n\n // Make sure to remove the selected attribute from the previously selected option\n // Otherwise, screen readers might get confused\n if (selectedOption) selectedOption.removeAttribute('selected');\n\n if (option) {\n // Don't update the option when it is already selected.\n // For example, the browser will select the first option by default. In that case,\n // most properties are set automatically - except the `selected` attribute, which we\n // set always\n\n if (selectElement[0].value !== option.selectValue) {\n selectCtrl.removeUnknownOption();\n\n selectElement[0].value = option.selectValue;\n option.element.selected = true;\n }\n\n option.element.setAttribute('selected', 'selected');\n } else {\n selectCtrl.selectUnknownOrEmptyOption(value);\n }\n };\n\n selectCtrl.readValue = function readNgOptionsValue() {\n\n var selectedOption = options.selectValueMap[selectElement.val()];\n\n if (selectedOption && !selectedOption.disabled) {\n selectCtrl.unselectEmptyOption();\n selectCtrl.removeUnknownOption();\n return options.getViewValueFromOption(selectedOption);\n }\n return null;\n };\n\n // If we are using `track by` then we must watch the tracked value on the model\n // since ngModel only watches for object identity change\n // FIXME: When a user selects an option, this watch will fire needlessly\n if (ngOptions.trackBy) {\n scope.$watch(\n function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },\n function() { ngModelCtrl.$render(); }\n );\n }\n\n } else {\n\n selectCtrl.writeValue = function writeNgOptionsMultiple(values) {\n // The options might not be defined yet when ngModel tries to render\n if (!options) return;\n\n // Only set `<option>.selected` if necessary, in order to prevent some browsers from\n // scrolling to `<option>` elements that are outside the `<select>` element's viewport.\n var selectedOptions = values && values.map(getAndUpdateSelectedOption) || [];\n\n options.items.forEach(function(option) {\n if (option.element.selected && !includes(selectedOptions, option)) {\n option.element.selected = false;\n }\n });\n };\n\n\n selectCtrl.readValue = function readNgOptionsMultiple() {\n var selectedValues = selectElement.val() || [],\n selections = [];\n\n forEach(selectedValues, function(value) {\n var option = options.selectValueMap[value];\n if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));\n });\n\n return selections;\n };\n\n // If we are using `track by` then we must watch these tracked values on the model\n // since ngModel only watches for object identity change\n if (ngOptions.trackBy) {\n\n scope.$watchCollection(function() {\n if (isArray(ngModelCtrl.$viewValue)) {\n return ngModelCtrl.$viewValue.map(function(value) {\n return ngOptions.getTrackByValue(value);\n });\n }\n }, function() {\n ngModelCtrl.$render();\n });\n\n }\n }\n\n if (providedEmptyOption) {\n\n // compile the element since there might be bindings in it\n $compile(selectCtrl.emptyOption)(scope);\n\n selectElement.prepend(selectCtrl.emptyOption);\n\n if (selectCtrl.emptyOption[0].nodeType === NODE_TYPE_COMMENT) {\n // This means the empty option has currently no actual DOM node, probably because\n // it has been modified by a transclusion directive.\n selectCtrl.hasEmptyOption = false;\n\n // Redefine the registerOption function, which will catch\n // options that are added by ngIf etc. (rendering of the node is async because of\n // lazy transclusion)\n selectCtrl.registerOption = function(optionScope, optionEl) {\n if (optionEl.val() === '') {\n selectCtrl.hasEmptyOption = true;\n selectCtrl.emptyOption = optionEl;\n selectCtrl.emptyOption.removeClass('ng-scope');\n // This ensures the new empty option is selected if previously no option was selected\n ngModelCtrl.$render();\n\n optionEl.on('$destroy', function() {\n var needsRerender = selectCtrl.$isEmptyOptionSelected();\n\n selectCtrl.hasEmptyOption = false;\n selectCtrl.emptyOption = undefined;\n\n if (needsRerender) ngModelCtrl.$render();\n });\n }\n };\n\n } else {\n // remove the class, which is added automatically because we recompile the element and it\n // becomes the compilation root\n selectCtrl.emptyOption.removeClass('ng-scope');\n }\n\n }\n\n // We will re-render the option elements if the option values or labels change\n scope.$watchCollection(ngOptions.getWatchables, updateOptions);\n\n // ------------------------------------------------------------------ //\n\n function addOptionElement(option, parent) {\n var optionElement = optionTemplate.cloneNode(false);\n parent.appendChild(optionElement);\n updateOptionElement(option, optionElement);\n }\n\n function getAndUpdateSelectedOption(viewValue) {\n var option = options.getOptionFromViewValue(viewValue);\n var element = option && option.element;\n\n if (element && !element.selected) element.selected = true;\n\n return option;\n }\n\n function updateOptionElement(option, element) {\n option.element = element;\n element.disabled = option.disabled;\n // Support: IE 11 only, Edge 12-13 only\n // NOTE: The label must be set before the value, otherwise IE 11 & Edge create unresponsive\n // selects in certain circumstances when multiple selects are next to each other and display\n // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].\n // See https://github.com/angular/angular.js/issues/11314 for more info.\n // This is unfortunately untestable with unit / e2e tests\n if (option.label !== element.label) {\n element.label = option.label;\n element.textContent = option.label;\n }\n element.value = option.selectValue;\n }\n\n function updateOptions() {\n var previousValue = options && selectCtrl.readValue();\n\n // We must remove all current options, but cannot simply set innerHTML = null\n // since the providedEmptyOption might have an ngIf on it that inserts comments which we\n // must preserve.\n // Instead, iterate over the current option elements and remove them or their optgroup\n // parents\n if (options) {\n\n for (var i = options.items.length - 1; i >= 0; i--) {\n var option = options.items[i];\n if (isDefined(option.group)) {\n jqLiteRemove(option.element.parentNode);\n } else {\n jqLiteRemove(option.element);\n }\n }\n }\n\n options = ngOptions.getOptions();\n\n var groupElementMap = {};\n\n options.items.forEach(function addOption(option) {\n var groupElement;\n\n if (isDefined(option.group)) {\n\n // This option is to live in a group\n // See if we have already created this group\n groupElement = groupElementMap[option.group];\n\n if (!groupElement) {\n\n groupElement = optGroupTemplate.cloneNode(false);\n listFragment.appendChild(groupElement);\n\n // Update the label on the group element\n // \"null\" is special cased because of Safari\n groupElement.label = option.group === null ? 'null' : option.group;\n\n // Store it for use later\n groupElementMap[option.group] = groupElement;\n }\n\n addOptionElement(option, groupElement);\n\n } else {\n\n // This option is not in a group\n addOptionElement(option, listFragment);\n }\n });\n\n selectElement[0].appendChild(listFragment);\n\n ngModelCtrl.$render();\n\n // Check to see if the value has changed due to the update to the options\n if (!ngModelCtrl.$isEmpty(previousValue)) {\n var nextValue = selectCtrl.readValue();\n var isNotPrimitive = ngOptions.trackBy || multiple;\n if (isNotPrimitive ? !equals(previousValue, nextValue) : previousValue !== nextValue) {\n ngModelCtrl.$setViewValue(nextValue);\n ngModelCtrl.$render();\n }\n }\n }\n }\n\n return {\n restrict: 'A',\n terminal: true,\n require: ['select', 'ngModel'],\n link: {\n pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {\n // Deactivate the SelectController.register method to prevent\n // option directives from accidentally registering themselves\n // (and unwanted $destroy handlers etc.)\n ctrls[0].registerOption = noop;\n },\n post: ngOptionsPostLink\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n AngularJS i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * ## Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in AngularJS's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * ## Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * AngularJS expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * <ng-pluralize count=\"personCount\"\n when=\"{'0': 'Nobody is viewing.',\n * 'one': '1 person is viewing.',\n * 'other': '{} people are viewing.'}\">\n * </ng-pluralize>\n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, AngularJS will replace `{}` with\n * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n * for <span ng-non-bindable>{{numberExpression}}</span>.\n *\n * If no rule is defined for a category, then an empty string is displayed and a warning is generated.\n * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.\n *\n * ## Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * <ng-pluralize count=\"personCount\" offset=2\n * when=\"{'0': 'Nobody is viewing.',\n * '1': '{{person1}} is viewing.',\n * '2': '{{person1}} and {{person2}} are viewing.',\n * 'one': '{{person1}}, {{person2}} and one other person are viewing.',\n * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n * </ng-pluralize>\n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and AngularJS uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n <example module=\"pluralizeExample\" name=\"ng-pluralize\">\n <file name=\"index.html\">\n <script>\n angular.module('pluralizeExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.person1 = 'Igor';\n $scope.person2 = 'Misko';\n $scope.personCount = 1;\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n <label>Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /></label><br/>\n <label>Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /></label><br/>\n <label>Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /></label><br/>\n\n <!--- Example with simple pluralization rules for en locale --->\n Without Offset:\n <ng-pluralize count=\"personCount\"\n when=\"{'0': 'Nobody is viewing.',\n 'one': '1 person is viewing.',\n 'other': '{} people are viewing.'}\">\n </ng-pluralize><br>\n\n <!--- Example with offset --->\n With Offset(2):\n <ng-pluralize count=\"personCount\" offset=2\n when=\"{'0': 'Nobody is viewing.',\n '1': '{{person1}} is viewing.',\n '2': '{{person1}} and {{person2}} are viewing.',\n 'one': '{{person1}}, {{person2}} and one other person are viewing.',\n 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n </ng-pluralize>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should show correct pluralized string', function() {\n var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var countInput = element(by.model('personCount'));\n\n expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n countInput.clear();\n countInput.sendKeys('0');\n\n expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n countInput.clear();\n countInput.sendKeys('2');\n\n expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n countInput.clear();\n countInput.sendKeys('3');\n\n expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n countInput.clear();\n countInput.sendKeys('4');\n\n expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n });\n it('should show data-bound names', function() {\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var personCount = element(by.model('personCount'));\n var person1 = element(by.model('person1'));\n var person2 = element(by.model('person2'));\n personCount.clear();\n personCount.sendKeys('4');\n person1.clear();\n person1.sendKeys('Di');\n person2.clear();\n person2.sendKeys('Vojta');\n expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n });\n </file>\n </example>\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {\n var BRACE = /{}/g,\n IS_WHEN = /^when(Minus)?(.+)$/;\n\n return {\n link: function(scope, element, attr) {\n var numberExp = attr.count,\n whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n offset = attr.offset || 0,\n whens = scope.$eval(whenExp) || {},\n whensExpFns = {},\n startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,\n watchRemover = angular.noop,\n lastCount;\n\n forEach(attr, function(expression, attributeName) {\n var tmpMatch = IS_WHEN.exec(attributeName);\n if (tmpMatch) {\n var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);\n whens[whenKey] = element.attr(attr.$attr[attributeName]);\n }\n });\n forEach(whens, function(expression, key) {\n whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));\n\n });\n\n scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {\n var count = parseFloat(newVal);\n var countIsNaN = isNumberNaN(count);\n\n if (!countIsNaN && !(count in whens)) {\n // If an explicit number rule such as 1, 2, 3... is defined, just use it.\n // Otherwise, check it against pluralization rules in $locale service.\n count = $locale.pluralCat(count - offset);\n }\n\n // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.\n // In JS `NaN !== NaN`, so we have to explicitly check.\n if ((count !== lastCount) && !(countIsNaN && isNumberNaN(lastCount))) {\n watchRemover();\n var whenExpFn = whensExpFns[count];\n if (isUndefined(whenExpFn)) {\n if (newVal != null) {\n $log.debug('ngPluralize: no rule defined for \\'' + count + '\\' in ' + whenExp);\n }\n watchRemover = noop;\n updateElementText();\n } else {\n watchRemover = scope.$watch(whenExpFn, updateElementText);\n }\n lastCount = count;\n }\n });\n\n function updateElementText(newText) {\n element.text(newText || '');\n }\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRef\n * @restrict A\n *\n * @description\n * The `ngRef` attribute tells AngularJS to assign the controller of a component (or a directive)\n * to the given property in the current scope. It is also possible to add the jqlite-wrapped DOM\n * element to the scope.\n *\n * If the element with `ngRef` is destroyed `null` is assigned to the property.\n *\n * Note that if you want to assign from a child into the parent scope, you must initialize the\n * target property on the parent scope, otherwise `ngRef` will assign on the child scope.\n * This commonly happens when assigning elements or components wrapped in {@link ngIf} or\n * {@link ngRepeat}. See the second example below.\n *\n *\n * @element ANY\n * @param {string} ngRef property name - A valid AngularJS expression identifier to which the\n * controller or jqlite-wrapped DOM element will be bound.\n * @param {string=} ngRefRead read value - The name of a directive (or component) on this element,\n * or the special string `$element`. If a name is provided, `ngRef` will\n * assign the matching controller. If `$element` is provided, the element\n * itself is assigned (even if a controller is available).\n *\n *\n * @example\n * ### Simple toggle\n * This example shows how the controller of the component toggle\n * is reused in the template through the scope to use its logic.\n * <example name=\"ng-ref-component\" module=\"myApp\">\n * <file name=\"index.html\">\n * <my-toggle ng-ref=\"myToggle\"></my-toggle>\n * <button ng-click=\"myToggle.toggle()\">Toggle</button>\n * <div ng-show=\"myToggle.isOpen()\">\n * You are using a component in the same template to show it.\n * </div>\n * </file>\n * <file name=\"index.js\">\n * angular.module('myApp', [])\n * .component('myToggle', {\n * controller: function ToggleController() {\n * var opened = false;\n * this.isOpen = function() { return opened; };\n * this.toggle = function() { opened = !opened; };\n * }\n * });\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should publish the toggle into the scope', function() {\n * var toggle = element(by.buttonText('Toggle'));\n * expect(toggle.evaluate('myToggle.isOpen()')).toEqual(false);\n * toggle.click();\n * expect(toggle.evaluate('myToggle.isOpen()')).toEqual(true);\n * });\n * </file>\n * </example>\n *\n * @example\n * ### ngRef inside scopes\n * This example shows how `ngRef` works with child scopes. The `ngRepeat`-ed `myWrapper` components\n * are assigned to the scope of `myRoot`, because the `toggles` property has been initialized.\n * The repeated `myToggle` components are published to the child scopes created by `ngRepeat`.\n * `ngIf` behaves similarly - the assignment of `myToggle` happens in the `ngIf` child scope,\n * because the target property has not been initialized on the `myRoot` component controller.\n *\n * <example name=\"ng-ref-scopes\" module=\"myApp\">\n * <file name=\"index.html\">\n * <my-root></my-root>\n * </file>\n * <file name=\"index.js\">\n * angular.module('myApp', [])\n * .component('myRoot', {\n * templateUrl: 'root.html',\n * controller: function() {\n * this.wrappers = []; // initialize the array so that the wrappers are assigned into the parent scope\n * }\n * })\n * .component('myToggle', {\n * template: '<strong>myToggle</strong><button ng-click=\"$ctrl.toggle()\" ng-transclude></button>',\n * transclude: true,\n * controller: function ToggleController() {\n * var opened = false;\n * this.isOpen = function() { return opened; };\n * this.toggle = function() { opened = !opened; };\n * }\n * })\n * .component('myWrapper', {\n * transclude: true,\n * template: '<strong>myWrapper</strong>' +\n * '<div>ngRepeatToggle.isOpen(): {{$ctrl.ngRepeatToggle.isOpen() | json}}</div>' +\n * '<my-toggle ng-ref=\"$ctrl.ngRepeatToggle\"><ng-transclude></ng-transclude></my-toggle>'\n * });\n * </file>\n * <file name=\"root.html\">\n * <strong>myRoot</strong>\n * <my-toggle ng-ref=\"$ctrl.outerToggle\">Outer Toggle</my-toggle>\n * <div>outerToggle.isOpen(): {{$ctrl.outerToggle.isOpen() | json}}</div>\n * <div><em>wrappers assigned to root</em><br>\n * <div ng-repeat=\"wrapper in $ctrl.wrappers\">\n * wrapper.ngRepeatToggle.isOpen(): {{wrapper.ngRepeatToggle.isOpen() | json}}\n * </div>\n *\n * <ul>\n * <li ng-repeat=\"(index, value) in [1,2,3]\">\n * <strong>ngRepeat</strong>\n * <div>outerToggle.isOpen(): {{$ctrl.outerToggle.isOpen() | json}}</div>\n * <my-wrapper ng-ref=\"$ctrl.wrappers[index]\">ngRepeat Toggle {{$index + 1}}</my-wrapper>\n * </li>\n * </ul>\n *\n * <div>ngIfToggle.isOpen(): {{ngIfToggle.isOpen()}} // This is always undefined because it's\n * assigned to the child scope created by ngIf.\n * </div>\n * <div ng-if=\"true\">\n <strong>ngIf</strong>\n * <my-toggle ng-ref=\"ngIfToggle\">ngIf Toggle</my-toggle>\n * <div>ngIfToggle.isOpen(): {{ngIfToggle.isOpen() | json}}</div>\n * <div>outerToggle.isOpen(): {{$ctrl.outerToggle.isOpen() | json}}</div>\n * </div>\n * </file>\n * <file name=\"styles.css\">\n * ul {\n * list-style: none;\n * padding-left: 0;\n * }\n *\n * li[ng-repeat] {\n * background: lightgreen;\n * padding: 8px;\n * margin: 8px;\n * }\n *\n * [ng-if] {\n * background: lightgrey;\n * padding: 8px;\n * }\n *\n * my-root {\n * background: lightgoldenrodyellow;\n * padding: 8px;\n * display: block;\n * }\n *\n * my-wrapper {\n * background: lightsalmon;\n * padding: 8px;\n * display: block;\n * }\n *\n * my-toggle {\n * background: lightblue;\n * padding: 8px;\n * display: block;\n * }\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * var OuterToggle = function() {\n * this.toggle = function() {\n * element(by.buttonText('Outer Toggle')).click();\n * };\n * this.isOpen = function() {\n * return element.all(by.binding('outerToggle.isOpen()')).first().getText();\n * };\n * };\n * var NgRepeatToggle = function(i) {\n * var parent = element.all(by.repeater('(index, value) in [1,2,3]')).get(i - 1);\n * this.toggle = function() {\n * element(by.buttonText('ngRepeat Toggle ' + i)).click();\n * };\n * this.isOpen = function() {\n * return parent.element(by.binding('ngRepeatToggle.isOpen() | json')).getText();\n * };\n * this.isOuterOpen = function() {\n * return parent.element(by.binding('outerToggle.isOpen() | json')).getText();\n * };\n * };\n * var NgRepeatToggles = function() {\n * var toggles = [1,2,3].map(function(i) { return new NgRepeatToggle(i); });\n * this.forEach = function(fn) {\n * toggles.forEach(fn);\n * };\n * this.isOuterOpen = function(i) {\n * return toggles[i - 1].isOuterOpen();\n * };\n * };\n * var NgIfToggle = function() {\n * var parent = element(by.css('[ng-if]'));\n * this.toggle = function() {\n * element(by.buttonText('ngIf Toggle')).click();\n * };\n * this.isOpen = function() {\n * return by.binding('ngIfToggle.isOpen() | json').getText();\n * };\n * this.isOuterOpen = function() {\n * return parent.element(by.binding('outerToggle.isOpen() | json')).getText();\n * };\n * };\n *\n * it('should toggle the outer toggle', function() {\n * var outerToggle = new OuterToggle();\n * expect(outerToggle.isOpen()).toEqual('outerToggle.isOpen(): false');\n * outerToggle.toggle();\n * expect(outerToggle.isOpen()).toEqual('outerToggle.isOpen(): true');\n * });\n *\n * it('should toggle all outer toggles', function() {\n * var outerToggle = new OuterToggle();\n * var repeatToggles = new NgRepeatToggles();\n * var ifToggle = new NgIfToggle();\n * expect(outerToggle.isOpen()).toEqual('outerToggle.isOpen(): false');\n * expect(repeatToggles.isOuterOpen(1)).toEqual('outerToggle.isOpen(): false');\n * expect(repeatToggles.isOuterOpen(2)).toEqual('outerToggle.isOpen(): false');\n * expect(repeatToggles.isOuterOpen(3)).toEqual('outerToggle.isOpen(): false');\n * expect(ifToggle.isOuterOpen()).toEqual('outerToggle.isOpen(): false');\n * outerToggle.toggle();\n * expect(outerToggle.isOpen()).toEqual('outerToggle.isOpen(): true');\n * expect(repeatToggles.isOuterOpen(1)).toEqual('outerToggle.isOpen(): true');\n * expect(repeatToggles.isOuterOpen(2)).toEqual('outerToggle.isOpen(): true');\n * expect(repeatToggles.isOuterOpen(3)).toEqual('outerToggle.isOpen(): true');\n * expect(ifToggle.isOuterOpen()).toEqual('outerToggle.isOpen(): true');\n * });\n *\n * it('should toggle each repeat iteration separately', function() {\n * var repeatToggles = new NgRepeatToggles();\n *\n * repeatToggles.forEach(function(repeatToggle) {\n * expect(repeatToggle.isOpen()).toEqual('ngRepeatToggle.isOpen(): false');\n * expect(repeatToggle.isOuterOpen()).toEqual('outerToggle.isOpen(): false');\n * repeatToggle.toggle();\n * expect(repeatToggle.isOpen()).toEqual('ngRepeatToggle.isOpen(): true');\n * expect(repeatToggle.isOuterOpen()).toEqual('outerToggle.isOpen(): false');\n * });\n * });\n * </file>\n * </example>\n *\n */\n\nvar ngRefMinErr = minErr('ngRef');\n\nvar ngRefDirective = ['$parse', function($parse) {\n return {\n priority: -1, // Needed for compatibility with element transclusion on the same element\n restrict: 'A',\n compile: function(tElement, tAttrs) {\n // Get the expected controller name, converts <data-some-thing> into \"someThing\"\n var controllerName = directiveNormalize(nodeName_(tElement));\n\n // Get the expression for value binding\n var getter = $parse(tAttrs.ngRef);\n var setter = getter.assign || function() {\n throw ngRefMinErr('nonassign', 'Expression in ngRef=\"{0}\" is non-assignable!', tAttrs.ngRef);\n };\n\n return function(scope, element, attrs) {\n var refValue;\n\n if (attrs.hasOwnProperty('ngRefRead')) {\n if (attrs.ngRefRead === '$element') {\n refValue = element;\n } else {\n refValue = element.data('$' + attrs.ngRefRead + 'Controller');\n\n if (!refValue) {\n throw ngRefMinErr(\n 'noctrl',\n 'The controller for ngRefRead=\"{0}\" could not be found on ngRef=\"{1}\"',\n attrs.ngRefRead,\n tAttrs.ngRef\n );\n }\n }\n } else {\n refValue = element.data('$' + controllerName + 'Controller');\n }\n\n refValue = refValue || element;\n\n setter(scope, refValue);\n\n // when the element is removed, remove it (nullify it)\n element.on('$destroy', function() {\n // only remove it if value has not changed,\n // because animations (and other procedures) may duplicate elements\n if (getter(scope) === refValue) {\n setter(scope, null);\n }\n });\n };\n }\n };\n}];\n\n/* exported ngRepeatDirective */\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n * @multiElement\n * @restrict A\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable | Type | Details |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n *\n * <div class=\"alert alert-info\">\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n * </div>\n *\n *\n * ## Iterating over object properties\n *\n * It is possible to get `ngRepeat` to iterate over the properties of an object using the following\n * syntax:\n *\n * ```js\n * <div ng-repeat=\"(key, value) in myObj\"> ... </div>\n * ```\n *\n * However, there are a few limitations compared to array iteration:\n *\n * - The JavaScript specification does not define the order of keys\n * returned for an object, so AngularJS relies on the order returned by the browser\n * when running `for key in myObj`. Browsers generally follow the strategy of providing\n * keys in the order in which they were defined, although there are exceptions when keys are deleted\n * and reinstated. See the\n * [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).\n *\n * - `ngRepeat` will silently *ignore* object keys starting with `$`, because\n * it's a prefix used by AngularJS for public (`$`) and private (`$$`) properties.\n *\n * - The built-in filters {@link ng.orderBy orderBy} and {@link ng.filter filter} do not work with\n * objects, and will throw an error if used with one.\n *\n * If you are hitting any of these limitations, the recommended workaround is to convert your object into an array\n * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could\n * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)\n * or implement a `$watch` on the object yourself.\n *\n *\n * ## Tracking and Duplicates\n *\n * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in\n * the collection. When a change happens, `ngRepeat` then 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 * To minimize creation of DOM elements, `ngRepeat` uses a function\n * to \"keep track\" of all items in the collection and their corresponding DOM elements.\n * For example, if an item is added to the collection, `ngRepeat` will know that all other items\n * already have DOM elements, and will not re-render them.\n *\n * All different types of tracking functions, their syntax, and their support for duplicate\n * items in collections can be found in the\n * {@link ngRepeat#ngRepeat-arguments ngRepeat expression description}.\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** If you are working with objects that have a unique identifier property, you\n * should track by this identifier instead of the object instance,\n * e.g. `item in items track by item.id`.\n * Should you reload your data later, `ngRepeat` will not have to rebuild the DOM elements for items\n * it has already rendered, even if the JavaScript objects in the collection have been substituted\n * for new ones. For large collections, this significantly improves rendering performance.\n * </div>\n *\n * ### Effects of DOM Element re-use\n *\n * When DOM elements are re-used, ngRepeat updates the scope for the element, which will\n * automatically update any active bindings on the template. However, other\n * functionality will not be updated, because the element is not re-created:\n *\n * - Directives are not re-compiled\n * - {@link guide/expression#one-time-binding one-time expressions} on the repeated template are not\n * updated if they have stabilized.\n *\n * The above affects all kinds of element re-use due to tracking, but may be especially visible\n * when tracking by `$index` due to the way ngRepeat re-uses elements.\n *\n * The following example shows the effects of different actions with tracking:\n\n <example module=\"ngRepeat\" name=\"ngRepeat-tracking\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"script.js\">\n angular.module('ngRepeat', ['ngAnimate']).controller('repeatController', function($scope) {\n var friends = [\n {name:'John', age:25},\n {name:'Mary', age:40},\n {name:'Peter', age:85}\n ];\n\n $scope.removeFirst = function() {\n $scope.friends.shift();\n };\n\n $scope.updateAge = function() {\n $scope.friends.forEach(function(el) {\n el.age = el.age + 5;\n });\n };\n\n $scope.copy = function() {\n $scope.friends = angular.copy($scope.friends);\n };\n\n $scope.reset = function() {\n $scope.friends = angular.copy(friends);\n };\n\n $scope.reset();\n });\n </file>\n <file name=\"index.html\">\n <div ng-controller=\"repeatController\">\n <ol>\n <li>When you click \"Update Age\", only the first list updates the age, because all others have\n a one-time binding on the age property. If you then click \"Copy\", the current friend list\n is copied, and now the second list updates the age, because the identity of the collection items\n has changed and the list must be re-rendered. The 3rd and 4th list stay the same, because all the\n items are already known according to their tracking functions.\n </li>\n <li>When you click \"Remove First\", the 4th list has the wrong age on both remaining items. This is\n due to tracking by $index: when the first collection item is removed, ngRepeat reuses the first\n DOM element for the new first collection item, and so on. Since the age property is one-time\n bound, the value remains from the collection item which was previously at this index.\n </li>\n </ol>\n\n <button ng-click=\"removeFirst()\">Remove First</button>\n <button ng-click=\"updateAge()\">Update Age</button>\n <button ng-click=\"copy()\">Copy</button>\n <br><button ng-click=\"reset()\">Reset List</button>\n <br>\n <code>track by $id(friend)</code> (default):\n <ul class=\"example-animate-container\">\n <li class=\"animate-repeat\" ng-repeat=\"friend in friends\">\n {{friend.name}} is {{friend.age}} years old.\n </li>\n </ul>\n <code>track by $id(friend)</code> (default), with age one-time binding:\n <ul class=\"example-animate-container\">\n <li class=\"animate-repeat\" ng-repeat=\"friend in friends\">\n {{friend.name}} is {{::friend.age}} years old.\n </li>\n </ul>\n <code>track by friend.name</code>, with age one-time binding:\n <ul class=\"example-animate-container\">\n <li class=\"animate-repeat\" ng-repeat=\"friend in friends track by friend.name\">\n {{friend.name}} is {{::friend.age}} years old.\n </li>\n </ul>\n <code>track by $index</code>, with age one-time binding:\n <ul class=\"example-animate-container\">\n <li class=\"animate-repeat\" ng-repeat=\"friend in friends track by $index\">\n {{friend.name}} is {{::friend.age}} years old.\n </li>\n </ul>\n </div>\n </file>\n <file name=\"animations.css\">\n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:30px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:30px;\n }\n </file>\n </example>\n\n *\n * ## Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n * <header ng-repeat-start=\"item in items\">\n * Header {{ item }}\n * </header>\n * <div class=\"body\">\n * Body {{ item }}\n * </div>\n * <footer ng-repeat-end>\n * Footer {{ item }}\n * </footer>\n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n * <header>\n * Header A\n * </header>\n * <div class=\"body\">\n * Body A\n * </div>\n * <footer>\n * Footer A\n * </footer>\n * <header>\n * Header B\n * </header>\n * <div class=\"body\">\n * Body B\n * </div>\n * <footer>\n * Footer B\n * </footer>\n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter} | when a new item is added to the list or when an item is revealed after a filter |\n * | {@link ng.$animate#leave leave} | when an item is removed from the list or when an item is filtered out |\n * | {@link ng.$animate#move move } | when an adjacent item is filtered out causing a reorder or when the item contents are reordered |\n *\n * See the example below for defining CSS animations with ngRepeat.\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n * formats are currently supported:\n *\n * * `variable in expression` – where variable is the user defined loop variable and `expression`\n * is a scope expression giving the collection to enumerate.\n *\n * For example: `album in artist.albums`.\n *\n * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n * and `expression` is the scope expression giving the collection to enumerate.\n *\n * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n * * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression\n * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression\n * is specified, ng-repeat associates elements by identity. It is an error to have\n * more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are\n * mapped to the same DOM element, which is not possible.)\n *\n * *Default tracking: $id()*: `item in items` is equivalent to `item in items track by $id(item)`.\n * This implies that the DOM elements will be associated by item identity in the collection.\n *\n * The built-in `$id()` function can be used to assign a unique\n * `$$hashKey` property to each item in the collection. This property is then used as a key to associated DOM elements\n * with the corresponding item in the collection by identity. Moving the same object would move\n * the DOM element in the same way in the DOM.\n * Note that the default id function does not support duplicate primitive values (`number`, `string`),\n * but supports duplictae non-primitive values (`object`) that are *equal* in shape.\n *\n * *Custom Expression*: It is possible to use any AngularJS expression to compute the tracking\n * id, for example with a function, or using a property on the collection items.\n * `item in items track by item.id` is a typical pattern when the items have a unique identifier,\n * e.g. database id. In this case the object identity does not matter. Two objects are considered\n * equivalent as long as their `id` property is same.\n * Tracking by unique identifier is the most performant way and should be used whenever possible.\n *\n * *$index*: This special property tracks the collection items by their index, and\n * re-uses the DOM elements that match that index, e.g. `item in items track by $index`. This can\n * be used for a performance improvement if no unique identfier is available and the identity of\n * the collection items cannot be easily computed. It also allows duplicates.\n *\n * <div class=\"alert alert-warning\">\n * <strong>Note:</strong> Re-using DOM elements can have unforeseen effects. Read the\n * {@link ngRepeat#tracking-and-duplicates section on tracking and duplicates} for\n * more info.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * <strong>Note:</strong> the `track by` expression must come last - after any filters, and the alias expression:\n * `item in items | filter:searchText as results track by item.id`\n * </div>\n *\n * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the\n * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n * when a filter is active on the repeater, but the filtered result set is empty.\n *\n * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n * the items have been processed through the filter.\n *\n * Please note that `as [variable name]` is not an operator but rather a part of ngRepeat\n * micro-syntax so it can be used only after all filters (and not as operator, inside an expression).\n *\n * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results track by item.id` .\n *\n * @example\n * This example uses `ngRepeat` to display a list of people. A filter is used to restrict the displayed\n * results by name or by age. New (entering) and removed (leaving) items are animated.\n <example module=\"ngRepeat\" name=\"ngRepeat\" deps=\"angular-animate.js\" animations=\"true\">\n <file name=\"index.html\">\n <div ng-controller=\"repeatController\">\n I have {{friends.length}} friends. They are:\n <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" aria-label=\"filter friends\" />\n <ul class=\"example-animate-container\">\n <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q as results track by friend.name\">\n [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n </li>\n <li class=\"animate-repeat\" ng-if=\"results.length === 0\">\n <strong>No results found...</strong>\n </li>\n </ul>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('ngRepeat', ['ngAnimate']).controller('repeatController', function($scope) {\n $scope.friends = [\n {name:'John', age:25, gender:'boy'},\n {name:'Jessie', age:30, gender:'girl'},\n {name:'Johanna', age:28, gender:'girl'},\n {name:'Joy', age:15, gender:'girl'},\n {name:'Mary', age:28, gender:'girl'},\n {name:'Peter', age:95, gender:'boy'},\n {name:'Sebastian', age:50, gender:'boy'},\n {name:'Erika', age:27, gender:'girl'},\n {name:'Patrick', age:40, gender:'boy'},\n {name:'Samantha', age:60, gender:'girl'}\n ];\n });\n </file>\n <file name=\"animations.css\">\n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:30px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:30px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var friends = element.all(by.repeater('friend in friends'));\n\n it('should render initial data set', function() {\n expect(friends.count()).toBe(10);\n expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n expect(element(by.binding('friends.length')).getText())\n .toMatch(\"I have 10 friends. They are:\");\n });\n\n it('should update repeater when filter predicate changes', function() {\n expect(friends.count()).toBe(10);\n\n element(by.model('q')).sendKeys('ma');\n\n expect(friends.count()).toBe(2);\n expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n });\n </file>\n </example>\n */\nvar ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $animate, $compile) {\n var NG_REMOVED = '$$NG_REMOVED';\n var ngRepeatMinErr = minErr('ngRepeat');\n\n var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n scope[valueIdentifier] = value;\n if (keyIdentifier) scope[keyIdentifier] = key;\n scope.$index = index;\n scope.$first = (index === 0);\n scope.$last = (index === (arrayLength - 1));\n scope.$middle = !(scope.$first || scope.$last);\n // eslint-disable-next-line no-bitwise\n scope.$odd = !(scope.$even = (index & 1) === 0);\n };\n\n var getBlockStart = function(block) {\n return block.clone[0];\n };\n\n var getBlockEnd = function(block) {\n return block.clone[block.clone.length - 1];\n };\n\n var trackByIdArrayFn = function($scope, key, value) {\n return hashKey(value);\n };\n\n var trackByIdObjFn = function($scope, key) {\n return key;\n };\n\n return {\n restrict: 'A',\n multiElement: true,\n transclude: 'element',\n priority: 1000,\n terminal: true,\n $$tlb: true,\n compile: function ngRepeatCompile($element, $attr) {\n var expression = $attr.ngRepeat;\n var ngRepeatEndComment = $compile.$$createComment('end ngRepeat', expression);\n\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n if (!match) {\n throw ngRepeatMinErr('iexp', 'Expected expression in form of \\'_item_ in _collection_[ track by _id_]\\' but got \\'{0}\\'.',\n expression);\n }\n\n var lhs = match[1];\n var rhs = match[2];\n var aliasAs = match[3];\n var trackByExp = match[4];\n\n match = lhs.match(/^(?:(\\s*[$\\w]+)|\\(\\s*([$\\w]+)\\s*,\\s*([$\\w]+)\\s*\\))$/);\n\n if (!match) {\n throw ngRepeatMinErr('iidexp', '\\'_item_\\' in \\'_item_ in _collection_\\' should be an identifier or \\'(_key_, _value_)\\' expression, but got \\'{0}\\'.',\n lhs);\n }\n var valueIdentifier = match[3] || match[1];\n var keyIdentifier = match[2];\n\n if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent|\\$root|\\$id)$/.test(aliasAs))) {\n throw ngRepeatMinErr('badident', 'alias \\'{0}\\' is invalid --- must be a valid JS identifier which is not a reserved name.',\n aliasAs);\n }\n\n var trackByIdExpFn;\n\n if (trackByExp) {\n var hashFnLocals = {$id: hashKey};\n var trackByExpGetter = $parse(trackByExp);\n\n trackByIdExpFn = function($scope, key, value, index) {\n // assign key, value, and $index to the locals so that they can be used in hash functions\n if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n hashFnLocals[valueIdentifier] = value;\n hashFnLocals.$index = index;\n return trackByExpGetter($scope, hashFnLocals);\n };\n }\n\n return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n // Store a list of elements from previous run. This is a hash where key is the item from the\n // iterator, and the value is objects with following properties.\n // - scope: bound scope\n // - clone: previous element.\n // - index: position\n //\n // We are using no-proto object so that we don't need to guard against inherited props via\n // hasOwnProperty.\n var lastBlockMap = createMap();\n\n //watch props\n $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n var index, length,\n previousNode = $element[0], // node that cloned nodes should be inserted after\n // initialized to the comment node anchor\n nextNode,\n // Same as lastBlockMap but it has the current state. It will become the\n // lastBlockMap on the next iteration.\n nextBlockMap = createMap(),\n collectionLength,\n key, value, // key/value of iteration\n trackById,\n trackByIdFn,\n collectionKeys,\n block, // last object information {scope, element, id}\n nextBlockOrder,\n elementsToRemove;\n\n if (aliasAs) {\n $scope[aliasAs] = collection;\n }\n\n if (isArrayLike(collection)) {\n collectionKeys = collection;\n trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n } else {\n trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n // if object, extract keys, in enumeration order, unsorted\n collectionKeys = [];\n for (var itemKey in collection) {\n if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {\n collectionKeys.push(itemKey);\n }\n }\n }\n\n collectionLength = collectionKeys.length;\n nextBlockOrder = new Array(collectionLength);\n\n // locate existing items\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n trackById = trackByIdFn($scope, key, value, index);\n if (lastBlockMap[trackById]) {\n // found previously seen block\n block = lastBlockMap[trackById];\n delete lastBlockMap[trackById];\n nextBlockMap[trackById] = block;\n nextBlockOrder[index] = block;\n } else if (nextBlockMap[trackById]) {\n // if collision detected. restore lastBlockMap and throw an error\n forEach(nextBlockOrder, function(block) {\n if (block && block.scope) lastBlockMap[block.id] = block;\n });\n throw ngRepeatMinErr('dupes',\n 'Duplicates in a repeater are not allowed. Use \\'track by\\' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}',\n expression, trackById, value);\n } else {\n // new never before seen block\n nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n nextBlockMap[trackById] = true;\n }\n }\n\n // Clear the value property from the hashFnLocals object to prevent a reference to the last value\n // being leaked into the ngRepeatCompile function scope\n if (hashFnLocals) {\n hashFnLocals[valueIdentifier] = undefined;\n }\n\n // remove leftover items\n for (var blockKey in lastBlockMap) {\n block = lastBlockMap[blockKey];\n elementsToRemove = getBlockNodes(block.clone);\n $animate.leave(elementsToRemove);\n if (elementsToRemove[0].parentNode) {\n // if the element was not removed yet because of pending animation, mark it as deleted\n // so that we can ignore it later\n for (index = 0, length = elementsToRemove.length; index < length; index++) {\n elementsToRemove[index][NG_REMOVED] = true;\n }\n }\n block.scope.$destroy();\n }\n\n // we are not using forEach for perf reasons (trying to avoid #call)\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n block = nextBlockOrder[index];\n\n if (block.scope) {\n // if we have already seen this object, then we need to reuse the\n // associated scope/element\n\n nextNode = previousNode;\n\n // skip nodes that are already pending removal via leave animation\n do {\n nextNode = nextNode.nextSibling;\n } while (nextNode && nextNode[NG_REMOVED]);\n\n if (getBlockStart(block) !== nextNode) {\n // existing item which got moved\n $animate.move(getBlockNodes(block.clone), null, previousNode);\n }\n previousNode = getBlockEnd(block);\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n } else {\n // new item which we don't know about\n $transclude(function ngRepeatTransclude(clone, scope) {\n block.scope = scope;\n // http://jsperf.com/clone-vs-createcomment\n var endNode = ngRepeatEndComment.cloneNode(false);\n clone[clone.length++] = endNode;\n\n $animate.enter(clone, null, previousNode);\n previousNode = endNode;\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block.clone = clone;\n nextBlockMap[block.id] = block;\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n });\n }\n }\n lastBlockMap = nextBlockMap;\n });\n };\n }\n };\n}];\n\nvar NG_HIDE_CLASS = 'ng-hide';\nvar NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';\n/**\n * @ngdoc directive\n * @name ngShow\n * @multiElement\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression provided to\n * the `ngShow` attribute.\n *\n * The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.\n * The `.ng-hide` CSS class is predefined in AngularJS and sets the display style to none (using an\n * `!important` flag). For CSP mode please add `angular-csp.css` to your HTML file (see\n * {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is visible) -->\n * <div ng-show=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is hidden) -->\n * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added\n * to the class attribute on the element causing it to become hidden. When truthy, the `.ng-hide`\n * CSS class is removed from the element causing the element not to appear hidden.\n *\n * ## Why is `!important` used?\n *\n * You may be wondering why `!important` is used for the `.ng-hide` CSS class. This is because the\n * `.ng-hide` selector can be easily overridden by heavier selectors. For example, something as\n * simple as changing the display style on a HTML list item would make hidden elements appear\n * visible. This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using `!important`, the show and hide behavior will work as expected despite any clash between\n * CSS selector specificity (when `!important` isn't used with any conflicting styles). If a\n * developer chooses to override the styling to change how to hide an element then it is just a\n * matter of using `!important` in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display: none !important`. If you\n * wish to change the hide behavior with `ngShow`/`ngHide`, you can simply overwrite the styles for\n * the `.ng-hide` CSS class. Note that the selector that needs to be used is actually\n * `.ng-hide:not(.ng-hide-animate)` to cope with extra animation classes that can be added.\n *\n * ```css\n * .ng-hide:not(.ng-hide-animate) {\n * /* These are just alternative ways of hiding an element */\n * display: block!important;\n * position: absolute;\n * top: -9999px;\n * left: -9999px;\n * }\n * ```\n *\n * By default you don't need to override anything in CSS and the animations will work around the\n * display style.\n *\n * @animations\n * | Animation | Occurs |\n * |-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n * | {@link $animate#addClass addClass} `.ng-hide` | After the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden. |\n * | {@link $animate#removeClass removeClass} `.ng-hide` | After the `ngShow` expression evaluates to a truthy value and just before contents are set to visible. |\n *\n * Animations in `ngShow`/`ngHide` work with the show and hide events that are triggered when the\n * directive expression is true and false. This system works like the animation system present with\n * `ngClass` except that you must also include the `!important` flag to override the display\n * property so that the elements are not actually hidden during the animation.\n *\n * ```css\n * /* A working example can be found at the bottom of this page. */\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition: all 0.5s linear;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property\n * to block during animation states - ngAnimate will automatically handle the style toggling for you.\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy/falsy then the\n * element is shown/hidden respectively.\n *\n * @example\n * A simple example, animating the element's opacity:\n *\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-show-simple\">\n <file name=\"index.html\">\n Show: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngShow\"><br />\n <div class=\"check-element animate-show-hide\" ng-show=\"checked\">\n I show up when your checkbox is checked.\n </div>\n </file>\n <file name=\"animations.css\">\n .animate-show-hide.ng-hide {\n opacity: 0;\n }\n\n .animate-show-hide.ng-hide-add,\n .animate-show-hide.ng-hide-remove {\n transition: all linear 0.5s;\n }\n\n .check-element {\n border: 1px solid black;\n opacity: 1;\n padding: 10px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ngShow', function() {\n var checkbox = element(by.model('checked'));\n var checkElem = element(by.css('.check-element'));\n\n expect(checkElem.isDisplayed()).toBe(false);\n checkbox.click();\n expect(checkElem.isDisplayed()).toBe(true);\n });\n </file>\n </example>\n *\n * <hr />\n * @example\n * A more complex example, featuring different show/hide animations:\n *\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-show-complex\">\n <file name=\"index.html\">\n Show: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngShow\"><br />\n <div class=\"check-element funky-show-hide\" ng-show=\"checked\">\n I show up when your checkbox is checked.\n </div>\n </file>\n <file name=\"animations.css\">\n body {\n overflow: hidden;\n perspective: 1000px;\n }\n\n .funky-show-hide.ng-hide-add {\n transform: rotateZ(0);\n transform-origin: right;\n transition: all 0.5s ease-in-out;\n }\n\n .funky-show-hide.ng-hide-add.ng-hide-add-active {\n transform: rotateZ(-135deg);\n }\n\n .funky-show-hide.ng-hide-remove {\n transform: rotateY(90deg);\n transform-origin: left;\n transition: all 0.5s ease;\n }\n\n .funky-show-hide.ng-hide-remove.ng-hide-remove-active {\n transform: rotateY(0);\n }\n\n .check-element {\n border: 1px solid black;\n opacity: 1;\n padding: 10px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ngShow', function() {\n var checkbox = element(by.model('checked'));\n var checkElem = element(by.css('.check-element'));\n\n expect(checkElem.isDisplayed()).toBe(false);\n checkbox.click();\n expect(checkElem.isDisplayed()).toBe(true);\n });\n </file>\n </example>\n *\n * @knownIssue\n *\n * ### Flickering when using ngShow to toggle between elements\n *\n * When using {@link ngShow} and / or {@link ngHide} to toggle between elements, it can\n * happen that both the element to show and the element to hide are visible for a very short time.\n *\n * This usually happens when the {@link ngAnimate ngAnimate module} is included, but no actual animations\n * are defined for {@link ngShow} / {@link ngHide}. Internet Explorer is affected more often than\n * other browsers.\n *\n * There are several way to mitigate this problem:\n *\n * - {@link guide/animations#how-to-selectively-enable-disable-and-skip-animations Disable animations on the affected elements}.\n * - Use {@link ngIf} or {@link ngSwitch} instead of {@link ngShow} / {@link ngHide}.\n * - Use the special CSS selector `ng-hide.ng-hide-animate` to set `{display: none}` or similar on the affected elements.\n * - Use `ng-class=\"{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.\n * - Define an animation on the affected elements.\n */\nvar ngShowDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngShow, function ngShowWatchAction(value) {\n // we're adding a temporary, animation-specific class for ng-hide since this way\n // we can control when the element is actually displayed on screen without having\n // to have a global/greedy CSS selector that breaks when other animations are run.\n // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845\n $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {\n tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n });\n });\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n * @multiElement\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression provided to\n * the `ngHide` attribute.\n *\n * The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.\n * The `.ng-hide` CSS class is predefined in AngularJS and sets the display style to none (using an\n * `!important` flag). For CSP mode please add `angular-csp.css` to your HTML file (see\n * {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is hidden) -->\n * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is visible) -->\n * <div ng-hide=\"myValue\"></div>\n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added\n * to the class attribute on the element causing it to become hidden. When falsy, the `.ng-hide`\n * CSS class is removed from the element causing the element not to appear hidden.\n *\n * ## Why is `!important` used?\n *\n * You may be wondering why `!important` is used for the `.ng-hide` CSS class. This is because the\n * `.ng-hide` selector can be easily overridden by heavier selectors. For example, something as\n * simple as changing the display style on a HTML list item would make hidden elements appear\n * visible. This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using `!important`, the show and hide behavior will work as expected despite any clash between\n * CSS selector specificity (when `!important` isn't used with any conflicting styles). If a\n * developer chooses to override the styling to change how to hide an element then it is just a\n * matter of using `!important` in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display: none !important`. If you\n * wish to change the hide behavior with `ngShow`/`ngHide`, you can simply overwrite the styles for\n * the `.ng-hide` CSS class. Note that the selector that needs to be used is actually\n * `.ng-hide:not(.ng-hide-animate)` to cope with extra animation classes that can be added.\n *\n * ```css\n * .ng-hide:not(.ng-hide-animate) {\n * /* These are just alternative ways of hiding an element */\n * display: block!important;\n * position: absolute;\n * top: -9999px;\n * left: -9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the\n * display style.\n *\n * @animations\n * | Animation | Occurs |\n * |-----------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n * | {@link $animate#addClass addClass} `.ng-hide` | After the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden. |\n * | {@link $animate#removeClass removeClass} `.ng-hide` | After the `ngHide` expression evaluates to a non truthy value and just before contents are set to visible. |\n *\n * Animations in `ngShow`/`ngHide` work with the show and hide events that are triggered when the\n * directive expression is true and false. This system works like the animation system present with\n * `ngClass` except that you must also include the `!important` flag to override the display\n * property so that the elements are not actually hidden during the animation.\n *\n * ```css\n * /* A working example can be found at the bottom of this page. */\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition: all 0.5s linear;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property\n * to block during animation states - ngAnimate will automatically handle the style toggling for you.\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy/falsy then the\n * element is hidden/shown respectively.\n *\n * @example\n * A simple example, animating the element's opacity:\n *\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-hide-simple\">\n <file name=\"index.html\">\n Hide: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngHide\"><br />\n <div class=\"check-element animate-show-hide\" ng-hide=\"checked\">\n I hide when your checkbox is checked.\n </div>\n </file>\n <file name=\"animations.css\">\n .animate-show-hide.ng-hide {\n opacity: 0;\n }\n\n .animate-show-hide.ng-hide-add,\n .animate-show-hide.ng-hide-remove {\n transition: all linear 0.5s;\n }\n\n .check-element {\n border: 1px solid black;\n opacity: 1;\n padding: 10px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ngHide', function() {\n var checkbox = element(by.model('checked'));\n var checkElem = element(by.css('.check-element'));\n\n expect(checkElem.isDisplayed()).toBe(true);\n checkbox.click();\n expect(checkElem.isDisplayed()).toBe(false);\n });\n </file>\n </example>\n *\n * <hr />\n * @example\n * A more complex example, featuring different show/hide animations:\n *\n <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-hide-complex\">\n <file name=\"index.html\">\n Hide: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngHide\"><br />\n <div class=\"check-element funky-show-hide\" ng-hide=\"checked\">\n I hide when your checkbox is checked.\n </div>\n </file>\n <file name=\"animations.css\">\n body {\n overflow: hidden;\n perspective: 1000px;\n }\n\n .funky-show-hide.ng-hide-add {\n transform: rotateZ(0);\n transform-origin: right;\n transition: all 0.5s ease-in-out;\n }\n\n .funky-show-hide.ng-hide-add.ng-hide-add-active {\n transform: rotateZ(-135deg);\n }\n\n .funky-show-hide.ng-hide-remove {\n transform: rotateY(90deg);\n transform-origin: left;\n transition: all 0.5s ease;\n }\n\n .funky-show-hide.ng-hide-remove.ng-hide-remove-active {\n transform: rotateY(0);\n }\n\n .check-element {\n border: 1px solid black;\n opacity: 1;\n padding: 10px;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should check ngHide', function() {\n var checkbox = element(by.model('checked'));\n var checkElem = element(by.css('.check-element'));\n\n expect(checkElem.isDisplayed()).toBe(true);\n checkbox.click();\n expect(checkElem.isDisplayed()).toBe(false);\n });\n </file>\n </example>\n *\n * @knownIssue\n *\n * ### Flickering when using ngHide to toggle between elements\n *\n * When using {@link ngShow} and / or {@link ngHide} to toggle between elements, it can\n * happen that both the element to show and the element to hide are visible for a very short time.\n *\n * This usually happens when the {@link ngAnimate ngAnimate module} is included, but no actual animations\n * are defined for {@link ngShow} / {@link ngHide}. Internet Explorer is affected more often than\n * other browsers.\n *\n * There are several way to mitigate this problem:\n *\n * - {@link guide/animations#how-to-selectively-enable-disable-and-skip-animations Disable animations on the affected elements}.\n * - Use {@link ngIf} or {@link ngSwitch} instead of {@link ngShow} / {@link ngHide}.\n * - Use the special CSS selector `ng-hide.ng-hide-animate` to set `{display: none}` or similar on the affected elements.\n * - Use `ng-class=\"{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.\n * - Define an animation on the affected elements.\n */\nvar ngHideDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngHide, function ngHideWatchAction(value) {\n // The comment inside of the ngShowDirective explains why we add and\n // remove a temporary class for the show/hide animation\n $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {\n tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n });\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @knownIssue\n * You should not use {@link guide/interpolation interpolation} in the value of the `style`\n * attribute, when using the `ngStyle` directive on the same element.\n * See {@link guide/interpolation#known-issues here} for more info.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n <example name=\"ng-style\">\n <file name=\"index.html\">\n <input type=\"button\" value=\"set color\" ng-click=\"myStyle={color:'red'}\">\n <input type=\"button\" value=\"set background\" ng-click=\"myStyle={'background-color':'blue'}\">\n <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n <br/>\n <span ng-style=\"myStyle\">Sample Text</span>\n <pre>myStyle={{myStyle}}</pre>\n </file>\n <file name=\"style.css\">\n span {\n color: black;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var colorSpan = element(by.css('span'));\n\n it('should check ng-style', function() {\n expect(colorSpan.getCssValue('color')).toMatch(/rgba\\(0, 0, 0, 1\\)|rgb\\(0, 0, 0\\)/);\n element(by.css('input[value=\\'set color\\']')).click();\n expect(colorSpan.getCssValue('color')).toMatch(/rgba\\(255, 0, 0, 1\\)|rgb\\(255, 0, 0\\)/);\n element(by.css('input[value=clear]')).click();\n expect(colorSpan.getCssValue('color')).toMatch(/rgba\\(0, 0, 0, 1\\)|rgb\\(0, 0, 0\\)/);\n });\n </file>\n </example>\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n scope.$watchCollection(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n if (oldStyles && (newStyles !== oldStyles)) {\n forEach(oldStyles, function(val, style) { element.css(style, ''); });\n }\n if (newStyles) element.css(newStyles);\n });\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * <div class=\"alert alert-info\">\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * </div>\n\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter} | after the ngSwitch contents change and the matched child element is placed inside the container |\n * | {@link ng.$animate#leave leave} | after the ngSwitch contents change and just before the former contents are removed from the DOM |\n *\n * @usage\n *\n * ```\n * <ANY ng-switch=\"expression\">\n * <ANY ng-switch-when=\"matchValue1\">...</ANY>\n * <ANY ng-switch-when=\"matchValue2\">...</ANY>\n * <ANY ng-switch-default>...</ANY>\n * </ANY>\n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n * case will be displayed. If the same match appears multiple times, all the\n * elements will be displayed. It is possible to associate multiple values to\n * the same `ngSwitchWhen` by defining the optional attribute\n * `ngSwitchWhenSeparator`. The separator will be used to split the value of\n * the `ngSwitchWhen` attribute into multiple tokens, and the element will show\n * if any of the `ngSwitch` evaluates to any of these tokens.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n * are multiple default cases, all of them will be displayed when no other\n * case match.\n *\n *\n * @example\n <example module=\"switchExample\" deps=\"angular-animate.js\" animations=\"true\" name=\"ng-switch\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <select ng-model=\"selection\" ng-options=\"item for item in items\">\n </select>\n <code>selection={{selection}}</code>\n <hr/>\n <div class=\"animate-switch-container\"\n ng-switch on=\"selection\">\n <div class=\"animate-switch\" ng-switch-when=\"settings|options\" ng-switch-when-separator=\"|\">Settings Div</div>\n <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n <div class=\"animate-switch\" ng-switch-default>default</div>\n </div>\n </div>\n </file>\n <file name=\"script.js\">\n angular.module('switchExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.items = ['settings', 'home', 'options', 'other'];\n $scope.selection = $scope.items[0];\n }]);\n </file>\n <file name=\"animations.css\">\n .animate-switch-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .animate-switch {\n padding:10px;\n }\n\n .animate-switch.ng-animate {\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n }\n\n .animate-switch.ng-leave.ng-leave-active,\n .animate-switch.ng-enter {\n top:-50px;\n }\n .animate-switch.ng-leave,\n .animate-switch.ng-enter.ng-enter-active {\n top:0;\n }\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n var switchElem = element(by.css('[ng-switch]'));\n var select = element(by.model('selection'));\n\n it('should start in settings', function() {\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should change to home', function() {\n select.all(by.css('option')).get(1).click();\n expect(switchElem.getText()).toMatch(/Home Span/);\n });\n it('should change to settings via \"options\"', function() {\n select.all(by.css('option')).get(2).click();\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should select default', function() {\n select.all(by.css('option')).get(3).click();\n expect(switchElem.getText()).toMatch(/default/);\n });\n </file>\n </example>\n */\nvar ngSwitchDirective = ['$animate', '$compile', function($animate, $compile) {\n return {\n require: 'ngSwitch',\n\n // asks for $scope to fool the BC controller module\n controller: ['$scope', function NgSwitchController() {\n this.cases = {};\n }],\n link: function(scope, element, attr, ngSwitchController) {\n var watchExpr = attr.ngSwitch || attr.on,\n selectedTranscludes = [],\n selectedElements = [],\n previousLeaveAnimations = [],\n selectedScopes = [];\n\n var spliceFactory = function(array, index) {\n return function(response) {\n if (response !== false) array.splice(index, 1);\n };\n };\n\n scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n var i, ii;\n\n // Start with the last, in case the array is modified during the loop\n while (previousLeaveAnimations.length) {\n $animate.cancel(previousLeaveAnimations.pop());\n }\n\n for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n var selected = getBlockNodes(selectedElements[i].clone);\n selectedScopes[i].$destroy();\n var runner = previousLeaveAnimations[i] = $animate.leave(selected);\n runner.done(spliceFactory(previousLeaveAnimations, i));\n }\n\n selectedElements.length = 0;\n selectedScopes.length = 0;\n\n if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n forEach(selectedTranscludes, function(selectedTransclude) {\n selectedTransclude.transclude(function(caseElement, selectedScope) {\n selectedScopes.push(selectedScope);\n var anchor = selectedTransclude.element;\n caseElement[caseElement.length++] = $compile.$$createComment('end ngSwitchWhen');\n var block = { clone: caseElement };\n\n selectedElements.push(block);\n $animate.enter(caseElement, anchor.parent(), anchor);\n });\n });\n }\n });\n }\n };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attrs, ctrl, $transclude) {\n\n var cases = attrs.ngSwitchWhen.split(attrs.ngSwitchWhenSeparator).sort().filter(\n // Filter duplicate cases\n function(element, index, array) { return array[index - 1] !== element; }\n );\n\n forEach(cases, function(whenCase) {\n ctrl.cases['!' + whenCase] = (ctrl.cases['!' + whenCase] || []);\n ctrl.cases['!' + whenCase].push({ transclude: $transclude, element: element });\n });\n }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attr, ctrl, $transclude) {\n ctrl.cases['?'] = (ctrl.cases['?'] || []);\n ctrl.cases['?'].push({ transclude: $transclude, element: element });\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * You can specify that you want to insert a named transclusion slot, instead of the default slot, by providing the slot name\n * as the value of the `ng-transclude` or `ng-transclude-slot` attribute.\n *\n * If the transcluded content is not empty (i.e. contains one or more DOM nodes, including whitespace text nodes), any existing\n * content of this element will be removed before the transcluded content is inserted.\n * If the transcluded content is empty (or only whitespace), the existing content is left intact. This lets you provide fallback\n * content in the case that no transcluded content is provided.\n *\n * @element ANY\n *\n * @param {string} ngTransclude|ngTranscludeSlot the name of the slot to insert at this point. If this is not provided, is empty\n * or its value is the same as the name of the attribute then the default slot is used.\n *\n * @example\n * ### Basic transclusion\n * This example demonstrates basic transclusion of content into a component directive.\n * <example name=\"simpleTranscludeExample\" module=\"transcludeExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('transcludeExample', [])\n * .directive('pane', function(){\n * return {\n * restrict: 'E',\n * transclude: true,\n * scope: { title:'@' },\n * template: '<div style=\"border: 1px solid black;\">' +\n * '<div style=\"background-color: gray\">{{title}}</div>' +\n * '<ng-transclude></ng-transclude>' +\n * '</div>'\n * };\n * })\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.title = 'Lorem Ipsum';\n * $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <input ng-model=\"title\" aria-label=\"title\"> <br/>\n * <textarea ng-model=\"text\" aria-label=\"text\"></textarea> <br/>\n * <pane title=\"{{title}}\"><span>{{text}}</span></pane>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should have transcluded', function() {\n * var titleElement = element(by.model('title'));\n * titleElement.clear();\n * titleElement.sendKeys('TITLE');\n * var textElement = element(by.model('text'));\n * textElement.clear();\n * textElement.sendKeys('TEXT');\n * expect(element(by.binding('title')).getText()).toEqual('TITLE');\n * expect(element(by.binding('text')).getText()).toEqual('TEXT');\n * });\n * </file>\n * </example>\n *\n * @example\n * ### Transclude fallback content\n * This example shows how to use `NgTransclude` with fallback content, that\n * is displayed if no transcluded content is provided.\n *\n * <example module=\"transcludeFallbackContentExample\" name=\"ng-transclude\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('transcludeFallbackContentExample', [])\n * .directive('myButton', function(){\n * return {\n * restrict: 'E',\n * transclude: true,\n * scope: true,\n * template: '<button style=\"cursor: pointer;\">' +\n * '<ng-transclude>' +\n * '<b style=\"color: red;\">Button1</b>' +\n * '</ng-transclude>' +\n * '</button>'\n * };\n * });\n * </script>\n * <!-- fallback button content -->\n * <my-button id=\"fallback\"></my-button>\n * <!-- modified button content -->\n * <my-button id=\"modified\">\n * <i style=\"color: green;\">Button2</i>\n * </my-button>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should have different transclude element content', function() {\n * expect(element(by.id('fallback')).getText()).toBe('Button1');\n * expect(element(by.id('modified')).getText()).toBe('Button2');\n * });\n * </file>\n * </example>\n *\n * @example\n * ### Multi-slot transclusion\n * This example demonstrates using multi-slot transclusion in a component directive.\n * <example name=\"multiSlotTranscludeExample\" module=\"multiSlotTranscludeExample\">\n * <file name=\"index.html\">\n * <style>\n * .title, .footer {\n * background-color: gray\n * }\n * </style>\n * <div ng-controller=\"ExampleController\">\n * <input ng-model=\"title\" aria-label=\"title\"> <br/>\n * <textarea ng-model=\"text\" aria-label=\"text\"></textarea> <br/>\n * <pane>\n * <pane-title><a ng-href=\"{{link}}\">{{title}}</a></pane-title>\n * <pane-body><p>{{text}}</p></pane-body>\n * </pane>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('multiSlotTranscludeExample', [])\n * .directive('pane', function() {\n * return {\n * restrict: 'E',\n * transclude: {\n * 'title': '?paneTitle',\n * 'body': 'paneBody',\n * 'footer': '?paneFooter'\n * },\n * template: '<div style=\"border: 1px solid black;\">' +\n * '<div class=\"title\" ng-transclude=\"title\">Fallback Title</div>' +\n * '<div ng-transclude=\"body\"></div>' +\n * '<div class=\"footer\" ng-transclude=\"footer\">Fallback Footer</div>' +\n * '</div>'\n * };\n * })\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.title = 'Lorem Ipsum';\n * $scope.link = 'https://google.com';\n * $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n * }]);\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should have transcluded the title and the body', function() {\n * var titleElement = element(by.model('title'));\n * titleElement.clear();\n * titleElement.sendKeys('TITLE');\n * var textElement = element(by.model('text'));\n * textElement.clear();\n * textElement.sendKeys('TEXT');\n * expect(element(by.css('.title')).getText()).toEqual('TITLE');\n * expect(element(by.binding('text')).getText()).toEqual('TEXT');\n * expect(element(by.css('.footer')).getText()).toEqual('Fallback Footer');\n * });\n * </file>\n * </example>\n */\nvar ngTranscludeMinErr = minErr('ngTransclude');\nvar ngTranscludeDirective = ['$compile', function($compile) {\n return {\n restrict: 'EAC',\n compile: function ngTranscludeCompile(tElement) {\n\n // Remove and cache any original content to act as a fallback\n var fallbackLinkFn = $compile(tElement.contents());\n tElement.empty();\n\n return function ngTranscludePostLink($scope, $element, $attrs, controller, $transclude) {\n\n if (!$transclude) {\n throw ngTranscludeMinErr('orphan',\n 'Illegal use of ngTransclude directive in the template! ' +\n 'No parent directive that requires a transclusion found. ' +\n 'Element: {0}',\n startingTag($element));\n }\n\n\n // If the attribute is of the form: `ng-transclude=\"ng-transclude\"` then treat it like the default\n if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) {\n $attrs.ngTransclude = '';\n }\n var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot;\n\n // If the slot is required and no transclusion content is provided then this call will throw an error\n $transclude(ngTranscludeCloneAttachFn, null, slotName);\n\n // If the slot is optional and no transclusion content is provided then use the fallback content\n if (slotName && !$transclude.isSlotFilled(slotName)) {\n useFallbackContent();\n }\n\n function ngTranscludeCloneAttachFn(clone, transcludedScope) {\n if (clone.length && notWhitespace(clone)) {\n $element.append(clone);\n } else {\n useFallbackContent();\n // There is nothing linked against the transcluded scope since no content was available,\n // so it should be safe to clean up the generated scope.\n transcludedScope.$destroy();\n }\n }\n\n function useFallbackContent() {\n // Since this is the fallback content rather than the transcluded content,\n // we link against the scope of this directive rather than the transcluded scope\n fallbackLinkFn($scope, function(clone) {\n $element.append(clone);\n });\n }\n\n function notWhitespace(nodes) {\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n var node = nodes[i];\n if (node.nodeType !== NODE_TYPE_TEXT || node.nodeValue.trim()) {\n return true;\n }\n }\n }\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the\n * template can be used by {@link ng.directive:ngInclude `ngInclude`},\n * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n *\n * @param {string} type Must be set to `'text/ng-template'`.\n * @param {string} id Cache name of the template.\n *\n * @example\n <example name=\"script-tag\">\n <file name=\"index.html\">\n <script type=\"text/ng-template\" id=\"/tpl.html\">\n Content of the template.\n </script>\n\n <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should load template defined inside script tag', function() {\n element(by.css('#tpl-link')).click();\n expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n });\n </file>\n </example>\n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n return {\n restrict: 'E',\n terminal: true,\n compile: function(element, attr) {\n if (attr.type === 'text/ng-template') {\n var templateUrl = attr.id,\n text = element[0].text;\n\n $templateCache.put(templateUrl, text);\n }\n }\n };\n}];\n\n/* exported selectDirective, optionDirective */\n\nvar noopNgModelController = { $setViewValue: noop, $render: noop };\n\nfunction setOptionSelectedStatus(optionEl, value) {\n optionEl.prop('selected', value);\n /**\n * When unselecting an option, setting the property to null / false should be enough\n * However, screenreaders might react to the selected attribute instead, see\n * https://github.com/angular/angular.js/issues/14419\n * Note: \"selected\" is a boolean attr and will be removed when the \"value\" arg in attr() is false\n * or null\n */\n optionEl.attr('selected', value);\n}\n\n/**\n * @ngdoc type\n * @name select.SelectController\n *\n * @description\n * The controller for the {@link ng.select select} directive. The controller exposes\n * a few utility methods that can be used to augment the behavior of a regular or an\n * {@link ng.ngOptions ngOptions} select element.\n *\n * @example\n * ### Set a custom error when the unknown option is selected\n *\n * This example sets a custom error \"unknownValue\" on the ngModelController\n * when the select element's unknown option is selected, i.e. when the model is set to a value\n * that is not matched by any option.\n *\n * <example name=\"select-unknown-value-error\" module=\"staticSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"testSelect\"> Single select: </label><br>\n * <select name=\"testSelect\" ng-model=\"selected\" unknown-value-error>\n * <option value=\"option-1\">Option 1</option>\n * <option value=\"option-2\">Option 2</option>\n * </select><br>\n * <span class=\"error\" ng-if=\"myForm.testSelect.$error.unknownValue\">\n * Error: The current model doesn't match any option</span><br>\n *\n * <button ng-click=\"forceUnknownOption()\">Force unknown option</button><br>\n * </form>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('staticSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.selected = null;\n *\n * $scope.forceUnknownOption = function() {\n * $scope.selected = 'nonsense';\n * };\n * }])\n * .directive('unknownValueError', function() {\n * return {\n * require: ['ngModel', 'select'],\n * link: function(scope, element, attrs, ctrls) {\n * var ngModelCtrl = ctrls[0];\n * var selectCtrl = ctrls[1];\n *\n * ngModelCtrl.$validators.unknownValue = function(modelValue, viewValue) {\n * if (selectCtrl.$isUnknownOptionSelected()) {\n * return false;\n * }\n *\n * return true;\n * };\n * }\n *\n * };\n * });\n * </file>\n *</example>\n *\n *\n * @example\n * ### Set the \"required\" error when the unknown option is selected.\n *\n * By default, the \"required\" error on the ngModelController is only set on a required select\n * when the empty option is selected. This example adds a custom directive that also sets the\n * error when the unknown option is selected.\n *\n * <example name=\"select-unknown-value-required\" module=\"staticSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"testSelect\"> Select: </label><br>\n * <select name=\"testSelect\" ng-model=\"selected\" required unknown-value-required>\n * <option value=\"option-1\">Option 1</option>\n * <option value=\"option-2\">Option 2</option>\n * </select><br>\n * <span class=\"error\" ng-if=\"myForm.testSelect.$error.required\">Error: Please select a value</span><br>\n *\n * <button ng-click=\"forceUnknownOption()\">Force unknown option</button><br>\n * </form>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('staticSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.selected = null;\n *\n * $scope.forceUnknownOption = function() {\n * $scope.selected = 'nonsense';\n * };\n * }])\n * .directive('unknownValueRequired', function() {\n * return {\n * priority: 1, // This directive must run after the required directive has added its validator\n * require: ['ngModel', 'select'],\n * link: function(scope, element, attrs, ctrls) {\n * var ngModelCtrl = ctrls[0];\n * var selectCtrl = ctrls[1];\n *\n * var originalRequiredValidator = ngModelCtrl.$validators.required;\n *\n * ngModelCtrl.$validators.required = function() {\n * if (attrs.required && selectCtrl.$isUnknownOptionSelected()) {\n * return false;\n * }\n *\n * return originalRequiredValidator.apply(this, arguments);\n * };\n * }\n * };\n * });\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should show the error message when the unknown option is selected', function() {\n\n var error = element(by.className('error'));\n\n expect(error.getText()).toBe('Error: Please select a value');\n\n element(by.cssContainingText('option', 'Option 1')).click();\n\n expect(error.isPresent()).toBe(false);\n\n element(by.tagName('button')).click();\n\n expect(error.getText()).toBe('Error: Please select a value');\n });\n * </file>\n *</example>\n *\n *\n */\nvar SelectController =\n ['$element', '$scope', /** @this */ function($element, $scope) {\n\n var self = this,\n optionsMap = new NgMap();\n\n self.selectValueMap = {}; // Keys are the hashed values, values the original values\n\n // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors\n self.ngModelCtrl = noopNgModelController;\n self.multiple = false;\n\n // The \"unknown\" option is one that is prepended to the list if the viewValue\n // does not match any of the options. When it is rendered the value of the unknown\n // option is '? XXX ?' where XXX is the hashKey of the value that is not known.\n //\n // Support: IE 9 only\n // We can't just jqLite('<option>') since jqLite is not smart enough\n // to create it in <select> and IE barfs otherwise.\n self.unknownOption = jqLite(window.document.createElement('option'));\n\n // The empty option is an option with the value '' that the application developer can\n // provide inside the select. It is always selectable and indicates that a \"null\" selection has\n // been made by the user.\n // If the select has an empty option, and the model of the select is set to \"undefined\" or \"null\",\n // the empty option is selected.\n // If the model is set to a different unmatched value, the unknown option is rendered and\n // selected, i.e both are present, because a \"null\" selection and an unknown value are different.\n self.hasEmptyOption = false;\n self.emptyOption = undefined;\n\n self.renderUnknownOption = function(val) {\n var unknownVal = self.generateUnknownOptionValue(val);\n self.unknownOption.val(unknownVal);\n $element.prepend(self.unknownOption);\n setOptionSelectedStatus(self.unknownOption, true);\n $element.val(unknownVal);\n };\n\n self.updateUnknownOption = function(val) {\n var unknownVal = self.generateUnknownOptionValue(val);\n self.unknownOption.val(unknownVal);\n setOptionSelectedStatus(self.unknownOption, true);\n $element.val(unknownVal);\n };\n\n self.generateUnknownOptionValue = function(val) {\n return '? ' + hashKey(val) + ' ?';\n };\n\n self.removeUnknownOption = function() {\n if (self.unknownOption.parent()) self.unknownOption.remove();\n };\n\n self.selectEmptyOption = function() {\n if (self.emptyOption) {\n $element.val('');\n setOptionSelectedStatus(self.emptyOption, true);\n }\n };\n\n self.unselectEmptyOption = function() {\n if (self.hasEmptyOption) {\n setOptionSelectedStatus(self.emptyOption, false);\n }\n };\n\n $scope.$on('$destroy', function() {\n // disable unknown option so that we don't do work when the whole select is being destroyed\n self.renderUnknownOption = noop;\n });\n\n // Read the value of the select control, the implementation of this changes depending\n // upon whether the select can have multiple values and whether ngOptions is at work.\n self.readValue = function readSingleValue() {\n var val = $element.val();\n // ngValue added option values are stored in the selectValueMap, normal interpolations are not\n var realVal = val in self.selectValueMap ? self.selectValueMap[val] : val;\n\n if (self.hasOption(realVal)) {\n return realVal;\n }\n\n return null;\n };\n\n\n // Write the value to the select control, the implementation of this changes depending\n // upon whether the select can have multiple values and whether ngOptions is at work.\n self.writeValue = function writeSingleValue(value) {\n // Make sure to remove the selected attribute from the previously selected option\n // Otherwise, screen readers might get confused\n var currentlySelectedOption = $element[0].options[$element[0].selectedIndex];\n if (currentlySelectedOption) setOptionSelectedStatus(jqLite(currentlySelectedOption), false);\n\n if (self.hasOption(value)) {\n self.removeUnknownOption();\n\n var hashedVal = hashKey(value);\n $element.val(hashedVal in self.selectValueMap ? hashedVal : value);\n\n // Set selected attribute and property on selected option for screen readers\n var selectedOption = $element[0].options[$element[0].selectedIndex];\n setOptionSelectedStatus(jqLite(selectedOption), true);\n } else {\n self.selectUnknownOrEmptyOption(value);\n }\n };\n\n\n // Tell the select control that an option, with the given value, has been added\n self.addOption = function(value, element) {\n // Skip comment nodes, as they only pollute the `optionsMap`\n if (element[0].nodeType === NODE_TYPE_COMMENT) return;\n\n assertNotHasOwnProperty(value, '\"option value\"');\n if (value === '') {\n self.hasEmptyOption = true;\n self.emptyOption = element;\n }\n var count = optionsMap.get(value) || 0;\n optionsMap.set(value, count + 1);\n // Only render at the end of a digest. This improves render performance when many options\n // are added during a digest and ensures all relevant options are correctly marked as selected\n scheduleRender();\n };\n\n // Tell the select control that an option, with the given value, has been removed\n self.removeOption = function(value) {\n var count = optionsMap.get(value);\n if (count) {\n if (count === 1) {\n optionsMap.delete(value);\n if (value === '') {\n self.hasEmptyOption = false;\n self.emptyOption = undefined;\n }\n } else {\n optionsMap.set(value, count - 1);\n }\n }\n };\n\n // Check whether the select control has an option matching the given value\n self.hasOption = function(value) {\n return !!optionsMap.get(value);\n };\n\n /**\n * @ngdoc method\n * @name select.SelectController#$hasEmptyOption\n *\n * @description\n *\n * Returns `true` if the select element currently has an empty option\n * element, i.e. an option that signifies that the select is empty / the selection is null.\n *\n */\n self.$hasEmptyOption = function() {\n return self.hasEmptyOption;\n };\n\n /**\n * @ngdoc method\n * @name select.SelectController#$isUnknownOptionSelected\n *\n * @description\n *\n * Returns `true` if the select element's unknown option is selected. The unknown option is added\n * and automatically selected whenever the select model doesn't match any option.\n *\n */\n self.$isUnknownOptionSelected = function() {\n // Presence of the unknown option means it is selected\n return $element[0].options[0] === self.unknownOption[0];\n };\n\n /**\n * @ngdoc method\n * @name select.SelectController#$isEmptyOptionSelected\n *\n * @description\n *\n * Returns `true` if the select element has an empty option and this empty option is currently\n * selected. Returns `false` if the select element has no empty option or it is not selected.\n *\n */\n self.$isEmptyOptionSelected = function() {\n return self.hasEmptyOption && $element[0].options[$element[0].selectedIndex] === self.emptyOption[0];\n };\n\n self.selectUnknownOrEmptyOption = function(value) {\n if (value == null && self.emptyOption) {\n self.removeUnknownOption();\n self.selectEmptyOption();\n } else if (self.unknownOption.parent().length) {\n self.updateUnknownOption(value);\n } else {\n self.renderUnknownOption(value);\n }\n };\n\n var renderScheduled = false;\n function scheduleRender() {\n if (renderScheduled) return;\n renderScheduled = true;\n $scope.$$postDigest(function() {\n renderScheduled = false;\n self.ngModelCtrl.$render();\n });\n }\n\n var updateScheduled = false;\n function scheduleViewValueUpdate(renderAfter) {\n if (updateScheduled) return;\n\n updateScheduled = true;\n\n $scope.$$postDigest(function() {\n if ($scope.$$destroyed) return;\n\n updateScheduled = false;\n self.ngModelCtrl.$setViewValue(self.readValue());\n if (renderAfter) self.ngModelCtrl.$render();\n });\n }\n\n\n self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {\n\n if (optionAttrs.$attr.ngValue) {\n // The value attribute is set by ngValue\n var oldVal, hashedVal;\n optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {\n\n var removal;\n var previouslySelected = optionElement.prop('selected');\n\n if (isDefined(hashedVal)) {\n self.removeOption(oldVal);\n delete self.selectValueMap[hashedVal];\n removal = true;\n }\n\n hashedVal = hashKey(newVal);\n oldVal = newVal;\n self.selectValueMap[hashedVal] = newVal;\n self.addOption(newVal, optionElement);\n // Set the attribute directly instead of using optionAttrs.$set - this stops the observer\n // from firing a second time. Other $observers on value will also get the result of the\n // ngValue expression, not the hashed value\n optionElement.attr('value', hashedVal);\n\n if (removal && previouslySelected) {\n scheduleViewValueUpdate();\n }\n\n });\n } else if (interpolateValueFn) {\n // The value attribute is interpolated\n optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {\n // This method is overwritten in ngOptions and has side-effects!\n self.readValue();\n\n var removal;\n var previouslySelected = optionElement.prop('selected');\n\n if (isDefined(oldVal)) {\n self.removeOption(oldVal);\n removal = true;\n }\n oldVal = newVal;\n self.addOption(newVal, optionElement);\n\n if (removal && previouslySelected) {\n scheduleViewValueUpdate();\n }\n });\n } else if (interpolateTextFn) {\n // The text content is interpolated\n optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {\n optionAttrs.$set('value', newVal);\n var previouslySelected = optionElement.prop('selected');\n if (oldVal !== newVal) {\n self.removeOption(oldVal);\n }\n self.addOption(newVal, optionElement);\n\n if (oldVal && previouslySelected) {\n scheduleViewValueUpdate();\n }\n });\n } else {\n // The value attribute is static\n self.addOption(optionAttrs.value, optionElement);\n }\n\n\n optionAttrs.$observe('disabled', function(newVal) {\n\n // Since model updates will also select disabled options (like ngOptions),\n // we only have to handle options becoming disabled, not enabled\n\n if (newVal === 'true' || newVal && optionElement.prop('selected')) {\n if (self.multiple) {\n scheduleViewValueUpdate(true);\n } else {\n self.ngModelCtrl.$setViewValue(null);\n self.ngModelCtrl.$render();\n }\n }\n });\n\n optionElement.on('$destroy', function() {\n var currentValue = self.readValue();\n var removeValue = optionAttrs.value;\n\n self.removeOption(removeValue);\n scheduleRender();\n\n if (self.multiple && currentValue && currentValue.indexOf(removeValue) !== -1 ||\n currentValue === removeValue\n ) {\n // When multiple (selected) options are destroyed at the same time, we don't want\n // to run a model update for each of them. Instead, run a single update in the $$postDigest\n scheduleViewValueUpdate(true);\n }\n });\n };\n}];\n\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `select` element with AngularJS data-binding.\n *\n * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding\n * between the scope and the `<select>` control (including setting default values).\n * It also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or\n * {@link ngOptions `ngOptions`} directives.\n *\n * When an item in the `<select>` menu is selected, the value of the selected option will be bound\n * to the model identified by the `ngModel` directive. With static or repeated options, this is\n * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.\n * Value and textContent can be interpolated.\n *\n * The {@link select.SelectController select controller} exposes utility functions that can be used\n * to manipulate the select's behavior.\n *\n * ## Matching model and option values\n *\n * In general, the match between the model and an option is evaluated by strictly comparing the model\n * value against the value of the available options.\n *\n * If you are setting the option value with the option's `value` attribute, or textContent, the\n * value will always be a `string` which means that the model value must also be a string.\n * Otherwise the `select` directive cannot match them correctly.\n *\n * To bind the model to a non-string value, you can use one of the following strategies:\n * - the {@link ng.ngOptions `ngOptions`} directive\n * ({@link ng.select#using-select-with-ngoptions-and-setting-a-default-value})\n * - the {@link ng.ngValue `ngValue`} directive, which allows arbitrary expressions to be\n * option values ({@link ng.select#using-ngvalue-to-bind-the-model-to-an-array-of-objects Example})\n * - model $parsers / $formatters to convert the string value\n * ({@link ng.select#binding-select-to-a-non-string-value-via-ngmodel-parsing-formatting Example})\n *\n * If the viewValue of `ngModel` does not match any of the options, then the control\n * will automatically add an \"unknown\" option, which it then removes when the mismatch is resolved.\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * ## Choosing between `ngRepeat` and `ngOptions`\n *\n * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions\n * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits:\n * - more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n * comprehension expression\n * - reduced memory consumption by not creating a new scope for each repeated instance\n * - increased render speed by creating the options in a documentFragment instead of individually\n *\n * Specifically, select with repeated options slows down significantly starting at 2000 options in\n * Chrome and Internet Explorer / Edge.\n *\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} multiple Allows multiple options to be selected. The selected values will be\n * bound to the model as an array.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds required attribute and required validation constraint to\n * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required\n * when you want to data-bind to the required attribute.\n * @param {string=} ngChange AngularJS expression to be executed when selected option(s) changes due to user\n * interaction with the select element.\n * @param {string=} ngOptions sets the options that the select is populated with and defines what is\n * set on the model on selection. See {@link ngOptions `ngOptions`}.\n * @param {string=} ngAttrSize sets the size of the select element dynamically. Uses the\n * {@link guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes ngAttr} directive.\n *\n *\n * @example\n * ### Simple `select` elements with static options\n *\n * <example name=\"static-select\" module=\"staticSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"singleSelect\"> Single select: </label><br>\n * <select name=\"singleSelect\" ng-model=\"data.singleSelect\">\n * <option value=\"option-1\">Option 1</option>\n * <option value=\"option-2\">Option 2</option>\n * </select><br>\n *\n * <label for=\"singleSelect\"> Single select with \"not selected\" option and dynamic option values: </label><br>\n * <select name=\"singleSelect\" id=\"singleSelect\" ng-model=\"data.singleSelect\">\n * <option value=\"\">---Please select---</option> <!-- not selected / blank option -->\n * <option value=\"{{data.option1}}\">Option 1</option> <!-- interpolation -->\n * <option value=\"option-2\">Option 2</option>\n * </select><br>\n * <button ng-click=\"forceUnknownOption()\">Force unknown option</button><br>\n * <tt>singleSelect = {{data.singleSelect}}</tt>\n *\n * <hr>\n * <label for=\"multipleSelect\"> Multiple select: </label><br>\n * <select name=\"multipleSelect\" id=\"multipleSelect\" ng-model=\"data.multipleSelect\" multiple>\n * <option value=\"option-1\">Option 1</option>\n * <option value=\"option-2\">Option 2</option>\n * <option value=\"option-3\">Option 3</option>\n * </select><br>\n * <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>\n * </form>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('staticSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * singleSelect: null,\n * multipleSelect: [],\n * option1: 'option-1'\n * };\n *\n * $scope.forceUnknownOption = function() {\n * $scope.data.singleSelect = 'nonsense';\n * };\n * }]);\n * </file>\n *</example>\n *\n * @example\n * ### Using `ngRepeat` to generate `select` options\n * <example name=\"select-ngrepeat\" module=\"ngrepeatSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"repeatSelect\"> Repeat select: </label>\n * <select name=\"repeatSelect\" id=\"repeatSelect\" ng-model=\"data.model\">\n * <option ng-repeat=\"option in data.availableOptions\" value=\"{{option.id}}\">{{option.name}}</option>\n * </select>\n * </form>\n * <hr>\n * <tt>model = {{data.model}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('ngrepeatSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * model: null,\n * availableOptions: [\n * {id: '1', name: 'Option A'},\n * {id: '2', name: 'Option B'},\n * {id: '3', name: 'Option C'}\n * ]\n * };\n * }]);\n * </file>\n *</example>\n *\n * @example\n * ### Using `ngValue` to bind the model to an array of objects\n * <example name=\"select-ngvalue\" module=\"ngvalueSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"ngvalueselect\"> ngvalue select: </label>\n * <select size=\"6\" name=\"ngvalueselect\" ng-model=\"data.model\" multiple>\n * <option ng-repeat=\"option in data.availableOptions\" ng-value=\"option.value\">{{option.name}}</option>\n * </select>\n * </form>\n * <hr>\n * <pre>model = {{data.model | json}}</pre><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('ngvalueSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * model: null,\n * availableOptions: [\n {value: 'myString', name: 'string'},\n {value: 1, name: 'integer'},\n {value: true, name: 'boolean'},\n {value: null, name: 'null'},\n {value: {prop: 'value'}, name: 'object'},\n {value: ['a'], name: 'array'}\n * ]\n * };\n * }]);\n * </file>\n *</example>\n *\n * @example\n * ### Using `select` with `ngOptions` and setting a default value\n * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.\n *\n * <example name=\"select-with-default-values\" module=\"defaultValueSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n * <form name=\"myForm\">\n * <label for=\"mySelect\">Make a choice:</label>\n * <select name=\"mySelect\" id=\"mySelect\"\n * ng-options=\"option.name for option in data.availableOptions track by option.id\"\n * ng-model=\"data.selectedOption\"></select>\n * </form>\n * <hr>\n * <tt>option = {{data.selectedOption}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n * angular.module('defaultValueSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * availableOptions: [\n * {id: '1', name: 'Option A'},\n * {id: '2', name: 'Option B'},\n * {id: '3', name: 'Option C'}\n * ],\n * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui\n * };\n * }]);\n * </file>\n *</example>\n *\n * @example\n * ### Binding `select` to a non-string value via `ngModel` parsing / formatting\n *\n * <example name=\"select-with-non-string-options\" module=\"nonStringSelect\">\n * <file name=\"index.html\">\n * <select ng-model=\"model.id\" convert-to-number>\n * <option value=\"0\">Zero</option>\n * <option value=\"1\">One</option>\n * <option value=\"2\">Two</option>\n * </select>\n * {{ model }}\n * </file>\n * <file name=\"app.js\">\n * angular.module('nonStringSelect', [])\n * .run(function($rootScope) {\n * $rootScope.model = { id: 2 };\n * })\n * .directive('convertToNumber', function() {\n * return {\n * require: 'ngModel',\n * link: function(scope, element, attrs, ngModel) {\n * ngModel.$parsers.push(function(val) {\n * return parseInt(val, 10);\n * });\n * ngModel.$formatters.push(function(val) {\n * return '' + val;\n * });\n * }\n * };\n * });\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should initialize to model', function() {\n * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');\n * });\n * </file>\n * </example>\n *\n */\nvar selectDirective = function() {\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: SelectController,\n priority: 1,\n link: {\n pre: selectPreLink,\n post: selectPostLink\n }\n };\n\n function selectPreLink(scope, element, attr, ctrls) {\n\n var selectCtrl = ctrls[0];\n var ngModelCtrl = ctrls[1];\n\n // if ngModel is not defined, we don't need to do anything but set the registerOption\n // function to noop, so options don't get added internally\n if (!ngModelCtrl) {\n selectCtrl.registerOption = noop;\n return;\n }\n\n\n selectCtrl.ngModelCtrl = ngModelCtrl;\n\n // When the selected item(s) changes we delegate getting the value of the select control\n // to the `readValue` method, which can be changed if the select can have multiple\n // selected values or if the options are being generated by `ngOptions`\n element.on('change', function() {\n selectCtrl.removeUnknownOption();\n scope.$apply(function() {\n ngModelCtrl.$setViewValue(selectCtrl.readValue());\n });\n });\n\n // If the select allows multiple values then we need to modify how we read and write\n // values from and to the control; also what it means for the value to be empty and\n // we have to add an extra watch since ngModel doesn't work well with arrays - it\n // doesn't trigger rendering if only an item in the array changes.\n if (attr.multiple) {\n selectCtrl.multiple = true;\n\n // Read value now needs to check each option to see if it is selected\n selectCtrl.readValue = function readMultipleValue() {\n var array = [];\n forEach(element.find('option'), function(option) {\n if (option.selected && !option.disabled) {\n var val = option.value;\n array.push(val in selectCtrl.selectValueMap ? selectCtrl.selectValueMap[val] : val);\n }\n });\n return array;\n };\n\n // Write value now needs to set the selected property of each matching option\n selectCtrl.writeValue = function writeMultipleValue(value) {\n forEach(element.find('option'), function(option) {\n var shouldBeSelected = !!value && (includes(value, option.value) ||\n includes(value, selectCtrl.selectValueMap[option.value]));\n var currentlySelected = option.selected;\n\n // Support: IE 9-11 only, Edge 12-15+\n // In IE and Edge adding options to the selection via shift+click/UP/DOWN\n // will de-select already selected options if \"selected\" on those options was set\n // more than once (i.e. when the options were already selected)\n // So we only modify the selected property if necessary.\n // Note: this behavior cannot be replicated via unit tests because it only shows in the\n // actual user interface.\n if (shouldBeSelected !== currentlySelected) {\n setOptionSelectedStatus(jqLite(option), shouldBeSelected);\n }\n\n });\n };\n\n // we have to do it on each watch since ngModel watches reference, but\n // we need to work of an array, so we need to see if anything was inserted/removed\n var lastView, lastViewRef = NaN;\n scope.$watch(function selectMultipleWatch() {\n if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {\n lastView = shallowCopy(ngModelCtrl.$viewValue);\n ngModelCtrl.$render();\n }\n lastViewRef = ngModelCtrl.$viewValue;\n });\n\n // If we are a multiple select then value is now a collection\n // so the meaning of $isEmpty changes\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n\n }\n }\n\n function selectPostLink(scope, element, attrs, ctrls) {\n // if ngModel is not defined, we don't need to do anything\n var ngModelCtrl = ctrls[1];\n if (!ngModelCtrl) return;\n\n var selectCtrl = ctrls[0];\n\n // We delegate rendering to the `writeValue` method, which can be changed\n // if the select can have multiple selected values or if the options are being\n // generated by `ngOptions`.\n // This must be done in the postLink fn to prevent $render to be called before\n // all nodes have been linked correctly.\n ngModelCtrl.$render = function() {\n selectCtrl.writeValue(ngModelCtrl.$viewValue);\n };\n }\n};\n\n\n// The option directive is purely designed to communicate the existence (or lack of)\n// of dynamically created (and destroyed) option elements to their containing select\n// directive via its controller.\nvar optionDirective = ['$interpolate', function($interpolate) {\n return {\n restrict: 'E',\n priority: 100,\n compile: function(element, attr) {\n var interpolateValueFn, interpolateTextFn;\n\n if (isDefined(attr.ngValue)) {\n // Will be handled by registerOption\n } else if (isDefined(attr.value)) {\n // If the value attribute is defined, check if it contains an interpolation\n interpolateValueFn = $interpolate(attr.value, true);\n } else {\n // If the value attribute is not defined then we fall back to the\n // text content of the option element, which may be interpolated\n interpolateTextFn = $interpolate(element.text(), true);\n if (!interpolateTextFn) {\n attr.$set('value', element.text());\n }\n }\n\n return function(scope, element, attr) {\n // This is an optimization over using ^^ since we don't want to have to search\n // all the way to the root of the DOM for every single option element\n var selectCtrlName = '$selectController',\n parent = element.parent(),\n selectCtrl = parent.data(selectCtrlName) ||\n parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n if (selectCtrl) {\n selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);\n }\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRequired\n * @restrict A\n *\n * @param {expression} ngRequired AngularJS expression. If it evaluates to `true`, it sets the\n * `required` attribute to the element and adds the `required`\n * {@link ngModel.NgModelController#$validators `validator`}.\n *\n * @description\n *\n * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be\n * applied to custom controls.\n *\n * The directive sets the `required` attribute on the element if the AngularJS expression inside\n * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we\n * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide}\n * for more info.\n *\n * The validator will set the `required` error key to true if the `required` attribute is set and\n * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the\n * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the\n * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing\n * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based.\n *\n * @example\n * <example name=\"ngRequiredDirective\" module=\"ngRequiredExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngRequiredExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.required = true;\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"required\">Toggle required: </label>\n * <input type=\"checkbox\" ng-model=\"required\" id=\"required\" />\n * <br>\n * <label for=\"input\">This input must be filled if `required` is true: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-required=\"required\" /><br>\n * <hr>\n * required error set? = <code>{{form.input.$error.required}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var required = element(by.binding('form.input.$error.required'));\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should set the required error', function() {\n expect(required.getText()).toContain('true');\n\n input.sendKeys('123');\n expect(required.getText()).not.toContain('true');\n expect(model.getText()).toContain('123');\n });\n * </file>\n * </example>\n */\nvar requiredDirective = ['$parse', function($parse) {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n // For boolean attributes like required, presence means true\n var value = attr.hasOwnProperty('required') || $parse(attr.ngRequired)(scope);\n\n if (!attr.ngRequired) {\n // force truthy in case we are on non input element\n // (input elements do this automatically for boolean attributes like required)\n attr.required = true;\n }\n\n ctrl.$validators.required = function(modelValue, viewValue) {\n return !value || !ctrl.$isEmpty(viewValue);\n };\n\n attr.$observe('required', function(newVal) {\n\n if (value !== newVal) {\n value = newVal;\n ctrl.$validate();\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngPattern\n * @restrict A\n *\n * @param {expression|RegExp} ngPattern AngularJS expression that must evaluate to a `RegExp` or a `String`\n * parsable into a `RegExp`, or a `RegExp` literal. See above for\n * more details.\n *\n * @description\n *\n * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * does not match a RegExp which is obtained from the `ngPattern` attribute value:\n * - the value is an AngularJS expression:\n * - If the expression evaluates to a RegExp object, then this is used directly.\n * - If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it\n * in `^` and `$` characters. For instance, `\"abc\"` will be converted to `new RegExp('^abc$')`.\n * - If the value is a RegExp literal, e.g. `ngPattern=\"/^\\d+$/\"`, it is used directly.\n *\n * <div class=\"alert alert-info\">\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * </div>\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `pattern` attribute is used, with two\n * differences:\n * <ol>\n * <li>\n * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is\n * not available.\n * </li>\n * <li>\n * The `ngPattern` attribute must be an expression, while the `pattern` value must be\n * interpolated.\n * </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngPatternDirective\" module=\"ngPatternExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngPatternExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.regex = '\\\\d+';\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"regex\">Set a pattern (regex string): </label>\n * <input type=\"text\" ng-model=\"regex\" id=\"regex\" />\n * <br>\n * <label for=\"input\">This input is restricted by the current pattern: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-pattern=\"regex\" /><br>\n * <hr>\n * input valid? = <code>{{form.input.$valid}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default pattern', function() {\n input.sendKeys('aaa');\n expect(model.getText()).not.toContain('aaa');\n\n input.clear().then(function() {\n input.sendKeys('123');\n expect(model.getText()).toContain('123');\n });\n });\n * </file>\n * </example>\n */\nvar patternDirective = ['$parse', function($parse) {\n return {\n restrict: 'A',\n require: '?ngModel',\n compile: function(tElm, tAttr) {\n var patternExp;\n var parseFn;\n\n if (tAttr.ngPattern) {\n patternExp = tAttr.ngPattern;\n\n // ngPattern might be a scope expression, or an inlined regex, which is not parsable.\n // We get value of the attribute here, so we can compare the old and the new value\n // in the observer to avoid unnecessary validations\n if (tAttr.ngPattern.charAt(0) === '/' && REGEX_STRING_REGEXP.test(tAttr.ngPattern)) {\n parseFn = function() { return tAttr.ngPattern; };\n } else {\n parseFn = $parse(tAttr.ngPattern);\n }\n }\n\n return function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var attrVal = attr.pattern;\n\n if (attr.ngPattern) {\n attrVal = parseFn(scope);\n } else {\n patternExp = attr.pattern;\n }\n\n var regexp = parsePatternAttr(attrVal, patternExp, elm);\n\n attr.$observe('pattern', function(newVal) {\n var oldRegexp = regexp;\n\n regexp = parsePatternAttr(newVal, patternExp, elm);\n\n if ((oldRegexp && oldRegexp.toString()) !== (regexp && regexp.toString())) {\n ctrl.$validate();\n }\n });\n\n ctrl.$validators.pattern = function(modelValue, viewValue) {\n // HTML5 pattern constraint validates the input value, so we validate the viewValue\n return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);\n };\n };\n }\n\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngMaxlength\n * @restrict A\n *\n * @param {expression} ngMaxlength AngularJS expression that must evaluate to a `Number` or `String`\n * parsable into a `Number`. Used as value for the `maxlength`\n * {@link ngModel.NgModelController#$validators validator}.\n *\n * @description\n *\n * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is longer than the integer obtained by evaluating the AngularJS expression given in the\n * `ngMaxlength` attribute value.\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two\n * differences:\n * <ol>\n * <li>\n * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint\n * validation is not available.\n * </li>\n * <li>\n * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be\n * interpolated.\n * </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngMaxlengthDirective\" module=\"ngMaxlengthExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngMaxlengthExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.maxlength = 5;\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"maxlength\">Set a maxlength: </label>\n * <input type=\"number\" ng-model=\"maxlength\" id=\"maxlength\" />\n * <br>\n * <label for=\"input\">This input is restricted by the current maxlength: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-maxlength=\"maxlength\" /><br>\n * <hr>\n * input valid? = <code>{{form.input.$valid}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default maxlength', function() {\n input.sendKeys('abcdef');\n expect(model.getText()).not.toContain('abcdef');\n\n input.clear().then(function() {\n input.sendKeys('abcde');\n expect(model.getText()).toContain('abcde');\n });\n });\n * </file>\n * </example>\n */\nvar maxlengthDirective = ['$parse', function($parse) {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = attr.maxlength || $parse(attr.ngMaxlength)(scope);\n var maxlengthParsed = parseLength(maxlength);\n\n attr.$observe('maxlength', function(value) {\n if (maxlength !== value) {\n maxlengthParsed = parseLength(value);\n maxlength = value;\n ctrl.$validate();\n }\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return (maxlengthParsed < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlengthParsed);\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngMinlength\n * @restrict A\n *\n * @param {expression} ngMinlength AngularJS expression that must evaluate to a `Number` or `String`\n * parsable into a `Number`. Used as value for the `minlength`\n * {@link ngModel.NgModelController#$validators validator}.\n *\n * @description\n *\n * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is shorter than the integer obtained by evaluating the AngularJS expression given in the\n * `ngMinlength` attribute value.\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `minlength` attribute is used, with two\n * differences:\n * <ol>\n * <li>\n * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint\n * validation is not available.\n * </li>\n * <li>\n * The `ngMinlength` value must be an expression, while the `minlength` value must be\n * interpolated.\n * </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngMinlengthDirective\" module=\"ngMinlengthExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('ngMinlengthExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.minlength = 3;\n * }]);\n * </script>\n * <div ng-controller=\"ExampleController\">\n * <form name=\"form\">\n * <label for=\"minlength\">Set a minlength: </label>\n * <input type=\"number\" ng-model=\"minlength\" id=\"minlength\" />\n * <br>\n * <label for=\"input\">This input is restricted by the current minlength: </label>\n * <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-minlength=\"minlength\" /><br>\n * <hr>\n * input valid? = <code>{{form.input.$valid}}</code><br>\n * model = <code>{{model}}</code>\n * </form>\n * </div>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default minlength', function() {\n input.sendKeys('ab');\n expect(model.getText()).not.toContain('ab');\n\n input.sendKeys('abc');\n expect(model.getText()).toContain('abc');\n });\n * </file>\n * </example>\n */\nvar minlengthDirective = ['$parse', function($parse) {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = attr.minlength || $parse(attr.ngMinlength)(scope);\n var minlengthParsed = parseLength(minlength) || -1;\n\n attr.$observe('minlength', function(value) {\n if (minlength !== value) {\n minlengthParsed = parseLength(value) || -1;\n minlength = value;\n ctrl.$validate();\n }\n\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || viewValue.length >= minlengthParsed;\n };\n }\n };\n}];\n\n\nfunction parsePatternAttr(regex, patternExp, elm) {\n if (!regex) return undefined;\n\n if (isString(regex)) {\n regex = new RegExp('^' + regex + '$');\n }\n\n if (!regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n return regex;\n}\n\nfunction parseLength(val) {\n var intVal = toInt(val);\n return isNumberNaN(intVal) ? -1 : intVal;\n}\n\nif (window.angular.bootstrap) {\n // AngularJS is already loaded, so we can return here...\n if (window.console) {\n console.log('WARNING: Tried to load AngularJS more than once.');\n }\n return;\n}\n\n// try to bind to jquery now so that one can write jqLite(fn)\n// but we will rebind on bootstrap again.\nbindJQuery();\n\npublishExternalAPI(angular);\n\nangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\nvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\nfunction getDecimals(n) {\n n = n + '';\n var i = n.indexOf('.');\n return (i == -1) ? 0 : n.length - i - 1;\n}\n\nfunction getVF(n, opt_precision) {\n var v = opt_precision;\n\n if (undefined === v) {\n v = Math.min(getDecimals(n), 3);\n }\n\n var base = Math.pow(10, v);\n var f = ((n * base) | 0) % base;\n return {v: v, f: f};\n}\n\n$provide.value(\"$locale\", {\n \"DATETIME_FORMATS\": {\n \"AMPMS\": [\n \"AM\",\n \"PM\"\n ],\n \"DAY\": [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n ],\n \"ERANAMES\": [\n \"Before Christ\",\n \"Anno Domini\"\n ],\n \"ERAS\": [\n \"BC\",\n \"AD\"\n ],\n \"FIRSTDAYOFWEEK\": 6,\n \"MONTH\": [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ],\n \"SHORTDAY\": [\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\"\n ],\n \"SHORTMONTH\": [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n ],\n \"STANDALONEMONTH\": [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ],\n \"WEEKENDRANGE\": [\n 5,\n 6\n ],\n \"fullDate\": \"EEEE, MMMM d, y\",\n \"longDate\": \"MMMM d, y\",\n \"medium\": \"MMM d, y h:mm:ss a\",\n \"mediumDate\": \"MMM d, y\",\n \"mediumTime\": \"h:mm:ss a\",\n \"short\": \"M/d/yy h:mm a\",\n \"shortDate\": \"M/d/yy\",\n \"shortTime\": \"h:mm a\"\n },\n \"NUMBER_FORMATS\": {\n \"CURRENCY_SYM\": \"$\",\n \"DECIMAL_SEP\": \".\",\n \"GROUP_SEP\": \",\",\n \"PATTERNS\": [\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 3,\n \"minFrac\": 0,\n \"minInt\": 1,\n \"negPre\": \"-\",\n \"negSuf\": \"\",\n \"posPre\": \"\",\n \"posSuf\": \"\"\n },\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 2,\n \"minFrac\": 2,\n \"minInt\": 1,\n \"negPre\": \"-\\u00a4\",\n \"negSuf\": \"\",\n \"posPre\": \"\\u00a4\",\n \"posSuf\": \"\"\n }\n ]\n },\n \"id\": \"en-us\",\n \"localeID\": \"en_US\",\n \"pluralCat\": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}\n});\n}]);\n\n jqLite(function() {\n angularInit(window.document, bootstrap);\n });\n\n})(window);\n\n!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element('<style>').text('@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));","require('./angular');\nmodule.exports = angular;\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || defaults.transitional;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","module.exports = {\n \"version\": \"0.23.0\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (argument) {\n if (typeof argument === 'object' || isCallable(argument)) return argument;\n throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","module.exports = function (it, Constructor, name) {\n if (it instanceof Constructor) return it;\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = lengthOfArrayLike(O);\n result = IS_CONSTRUCTOR ? new this(length) : Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = lengthOfArrayLike(self);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","var aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aCallable(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = lengthOfArrayLike(O);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","var path = require('../internals/path');\nvar hasOwn = require('../internals/has-own-property');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var userAgent = require('../internals/engine-user-agent');\n\nvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\nmodule.exports = !!firefox && +firefox[1];\n","module.exports = typeof window == 'object';\n","var UA = require('../internals/engine-user-agent');\n\nmodule.exports = /MSIE|Trident/.test(UA);\n","var userAgent = require('../internals/engine-user-agent');\nvar global = require('../internals/global');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var userAgent = require('../internals/engine-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n redefine(String.prototype, KEY, methods[0]);\n redefine(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element, elementLen;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n elementLen = lengthOfArrayLike(element);\n targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","var aCallable = require('../internals/a-callable');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aCallable(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var classof = require('../internals/classof');\nvar getMethod = require('../internals/get-method');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return getMethod(it, ITERATOR)\n || getMethod(it, '@@iterator')\n || Iterators[classof(it)];\n};\n","var aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(iteratorMethod.call(argument));\n throw TypeError(String(argument) + ' is not iterable');\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","module.exports = {};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) == 'Array';\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(Object, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : isCallable(it);\n};\n","module.exports = false;\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar bind = require('../internals/function-bind-context');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw TypeError(String(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = innerResult.call(iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n redefine(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","module.exports = {};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar Symbol = global.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar hex = /^[+-]?0x/i;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22\n // MS Edge 18- broken with boxed symbols\n || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(toString(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof Object ? ObjectPrototype : null;\n};\n","var hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (isCallable(exec)) {\n var result = exec.call(R, S);\n if (result !== null) anObject(result);\n return result;\n }\n if (classof(R) === 'RegExp') return regexpExec.call(R, S);\n throw TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n // eslint-disable-next-line max-statements -- TODO\n patchedExec = function exec(string) {\n var re = this;\n var state = getInternalState(re);\n var str = toString(string);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = patchedExec.call(raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = str.slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nexports.UNSUPPORTED_Y = fails(function () {\n var re = $RegExp('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = $RegExp('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('.', 's');\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?<a>b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$<a>c') !== 'bc';\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (key, value) {\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !hasOwn(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.18.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toIntegerOrInfinity(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = toString(requireObjectCoercible($this));\n var intMaxLength = toLength(maxLength);\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : toString(fillString);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\nmodule.exports = function repeat(count) {\n var str = toString(requireObjectCoercible(this));\n var result = '';\n var n = toIntegerOrInfinity(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","var PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]()\n || non[METHOD_NAME]() !== non\n || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n });\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var argumentsLength = arguments.length;\n var i = 1;\n while (argumentsLength > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- safe\n return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var classof = require('../internals/classof');\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = lengthOfArrayLike(E);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = lengthOfArrayLike(O);\n var A;\n aCallable(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (isConstructor(Constructor) && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);\n\n var items = [];\n var arrayLength = lengthOfArrayLike(array);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) items.push(array[index]);\n }\n\n items = internalSort(items, getSortCompare(comparefn));\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","var $ = require('../internals/export');\nvar $parseInt = require('../internals/number-parse-int');\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != $parseInt }, {\n parseInt: $parseInt\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar redefine = require('../internals/redefine');\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = isCallable(onFinally);\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromise)) {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromise.prototype['finally'] !== method) {\n redefine(NativePromise.prototype, 'finally', method, { unsafe: true });\n }\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aCallable(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = $toString(R.source);\n var rf = R.flags;\n var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n return ''.replace(re, '$<a>') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);\n return replacer\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(toString(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (string, replaceValue) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (\n typeof replaceValue === 'string' &&\n replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 &&\n replaceValue.indexOf('$<') === -1\n ) {\n var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n if (res.done) return res.value;\n }\n\n var functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = toString(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = toString(result[0]);\n var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = toString(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? splitter.call(separator, O, limit)\n : internalSplit.call(toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","// `Symbol.prototype.description` getter\n// https://tc39.es/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var nativeSymbol = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';\n var desc = nativeSymbol ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar fails = require('../internals/fails');\nvar hasOwn = require('../internals/has-own-property');\nvar isArray = require('../internals/is-array');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar $toString = require('../internals/to-string');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPropertyKey(P);\n anObject(Attributes);\n if (hasOwn(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPropertyKey(V);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]\n ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPropertyKey(P);\n if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.es/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = $toString(key);\n if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.es/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.es/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.es/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.es/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (isCallable($replacer)) value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n var valueOf = $Symbol[PROTOTYPE].valueOf;\n redefine($Symbol[PROTOTYPE], TO_PRIMITIVE, function () {\n return valueOf.apply(this, arguments);\n });\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n if (DOMIterables[COLLECTION_NAME]) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n }\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",$=\"Invalid Date\",l=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},D=\"en\",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if(\"string\"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i}return!n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+\"Hours\",0);case u:return l(g+\"Minutes\",1);case s:return l(g+\"Seconds\",2);case i:return l(g+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),$=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));","!function(e,a){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=a(require(\"dayjs\")):\"function\"==typeof define&&define.amd?define([\"dayjs\"],a):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_gb=a(e.dayjs)}(this,(function(e){\"use strict\";function a(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var t=a(e),_={name:\"en-gb\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),weekdaysShort:\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),weekdaysMin:\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),weekStart:1,yearStart:4,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},ordinal:function(e){var a=[\"th\",\"st\",\"nd\",\"rd\"],t=e%100;return\"[\"+e+(a[(t-20)%10]||a[t]||a[0])+\"]\"}};return t.default.locale(_,null,!0),_}));","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_customParseFormat=e()}(this,(function(){\"use strict\";var t={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},e=/(\\[[^[]*\\])|([-:/.()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^\\s\\d-_:/()]+/,o={},s=function(t){return(t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if(\"Z\"===t)return 0;var e=t.match(/([+-]|\\d\\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:\"+\"===e[0]?-n:n}(t)}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?\"pm\":\"PM\");return n},d={A:[i,function(t){this.afternoon=h(t,!1)}],a:[i,function(t){this.afternoon=h(t,!0)}],S:[/\\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\\d{3}/,function(t){this.milliseconds=+t}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\\[|\\]/g,\"\")===t&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(t){var e=u(\"months\"),n=(u(\"monthsShort\")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(t){var e=u(\"months\").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(t){this.year=s(t)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\\[|\\]$/g,\"\")}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if(\"string\"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,\"\")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if(\"string\"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if([\"x\",\"X\"].indexOf(e)>-1)return new Date((\"X\"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date(\"\")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(\"\"))}else i.call(this,t)}}}));","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){\"use strict\";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r=\"(\"===(f=f||\"()\")[0],u=\")\"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t);return function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",o=t+\"|\"+i,r=e[o];return r||(r=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[o]=r),r}(n,i).formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,v=r[0]+\"-\"+r[1]+\"-\"+r[2]+\" \"+l+\":\"+r[4]+\":\"+r[5]+\":000\",h=+e;return(o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString(\"en-US\",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set(\"millisecond\",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,\"minute\")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if(\"string\"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){\"use strict\";var t=\"minute\",i=/[+-]\\d\\d(?::?\\d\\d)?/g,e=/([+-]|\\d\\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else r.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if(\"string\"==typeof s&&null===(s=function(t){void 0===t&&(t=\"\");var s=t.match(i);if(!s)return null;var f=(\"\"+s[0]).match(e)||[\"-\",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:\"+\"===n?u:-u}(s)))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?\"YYYY-MM-DDTHH:mm:ss[Z]\":\"\");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return\"s\"===t&&this.$offset?n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}}));","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","\"use strict\";\n\nmodule.exports = function (url, options) {\n if (!options) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n if (!url) {\n return url;\n } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n url = String(url.__esModule ? url.default : url);\n\n if (options.hash) {\n // eslint-disable-next-line no-param-reassign\n url += options.hash;\n }\n\n if (options.maybeNeedQuotes && /[\\t\\n\\f\\r \"'=<>`]/.test(url)) {\n return \"\\\"\".concat(url, \"\\\"\");\n }\n\n return url;\n};","function e(e){this.message=e}e.prototype=new Error,e.prototype.name=\"InvalidCharacterError\";var r=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,\"\");if(t.length%4==1)throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,a=0,i=0,c=\"\";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return c};function t(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=\"0\"+t),\"%\"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if(\"string\"!=typeof e)throw new n(\"Invalid token specified\");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(\".\")[o]))}catch(e){throw new n(\"Invalid token specified: \"+e.message)}}n.prototype=new Error,n.prototype.name=\"InvalidTokenError\";export default o;export{n as InvalidTokenError};\n//# sourceMappingURL=jwt-decode.esm.js.map\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nangular.module('pusher-angular', [])\n\n.factory('$pusher', ['$rootScope', '$channel', '$connection',\n function ($rootScope, $channel, $connection) {\n\n function PusherAngular (pusherClient) {\n if (!(this instanceof PusherAngular)) {\n return new PusherAngular(pusherClient);\n }\n\n this._assertValidClient(pusherClient);\n this.client = pusherClient;\n this.connection = $connection(pusherClient.connection, pusherClient);\n this.channels = {};\n }\n\n PusherAngular.prototype = {\n /**\n * Subscribe the client to the specified channelName and returns the channel object.\n * {@link https://pusher.com/docs/client_api_guide/client_public_channels#subscribe}\n *\n * @param {String} channelName name of the channel\n * @returns {Object} channel object\n */\n subscribe: function (channelName) {\n var channel = this.client.channel(channelName);\n if(channel === undefined) {\n channel = this.client.subscribe(channelName);\n }\n channel = $channel(channel, this);\n this.channels[channelName] = channel;\n return channel;\n },\n\n /**\n * Unsubscribes the client from the specified channel\n * {@link https://pusher.com/docs/client_api_guide/client_public_channels#unsubscribe}\n *\n * @param {String} channelName name of the channel\n */\n unsubscribe: function (channelName) {\n if (this.client.channel(channelName)) {\n this.client.unsubscribe(channelName);\n if (this.channels[channelName]) { delete this.channels[channelName]; }\n }\n },\n\n /**\n * Binds to global events on the pusher client. You can attach behaviour to these events\n * regardless of the channel the event is broadcast to.\n *\n * @param {String} eventName name of the event you want to bind to\n * @param {Function|undefined} callback callback that you want called upon the event occurring\n * @param {Object} context used as the `this` value when calling a handler\n * @param {boolean} [invokeDigest=true] If set to `false` skips invoking $digest\n * @returns {Function} the decorated version of the callback provided\n */\n bind: function (eventName, callback, context, invokeDigest) {\n var skipDigest = (angular.isDefined(invokeDigest) && !invokeDigest),\n decoratedCallback = function (data) {\n callback(data);\n if (!skipDigest) $rootScope.$digest();\n };\n this.client.bind(eventName, decoratedCallback, context);\n return decoratedCallback;\n },\n\n /**\n * Binds to all of the global client messages.\n *\n * @param {Function|undefined} callback callback that you want called upon a message being received\n * @param {boolean} [invokeDigest=true] If set to `false` skips invoking $digest\n */\n bind_global: function (callback, invokeDigest) {\n var skipDigest = (angular.isDefined(invokeDigest) && !invokeDigest);\n this.client.bind_global(function (eventName, data) {\n callback(eventName, data);\n if (!skipDigest) $rootScope.$digest();\n });\n },\n\n /**\n * Unbinds from global events on the pusher client.\n *\n * @param {String} eventName name of the event you want to bind from\n * @param {Function|undefined} decoratedCallback the decorated version of the callback that you want to unbind\n * @param {Object} context used as the `this` value when calling a handler\n */\n unbind: function (eventName, decoratedCallback, context) {\n this.client.unbind(eventName, decoratedCallback, context);\n },\n\n /**\n * Disconnects the pusher client.\n * {@link http://pusher.com/docs/client_api_guide/client_connect#disconnecting}\n */\n disconnect: function () {\n this.client.disconnect();\n },\n\n /**\n * Returns a pusher channel object.\n * {@link https://pusher.com/docs/client_api_guide/client_channels#access}\n *\n * @param {String} channelName name of the channel\n * @returns {Array} channel object\n */\n channel: function (channelName) {\n return this.channels[channelName];\n },\n\n /**\n * Returns a an array of the channels that the client is subscribed to.\n * {@link https://pusher.com/docs/client_api_guide/client_channels#access}\n *\n * @returns {Array} array of subscribed channels\n */\n allChannels: function () {\n return this.channels;\n },\n\n /**\n * Asserts that the $pusher object is being initialised with valid pusherClient.\n * Throws an error if pusherClient is invalid.\n *\n * @param {Object} pusherClient members object from base pusher channel object\n */\n _assertValidClient: function (pusherClient) {\n if (!angular.isObject(pusherClient) ||\n !angular.isObject(pusherClient.connection) ||\n typeof(pusherClient.channel) !== 'function') {\n throw new Error('Invalid Pusher client object');\n }\n }\n };\n\n return PusherAngular;\n }\n])\n\n.factory('$channel', ['$rootScope', '$members',\n function ($rootScope, $members) {\n\n function checkPresenceOrPrivateChannel (channelName) {\n if (channelName.indexOf('presence-') == -1 && channelName.indexOf('private-') == -1) {\n throw new Error('Presence or private channel required');\n }\n }\n\n function $channel (baseChannel, $pusherClient) {\n if (!(this instanceof $channel)) {\n return new $channel(baseChannel, $pusherClient);\n }\n\n this._assertValidChannel(baseChannel);\n this.baseChannel = baseChannel;\n this.client = $pusherClient;\n this.name = baseChannel.name;\n\n if (baseChannel.name.indexOf('presence') == -1) {\n this.members = function () { throw new Error('Members object only exists for presence channels'); }\n } else {\n this.members = $members(baseChannel.members, baseChannel);\n }\n }\n\n $channel.prototype = {\n /**\n * Binds to the given event name on the channel.\n *\n * @param {String} eventName name of the event you want to bind to\n * @param {Function|undefined} callback callback that you want called upon the event occurring\n * @param {Object} context used as the `this` value when calling a handler\n * @param {boolean} [invokeDigest=true] If set to `false` skips invoking $digest\n * @returns {Function} the decorated version of the callback provided\n */\n bind: function (eventName, callback, context, invokeDigest) {\n var skipDigest = (angular.isDefined(invokeDigest) && !invokeDigest),\n decoratedCallback = function (data) {\n callback(data);\n if (!skipDigest) $rootScope.$digest();\n };\n this.baseChannel.bind(eventName, decoratedCallback, context);\n return decoratedCallback;\n },\n\n /**\n * Unbinds from the given event name on the channel.\n *\n * @param {String} eventName name of the event you want to bind from\n * @param {Function|undefined} decoratedCallback the decorated version of the callback that you want to unbind\n * @param {Object} context used as the `this` value when calling a handler\n */\n unbind: function (eventName, decoratedCallback, context) {\n this.baseChannel.unbind(eventName, decoratedCallback, context);\n },\n\n /**\n * Binds to all of the channel events.\n *\n * @param {Function|undefined} callback callback that you want called upon the event occurring\n * @param {boolean} [invokeDigest=true] If set to `false` skips invoking $digest\n */\n bind_global: function (callback, invokeDigest) {\n var skipDigest = (angular.isDefined(invokeDigest) && !invokeDigest);\n this.baseChannel.bind_global(function (eventName, data) {\n callback(eventName, data);\n if (!skipDigest) $rootScope.$digest();\n });\n },\n\n /**\n * Triggers a client event.\n * {@link https://pusher.com/docs/client_api_guide/client_events#trigger-events}\n *\n * @param {String} channelName name of the channel\n * @param {String} eventName name of the event\n * @param {Object} obj object that you wish to pass along with your client event\n * @returns {}\n */\n trigger: function (eventName, obj) {\n checkPresenceOrPrivateChannel(this.name);\n if (eventName.indexOf('client-') == -1) { throw new Error('Event name requires \\'client-\\' prefix'); }\n return this.baseChannel.trigger(eventName, obj);\n },\n\n /**\n * Asserts that the $channel object is being initialised with valid baseChannel.\n * Throws an error if baseChannel is invalid.\n *\n * @param {Object} baseChannel channel object from base pusher channel object\n */\n _assertValidChannel: function (baseChannel) {\n if (!angular.isObject(baseChannel) ||\n typeof(baseChannel.name) !== 'string') {\n throw new Error('Invalid Pusher channel object');\n }\n }\n };\n\n return $channel;\n }\n])\n\n.factory('$members', ['$rootScope',\n function ($rootScope) {\n\n function $members (baseMembers, baseChannel) {\n if (!(this instanceof $members)) {\n return new $members(baseMembers, baseChannel);\n }\n var self = this;\n\n this._assertValidMembers(baseMembers);\n this.baseMembers = baseMembers;\n this.baseChannel = baseChannel;\n this.me = {};\n this.count = 0;\n this.members = {};\n\n baseChannel.bind('pusher:subscription_succeeded', function (members) {\n self.me = members.me;\n self.count = members.count;\n self.members = members.members;\n $rootScope.$digest();\n });\n\n baseChannel.bind('pusher:member_added', function (member) {\n self.count++;\n if (member.info) {\n self.members[member.id.toString()] = member.info;\n } else {\n self.members[member.id.toString()] = null;\n }\n $rootScope.$digest();\n });\n\n baseChannel.bind('pusher:member_removed', function (member) {\n self.count--;\n delete self.members[member.id.toString()];\n $rootScope.$digest();\n });\n }\n\n $members.prototype = {\n /**\n * Returns member's info for given id. Resulting object containts two fields - id and info.\n *\n * @param {Number} id user's id\n * @return {Object} member's info or null\n */\n get: function (id) {\n return this.baseMembers.get(id);\n },\n\n /**\n * Calls back for each member in unspecified order.\n *\n * @param {Function} callback callback function\n */\n each: function (callback) {\n this.baseMembers.each(function (member) {\n callback(member);\n $rootScope.$digest();\n });\n },\n\n /**\n * Asserts that the $members object is being initialised with valid baseMembers.\n * Throws an error if baseMembers is invalid.\n *\n * @param {Object} baseMembers members object from base pusher channel object\n */\n _assertValidMembers: function (baseMembers) {\n if (!angular.isObject(baseMembers) ||\n typeof(baseMembers.me) !== 'object') {\n throw new Error('Invalid Pusher channel members object');\n }\n }\n };\n\n return $members;\n }\n])\n\n.factory('$connection', ['$rootScope',\n function ($rootScope) {\n\n function $connection (baseConnection, baseClient) {\n if (!(this instanceof $connection)) {\n return new $connection(baseConnection, baseClient);\n }\n\n this._assertValidConnection(baseConnection);\n this.baseConnection = baseConnection;\n this.baseClient = baseClient;\n }\n\n $connection.prototype = {\n /**\n * Binds to the given event name on the connection.\n *\n * @param {String} eventName name of the event you want to bind to\n * @param {Function|undefined} callback callback that you want called upon the event occurring\n * @param {Object} context used as the `this` value when calling a handler\n * @param {boolean} [invokeDigest=true] If set to `false` skips invoking $digest\n */\n bind: function (eventName, callback, context, invokeDigest) {\n var skipDigest = (angular.isDefined(invokeDigest) && !invokeDigest);\n this.baseConnection.bind(eventName, function (data) {\n callback(data);\n if (!skipDigest) $rootScope.$digest();\n }, context);\n },\n\n /**\n * Binds to all of the global connection events.\n *\n * @param {Function|undefined} callback callback that you want called upon the event occurring\n * @param {boolean} [invokeDigest=true] If set to `false` skips invoking $digest\n */\n bind_global: function (callback, invokeDigest) {\n var skipDigest = (angular.isDefined(invokeDigest) && !invokeDigest);\n this.baseConnection.bind_global(function (eventName, data) {\n callback(eventName, data);\n if (!skipDigest) $rootScope.$digest();\n });\n },\n\n /**\n * Asserts that the $connection object is being initialised with valid baseConnection.\n * Throws an error if baseConnection is invalid.\n *\n * @param {Object} baseConnection connection object from base pusher object\n */\n _assertValidConnection: function (baseConnection) {\n if (!angular.isObject(baseConnection)) {\n throw new Error('Invalid Pusher connection object');\n }\n }\n };\n\n return $connection;\n }\n]);\n","/*!\n * Pusher JavaScript Library v7.0.3\n * https://pusher.com/\n *\n * Copyright 2020, Pusher\n * Released under the MIT licence.\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Pusher\"] = factory();\n\telse\n\t\troot[\"Pusher\"] = factory();\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 2);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package base64 implements Base64 encoding and decoding.\n */\n// Invalid character used in decoding to indicate\n// that the character to decode is out of range of\n// alphabet and cannot be decoded.\nvar INVALID_BYTE = 256;\n/**\n * Implements standard Base64 encoding.\n *\n * Operates in constant time.\n */\nvar Coder = /** @class */ (function () {\n // TODO(dchest): methods to encode chunk-by-chunk.\n function Coder(_paddingCharacter) {\n if (_paddingCharacter === void 0) { _paddingCharacter = \"=\"; }\n this._paddingCharacter = _paddingCharacter;\n }\n Coder.prototype.encodedLength = function (length) {\n if (!this._paddingCharacter) {\n return (length * 8 + 5) / 6 | 0;\n }\n return (length + 2) / 3 * 4 | 0;\n };\n Coder.prototype.encode = function (data) {\n var out = \"\";\n var i = 0;\n for (; i < data.length - 2; i += 3) {\n var c = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);\n out += this._encodeByte((c >>> 3 * 6) & 63);\n out += this._encodeByte((c >>> 2 * 6) & 63);\n out += this._encodeByte((c >>> 1 * 6) & 63);\n out += this._encodeByte((c >>> 0 * 6) & 63);\n }\n var left = data.length - i;\n if (left > 0) {\n var c = (data[i] << 16) | (left === 2 ? data[i + 1] << 8 : 0);\n out += this._encodeByte((c >>> 3 * 6) & 63);\n out += this._encodeByte((c >>> 2 * 6) & 63);\n if (left === 2) {\n out += this._encodeByte((c >>> 1 * 6) & 63);\n }\n else {\n out += this._paddingCharacter || \"\";\n }\n out += this._paddingCharacter || \"\";\n }\n return out;\n };\n Coder.prototype.maxDecodedLength = function (length) {\n if (!this._paddingCharacter) {\n return (length * 6 + 7) / 8 | 0;\n }\n return length / 4 * 3 | 0;\n };\n Coder.prototype.decodedLength = function (s) {\n return this.maxDecodedLength(s.length - this._getPaddingLength(s));\n };\n Coder.prototype.decode = function (s) {\n if (s.length === 0) {\n return new Uint8Array(0);\n }\n var paddingLength = this._getPaddingLength(s);\n var length = s.length - paddingLength;\n var out = new Uint8Array(this.maxDecodedLength(length));\n var op = 0;\n var i = 0;\n var haveBad = 0;\n var v0 = 0, v1 = 0, v2 = 0, v3 = 0;\n for (; i < length - 4; i += 4) {\n v0 = this._decodeChar(s.charCodeAt(i + 0));\n v1 = this._decodeChar(s.charCodeAt(i + 1));\n v2 = this._decodeChar(s.charCodeAt(i + 2));\n v3 = this._decodeChar(s.charCodeAt(i + 3));\n out[op++] = (v0 << 2) | (v1 >>> 4);\n out[op++] = (v1 << 4) | (v2 >>> 2);\n out[op++] = (v2 << 6) | v3;\n haveBad |= v0 & INVALID_BYTE;\n haveBad |= v1 & INVALID_BYTE;\n haveBad |= v2 & INVALID_BYTE;\n haveBad |= v3 & INVALID_BYTE;\n }\n if (i < length - 1) {\n v0 = this._decodeChar(s.charCodeAt(i));\n v1 = this._decodeChar(s.charCodeAt(i + 1));\n out[op++] = (v0 << 2) | (v1 >>> 4);\n haveBad |= v0 & INVALID_BYTE;\n haveBad |= v1 & INVALID_BYTE;\n }\n if (i < length - 2) {\n v2 = this._decodeChar(s.charCodeAt(i + 2));\n out[op++] = (v1 << 4) | (v2 >>> 2);\n haveBad |= v2 & INVALID_BYTE;\n }\n if (i < length - 3) {\n v3 = this._decodeChar(s.charCodeAt(i + 3));\n out[op++] = (v2 << 6) | v3;\n haveBad |= v3 & INVALID_BYTE;\n }\n if (haveBad !== 0) {\n throw new Error(\"Base64Coder: incorrect characters for decoding\");\n }\n return out;\n };\n // Standard encoding have the following encoded/decoded ranges,\n // which we need to convert between.\n //\n // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 + /\n // Index: 0 - 25 26 - 51 52 - 61 62 63\n // ASCII: 65 - 90 97 - 122 48 - 57 43 47\n //\n // Encode 6 bits in b into a new character.\n Coder.prototype._encodeByte = function (b) {\n // Encoding uses constant time operations as follows:\n //\n // 1. Define comparison of A with B using (A - B) >>> 8:\n // if A > B, then result is positive integer\n // if A <= B, then result is 0\n //\n // 2. Define selection of C or 0 using bitwise AND: X & C:\n // if X == 0, then result is 0\n // if X != 0, then result is C\n //\n // 3. Start with the smallest comparison (b >= 0), which is always\n // true, so set the result to the starting ASCII value (65).\n //\n // 4. Continue comparing b to higher ASCII values, and selecting\n // zero if comparison isn't true, otherwise selecting a value\n // to add to result, which:\n //\n // a) undoes the previous addition\n // b) provides new value to add\n //\n var result = b;\n // b >= 0\n result += 65;\n // b > 25\n result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n // b > 51\n result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n // b > 61\n result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 43);\n // b > 62\n result += ((62 - b) >>> 8) & ((62 - 43) - 63 + 47);\n return String.fromCharCode(result);\n };\n // Decode a character code into a byte.\n // Must return 256 if character is out of alphabet range.\n Coder.prototype._decodeChar = function (c) {\n // Decoding works similar to encoding: using the same comparison\n // function, but now it works on ranges: result is always incremented\n // by value, but this value becomes zero if the range is not\n // satisfied.\n //\n // Decoding starts with invalid value, 256, which is then\n // subtracted when the range is satisfied. If none of the ranges\n // apply, the function returns 256, which is then checked by\n // the caller to throw error.\n var result = INVALID_BYTE; // start with invalid character\n // c == 43 (c > 42 and c < 44)\n result += (((42 - c) & (c - 44)) >>> 8) & (-INVALID_BYTE + c - 43 + 62);\n // c == 47 (c > 46 and c < 48)\n result += (((46 - c) & (c - 48)) >>> 8) & (-INVALID_BYTE + c - 47 + 63);\n // c > 47 and c < 58\n result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n // c > 64 and c < 91\n result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n // c > 96 and c < 123\n result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n return result;\n };\n Coder.prototype._getPaddingLength = function (s) {\n var paddingLength = 0;\n if (this._paddingCharacter) {\n for (var i = s.length - 1; i >= 0; i--) {\n if (s[i] !== this._paddingCharacter) {\n break;\n }\n paddingLength++;\n }\n if (s.length < 4 || paddingLength > 2) {\n throw new Error(\"Base64Coder: incorrect padding\");\n }\n }\n return paddingLength;\n };\n return Coder;\n}());\nexports.Coder = Coder;\nvar stdCoder = new Coder();\nfunction encode(data) {\n return stdCoder.encode(data);\n}\nexports.encode = encode;\nfunction decode(s) {\n return stdCoder.decode(s);\n}\nexports.decode = decode;\n/**\n * Implements URL-safe Base64 encoding.\n * (Same as Base64, but '+' is replaced with '-', and '/' with '_').\n *\n * Operates in constant time.\n */\nvar URLSafeCoder = /** @class */ (function (_super) {\n __extends(URLSafeCoder, _super);\n function URLSafeCoder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // URL-safe encoding have the following encoded/decoded ranges:\n //\n // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 - _\n // Index: 0 - 25 26 - 51 52 - 61 62 63\n // ASCII: 65 - 90 97 - 122 48 - 57 45 95\n //\n URLSafeCoder.prototype._encodeByte = function (b) {\n var result = b;\n // b >= 0\n result += 65;\n // b > 25\n result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n // b > 51\n result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n // b > 61\n result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 45);\n // b > 62\n result += ((62 - b) >>> 8) & ((62 - 45) - 63 + 95);\n return String.fromCharCode(result);\n };\n URLSafeCoder.prototype._decodeChar = function (c) {\n var result = INVALID_BYTE;\n // c == 45 (c > 44 and c < 46)\n result += (((44 - c) & (c - 46)) >>> 8) & (-INVALID_BYTE + c - 45 + 62);\n // c == 95 (c > 94 and c < 96)\n result += (((94 - c) & (c - 96)) >>> 8) & (-INVALID_BYTE + c - 95 + 63);\n // c > 47 and c < 58\n result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n // c > 64 and c < 91\n result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n // c > 96 and c < 123\n result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n return result;\n };\n return URLSafeCoder;\n}(Coder));\nexports.URLSafeCoder = URLSafeCoder;\nvar urlSafeCoder = new URLSafeCoder();\nfunction encodeURLSafe(data) {\n return urlSafeCoder.encode(data);\n}\nexports.encodeURLSafe = encodeURLSafe;\nfunction decodeURLSafe(s) {\n return urlSafeCoder.decode(s);\n}\nexports.decodeURLSafe = decodeURLSafe;\nexports.encodedLength = function (length) {\n return stdCoder.encodedLength(length);\n};\nexports.maxDecodedLength = function (length) {\n return stdCoder.maxDecodedLength(length);\n};\nexports.decodedLength = function (s) {\n return stdCoder.decodedLength(s);\n};\n//# sourceMappingURL=base64.js.map\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package utf8 implements UTF-8 encoding and decoding.\n */\nvar INVALID_UTF16 = \"utf8: invalid string\";\nvar INVALID_UTF8 = \"utf8: invalid source encoding\";\n/**\n * Encodes the given string into UTF-8 byte array.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encode(s) {\n // Calculate result length and allocate output array.\n // encodedLength() also validates string and throws errors,\n // so we don't need repeat validation here.\n var arr = new Uint8Array(encodedLength(s));\n var pos = 0;\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n if (c < 0x80) {\n arr[pos++] = c;\n }\n else if (c < 0x800) {\n arr[pos++] = 0xc0 | c >> 6;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n else if (c < 0xd800) {\n arr[pos++] = 0xe0 | c >> 12;\n arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n else {\n i++; // get one more character\n c = (c & 0x3ff) << 10;\n c |= s.charCodeAt(i) & 0x3ff;\n c += 0x10000;\n arr[pos++] = 0xf0 | c >> 18;\n arr[pos++] = 0x80 | (c >> 12) & 0x3f;\n arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n }\n return arr;\n}\nexports.encode = encode;\n/**\n * Returns the number of bytes required to encode the given string into UTF-8.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encodedLength(s) {\n var result = 0;\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n if (c < 0x80) {\n result += 1;\n }\n else if (c < 0x800) {\n result += 2;\n }\n else if (c < 0xd800) {\n result += 3;\n }\n else if (c <= 0xdfff) {\n if (i >= s.length - 1) {\n throw new Error(INVALID_UTF16);\n }\n i++; // \"eat\" next character\n result += 4;\n }\n else {\n throw new Error(INVALID_UTF16);\n }\n }\n return result;\n}\nexports.encodedLength = encodedLength;\n/**\n * Decodes the given byte array from UTF-8 into a string.\n * Throws if encoding is invalid.\n */\nfunction decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}\nexports.decode = decode;\n//# sourceMappingURL=utf8.js.map\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// required so we don't have to do require('pusher').default etc.\nmodule.exports = __webpack_require__(3).default;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/script_receiver_factory.ts\nvar ScriptReceiverFactory = (function () {\n function ScriptReceiverFactory(prefix, name) {\n this.lastId = 0;\n this.prefix = prefix;\n this.name = name;\n }\n ScriptReceiverFactory.prototype.create = function (callback) {\n this.lastId++;\n var number = this.lastId;\n var id = this.prefix + number;\n var name = this.name + '[' + number + ']';\n var called = false;\n var callbackWrapper = function () {\n if (!called) {\n callback.apply(null, arguments);\n called = true;\n }\n };\n this[number] = callbackWrapper;\n return { number: number, id: id, name: name, callback: callbackWrapper };\n };\n ScriptReceiverFactory.prototype.remove = function (receiver) {\n delete this[receiver.number];\n };\n return ScriptReceiverFactory;\n}());\n\nvar ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.ScriptReceivers');\n\n// CONCATENATED MODULE: ./src/core/defaults.ts\nvar Defaults = {\n VERSION: \"7.0.3\",\n PROTOCOL: 7,\n wsPort: 80,\n wssPort: 443,\n wsPath: '',\n httpHost: 'sockjs.pusher.com',\n httpPort: 80,\n httpsPort: 443,\n httpPath: '/pusher',\n stats_host: 'stats.pusher.com',\n authEndpoint: '/pusher/auth',\n authTransport: 'ajax',\n activityTimeout: 120000,\n pongTimeout: 30000,\n unavailableTimeout: 10000,\n cluster: 'mt1',\n cdn_http: \"http://js.pusher.com\",\n cdn_https: \"https://js.pusher.com\",\n dependency_suffix: \"\"\n};\n/* harmony default export */ var defaults = (Defaults);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/dependency_loader.ts\n\n\nvar dependency_loader_DependencyLoader = (function () {\n function DependencyLoader(options) {\n this.options = options;\n this.receivers = options.receivers || ScriptReceivers;\n this.loading = {};\n }\n DependencyLoader.prototype.load = function (name, options, callback) {\n var self = this;\n if (self.loading[name] && self.loading[name].length > 0) {\n self.loading[name].push(callback);\n }\n else {\n self.loading[name] = [callback];\n var request = runtime.createScriptRequest(self.getPath(name, options));\n var receiver = self.receivers.create(function (error) {\n self.receivers.remove(receiver);\n if (self.loading[name]) {\n var callbacks = self.loading[name];\n delete self.loading[name];\n var successCallback = function (wasSuccessful) {\n if (!wasSuccessful) {\n request.cleanup();\n }\n };\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](error, successCallback);\n }\n }\n });\n request.send(receiver);\n }\n };\n DependencyLoader.prototype.getRoot = function (options) {\n var cdn;\n var protocol = runtime.getDocument().location.protocol;\n if ((options && options.useTLS) || protocol === 'https:') {\n cdn = this.options.cdn_https;\n }\n else {\n cdn = this.options.cdn_http;\n }\n return cdn.replace(/\\/*$/, '') + '/' + this.options.version;\n };\n DependencyLoader.prototype.getPath = function (name, options) {\n return this.getRoot(options) + '/' + name + this.options.suffix + '.js';\n };\n return DependencyLoader;\n}());\n/* harmony default export */ var dependency_loader = (dependency_loader_DependencyLoader);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/dependencies.ts\n\n\n\nvar DependenciesReceivers = new ScriptReceiverFactory('_pusher_dependencies', 'Pusher.DependenciesReceivers');\nvar Dependencies = new dependency_loader({\n cdn_http: defaults.cdn_http,\n cdn_https: defaults.cdn_https,\n version: defaults.VERSION,\n suffix: defaults.dependency_suffix,\n receivers: DependenciesReceivers\n});\n\n// CONCATENATED MODULE: ./src/core/utils/url_store.ts\nvar urlStore = {\n baseUrl: 'https://pusher.com',\n urls: {\n authenticationEndpoint: {\n path: '/docs/authenticating_users'\n },\n javascriptQuickStart: {\n path: '/docs/javascript_quick_start'\n },\n triggeringClientEvents: {\n path: '/docs/client_api_guide/client_events#trigger-events'\n },\n encryptedChannelSupport: {\n fullUrl: 'https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support'\n }\n }\n};\nvar buildLogSuffix = function (key) {\n var urlPrefix = 'See:';\n var urlObj = urlStore.urls[key];\n if (!urlObj)\n return '';\n var url;\n if (urlObj.fullUrl) {\n url = urlObj.fullUrl;\n }\n else if (urlObj.path) {\n url = urlStore.baseUrl + urlObj.path;\n }\n if (!url)\n return '';\n return urlPrefix + \" \" + url;\n};\n/* harmony default export */ var url_store = ({ buildLogSuffix: buildLogSuffix });\n\n// CONCATENATED MODULE: ./src/core/errors.ts\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar BadEventName = (function (_super) {\n __extends(BadEventName, _super);\n function BadEventName(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return BadEventName;\n}(Error));\n\nvar RequestTimedOut = (function (_super) {\n __extends(RequestTimedOut, _super);\n function RequestTimedOut(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return RequestTimedOut;\n}(Error));\n\nvar TransportPriorityTooLow = (function (_super) {\n __extends(TransportPriorityTooLow, _super);\n function TransportPriorityTooLow(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TransportPriorityTooLow;\n}(Error));\n\nvar TransportClosed = (function (_super) {\n __extends(TransportClosed, _super);\n function TransportClosed(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TransportClosed;\n}(Error));\n\nvar UnsupportedFeature = (function (_super) {\n __extends(UnsupportedFeature, _super);\n function UnsupportedFeature(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return UnsupportedFeature;\n}(Error));\n\nvar UnsupportedTransport = (function (_super) {\n __extends(UnsupportedTransport, _super);\n function UnsupportedTransport(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return UnsupportedTransport;\n}(Error));\n\nvar UnsupportedStrategy = (function (_super) {\n __extends(UnsupportedStrategy, _super);\n function UnsupportedStrategy(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return UnsupportedStrategy;\n}(Error));\n\nvar HTTPAuthError = (function (_super) {\n __extends(HTTPAuthError, _super);\n function HTTPAuthError(status, msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n _this.status = status;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return HTTPAuthError;\n}(Error));\n\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/auth/xhr_auth.ts\n\n\n\nvar ajax = function (context, socketId, callback) {\n var self = this, xhr;\n xhr = runtime.createXHR();\n xhr.open('POST', self.options.authEndpoint, true);\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n for (var headerName in this.authOptions.headers) {\n xhr.setRequestHeader(headerName, this.authOptions.headers[headerName]);\n }\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n var data = void 0;\n var parsed = false;\n try {\n data = JSON.parse(xhr.responseText);\n parsed = true;\n }\n catch (e) {\n callback(new HTTPAuthError(200, 'JSON returned from auth endpoint was invalid, yet status code was 200. Data was: ' +\n xhr.responseText), { auth: '' });\n }\n if (parsed) {\n callback(null, data);\n }\n }\n else {\n var suffix = url_store.buildLogSuffix('authenticationEndpoint');\n callback(new HTTPAuthError(xhr.status, 'Unable to retrieve auth string from auth endpoint - ' +\n (\"received status: \" + xhr.status + \" from \" + self.options.authEndpoint + \". \") +\n (\"Clients must be authenticated to join private or presence channels. \" + suffix)), { auth: '' });\n }\n }\n };\n xhr.send(this.composeQuery(socketId));\n return xhr;\n};\n/* harmony default export */ var xhr_auth = (ajax);\n\n// CONCATENATED MODULE: ./src/core/base64.ts\nfunction encode(s) {\n return btoa(utob(s));\n}\nvar fromCharCode = String.fromCharCode;\nvar b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nvar b64tab = {};\nfor (var base64_i = 0, l = b64chars.length; base64_i < l; base64_i++) {\n b64tab[b64chars.charAt(base64_i)] = base64_i;\n}\nvar cb_utob = function (c) {\n var cc = c.charCodeAt(0);\n return cc < 0x80\n ? c\n : cc < 0x800\n ? fromCharCode(0xc0 | (cc >>> 6)) + fromCharCode(0x80 | (cc & 0x3f))\n : fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) +\n fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) +\n fromCharCode(0x80 | (cc & 0x3f));\n};\nvar utob = function (u) {\n return u.replace(/[^\\x00-\\x7F]/g, cb_utob);\n};\nvar cb_encode = function (ccc) {\n var padlen = [0, 2, 1][ccc.length % 3];\n var ord = (ccc.charCodeAt(0) << 16) |\n ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) |\n (ccc.length > 2 ? ccc.charCodeAt(2) : 0);\n var chars = [\n b64chars.charAt(ord >>> 18),\n b64chars.charAt((ord >>> 12) & 63),\n padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),\n padlen >= 1 ? '=' : b64chars.charAt(ord & 63)\n ];\n return chars.join('');\n};\nvar btoa = window.btoa ||\n function (b) {\n return b.replace(/[\\s\\S]{1,3}/g, cb_encode);\n };\n\n// CONCATENATED MODULE: ./src/core/utils/timers/abstract_timer.ts\nvar Timer = (function () {\n function Timer(set, clear, delay, callback) {\n var _this = this;\n this.clear = clear;\n this.timer = set(function () {\n if (_this.timer) {\n _this.timer = callback(_this.timer);\n }\n }, delay);\n }\n Timer.prototype.isRunning = function () {\n return this.timer !== null;\n };\n Timer.prototype.ensureAborted = function () {\n if (this.timer) {\n this.clear(this.timer);\n this.timer = null;\n }\n };\n return Timer;\n}());\n/* harmony default export */ var abstract_timer = (Timer);\n\n// CONCATENATED MODULE: ./src/core/utils/timers/index.ts\nvar timers_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nfunction timers_clearTimeout(timer) {\n window.clearTimeout(timer);\n}\nfunction timers_clearInterval(timer) {\n window.clearInterval(timer);\n}\nvar OneOffTimer = (function (_super) {\n timers_extends(OneOffTimer, _super);\n function OneOffTimer(delay, callback) {\n return _super.call(this, setTimeout, timers_clearTimeout, delay, function (timer) {\n callback();\n return null;\n }) || this;\n }\n return OneOffTimer;\n}(abstract_timer));\n\nvar PeriodicTimer = (function (_super) {\n timers_extends(PeriodicTimer, _super);\n function PeriodicTimer(delay, callback) {\n return _super.call(this, setInterval, timers_clearInterval, delay, function (timer) {\n callback();\n return timer;\n }) || this;\n }\n return PeriodicTimer;\n}(abstract_timer));\n\n\n// CONCATENATED MODULE: ./src/core/util.ts\n\nvar Util = {\n now: function () {\n if (Date.now) {\n return Date.now();\n }\n else {\n return new Date().valueOf();\n }\n },\n defer: function (callback) {\n return new OneOffTimer(0, callback);\n },\n method: function (name) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var boundArguments = Array.prototype.slice.call(arguments, 1);\n return function (object) {\n return object[name].apply(object, boundArguments.concat(arguments));\n };\n }\n};\n/* harmony default export */ var util = (Util);\n\n// CONCATENATED MODULE: ./src/core/utils/collections.ts\n\n\nfunction extend(target) {\n var sources = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n sources[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < sources.length; i++) {\n var extensions = sources[i];\n for (var property in extensions) {\n if (extensions[property] &&\n extensions[property].constructor &&\n extensions[property].constructor === Object) {\n target[property] = extend(target[property] || {}, extensions[property]);\n }\n else {\n target[property] = extensions[property];\n }\n }\n }\n return target;\n}\nfunction stringify() {\n var m = ['Pusher'];\n for (var i = 0; i < arguments.length; i++) {\n if (typeof arguments[i] === 'string') {\n m.push(arguments[i]);\n }\n else {\n m.push(safeJSONStringify(arguments[i]));\n }\n }\n return m.join(' : ');\n}\nfunction arrayIndexOf(array, item) {\n var nativeIndexOf = Array.prototype.indexOf;\n if (array === null) {\n return -1;\n }\n if (nativeIndexOf && array.indexOf === nativeIndexOf) {\n return array.indexOf(item);\n }\n for (var i = 0, l = array.length; i < l; i++) {\n if (array[i] === item) {\n return i;\n }\n }\n return -1;\n}\nfunction objectApply(object, f) {\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n f(object[key], key, object);\n }\n }\n}\nfunction keys(object) {\n var keys = [];\n objectApply(object, function (_, key) {\n keys.push(key);\n });\n return keys;\n}\nfunction values(object) {\n var values = [];\n objectApply(object, function (value) {\n values.push(value);\n });\n return values;\n}\nfunction apply(array, f, context) {\n for (var i = 0; i < array.length; i++) {\n f.call(context || window, array[i], i, array);\n }\n}\nfunction map(array, f) {\n var result = [];\n for (var i = 0; i < array.length; i++) {\n result.push(f(array[i], i, array, result));\n }\n return result;\n}\nfunction mapObject(object, f) {\n var result = {};\n objectApply(object, function (value, key) {\n result[key] = f(value);\n });\n return result;\n}\nfunction filter(array, test) {\n test =\n test ||\n function (value) {\n return !!value;\n };\n var result = [];\n for (var i = 0; i < array.length; i++) {\n if (test(array[i], i, array, result)) {\n result.push(array[i]);\n }\n }\n return result;\n}\nfunction filterObject(object, test) {\n var result = {};\n objectApply(object, function (value, key) {\n if ((test && test(value, key, object, result)) || Boolean(value)) {\n result[key] = value;\n }\n });\n return result;\n}\nfunction flatten(object) {\n var result = [];\n objectApply(object, function (value, key) {\n result.push([key, value]);\n });\n return result;\n}\nfunction any(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (test(array[i], i, array)) {\n return true;\n }\n }\n return false;\n}\nfunction collections_all(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (!test(array[i], i, array)) {\n return false;\n }\n }\n return true;\n}\nfunction encodeParamsObject(data) {\n return mapObject(data, function (value) {\n if (typeof value === 'object') {\n value = safeJSONStringify(value);\n }\n return encodeURIComponent(encode(value.toString()));\n });\n}\nfunction buildQueryString(data) {\n var params = filterObject(data, function (value) {\n return value !== undefined;\n });\n var query = map(flatten(encodeParamsObject(params)), util.method('join', '=')).join('&');\n return query;\n}\nfunction decycleObject(object) {\n var objects = [], paths = [];\n return (function derez(value, path) {\n var i, name, nu;\n switch (typeof value) {\n case 'object':\n if (!value) {\n return null;\n }\n for (i = 0; i < objects.length; i += 1) {\n if (objects[i] === value) {\n return { $ref: paths[i] };\n }\n }\n objects.push(value);\n paths.push(path);\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n nu = [];\n for (i = 0; i < value.length; i += 1) {\n nu[i] = derez(value[i], path + '[' + i + ']');\n }\n }\n else {\n nu = {};\n for (name in value) {\n if (Object.prototype.hasOwnProperty.call(value, name)) {\n nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']');\n }\n }\n }\n return nu;\n case 'number':\n case 'string':\n case 'boolean':\n return value;\n }\n })(object, '$');\n}\nfunction safeJSONStringify(source) {\n try {\n return JSON.stringify(source);\n }\n catch (e) {\n return JSON.stringify(decycleObject(source));\n }\n}\n\n// CONCATENATED MODULE: ./src/core/logger.ts\n\n\nvar logger_Logger = (function () {\n function Logger() {\n this.globalLog = function (message) {\n if (window.console && window.console.log) {\n window.console.log(message);\n }\n };\n }\n Logger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.log(this.globalLog, args);\n };\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.log(this.globalLogWarn, args);\n };\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.log(this.globalLogError, args);\n };\n Logger.prototype.globalLogWarn = function (message) {\n if (window.console && window.console.warn) {\n window.console.warn(message);\n }\n else {\n this.globalLog(message);\n }\n };\n Logger.prototype.globalLogError = function (message) {\n if (window.console && window.console.error) {\n window.console.error(message);\n }\n else {\n this.globalLogWarn(message);\n }\n };\n Logger.prototype.log = function (defaultLoggingFunction) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var message = stringify.apply(this, arguments);\n if (core_pusher.log) {\n core_pusher.log(message);\n }\n else if (core_pusher.logToConsole) {\n var log = defaultLoggingFunction.bind(this);\n log(message);\n }\n };\n return Logger;\n}());\n/* harmony default export */ var logger = (new logger_Logger());\n\n// CONCATENATED MODULE: ./src/runtimes/web/auth/jsonp_auth.ts\n\nvar jsonp = function (context, socketId, callback) {\n if (this.authOptions.headers !== undefined) {\n logger.warn('To send headers with the auth request, you must use AJAX, rather than JSONP.');\n }\n var callbackName = context.nextAuthCallbackID.toString();\n context.nextAuthCallbackID++;\n var document = context.getDocument();\n var script = document.createElement('script');\n context.auth_callbacks[callbackName] = function (data) {\n callback(null, data);\n };\n var callback_name = \"Pusher.auth_callbacks['\" + callbackName + \"']\";\n script.src =\n this.options.authEndpoint +\n '?callback=' +\n encodeURIComponent(callback_name) +\n '&' +\n this.composeQuery(socketId);\n var head = document.getElementsByTagName('head')[0] || document.documentElement;\n head.insertBefore(script, head.firstChild);\n};\n/* harmony default export */ var jsonp_auth = (jsonp);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/script_request.ts\nvar ScriptRequest = (function () {\n function ScriptRequest(src) {\n this.src = src;\n }\n ScriptRequest.prototype.send = function (receiver) {\n var self = this;\n var errorString = 'Error loading ' + self.src;\n self.script = document.createElement('script');\n self.script.id = receiver.id;\n self.script.src = self.src;\n self.script.type = 'text/javascript';\n self.script.charset = 'UTF-8';\n if (self.script.addEventListener) {\n self.script.onerror = function () {\n receiver.callback(errorString);\n };\n self.script.onload = function () {\n receiver.callback(null);\n };\n }\n else {\n self.script.onreadystatechange = function () {\n if (self.script.readyState === 'loaded' ||\n self.script.readyState === 'complete') {\n receiver.callback(null);\n }\n };\n }\n if (self.script.async === undefined &&\n document.attachEvent &&\n /opera/i.test(navigator.userAgent)) {\n self.errorScript = document.createElement('script');\n self.errorScript.id = receiver.id + '_error';\n self.errorScript.text = receiver.name + \"('\" + errorString + \"');\";\n self.script.async = self.errorScript.async = false;\n }\n else {\n self.script.async = true;\n }\n var head = document.getElementsByTagName('head')[0];\n head.insertBefore(self.script, head.firstChild);\n if (self.errorScript) {\n head.insertBefore(self.errorScript, self.script.nextSibling);\n }\n };\n ScriptRequest.prototype.cleanup = function () {\n if (this.script) {\n this.script.onload = this.script.onerror = null;\n this.script.onreadystatechange = null;\n }\n if (this.script && this.script.parentNode) {\n this.script.parentNode.removeChild(this.script);\n }\n if (this.errorScript && this.errorScript.parentNode) {\n this.errorScript.parentNode.removeChild(this.errorScript);\n }\n this.script = null;\n this.errorScript = null;\n };\n return ScriptRequest;\n}());\n/* harmony default export */ var script_request = (ScriptRequest);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/jsonp_request.ts\n\n\nvar jsonp_request_JSONPRequest = (function () {\n function JSONPRequest(url, data) {\n this.url = url;\n this.data = data;\n }\n JSONPRequest.prototype.send = function (receiver) {\n if (this.request) {\n return;\n }\n var query = buildQueryString(this.data);\n var url = this.url + '/' + receiver.number + '?' + query;\n this.request = runtime.createScriptRequest(url);\n this.request.send(receiver);\n };\n JSONPRequest.prototype.cleanup = function () {\n if (this.request) {\n this.request.cleanup();\n }\n };\n return JSONPRequest;\n}());\n/* harmony default export */ var jsonp_request = (jsonp_request_JSONPRequest);\n\n// CONCATENATED MODULE: ./src/runtimes/web/timeline/jsonp_timeline.ts\n\n\nvar getAgent = function (sender, useTLS) {\n return function (data, callback) {\n var scheme = 'http' + (useTLS ? 's' : '') + '://';\n var url = scheme + (sender.host || sender.options.host) + sender.options.path;\n var request = runtime.createJSONPRequest(url, data);\n var receiver = runtime.ScriptReceivers.create(function (error, result) {\n ScriptReceivers.remove(receiver);\n request.cleanup();\n if (result && result.host) {\n sender.host = result.host;\n }\n if (callback) {\n callback(error, result);\n }\n });\n request.send(receiver);\n };\n};\nvar jsonp_timeline_jsonp = {\n name: 'jsonp',\n getAgent: getAgent\n};\n/* harmony default export */ var jsonp_timeline = (jsonp_timeline_jsonp);\n\n// CONCATENATED MODULE: ./src/core/transports/url_schemes.ts\n\nfunction getGenericURL(baseScheme, params, path) {\n var scheme = baseScheme + (params.useTLS ? 's' : '');\n var host = params.useTLS ? params.hostTLS : params.hostNonTLS;\n return scheme + '://' + host + path;\n}\nfunction getGenericPath(key, queryString) {\n var path = '/app/' + key;\n var query = '?protocol=' +\n defaults.PROTOCOL +\n '&client=js' +\n '&version=' +\n defaults.VERSION +\n (queryString ? '&' + queryString : '');\n return path + query;\n}\nvar ws = {\n getInitial: function (key, params) {\n var path = (params.httpPath || '') + getGenericPath(key, 'flash=false');\n return getGenericURL('ws', params, path);\n }\n};\nvar http = {\n getInitial: function (key, params) {\n var path = (params.httpPath || '/pusher') + getGenericPath(key);\n return getGenericURL('http', params, path);\n }\n};\nvar sockjs = {\n getInitial: function (key, params) {\n return getGenericURL('http', params, params.httpPath || '/pusher');\n },\n getPath: function (key, params) {\n return getGenericPath(key);\n }\n};\n\n// CONCATENATED MODULE: ./src/core/events/callback_registry.ts\n\nvar callback_registry_CallbackRegistry = (function () {\n function CallbackRegistry() {\n this._callbacks = {};\n }\n CallbackRegistry.prototype.get = function (name) {\n return this._callbacks[prefix(name)];\n };\n CallbackRegistry.prototype.add = function (name, callback, context) {\n var prefixedEventName = prefix(name);\n this._callbacks[prefixedEventName] =\n this._callbacks[prefixedEventName] || [];\n this._callbacks[prefixedEventName].push({\n fn: callback,\n context: context\n });\n };\n CallbackRegistry.prototype.remove = function (name, callback, context) {\n if (!name && !callback && !context) {\n this._callbacks = {};\n return;\n }\n var names = name ? [prefix(name)] : keys(this._callbacks);\n if (callback || context) {\n this.removeCallback(names, callback, context);\n }\n else {\n this.removeAllCallbacks(names);\n }\n };\n CallbackRegistry.prototype.removeCallback = function (names, callback, context) {\n apply(names, function (name) {\n this._callbacks[name] = filter(this._callbacks[name] || [], function (binding) {\n return ((callback && callback !== binding.fn) ||\n (context && context !== binding.context));\n });\n if (this._callbacks[name].length === 0) {\n delete this._callbacks[name];\n }\n }, this);\n };\n CallbackRegistry.prototype.removeAllCallbacks = function (names) {\n apply(names, function (name) {\n delete this._callbacks[name];\n }, this);\n };\n return CallbackRegistry;\n}());\n/* harmony default export */ var callback_registry = (callback_registry_CallbackRegistry);\nfunction prefix(name) {\n return '_' + name;\n}\n\n// CONCATENATED MODULE: ./src/core/events/dispatcher.ts\n\n\nvar dispatcher_Dispatcher = (function () {\n function Dispatcher(failThrough) {\n this.callbacks = new callback_registry();\n this.global_callbacks = [];\n this.failThrough = failThrough;\n }\n Dispatcher.prototype.bind = function (eventName, callback, context) {\n this.callbacks.add(eventName, callback, context);\n return this;\n };\n Dispatcher.prototype.bind_global = function (callback) {\n this.global_callbacks.push(callback);\n return this;\n };\n Dispatcher.prototype.unbind = function (eventName, callback, context) {\n this.callbacks.remove(eventName, callback, context);\n return this;\n };\n Dispatcher.prototype.unbind_global = function (callback) {\n if (!callback) {\n this.global_callbacks = [];\n return this;\n }\n this.global_callbacks = filter(this.global_callbacks || [], function (c) { return c !== callback; });\n return this;\n };\n Dispatcher.prototype.unbind_all = function () {\n this.unbind();\n this.unbind_global();\n return this;\n };\n Dispatcher.prototype.emit = function (eventName, data, metadata) {\n for (var i = 0; i < this.global_callbacks.length; i++) {\n this.global_callbacks[i](eventName, data);\n }\n var callbacks = this.callbacks.get(eventName);\n var args = [];\n if (metadata) {\n args.push(data, metadata);\n }\n else if (data) {\n args.push(data);\n }\n if (callbacks && callbacks.length > 0) {\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i].fn.apply(callbacks[i].context || window, args);\n }\n }\n else if (this.failThrough) {\n this.failThrough(eventName, data);\n }\n return this;\n };\n return Dispatcher;\n}());\n/* harmony default export */ var dispatcher = (dispatcher_Dispatcher);\n\n// CONCATENATED MODULE: ./src/core/transports/transport_connection.ts\nvar transport_connection_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar transport_connection_TransportConnection = (function (_super) {\n transport_connection_extends(TransportConnection, _super);\n function TransportConnection(hooks, name, priority, key, options) {\n var _this = _super.call(this) || this;\n _this.initialize = runtime.transportConnectionInitializer;\n _this.hooks = hooks;\n _this.name = name;\n _this.priority = priority;\n _this.key = key;\n _this.options = options;\n _this.state = 'new';\n _this.timeline = options.timeline;\n _this.activityTimeout = options.activityTimeout;\n _this.id = _this.timeline.generateUniqueID();\n return _this;\n }\n TransportConnection.prototype.handlesActivityChecks = function () {\n return Boolean(this.hooks.handlesActivityChecks);\n };\n TransportConnection.prototype.supportsPing = function () {\n return Boolean(this.hooks.supportsPing);\n };\n TransportConnection.prototype.connect = function () {\n var _this = this;\n if (this.socket || this.state !== 'initialized') {\n return false;\n }\n var url = this.hooks.urls.getInitial(this.key, this.options);\n try {\n this.socket = this.hooks.getSocket(url, this.options);\n }\n catch (e) {\n util.defer(function () {\n _this.onError(e);\n _this.changeState('closed');\n });\n return false;\n }\n this.bindListeners();\n logger.debug('Connecting', { transport: this.name, url: url });\n this.changeState('connecting');\n return true;\n };\n TransportConnection.prototype.close = function () {\n if (this.socket) {\n this.socket.close();\n return true;\n }\n else {\n return false;\n }\n };\n TransportConnection.prototype.send = function (data) {\n var _this = this;\n if (this.state === 'open') {\n util.defer(function () {\n if (_this.socket) {\n _this.socket.send(data);\n }\n });\n return true;\n }\n else {\n return false;\n }\n };\n TransportConnection.prototype.ping = function () {\n if (this.state === 'open' && this.supportsPing()) {\n this.socket.ping();\n }\n };\n TransportConnection.prototype.onOpen = function () {\n if (this.hooks.beforeOpen) {\n this.hooks.beforeOpen(this.socket, this.hooks.urls.getPath(this.key, this.options));\n }\n this.changeState('open');\n this.socket.onopen = undefined;\n };\n TransportConnection.prototype.onError = function (error) {\n this.emit('error', { type: 'WebSocketError', error: error });\n this.timeline.error(this.buildTimelineMessage({ error: error.toString() }));\n };\n TransportConnection.prototype.onClose = function (closeEvent) {\n if (closeEvent) {\n this.changeState('closed', {\n code: closeEvent.code,\n reason: closeEvent.reason,\n wasClean: closeEvent.wasClean\n });\n }\n else {\n this.changeState('closed');\n }\n this.unbindListeners();\n this.socket = undefined;\n };\n TransportConnection.prototype.onMessage = function (message) {\n this.emit('message', message);\n };\n TransportConnection.prototype.onActivity = function () {\n this.emit('activity');\n };\n TransportConnection.prototype.bindListeners = function () {\n var _this = this;\n this.socket.onopen = function () {\n _this.onOpen();\n };\n this.socket.onerror = function (error) {\n _this.onError(error);\n };\n this.socket.onclose = function (closeEvent) {\n _this.onClose(closeEvent);\n };\n this.socket.onmessage = function (message) {\n _this.onMessage(message);\n };\n if (this.supportsPing()) {\n this.socket.onactivity = function () {\n _this.onActivity();\n };\n }\n };\n TransportConnection.prototype.unbindListeners = function () {\n if (this.socket) {\n this.socket.onopen = undefined;\n this.socket.onerror = undefined;\n this.socket.onclose = undefined;\n this.socket.onmessage = undefined;\n if (this.supportsPing()) {\n this.socket.onactivity = undefined;\n }\n }\n };\n TransportConnection.prototype.changeState = function (state, params) {\n this.state = state;\n this.timeline.info(this.buildTimelineMessage({\n state: state,\n params: params\n }));\n this.emit(state, params);\n };\n TransportConnection.prototype.buildTimelineMessage = function (message) {\n return extend({ cid: this.id }, message);\n };\n return TransportConnection;\n}(dispatcher));\n/* harmony default export */ var transport_connection = (transport_connection_TransportConnection);\n\n// CONCATENATED MODULE: ./src/core/transports/transport.ts\n\nvar transport_Transport = (function () {\n function Transport(hooks) {\n this.hooks = hooks;\n }\n Transport.prototype.isSupported = function (environment) {\n return this.hooks.isSupported(environment);\n };\n Transport.prototype.createConnection = function (name, priority, key, options) {\n return new transport_connection(this.hooks, name, priority, key, options);\n };\n return Transport;\n}());\n/* harmony default export */ var transports_transport = (transport_Transport);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/transports/transports.ts\n\n\n\n\nvar WSTransport = new transports_transport({\n urls: ws,\n handlesActivityChecks: false,\n supportsPing: false,\n isInitialized: function () {\n return Boolean(runtime.getWebSocketAPI());\n },\n isSupported: function () {\n return Boolean(runtime.getWebSocketAPI());\n },\n getSocket: function (url) {\n return runtime.createWebSocket(url);\n }\n});\nvar httpConfiguration = {\n urls: http,\n handlesActivityChecks: false,\n supportsPing: true,\n isInitialized: function () {\n return true;\n }\n};\nvar streamingConfiguration = extend({\n getSocket: function (url) {\n return runtime.HTTPFactory.createStreamingSocket(url);\n }\n}, httpConfiguration);\nvar pollingConfiguration = extend({\n getSocket: function (url) {\n return runtime.HTTPFactory.createPollingSocket(url);\n }\n}, httpConfiguration);\nvar xhrConfiguration = {\n isSupported: function () {\n return runtime.isXHRSupported();\n }\n};\nvar XHRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xhrConfiguration)));\nvar XHRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xhrConfiguration));\nvar Transports = {\n ws: WSTransport,\n xhr_streaming: XHRStreamingTransport,\n xhr_polling: XHRPollingTransport\n};\n/* harmony default export */ var transports = (Transports);\n\n// CONCATENATED MODULE: ./src/runtimes/web/transports/transports.ts\n\n\n\n\n\n\nvar SockJSTransport = new transports_transport({\n file: 'sockjs',\n urls: sockjs,\n handlesActivityChecks: true,\n supportsPing: false,\n isSupported: function () {\n return true;\n },\n isInitialized: function () {\n return window.SockJS !== undefined;\n },\n getSocket: function (url, options) {\n return new window.SockJS(url, null, {\n js_path: Dependencies.getPath('sockjs', {\n useTLS: options.useTLS\n }),\n ignore_null_origin: options.ignoreNullOrigin\n });\n },\n beforeOpen: function (socket, path) {\n socket.send(JSON.stringify({\n path: path\n }));\n }\n});\nvar xdrConfiguration = {\n isSupported: function (environment) {\n var yes = runtime.isXDRSupported(environment.useTLS);\n return yes;\n }\n};\nvar XDRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xdrConfiguration)));\nvar XDRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xdrConfiguration));\ntransports.xdr_streaming = XDRStreamingTransport;\ntransports.xdr_polling = XDRPollingTransport;\ntransports.sockjs = SockJSTransport;\n/* harmony default export */ var transports_transports = (transports);\n\n// CONCATENATED MODULE: ./src/runtimes/web/net_info.ts\nvar net_info_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nvar NetInfo = (function (_super) {\n net_info_extends(NetInfo, _super);\n function NetInfo() {\n var _this = _super.call(this) || this;\n var self = _this;\n if (window.addEventListener !== undefined) {\n window.addEventListener('online', function () {\n self.emit('online');\n }, false);\n window.addEventListener('offline', function () {\n self.emit('offline');\n }, false);\n }\n return _this;\n }\n NetInfo.prototype.isOnline = function () {\n if (window.navigator.onLine === undefined) {\n return true;\n }\n else {\n return window.navigator.onLine;\n }\n };\n return NetInfo;\n}(dispatcher));\n\nvar net_info_Network = new NetInfo();\n\n// CONCATENATED MODULE: ./src/core/transports/assistant_to_the_transport_manager.ts\n\n\nvar assistant_to_the_transport_manager_AssistantToTheTransportManager = (function () {\n function AssistantToTheTransportManager(manager, transport, options) {\n this.manager = manager;\n this.transport = transport;\n this.minPingDelay = options.minPingDelay;\n this.maxPingDelay = options.maxPingDelay;\n this.pingDelay = undefined;\n }\n AssistantToTheTransportManager.prototype.createConnection = function (name, priority, key, options) {\n var _this = this;\n options = extend({}, options, {\n activityTimeout: this.pingDelay\n });\n var connection = this.transport.createConnection(name, priority, key, options);\n var openTimestamp = null;\n var onOpen = function () {\n connection.unbind('open', onOpen);\n connection.bind('closed', onClosed);\n openTimestamp = util.now();\n };\n var onClosed = function (closeEvent) {\n connection.unbind('closed', onClosed);\n if (closeEvent.code === 1002 || closeEvent.code === 1003) {\n _this.manager.reportDeath();\n }\n else if (!closeEvent.wasClean && openTimestamp) {\n var lifespan = util.now() - openTimestamp;\n if (lifespan < 2 * _this.maxPingDelay) {\n _this.manager.reportDeath();\n _this.pingDelay = Math.max(lifespan / 2, _this.minPingDelay);\n }\n }\n };\n connection.bind('open', onOpen);\n return connection;\n };\n AssistantToTheTransportManager.prototype.isSupported = function (environment) {\n return this.manager.isAlive() && this.transport.isSupported(environment);\n };\n return AssistantToTheTransportManager;\n}());\n/* harmony default export */ var assistant_to_the_transport_manager = (assistant_to_the_transport_manager_AssistantToTheTransportManager);\n\n// CONCATENATED MODULE: ./src/core/connection/protocol/protocol.ts\nvar Protocol = {\n decodeMessage: function (messageEvent) {\n try {\n var messageData = JSON.parse(messageEvent.data);\n var pusherEventData = messageData.data;\n if (typeof pusherEventData === 'string') {\n try {\n pusherEventData = JSON.parse(messageData.data);\n }\n catch (e) { }\n }\n var pusherEvent = {\n event: messageData.event,\n channel: messageData.channel,\n data: pusherEventData\n };\n if (messageData.user_id) {\n pusherEvent.user_id = messageData.user_id;\n }\n return pusherEvent;\n }\n catch (e) {\n throw { type: 'MessageParseError', error: e, data: messageEvent.data };\n }\n },\n encodeMessage: function (event) {\n return JSON.stringify(event);\n },\n processHandshake: function (messageEvent) {\n var message = Protocol.decodeMessage(messageEvent);\n if (message.event === 'pusher:connection_established') {\n if (!message.data.activity_timeout) {\n throw 'No activity timeout specified in handshake';\n }\n return {\n action: 'connected',\n id: message.data.socket_id,\n activityTimeout: message.data.activity_timeout * 1000\n };\n }\n else if (message.event === 'pusher:error') {\n return {\n action: this.getCloseAction(message.data),\n error: this.getCloseError(message.data)\n };\n }\n else {\n throw 'Invalid handshake';\n }\n },\n getCloseAction: function (closeEvent) {\n if (closeEvent.code < 4000) {\n if (closeEvent.code >= 1002 && closeEvent.code <= 1004) {\n return 'backoff';\n }\n else {\n return null;\n }\n }\n else if (closeEvent.code === 4000) {\n return 'tls_only';\n }\n else if (closeEvent.code < 4100) {\n return 'refused';\n }\n else if (closeEvent.code < 4200) {\n return 'backoff';\n }\n else if (closeEvent.code < 4300) {\n return 'retry';\n }\n else {\n return 'refused';\n }\n },\n getCloseError: function (closeEvent) {\n if (closeEvent.code !== 1000 && closeEvent.code !== 1001) {\n return {\n type: 'PusherError',\n data: {\n code: closeEvent.code,\n message: closeEvent.reason || closeEvent.message\n }\n };\n }\n else {\n return null;\n }\n }\n};\n/* harmony default export */ var protocol_protocol = (Protocol);\n\n// CONCATENATED MODULE: ./src/core/connection/connection.ts\nvar connection_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar connection_Connection = (function (_super) {\n connection_extends(Connection, _super);\n function Connection(id, transport) {\n var _this = _super.call(this) || this;\n _this.id = id;\n _this.transport = transport;\n _this.activityTimeout = transport.activityTimeout;\n _this.bindListeners();\n return _this;\n }\n Connection.prototype.handlesActivityChecks = function () {\n return this.transport.handlesActivityChecks();\n };\n Connection.prototype.send = function (data) {\n return this.transport.send(data);\n };\n Connection.prototype.send_event = function (name, data, channel) {\n var event = { event: name, data: data };\n if (channel) {\n event.channel = channel;\n }\n logger.debug('Event sent', event);\n return this.send(protocol_protocol.encodeMessage(event));\n };\n Connection.prototype.ping = function () {\n if (this.transport.supportsPing()) {\n this.transport.ping();\n }\n else {\n this.send_event('pusher:ping', {});\n }\n };\n Connection.prototype.close = function () {\n this.transport.close();\n };\n Connection.prototype.bindListeners = function () {\n var _this = this;\n var listeners = {\n message: function (messageEvent) {\n var pusherEvent;\n try {\n pusherEvent = protocol_protocol.decodeMessage(messageEvent);\n }\n catch (e) {\n _this.emit('error', {\n type: 'MessageParseError',\n error: e,\n data: messageEvent.data\n });\n }\n if (pusherEvent !== undefined) {\n logger.debug('Event recd', pusherEvent);\n switch (pusherEvent.event) {\n case 'pusher:error':\n _this.emit('error', {\n type: 'PusherError',\n data: pusherEvent.data\n });\n break;\n case 'pusher:ping':\n _this.emit('ping');\n break;\n case 'pusher:pong':\n _this.emit('pong');\n break;\n }\n _this.emit('message', pusherEvent);\n }\n },\n activity: function () {\n _this.emit('activity');\n },\n error: function (error) {\n _this.emit('error', error);\n },\n closed: function (closeEvent) {\n unbindListeners();\n if (closeEvent && closeEvent.code) {\n _this.handleCloseEvent(closeEvent);\n }\n _this.transport = null;\n _this.emit('closed');\n }\n };\n var unbindListeners = function () {\n objectApply(listeners, function (listener, event) {\n _this.transport.unbind(event, listener);\n });\n };\n objectApply(listeners, function (listener, event) {\n _this.transport.bind(event, listener);\n });\n };\n Connection.prototype.handleCloseEvent = function (closeEvent) {\n var action = protocol_protocol.getCloseAction(closeEvent);\n var error = protocol_protocol.getCloseError(closeEvent);\n if (error) {\n this.emit('error', error);\n }\n if (action) {\n this.emit(action, { action: action, error: error });\n }\n };\n return Connection;\n}(dispatcher));\n/* harmony default export */ var connection_connection = (connection_Connection);\n\n// CONCATENATED MODULE: ./src/core/connection/handshake/index.ts\n\n\n\nvar handshake_Handshake = (function () {\n function Handshake(transport, callback) {\n this.transport = transport;\n this.callback = callback;\n this.bindListeners();\n }\n Handshake.prototype.close = function () {\n this.unbindListeners();\n this.transport.close();\n };\n Handshake.prototype.bindListeners = function () {\n var _this = this;\n this.onMessage = function (m) {\n _this.unbindListeners();\n var result;\n try {\n result = protocol_protocol.processHandshake(m);\n }\n catch (e) {\n _this.finish('error', { error: e });\n _this.transport.close();\n return;\n }\n if (result.action === 'connected') {\n _this.finish('connected', {\n connection: new connection_connection(result.id, _this.transport),\n activityTimeout: result.activityTimeout\n });\n }\n else {\n _this.finish(result.action, { error: result.error });\n _this.transport.close();\n }\n };\n this.onClosed = function (closeEvent) {\n _this.unbindListeners();\n var action = protocol_protocol.getCloseAction(closeEvent) || 'backoff';\n var error = protocol_protocol.getCloseError(closeEvent);\n _this.finish(action, { error: error });\n };\n this.transport.bind('message', this.onMessage);\n this.transport.bind('closed', this.onClosed);\n };\n Handshake.prototype.unbindListeners = function () {\n this.transport.unbind('message', this.onMessage);\n this.transport.unbind('closed', this.onClosed);\n };\n Handshake.prototype.finish = function (action, params) {\n this.callback(extend({ transport: this.transport, action: action }, params));\n };\n return Handshake;\n}());\n/* harmony default export */ var connection_handshake = (handshake_Handshake);\n\n// CONCATENATED MODULE: ./src/core/auth/pusher_authorizer.ts\n\nvar pusher_authorizer_PusherAuthorizer = (function () {\n function PusherAuthorizer(channel, options) {\n this.channel = channel;\n var authTransport = options.authTransport;\n if (typeof runtime.getAuthorizers()[authTransport] === 'undefined') {\n throw \"'\" + authTransport + \"' is not a recognized auth transport\";\n }\n this.type = authTransport;\n this.options = options;\n this.authOptions = options.auth || {};\n }\n PusherAuthorizer.prototype.composeQuery = function (socketId) {\n var query = 'socket_id=' +\n encodeURIComponent(socketId) +\n '&channel_name=' +\n encodeURIComponent(this.channel.name);\n for (var i in this.authOptions.params) {\n query +=\n '&' +\n encodeURIComponent(i) +\n '=' +\n encodeURIComponent(this.authOptions.params[i]);\n }\n return query;\n };\n PusherAuthorizer.prototype.authorize = function (socketId, callback) {\n PusherAuthorizer.authorizers =\n PusherAuthorizer.authorizers || runtime.getAuthorizers();\n PusherAuthorizer.authorizers[this.type].call(this, runtime, socketId, callback);\n };\n return PusherAuthorizer;\n}());\n/* harmony default export */ var pusher_authorizer = (pusher_authorizer_PusherAuthorizer);\n\n// CONCATENATED MODULE: ./src/core/timeline/timeline_sender.ts\n\nvar timeline_sender_TimelineSender = (function () {\n function TimelineSender(timeline, options) {\n this.timeline = timeline;\n this.options = options || {};\n }\n TimelineSender.prototype.send = function (useTLS, callback) {\n if (this.timeline.isEmpty()) {\n return;\n }\n this.timeline.send(runtime.TimelineTransport.getAgent(this, useTLS), callback);\n };\n return TimelineSender;\n}());\n/* harmony default export */ var timeline_sender = (timeline_sender_TimelineSender);\n\n// CONCATENATED MODULE: ./src/core/channels/channel.ts\nvar channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar channel_Channel = (function (_super) {\n channel_extends(Channel, _super);\n function Channel(name, pusher) {\n var _this = _super.call(this, function (event, data) {\n logger.debug('No callbacks on ' + name + ' for ' + event);\n }) || this;\n _this.name = name;\n _this.pusher = pusher;\n _this.subscribed = false;\n _this.subscriptionPending = false;\n _this.subscriptionCancelled = false;\n return _this;\n }\n Channel.prototype.authorize = function (socketId, callback) {\n return callback(null, { auth: '' });\n };\n Channel.prototype.trigger = function (event, data) {\n if (event.indexOf('client-') !== 0) {\n throw new BadEventName(\"Event '\" + event + \"' does not start with 'client-'\");\n }\n if (!this.subscribed) {\n var suffix = url_store.buildLogSuffix('triggeringClientEvents');\n logger.warn(\"Client event triggered before channel 'subscription_succeeded' event . \" + suffix);\n }\n return this.pusher.send_event(event, data, this.name);\n };\n Channel.prototype.disconnect = function () {\n this.subscribed = false;\n this.subscriptionPending = false;\n };\n Channel.prototype.handleEvent = function (event) {\n var eventName = event.event;\n var data = event.data;\n if (eventName === 'pusher_internal:subscription_succeeded') {\n this.handleSubscriptionSucceededEvent(event);\n }\n else if (eventName.indexOf('pusher_internal:') !== 0) {\n var metadata = {};\n this.emit(eventName, data, metadata);\n }\n };\n Channel.prototype.handleSubscriptionSucceededEvent = function (event) {\n this.subscriptionPending = false;\n this.subscribed = true;\n if (this.subscriptionCancelled) {\n this.pusher.unsubscribe(this.name);\n }\n else {\n this.emit('pusher:subscription_succeeded', event.data);\n }\n };\n Channel.prototype.subscribe = function () {\n var _this = this;\n if (this.subscribed) {\n return;\n }\n this.subscriptionPending = true;\n this.subscriptionCancelled = false;\n this.authorize(this.pusher.connection.socket_id, function (error, data) {\n if (error) {\n _this.subscriptionPending = false;\n logger.error(error.toString());\n _this.emit('pusher:subscription_error', Object.assign({}, {\n type: 'AuthError',\n error: error.message\n }, error instanceof HTTPAuthError ? { status: error.status } : {}));\n }\n else {\n _this.pusher.send_event('pusher:subscribe', {\n auth: data.auth,\n channel_data: data.channel_data,\n channel: _this.name\n });\n }\n });\n };\n Channel.prototype.unsubscribe = function () {\n this.subscribed = false;\n this.pusher.send_event('pusher:unsubscribe', {\n channel: this.name\n });\n };\n Channel.prototype.cancelSubscription = function () {\n this.subscriptionCancelled = true;\n };\n Channel.prototype.reinstateSubscription = function () {\n this.subscriptionCancelled = false;\n };\n return Channel;\n}(dispatcher));\n/* harmony default export */ var channels_channel = (channel_Channel);\n\n// CONCATENATED MODULE: ./src/core/channels/private_channel.ts\nvar private_channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar private_channel_PrivateChannel = (function (_super) {\n private_channel_extends(PrivateChannel, _super);\n function PrivateChannel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PrivateChannel.prototype.authorize = function (socketId, callback) {\n var authorizer = factory.createAuthorizer(this, this.pusher.config);\n return authorizer.authorize(socketId, callback);\n };\n return PrivateChannel;\n}(channels_channel));\n/* harmony default export */ var private_channel = (private_channel_PrivateChannel);\n\n// CONCATENATED MODULE: ./src/core/channels/members.ts\n\nvar members_Members = (function () {\n function Members() {\n this.reset();\n }\n Members.prototype.get = function (id) {\n if (Object.prototype.hasOwnProperty.call(this.members, id)) {\n return {\n id: id,\n info: this.members[id]\n };\n }\n else {\n return null;\n }\n };\n Members.prototype.each = function (callback) {\n var _this = this;\n objectApply(this.members, function (member, id) {\n callback(_this.get(id));\n });\n };\n Members.prototype.setMyID = function (id) {\n this.myID = id;\n };\n Members.prototype.onSubscription = function (subscriptionData) {\n this.members = subscriptionData.presence.hash;\n this.count = subscriptionData.presence.count;\n this.me = this.get(this.myID);\n };\n Members.prototype.addMember = function (memberData) {\n if (this.get(memberData.user_id) === null) {\n this.count++;\n }\n this.members[memberData.user_id] = memberData.user_info;\n return this.get(memberData.user_id);\n };\n Members.prototype.removeMember = function (memberData) {\n var member = this.get(memberData.user_id);\n if (member) {\n delete this.members[memberData.user_id];\n this.count--;\n }\n return member;\n };\n Members.prototype.reset = function () {\n this.members = {};\n this.count = 0;\n this.myID = null;\n this.me = null;\n };\n return Members;\n}());\n/* harmony default export */ var members = (members_Members);\n\n// CONCATENATED MODULE: ./src/core/channels/presence_channel.ts\nvar presence_channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar presence_channel_PresenceChannel = (function (_super) {\n presence_channel_extends(PresenceChannel, _super);\n function PresenceChannel(name, pusher) {\n var _this = _super.call(this, name, pusher) || this;\n _this.members = new members();\n return _this;\n }\n PresenceChannel.prototype.authorize = function (socketId, callback) {\n var _this = this;\n _super.prototype.authorize.call(this, socketId, function (error, authData) {\n if (!error) {\n authData = authData;\n if (authData.channel_data === undefined) {\n var suffix = url_store.buildLogSuffix('authenticationEndpoint');\n logger.error(\"Invalid auth response for channel '\" + _this.name + \"',\" +\n (\"expected 'channel_data' field. \" + suffix));\n callback('Invalid auth response');\n return;\n }\n var channelData = JSON.parse(authData.channel_data);\n _this.members.setMyID(channelData.user_id);\n }\n callback(error, authData);\n });\n };\n PresenceChannel.prototype.handleEvent = function (event) {\n var eventName = event.event;\n if (eventName.indexOf('pusher_internal:') === 0) {\n this.handleInternalEvent(event);\n }\n else {\n var data = event.data;\n var metadata = {};\n if (event.user_id) {\n metadata.user_id = event.user_id;\n }\n this.emit(eventName, data, metadata);\n }\n };\n PresenceChannel.prototype.handleInternalEvent = function (event) {\n var eventName = event.event;\n var data = event.data;\n switch (eventName) {\n case 'pusher_internal:subscription_succeeded':\n this.handleSubscriptionSucceededEvent(event);\n break;\n case 'pusher_internal:member_added':\n var addedMember = this.members.addMember(data);\n this.emit('pusher:member_added', addedMember);\n break;\n case 'pusher_internal:member_removed':\n var removedMember = this.members.removeMember(data);\n if (removedMember) {\n this.emit('pusher:member_removed', removedMember);\n }\n break;\n }\n };\n PresenceChannel.prototype.handleSubscriptionSucceededEvent = function (event) {\n this.subscriptionPending = false;\n this.subscribed = true;\n if (this.subscriptionCancelled) {\n this.pusher.unsubscribe(this.name);\n }\n else {\n this.members.onSubscription(event.data);\n this.emit('pusher:subscription_succeeded', this.members);\n }\n };\n PresenceChannel.prototype.disconnect = function () {\n this.members.reset();\n _super.prototype.disconnect.call(this);\n };\n return PresenceChannel;\n}(private_channel));\n/* harmony default export */ var presence_channel = (presence_channel_PresenceChannel);\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/utf8/lib/utf8.js\nvar utf8 = __webpack_require__(1);\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/base64/lib/base64.js\nvar base64 = __webpack_require__(0);\n\n// CONCATENATED MODULE: ./src/core/channels/encrypted_channel.ts\nvar encrypted_channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar encrypted_channel_EncryptedChannel = (function (_super) {\n encrypted_channel_extends(EncryptedChannel, _super);\n function EncryptedChannel(name, pusher, nacl) {\n var _this = _super.call(this, name, pusher) || this;\n _this.key = null;\n _this.nacl = nacl;\n return _this;\n }\n EncryptedChannel.prototype.authorize = function (socketId, callback) {\n var _this = this;\n _super.prototype.authorize.call(this, socketId, function (error, authData) {\n if (error) {\n callback(error, authData);\n return;\n }\n var sharedSecret = authData['shared_secret'];\n if (!sharedSecret) {\n callback(new Error(\"No shared_secret key in auth payload for encrypted channel: \" + _this.name), null);\n return;\n }\n _this.key = Object(base64[\"decode\"])(sharedSecret);\n delete authData['shared_secret'];\n callback(null, authData);\n });\n };\n EncryptedChannel.prototype.trigger = function (event, data) {\n throw new UnsupportedFeature('Client events are not currently supported for encrypted channels');\n };\n EncryptedChannel.prototype.handleEvent = function (event) {\n var eventName = event.event;\n var data = event.data;\n if (eventName.indexOf('pusher_internal:') === 0 ||\n eventName.indexOf('pusher:') === 0) {\n _super.prototype.handleEvent.call(this, event);\n return;\n }\n this.handleEncryptedEvent(eventName, data);\n };\n EncryptedChannel.prototype.handleEncryptedEvent = function (event, data) {\n var _this = this;\n if (!this.key) {\n logger.debug('Received encrypted event before key has been retrieved from the authEndpoint');\n return;\n }\n if (!data.ciphertext || !data.nonce) {\n logger.error('Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: ' +\n data);\n return;\n }\n var cipherText = Object(base64[\"decode\"])(data.ciphertext);\n if (cipherText.length < this.nacl.secretbox.overheadLength) {\n logger.error(\"Expected encrypted event ciphertext length to be \" + this.nacl.secretbox.overheadLength + \", got: \" + cipherText.length);\n return;\n }\n var nonce = Object(base64[\"decode\"])(data.nonce);\n if (nonce.length < this.nacl.secretbox.nonceLength) {\n logger.error(\"Expected encrypted event nonce length to be \" + this.nacl.secretbox.nonceLength + \", got: \" + nonce.length);\n return;\n }\n var bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);\n if (bytes === null) {\n logger.debug('Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...');\n this.authorize(this.pusher.connection.socket_id, function (error, authData) {\n if (error) {\n logger.error(\"Failed to make a request to the authEndpoint: \" + authData + \". Unable to fetch new key, so dropping encrypted event\");\n return;\n }\n bytes = _this.nacl.secretbox.open(cipherText, nonce, _this.key);\n if (bytes === null) {\n logger.error(\"Failed to decrypt event with new key. Dropping encrypted event\");\n return;\n }\n _this.emit(event, _this.getDataToEmit(bytes));\n return;\n });\n return;\n }\n this.emit(event, this.getDataToEmit(bytes));\n };\n EncryptedChannel.prototype.getDataToEmit = function (bytes) {\n var raw = Object(utf8[\"decode\"])(bytes);\n try {\n return JSON.parse(raw);\n }\n catch (_a) {\n return raw;\n }\n };\n return EncryptedChannel;\n}(private_channel));\n/* harmony default export */ var encrypted_channel = (encrypted_channel_EncryptedChannel);\n\n// CONCATENATED MODULE: ./src/core/connection/connection_manager.ts\nvar connection_manager_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar connection_manager_ConnectionManager = (function (_super) {\n connection_manager_extends(ConnectionManager, _super);\n function ConnectionManager(key, options) {\n var _this = _super.call(this) || this;\n _this.state = 'initialized';\n _this.connection = null;\n _this.key = key;\n _this.options = options;\n _this.timeline = _this.options.timeline;\n _this.usingTLS = _this.options.useTLS;\n _this.errorCallbacks = _this.buildErrorCallbacks();\n _this.connectionCallbacks = _this.buildConnectionCallbacks(_this.errorCallbacks);\n _this.handshakeCallbacks = _this.buildHandshakeCallbacks(_this.errorCallbacks);\n var Network = runtime.getNetwork();\n Network.bind('online', function () {\n _this.timeline.info({ netinfo: 'online' });\n if (_this.state === 'connecting' || _this.state === 'unavailable') {\n _this.retryIn(0);\n }\n });\n Network.bind('offline', function () {\n _this.timeline.info({ netinfo: 'offline' });\n if (_this.connection) {\n _this.sendActivityCheck();\n }\n });\n _this.updateStrategy();\n return _this;\n }\n ConnectionManager.prototype.connect = function () {\n if (this.connection || this.runner) {\n return;\n }\n if (!this.strategy.isSupported()) {\n this.updateState('failed');\n return;\n }\n this.updateState('connecting');\n this.startConnecting();\n this.setUnavailableTimer();\n };\n ConnectionManager.prototype.send = function (data) {\n if (this.connection) {\n return this.connection.send(data);\n }\n else {\n return false;\n }\n };\n ConnectionManager.prototype.send_event = function (name, data, channel) {\n if (this.connection) {\n return this.connection.send_event(name, data, channel);\n }\n else {\n return false;\n }\n };\n ConnectionManager.prototype.disconnect = function () {\n this.disconnectInternally();\n this.updateState('disconnected');\n };\n ConnectionManager.prototype.isUsingTLS = function () {\n return this.usingTLS;\n };\n ConnectionManager.prototype.startConnecting = function () {\n var _this = this;\n var callback = function (error, handshake) {\n if (error) {\n _this.runner = _this.strategy.connect(0, callback);\n }\n else {\n if (handshake.action === 'error') {\n _this.emit('error', {\n type: 'HandshakeError',\n error: handshake.error\n });\n _this.timeline.error({ handshakeError: handshake.error });\n }\n else {\n _this.abortConnecting();\n _this.handshakeCallbacks[handshake.action](handshake);\n }\n }\n };\n this.runner = this.strategy.connect(0, callback);\n };\n ConnectionManager.prototype.abortConnecting = function () {\n if (this.runner) {\n this.runner.abort();\n this.runner = null;\n }\n };\n ConnectionManager.prototype.disconnectInternally = function () {\n this.abortConnecting();\n this.clearRetryTimer();\n this.clearUnavailableTimer();\n if (this.connection) {\n var connection = this.abandonConnection();\n connection.close();\n }\n };\n ConnectionManager.prototype.updateStrategy = function () {\n this.strategy = this.options.getStrategy({\n key: this.key,\n timeline: this.timeline,\n useTLS: this.usingTLS\n });\n };\n ConnectionManager.prototype.retryIn = function (delay) {\n var _this = this;\n this.timeline.info({ action: 'retry', delay: delay });\n if (delay > 0) {\n this.emit('connecting_in', Math.round(delay / 1000));\n }\n this.retryTimer = new OneOffTimer(delay || 0, function () {\n _this.disconnectInternally();\n _this.connect();\n });\n };\n ConnectionManager.prototype.clearRetryTimer = function () {\n if (this.retryTimer) {\n this.retryTimer.ensureAborted();\n this.retryTimer = null;\n }\n };\n ConnectionManager.prototype.setUnavailableTimer = function () {\n var _this = this;\n this.unavailableTimer = new OneOffTimer(this.options.unavailableTimeout, function () {\n _this.updateState('unavailable');\n });\n };\n ConnectionManager.prototype.clearUnavailableTimer = function () {\n if (this.unavailableTimer) {\n this.unavailableTimer.ensureAborted();\n }\n };\n ConnectionManager.prototype.sendActivityCheck = function () {\n var _this = this;\n this.stopActivityCheck();\n this.connection.ping();\n this.activityTimer = new OneOffTimer(this.options.pongTimeout, function () {\n _this.timeline.error({ pong_timed_out: _this.options.pongTimeout });\n _this.retryIn(0);\n });\n };\n ConnectionManager.prototype.resetActivityCheck = function () {\n var _this = this;\n this.stopActivityCheck();\n if (this.connection && !this.connection.handlesActivityChecks()) {\n this.activityTimer = new OneOffTimer(this.activityTimeout, function () {\n _this.sendActivityCheck();\n });\n }\n };\n ConnectionManager.prototype.stopActivityCheck = function () {\n if (this.activityTimer) {\n this.activityTimer.ensureAborted();\n }\n };\n ConnectionManager.prototype.buildConnectionCallbacks = function (errorCallbacks) {\n var _this = this;\n return extend({}, errorCallbacks, {\n message: function (message) {\n _this.resetActivityCheck();\n _this.emit('message', message);\n },\n ping: function () {\n _this.send_event('pusher:pong', {});\n },\n activity: function () {\n _this.resetActivityCheck();\n },\n error: function (error) {\n _this.emit('error', error);\n },\n closed: function () {\n _this.abandonConnection();\n if (_this.shouldRetry()) {\n _this.retryIn(1000);\n }\n }\n });\n };\n ConnectionManager.prototype.buildHandshakeCallbacks = function (errorCallbacks) {\n var _this = this;\n return extend({}, errorCallbacks, {\n connected: function (handshake) {\n _this.activityTimeout = Math.min(_this.options.activityTimeout, handshake.activityTimeout, handshake.connection.activityTimeout || Infinity);\n _this.clearUnavailableTimer();\n _this.setConnection(handshake.connection);\n _this.socket_id = _this.connection.id;\n _this.updateState('connected', { socket_id: _this.socket_id });\n }\n });\n };\n ConnectionManager.prototype.buildErrorCallbacks = function () {\n var _this = this;\n var withErrorEmitted = function (callback) {\n return function (result) {\n if (result.error) {\n _this.emit('error', { type: 'WebSocketError', error: result.error });\n }\n callback(result);\n };\n };\n return {\n tls_only: withErrorEmitted(function () {\n _this.usingTLS = true;\n _this.updateStrategy();\n _this.retryIn(0);\n }),\n refused: withErrorEmitted(function () {\n _this.disconnect();\n }),\n backoff: withErrorEmitted(function () {\n _this.retryIn(1000);\n }),\n retry: withErrorEmitted(function () {\n _this.retryIn(0);\n })\n };\n };\n ConnectionManager.prototype.setConnection = function (connection) {\n this.connection = connection;\n for (var event in this.connectionCallbacks) {\n this.connection.bind(event, this.connectionCallbacks[event]);\n }\n this.resetActivityCheck();\n };\n ConnectionManager.prototype.abandonConnection = function () {\n if (!this.connection) {\n return;\n }\n this.stopActivityCheck();\n for (var event in this.connectionCallbacks) {\n this.connection.unbind(event, this.connectionCallbacks[event]);\n }\n var connection = this.connection;\n this.connection = null;\n return connection;\n };\n ConnectionManager.prototype.updateState = function (newState, data) {\n var previousState = this.state;\n this.state = newState;\n if (previousState !== newState) {\n var newStateDescription = newState;\n if (newStateDescription === 'connected') {\n newStateDescription += ' with new socket ID ' + data.socket_id;\n }\n logger.debug('State changed', previousState + ' -> ' + newStateDescription);\n this.timeline.info({ state: newState, params: data });\n this.emit('state_change', { previous: previousState, current: newState });\n this.emit(newState, data);\n }\n };\n ConnectionManager.prototype.shouldRetry = function () {\n return this.state === 'connecting' || this.state === 'connected';\n };\n return ConnectionManager;\n}(dispatcher));\n/* harmony default export */ var connection_manager = (connection_manager_ConnectionManager);\n\n// CONCATENATED MODULE: ./src/core/channels/channels.ts\n\n\n\n\nvar channels_Channels = (function () {\n function Channels() {\n this.channels = {};\n }\n Channels.prototype.add = function (name, pusher) {\n if (!this.channels[name]) {\n this.channels[name] = createChannel(name, pusher);\n }\n return this.channels[name];\n };\n Channels.prototype.all = function () {\n return values(this.channels);\n };\n Channels.prototype.find = function (name) {\n return this.channels[name];\n };\n Channels.prototype.remove = function (name) {\n var channel = this.channels[name];\n delete this.channels[name];\n return channel;\n };\n Channels.prototype.disconnect = function () {\n objectApply(this.channels, function (channel) {\n channel.disconnect();\n });\n };\n return Channels;\n}());\n/* harmony default export */ var channels = (channels_Channels);\nfunction createChannel(name, pusher) {\n if (name.indexOf('private-encrypted-') === 0) {\n if (pusher.config.nacl) {\n return factory.createEncryptedChannel(name, pusher, pusher.config.nacl);\n }\n var errMsg = 'Tried to subscribe to a private-encrypted- channel but no nacl implementation available';\n var suffix = url_store.buildLogSuffix('encryptedChannelSupport');\n throw new UnsupportedFeature(errMsg + \". \" + suffix);\n }\n else if (name.indexOf('private-') === 0) {\n return factory.createPrivateChannel(name, pusher);\n }\n else if (name.indexOf('presence-') === 0) {\n return factory.createPresenceChannel(name, pusher);\n }\n else {\n return factory.createChannel(name, pusher);\n }\n}\n\n// CONCATENATED MODULE: ./src/core/utils/factory.ts\n\n\n\n\n\n\n\n\n\n\nvar Factory = {\n createChannels: function () {\n return new channels();\n },\n createConnectionManager: function (key, options) {\n return new connection_manager(key, options);\n },\n createChannel: function (name, pusher) {\n return new channels_channel(name, pusher);\n },\n createPrivateChannel: function (name, pusher) {\n return new private_channel(name, pusher);\n },\n createPresenceChannel: function (name, pusher) {\n return new presence_channel(name, pusher);\n },\n createEncryptedChannel: function (name, pusher, nacl) {\n return new encrypted_channel(name, pusher, nacl);\n },\n createTimelineSender: function (timeline, options) {\n return new timeline_sender(timeline, options);\n },\n createAuthorizer: function (channel, options) {\n if (options.authorizer) {\n return options.authorizer(channel, options);\n }\n return new pusher_authorizer(channel, options);\n },\n createHandshake: function (transport, callback) {\n return new connection_handshake(transport, callback);\n },\n createAssistantToTheTransportManager: function (manager, transport, options) {\n return new assistant_to_the_transport_manager(manager, transport, options);\n }\n};\n/* harmony default export */ var factory = (Factory);\n\n// CONCATENATED MODULE: ./src/core/transports/transport_manager.ts\n\nvar transport_manager_TransportManager = (function () {\n function TransportManager(options) {\n this.options = options || {};\n this.livesLeft = this.options.lives || Infinity;\n }\n TransportManager.prototype.getAssistant = function (transport) {\n return factory.createAssistantToTheTransportManager(this, transport, {\n minPingDelay: this.options.minPingDelay,\n maxPingDelay: this.options.maxPingDelay\n });\n };\n TransportManager.prototype.isAlive = function () {\n return this.livesLeft > 0;\n };\n TransportManager.prototype.reportDeath = function () {\n this.livesLeft -= 1;\n };\n return TransportManager;\n}());\n/* harmony default export */ var transport_manager = (transport_manager_TransportManager);\n\n// CONCATENATED MODULE: ./src/core/strategies/sequential_strategy.ts\n\n\n\nvar sequential_strategy_SequentialStrategy = (function () {\n function SequentialStrategy(strategies, options) {\n this.strategies = strategies;\n this.loop = Boolean(options.loop);\n this.failFast = Boolean(options.failFast);\n this.timeout = options.timeout;\n this.timeoutLimit = options.timeoutLimit;\n }\n SequentialStrategy.prototype.isSupported = function () {\n return any(this.strategies, util.method('isSupported'));\n };\n SequentialStrategy.prototype.connect = function (minPriority, callback) {\n var _this = this;\n var strategies = this.strategies;\n var current = 0;\n var timeout = this.timeout;\n var runner = null;\n var tryNextStrategy = function (error, handshake) {\n if (handshake) {\n callback(null, handshake);\n }\n else {\n current = current + 1;\n if (_this.loop) {\n current = current % strategies.length;\n }\n if (current < strategies.length) {\n if (timeout) {\n timeout = timeout * 2;\n if (_this.timeoutLimit) {\n timeout = Math.min(timeout, _this.timeoutLimit);\n }\n }\n runner = _this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: _this.failFast }, tryNextStrategy);\n }\n else {\n callback(true);\n }\n }\n };\n runner = this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: this.failFast }, tryNextStrategy);\n return {\n abort: function () {\n runner.abort();\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n }\n };\n };\n SequentialStrategy.prototype.tryStrategy = function (strategy, minPriority, options, callback) {\n var timer = null;\n var runner = null;\n if (options.timeout > 0) {\n timer = new OneOffTimer(options.timeout, function () {\n runner.abort();\n callback(true);\n });\n }\n runner = strategy.connect(minPriority, function (error, handshake) {\n if (error && timer && timer.isRunning() && !options.failFast) {\n return;\n }\n if (timer) {\n timer.ensureAborted();\n }\n callback(error, handshake);\n });\n return {\n abort: function () {\n if (timer) {\n timer.ensureAborted();\n }\n runner.abort();\n },\n forceMinPriority: function (p) {\n runner.forceMinPriority(p);\n }\n };\n };\n return SequentialStrategy;\n}());\n/* harmony default export */ var sequential_strategy = (sequential_strategy_SequentialStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/best_connected_ever_strategy.ts\n\n\nvar best_connected_ever_strategy_BestConnectedEverStrategy = (function () {\n function BestConnectedEverStrategy(strategies) {\n this.strategies = strategies;\n }\n BestConnectedEverStrategy.prototype.isSupported = function () {\n return any(this.strategies, util.method('isSupported'));\n };\n BestConnectedEverStrategy.prototype.connect = function (minPriority, callback) {\n return connect(this.strategies, minPriority, function (i, runners) {\n return function (error, handshake) {\n runners[i].error = error;\n if (error) {\n if (allRunnersFailed(runners)) {\n callback(true);\n }\n return;\n }\n apply(runners, function (runner) {\n runner.forceMinPriority(handshake.transport.priority);\n });\n callback(null, handshake);\n };\n });\n };\n return BestConnectedEverStrategy;\n}());\n/* harmony default export */ var best_connected_ever_strategy = (best_connected_ever_strategy_BestConnectedEverStrategy);\nfunction connect(strategies, minPriority, callbackBuilder) {\n var runners = map(strategies, function (strategy, i, _, rs) {\n return strategy.connect(minPriority, callbackBuilder(i, rs));\n });\n return {\n abort: function () {\n apply(runners, abortRunner);\n },\n forceMinPriority: function (p) {\n apply(runners, function (runner) {\n runner.forceMinPriority(p);\n });\n }\n };\n}\nfunction allRunnersFailed(runners) {\n return collections_all(runners, function (runner) {\n return Boolean(runner.error);\n });\n}\nfunction abortRunner(runner) {\n if (!runner.error && !runner.aborted) {\n runner.abort();\n runner.aborted = true;\n }\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/cached_strategy.ts\n\n\n\n\nvar cached_strategy_CachedStrategy = (function () {\n function CachedStrategy(strategy, transports, options) {\n this.strategy = strategy;\n this.transports = transports;\n this.ttl = options.ttl || 1800 * 1000;\n this.usingTLS = options.useTLS;\n this.timeline = options.timeline;\n }\n CachedStrategy.prototype.isSupported = function () {\n return this.strategy.isSupported();\n };\n CachedStrategy.prototype.connect = function (minPriority, callback) {\n var usingTLS = this.usingTLS;\n var info = fetchTransportCache(usingTLS);\n var strategies = [this.strategy];\n if (info && info.timestamp + this.ttl >= util.now()) {\n var transport = this.transports[info.transport];\n if (transport) {\n this.timeline.info({\n cached: true,\n transport: info.transport,\n latency: info.latency\n });\n strategies.push(new sequential_strategy([transport], {\n timeout: info.latency * 2 + 1000,\n failFast: true\n }));\n }\n }\n var startTimestamp = util.now();\n var runner = strategies\n .pop()\n .connect(minPriority, function cb(error, handshake) {\n if (error) {\n flushTransportCache(usingTLS);\n if (strategies.length > 0) {\n startTimestamp = util.now();\n runner = strategies.pop().connect(minPriority, cb);\n }\n else {\n callback(error);\n }\n }\n else {\n storeTransportCache(usingTLS, handshake.transport.name, util.now() - startTimestamp);\n callback(null, handshake);\n }\n });\n return {\n abort: function () {\n runner.abort();\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n }\n };\n };\n return CachedStrategy;\n}());\n/* harmony default export */ var cached_strategy = (cached_strategy_CachedStrategy);\nfunction getTransportCacheKey(usingTLS) {\n return 'pusherTransport' + (usingTLS ? 'TLS' : 'NonTLS');\n}\nfunction fetchTransportCache(usingTLS) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n var serializedCache = storage[getTransportCacheKey(usingTLS)];\n if (serializedCache) {\n return JSON.parse(serializedCache);\n }\n }\n catch (e) {\n flushTransportCache(usingTLS);\n }\n }\n return null;\n}\nfunction storeTransportCache(usingTLS, transport, latency) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n storage[getTransportCacheKey(usingTLS)] = safeJSONStringify({\n timestamp: util.now(),\n transport: transport,\n latency: latency\n });\n }\n catch (e) {\n }\n }\n}\nfunction flushTransportCache(usingTLS) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n delete storage[getTransportCacheKey(usingTLS)];\n }\n catch (e) {\n }\n }\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/delayed_strategy.ts\n\nvar delayed_strategy_DelayedStrategy = (function () {\n function DelayedStrategy(strategy, _a) {\n var number = _a.delay;\n this.strategy = strategy;\n this.options = { delay: number };\n }\n DelayedStrategy.prototype.isSupported = function () {\n return this.strategy.isSupported();\n };\n DelayedStrategy.prototype.connect = function (minPriority, callback) {\n var strategy = this.strategy;\n var runner;\n var timer = new OneOffTimer(this.options.delay, function () {\n runner = strategy.connect(minPriority, callback);\n });\n return {\n abort: function () {\n timer.ensureAborted();\n if (runner) {\n runner.abort();\n }\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n }\n };\n };\n return DelayedStrategy;\n}());\n/* harmony default export */ var delayed_strategy = (delayed_strategy_DelayedStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/if_strategy.ts\nvar IfStrategy = (function () {\n function IfStrategy(test, trueBranch, falseBranch) {\n this.test = test;\n this.trueBranch = trueBranch;\n this.falseBranch = falseBranch;\n }\n IfStrategy.prototype.isSupported = function () {\n var branch = this.test() ? this.trueBranch : this.falseBranch;\n return branch.isSupported();\n };\n IfStrategy.prototype.connect = function (minPriority, callback) {\n var branch = this.test() ? this.trueBranch : this.falseBranch;\n return branch.connect(minPriority, callback);\n };\n return IfStrategy;\n}());\n/* harmony default export */ var if_strategy = (IfStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/first_connected_strategy.ts\nvar FirstConnectedStrategy = (function () {\n function FirstConnectedStrategy(strategy) {\n this.strategy = strategy;\n }\n FirstConnectedStrategy.prototype.isSupported = function () {\n return this.strategy.isSupported();\n };\n FirstConnectedStrategy.prototype.connect = function (minPriority, callback) {\n var runner = this.strategy.connect(minPriority, function (error, handshake) {\n if (handshake) {\n runner.abort();\n }\n callback(error, handshake);\n });\n return runner;\n };\n return FirstConnectedStrategy;\n}());\n/* harmony default export */ var first_connected_strategy = (FirstConnectedStrategy);\n\n// CONCATENATED MODULE: ./src/runtimes/web/default_strategy.ts\n\n\n\n\n\n\n\nfunction testSupportsStrategy(strategy) {\n return function () {\n return strategy.isSupported();\n };\n}\nvar getDefaultStrategy = function (config, baseOptions, defineTransport) {\n var definedTransports = {};\n function defineTransportStrategy(name, type, priority, options, manager) {\n var transport = defineTransport(config, name, type, priority, options, manager);\n definedTransports[name] = transport;\n return transport;\n }\n var ws_options = Object.assign({}, baseOptions, {\n hostNonTLS: config.wsHost + ':' + config.wsPort,\n hostTLS: config.wsHost + ':' + config.wssPort,\n httpPath: config.wsPath\n });\n var wss_options = Object.assign({}, ws_options, {\n useTLS: true\n });\n var sockjs_options = Object.assign({}, baseOptions, {\n hostNonTLS: config.httpHost + ':' + config.httpPort,\n hostTLS: config.httpHost + ':' + config.httpsPort,\n httpPath: config.httpPath\n });\n var timeouts = {\n loop: true,\n timeout: 15000,\n timeoutLimit: 60000\n };\n var ws_manager = new transport_manager({\n lives: 2,\n minPingDelay: 10000,\n maxPingDelay: config.activityTimeout\n });\n var streaming_manager = new transport_manager({\n lives: 2,\n minPingDelay: 10000,\n maxPingDelay: config.activityTimeout\n });\n var ws_transport = defineTransportStrategy('ws', 'ws', 3, ws_options, ws_manager);\n var wss_transport = defineTransportStrategy('wss', 'ws', 3, wss_options, ws_manager);\n var sockjs_transport = defineTransportStrategy('sockjs', 'sockjs', 1, sockjs_options);\n var xhr_streaming_transport = defineTransportStrategy('xhr_streaming', 'xhr_streaming', 1, sockjs_options, streaming_manager);\n var xdr_streaming_transport = defineTransportStrategy('xdr_streaming', 'xdr_streaming', 1, sockjs_options, streaming_manager);\n var xhr_polling_transport = defineTransportStrategy('xhr_polling', 'xhr_polling', 1, sockjs_options);\n var xdr_polling_transport = defineTransportStrategy('xdr_polling', 'xdr_polling', 1, sockjs_options);\n var ws_loop = new sequential_strategy([ws_transport], timeouts);\n var wss_loop = new sequential_strategy([wss_transport], timeouts);\n var sockjs_loop = new sequential_strategy([sockjs_transport], timeouts);\n var streaming_loop = new sequential_strategy([\n new if_strategy(testSupportsStrategy(xhr_streaming_transport), xhr_streaming_transport, xdr_streaming_transport)\n ], timeouts);\n var polling_loop = new sequential_strategy([\n new if_strategy(testSupportsStrategy(xhr_polling_transport), xhr_polling_transport, xdr_polling_transport)\n ], timeouts);\n var http_loop = new sequential_strategy([\n new if_strategy(testSupportsStrategy(streaming_loop), new best_connected_ever_strategy([\n streaming_loop,\n new delayed_strategy(polling_loop, { delay: 4000 })\n ]), polling_loop)\n ], timeouts);\n var http_fallback_loop = new if_strategy(testSupportsStrategy(http_loop), http_loop, sockjs_loop);\n var wsStrategy;\n if (baseOptions.useTLS) {\n wsStrategy = new best_connected_ever_strategy([\n ws_loop,\n new delayed_strategy(http_fallback_loop, { delay: 2000 })\n ]);\n }\n else {\n wsStrategy = new best_connected_ever_strategy([\n ws_loop,\n new delayed_strategy(wss_loop, { delay: 2000 }),\n new delayed_strategy(http_fallback_loop, { delay: 5000 })\n ]);\n }\n return new cached_strategy(new first_connected_strategy(new if_strategy(testSupportsStrategy(ws_transport), wsStrategy, http_fallback_loop)), definedTransports, {\n ttl: 1800000,\n timeline: baseOptions.timeline,\n useTLS: baseOptions.useTLS\n });\n};\n/* harmony default export */ var default_strategy = (getDefaultStrategy);\n\n// CONCATENATED MODULE: ./src/runtimes/web/transports/transport_connection_initializer.ts\n\n/* harmony default export */ var transport_connection_initializer = (function () {\n var self = this;\n self.timeline.info(self.buildTimelineMessage({\n transport: self.name + (self.options.useTLS ? 's' : '')\n }));\n if (self.hooks.isInitialized()) {\n self.changeState('initialized');\n }\n else if (self.hooks.file) {\n self.changeState('initializing');\n Dependencies.load(self.hooks.file, { useTLS: self.options.useTLS }, function (error, callback) {\n if (self.hooks.isInitialized()) {\n self.changeState('initialized');\n callback(true);\n }\n else {\n if (error) {\n self.onError(error);\n }\n self.onClose();\n callback(false);\n }\n });\n }\n else {\n self.onClose();\n }\n});\n\n// CONCATENATED MODULE: ./src/runtimes/web/http/http_xdomain_request.ts\n\nvar http_xdomain_request_hooks = {\n getRequest: function (socket) {\n var xdr = new window.XDomainRequest();\n xdr.ontimeout = function () {\n socket.emit('error', new RequestTimedOut());\n socket.close();\n };\n xdr.onerror = function (e) {\n socket.emit('error', e);\n socket.close();\n };\n xdr.onprogress = function () {\n if (xdr.responseText && xdr.responseText.length > 0) {\n socket.onChunk(200, xdr.responseText);\n }\n };\n xdr.onload = function () {\n if (xdr.responseText && xdr.responseText.length > 0) {\n socket.onChunk(200, xdr.responseText);\n }\n socket.emit('finished', 200);\n socket.close();\n };\n return xdr;\n },\n abortRequest: function (xdr) {\n xdr.ontimeout = xdr.onerror = xdr.onprogress = xdr.onload = null;\n xdr.abort();\n }\n};\n/* harmony default export */ var http_xdomain_request = (http_xdomain_request_hooks);\n\n// CONCATENATED MODULE: ./src/core/http/http_request.ts\nvar http_request_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar MAX_BUFFER_LENGTH = 256 * 1024;\nvar http_request_HTTPRequest = (function (_super) {\n http_request_extends(HTTPRequest, _super);\n function HTTPRequest(hooks, method, url) {\n var _this = _super.call(this) || this;\n _this.hooks = hooks;\n _this.method = method;\n _this.url = url;\n return _this;\n }\n HTTPRequest.prototype.start = function (payload) {\n var _this = this;\n this.position = 0;\n this.xhr = this.hooks.getRequest(this);\n this.unloader = function () {\n _this.close();\n };\n runtime.addUnloadListener(this.unloader);\n this.xhr.open(this.method, this.url, true);\n if (this.xhr.setRequestHeader) {\n this.xhr.setRequestHeader('Content-Type', 'application/json');\n }\n this.xhr.send(payload);\n };\n HTTPRequest.prototype.close = function () {\n if (this.unloader) {\n runtime.removeUnloadListener(this.unloader);\n this.unloader = null;\n }\n if (this.xhr) {\n this.hooks.abortRequest(this.xhr);\n this.xhr = null;\n }\n };\n HTTPRequest.prototype.onChunk = function (status, data) {\n while (true) {\n var chunk = this.advanceBuffer(data);\n if (chunk) {\n this.emit('chunk', { status: status, data: chunk });\n }\n else {\n break;\n }\n }\n if (this.isBufferTooLong(data)) {\n this.emit('buffer_too_long');\n }\n };\n HTTPRequest.prototype.advanceBuffer = function (buffer) {\n var unreadData = buffer.slice(this.position);\n var endOfLinePosition = unreadData.indexOf('\\n');\n if (endOfLinePosition !== -1) {\n this.position += endOfLinePosition + 1;\n return unreadData.slice(0, endOfLinePosition);\n }\n else {\n return null;\n }\n };\n HTTPRequest.prototype.isBufferTooLong = function (buffer) {\n return this.position === buffer.length && buffer.length > MAX_BUFFER_LENGTH;\n };\n return HTTPRequest;\n}(dispatcher));\n/* harmony default export */ var http_request = (http_request_HTTPRequest);\n\n// CONCATENATED MODULE: ./src/core/http/state.ts\nvar State;\n(function (State) {\n State[State[\"CONNECTING\"] = 0] = \"CONNECTING\";\n State[State[\"OPEN\"] = 1] = \"OPEN\";\n State[State[\"CLOSED\"] = 3] = \"CLOSED\";\n})(State || (State = {}));\n/* harmony default export */ var state = (State);\n\n// CONCATENATED MODULE: ./src/core/http/http_socket.ts\n\n\n\nvar autoIncrement = 1;\nvar http_socket_HTTPSocket = (function () {\n function HTTPSocket(hooks, url) {\n this.hooks = hooks;\n this.session = randomNumber(1000) + '/' + randomString(8);\n this.location = getLocation(url);\n this.readyState = state.CONNECTING;\n this.openStream();\n }\n HTTPSocket.prototype.send = function (payload) {\n return this.sendRaw(JSON.stringify([payload]));\n };\n HTTPSocket.prototype.ping = function () {\n this.hooks.sendHeartbeat(this);\n };\n HTTPSocket.prototype.close = function (code, reason) {\n this.onClose(code, reason, true);\n };\n HTTPSocket.prototype.sendRaw = function (payload) {\n if (this.readyState === state.OPEN) {\n try {\n runtime.createSocketRequest('POST', getUniqueURL(getSendURL(this.location, this.session))).start(payload);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n else {\n return false;\n }\n };\n HTTPSocket.prototype.reconnect = function () {\n this.closeStream();\n this.openStream();\n };\n HTTPSocket.prototype.onClose = function (code, reason, wasClean) {\n this.closeStream();\n this.readyState = state.CLOSED;\n if (this.onclose) {\n this.onclose({\n code: code,\n reason: reason,\n wasClean: wasClean\n });\n }\n };\n HTTPSocket.prototype.onChunk = function (chunk) {\n if (chunk.status !== 200) {\n return;\n }\n if (this.readyState === state.OPEN) {\n this.onActivity();\n }\n var payload;\n var type = chunk.data.slice(0, 1);\n switch (type) {\n case 'o':\n payload = JSON.parse(chunk.data.slice(1) || '{}');\n this.onOpen(payload);\n break;\n case 'a':\n payload = JSON.parse(chunk.data.slice(1) || '[]');\n for (var i = 0; i < payload.length; i++) {\n this.onEvent(payload[i]);\n }\n break;\n case 'm':\n payload = JSON.parse(chunk.data.slice(1) || 'null');\n this.onEvent(payload);\n break;\n case 'h':\n this.hooks.onHeartbeat(this);\n break;\n case 'c':\n payload = JSON.parse(chunk.data.slice(1) || '[]');\n this.onClose(payload[0], payload[1], true);\n break;\n }\n };\n HTTPSocket.prototype.onOpen = function (options) {\n if (this.readyState === state.CONNECTING) {\n if (options && options.hostname) {\n this.location.base = replaceHost(this.location.base, options.hostname);\n }\n this.readyState = state.OPEN;\n if (this.onopen) {\n this.onopen();\n }\n }\n else {\n this.onClose(1006, 'Server lost session', true);\n }\n };\n HTTPSocket.prototype.onEvent = function (event) {\n if (this.readyState === state.OPEN && this.onmessage) {\n this.onmessage({ data: event });\n }\n };\n HTTPSocket.prototype.onActivity = function () {\n if (this.onactivity) {\n this.onactivity();\n }\n };\n HTTPSocket.prototype.onError = function (error) {\n if (this.onerror) {\n this.onerror(error);\n }\n };\n HTTPSocket.prototype.openStream = function () {\n var _this = this;\n this.stream = runtime.createSocketRequest('POST', getUniqueURL(this.hooks.getReceiveURL(this.location, this.session)));\n this.stream.bind('chunk', function (chunk) {\n _this.onChunk(chunk);\n });\n this.stream.bind('finished', function (status) {\n _this.hooks.onFinished(_this, status);\n });\n this.stream.bind('buffer_too_long', function () {\n _this.reconnect();\n });\n try {\n this.stream.start();\n }\n catch (error) {\n util.defer(function () {\n _this.onError(error);\n _this.onClose(1006, 'Could not start streaming', false);\n });\n }\n };\n HTTPSocket.prototype.closeStream = function () {\n if (this.stream) {\n this.stream.unbind_all();\n this.stream.close();\n this.stream = null;\n }\n };\n return HTTPSocket;\n}());\nfunction getLocation(url) {\n var parts = /([^\\?]*)\\/*(\\??.*)/.exec(url);\n return {\n base: parts[1],\n queryString: parts[2]\n };\n}\nfunction getSendURL(url, session) {\n return url.base + '/' + session + '/xhr_send';\n}\nfunction getUniqueURL(url) {\n var separator = url.indexOf('?') === -1 ? '?' : '&';\n return url + separator + 't=' + +new Date() + '&n=' + autoIncrement++;\n}\nfunction replaceHost(url, hostname) {\n var urlParts = /(https?:\\/\\/)([^\\/:]+)((\\/|:)?.*)/.exec(url);\n return urlParts[1] + hostname + urlParts[3];\n}\nfunction randomNumber(max) {\n return Math.floor(Math.random() * max);\n}\nfunction randomString(length) {\n var result = [];\n for (var i = 0; i < length; i++) {\n result.push(randomNumber(32).toString(32));\n }\n return result.join('');\n}\n/* harmony default export */ var http_socket = (http_socket_HTTPSocket);\n\n// CONCATENATED MODULE: ./src/core/http/http_streaming_socket.ts\nvar http_streaming_socket_hooks = {\n getReceiveURL: function (url, session) {\n return url.base + '/' + session + '/xhr_streaming' + url.queryString;\n },\n onHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n sendHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n onFinished: function (socket, status) {\n socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n }\n};\n/* harmony default export */ var http_streaming_socket = (http_streaming_socket_hooks);\n\n// CONCATENATED MODULE: ./src/core/http/http_polling_socket.ts\nvar http_polling_socket_hooks = {\n getReceiveURL: function (url, session) {\n return url.base + '/' + session + '/xhr' + url.queryString;\n },\n onHeartbeat: function () {\n },\n sendHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n onFinished: function (socket, status) {\n if (status === 200) {\n socket.reconnect();\n }\n else {\n socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n }\n }\n};\n/* harmony default export */ var http_polling_socket = (http_polling_socket_hooks);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http_xhr_request.ts\n\nvar http_xhr_request_hooks = {\n getRequest: function (socket) {\n var Constructor = runtime.getXHRAPI();\n var xhr = new Constructor();\n xhr.onreadystatechange = xhr.onprogress = function () {\n switch (xhr.readyState) {\n case 3:\n if (xhr.responseText && xhr.responseText.length > 0) {\n socket.onChunk(xhr.status, xhr.responseText);\n }\n break;\n case 4:\n if (xhr.responseText && xhr.responseText.length > 0) {\n socket.onChunk(xhr.status, xhr.responseText);\n }\n socket.emit('finished', xhr.status);\n socket.close();\n break;\n }\n };\n return xhr;\n },\n abortRequest: function (xhr) {\n xhr.onreadystatechange = null;\n xhr.abort();\n }\n};\n/* harmony default export */ var http_xhr_request = (http_xhr_request_hooks);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http.ts\n\n\n\n\n\nvar HTTP = {\n createStreamingSocket: function (url) {\n return this.createSocket(http_streaming_socket, url);\n },\n createPollingSocket: function (url) {\n return this.createSocket(http_polling_socket, url);\n },\n createSocket: function (hooks, url) {\n return new http_socket(hooks, url);\n },\n createXHR: function (method, url) {\n return this.createRequest(http_xhr_request, method, url);\n },\n createRequest: function (hooks, method, url) {\n return new http_request(hooks, method, url);\n }\n};\n/* harmony default export */ var http_http = (HTTP);\n\n// CONCATENATED MODULE: ./src/runtimes/web/http/http.ts\n\n\nhttp_http.createXDR = function (method, url) {\n return this.createRequest(http_xdomain_request, method, url);\n};\n/* harmony default export */ var web_http_http = (http_http);\n\n// CONCATENATED MODULE: ./src/runtimes/web/runtime.ts\n\n\n\n\n\n\n\n\n\n\n\n\nvar Runtime = {\n nextAuthCallbackID: 1,\n auth_callbacks: {},\n ScriptReceivers: ScriptReceivers,\n DependenciesReceivers: DependenciesReceivers,\n getDefaultStrategy: default_strategy,\n Transports: transports_transports,\n transportConnectionInitializer: transport_connection_initializer,\n HTTPFactory: web_http_http,\n TimelineTransport: jsonp_timeline,\n getXHRAPI: function () {\n return window.XMLHttpRequest;\n },\n getWebSocketAPI: function () {\n return window.WebSocket || window.MozWebSocket;\n },\n setup: function (PusherClass) {\n var _this = this;\n window.Pusher = PusherClass;\n var initializeOnDocumentBody = function () {\n _this.onDocumentBody(PusherClass.ready);\n };\n if (!window.JSON) {\n Dependencies.load('json2', {}, initializeOnDocumentBody);\n }\n else {\n initializeOnDocumentBody();\n }\n },\n getDocument: function () {\n return document;\n },\n getProtocol: function () {\n return this.getDocument().location.protocol;\n },\n getAuthorizers: function () {\n return { ajax: xhr_auth, jsonp: jsonp_auth };\n },\n onDocumentBody: function (callback) {\n var _this = this;\n if (document.body) {\n callback();\n }\n else {\n setTimeout(function () {\n _this.onDocumentBody(callback);\n }, 0);\n }\n },\n createJSONPRequest: function (url, data) {\n return new jsonp_request(url, data);\n },\n createScriptRequest: function (src) {\n return new script_request(src);\n },\n getLocalStorage: function () {\n try {\n return window.localStorage;\n }\n catch (e) {\n return undefined;\n }\n },\n createXHR: function () {\n if (this.getXHRAPI()) {\n return this.createXMLHttpRequest();\n }\n else {\n return this.createMicrosoftXHR();\n }\n },\n createXMLHttpRequest: function () {\n var Constructor = this.getXHRAPI();\n return new Constructor();\n },\n createMicrosoftXHR: function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n getNetwork: function () {\n return net_info_Network;\n },\n createWebSocket: function (url) {\n var Constructor = this.getWebSocketAPI();\n return new Constructor(url);\n },\n createSocketRequest: function (method, url) {\n if (this.isXHRSupported()) {\n return this.HTTPFactory.createXHR(method, url);\n }\n else if (this.isXDRSupported(url.indexOf('https:') === 0)) {\n return this.HTTPFactory.createXDR(method, url);\n }\n else {\n throw 'Cross-origin HTTP requests are not supported';\n }\n },\n isXHRSupported: function () {\n var Constructor = this.getXHRAPI();\n return (Boolean(Constructor) && new Constructor().withCredentials !== undefined);\n },\n isXDRSupported: function (useTLS) {\n var protocol = useTLS ? 'https:' : 'http:';\n var documentProtocol = this.getProtocol();\n return (Boolean(window['XDomainRequest']) && documentProtocol === protocol);\n },\n addUnloadListener: function (listener) {\n if (window.addEventListener !== undefined) {\n window.addEventListener('unload', listener, false);\n }\n else if (window.attachEvent !== undefined) {\n window.attachEvent('onunload', listener);\n }\n },\n removeUnloadListener: function (listener) {\n if (window.addEventListener !== undefined) {\n window.removeEventListener('unload', listener, false);\n }\n else if (window.detachEvent !== undefined) {\n window.detachEvent('onunload', listener);\n }\n }\n};\n/* harmony default export */ var runtime = (Runtime);\n\n// CONCATENATED MODULE: ./src/core/timeline/level.ts\nvar TimelineLevel;\n(function (TimelineLevel) {\n TimelineLevel[TimelineLevel[\"ERROR\"] = 3] = \"ERROR\";\n TimelineLevel[TimelineLevel[\"INFO\"] = 6] = \"INFO\";\n TimelineLevel[TimelineLevel[\"DEBUG\"] = 7] = \"DEBUG\";\n})(TimelineLevel || (TimelineLevel = {}));\n/* harmony default export */ var timeline_level = (TimelineLevel);\n\n// CONCATENATED MODULE: ./src/core/timeline/timeline.ts\n\n\n\nvar timeline_Timeline = (function () {\n function Timeline(key, session, options) {\n this.key = key;\n this.session = session;\n this.events = [];\n this.options = options || {};\n this.sent = 0;\n this.uniqueID = 0;\n }\n Timeline.prototype.log = function (level, event) {\n if (level <= this.options.level) {\n this.events.push(extend({}, event, { timestamp: util.now() }));\n if (this.options.limit && this.events.length > this.options.limit) {\n this.events.shift();\n }\n }\n };\n Timeline.prototype.error = function (event) {\n this.log(timeline_level.ERROR, event);\n };\n Timeline.prototype.info = function (event) {\n this.log(timeline_level.INFO, event);\n };\n Timeline.prototype.debug = function (event) {\n this.log(timeline_level.DEBUG, event);\n };\n Timeline.prototype.isEmpty = function () {\n return this.events.length === 0;\n };\n Timeline.prototype.send = function (sendfn, callback) {\n var _this = this;\n var data = extend({\n session: this.session,\n bundle: this.sent + 1,\n key: this.key,\n lib: 'js',\n version: this.options.version,\n cluster: this.options.cluster,\n features: this.options.features,\n timeline: this.events\n }, this.options.params);\n this.events = [];\n sendfn(data, function (error, result) {\n if (!error) {\n _this.sent++;\n }\n if (callback) {\n callback(error, result);\n }\n });\n return true;\n };\n Timeline.prototype.generateUniqueID = function () {\n this.uniqueID++;\n return this.uniqueID;\n };\n return Timeline;\n}());\n/* harmony default export */ var timeline_timeline = (timeline_Timeline);\n\n// CONCATENATED MODULE: ./src/core/strategies/transport_strategy.ts\n\n\n\n\nvar transport_strategy_TransportStrategy = (function () {\n function TransportStrategy(name, priority, transport, options) {\n this.name = name;\n this.priority = priority;\n this.transport = transport;\n this.options = options || {};\n }\n TransportStrategy.prototype.isSupported = function () {\n return this.transport.isSupported({\n useTLS: this.options.useTLS\n });\n };\n TransportStrategy.prototype.connect = function (minPriority, callback) {\n var _this = this;\n if (!this.isSupported()) {\n return failAttempt(new UnsupportedStrategy(), callback);\n }\n else if (this.priority < minPriority) {\n return failAttempt(new TransportPriorityTooLow(), callback);\n }\n var connected = false;\n var transport = this.transport.createConnection(this.name, this.priority, this.options.key, this.options);\n var handshake = null;\n var onInitialized = function () {\n transport.unbind('initialized', onInitialized);\n transport.connect();\n };\n var onOpen = function () {\n handshake = factory.createHandshake(transport, function (result) {\n connected = true;\n unbindListeners();\n callback(null, result);\n });\n };\n var onError = function (error) {\n unbindListeners();\n callback(error);\n };\n var onClosed = function () {\n unbindListeners();\n var serializedTransport;\n serializedTransport = safeJSONStringify(transport);\n callback(new TransportClosed(serializedTransport));\n };\n var unbindListeners = function () {\n transport.unbind('initialized', onInitialized);\n transport.unbind('open', onOpen);\n transport.unbind('error', onError);\n transport.unbind('closed', onClosed);\n };\n transport.bind('initialized', onInitialized);\n transport.bind('open', onOpen);\n transport.bind('error', onError);\n transport.bind('closed', onClosed);\n transport.initialize();\n return {\n abort: function () {\n if (connected) {\n return;\n }\n unbindListeners();\n if (handshake) {\n handshake.close();\n }\n else {\n transport.close();\n }\n },\n forceMinPriority: function (p) {\n if (connected) {\n return;\n }\n if (_this.priority < p) {\n if (handshake) {\n handshake.close();\n }\n else {\n transport.close();\n }\n }\n }\n };\n };\n return TransportStrategy;\n}());\n/* harmony default export */ var transport_strategy = (transport_strategy_TransportStrategy);\nfunction failAttempt(error, callback) {\n util.defer(function () {\n callback(error);\n });\n return {\n abort: function () { },\n forceMinPriority: function () { }\n };\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/strategy_builder.ts\n\n\n\n\n\nvar strategy_builder_Transports = runtime.Transports;\nvar strategy_builder_defineTransport = function (config, name, type, priority, options, manager) {\n var transportClass = strategy_builder_Transports[type];\n if (!transportClass) {\n throw new UnsupportedTransport(type);\n }\n var enabled = (!config.enabledTransports ||\n arrayIndexOf(config.enabledTransports, name) !== -1) &&\n (!config.disabledTransports ||\n arrayIndexOf(config.disabledTransports, name) === -1);\n var transport;\n if (enabled) {\n options = Object.assign({ ignoreNullOrigin: config.ignoreNullOrigin }, options);\n transport = new transport_strategy(name, priority, manager ? manager.getAssistant(transportClass) : transportClass, options);\n }\n else {\n transport = strategy_builder_UnsupportedStrategy;\n }\n return transport;\n};\nvar strategy_builder_UnsupportedStrategy = {\n isSupported: function () {\n return false;\n },\n connect: function (_, callback) {\n var deferred = util.defer(function () {\n callback(new UnsupportedStrategy());\n });\n return {\n abort: function () {\n deferred.ensureAborted();\n },\n forceMinPriority: function () { }\n };\n }\n};\n\n// CONCATENATED MODULE: ./src/core/config.ts\n\n\nfunction getConfig(opts) {\n var config = {\n activityTimeout: opts.activityTimeout || defaults.activityTimeout,\n authEndpoint: opts.authEndpoint || defaults.authEndpoint,\n authTransport: opts.authTransport || defaults.authTransport,\n cluster: opts.cluster || defaults.cluster,\n httpPath: opts.httpPath || defaults.httpPath,\n httpPort: opts.httpPort || defaults.httpPort,\n httpsPort: opts.httpsPort || defaults.httpsPort,\n pongTimeout: opts.pongTimeout || defaults.pongTimeout,\n statsHost: opts.statsHost || defaults.stats_host,\n unavailableTimeout: opts.unavailableTimeout || defaults.unavailableTimeout,\n wsPath: opts.wsPath || defaults.wsPath,\n wsPort: opts.wsPort || defaults.wsPort,\n wssPort: opts.wssPort || defaults.wssPort,\n enableStats: getEnableStatsConfig(opts),\n httpHost: getHttpHost(opts),\n useTLS: shouldUseTLS(opts),\n wsHost: getWebsocketHost(opts)\n };\n if ('auth' in opts)\n config.auth = opts.auth;\n if ('authorizer' in opts)\n config.authorizer = opts.authorizer;\n if ('disabledTransports' in opts)\n config.disabledTransports = opts.disabledTransports;\n if ('enabledTransports' in opts)\n config.enabledTransports = opts.enabledTransports;\n if ('ignoreNullOrigin' in opts)\n config.ignoreNullOrigin = opts.ignoreNullOrigin;\n if ('timelineParams' in opts)\n config.timelineParams = opts.timelineParams;\n if ('nacl' in opts) {\n config.nacl = opts.nacl;\n }\n return config;\n}\nfunction getHttpHost(opts) {\n if (opts.httpHost) {\n return opts.httpHost;\n }\n if (opts.cluster) {\n return \"sockjs-\" + opts.cluster + \".pusher.com\";\n }\n return defaults.httpHost;\n}\nfunction getWebsocketHost(opts) {\n if (opts.wsHost) {\n return opts.wsHost;\n }\n if (opts.cluster) {\n return getWebsocketHostFromCluster(opts.cluster);\n }\n return getWebsocketHostFromCluster(defaults.cluster);\n}\nfunction getWebsocketHostFromCluster(cluster) {\n return \"ws-\" + cluster + \".pusher.com\";\n}\nfunction shouldUseTLS(opts) {\n if (runtime.getProtocol() === 'https:') {\n return true;\n }\n else if (opts.forceTLS === false) {\n return false;\n }\n return true;\n}\nfunction getEnableStatsConfig(opts) {\n if ('enableStats' in opts) {\n return opts.enableStats;\n }\n if ('disableStats' in opts) {\n return !opts.disableStats;\n }\n return false;\n}\n\n// CONCATENATED MODULE: ./src/core/pusher.ts\n\n\n\n\n\n\n\n\n\n\n\n\nvar pusher_Pusher = (function () {\n function Pusher(app_key, options) {\n var _this = this;\n checkAppKey(app_key);\n options = options || {};\n if (!options.cluster && !(options.wsHost || options.httpHost)) {\n var suffix = url_store.buildLogSuffix('javascriptQuickStart');\n logger.warn(\"You should always specify a cluster when connecting. \" + suffix);\n }\n if ('disableStats' in options) {\n logger.warn('The disableStats option is deprecated in favor of enableStats');\n }\n this.key = app_key;\n this.config = getConfig(options);\n this.channels = factory.createChannels();\n this.global_emitter = new dispatcher();\n this.sessionID = Math.floor(Math.random() * 1000000000);\n this.timeline = new timeline_timeline(this.key, this.sessionID, {\n cluster: this.config.cluster,\n features: Pusher.getClientFeatures(),\n params: this.config.timelineParams || {},\n limit: 50,\n level: timeline_level.INFO,\n version: defaults.VERSION\n });\n if (this.config.enableStats) {\n this.timelineSender = factory.createTimelineSender(this.timeline, {\n host: this.config.statsHost,\n path: '/timeline/v2/' + runtime.TimelineTransport.name\n });\n }\n var getStrategy = function (options) {\n return runtime.getDefaultStrategy(_this.config, options, strategy_builder_defineTransport);\n };\n this.connection = factory.createConnectionManager(this.key, {\n getStrategy: getStrategy,\n timeline: this.timeline,\n activityTimeout: this.config.activityTimeout,\n pongTimeout: this.config.pongTimeout,\n unavailableTimeout: this.config.unavailableTimeout,\n useTLS: Boolean(this.config.useTLS)\n });\n this.connection.bind('connected', function () {\n _this.subscribeAll();\n if (_this.timelineSender) {\n _this.timelineSender.send(_this.connection.isUsingTLS());\n }\n });\n this.connection.bind('message', function (event) {\n var eventName = event.event;\n var internal = eventName.indexOf('pusher_internal:') === 0;\n if (event.channel) {\n var channel = _this.channel(event.channel);\n if (channel) {\n channel.handleEvent(event);\n }\n }\n if (!internal) {\n _this.global_emitter.emit(event.event, event.data);\n }\n });\n this.connection.bind('connecting', function () {\n _this.channels.disconnect();\n });\n this.connection.bind('disconnected', function () {\n _this.channels.disconnect();\n });\n this.connection.bind('error', function (err) {\n logger.warn(err);\n });\n Pusher.instances.push(this);\n this.timeline.info({ instances: Pusher.instances.length });\n if (Pusher.isReady) {\n this.connect();\n }\n }\n Pusher.ready = function () {\n Pusher.isReady = true;\n for (var i = 0, l = Pusher.instances.length; i < l; i++) {\n Pusher.instances[i].connect();\n }\n };\n Pusher.getClientFeatures = function () {\n return keys(filterObject({ ws: runtime.Transports.ws }, function (t) {\n return t.isSupported({});\n }));\n };\n Pusher.prototype.channel = function (name) {\n return this.channels.find(name);\n };\n Pusher.prototype.allChannels = function () {\n return this.channels.all();\n };\n Pusher.prototype.connect = function () {\n this.connection.connect();\n if (this.timelineSender) {\n if (!this.timelineSenderTimer) {\n var usingTLS = this.connection.isUsingTLS();\n var timelineSender = this.timelineSender;\n this.timelineSenderTimer = new PeriodicTimer(60000, function () {\n timelineSender.send(usingTLS);\n });\n }\n }\n };\n Pusher.prototype.disconnect = function () {\n this.connection.disconnect();\n if (this.timelineSenderTimer) {\n this.timelineSenderTimer.ensureAborted();\n this.timelineSenderTimer = null;\n }\n };\n Pusher.prototype.bind = function (event_name, callback, context) {\n this.global_emitter.bind(event_name, callback, context);\n return this;\n };\n Pusher.prototype.unbind = function (event_name, callback, context) {\n this.global_emitter.unbind(event_name, callback, context);\n return this;\n };\n Pusher.prototype.bind_global = function (callback) {\n this.global_emitter.bind_global(callback);\n return this;\n };\n Pusher.prototype.unbind_global = function (callback) {\n this.global_emitter.unbind_global(callback);\n return this;\n };\n Pusher.prototype.unbind_all = function (callback) {\n this.global_emitter.unbind_all();\n return this;\n };\n Pusher.prototype.subscribeAll = function () {\n var channelName;\n for (channelName in this.channels.channels) {\n if (this.channels.channels.hasOwnProperty(channelName)) {\n this.subscribe(channelName);\n }\n }\n };\n Pusher.prototype.subscribe = function (channel_name) {\n var channel = this.channels.add(channel_name, this);\n if (channel.subscriptionPending && channel.subscriptionCancelled) {\n channel.reinstateSubscription();\n }\n else if (!channel.subscriptionPending &&\n this.connection.state === 'connected') {\n channel.subscribe();\n }\n return channel;\n };\n Pusher.prototype.unsubscribe = function (channel_name) {\n var channel = this.channels.find(channel_name);\n if (channel && channel.subscriptionPending) {\n channel.cancelSubscription();\n }\n else {\n channel = this.channels.remove(channel_name);\n if (channel && channel.subscribed) {\n channel.unsubscribe();\n }\n }\n };\n Pusher.prototype.send_event = function (event_name, data, channel) {\n return this.connection.send_event(event_name, data, channel);\n };\n Pusher.prototype.shouldUseTLS = function () {\n return this.config.useTLS;\n };\n Pusher.instances = [];\n Pusher.isReady = false;\n Pusher.logToConsole = false;\n Pusher.Runtime = runtime;\n Pusher.ScriptReceivers = runtime.ScriptReceivers;\n Pusher.DependenciesReceivers = runtime.DependenciesReceivers;\n Pusher.auth_callbacks = runtime.auth_callbacks;\n return Pusher;\n}());\n/* harmony default export */ var core_pusher = __webpack_exports__[\"default\"] = (pusher_Pusher);\nfunction checkAppKey(key) {\n if (key === null || key === undefined) {\n throw 'You must pass your app key when you instantiate Pusher.';\n }\n}\nruntime.setup(pusher_Pusher);\n\n\n/***/ })\n/******/ ]);\n});","/** @license React v17.0.2\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),m=require(\"object-assign\"),r=require(\"scheduler\");function y(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+\"Capture\",b)}\nfunction ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}\nvar fa=!(\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement),ha=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,ia=Object.prototype.hasOwnProperty,\nja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case \"function\":case \"symbol\":return!0;case \"boolean\":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return\"data-\"!==a&&\"aria-\"!==a;default:return!1}}\nfunction na(a,b,c,d){if(null===b||\"undefined\"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||\"o\"!==b[0]&&\"O\"!==b[0]||\"n\"!==b[1]&&\"N\"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,\"\"+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:\"\":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?\"\":\"\"+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}\nvar ra=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var E=Symbol.for;sa=E(\"react.element\");ta=E(\"react.portal\");ua=E(\"react.fragment\");wa=E(\"react.strict_mode\");xa=E(\"react.profiler\");ya=E(\"react.provider\");za=E(\"react.context\");Aa=E(\"react.forward_ref\");Ba=E(\"react.suspense\");Ca=E(\"react.suspense_list\");Da=E(\"react.memo\");Ea=E(\"react.lazy\");Fa=E(\"react.block\");E(\"react.scope\");Ga=E(\"react.opaque.id\");Ha=E(\"react.debug_trace_mode\");Ia=E(\"react.offscreen\");Ja=E(\"react.legacy_hidden\")}\nvar Ka=\"function\"===typeof Symbol&&Symbol.iterator;function La(a){if(null===a||\"object\"!==typeof a)return null;a=Ka&&a[Ka]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}var Ma;function Na(a){if(void 0===Ma)try{throw Error();}catch(c){var b=c.stack.trim().match(/\\n( *(at )?)/);Ma=b&&b[1]||\"\"}return\"\\n\"+Ma+a}var Oa=!1;\nfunction Pa(a,b){if(!a||Oa)return\"\";Oa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,\"props\",{set:function(){throw Error();}}),\"object\"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&\"string\"===typeof k.stack){for(var e=k.stack.split(\"\\n\"),\nf=d.stack.split(\"\\n\"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b[\"$\"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty(\"$\"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=\"\"+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}\nfunction gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(y(91));return m({},b,{value:void 0,defaultValue:void 0,children:\"\"+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(y(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"<svg>\"+b.valueOf().toString()+\"</svg>\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(a,b,c,d,e){return a(b,c,d,e)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){if(null!==zb||null!==Ab)Ib(),Fb()}\nfunction Nb(a,b,c){if(Lb)return a(b,c);Lb=!0;try{return Jb(a,b,c)}finally{Lb=!1,Mb()}}\nfunction Ob(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==\ntypeof c)throw Error(y(231,b,typeof c));return c}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,\"passive\",{get:function(){Pb=!0}});window.addEventListener(\"test\",Qb,Qb);window.removeEventListener(\"test\",Qb,Qb)}catch(a){Pb=!1}function Rb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(n){this.onError(n)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(a){Sb=!0;Tb=a}};function Xb(a,b,c,d,e,f,g,h,k){Sb=!1;Tb=null;Rb.apply(Wb,arguments)}\nfunction Yb(a,b,c,d,e,f,g,h,k){Xb.apply(this,arguments);if(Sb){if(Sb){var l=Tb;Sb=!1;Tb=null}else throw Error(y(198));Ub||(Ub=!0,Vb=l)}}function Zb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function $b(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function ac(a){if(Zb(a)!==a)throw Error(y(188));}\nfunction bc(a){var b=a.alternate;if(!b){b=Zb(a);if(null===b)throw Error(y(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return ac(e),a;if(f===d)return ac(e),b;f=f.sibling}throw Error(y(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(y(189));}}if(c.alternate!==d)throw Error(y(190));}if(3!==c.tag)throw Error(y(188));return c.stateNode.current===c?a:b}function cc(a){a=bc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction dc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var ec,fc,gc,hc,ic=!1,jc=[],kc=null,lc=null,mc=null,nc=new Map,oc=new Map,pc=[],qc=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");\nfunction rc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function sc(a,b){switch(a){case \"focusin\":case \"focusout\":kc=null;break;case \"dragenter\":case \"dragleave\":lc=null;break;case \"mouseover\":case \"mouseout\":mc=null;break;case \"pointerover\":case \"pointerout\":nc.delete(b.pointerId);break;case \"gotpointercapture\":case \"lostpointercapture\":oc.delete(b.pointerId)}}\nfunction tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=rc(b,c,d,e,f),null!==b&&(b=Cb(b),null!==b&&fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}\nfunction uc(a,b,c,d,e){switch(b){case \"focusin\":return kc=tc(kc,a,b,c,d,e),!0;case \"dragenter\":return lc=tc(lc,a,b,c,d,e),!0;case \"mouseover\":return mc=tc(mc,a,b,c,d,e),!0;case \"pointerover\":var f=e.pointerId;nc.set(f,tc(nc.get(f)||null,a,b,c,d,e));return!0;case \"gotpointercapture\":return f=e.pointerId,oc.set(f,tc(oc.get(f)||null,a,b,c,d,e)),!0}return!1}\nfunction vc(a){var b=wc(a.target);if(null!==b){var c=Zb(b);if(null!==c)if(b=c.tag,13===b){if(b=$b(c),null!==b){a.blockedOn=b;hc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){gc(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}\nfunction xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Cb(c),null!==b&&fc(b),a.blockedOn=c,!1;b.shift()}return!0}function zc(a,b,c){xc(a)&&c.delete(b)}\nfunction Ac(){for(ic=!1;0<jc.length;){var a=jc[0];if(null!==a.blockedOn){a=Cb(a.blockedOn);null!==a&&ec(a);break}for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&jc.shift()}null!==kc&&xc(kc)&&(kc=null);null!==lc&&xc(lc)&&(lc=null);null!==mc&&xc(mc)&&(mc=null);nc.forEach(zc);oc.forEach(zc)}\nfunction Bc(a,b){a.blockedOn===b&&(a.blockedOn=null,ic||(ic=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ac)))}\nfunction Cc(a){function b(b){return Bc(b,a)}if(0<jc.length){Bc(jc[0],a);for(var c=1;c<jc.length;c++){var d=jc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==kc&&Bc(kc,a);null!==lc&&Bc(lc,a);null!==mc&&Bc(mc,a);nc.forEach(b);oc.forEach(b);for(c=0;c<pc.length;c++)d=pc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<pc.length&&(c=pc[0],null===c.blockedOn);)vc(c),null===c.blockedOn&&pc.shift()}\nfunction Dc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Ec={animationend:Dc(\"Animation\",\"AnimationEnd\"),animationiteration:Dc(\"Animation\",\"AnimationIteration\"),animationstart:Dc(\"Animation\",\"AnimationStart\"),transitionend:Dc(\"Transition\",\"TransitionEnd\")},Fc={},Gc={};\nfa&&(Gc=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),\"TransitionEvent\"in window||delete Ec.transitionend.transition);function Hc(a){if(Fc[a])return Fc[a];if(!Ec[a])return a;var b=Ec[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Gc)return Fc[a]=b[c];return a}\nvar Ic=Hc(\"animationend\"),Jc=Hc(\"animationiteration\"),Kc=Hc(\"animationstart\"),Lc=Hc(\"transitionend\"),Mc=new Map,Nc=new Map,Oc=[\"abort\",\"abort\",Ic,\"animationEnd\",Jc,\"animationIteration\",Kc,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\n\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",Lc,\"transitionEnd\",\"waiting\",\"waiting\"];function Pc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e=\"on\"+(e[0].toUpperCase()+e.slice(1));Nc.set(d,b);Mc.set(d,e);da(e,[d])}}var Qc=r.unstable_now;Qc();var F=8;\nfunction Rc(a){if(0!==(1&a))return F=15,1;if(0!==(2&a))return F=14,2;if(0!==(4&a))return F=13,4;var b=24&a;if(0!==b)return F=12,b;if(0!==(a&32))return F=11,32;b=192&a;if(0!==b)return F=10,b;if(0!==(a&256))return F=9,256;b=3584&a;if(0!==b)return F=8,b;if(0!==(a&4096))return F=7,4096;b=4186112&a;if(0!==b)return F=6,b;b=62914560&a;if(0!==b)return F=5,b;if(a&67108864)return F=4,67108864;if(0!==(a&134217728))return F=3,134217728;b=805306368&a;if(0!==b)return F=2,b;if(0!==(1073741824&a))return F=1,1073741824;\nF=8;return a}function Sc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Tc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y(358,a));}}\nfunction Uc(a,b){var c=a.pendingLanes;if(0===c)return F=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=F=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Rc(k),e=F):(h&=f,0!==h&&(d=Rc(h),e=F))}else f=c&~g,0!==f?(d=Rc(f),e=F):0!==h&&(d=Rc(h),e=F);if(0===d)return 0;d=31-Vc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Rc(b);if(e<=F)return b;F=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Vc(b),e=1<<c,d|=a[c],b&=~e;return d}\nfunction Wc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Xc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=Yc(24&~b),0===a?Xc(10,b):a;case 10:return a=Yc(192&~b),0===a?Xc(8,b):a;case 8:return a=Yc(3584&~b),0===a&&(a=Yc(4186112&~b),0===a&&(a=512)),a;case 2:return b=Yc(805306368&~b),0===b&&(b=268435456),b}throw Error(y(358,a));}function Yc(a){return a&-a}function Zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0<jc.length&&-1<qc.indexOf(a))a=rc(null,a,b,c,d),jc.push(a);else{var f=yc(a,b,c,d);if(null===f)e&&sc(a,d);else{if(e){if(-1<qc.indexOf(a)){a=rc(f,a,b,c,d);jc.push(a);return}if(uc(f,a,b,c,d))return;sc(a,d)}jd(a,b,d,null,c)}}}}\nfunction yc(a,b,c,d){var e=xb(d);e=wc(e);if(null!==e){var f=Zb(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=$b(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}jd(a,b,d,e,c);return null}var kd=null,ld=null,md=null;\nfunction nd(){if(md)return md;var a,b=ld,c=b.length,d,e=\"value\"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}function od(a){var b=a.keyCode;\"charCode\"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1}\nfunction rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}m(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():\"unknown\"!==typeof a.returnValue&&\n(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():\"unknown\"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b}\nvar sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=m({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=m({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if(\"movementX\"in\na)return a.movementX;a!==yd&&(yd&&\"mousemove\"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return\"movementY\"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=m({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=m({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=m({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=m({},sd,{clipboardData:function(a){return\"clipboardData\"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=m({},sd,{data:0}),Ld=rd(Kd),Md={Esc:\"Escape\",\nSpacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Nd={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",\n119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},Od={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd}\nvar Qd=m({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if(\"Unidentified\"!==b)return b}return\"keypress\"===a.type?(a=od(a),13===a?\"Enter\":String.fromCharCode(a)):\"keydown\"===a.type||\"keyup\"===a.type?Nd[a.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return\"keypress\"===a.type?od(a):0},keyCode:function(a){return\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0},which:function(a){return\"keypress\"===\na.type?od(a):\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=m({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=m({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=m({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=m({},Ad,{deltaX:function(a){return\"deltaX\"in a?a.deltaX:\"wheelDeltaX\"in a?-a.wheelDeltaX:0},\ndeltaY:function(a){return\"deltaY\"in a?a.deltaY:\"wheelDeltaY\"in a?-a.wheelDeltaY:\"wheelDelta\"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=fa&&\"CompositionEvent\"in window,be=null;fa&&\"documentMode\"in document&&(be=document.documentMode);var ce=fa&&\"TextEvent\"in window&&!be,de=fa&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case \"compositionend\":return de&&\"ko\"!==b.locale?null:b.data;default:return null}}\nvar le={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return\"input\"===b?!!le[a.type]:\"textarea\"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,\"onChange\");0<b.length&&(c=new td(\"onChange\",\"change\",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a}\nfunction ve(a,b){if(\"change\"===a)return b}var we=!1;if(fa){var xe;if(fa){var ye=\"oninput\"in document;if(!ye){var ze=document.createElement(\"div\");ze.setAttribute(\"oninput\",\"return;\");ye=\"function\"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent(\"onpropertychange\",Be),qe=pe=null)}function Be(a){if(\"value\"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));a=re;if(Kb)a(b);else{Kb=!0;try{Gb(a,b)}finally{Kb=!1,Mb()}}}}\nfunction Ce(a,b,c){\"focusin\"===a?(Ae(),pe=b,qe=c,pe.attachEvent(\"onpropertychange\",Be)):\"focusout\"===a&&Ae()}function De(a){if(\"selectionchange\"===a||\"keyup\"===a||\"keydown\"===a)return te(qe)}function Ee(a,b){if(\"click\"===a)return te(b)}function Fe(a,b){if(\"input\"===a||\"change\"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He=\"function\"===typeof Object.is?Object.is:Ge,Ie=Object.prototype.hasOwnProperty;\nfunction Je(a,b){if(He(a,b))return!0;if(\"object\"!==typeof a||null===a||\"object\"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ie.call(b,c[d])||!He(a[c[d]],b[c[d]]))return!1;return!0}function Ke(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Le(a,b){var c=Ke(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0<d.length&&(b=new td(\"onSelect\",\"select\",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))}\nPc(\"cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),\n0);Pc(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1);Pc(Oc,2);for(var Ve=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),We=0;We<Ve.length;We++)Nc.set(Ve[We],0);ea(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]);\nea(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]);ea(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]);ea(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]);da(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \"));da(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \"));da(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]);da(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \"));\nda(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \"));da(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Xe=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),Ye=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(Xe));\nfunction Ze(a,b,c){var d=a.type||\"unknown-event\";a.currentTarget=c;Yb(d,b,void 0,a);a.currentTarget=null}\nfunction se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}}}if(Ub)throw a=Vb,Ub=!1,Vb=null,a;}\nfunction G(a,b){var c=$e(b),d=a+\"__bubble\";c.has(d)||(af(b,a,2,!1),c.add(d))}var bf=\"_reactListening\"+Math.random().toString(36).slice(2);function cf(a){a[bf]||(a[bf]=!0,ba.forEach(function(b){Ye.has(b)||df(b,!1,a,null);df(b,!0,a,null)}))}\nfunction df(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;\"selectionchange\"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Ye.has(a)){if(\"scroll\"!==a)return;e|=2;f=d}var g=$e(f),h=a+\"__\"+(b?\"capture\":\"bubble\");g.has(h)||(b&&(e|=4),af(f,a,e,b),g.add(h))}\nfunction af(a,b,c,d){var e=Nc.get(b);switch(void 0===e?2:e){case 0:e=gd;break;case 1:e=id;break;default:e=hd}c=e.bind(null,b,c,a);e=void 0;!Pb||\"touchstart\"!==b&&\"touchmove\"!==b&&\"wheel\"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}\nfunction jd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Nb(function(){var d=f,e=xb(c),g=[];\na:{var h=Mc.get(a);if(void 0!==h){var k=td,x=a;switch(a){case \"keypress\":if(0===od(c))break a;case \"keydown\":case \"keyup\":k=Rd;break;case \"focusin\":x=\"focus\";k=Fd;break;case \"focusout\":x=\"blur\";k=Fd;break;case \"beforeblur\":case \"afterblur\":k=Fd;break;case \"click\":if(2===c.button)break a;case \"auxclick\":case \"dblclick\":case \"mousedown\":case \"mousemove\":case \"mouseup\":case \"mouseout\":case \"mouseover\":case \"contextmenu\":k=Bd;break;case \"drag\":case \"dragend\":case \"dragenter\":case \"dragexit\":case \"dragleave\":case \"dragover\":case \"dragstart\":case \"drop\":k=\nDd;break;case \"touchcancel\":case \"touchend\":case \"touchmove\":case \"touchstart\":k=Vd;break;case Ic:case Jc:case Kc:k=Hd;break;case Lc:k=Xd;break;case \"scroll\":k=vd;break;case \"wheel\":k=Zd;break;case \"copy\":case \"cut\":case \"paste\":k=Jd;break;case \"gotpointercapture\":case \"lostpointercapture\":case \"pointercancel\":case \"pointerdown\":case \"pointermove\":case \"pointerout\":case \"pointerover\":case \"pointerup\":k=Td}var w=0!==(b&4),z=!w&&\"scroll\"===a,u=w?null!==h?h+\"Capture\":null:h;w=[];for(var t=d,q;null!==\nt;){q=t;var v=q.stateNode;5===q.tag&&null!==v&&(q=v,null!==u&&(v=Ob(t,u),null!=v&&w.push(ef(t,v,q))));if(z)break;t=t.return}0<w.length&&(h=new k(h,x,null,c,e),g.push({event:h,listeners:w}))}}if(0===(b&7)){a:{h=\"mouseover\"===a||\"pointerover\"===a;k=\"mouseout\"===a||\"pointerout\"===a;if(h&&0===(b&16)&&(x=c.relatedTarget||c.fromElement)&&(wc(x)||x[ff]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(x=c.relatedTarget||c.toElement,k=d,x=x?wc(x):null,null!==\nx&&(z=Zb(x),x!==z||5!==x.tag&&6!==x.tag))x=null}else k=null,x=d;if(k!==x){w=Bd;v=\"onMouseLeave\";u=\"onMouseEnter\";t=\"mouse\";if(\"pointerout\"===a||\"pointerover\"===a)w=Td,v=\"onPointerLeave\",u=\"onPointerEnter\",t=\"pointer\";z=null==k?h:ue(k);q=null==x?h:ue(x);h=new w(v,t+\"leave\",k,c,e);h.target=z;h.relatedTarget=q;v=null;wc(e)===d&&(w=new w(u,t+\"enter\",x,c,e),w.target=q,w.relatedTarget=z,v=w);z=v;if(k&&x)b:{w=k;u=x;t=0;for(q=w;q;q=gf(q))t++;q=0;for(v=u;v;v=gf(v))q++;for(;0<t-q;)w=gf(w),t--;for(;0<q-t;)u=\ngf(u),q--;for(;t--;){if(w===u||null!==u&&w===u.alternate)break b;w=gf(w);u=gf(u)}w=null}else w=null;null!==k&&hf(g,h,k,w,!1);null!==x&&null!==z&&hf(g,z,x,w,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if(\"select\"===k||\"input\"===k&&\"file\"===h.type)var J=ve;else if(me(h))if(we)J=Fe;else{J=De;var K=Ce}else(k=h.nodeName)&&\"input\"===k.toLowerCase()&&(\"checkbox\"===h.type||\"radio\"===h.type)&&(J=Ee);if(J&&(J=J(a,d))){ne(g,J,c,e);break a}K&&K(a,h,d);\"focusout\"===a&&(K=h._wrapperState)&&\nK.controlled&&\"number\"===h.type&&bb(h,\"number\",h.value)}K=d?ue(d):window;switch(a){case \"focusin\":if(me(K)||\"true\"===K.contentEditable)Qe=K,Re=d,Se=null;break;case \"focusout\":Se=Re=Qe=null;break;case \"mousedown\":Te=!0;break;case \"contextmenu\":case \"mouseup\":case \"dragend\":Te=!1;Ue(g,c,e);break;case \"selectionchange\":if(Pe)break;case \"keydown\":case \"keyup\":Ue(g,c,e)}var Q;if(ae)b:{switch(a){case \"compositionstart\":var L=\"onCompositionStart\";break b;case \"compositionend\":L=\"onCompositionEnd\";break b;\ncase \"compositionupdate\":L=\"onCompositionUpdate\";break b}L=void 0}else ie?ge(a,c)&&(L=\"onCompositionEnd\"):\"keydown\"===a&&229===c.keyCode&&(L=\"onCompositionStart\");L&&(de&&\"ko\"!==c.locale&&(ie||\"onCompositionStart\"!==L?\"onCompositionEnd\"===L&&ie&&(Q=nd()):(kd=e,ld=\"value\"in kd?kd.value:kd.textContent,ie=!0)),K=oe(d,L),0<K.length&&(L=new Ld(L,a,null,c,e),g.push({event:L,listeners:K}),Q?L.data=Q:(Q=he(c),null!==Q&&(L.data=Q))));if(Q=ce?je(a,c):ke(a,c))d=oe(d,\"onBeforeInput\"),0<d.length&&(e=new Ld(\"onBeforeInput\",\n\"beforeinput\",null,c,e),g.push({event:e,listeners:d}),e.data=Q)}se(g,b)})}function ef(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+\"Capture\",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Ob(a,c),null!=f&&d.unshift(ef(a,f,e)),f=Ob(a,b),null!=f&&d.push(ef(a,f,e)));a=a.return}return d}function gf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction hf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Ob(c,f),null!=k&&g.unshift(ef(c,k,h))):e||(k=Ob(c,f),null!=k&&g.push(ef(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function jf(){}var kf=null,lf=null;function mf(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction nf(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var of=\"function\"===typeof setTimeout?setTimeout:void 0,pf=\"function\"===typeof clearTimeout?clearTimeout:void 0;function qf(a){1===a.nodeType?a.textContent=\"\":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=\"\"))}\nfunction rf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function sf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(\"$\"===c||\"$!\"===c||\"$?\"===c){if(0===b)return a;b--}else\"/$\"===c&&b++}a=a.previousSibling}return null}var tf=0;function uf(a){return{$$typeof:Ga,toString:a,valueOf:a}}var vf=Math.random().toString(36).slice(2),wf=\"__reactFiber$\"+vf,xf=\"__reactProps$\"+vf,ff=\"__reactContainer$\"+vf,yf=\"__reactEvents$\"+vf;\nfunction wc(a){var b=a[wf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ff]||c[wf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sf(a);null!==a;){if(c=a[wf])return c;a=sf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[wf]||a[ff];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(y(33));}function Db(a){return a[xf]||null}\nfunction $e(a){var b=a[yf];void 0===b&&(b=a[yf]=new Set);return b}var zf=[],Af=-1;function Bf(a){return{current:a}}function H(a){0>Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});ag=null}catch(c){throw null!==ag&&(ag=ag.slice(a+1)),Of(Uf,ig),c;}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(a,b){if(a&&a.defaultProps){b=m({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var mg=Bf(null),ng=null,og=null,pg=null;function qg(){pg=og=ng=null}\nfunction rg(a){var b=mg.current;H(mg);a.type._context._currentValue=b}function sg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function tg(a,b){ng=a;pg=og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ug=!0),a.firstContext=null)}\nfunction vg(a,b){if(pg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)pg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===og){if(null===ng)throw Error(y(308));og=b;ng.dependencies={lanes:0,firstContext:b,responders:null}}else og=og.next=b}return a._currentValue}var wg=!1;function xg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}\nfunction yg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function zg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function Ag(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction Bg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction Cg(a,b,c,d){var e=a.updateQueue;wg=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;if(null!==n){n=n.updateQueue;var A=n.lastBaseUpdate;A!==g&&(null===A?n.firstBaseUpdate=l:A.next=l,n.lastBaseUpdate=k)}}if(null!==f){A=e.baseState;g=0;n=l=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==n&&(n=n.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,\nnext:null});a:{var C=a,x=f;h=b;p=c;switch(x.tag){case 1:C=x.payload;if(\"function\"===typeof C){A=C.call(p,A,h);break a}A=C;break a;case 3:C.flags=C.flags&-4097|64;case 0:C=x.payload;h=\"function\"===typeof C?C.call(p,A,h):C;if(null===h||void 0===h)break a;A=m({},A,h);break a;case 2:wg=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===n?(l=n=p,k=A):n=n.next=p,g|=h;f=f.next;if(null===\nf)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===n&&(k=A);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;Dg|=g;a.lanes=g;a.memoizedState=A}}function Eg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if(\"function\"!==typeof e)throw Error(y(191,e));e.call(d)}}}var Fg=(new aa.Component).refs;\nfunction Gg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:m({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}\nvar Kg={isMounted:function(a){return(a=a._reactInternals)?Zb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Hg(),d=Ig(a),e=zg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=\nb);Ag(a,e);Jg(a,d,c)}};function Lg(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Je(c,d)||!Je(e,f):!0}\nfunction Mg(a,b,c){var d=!1,e=Cf;var f=b.contextType;\"object\"===typeof f&&null!==f?f=vg(f):(e=Ff(b)?Df:M.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Ef(a,e):Cf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Kg;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction Ng(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Kg.enqueueReplaceState(b,b.state,null)}\nfunction Og(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Fg;xg(a);var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=vg(f):(f=Ff(b)?Df:M.current,e.context=Ef(a,f));Cg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;\"function\"===typeof f&&(Gg(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\"function\"!==typeof e.componentWillMount||\n(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Kg.enqueueReplaceState(e,e.state,null),Cg(a,c,e,d),e.state=a.memoizedState);\"function\"===typeof e.componentDidMount&&(a.flags|=4)}var Pg=Array.isArray;\nfunction Qg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(y(309));var d=c.stateNode}if(!d)throw Error(y(147,a));var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Fg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if(\"string\"!==typeof a)throw Error(y(284));if(!c._owner)throw Error(y(290,a));}return a}\nfunction Rg(a,b){if(\"textarea\"!==a.type)throw Error(y(31,\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b));}\nfunction Sg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Tg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,\nc):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ug(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Qg(a,b,c),d.return=a,d;d=Vg(c.type,c.key,c.props,null,a.mode,d);d.ref=Qg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=\nWg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=Xg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function A(a,b,c){if(\"string\"===typeof b||\"number\"===typeof b)return b=Ug(\"\"+b,a.mode,c),b.return=a,b;if(\"object\"===typeof b&&null!==b){switch(b.$$typeof){case sa:return c=Vg(b.type,b.key,b.props,null,a.mode,c),c.ref=Qg(a,null,b),c.return=a,c;case ta:return b=Wg(b,a.mode,c),b.return=a,b}if(Pg(b)||La(b))return b=Xg(b,\na.mode,c,null),b.return=a,b;Rg(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if(\"string\"===typeof c||\"number\"===typeof c)return null!==e?null:h(a,b,\"\"+c,d);if(\"object\"===typeof c&&null!==c){switch(c.$$typeof){case sa:return c.key===e?c.type===ua?n(a,b,c.props.children,d,e):k(a,b,c,d):null;case ta:return c.key===e?l(a,b,c,d):null}if(Pg(c)||La(c))return null!==e?null:n(a,b,c,d,null);Rg(a,c)}return null}function C(a,b,c,d,e){if(\"string\"===typeof d||\"number\"===typeof d)return a=a.get(c)||\nnull,h(b,a,\"\"+d,e);if(\"object\"===typeof d&&null!==d){switch(d.$$typeof){case sa:return a=a.get(null===d.key?c:d.key)||null,d.type===ua?n(b,a,d.props.children,e,d.key):k(b,a,d,e);case ta:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Pg(d)||La(d))return a=a.get(c)||null,n(b,a,d,e,null);Rg(b,d)}return null}function x(e,g,h,k){for(var l=null,t=null,u=g,z=g=0,q=null;null!==u&&z<h.length;z++){u.index>z?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;z<h.length;z++)u=A(e,h[z],k),null!==u&&(g=f(u,g,z),null===t?l=u:t.sibling=u,t=u);return l}for(u=d(e,u);z<h.length;z++)q=C(u,e,z,h[z],k),null!==q&&(a&&null!==q.alternate&&u.delete(null===q.key?z:q.key),g=f(q,g,z),null===t?l=q:t.sibling=q,t=q);a&&u.forEach(function(a){return b(e,a)});return l}function w(e,g,h,k){var l=La(h);if(\"function\"!==typeof l)throw Error(y(150));h=l.call(h);if(null==\nh)throw Error(y(151));for(var t=l=null,u=g,z=g=0,q=null,n=h.next();null!==u&&!n.done;z++,n=h.next()){u.index>z?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;a<th.length;a++)th[a]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R=null,S=null,T=null,yh=!1,zh=!1;function Ah(){throw Error(y(321));}function Bh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0}\nfunction Ch(a,b,c,d,e,f){xh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;vh.current=null===a||null===a.memoizedState?Dh:Eh;a=c(d,e);if(zh){f=0;do{zh=!1;if(!(25>f))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0<h;){var k=31-Vc(h),v=1<<k;d[k]|=a;h&=~v}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Ig(w);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);He(C,c)&&He(x,b)&&He(A,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},a.dispatch=l=Oh.bind(null,R,a),k.queue=a,k.baseQueue=null,n=Mh(e,b,c),k.memoizedState=k.baseState=n);return n}\nfunction Ph(a,b,c){var d=Ih();return Nh(d,a,b,c)}function Qh(a){var b=Hh();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:a};a=a.dispatch=Oh.bind(null,R,a);return[b.memoizedState,a]}\nfunction Rh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Sh(a){var b=Hh();a={current:a};return b.memoizedState=a}function Th(){return Ih().memoizedState}function Uh(a,b,c,d){var e=Hh();R.flags|=a;e.memoizedState=Rh(1|b,c,void 0,void 0===d?null:d)}\nfunction Vh(a,b,c,d){var e=Ih();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Bh(d,g.deps)){Rh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Rh(1|b,c,f,d)}function Wh(a,b){return Uh(516,4,a,b)}function Xh(a,b){return Vh(516,4,a,b)}function Yh(a,b){return Vh(4,2,a,b)}function Zh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}\nfunction $h(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,2,Zh.bind(null,b,a),c)}function ai(){}function bi(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function ci(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}\nfunction di(a,b){var c=eg();gg(98>c?98:c,function(){a(!0)});gg(97<c?97:c,function(){var c=wh.transition;wh.transition=1;try{a(!1),b()}finally{wh.transition=c}})}\nfunction Oh(a,b,c){var d=Hg(),e=Ig(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)zh=yh=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(He(k,h))return}catch(l){}finally{}Jg(a,e,d)}}\nvar Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(a,b){Hh().memoizedState=[a,void 0===b?null:b];return a},useContext:vg,useEffect:Wh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Uh(4,2,Zh.bind(null,\nb,a),c)},useLayoutEffect:function(a,b){return Uh(4,2,a,b)},useMemo:function(a,b){var c=Hh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Hh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Oh.bind(null,R,a);return[d.memoizedState,a]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(a){var b=Qh(a),c=b[0],d=b[1];Wh(function(){var b=wh.transition;\nwh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Qh(!1),b=a[0];a=di.bind(null,a[1]);Sh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Hh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Nh(d,a,b,c)},useOpaqueIdentifier:function(){if(lh){var a=!1,b=uf(function(){a||(a=!0,c(\"r:\"+(tf++).toString(36)));throw Error(y(355));}),c=Qh(b)[1];0===(R.mode&2)&&(R.flags|=516,Rh(5,function(){c(\"r:\"+(tf++).toString(36))},\nvoid 0,null));return b}b=\"r:\"+(tf++).toString(36);Qh(b);return b},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Kh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Kh(Jh)[0];return[Th().current,\na]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Lh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Lh(Jh)[0];return[Th().current,\na]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(a,b,c,d){b.child=null===a?Zg(b,null,c,d):Yg(b,a.child,c,d)}function gi(a,b,c,d,e){c=c.render;var f=b.ref;tg(b,e);d=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,d,e);return b.child}\nfunction ii(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!ji(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ki(a,b,g,d,e,f);a=Vg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Je,c(e,d)&&a.ref===b.ref))return hi(a,b,f);b.flags|=1;a=Tg(g,d);a.ref=b.ref;a.return=b;return b.child=a}\nfunction ki(a,b,c,d,e,f){if(null!==a&&Je(a.memoizedProps,d)&&a.ref===b.ref)if(ug=!1,0!==(f&e))0!==(a.flags&16384)&&(ug=!0);else return b.lanes=a.lanes,hi(a,b,f);return li(a,b,c,d,f)}\nfunction mi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if(\"hidden\"===d.mode||\"unstable-defer-without-hiding\"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},ni(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},ni(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},ni(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,ni(b,d);fi(a,b,e,c);return b.child}\nfunction oi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function li(a,b,c,d,e){var f=Ff(c)?Df:M.current;f=Ef(b,f);tg(b,e);c=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,c,e);return b.child}\nfunction pi(a,b,c,d,e){if(Ff(c)){var f=!0;Jf(b)}else f=!1;tg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Mg(b,c,d),Og(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;\"object\"===typeof l&&null!==l?l=vg(l):(l=Ff(c)?Df:M.current,l=Ef(b,l));var n=c.getDerivedStateFromProps,A=\"function\"===typeof n||\"function\"===typeof g.getSnapshotBeforeUpdate;A||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\n\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Ng(b,g,d,l);wg=!1;var p=b.memoizedState;g.state=p;Cg(b,d,g,e);k=b.memoizedState;h!==d||p!==k||N.current||wg?(\"function\"===typeof n&&(Gg(b,c,n,d),k=b.memoizedState),(h=wg||Lg(b,c,h,d,p,k,l))?(A||\"function\"!==typeof g.UNSAFE_componentWillMount&&\"function\"!==typeof g.componentWillMount||(\"function\"===typeof g.componentWillMount&&g.componentWillMount(),\"function\"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),\"function\"===\ntypeof g.componentDidMount&&(b.flags|=4)):(\"function\"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):(\"function\"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;yg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:lg(b.type,h);g.props=l;A=b.pendingProps;p=g.context;k=c.contextType;\"object\"===typeof k&&null!==k?k=vg(k):(k=Ff(c)?Df:M.current,k=Ef(b,k));var C=c.getDerivedStateFromProps;(n=\"function\"===typeof C||\n\"function\"===typeof g.getSnapshotBeforeUpdate)||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof g.componentWillReceiveProps||(h!==A||p!==k)&&Ng(b,g,d,k);wg=!1;p=b.memoizedState;g.state=p;Cg(b,d,g,e);var x=b.memoizedState;h!==A||p!==x||N.current||wg?(\"function\"===typeof C&&(Gg(b,c,C,d),x=b.memoizedState),(l=wg||Lg(b,c,l,d,p,x,k))?(n||\"function\"!==typeof g.UNSAFE_componentWillUpdate&&\"function\"!==typeof g.componentWillUpdate||(\"function\"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,\nx,k),\"function\"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),\"function\"===typeof g.componentDidUpdate&&(b.flags|=4),\"function\"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=l):(\"function\"!==typeof g.componentDidUpdate||\nh===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return qi(a,b,c,d,f,e)}\nfunction qi(a,b,c,d,e,f){oi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Kf(b,c,!1),hi(a,b,f);d=b.stateNode;ei.current=b;var h=g&&\"function\"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Yg(b,a.child,null,f),b.child=Yg(b,null,h,f)):fi(a,b,h,f);b.memoizedState=d.state;e&&Kf(b,c,!0);return b.child}function ri(a){var b=a.stateNode;b.pendingContext?Hf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Hf(a,b.context,!1);eh(a,b.containerInfo)}\nvar si={dehydrated:null,retryLane:0};\nfunction ti(a,b,c){var d=b.pendingProps,e=P.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);I(P,e&1);if(null===a){void 0!==d.fallback&&ph(b);a=d.children;e=d.fallback;if(f)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=si,a;if(\"number\"===typeof d.unstable_expectedLoadTime)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},\nb.memoizedState=si,b.lanes=33554432,a;c=vi({mode:\"visible\",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:\n{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}function ui(a,b,c,d){var e=a.mode,f=a.child;b={mode:\"hidden\",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=vi(b,e,0,null);c=Xg(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}\nfunction xi(a,b,c,d){var e=a.child;a=e.sibling;c=Tg(e,{mode:\"visible\",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}\nfunction wi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:\"hidden\",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Tg(g,h);null!==a?d=Tg(a,d):(d=Xg(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function yi(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);sg(a.return,b)}\nfunction zi(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}\nfunction Ai(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;fi(a,b,d.children,c);d=P.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&yi(a,c);else if(19===a.tag)yi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(P,d);if(0===(b.mode&2))b.memoizedState=\nnull;else switch(e){case \"forwards\":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===ih(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);zi(b,!1,e,c,f,b.lastEffect);break;case \"backwards\":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===ih(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}zi(b,!0,c,null,f,b.lastEffect);break;case \"together\":zi(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}\nfunction hi(a,b,c){null!==a&&(b.dependencies=a.dependencies);Dg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(y(153));if(null!==b.child){a=b.child;c=Tg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Tg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Bi,Ci,Di,Ei;\nBi=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Ci=function(){};\nDi=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;dh(ah.current);var f=null;switch(c){case \"input\":e=Ya(a,e);d=Ya(a,d);f=[];break;case \"option\":e=eb(a,e);d=eb(a,d);f=[];break;case \"select\":e=m({},e,{value:void 0});d=m({},d,{value:void 0});f=[];break;case \"textarea\":e=gb(a,e);d=gb(a,d);f=[];break;default:\"function\"!==typeof e.onClick&&\"function\"===typeof d.onClick&&(a.onclick=jf)}vb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if(\"style\"===\nl){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]=\"\")}else\"dangerouslySetInnerHTML\"!==l&&\"children\"!==l&&\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&\"autoFocus\"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if(\"style\"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]=\"\");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||\n(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else\"dangerouslySetInnerHTML\"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):\"children\"===l?\"string\"!==typeof k&&\"number\"!==typeof k||(f=f||[]).push(l,\"\"+k):\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&(ca.hasOwnProperty(l)?(null!=k&&\"onScroll\"===l&&G(\"scroll\",a),f||h===k||(f=[])):\"object\"===typeof k&&null!==k&&k.$$typeof===Ga?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push(\"style\",\nc);var l=f;if(b.updateQueue=l)b.flags|=4}};Ei=function(a,b,c,d){c!==d&&(b.flags|=4)};function Fi(a,b){if(!lh)switch(a.tailMode){case \"hidden\":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case \"collapsed\":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}\nfunction Gi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(b.type)&&Gf(),null;case 3:fh();H(N);H(M);uh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)rh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Ci(b);return null;case 5:hh(b);var e=dh(ch.current);c=b.type;if(null!==a&&null!=b.stateNode)Di(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===\nb.stateNode)throw Error(y(166));return null}a=dh(ah.current);if(rh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[wf]=b;d[xf]=f;switch(c){case \"dialog\":G(\"cancel\",d);G(\"close\",d);break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",d);break;case \"video\":case \"audio\":for(a=0;a<Xe.length;a++)G(Xe[a],d);break;case \"source\":G(\"error\",d);break;case \"img\":case \"image\":case \"link\":G(\"error\",d);G(\"load\",d);break;case \"details\":G(\"toggle\",d);break;case \"input\":Za(d,f);G(\"invalid\",d);break;case \"select\":d._wrapperState=\n{wasMultiple:!!f.multiple};G(\"invalid\",d);break;case \"textarea\":hb(d,f),G(\"invalid\",d)}vb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],\"children\"===g?\"string\"===typeof e?d.textContent!==e&&(a=[\"children\",e]):\"number\"===typeof e&&d.textContent!==\"\"+e&&(a=[\"children\",\"\"+e]):ca.hasOwnProperty(g)&&null!=e&&\"onScroll\"===g&&G(\"scroll\",d));switch(c){case \"input\":Va(d);cb(d,f,!0);break;case \"textarea\":Va(d);jb(d);break;case \"select\":case \"option\":break;default:\"function\"===typeof f.onClick&&(d.onclick=\njf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===kb.html&&(a=lb(c));a===kb.html?\"script\"===c?(a=g.createElement(\"div\"),a.innerHTML=\"<script>\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;e<Xe.length;e++)G(Xe[e],a);e=d;break;case \"source\":G(\"error\",a);e=d;break;case \"img\":case \"image\":case \"link\":G(\"error\",a);G(\"load\",a);e=d;break;case \"details\":G(\"toggle\",a);e=d;break;case \"input\":Za(a,d);e=Ya(a,d);G(\"invalid\",a);break;case \"option\":e=eb(a,d);break;case \"select\":a._wrapperState={wasMultiple:!!d.multiple};e=m({},d,{value:void 0});G(\"invalid\",a);break;case \"textarea\":hb(a,d);e=\ngb(a,d);G(\"invalid\",a);break;default:e=d}vb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];\"style\"===f?tb(a,k):\"dangerouslySetInnerHTML\"===f?(k=k?k.__html:void 0,null!=k&&ob(a,k)):\"children\"===f?\"string\"===typeof k?(\"textarea\"!==c||\"\"!==k)&&pb(a,k):\"number\"===typeof k&&pb(a,\"\"+k):\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&\"autoFocus\"!==f&&(ca.hasOwnProperty(f)?null!=k&&\"onScroll\"===f&&G(\"scroll\",a):null!=k&&qa(a,f,k,g))}switch(c){case \"input\":Va(a);cb(a,d,!1);\nbreak;case \"textarea\":Va(a);jb(a);break;case \"option\":null!=d.value&&a.setAttribute(\"value\",\"\"+Sa(d.value));break;case \"select\":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,!0);break;default:\"function\"===typeof e.onClick&&(a.onclick=jf)}mf(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Ei(a,b,a.memoizedProps,d);else{if(\"string\"!==typeof d&&null===b.stateNode)throw Error(y(166));\nc=dh(ch.current);dh(ah.current);rh(b)?(d=b.stateNode,c=b.memoizedProps,d[wf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[wf]=b,b.stateNode=d)}return null;case 13:H(P);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&rh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(P.current&1))0===V&&(V=3);else{if(0===V||3===V)V=\n4;null===U||0===(Dg&134217727)&&0===(Hi&134217727)||Ii(U,W)}if(d||c)b.flags|=4;return null;case 4:return fh(),Ci(b),null===a&&cf(b.stateNode.containerInfo),null;case 10:return rg(b),null;case 17:return Ff(b.type)&&Gf(),null;case 19:H(P);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Fi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=ih(a);if(null!==g){b.flags|=64;Fi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);\nnull===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,\nf.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;I(P,P.current&1|2);return b.child}a=a.sibling}null!==d.tail&&O()>Ji&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;e<f.length;e+=\n2){var g=f[e],h=f[e+1];\"style\"===g?tb(c,h):\"dangerouslySetInnerHTML\"===g?ob(c,h):\"children\"===g?pb(c,h):qa(c,g,h,b)}switch(a){case \"input\":ab(c,d);break;case \"textarea\":ib(c,d);break;case \"select\":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?fb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?fb(c,!!d.multiple,d.defaultValue,!0):fb(c,!!d.multiple,d.multiple?[]:\"\",!1))}}}return;case 6:if(null===b.stateNode)throw Error(y(162));b.stateNode.nodeValue=\nb.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Cc(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(jj=O(),aj(b.child,!0));kj(b);return;case 19:kj(b);return;case 17:return;case 23:case 24:aj(b,null!==b.memoizedState);return}throw Error(y(163));}function kj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ui);b.forEach(function(b){var d=lj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction mj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X=0,U=null,Y=null,W=0,qj=0,rj=Bf(0),V=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=Infinity;function wj(){Ji=O()+500}var Z=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return 0!==(X&48)?O():-1!==Fj?Fj:Fj=O()}\nfunction Ig(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===eg()?1:2;0===Gj&&(Gj=tj);if(0!==kg.transition){0!==Hj&&(Hj=null!==vj?vj.pendingLanes:0);a=Gj;var b=4186112&~Hj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=eg();0!==(X&4)&&98===a?a=Xc(12,Gj):(a=Sc(a),a=Xc(a,Gj));return a}\nfunction Jg(a,b,c){if(50<Dj)throw Dj=0,Ej=null,Error(y(185));a=Kj(a,b);if(null===a)return null;$c(a,b,c);a===U&&(Hi|=b,4===V&&Ii(a,W));var d=eg();1===b?0!==(X&8)&&0===(X&48)?Lj(a):(Mj(a,c),0===X&&(wj(),ig())):(0===(X&4)||98!==d&&99!==d||(null===Cj?Cj=new Set([a]):Cj.add(a)),Mj(a,c));vj=a}function Kj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}\nfunction Mj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Vc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Rc(k);var n=F;f[h]=10<=n?l+250:6<=n?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Uc(a,a===U?W:0);b=F;if(0===d)null!==c&&(c!==Zf&&Pf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==Zf&&Pf(c)}15===b?(c=Lj.bind(null,a),null===ag?(ag=[c],bg=Of(Uf,jg)):ag.push(c),\nc=Zf):14===b?c=hg(99,Lj.bind(null,a)):(c=Tc(b),c=hg(c,Nj.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}\nfunction Nj(a){Fj=-1;Hj=Gj=0;if(0!==(X&48))throw Error(y(327));var b=a.callbackNode;if(Oj()&&a.callbackNode!==b)return null;var c=Uc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=Pj();if(U!==a||W!==d)wj(),Qj(a,d);do try{Rj();break}catch(h){Sj(a,h)}while(1);qg();oj.current=f;X=e;null!==Y?d=0:(U=null,W=0,d=V);if(0!==(tj&Hi))Qj(a,0);else if(0!==d){2===d&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),c=Wc(a),0!==c&&(d=Tj(a,c)));if(1===d)throw b=sj,Qj(a,0),Ii(a,c),Mj(a,O()),b;a.finishedWork=\na.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(y(345));case 2:Uj(a);break;case 3:Ii(a,c);if((c&62914560)===c&&(d=jj+500-O(),10<d)){if(0!==Uc(a,0))break;e=a.suspendedLanes;if((e&c)!==c){Hg();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=of(Uj.bind(null,a),d);break}Uj(a);break;case 4:Ii(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=31-Vc(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10<c){a.timeoutHandle=of(Uj.bind(null,a),c);break}Uj(a);break;case 5:Uj(a);break;default:throw Error(y(329));}}Mj(a,O());return a.callbackNode===b?Nj.bind(null,a):null}function Ii(a,b){b&=~uj;b&=~Hi;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}}\nfunction Lj(a){if(0!==(X&48))throw Error(y(327));Oj();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=Tj(a,b);0!==(tj&Hi)&&(b=Uc(a,b),c=Tj(a,b))}else b=Uc(a,0),c=Tj(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),b=Wc(a),0!==b&&(c=Tj(a,b)));if(1===c)throw c=sj,Qj(a,0),Ii(a,b),Mj(a,O()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;Uj(a);Mj(a,O());return null}\nfunction Vj(){if(null!==Cj){var a=Cj;Cj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Mj(a,O())})}ig()}function Wj(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function Xj(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function ni(a,b){I(rj,qj);qj|=b;tj|=b}function Ki(){qj=rj.current;H(rj)}\nfunction Qj(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,pf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Gf();break;case 3:fh();H(N);H(M);uh();break;case 5:hh(d);break;case 4:fh();break;case 13:H(P);break;case 19:H(P);break;case 10:rg(d);break;case 23:case 24:Ki()}c=c.return}U=a;Y=Tg(a.current,null);W=qj=tj=b;V=0;sj=null;uj=Hi=Dg=0}\nfunction Sj(a,b){do{var c=Y;try{qg();vh.current=Gh;if(yh){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}yh=!1}xh=0;T=S=R=null;zh=!1;pj.current=null;if(null===c||null===c.return){V=1;sj=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&\"object\"===typeof k&&\"function\"===typeof k.then){var l=k;if(0===(h.mode&2)){var n=h.alternate;n?(h.updateQueue=n.updateQueue,h.memoizedState=n.memoizedState,h.lanes=n.lanes):\n(h.updateQueue=null,h.memoizedState=null)}var A=0!==(P.current&1),p=g;do{var C;if(C=13===p.tag){var x=p.memoizedState;if(null!==x)C=null!==x.dehydrated?!0:!1;else{var w=p.memoizedProps;C=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:A?!1:!0}}if(C){var z=p.updateQueue;if(null===z){var u=new Set;u.add(l);p.updateQueue=u}else z.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var t=zg(-1,1);t.tag=2;Ag(h,t)}h.lanes|=1;break a}k=\nvoid 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Oi,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var v=Yj.bind(null,f,l,h);l.then(v,v)}p.flags|=4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((Ra(h.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==\na.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Li(b);if(null!==c){c.flags&=2047;Y=c;return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function Uj(a){var b=eg();gg(99,dk.bind(null,a,b));return null}\nfunction dk(a,b){do Oj();while(null!==yj);if(0!==(X&48))throw Error(y(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(y(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Vc(f),l=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~l}null!==\nCj&&0===(d&24)&&Cj.has(a)&&Cj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=X;X|=32;pj.current=null;kf=fd;g=Ne();if(Oe(g)){if(\"selectionStart\"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=(h=g.ownerDocument)&&h.defaultView||window,(l=h.getSelection&&h.getSelection())&&0!==l.rangeCount){h=l.anchorNode;f=l.anchorOffset;k=l.focusNode;l=l.focusOffset;try{h.nodeType,k.nodeType}catch(va){h=null;\nbreak a}var n=0,A=-1,p=-1,C=0,x=0,w=g,z=null;b:for(;;){for(var u;;){w!==h||0!==f&&3!==w.nodeType||(A=n+f);w!==k||0!==l&&3!==w.nodeType||(p=n+l);3===w.nodeType&&(n+=w.nodeValue.length);if(null===(u=w.firstChild))break;z=w;w=u}for(;;){if(w===g)break b;z===h&&++C===f&&(A=n);z===k&&++x===l&&(p=n);if(null!==(u=w.nextSibling))break;w=z;z=w.parentNode}w=u}h=-1===A||-1===p?null:{start:A,end:p}}else h=null;h=h||{start:0,end:0}}else h=null;lf={focusedElem:g,selectionRange:h};fd=!1;Ij=null;Jj=!1;Z=d;do try{ek()}catch(va){if(null===\nZ)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Ij=null;Z=d;do try{for(g=a;null!==Z;){var t=Z.flags;t&16&&pb(Z.stateNode,\"\");if(t&128){var q=Z.alternate;if(null!==q){var v=q.ref;null!==v&&(\"function\"===typeof v?v(null):v.current=null)}}switch(t&1038){case 2:fj(Z);Z.flags&=-3;break;case 6:fj(Z);Z.flags&=-3;ij(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;ij(Z.alternate,Z);break;case 4:ij(Z.alternate,Z);break;case 8:h=Z;cj(g,h);var J=h.alternate;dj(h);null!==\nJ&&dj(J)}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);v=lf;q=Ne();t=v.focusedElem;g=v.selectionRange;if(q!==t&&t&&t.ownerDocument&&Me(t.ownerDocument.documentElement,t)){null!==g&&Oe(t)&&(q=g.start,v=g.end,void 0===v&&(v=q),\"selectionStart\"in t?(t.selectionStart=q,t.selectionEnd=Math.min(v,t.value.length)):(v=(q=t.ownerDocument||document)&&q.defaultView||window,v.getSelection&&(v=v.getSelection(),h=t.textContent.length,J=Math.min(g.start,h),g=void 0===\ng.end?J:Math.min(g.end,h),!v.extend&&J>g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;t<q.length;t++)v=q[t],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}fd=!!kf;lf=kf=null;a.current=c;Z=d;do try{for(t=a;null!==Z;){var K=Z.flags;K&36&&Yi(t,Z.alternate,Z);if(K&128){q=void 0;var Q=Z.ref;if(null!==Q){var L=Z.stateNode;switch(Z.tag){case 5:q=L;break;default:q=L}\"function\"===typeof Q?Q(q):Q.current=q}}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Z=null;$f();X=e}else a.current=c;if(xj)xj=!1,yj=a,zj=b;else for(Z=d;null!==Z;)b=\nZ.nextEffect,Z.nextEffect=null,Z.flags&8&&(K=Z,K.sibling=null,K.stateNode=null),Z=b;d=a.pendingLanes;0===d&&(Ti=null);1===d?a===Ej?Dj++:(Dj=0,Ej=a):Dj=0;c=c.stateNode;if(Mf&&\"function\"===typeof Mf.onCommitFiberRoot)try{Mf.onCommitFiberRoot(Lf,c,void 0,64===(c.current.flags&64))}catch(va){}Mj(a,O());if(Qi)throw Qi=!1,a=Ri,Ri=null,a;if(0!==(X&8))return null;ig();return null}\nfunction ek(){for(;null!==Z;){var a=Z.alternate;Jj||null===Ij||(0!==(Z.flags&8)?dc(Z,Ij)&&(Jj=!0):13===Z.tag&&mj(a,Z)&&dc(Z,Ij)&&(Jj=!0));var b=Z.flags;0!==(b&256)&&Xi(a,Z);0===(b&512)||xj||(xj=!0,hg(97,function(){Oj();return null}));Z=Z.nextEffect}}function Oj(){if(90!==zj){var a=97<zj?97:zj;zj=90;return gg(a,fk)}return!1}function $i(a,b){Aj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}function Zi(a,b){Bj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}\nfunction fk(){if(null===yj)return!1;var a=yj;yj=null;if(0!==(X&48))throw Error(y(331));var b=X;X|=32;var c=Bj;Bj=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if(\"function\"===typeof g)try{g()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}c=Aj;Aj=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,h.nextEffect=null,h.flags&8&&(h.sibling=\nnull,h.stateNode=null),h=a;X=b;ig();return!0}function gk(a,b,c){b=Mi(c,b);b=Pi(a,b,1);Ag(a,b);b=Hg();a=Kj(a,1);null!==a&&($c(a,1,b),Mj(a,b))}\nfunction Wi(a,b){if(3===a.tag)gk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){gk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d))){a=Mi(b,a);var e=Si(c,a,1);Ag(c,e);e=Hg();c=Kj(c,1);if(null!==c)$c(c,1,e),Mj(c,e);else if(\"function\"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}\nfunction Yj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Hg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>O()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],th.push(f);c=Zg(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else fi(a,b,d,c),sh();b=b.child}return b;case 5:return gh(b),null===a&&\nph(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,nf(d,e)?g=null:null!==f&&nf(d,f)&&(b.flags|=16),oi(a,b),fi(a,b,g,c),b.child;case 6:return null===a&&ph(b),null;case 13:return ti(a,b,c);case 4:return eh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Yg(b,null,d,c):fi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),gi(a,b,d,e,c);case 7:return fi(a,b,b.pendingProps,c),b.child;case 8:return fi(a,b,b.pendingProps.children,\nc),b.child;case 12:return fi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(mg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=He(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!N.current){b=hi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=\nk.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=zg(-1,c&-c),l.tag=2,Ag(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);sg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}fi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,tg(b,c),e=vg(e,\nf.unstable_observedBits),d=d(e),b.flags|=1,fi(a,b,d,c),b.child;case 14:return e=b.type,f=lg(e,b.pendingProps),f=lg(e.type,f),ii(a,b,e,f,d,c);case 15:return ki(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,Ff(d)?(a=!0,Jf(b)):a=!1,tg(b,c),Mg(b,d,e),Og(b,d,e,c),qi(null,b,d,!0,a,c);case 19:return Ai(a,b,c);case 23:return mi(a,b,c);case 24:return mi(a,b,c)}throw Error(y(156,b.tag));\n};function ik(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function nh(a,b,c,d){return new ik(a,b,c,d)}function ji(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction hk(a){if(\"function\"===typeof a)return ji(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Aa)return 11;if(a===Da)return 14}return 2}\nfunction Tg(a,b){var c=a.alternate;null===c?(c=nh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Vg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)ji(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ua:return Xg(c.children,e,f,b);case Ha:g=8;e|=16;break;case wa:g=8;e|=1;break;case xa:return a=nh(12,c,b,e|8),a.elementType=xa,a.type=xa,a.lanes=f,a;case Ba:return a=nh(13,c,b,e),a.type=Ba,a.elementType=Ba,a.lanes=f,a;case Ca:return a=nh(19,c,b,e),a.elementType=Ca,a.lanes=f,a;case Ia:return vi(c,e,f,b);case Ja:return a=nh(24,c,b,e),a.elementType=Ja,a.lanes=f,a;default:if(\"object\"===\ntypeof a&&null!==a)switch(a.$$typeof){case ya:g=10;break a;case za:g=9;break a;case Aa:g=11;break a;case Da:g=14;break a;case Ea:g=16;d=null;break a;case Fa:g=22;break a}throw Error(y(130,null==a?a:typeof a,\"\"));}b=nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Xg(a,b,c,d){a=nh(7,a,d,b);a.lanes=c;return a}function vi(a,b,c,d){a=nh(23,a,d,b);a.elementType=Ia;a.lanes=c;return a}function Ug(a,b,c){a=nh(6,a,null,b);a.lanes=c;return a}\nfunction Wg(a,b,c){b=nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction jk(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=Zc(0);this.expirationTimes=Zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Zc(0);this.mutableSourceEagerHydrationData=null}\nfunction kk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ta,key:null==d?null:\"\"+d,children:a,containerInfo:b,implementation:c}}\nfunction lk(a,b,c,d){var e=b.current,f=Hg(),g=Ig(e);a:if(c){c=c._reactInternals;b:{if(Zb(c)!==c||1!==c.tag)throw Error(y(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(Ff(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(y(171));}if(1===c.tag){var k=c.type;if(Ff(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=zg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==\nd&&(b.callback=d);Ag(e,b);Jg(e,g,f);return g}function mk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function nk(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function ok(a,b){nk(a,b);(a=a.alternate)&&nk(a,b)}function pk(){return null}\nfunction qk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new jk(a,b,null!=c&&!0===c.hydrate);b=nh(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;xg(b);a[ff]=c.current;cf(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}\nqk.prototype.render=function(a){lk(a,this._internalRoot,null,null)};qk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;lk(null,a,null,function(){b[ff]=null})};function rk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||\" react-mount-point-unstable \"!==a.nodeValue))}\nfunction sk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute(\"data-reactroot\")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new qk(a,0,b?{hydrate:!0}:void 0)}\nfunction tk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if(\"function\"===typeof e){var h=e;e=function(){var a=mk(g);h.call(a)}}lk(b,g,a,e)}else{f=c._reactRootContainer=sk(c,d);g=f._internalRoot;if(\"function\"===typeof e){var k=e;e=function(){var a=mk(g);k.call(a)}}Xj(function(){lk(b,g,a,e)})}return mk(g)}ec=function(a){if(13===a.tag){var b=Hg();Jg(a,4,b);ok(a,4)}};fc=function(a){if(13===a.tag){var b=Hg();Jg(a,67108864,b);ok(a,67108864)}};\ngc=function(a){if(13===a.tag){var b=Hg(),c=Ig(a);Jg(a,c,b);ok(a,c)}};hc=function(a,b){return b()};\nyb=function(a,b,c){switch(b){case \"input\":ab(a,c);b=c.name;if(\"radio\"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+b)+'][type=\"radio\"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(y(90));Wa(d);ab(d,e)}}}break;case \"textarea\":ib(a,c);break;case \"select\":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Wj;\nHb=function(a,b,c,d,e){var f=X;X|=4;try{return gg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(wj(),ig())}};Ib=function(){0===(X&49)&&(Vj(),Oj())};Jb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}};function uk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rk(b))throw Error(y(200));return kk(a,b,null,c)}var vk={Events:[Cb,ue,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc,bundleType:0,version:\"17.0.2\",rendererPackageName:\"react-dom\"};\nvar xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=cc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||\npk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(\"undefined\"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;exports.createPortal=uk;\nexports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if(\"function\"===typeof a.render)throw Error(y(188));throw Error(y(268,Object.keys(a)));}a=cc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return gg(99,a.bind(null,b))}finally{X=c,ig()}};exports.hydrate=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!0,c)};\nexports.render=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!rk(a))throw Error(y(40));return a._reactRootContainer?(Xj(function(){tk(null,null,a,!1,function(){a._reactRootContainer=null;a[ff]=null})}),!0):!1};exports.unstable_batchedUpdates=Wj;exports.unstable_createPortal=function(a,b){return uk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};\nexports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!rk(c))throw Error(y(200));if(null==a||void 0===a._reactInternals)throw Error(y(38));return tk(a,b,c,!1,d)};exports.version=\"17.0.2\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","import * as React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (data) => data instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\r\nvar isObject = (value) => !isNullOrUndefined(value) &&\r\n !Array.isArray(value) &&\r\n isObjectType(value) &&\r\n !isDateObject(value);\n\nvar getControllerValue = (event) => isObject(event) && event.target\r\n ? isCheckBoxInput(event.target)\r\n ? event.target.checked\r\n : event.target.value\r\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/.\\d/)) || name;\n\nvar isNameInFieldArray = (names, name) => [...names].some((current) => getNodeParentName(name) === current);\n\nvar compact = (value) => value.filter(Boolean);\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (obj, path, defaultValue) => {\r\n if (isObject(obj) && path) {\r\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => (isNullOrUndefined(result) ? result : result[key]), obj);\r\n return isUndefined(result) || result === obj\r\n ? isUndefined(obj[path])\r\n ? defaultValue\r\n : obj[path]\r\n : result;\r\n }\r\n return undefined;\r\n};\n\nconst EVENTS = {\r\n BLUR: 'blur',\r\n CHANGE: 'change',\r\n};\r\nconst VALIDATION_MODE = {\r\n onBlur: 'onBlur',\r\n onChange: 'onChange',\r\n onSubmit: 'onSubmit',\r\n onTouched: 'onTouched',\r\n all: 'all',\r\n};\r\nconst INPUT_VALIDATION_RULES = {\r\n max: 'max',\r\n min: 'min',\r\n maxLength: 'maxLength',\r\n minLength: 'minLength',\r\n pattern: 'pattern',\r\n required: 'required',\r\n validate: 'validate',\r\n};\n\nvar omit = (source, key) => {\r\n const copy = Object.assign({}, source);\r\n delete copy[key];\r\n return copy;\r\n};\n\nconst HookFormContext = React.createContext(null);\r\nconst useFormContext = () => React.useContext(HookFormContext);\r\nconst FormProvider = (props) => (React.createElement(HookFormContext.Provider, { value: omit(props, 'children') }, props.children));\n\nvar getProxyFormState = (formState, _proxyFormState, localProxyFormState, isRoot = true) => {\r\n function createGetter(prop) {\r\n return () => {\r\n if (prop in formState) {\r\n if (_proxyFormState[prop] !== VALIDATION_MODE.all) {\r\n _proxyFormState[prop] = !isRoot || VALIDATION_MODE.all;\r\n }\r\n localProxyFormState && (localProxyFormState[prop] = true);\r\n return formState[prop];\r\n }\r\n return undefined;\r\n };\r\n }\r\n const result = {};\r\n for (const key in formState) {\r\n Object.defineProperty(result, key, {\r\n get: createGetter(key),\r\n });\r\n }\r\n return result;\r\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, isRoot) => {\r\n const formState = omit(formStateData, 'name');\r\n return (isEmptyObject(formState) ||\r\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\r\n Object.keys(formState).find((key) => _proxyFormState[key] ===\r\n (!isRoot || VALIDATION_MODE.all)));\r\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar shouldSubscribeByName = (name, signalName) => !name ||\r\n !signalName ||\r\n convertToArrayPayload(name).some((currentName) => currentName &&\r\n (currentName.startsWith(signalName) ||\r\n signalName.startsWith(currentName)));\n\nconst tearDown = (_unsubscribe) => {\r\n if (_unsubscribe.current) {\r\n _unsubscribe.current.unsubscribe();\r\n _unsubscribe.current = undefined;\r\n }\r\n};\r\nconst updateSubscriptionProps = ({ _unsubscribe, props }) => () => {\r\n if (props.disabled) {\r\n tearDown(_unsubscribe);\r\n }\r\n else if (!_unsubscribe.current) {\r\n _unsubscribe.current = props.subject.subscribe({\r\n next: props.callback,\r\n });\r\n }\r\n};\r\nfunction useSubscribe(props) {\r\n const _unsubscribe = React.useRef();\r\n const _updateSubscription = React.useRef(() => { });\r\n _updateSubscription.current = updateSubscriptionProps({\r\n _unsubscribe,\r\n props,\r\n });\r\n !props.skipEarlySubscription && _updateSubscription.current();\r\n React.useEffect(() => {\r\n _updateSubscription.current();\r\n return () => tearDown(_unsubscribe);\r\n }, []);\r\n}\n\nfunction useFormState(props) {\r\n const methods = useFormContext();\r\n const { control = methods.control, disabled, name } = props || {};\r\n const [formState, updateFormState] = React.useState(control._formState);\r\n const _localProxyFormState = React.useRef({\r\n isDirty: false,\r\n dirtyFields: false,\r\n touchedFields: false,\r\n isValidating: false,\r\n isValid: false,\r\n errors: false,\r\n });\r\n const _name = React.useRef(name);\r\n _name.current = name;\r\n useSubscribe({\r\n disabled,\r\n callback: (formState) => shouldSubscribeByName(_name.current, formState.name) &&\r\n shouldRenderFormState(formState, _localProxyFormState.current) &&\r\n updateFormState(Object.assign(Object.assign({}, control._formState), formState)),\r\n subject: control._subjects.state,\r\n });\r\n return getProxyFormState(formState, control._proxyFormState, _localProxyFormState.current, false);\r\n}\n\nfunction useController(props) {\r\n const methods = useFormContext();\r\n const { name, control = methods.control, shouldUnregister } = props;\r\n const [value, setInputStateValue] = React.useState(get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)));\r\n const formState = useFormState({\r\n control: control || methods.control,\r\n name,\r\n });\r\n const _name = React.useRef(name);\r\n _name.current = name;\r\n useSubscribe({\r\n subject: control._subjects.control,\r\n callback: (data) => (!data.name || _name.current === data.name) &&\r\n setInputStateValue(get(data.values, _name.current)),\r\n });\r\n const registerProps = control.register(name, Object.assign(Object.assign({}, props.rules), { value }));\r\n const updateMounted = React.useCallback((name, value) => {\r\n const field = get(control._fields, name);\r\n if (field) {\r\n field._f.mount = value;\r\n }\r\n }, [control]);\r\n React.useEffect(() => {\r\n updateMounted(name, true);\r\n return () => {\r\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\r\n if (isNameInFieldArray(control._names.array, name)\r\n ? _shouldUnregisterField && !control._stateFlags.action\r\n : _shouldUnregisterField) {\r\n control.unregister(name);\r\n }\r\n else {\r\n updateMounted(name, false);\r\n }\r\n };\r\n }, [name, control, shouldUnregister, updateMounted]);\r\n return {\r\n field: {\r\n onChange: (event) => {\r\n const value = getControllerValue(event);\r\n setInputStateValue(value);\r\n registerProps.onChange({\r\n target: {\r\n value,\r\n name: name,\r\n },\r\n type: EVENTS.CHANGE,\r\n });\r\n },\r\n onBlur: () => {\r\n registerProps.onBlur({\r\n target: {\r\n value,\r\n name: name,\r\n },\r\n type: EVENTS.BLUR,\r\n });\r\n },\r\n name,\r\n value,\r\n ref: (elm) => {\r\n const field = get(control._fields, name);\r\n if (elm && field && elm.focus) {\r\n field._f.ref = {\r\n focus: () => elm.focus(),\r\n setCustomValidity: (message) => elm.setCustomValidity(message),\r\n reportValidity: () => elm.reportValidity(),\r\n };\r\n }\r\n },\r\n },\r\n formState,\r\n fieldState: {\r\n invalid: !!get(formState.errors, name),\r\n isDirty: !!get(formState.dirtyFields, name),\r\n isTouched: !!get(formState.touchedFields, name),\r\n error: get(formState.errors, name),\r\n },\r\n };\r\n}\n\nconst Controller = (props) => props.render(useController(props));\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\r\n ? Object.assign(Object.assign({}, errors[name]), { types: Object.assign(Object.assign({}, (errors[name] && errors[name].types ? errors[name].types : {})), { [type]: message || true }) }) : {};\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nfunction set(object, path, value) {\r\n let index = -1;\r\n const tempPath = isKey(path) ? [path] : stringToPath(path);\r\n const length = tempPath.length;\r\n const lastIndex = length - 1;\r\n while (++index < length) {\r\n const key = tempPath[index];\r\n let newValue = value;\r\n if (index !== lastIndex) {\r\n const objValue = object[key];\r\n newValue =\r\n isObject(objValue) || Array.isArray(objValue)\r\n ? objValue\r\n : !isNaN(+tempPath[index + 1])\r\n ? []\r\n : {};\r\n }\r\n object[key] = newValue;\r\n object = object[key];\r\n }\r\n return object;\r\n}\n\nconst focusFieldBy = (fields, callback, fieldsNames) => {\r\n for (const key of fieldsNames || Object.keys(fields)) {\r\n const field = get(fields, key);\r\n if (field) {\r\n const _f = field._f;\r\n const current = omit(field, '_f');\r\n if (_f && callback(_f.name)) {\r\n if (_f.ref.focus && isUndefined(_f.ref.focus())) {\r\n break;\r\n }\r\n else if (_f.refs) {\r\n _f.refs[0].focus();\r\n break;\r\n }\r\n }\r\n else if (isObject(current)) {\r\n focusFieldBy(current, callback);\r\n }\r\n }\r\n }\r\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\r\n ? options.focusName ||\r\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\r\n : '';\n\nvar mapCurrentIds = (values, _fieldIds, keyName) => values.map((value, index) => {\r\n const output = _fieldIds.current[index];\r\n return Object.assign(Object.assign({}, value), (output ? { [keyName]: output[keyName] } : {}));\r\n});\n\nvar generateId = () => {\r\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n const r = (Math.random() * 16 + d) % 16 | 0;\r\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\r\n });\r\n};\n\nvar mapIds = (values = [], keyName) => values.map((value) => (Object.assign(Object.assign({}, (value[keyName] ? {} : { [keyName]: generateId() })), value)));\n\nfunction append(data, value) {\r\n return [...convertToArrayPayload(data), ...convertToArrayPayload(value)];\r\n}\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\r\n return [\r\n ...data.slice(0, index),\r\n ...convertToArrayPayload(value),\r\n ...data.slice(index),\r\n ];\r\n}\n\nvar moveArrayAt = (data, from, to) => {\r\n if (Array.isArray(data)) {\r\n if (isUndefined(data[to])) {\r\n data[to] = undefined;\r\n }\r\n data.splice(to, 0, data.splice(from, 1)[0]);\r\n return data;\r\n }\r\n return [];\r\n};\n\nvar omitKeys = (fields, keyName) => fields.map((field = {}) => omit(field, keyName));\n\nfunction prepend(data, value) {\r\n return [...convertToArrayPayload(value), ...convertToArrayPayload(data)];\r\n}\n\nfunction removeAtIndexes(data, indexes) {\r\n let i = 0;\r\n const temp = [...data];\r\n for (const index of indexes) {\r\n temp.splice(index - i, 1);\r\n i++;\r\n }\r\n return compact(temp).length ? temp : [];\r\n}\r\nvar removeArrayAt = (data, index) => isUndefined(index)\r\n ? []\r\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\r\n data[indexA] = [data[indexB], (data[indexB] = data[indexA])][0];\r\n};\n\nvar updateAt = (fieldValues, index, value) => {\r\n fieldValues[index] = value;\r\n return fieldValues;\r\n};\n\nconst useFieldArray = (props) => {\r\n const methods = useFormContext();\r\n const { control = methods.control, name, keyName = 'id', shouldUnregister, } = props;\r\n const [fields, setFields] = React.useState(mapIds(control._getFieldArray(name), keyName));\r\n const _fieldIds = React.useRef(fields);\r\n const _name = React.useRef(name);\r\n _name.current = name;\r\n _fieldIds.current = fields;\r\n control._names.array.add(name);\r\n useSubscribe({\r\n callback: ({ values, name: fieldArrayName }) => {\r\n if (fieldArrayName === _name.current || !fieldArrayName) {\r\n setFields(mapIds(get(values, _name.current), keyName));\r\n }\r\n },\r\n subject: control._subjects.array,\r\n skipEarlySubscription: true,\r\n });\r\n const updateValues = React.useCallback((updatedFieldArrayValuesWithKey) => {\r\n const updatedFieldArrayValues = omitKeys(updatedFieldArrayValuesWithKey, keyName);\r\n set(control._formValues, name, updatedFieldArrayValues);\r\n setFields(updatedFieldArrayValuesWithKey);\r\n return updatedFieldArrayValues;\r\n }, [control, name, keyName]);\r\n const append$1 = (value, options) => {\r\n const appendValue = convertToArrayPayload(value);\r\n const updatedFieldArrayValuesWithKey = append(mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName), mapIds(appendValue, keyName));\r\n control._updateFieldArray(name, append, {\r\n argA: fillEmptyArray(value),\r\n }, updateValues(updatedFieldArrayValuesWithKey));\r\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValuesWithKey.length - appendValue.length, options);\r\n };\r\n const prepend$1 = (value, options) => {\r\n const updatedFieldArrayValuesWithKey = prepend(mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName), mapIds(convertToArrayPayload(value), keyName));\r\n control._updateFieldArray(name, prepend, {\r\n argA: fillEmptyArray(value),\r\n }, updateValues(updatedFieldArrayValuesWithKey));\r\n control._names.focus = getFocusFieldName(name, 0, options);\r\n };\r\n const remove = (index) => {\r\n const updatedFieldArrayValuesWithKey = removeArrayAt(mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName), index);\r\n control._updateFieldArray(name, removeArrayAt, {\r\n argA: index,\r\n }, updateValues(updatedFieldArrayValuesWithKey));\r\n };\r\n const insert$1 = (index, value, options) => {\r\n const updatedFieldArrayValuesWithKey = insert(mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName), index, mapIds(convertToArrayPayload(value), keyName));\r\n control._updateFieldArray(name, insert, {\r\n argA: index,\r\n argB: fillEmptyArray(value),\r\n }, updateValues(updatedFieldArrayValuesWithKey));\r\n control._names.focus = getFocusFieldName(name, index, options);\r\n };\r\n const swap = (indexA, indexB) => {\r\n const updatedFieldArrayValuesWithKey = mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName);\r\n swapArrayAt(updatedFieldArrayValuesWithKey, indexA, indexB);\r\n control._updateFieldArray(name, swapArrayAt, {\r\n argA: indexA,\r\n argB: indexB,\r\n }, updateValues(updatedFieldArrayValuesWithKey), false);\r\n };\r\n const move = (from, to) => {\r\n const updatedFieldArrayValuesWithKey = mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName);\r\n moveArrayAt(updatedFieldArrayValuesWithKey, from, to);\r\n control._updateFieldArray(name, moveArrayAt, {\r\n argA: from,\r\n argB: to,\r\n }, updateValues(updatedFieldArrayValuesWithKey), false);\r\n };\r\n const update = (index, value) => {\r\n const updatedFieldArrayValuesWithKey = mapCurrentIds(control._getFieldArray(name), _fieldIds, keyName);\r\n const updatedFieldArrayValues = updateAt(updatedFieldArrayValuesWithKey, index, value);\r\n _fieldIds.current = mapIds(updatedFieldArrayValues, keyName);\r\n control._updateFieldArray(name, updateAt, {\r\n argA: index,\r\n argB: value,\r\n }, updateValues(_fieldIds.current), true, false);\r\n };\r\n const replace = (value) => {\r\n const updatedFieldArrayValuesWithKey = mapIds(convertToArrayPayload(value), keyName);\r\n control._updateFieldArray(name, () => updatedFieldArrayValuesWithKey, {}, updateValues(updatedFieldArrayValuesWithKey), true, false);\r\n };\r\n React.useEffect(() => {\r\n control._stateFlags.action = false;\r\n if (control._names.watchAll) {\r\n control._subjects.state.next({});\r\n }\r\n else {\r\n for (const watchField of control._names.watch) {\r\n if (name.startsWith(watchField)) {\r\n control._subjects.state.next({});\r\n break;\r\n }\r\n }\r\n }\r\n control._subjects.watch.next({\r\n name,\r\n values: control._formValues,\r\n });\r\n control._names.focus &&\r\n focusFieldBy(control._fields, (key) => key.startsWith(control._names.focus));\r\n control._names.focus = '';\r\n control._proxyFormState.isValid && control._updateValid();\r\n }, [fields, name, control, keyName]);\r\n React.useEffect(() => {\r\n !get(control._formValues, name) && set(control._formValues, name, []);\r\n return () => {\r\n if (control._options.shouldUnregister || shouldUnregister) {\r\n control.unregister(name);\r\n }\r\n };\r\n }, [name, control, keyName, shouldUnregister]);\r\n return {\r\n swap: React.useCallback(swap, [updateValues, name, control, keyName]),\r\n move: React.useCallback(move, [updateValues, name, control, keyName]),\r\n prepend: React.useCallback(prepend$1, [updateValues, name, control, keyName]),\r\n append: React.useCallback(append$1, [updateValues, name, control, keyName]),\r\n remove: React.useCallback(remove, [updateValues, name, control, keyName]),\r\n insert: React.useCallback(insert$1, [updateValues, name, control, keyName]),\r\n update: React.useCallback(update, [updateValues, name, control, keyName]),\r\n replace: React.useCallback(replace, [updateValues, name, control, keyName]),\r\n fields: fields,\r\n };\r\n};\n\nvar isFunction = (value) => typeof value === 'function';\n\nfunction cloneObject(data) {\r\n let copy;\r\n const isArray = Array.isArray(data);\r\n if (data instanceof Date) {\r\n copy = new Date(data);\r\n }\r\n else if (data instanceof Set) {\r\n copy = new Set(data);\r\n }\r\n else if (isArray || isObject(data)) {\r\n copy = isArray ? [] : {};\r\n for (const key in data) {\r\n if (isFunction(data[key])) {\r\n copy = data;\r\n break;\r\n }\r\n copy[key] = cloneObject(data[key]);\r\n }\r\n }\r\n else {\r\n return data;\r\n }\r\n return copy;\r\n}\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\r\n if (isPrimitive(object1) || isPrimitive(object2)) {\r\n return object1 === object2;\r\n }\r\n if (isDateObject(object1) && isDateObject(object2)) {\r\n return object1.getTime() === object2.getTime();\r\n }\r\n const keys1 = Object.keys(object1);\r\n const keys2 = Object.keys(object2);\r\n if (keys1.length !== keys2.length) {\r\n return false;\r\n }\r\n for (const key of keys1) {\r\n const val1 = object1[key];\r\n if (!keys2.includes(key)) {\r\n return false;\r\n }\r\n if (key !== 'ref') {\r\n const val2 = object2[key];\r\n if ((isDateObject(val1) && isDateObject(val2)) ||\r\n (isObject(val1) && isObject(val2)) ||\r\n (Array.isArray(val1) && Array.isArray(val2))\r\n ? !deepEqual(val1, val2)\r\n : val1 !== val2) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\n\nvar getValidationModes = (mode) => ({\r\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\r\n isOnBlur: mode === VALIDATION_MODE.onBlur,\r\n isOnChange: mode === VALIDATION_MODE.onChange,\r\n isOnAll: mode === VALIDATION_MODE.all,\r\n isOnTouch: mode === VALIDATION_MODE.onTouched,\r\n});\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isHTMLElement = (value) => value instanceof HTMLElement;\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRadioOrCheckboxFunction = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar isString = (value) => typeof value === 'string';\n\nvar isWeb = typeof window !== 'undefined' &&\r\n typeof window.HTMLElement !== 'undefined' &&\r\n typeof document !== 'undefined';\n\nvar live = (ref) => isHTMLElement(ref) && document.contains(ref);\n\nclass Subscription {\r\n constructor() {\r\n this.tearDowns = [];\r\n }\r\n add(tearDown) {\r\n this.tearDowns.push(tearDown);\r\n }\r\n unsubscribe() {\r\n for (const teardown of this.tearDowns) {\r\n teardown();\r\n }\r\n this.tearDowns = [];\r\n }\r\n}\r\nclass Subscriber {\r\n constructor(observer, subscription) {\r\n this.observer = observer;\r\n this.closed = false;\r\n subscription.add(() => (this.closed = true));\r\n }\r\n next(value) {\r\n if (!this.closed) {\r\n this.observer.next(value);\r\n }\r\n }\r\n}\r\nclass Subject {\r\n constructor() {\r\n this.observers = [];\r\n }\r\n next(value) {\r\n for (const observer of this.observers) {\r\n observer.next(value);\r\n }\r\n }\r\n subscribe(observer) {\r\n const subscription = new Subscription();\r\n const subscriber = new Subscriber(observer, subscription);\r\n this.observers.push(subscriber);\r\n return subscription;\r\n }\r\n unsubscribe() {\r\n this.observers = [];\r\n }\r\n}\n\nfunction baseGet(object, updatePath) {\r\n const length = updatePath.slice(0, -1).length;\r\n let index = 0;\r\n while (index < length) {\r\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\r\n }\r\n return object;\r\n}\r\nfunction unset(object, path) {\r\n const updatePath = isKey(path) ? [path] : stringToPath(path);\r\n const childObject = updatePath.length == 1 ? object : baseGet(object, updatePath);\r\n const key = updatePath[updatePath.length - 1];\r\n let previousObjRef;\r\n if (childObject) {\r\n delete childObject[key];\r\n }\r\n for (let k = 0; k < updatePath.slice(0, -1).length; k++) {\r\n let index = -1;\r\n let objectRef;\r\n const currentPaths = updatePath.slice(0, -(k + 1));\r\n const currentPathsLength = currentPaths.length - 1;\r\n if (k > 0) {\r\n previousObjRef = object;\r\n }\r\n while (++index < currentPaths.length) {\r\n const item = currentPaths[index];\r\n objectRef = objectRef ? objectRef[item] : object[item];\r\n if (currentPathsLength === index &&\r\n ((isObject(objectRef) && isEmptyObject(objectRef)) ||\r\n (Array.isArray(objectRef) &&\r\n !objectRef.filter((data) => (isObject(data) && !isEmptyObject(data)) || isBoolean(data)).length))) {\r\n previousObjRef ? delete previousObjRef[item] : delete object[item];\r\n }\r\n previousObjRef = objectRef;\r\n }\r\n }\r\n return object;\r\n}\n\nvar isFileInput = (element) => element.type === 'file';\n\nconst defaultResult = {\r\n value: false,\r\n isValid: false,\r\n};\r\nconst validResult = { value: true, isValid: true };\r\nvar getCheckboxValue = (options) => {\r\n if (Array.isArray(options)) {\r\n if (options.length > 1) {\r\n const values = options\r\n .filter((option) => option && option.checked && !option.disabled)\r\n .map((option) => option.value);\r\n return { value: values, isValid: !!values.length };\r\n }\r\n return options[0].checked && !options[0].disabled\r\n ? // @ts-expect-error expected to work in the browser\r\n options[0].attributes && !isUndefined(options[0].attributes.value)\r\n ? isUndefined(options[0].value) || options[0].value === ''\r\n ? validResult\r\n : { value: options[0].value, isValid: true }\r\n : validResult\r\n : defaultResult;\r\n }\r\n return defaultResult;\r\n};\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\r\n ? value\r\n : valueAsNumber\r\n ? value === ''\r\n ? NaN\r\n : +value\r\n : valueAsDate\r\n ? new Date(value)\r\n : setValueAs\r\n ? setValueAs(value)\r\n : value;\n\nconst defaultReturn = {\r\n isValid: false,\r\n value: null,\r\n};\r\nvar getRadioValue = (options) => Array.isArray(options)\r\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\r\n ? {\r\n isValid: true,\r\n value: option.value,\r\n }\r\n : previous, defaultReturn)\r\n : defaultReturn;\n\nfunction getFieldValue(_f) {\r\n const ref = _f.ref;\r\n if (_f.refs ? _f.refs.every((ref) => ref.disabled) : ref.disabled) {\r\n return;\r\n }\r\n if (isFileInput(ref)) {\r\n return ref.files;\r\n }\r\n if (isRadioInput(ref)) {\r\n return getRadioValue(_f.refs).value;\r\n }\r\n if (isMultipleSelect(ref)) {\r\n return [...ref.selectedOptions].map(({ value }) => value);\r\n }\r\n if (isCheckBoxInput(ref)) {\r\n return getCheckboxValue(_f.refs).value;\r\n }\r\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\r\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\r\n const fields = {};\r\n for (const name of fieldsNames) {\r\n const field = get(_fields, name);\r\n field && set(fields, name, field._f);\r\n }\r\n return {\r\n criteriaMode,\r\n names: [...fieldsNames],\r\n fields,\r\n shouldUseNativeValidation,\r\n };\r\n};\n\nvar hasValidation = (options) => options.mount &&\r\n (options.required ||\r\n options.min ||\r\n options.max ||\r\n options.maxLength ||\r\n options.minLength ||\r\n options.pattern ||\r\n options.validate);\n\nfunction deepMerge(target, source) {\r\n if (isPrimitive(target) || isPrimitive(source)) {\r\n return source;\r\n }\r\n for (const key in source) {\r\n const targetValue = target[key];\r\n const sourceValue = source[key];\r\n try {\r\n target[key] =\r\n (isObject(targetValue) && isObject(sourceValue)) ||\r\n (Array.isArray(targetValue) && Array.isArray(sourceValue))\r\n ? deepMerge(targetValue, sourceValue)\r\n : sourceValue;\r\n }\r\n catch (_a) { }\r\n }\r\n return target;\r\n}\n\nfunction setDirtyFields(values, defaultValues, dirtyFields, parentNode, parentName) {\r\n let index = -1;\r\n while (++index < values.length) {\r\n for (const key in values[index]) {\r\n if (Array.isArray(values[index][key])) {\r\n !dirtyFields[index] && (dirtyFields[index] = {});\r\n dirtyFields[index][key] = [];\r\n setDirtyFields(values[index][key], get(defaultValues[index] || {}, key, []), dirtyFields[index][key], dirtyFields[index], key);\r\n }\r\n else {\r\n !isNullOrUndefined(defaultValues) &&\r\n deepEqual(get(defaultValues[index] || {}, key), values[index][key])\r\n ? set(dirtyFields[index] || {}, key)\r\n : (dirtyFields[index] = Object.assign(Object.assign({}, dirtyFields[index]), { [key]: true }));\r\n }\r\n }\r\n parentNode &&\r\n !dirtyFields.length &&\r\n delete parentNode[parentName];\r\n }\r\n return dirtyFields;\r\n}\r\nvar setFieldArrayDirtyFields = (values, defaultValues, dirtyFields) => deepMerge(setDirtyFields(values, defaultValues, dirtyFields.slice(0, values.length)), setDirtyFields(defaultValues, values, dirtyFields.slice(0, values.length)));\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\r\n if (mode.isOnAll) {\r\n return false;\r\n }\r\n else if (!isSubmitted && mode.isOnTouch) {\r\n return !(isTouched || isBlurEvent);\r\n }\r\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\r\n return !isBlurEvent;\r\n }\r\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\r\n return isBlurEvent;\r\n }\r\n return true;\r\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name, [])).length && unset(ref, name);\n\nvar isMessage = (value) => isString(value) || React.isValidElement(value);\n\nvar isRegex = (value) => value instanceof RegExp;\n\nfunction getValidateError(result, ref, type = 'validate') {\r\n if (isMessage(result) ||\r\n (Array.isArray(result) && result.every(isMessage)) ||\r\n (isBoolean(result) && !result)) {\r\n return {\r\n type,\r\n message: isMessage(result) ? result : '',\r\n ref,\r\n };\r\n }\r\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\r\n ? validationData\r\n : {\r\n value: validationData,\r\n message: '',\r\n };\n\nvar validateField = async (field, inputValue, validateAllFieldCriteria, shouldUseNativeValidation) => {\r\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, disabled, } = field._f;\r\n if (!mount || disabled) {\r\n return {};\r\n }\r\n const inputRef = refs ? refs[0] : ref;\r\n const setCustomValidty = (message) => {\r\n if (shouldUseNativeValidation && inputRef.reportValidity) {\r\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || ' ');\r\n inputRef.reportValidity();\r\n }\r\n };\r\n const error = {};\r\n const isRadio = isRadioInput(ref);\r\n const isCheckBox = isCheckBoxInput(ref);\r\n const isRadioOrCheckbox = isRadio || isCheckBox;\r\n const isEmpty = ((valueAsNumber || isFileInput(ref)) && !ref.value) ||\r\n inputValue === '' ||\r\n (Array.isArray(inputValue) && !inputValue.length);\r\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\r\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\r\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\r\n error[name] = Object.assign({ type: exceedMax ? maxType : minType, message,\r\n ref }, appendErrorsCurry(exceedMax ? maxType : minType, message));\r\n };\r\n if (required &&\r\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\r\n (isBoolean(inputValue) && !inputValue) ||\r\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\r\n (isRadio && !getRadioValue(refs).isValid))) {\r\n const { value, message } = isMessage(required)\r\n ? { value: !!required, message: required }\r\n : getValueAndMessage(required);\r\n if (value) {\r\n error[name] = Object.assign({ type: INPUT_VALIDATION_RULES.required, message, ref: inputRef }, appendErrorsCurry(INPUT_VALIDATION_RULES.required, message));\r\n if (!validateAllFieldCriteria) {\r\n setCustomValidty(message);\r\n return error;\r\n }\r\n }\r\n }\r\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\r\n let exceedMax;\r\n let exceedMin;\r\n const maxOutput = getValueAndMessage(max);\r\n const minOutput = getValueAndMessage(min);\r\n if (!isNaN(inputValue)) {\r\n const valueNumber = ref.valueAsNumber || parseFloat(inputValue);\r\n if (!isNullOrUndefined(maxOutput.value)) {\r\n exceedMax = valueNumber > maxOutput.value;\r\n }\r\n if (!isNullOrUndefined(minOutput.value)) {\r\n exceedMin = valueNumber < minOutput.value;\r\n }\r\n }\r\n else {\r\n const valueDate = ref.valueAsDate || new Date(inputValue);\r\n if (isString(maxOutput.value)) {\r\n exceedMax = valueDate > new Date(maxOutput.value);\r\n }\r\n if (isString(minOutput.value)) {\r\n exceedMin = valueDate < new Date(minOutput.value);\r\n }\r\n }\r\n if (exceedMax || exceedMin) {\r\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\r\n if (!validateAllFieldCriteria) {\r\n setCustomValidty(error[name].message);\r\n return error;\r\n }\r\n }\r\n }\r\n if ((maxLength || minLength) && !isEmpty && isString(inputValue)) {\r\n const maxLengthOutput = getValueAndMessage(maxLength);\r\n const minLengthOutput = getValueAndMessage(minLength);\r\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\r\n inputValue.length > maxLengthOutput.value;\r\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\r\n inputValue.length < minLengthOutput.value;\r\n if (exceedMax || exceedMin) {\r\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\r\n if (!validateAllFieldCriteria) {\r\n setCustomValidty(error[name].message);\r\n return error;\r\n }\r\n }\r\n }\r\n if (pattern && !isEmpty && isString(inputValue)) {\r\n const { value: patternValue, message } = getValueAndMessage(pattern);\r\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\r\n error[name] = Object.assign({ type: INPUT_VALIDATION_RULES.pattern, message,\r\n ref }, appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message));\r\n if (!validateAllFieldCriteria) {\r\n setCustomValidty(message);\r\n return error;\r\n }\r\n }\r\n }\r\n if (validate) {\r\n if (isFunction(validate)) {\r\n const result = await validate(inputValue);\r\n const validateError = getValidateError(result, inputRef);\r\n if (validateError) {\r\n error[name] = Object.assign(Object.assign({}, validateError), appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message));\r\n if (!validateAllFieldCriteria) {\r\n setCustomValidty(validateError.message);\r\n return error;\r\n }\r\n }\r\n }\r\n else if (isObject(validate)) {\r\n let validationResult = {};\r\n for (const key in validate) {\r\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\r\n break;\r\n }\r\n const validateError = getValidateError(await validate[key](inputValue), inputRef, key);\r\n if (validateError) {\r\n validationResult = Object.assign(Object.assign({}, validateError), appendErrorsCurry(key, validateError.message));\r\n setCustomValidty(validateError.message);\r\n if (validateAllFieldCriteria) {\r\n error[name] = validationResult;\r\n }\r\n }\r\n }\r\n if (!isEmptyObject(validationResult)) {\r\n error[name] = Object.assign({ ref: inputRef }, validationResult);\r\n if (!validateAllFieldCriteria) {\r\n return error;\r\n }\r\n }\r\n }\r\n }\r\n setCustomValidty(true);\r\n return error;\r\n};\n\nconst defaultOptions = {\r\n mode: VALIDATION_MODE.onSubmit,\r\n reValidateMode: VALIDATION_MODE.onChange,\r\n shouldFocusError: true,\r\n};\r\nconst isWindowUndefined = typeof window === 'undefined';\r\nfunction createFormControl(props = {}) {\r\n let _options = Object.assign(Object.assign({}, defaultOptions), props);\r\n let _formState = {\r\n isDirty: false,\r\n isValidating: false,\r\n dirtyFields: {},\r\n isSubmitted: false,\r\n submitCount: 0,\r\n touchedFields: {},\r\n isSubmitting: false,\r\n isSubmitSuccessful: false,\r\n isValid: false,\r\n errors: {},\r\n };\r\n let _fields = {};\r\n let _defaultValues = _options.defaultValues || {};\r\n let _formValues = _options.shouldUnregister\r\n ? {}\r\n : cloneObject(_defaultValues);\r\n let _stateFlags = {\r\n action: false,\r\n mount: false,\r\n watch: false,\r\n };\r\n let _names = {\r\n mount: new Set(),\r\n unMount: new Set(),\r\n array: new Set(),\r\n watch: new Set(),\r\n };\r\n let delayErrorCallback;\r\n let timer = 0;\r\n let validateFields = {};\r\n const _proxyFormState = {\r\n isDirty: false,\r\n dirtyFields: false,\r\n touchedFields: false,\r\n isValidating: false,\r\n isValid: false,\r\n errors: false,\r\n };\r\n const _subjects = {\r\n watch: new Subject(),\r\n control: new Subject(),\r\n array: new Subject(),\r\n state: new Subject(),\r\n };\r\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\r\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\r\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\r\n const debounce = (callback, wait) => (...args) => {\r\n clearTimeout(timer);\r\n timer = window.setTimeout(() => callback(...args), wait);\r\n };\r\n const isFieldWatched = (name, isBlurEvent) => !isBlurEvent &&\r\n (_names.watchAll ||\r\n _names.watch.has(name) ||\r\n _names.watch.has((name.match(/\\w+/) || [])[0]));\r\n const _updateValid = async (shouldSkipRender) => {\r\n let isValid = false;\r\n if (_proxyFormState.isValid) {\r\n isValid = _options.resolver\r\n ? isEmptyObject((await executeResolver()).errors)\r\n : await executeBuildInValidation(_fields, true);\r\n if (!shouldSkipRender && isValid !== _formState.isValid) {\r\n _formState.isValid = isValid;\r\n _subjects.state.next({\r\n isValid,\r\n });\r\n }\r\n }\r\n return isValid;\r\n };\r\n const _updateFieldArray = (name, method, args, values = [], shouldSetValues = true, shouldSetFields = true) => {\r\n _stateFlags.action = true;\r\n if (shouldSetFields && get(_fields, name)) {\r\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\r\n shouldSetValues && set(_fields, name, fieldValues);\r\n }\r\n if (Array.isArray(get(_formState.errors, name))) {\r\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\r\n shouldSetValues && set(_formState.errors, name, errors);\r\n unsetEmptyArray(_formState.errors, name);\r\n }\r\n if (_proxyFormState.touchedFields && get(_formState.touchedFields, name)) {\r\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\r\n shouldSetValues &&\r\n set(_formState.touchedFields, name, touchedFields);\r\n unsetEmptyArray(_formState.touchedFields, name);\r\n }\r\n if (_proxyFormState.dirtyFields || _proxyFormState.isDirty) {\r\n updateFieldArrayDirty(name, values);\r\n }\r\n _subjects.state.next({\r\n isDirty: _getDirty(name, values),\r\n dirtyFields: _formState.dirtyFields,\r\n errors: _formState.errors,\r\n isValid: _formState.isValid,\r\n });\r\n };\r\n const updateErrors = (name, error) => (set(_formState.errors, name, error),\r\n _subjects.state.next({\r\n errors: _formState.errors,\r\n }));\r\n const updateValidAndValue = (name, shouldSkipSetValueAs, ref) => {\r\n const field = get(_fields, name);\r\n if (field) {\r\n const defaultValue = get(_formValues, name, get(_defaultValues, name));\r\n isUndefined(defaultValue) ||\r\n (ref && ref.defaultChecked) ||\r\n shouldSkipSetValueAs\r\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\r\n : setFieldValue(name, defaultValue);\r\n }\r\n _stateFlags.mount && _updateValid();\r\n };\r\n const updateTouchAndDirty = (name, fieldValue, isCurrentTouched, shouldRender = true) => {\r\n let isFieldDirty = false;\r\n const output = {\r\n name,\r\n };\r\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\r\n if (_proxyFormState.isDirty) {\r\n const isPreviousFormDirty = _formState.isDirty;\r\n _formState.isDirty = output.isDirty = _getDirty();\r\n isFieldDirty = isPreviousFormDirty !== output.isDirty;\r\n }\r\n if (_proxyFormState.dirtyFields && !isCurrentTouched) {\r\n const isPreviousFieldDirty = get(_formState.dirtyFields, name);\r\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\r\n isCurrentFieldPristine\r\n ? unset(_formState.dirtyFields, name)\r\n : set(_formState.dirtyFields, name, true);\r\n output.dirtyFields = _formState.dirtyFields;\r\n isFieldDirty =\r\n isFieldDirty ||\r\n isPreviousFieldDirty !== get(_formState.dirtyFields, name);\r\n }\r\n if (isCurrentTouched && !isPreviousFieldTouched) {\r\n set(_formState.touchedFields, name, isCurrentTouched);\r\n output.touchedFields = _formState.touchedFields;\r\n isFieldDirty =\r\n isFieldDirty ||\r\n (_proxyFormState.touchedFields &&\r\n isPreviousFieldTouched !== isCurrentTouched);\r\n }\r\n isFieldDirty && shouldRender && _subjects.state.next(output);\r\n return isFieldDirty ? output : {};\r\n };\r\n const updateFieldArrayDirty = (name, value) => (set(_formState.dirtyFields, name, setFieldArrayDirtyFields(value, get(_defaultValues, name, []), get(_formState.dirtyFields, name, []))),\r\n unsetEmptyArray(_formState.dirtyFields, name));\r\n const shouldRenderByError = async (shouldSkipRender, name, isValid, error, fieldState) => {\r\n const previousFieldError = get(_formState.errors, name);\r\n const shouldUpdateValid = _proxyFormState.isValid && _formState.isValid !== isValid;\r\n if (props.delayError && error) {\r\n delayErrorCallback =\r\n delayErrorCallback || debounce(updateErrors, props.delayError);\r\n delayErrorCallback(name, error);\r\n }\r\n else {\r\n clearTimeout(timer);\r\n error\r\n ? set(_formState.errors, name, error)\r\n : unset(_formState.errors, name);\r\n }\r\n if (((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\r\n !isEmptyObject(fieldState) ||\r\n shouldUpdateValid) &&\r\n !shouldSkipRender) {\r\n const updatedFormState = Object.assign(Object.assign(Object.assign({}, fieldState), (shouldUpdateValid ? { isValid } : {})), { errors: _formState.errors, name });\r\n _formState = Object.assign(Object.assign({}, _formState), updatedFormState);\r\n _subjects.state.next(updatedFormState);\r\n }\r\n validateFields[name]--;\r\n if (_proxyFormState.isValidating && !validateFields[name]) {\r\n _subjects.state.next({\r\n isValidating: false,\r\n });\r\n validateFields = {};\r\n }\r\n };\r\n const executeResolver = async (name) => _options.resolver\r\n ? await _options.resolver(Object.assign({}, _formValues), _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation))\r\n : {};\r\n const executeResolverValidation = async (names) => {\r\n const { errors } = await executeResolver();\r\n if (names) {\r\n for (const name of names) {\r\n const error = get(errors, name);\r\n error\r\n ? set(_formState.errors, name, error)\r\n : unset(_formState.errors, name);\r\n }\r\n }\r\n else {\r\n _formState.errors = errors;\r\n }\r\n return errors;\r\n };\r\n const executeBuildInValidation = async (fields, shouldOnlyCheckValid, context = {\r\n valid: true,\r\n }) => {\r\n for (const name in fields) {\r\n const field = fields[name];\r\n if (field) {\r\n const fieldReference = field._f;\r\n const fieldValue = omit(field, '_f');\r\n if (fieldReference) {\r\n const fieldError = await validateField(field, get(_formValues, fieldReference.name), shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation);\r\n if (fieldError[fieldReference.name]) {\r\n context.valid = false;\r\n if (shouldOnlyCheckValid) {\r\n break;\r\n }\r\n }\r\n if (!shouldOnlyCheckValid) {\r\n fieldError[fieldReference.name]\r\n ? set(_formState.errors, fieldReference.name, fieldError[fieldReference.name])\r\n : unset(_formState.errors, fieldReference.name);\r\n }\r\n }\r\n fieldValue &&\r\n (await executeBuildInValidation(fieldValue, shouldOnlyCheckValid, context));\r\n }\r\n }\r\n return context.valid;\r\n };\r\n const _removeUnmounted = () => {\r\n for (const name of _names.unMount) {\r\n const field = get(_fields, name);\r\n field &&\r\n (field._f.refs\r\n ? field._f.refs.every((ref) => !live(ref))\r\n : !live(field._f.ref)) &&\r\n unregister(name);\r\n }\r\n _names.unMount = new Set();\r\n };\r\n const _getDirty = (name, data) => (name && data && set(_formValues, name, data),\r\n !deepEqual(getValues(), _defaultValues));\r\n const _getWatch = (names, defaultValue, isGlobal) => {\r\n const fieldValues = Object.assign({}, (_stateFlags.mount\r\n ? _formValues\r\n : isUndefined(defaultValue)\r\n ? _defaultValues\r\n : isString(names)\r\n ? { [names]: defaultValue }\r\n : defaultValue));\r\n if (names) {\r\n const result = convertToArrayPayload(names).map((fieldName) => (isGlobal && _names.watch.add(fieldName),\r\n get(fieldValues, fieldName)));\r\n return Array.isArray(names) ? result : result[0];\r\n }\r\n isGlobal && (_names.watchAll = true);\r\n return fieldValues;\r\n };\r\n const _getFieldArray = (name) => get(_stateFlags.mount ? _formValues : _defaultValues, name, props.shouldUnregister ? get(_defaultValues, name, []) : []);\r\n const setFieldValue = (name, value, options = {}, shouldRender) => {\r\n const field = get(_fields, name);\r\n let fieldValue = value;\r\n if (field) {\r\n const fieldReference = field._f;\r\n if (fieldReference) {\r\n set(_formValues, name, getFieldValueAs(value, fieldReference));\r\n fieldValue =\r\n isWeb && isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\r\n ? ''\r\n : value;\r\n if (isMultipleSelect(fieldReference.ref)) {\r\n [...fieldReference.ref.options].forEach((selectRef) => (selectRef.selected = fieldValue.includes(selectRef.value)));\r\n }\r\n else if (fieldReference.refs) {\r\n if (isCheckBoxInput(fieldReference.ref)) {\r\n fieldReference.refs.length > 1\r\n ? fieldReference.refs.forEach((checkboxRef) => (checkboxRef.checked = Array.isArray(fieldValue)\r\n ? !!fieldValue.find((data) => data === checkboxRef.value)\r\n : fieldValue === checkboxRef.value))\r\n : (fieldReference.refs[0].checked = !!fieldValue);\r\n }\r\n else {\r\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\r\n }\r\n }\r\n else {\r\n fieldReference.ref.value = fieldValue;\r\n }\r\n shouldRender &&\r\n _subjects.control.next({\r\n values: _formValues,\r\n name,\r\n });\r\n }\r\n }\r\n (options.shouldDirty || options.shouldTouch) &&\r\n updateTouchAndDirty(name, fieldValue, options.shouldTouch);\r\n options.shouldValidate && trigger(name);\r\n };\r\n const setValues = (name, value, options) => {\r\n for (const fieldKey in value) {\r\n const fieldValue = value[fieldKey];\r\n const fieldName = `${name}.${fieldKey}`;\r\n const field = get(_fields, fieldName);\r\n (_names.array.has(name) ||\r\n !isPrimitive(fieldValue) ||\r\n (field && !field._f)) &&\r\n !isDateObject(fieldValue)\r\n ? setValues(fieldName, fieldValue, options)\r\n : setFieldValue(fieldName, fieldValue, options, true);\r\n }\r\n };\r\n const setValue = (name, value, options = {}) => {\r\n const field = get(_fields, name);\r\n const isFieldArray = _names.array.has(name);\r\n set(_formValues, name, value);\r\n if (isFieldArray) {\r\n _subjects.array.next({\r\n name,\r\n values: _formValues,\r\n });\r\n if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\r\n options.shouldDirty) {\r\n updateFieldArrayDirty(name, value);\r\n _subjects.state.next({\r\n name,\r\n dirtyFields: _formState.dirtyFields,\r\n isDirty: _getDirty(name, value),\r\n });\r\n }\r\n }\r\n else {\r\n field && !field._f && !isNullOrUndefined(value)\r\n ? setValues(name, value, options)\r\n : setFieldValue(name, value, options, true);\r\n }\r\n isFieldWatched(name) && _subjects.state.next({});\r\n _subjects.watch.next({\r\n name,\r\n });\r\n };\r\n const handleChange = async (event) => {\r\n const target = event.target;\r\n let name = target.name;\r\n const field = get(_fields, name);\r\n if (field) {\r\n let error;\r\n let isValid;\r\n const fieldValue = target.type ? getFieldValue(field._f) : target.value;\r\n const isBlurEvent = event.type === EVENTS.BLUR;\r\n const shouldSkipValidation = (!hasValidation(field._f) &&\r\n !_options.resolver &&\r\n !get(_formState.errors, name) &&\r\n !field._f.deps) ||\r\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\r\n const isWatched = isFieldWatched(name, isBlurEvent);\r\n if (isBlurEvent) {\r\n field._f.onBlur && field._f.onBlur(event);\r\n }\r\n else if (field._f.onChange) {\r\n field._f.onChange(event);\r\n }\r\n set(_formValues, name, fieldValue);\r\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false);\r\n const shouldRender = !isEmptyObject(fieldState) || isWatched;\r\n !isBlurEvent &&\r\n _subjects.watch.next({\r\n name,\r\n type: event.type,\r\n });\r\n if (shouldSkipValidation) {\r\n return (shouldRender &&\r\n _subjects.state.next(Object.assign({ name }, (isWatched ? {} : fieldState))));\r\n }\r\n !isBlurEvent && isWatched && _subjects.state.next({});\r\n validateFields[name] = validateFields[name] ? +1 : 1;\r\n _proxyFormState.isValidating &&\r\n _subjects.state.next({\r\n isValidating: true,\r\n });\r\n if (_options.resolver) {\r\n const { errors } = await executeResolver([name]);\r\n error = get(errors, name);\r\n if (isCheckBoxInput(target) && !error) {\r\n const parentNodeName = getNodeParentName(name);\r\n const parentField = get(_fields, parentNodeName);\r\n if (Array.isArray(parentField) &&\r\n parentField.every((field) => field._f && isCheckBoxInput(field._f.ref))) {\r\n const parentError = get(errors, parentNodeName, {});\r\n parentError.type && (error = parentError);\r\n name = parentNodeName;\r\n }\r\n }\r\n isValid = isEmptyObject(errors);\r\n }\r\n else {\r\n error = (await validateField(field, get(_formValues, name), shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\r\n isValid = await _updateValid(true);\r\n }\r\n field._f.deps && trigger(field._f.deps);\r\n shouldRenderByError(false, name, isValid, error, fieldState);\r\n }\r\n };\r\n const trigger = async (name, options = {}) => {\r\n let isValid;\r\n let validationResult;\r\n const fieldNames = convertToArrayPayload(name);\r\n _subjects.state.next({\r\n isValidating: true,\r\n });\r\n if (_options.resolver) {\r\n const errors = await executeResolverValidation(isUndefined(name) ? name : fieldNames);\r\n isValid = isEmptyObject(errors);\r\n validationResult = name\r\n ? !fieldNames.some((name) => get(errors, name))\r\n : isValid;\r\n }\r\n else if (name) {\r\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\r\n const field = get(_fields, fieldName);\r\n return await executeBuildInValidation(field && field._f ? { [fieldName]: field } : field);\r\n }))).every(Boolean);\r\n _updateValid();\r\n }\r\n else {\r\n validationResult = isValid = await executeBuildInValidation(_fields);\r\n }\r\n _subjects.state.next(Object.assign(Object.assign({}, (!isString(name) || isValid !== _formState.isValid ? {} : { name })), { errors: _formState.errors, isValid, isValidating: false }));\r\n options.shouldFocus &&\r\n !validationResult &&\r\n focusFieldBy(_fields, (key) => get(_formState.errors, key), name ? fieldNames : _names.mount);\r\n return validationResult;\r\n };\r\n const getValues = (fieldNames) => {\r\n const values = Object.assign(Object.assign({}, _defaultValues), (_stateFlags.mount ? _formValues : {}));\r\n return isUndefined(fieldNames)\r\n ? values\r\n : isString(fieldNames)\r\n ? get(values, fieldNames)\r\n : fieldNames.map((name) => get(values, name));\r\n };\r\n const clearErrors = (name) => {\r\n name\r\n ? convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName))\r\n : (_formState.errors = {});\r\n _subjects.state.next({\r\n errors: _formState.errors,\r\n });\r\n };\r\n const setError = (name, error, options) => {\r\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\r\n set(_formState.errors, name, Object.assign(Object.assign({}, error), { ref }));\r\n _subjects.state.next({\r\n name,\r\n errors: _formState.errors,\r\n isValid: false,\r\n });\r\n options && options.shouldFocus && ref && ref.focus && ref.focus();\r\n };\r\n const watch = (name, defaultValue) => isFunction(name)\r\n ? _subjects.watch.subscribe({\r\n next: (info) => name(_getWatch(undefined, defaultValue), info),\r\n })\r\n : _getWatch(name, defaultValue, true);\r\n const unregister = (name, options = {}) => {\r\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\r\n _names.mount.delete(fieldName);\r\n _names.array.delete(fieldName);\r\n if (get(_fields, fieldName)) {\r\n if (!options.keepValue) {\r\n unset(_fields, fieldName);\r\n unset(_formValues, fieldName);\r\n }\r\n !options.keepError && unset(_formState.errors, fieldName);\r\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\r\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\r\n !_options.shouldUnregister &&\r\n !options.keepDefaultValue &&\r\n unset(_defaultValues, fieldName);\r\n }\r\n }\r\n _subjects.watch.next({});\r\n _subjects.state.next(Object.assign(Object.assign({}, _formState), (!options.keepDirty ? {} : { isDirty: _getDirty() })));\r\n !options.keepIsValid && _updateValid();\r\n };\r\n const register = (name, options = {}) => {\r\n const field = get(_fields, name);\r\n set(_fields, name, {\r\n _f: Object.assign(Object.assign(Object.assign({}, (field && field._f ? field._f : { ref: { name } })), { name, mount: true }), options),\r\n });\r\n _names.mount.add(name);\r\n !isUndefined(options.value) && set(_formValues, name, options.value);\r\n field\r\n ? isBoolean(options.disabled) &&\r\n set(_formValues, name, options.disabled\r\n ? undefined\r\n : get(_formValues, name, getFieldValue(field._f)))\r\n : updateValidAndValue(name, true);\r\n return isWindowUndefined\r\n ? { name: name }\r\n : Object.assign(Object.assign({ name }, (isBoolean(options.disabled)\r\n ? { disabled: options.disabled }\r\n : {})), { onChange: handleChange, onBlur: handleChange, ref: (ref) => {\r\n if (ref) {\r\n register(name, options);\r\n let field = get(_fields, name);\r\n const fieldRef = isUndefined(ref.value)\r\n ? ref.querySelectorAll\r\n ? ref.querySelectorAll('input,select,textarea')[0] ||\r\n ref\r\n : ref\r\n : ref;\r\n const isRadioOrCheckbox = isRadioOrCheckboxFunction(fieldRef);\r\n if (fieldRef === field._f.ref ||\r\n (isRadioOrCheckbox &&\r\n compact(field._f.refs || []).find((option) => option === fieldRef))) {\r\n return;\r\n }\r\n field = {\r\n _f: isRadioOrCheckbox\r\n ? Object.assign(Object.assign({}, field._f), { refs: [\r\n ...compact(field._f.refs || []).filter(live),\r\n fieldRef,\r\n ], ref: { type: fieldRef.type, name } }) : Object.assign(Object.assign({}, field._f), { ref: fieldRef }),\r\n };\r\n set(_fields, name, field);\r\n (!options || !options.disabled) &&\r\n updateValidAndValue(name, false, fieldRef);\r\n }\r\n else {\r\n const field = get(_fields, name, {});\r\n const shouldUnregister = _options.shouldUnregister || options.shouldUnregister;\r\n if (field._f) {\r\n field._f.mount = false;\r\n }\r\n shouldUnregister &&\r\n !(isNameInFieldArray(_names.array, name) && _stateFlags.action) &&\r\n _names.unMount.add(name);\r\n }\r\n } });\r\n };\r\n const handleSubmit = (onValid, onInvalid) => async (e) => {\r\n if (e) {\r\n e.preventDefault && e.preventDefault();\r\n e.persist && e.persist();\r\n }\r\n let hasNoPromiseError = true;\r\n let fieldValues = Object.assign({}, _formValues);\r\n _subjects.state.next({\r\n isSubmitting: true,\r\n });\r\n try {\r\n if (_options.resolver) {\r\n const { errors, values } = await executeResolver();\r\n _formState.errors = errors;\r\n fieldValues = values;\r\n }\r\n else {\r\n await executeBuildInValidation(_fields);\r\n }\r\n if (isEmptyObject(_formState.errors) &&\r\n Object.keys(_formState.errors).every((name) => get(fieldValues, name))) {\r\n _subjects.state.next({\r\n errors: {},\r\n isSubmitting: true,\r\n });\r\n await onValid(fieldValues, e);\r\n }\r\n else {\r\n onInvalid && (await onInvalid(_formState.errors, e));\r\n _options.shouldFocusError &&\r\n focusFieldBy(_fields, (key) => get(_formState.errors, key), _names.mount);\r\n }\r\n }\r\n catch (err) {\r\n hasNoPromiseError = false;\r\n throw err;\r\n }\r\n finally {\r\n _formState.isSubmitted = true;\r\n _subjects.state.next({\r\n isSubmitted: true,\r\n isSubmitting: false,\r\n isSubmitSuccessful: isEmptyObject(_formState.errors) && hasNoPromiseError,\r\n submitCount: _formState.submitCount + 1,\r\n errors: _formState.errors,\r\n });\r\n }\r\n };\r\n const reset = (formValues, keepStateOptions = {}) => {\r\n const hasUpdatedFormValues = !isEmptyObject(formValues);\r\n const updatedValues = formValues || _defaultValues;\r\n const cloneUpdatedValues = cloneObject(updatedValues);\r\n if (!keepStateOptions.keepDefaultValues) {\r\n _defaultValues = updatedValues;\r\n }\r\n if (!keepStateOptions.keepValues) {\r\n if (isWeb) {\r\n for (const name of _names.mount) {\r\n const field = get(_fields, name);\r\n if (field && field._f) {\r\n const fieldReference = Array.isArray(field._f.refs)\r\n ? field._f.refs[0]\r\n : field._f.ref;\r\n try {\r\n isHTMLElement(fieldReference) &&\r\n fieldReference.closest('form').reset();\r\n break;\r\n }\r\n catch (_a) { }\r\n }\r\n }\r\n }\r\n _formValues = props.shouldUnregister\r\n ? keepStateOptions.keepDefaultValues\r\n ? _defaultValues\r\n : {}\r\n : cloneUpdatedValues;\r\n _fields = {};\r\n _subjects.control.next({\r\n values: hasUpdatedFormValues ? cloneUpdatedValues : _defaultValues,\r\n });\r\n _subjects.watch.next({});\r\n _subjects.array.next({\r\n values: cloneUpdatedValues,\r\n });\r\n }\r\n _names = {\r\n mount: new Set(),\r\n unMount: new Set(),\r\n array: new Set(),\r\n watch: new Set(),\r\n watchAll: false,\r\n focus: '',\r\n };\r\n _subjects.state.next({\r\n submitCount: keepStateOptions.keepSubmitCount\r\n ? _formState.submitCount\r\n : 0,\r\n isDirty: keepStateOptions.keepDirty\r\n ? _formState.isDirty\r\n : keepStateOptions.keepDefaultValues\r\n ? !deepEqual(formValues, _defaultValues)\r\n : false,\r\n isSubmitted: keepStateOptions.keepIsSubmitted\r\n ? _formState.isSubmitted\r\n : false,\r\n dirtyFields: keepStateOptions.keepDirty\r\n ? _formState.dirtyFields\r\n : (keepStateOptions.keepDefaultValues && formValues\r\n ? Object.entries(formValues).reduce((previous, [key, value]) => (Object.assign(Object.assign({}, previous), { [key]: value !== get(_defaultValues, key) })), {})\r\n : {}),\r\n touchedFields: keepStateOptions.keepTouched\r\n ? _formState.touchedFields\r\n : {},\r\n errors: keepStateOptions.keepErrors\r\n ? _formState.errors\r\n : {},\r\n isSubmitting: false,\r\n isSubmitSuccessful: false,\r\n });\r\n _stateFlags.mount =\r\n !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;\r\n _stateFlags.watch = !!props.shouldUnregister;\r\n };\r\n const setFocus = (name) => {\r\n const field = get(_fields, name)._f;\r\n (field.ref.focus ? field.ref : field.refs[0]).focus();\r\n };\r\n return {\r\n control: {\r\n register,\r\n unregister,\r\n _getWatch,\r\n _getDirty,\r\n _updateValid,\r\n _removeUnmounted,\r\n _updateFieldArray,\r\n _getFieldArray,\r\n _subjects,\r\n _proxyFormState,\r\n get _fields() {\r\n return _fields;\r\n },\r\n set _fields(value) {\r\n _fields = value;\r\n },\r\n get _formValues() {\r\n return _formValues;\r\n },\r\n set _formValues(value) {\r\n _formValues = value;\r\n },\r\n get _stateFlags() {\r\n return _stateFlags;\r\n },\r\n set _stateFlags(value) {\r\n _stateFlags = value;\r\n },\r\n get _defaultValues() {\r\n return _defaultValues;\r\n },\r\n set _defaultValues(value) {\r\n _defaultValues = value;\r\n },\r\n get _names() {\r\n return _names;\r\n },\r\n set _names(value) {\r\n _names = value;\r\n },\r\n get _formState() {\r\n return _formState;\r\n },\r\n set _formState(value) {\r\n _formState = value;\r\n },\r\n get _options() {\r\n return _options;\r\n },\r\n set _options(value) {\r\n _options = Object.assign(Object.assign({}, _options), value);\r\n },\r\n },\r\n trigger,\r\n register,\r\n handleSubmit,\r\n watch,\r\n setValue,\r\n getValues,\r\n reset,\r\n clearErrors,\r\n unregister,\r\n setError,\r\n setFocus,\r\n };\r\n}\n\nfunction useForm(props = {}) {\r\n const _formControl = React.useRef();\r\n const [formState, updateFormState] = React.useState({\r\n isDirty: false,\r\n isValidating: false,\r\n dirtyFields: {},\r\n isSubmitted: false,\r\n submitCount: 0,\r\n touchedFields: {},\r\n isSubmitting: false,\r\n isSubmitSuccessful: false,\r\n isValid: false,\r\n errors: {},\r\n });\r\n if (_formControl.current) {\r\n _formControl.current.control._options = props;\r\n }\r\n else {\r\n _formControl.current = Object.assign(Object.assign({}, createFormControl(props)), { formState });\r\n }\r\n const control = _formControl.current.control;\r\n useSubscribe({\r\n subject: control._subjects.state,\r\n callback: (formState) => {\r\n if (shouldRenderFormState(formState, control._proxyFormState, true)) {\r\n control._formState = Object.assign(Object.assign({}, control._formState), formState);\r\n updateFormState(Object.assign({}, control._formState));\r\n }\r\n },\r\n });\r\n React.useEffect(() => {\r\n if (!control._stateFlags.mount) {\r\n control._proxyFormState.isValid && control._updateValid();\r\n control._stateFlags.mount = true;\r\n }\r\n if (control._stateFlags.watch) {\r\n control._stateFlags.watch = false;\r\n control._subjects.state.next({});\r\n }\r\n control._removeUnmounted();\r\n });\r\n _formControl.current.formState = getProxyFormState(formState, control._proxyFormState);\r\n return _formControl.current;\r\n}\n\nfunction useWatch(props) {\r\n const methods = useFormContext();\r\n const { control = methods.control, name, defaultValue, disabled, } = props || {};\r\n const _name = React.useRef(name);\r\n _name.current = name;\r\n useSubscribe({\r\n disabled,\r\n subject: control._subjects.watch,\r\n callback: (formState) => {\r\n if (shouldSubscribeByName(_name.current, formState.name)) {\r\n control._stateFlags.mount = true;\r\n const fieldValues = control._getWatch(_name.current, defaultValue);\r\n updateValue(isObject(fieldValues)\r\n ? Object.assign({}, fieldValues) : Array.isArray(fieldValues)\r\n ? [...fieldValues]\r\n : fieldValues);\r\n }\r\n },\r\n });\r\n const [value, updateValue] = React.useState(isUndefined(defaultValue)\r\n ? control._getWatch(name)\r\n : defaultValue);\r\n React.useEffect(() => {\r\n control._removeUnmounted();\r\n });\r\n return value;\r\n}\n\nexport { Controller, FormProvider, appendErrors, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.js.map\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\n\nvar FocusManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(FocusManager, _Subscribable);\n\n function FocusManager() {\n return _Subscribable.apply(this, arguments) || this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.removeEventListener) {\n this.setDefaultEventListener();\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this = this;\n\n if (this.removeEventListener) {\n this.removeEventListener();\n }\n\n this.removeEventListener = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this.setFocused(focused);\n } else {\n _this.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n _proto.setDefaultEventListener = function setDefaultEventListener() {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n this.setEventListener(function (onFocus) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n });\n }\n };\n\n return FocusManager;\n}(Subscribable);\n\nexport var focusManager = new FocusManager();","import { noop } from './utils'; // TYPES\n\n// FUNCTIONS\nvar logger = console || {\n error: noop,\n warn: noop,\n log: noop\n};\nexport function getLogger() {\n return logger;\n}\nexport function setLogger(newLogger) {\n logger = newLogger;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLogger } from './logger';\nimport { notifyManager } from './notifyManager';\nimport { Retryer } from './retryer';\nimport { noop } from './utils'; // TYPES\n\n// CLASS\nexport var Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = _extends({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(noop).catch(noop);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n getLogger().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new Retryer({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nexport function getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return _extends({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return _extends({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n}","import { scheduleMicrotask } from './utils'; // TYPES\n\n// CLASS\nvar NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n this.transactions++;\n var result = callback();\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n scheduleMicrotask(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n scheduleMicrotask(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\n\nexport var notifyManager = new NotifyManager();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\n\nvar OnlineManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n return _Subscribable.apply(this, arguments) || this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.removeEventListener) {\n this.setDefaultEventListener();\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this = this;\n\n if (this.removeEventListener) {\n this.removeEventListener();\n }\n\n this.removeEventListener = setup(function (online) {\n if (typeof online === 'boolean') {\n _this.setOnline(online);\n } else {\n _this.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n _proto.setDefaultEventListener = function setDefaultEventListener() {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n this.setEventListener(function (onOnline) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n });\n }\n };\n\n return OnlineManager;\n}(Subscribable);\n\nexport var onlineManager = new OnlineManager();","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { functionalUpdate, isValidTimeout, noop, replaceEqualDeep, timeUntilStale, ensureQueryKeyArray } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { getLogger } from './logger';\nimport { Retryer, isCancelledError } from './retryer'; // TYPES\n\n// CLASS\nexport var Query = /*#__PURE__*/function () {\n function Query(config) {\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = _extends({}, this.defaultOptions, options); // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length && !this.state.isFetching) {\n this.cache.remove(this);\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = functionalUpdate(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = replaceEqualDeep(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer); // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n // Return current promise if we are already fetching\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = ensureQueryKeyArray(this.queryKey); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined\n }; // Create fetch function\n\n var fetchFn = function fetchFn() {\n return _this2.options.queryFn ? _this2.options.queryFn(queryFnContext) : Promise.reject('Missing queryFn');\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new Retryer({\n fn: context.fetchFn,\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n getLogger().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return _extends({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false,\n status: !state.dataUpdatedAt ? 'loading' : state.status\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return _extends({}, this.revertState);\n }\n\n return _extends({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return _extends({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { hashQueryKeyByOptions, matchQuery, parseFilterArgs } from './utils';\nimport { Query } from './query';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var QueryCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return matchQuery(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return filters ? this.queries.filter(function (query) {\n return matchQuery(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(Subscribable);","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { notifyManager } from './notifyManager';\nimport { Mutation } from './mutation';\nimport { matchMutation, noop } from './utils';\nimport { Subscribable } from './subscribable'; // TYPES\n\n// CLASS\nexport var MutationCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(noop);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(Subscribable);","import { isCancelable } from './retryer';\nexport function infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if (isCancelable(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n\n if (isCancelable(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nexport function getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nexport function getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { hashQueryKey, noop, parseFilterArgs, parseQueryArgs, partialMatchKey, hashQueryKeyByOptions } from './utils';\nimport { QueryCache } from './queryCache';\nimport { MutationCache } from './mutationCache';\nimport { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { notifyManager } from './notifyManager';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior'; // TYPES\n\n// CLASS\nexport var QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll(_extends({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = parseQueryArgs(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = _extends({}, filters, {\n active: true\n });\n\n return notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = _extends({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, _extends({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(noop);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return hashQueryKey(queryKey) === hashQueryKey(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return partialMatchKey(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return partialMatchKey(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = _extends({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return _extends({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();","import { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { sleep } from './utils'; // TYPES\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nexport function isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nexport var CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nexport function isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nexport var Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions)); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!focusManager.isFocused() || !onlineManager.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};","export var Subscribable = /*#__PURE__*/function () {\n function Subscribable() {\n this.listeners = [];\n }\n\n var _proto = Subscribable.prototype;\n\n _proto.subscribe = function subscribe(listener) {\n var _this = this;\n\n var callback = listener || function () {\n return undefined;\n };\n\n this.listeners.push(callback);\n this.onSubscribe();\n return function () {\n _this.listeners = _this.listeners.filter(function (x) {\n return x !== callback;\n });\n\n _this.onUnsubscribe();\n };\n };\n\n _proto.hasListeners = function hasListeners() {\n return this.listeners.length > 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// TYPES\n// UTILS\nexport var isServer = typeof window === 'undefined';\nexport function noop() {\n return undefined;\n}\nexport function functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nexport function isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nexport function ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nexport function difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nexport function replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nexport function timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nexport function parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n queryKey: arg1\n });\n}\nexport function parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return _extends({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return _extends({}, arg1);\n}\nexport function parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [_extends({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nexport function parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nexport function mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nexport function matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nexport function matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nexport function hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nexport function hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nexport function stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nexport function partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nexport function partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nexport function replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nexport function shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nexport function isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nexport function isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nexport function isError(value) {\n return value instanceof Error;\n}\nexport function sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nexport function scheduleMicrotask(callback) {\n Promise.resolve().then(callback).catch(function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}","import ReactDOM from 'react-dom';\nexport var unstable_batchedUpdates = ReactDOM.unstable_batchedUpdates;","import { notifyManager } from '../core';\nimport { unstable_batchedUpdates } from './reactBatchedUpdates';\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates);","export var logger = console;","import { setLogger } from '../core';\nimport { logger } from './logger';\n\nif (logger) {\n setLogger(logger);\n}","import React from 'react';\nvar defaultContext = /*#__PURE__*/React.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/React.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nexport var useQueryClient = function useQueryClient() {\n var queryClient = React.useContext(getQueryClientContext(React.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nexport var QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n React.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/React.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/React.createElement(Context.Provider, {\n value: client\n }, children));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { getDefaultState } from './mutation';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var MutationObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationObserver, _Subscribable);\n\n function MutationObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n\n _this.setOptions(options);\n\n _this.bindMethods();\n\n _this.updateResult();\n\n return _this;\n }\n\n var _proto = MutationObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n };\n\n _proto.setOptions = function setOptions(options) {\n this.options = this.client.defaultMutationOptions(options);\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n var _this$currentMutation;\n\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.removeObserver(this);\n }\n };\n\n _proto.onMutationUpdate = function onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n var notifyOptions = {\n listeners: true\n };\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n\n this.notify(notifyOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.reset = function reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n };\n\n _proto.mutate = function mutate(variables, options) {\n this.mutateOptions = options;\n\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n\n this.currentMutation = this.client.getMutationCache().build(this.client, _extends({}, this.options, {\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n }));\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n };\n\n _proto.updateResult = function updateResult() {\n var state = this.currentMutation ? this.currentMutation.state : getDefaultState();\n\n var result = _extends({}, state, {\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n });\n\n this.currentResult = result;\n };\n\n _proto.notify = function notify(options) {\n var _this2 = this;\n\n notifyManager.batch(function () {\n // First trigger the mutate callbacks\n if (_this2.mutateOptions) {\n if (options.onSuccess) {\n _this2.mutateOptions.onSuccess == null ? void 0 : _this2.mutateOptions.onSuccess(_this2.currentResult.data, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(_this2.currentResult.data, null, _this2.currentResult.variables, _this2.currentResult.context);\n } else if (options.onError) {\n _this2.mutateOptions.onError == null ? void 0 : _this2.mutateOptions.onError(_this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(undefined, _this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n }\n } // Then trigger the listeners\n\n\n if (options.listeners) {\n _this2.listeners.forEach(function (listener) {\n listener(_this2.currentResult);\n });\n }\n });\n };\n\n return MutationObserver;\n}(Subscribable);","export function shouldThrowError(suspense, _useErrorBoundary, error) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(error);\n } // Allow useErrorBoundary to override suspense's throwing behaviour\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { noop, parseMutationArgs } from '../core/utils';\nimport { MutationObserver } from '../core/mutationObserver';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils'; // HOOK\n\nexport function useMutation(arg1, arg2, arg3) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var options = parseMutationArgs(arg1, arg2, arg3);\n var queryClient = useQueryClient();\n var obsRef = React.useRef();\n\n if (!obsRef.current) {\n obsRef.current = new MutationObserver(queryClient, options);\n } else {\n obsRef.current.setOptions(options);\n }\n\n var currentResult = obsRef.current.getCurrentResult();\n React.useEffect(function () {\n mountedRef.current = true;\n var unsubscribe = obsRef.current.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n }));\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, []);\n var mutate = React.useCallback(function (variables, mutateOptions) {\n obsRef.current.mutate(variables, mutateOptions).catch(noop);\n }, []);\n\n if (currentResult.error && shouldThrowError(undefined, obsRef.current.options.useErrorBoundary, currentResult.error)) {\n throw currentResult.error;\n }\n\n return _extends({}, currentResult, {\n mutate: mutate,\n mutateAsync: currentResult.mutate\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { isServer, isValidTimeout, noop, replaceEqualDeep, shallowEqualObjects, timeUntilStale } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { focusManager } from './focusManager';\nimport { Subscribable } from './subscribable';\nimport { getLogger } from './logger';\nimport { isCancelledError } from './retryer';\nexport var QueryObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.previousSelectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return _shouldFetchOnReconnect(this.currentQuery, this.options);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return _shouldFetchOnWindowFocus(this.currentQuery, this.options);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result) {\n var _this2 = this;\n\n var trackedResult = {};\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n var typedKey = key;\n\n if (!_this2.trackedProps.includes(typedKey)) {\n _this2.trackedProps.push(typedKey);\n }\n\n return result[typedKey];\n }\n });\n });\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch(_extends({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n var time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === (prevResultOptions == null ? void 0 : prevResultOptions.select) && !this.previousSelectError) {\n data = prevResult.data;\n } else {\n try {\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.previousSelectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n error = selectError;\n this.previousSelectError = selectError;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.previousSelectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n error = selectError;\n this.previousSelectError = selectError;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n if (result === prevResult) {\n return false;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if (shallowEqualObjects(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify(_extends({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(Subscribable);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldRefetchOnMount(query, options) {\n return options.enabled !== false && query.state.dataUpdatedAt > 0 && (options.refetchOnMount === 'always' || options.refetchOnMount !== false && isStale(query, options));\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || shouldRefetchOnMount(query, options);\n}\n\nfunction _shouldFetchOnReconnect(query, options) {\n return options.enabled !== false && (options.refetchOnReconnect === 'always' || options.refetchOnReconnect !== false && isStale(query, options));\n}\n\nfunction _shouldFetchOnWindowFocus(query, options) {\n return options.enabled !== false && (options.refetchOnWindowFocus === 'always' || options.refetchOnWindowFocus !== false && isStale(query, options));\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error' || prevOptions.enabled === false) && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}","import React from 'react'; // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nexport var useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return React.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nexport var QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};","import { QueryObserver } from '../core';\nimport { parseQueryArgs } from '../core/utils';\nimport { useBaseQuery } from './useBaseQuery'; // HOOK\n\nexport function useQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}","import React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils';\nexport function useBaseQuery(options, Observer) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = React.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n React.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n React.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, result.error)) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result);\n }\n\n return result;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import React from 'react';\nexport default React.createContext(null);","/** @license React v17.0.2\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","/** @license React v17.0.2\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}\nvar A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,\"setState\")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};\nfunction D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};\nfunction J(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)H.call(b,e)&&!I.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:n,type:a,key:k,ref:h,props:d,_owner:G.current}}\nfunction K(a,b){return{$$typeof:n,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function L(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===n}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var M=/\\/+/g;function N(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction O(a,b,c,e,d){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case n:case p:h=!0}}if(h)return h=a,d=d(h),a=\"\"===e?\".\"+N(h,0):e,Array.isArray(d)?(c=\"\",null!=a&&(c=a.replace(M,\"$&/\")+\"/\"),O(d,b,c,\"\",function(a){return a})):null!=d&&(L(d)&&(d=K(d,c+(!d.key||h&&h.key===d.key?\"\":(\"\"+d.key).replace(M,\"$&/\")+\"/\")+a)),b.push(d)),1;h=0;e=\"\"===e?\".\":e+\":\";if(Array.isArray(a))for(var g=\n0;g<a.length;g++){k=a[g];var f=e+N(k,g);h+=O(k,b,c,f,d)}else if(f=y(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+N(k,g++),h+=O(k,b,c,f,d);else if(\"object\"===k)throw b=\"\"+a,Error(z(31,\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b));return h}function P(a,b,c){if(null==a)return a;var e=[],d=0;O(a,e,\"\",\"\",function(a){return b.call(c,a,d++)});return e}\nfunction Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null};function S(){var a=R.current;if(null===a)throw Error(z(321));return a}var T={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};\nexports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=G.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!I.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var m=0;m<f;m++)g[m]=arguments[m+2];e.children=g}return{$$typeof:n,type:a.type,\nkey:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=J;exports.createFactory=function(a){var b=J.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=L;\nexports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return S().useCallback(a,b)};exports.useContext=function(a,b){return S().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return S().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return S().useImperativeHandle(a,b,c)};\nexports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return S().useMemo(a,b)};exports.useReducer=function(a,b,c){return S().useReducer(a,b,c)};exports.useRef=function(a){return S().useRef(a)};exports.useState=function(a){return S().useState(a)};exports.version=\"17.0.2\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/** @license React v0.20.2\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f,g,h,k;if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}\nif(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var t=null,u=null,w=function(){if(null!==t)try{var a=exports.unstable_now();t(!0,a);t=null}catch(b){throw setTimeout(w,0),b;}};f=function(a){null!==t?setTimeout(f,0,a):(t=a,setTimeout(w,0))};g=function(a,b){u=setTimeout(a,b)};h=function(){clearTimeout(u)};exports.unstable_shouldYield=function(){return!1};k=exports.unstable_forceFrameRate=function(){}}else{var x=window.setTimeout,y=window.clearTimeout;if(\"undefined\"!==typeof console){var z=\nwindow.cancelAnimationFrame;\"function\"!==typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\");\"function\"!==typeof z&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")}var A=!1,B=null,C=-1,D=5,E=0;exports.unstable_shouldYield=function(){return exports.unstable_now()>=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):D=0<a?Math.floor(1E3/a):5};var F=new MessageChannel,G=F.port2;F.port1.onmessage=function(){if(null!==B){var a=exports.unstable_now();E=a+D;try{B(!0,a)?G.postMessage(null):(A=!1,B=null)}catch(b){throw G.postMessage(null),b;}}else A=!1};f=function(a){B=a;A||(A=!0,G.postMessage(null))};g=function(a,b){C=\nx(function(){a(exports.unstable_now())},b)};h=function(){y(C);C=-1}}function H(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<I(e,b))a[d]=b,a[c]=e,c=d;else break a}}function J(a){a=a[0];return void 0===a?null:a}\nfunction K(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:N++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if(\"production\"!==process.env.NODE_ENV){var i=Y[n],o=i?\"function\"==typeof i?i.apply(null,r):i:\"unknown error nr: \"+n;throw Error(\"[Immer] \"+o)}throw Error(\"[Immer] minified error nr: \"+n+(r.length?\" \"+r.map((function(n){return\"'\"+n+\"'\"})).join(\",\"):\"\")+\". Find the full error at: https://bit.ly/3cXEKWf\")}function t(n){return!!n&&!!n[Q]}function r(n){return!!n&&(function(n){if(!n||\"object\"!=typeof n)return!1;var t=Object.getPrototypeOf(n);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,\"constructor\")&&t.constructor;return r===Object||\"function\"==typeof r&&Function.toString.call(r)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v(n))}function e(r){return t(r)||n(23,r),r[Q].t}function i(n,t,r){void 0===r&&(r=!1),0===o(n)?(r?Object.keys:nn)(n).forEach((function(e){r&&\"symbol\"==typeof e||t(e,n[e],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[Q];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t,r){var e=o(n);2===e?n.set(t,r):3===e?(n.delete(t),n.add(r)):n[t]=r}function c(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var t=tn(n);delete t[Q];for(var r=nn(t),e=0;e<r.length;e++){var i=r[e],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),t)}function d(n,e){return void 0===e&&(e=!1),y(n)||t(n)||!r(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||\"object\"!=typeof n||Object.isFrozen(n)}function b(t){var r=rn[t];return r||n(18,t),r}function m(n,t){rn[n]||(rn[n]=t)}function _(){return\"production\"===process.env.NODE_ENV||U||n(0),U}function j(n,t){t&&(b(\"Patches\"),n.u=[],n.s=[],n.v=t)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var t=n[Q];0===t.i||1===t.i?t.j():t.O=!0}function P(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||b(\"ES5\").S(e,t,o),o?(i[Q].P&&(O(e),n(4)),r(t)&&(t=M(e,t),e.l||x(e,t)),e.u&&b(\"Patches\").M(i[Q],t,e.u,e.s)):t=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),t!==H?t:void 0}function M(n,t,r){if(y(t))return t;var e=t[Q];if(!e)return i(t,(function(i,o){return A(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(t,i){return A(n,e,o,t,i,r)})),x(n,o,!1),r&&n.u&&b(\"Patches\").R(e,r,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if(\"production\"!==process.env.NODE_ENV&&c===o&&n(5),t(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!t(v))return;e.m=!1}if(r(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,t,r){void 0===r&&(r=!1),n.h.F&&n.m&&d(t,r)}function z(n,t){var r=n[Q];return(r?p(r):n)[t]}function I(n,t){if(t in n)for(var r=Object.getPrototypeOf(n);r;){var e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Object.getPrototypeOf(r)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,t,r){var e=s(t)?b(\"MapSet\").N(t,r):v(t)?b(\"MapSet\").T(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;r&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):b(\"ES5\").J(t,r);return(r?r.A:_()).p.push(e),e}function D(e){return t(e)||n(22,e),function n(t){if(!r(t))return t;var e,u=t[Q],c=o(t);if(u){if(!u.P&&(u.i<4||!b(\"ES5\").K(u)))return u.t;u.I=!0,e=F(t,c),u.I=!1}else e=F(t,c);return i(e,(function(t,r){u&&a(u.t,t)===r||f(e,t,n(r))})),3===c?new Set(e):e}(e)}function F(n,t){switch(t){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function r(n,t){var r=s[n];return r?r.enumerable=t:s[n]=r={configurable:!0,enumerable:t,get:function(){var t=this[Q];return\"production\"!==process.env.NODE_ENV&&f(t),en.get(t,n)},set:function(t){var r=this[Q];\"production\"!==process.env.NODE_ENV&&f(r),en.set(r,n,t)}},r}function e(n){for(var t=n.length-1;t>=0;t--){var r=n[t][Q];if(!r.P)switch(r.i){case 5:a(r)&&k(r);break;case 4:o(r)&&k(r)}}}function o(n){for(var t=n.t,r=n.k,e=nn(r),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=t[o];if(void 0===a&&!u(t,o))return!0;var f=r[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!t[Q];return e.length!==nn(t).length+(v?0:1)}function a(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function f(t){t.O&&n(3,JSON.stringify(p(t)))}var s={};m(\"ES5\",{J:function(n,t){var e=Array.isArray(n),i=function(n,t){if(n){for(var e=Array(t.length),i=0;i<t.length;i++)Object.defineProperty(e,\"\"+i,r(i,!0));return e}var o=tn(t);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=r(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(t),o)}(e,n),o={i:e?5:4,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,r,o){o?t(r)&&r[Q].A===n&&e(n.p):(n.u&&function n(t){if(t&&\"object\"==typeof t){var r=t[Q];if(r){var e=r.t,o=r.k,f=r.D,c=r.i;if(4===c)i(o,(function(t){t!==Q&&(void 0!==e[t]||u(e,t)?f[t]||n(o[t]):(f[t]=!0,k(r)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(r))}));else if(5===c){if(a(r)&&(k(r),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!r(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var t=Object.create(Object.getPrototypeOf(n));for(var i in n)t[i]=e(n[i]);return u(n,L)&&(t[L]=n[L]),t}function f(n){return t(n)?e(n):n}var c=\"add\";m(\"Patches\",{$:function(t,r){return r.forEach((function(r){for(var i=r.path,u=r.op,f=t,s=0;s<i.length-1;s++){var v=o(f),p=\"\"+i[s];0!==v&&1!==v||\"__proto__\"!==p&&\"constructor\"!==p||n(24),\"function\"==typeof f&&\"prototype\"===p&&n(24),\"object\"!=typeof(f=a(f,p))&&n(15,i.join(\"/\"))}var l=o(f),d=e(r.value),h=i[i.length-1];switch(u){case\"replace\":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case\"remove\":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(r.value);default:return delete f[h]}default:n(17,u)}})),t},R:function(n,t,r,e){switch(n.i){case 0:case 4:case 2:return function(n,t,r,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?\"replace\":c:\"remove\";if(v!==p||\"replace\"!==l){var d=t.concat(n);r.push(\"remove\"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:\"remove\",path:d}:\"remove\"===l?{op:c,path:d,value:f(v)}:{op:\"replace\",path:d,value:f(v)})}}))}(n,t,r,e);case 5:case 1:return function(n,t,r,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,r];r=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=t.concat([v]);r.push({op:\"replace\",path:p,value:f(u[v])}),e.push({op:\"replace\",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=t.concat([l]);r.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:\"replace\",path:t.concat([\"length\"]),value:i.length})}(n,t,r,e);case 3:return function(n,t,r,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=t.concat([u]);r.push({op:\"remove\",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=t.concat([u]);r.push({op:c,path:o,value:n}),e.unshift({op:\"remove\",path:o,value:n})}u++}))}(n,t,r,e)}},M:function(n,t,r,e){r.push({op:\"replace\",path:[],value:t===H?void 0:t}),e.push({op:\"replace\",path:[],value:n.t})}})}function C(){function t(n,t){function r(){this.constructor=n}a(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=R(n.A.h,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function u(t){t.O&&n(3,JSON.stringify(p(t)))}var a=function(n,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function n(n,t){return this[Q]={i:2,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var o=n.prototype;return Object.defineProperty(o,\"size\",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,t){var r=this[Q];return u(r),p(r).has(n)&&p(r).get(n)===t||(e(r),k(r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var t=this[Q];return u(t),e(t),k(t),t.D.set(n,!1),t.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(t){n.D.set(t,!1)})),n.o.clear())},o.forEach=function(n,t){var r=this;p(this[Q]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},o.get=function(n){var t=this[Q];u(t);var i=p(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var o=R(t.A.h,i,t);return e(t),t.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,t=this,r=this.keys();return(n={})[V]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},o.entries=function(){var n,t=this,r=this.keys();return(n={})[V]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,t){return this[Q]={i:3,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,\"size\",{get:function(){return p(this[Q]).size}}),r.has=function(n){var t=this[Q];return u(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[Q];return u(t),this.has(n)||(o(t),k(t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[Q];return u(t),o(t),k(t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},r.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},r.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},r.keys=function(){return this.values()},r[V]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();m(\"MapSet\",{N:function(n,t){return new f(n,t)},T:function(n,t){return new c(n,t)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W=\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol(\"x\"),X=\"undefined\"!=typeof Map,q=\"undefined\"!=typeof Set,B=\"undefined\"!=typeof Proxy&&void 0!==Proxy.revocable&&\"undefined\"!=typeof Reflect,H=W?Symbol.for(\"immer-nothing\"):((G={})[\"immer-nothing\"]=!0,G),L=W?Symbol.for(\"immer-draftable\"):\"__$immer_draftable\",Q=W?Symbol.for(\"immer-state\"):\"__$immer_state\",V=\"undefined\"!=typeof Symbol&&Symbol.iterator||\"@@iterator\",Y={0:\"Illegal state\",1:\"Immer drafts cannot have computed properties\",2:\"This object has been frozen and should not be mutated\",3:function(n){return\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \"+n},4:\"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",5:\"Immer forbids circular references\",6:\"The first or second argument to `produce` must be a function\",7:\"The third argument to `produce` must be a function or undefined\",8:\"First argument to `createDraft` must be a plain object, an array, or an immerable object\",9:\"First argument to `finishDraft` must be a draft returned by `createDraft`\",10:\"The given draft is already finalized\",11:\"Object.defineProperty() cannot be used on an Immer draft\",12:\"Object.setPrototypeOf() cannot be used on an Immer draft\",13:\"Immer only supports deleting array indices\",14:\"Immer only supports setting array indices and the 'length' property\",15:function(n){return\"Cannot apply patch, path doesn't resolve: \"+n},16:'Sets cannot have \"replace\" patches.',17:function(n){return\"Unsupported patch operation: \"+n},18:function(n){return\"The plugin for '\"+n+\"' has not been loaded into Immer. To enable the plugin, import and call `enable\"+n+\"()` when initializing your application.\"},20:\"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available\",21:function(n){return\"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '\"+n+\"'\"},22:function(n){return\"'current' expects a draft, got: \"+n},23:function(n){return\"'original' expects a draft, got: \"+n},24:\"Patching reserved attributes like __proto__, prototype and constructor is not allowed\"},Z=\"\"+Object.prototype.constructor,nn=\"undefined\"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(n){var t={};return nn(n).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(n,r)})),t},rn={},en={get:function(n,t){if(t===Q)return n;var e=p(n);if(!u(e,t))return function(n,t,r){var e,i=I(t,r);return i?\"value\"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,t);var i=e[t];return n.I||!r(i)?i:i===z(n.t,t)?(E(n),n.o[t]=R(n.A.h,i,n)):i},has:function(n,t){return t in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,t,r){var e=I(p(n),t);if(null==e?void 0:e.set)return e.set.call(n.k,r),!0;if(!n.P){var i=z(p(n),t),o=null==i?void 0:i[Q];if(o&&o.t===r)return n.o[t]=r,n.D[t]=!1,!0;if(c(r,i)&&(void 0!==r||u(n.t,t)))return!0;E(n),k(n)}return n.o[t]===r&&\"number\"!=typeof r&&(void 0!==r||t in n.o)||(n.o[t]=r,n.D[t]=!0,!0)},deleteProperty:function(n,t){return void 0!==z(n.t,t)||t in n.t?(n.D[t]=!1,E(n),k(n)):delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=p(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e?{writable:!0,configurable:1!==n.i||\"length\"!==t,enumerable:e.enumerable,value:r[t]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,t){on[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),on.deleteProperty=function(t,r){return\"production\"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n(13),en.deleteProperty.call(this,t[0],r)},on.set=function(t,r,e){return\"production\"!==process.env.NODE_ENV&&\"length\"!==r&&isNaN(parseInt(r))&&n(14),en.set.call(this,t[0],r,e,t[0])};var un=function(){function e(t){var e=this;this.g=B,this.F=!0,this.produce=function(t,i,o){if(\"function\"==typeof t&&\"function\"!=typeof i){var u=i;i=t;var a=e;return function(n){var t=this;void 0===n&&(n=u);for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var r;return(r=i).call.apply(r,[t,n].concat(e))}))}}var f;if(\"function\"!=typeof i&&n(6),void 0!==o&&\"function\"!=typeof o&&n(7),r(t)){var c=w(e),s=R(e,t,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return\"undefined\"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!t||\"object\"!=typeof t){if((f=i(t))===H)return;return void 0===f&&(f=t),e.F&&d(f,!0),f}n(21,t)},this.produceWithPatches=function(n,t){return\"function\"==typeof n?function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(i))}))}:[e.produce(n,t,(function(n,t){r=n,i=t})),r,i];var r,i},\"boolean\"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),\"boolean\"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){r(e)||n(8),t(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(t,r){var e=t&&t[Q];\"production\"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,r),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(t){t&&!B&&n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&\"replace\"===i.op){n=i.value;break}}var o=b(\"Patches\").$;return t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);export default fn;export{un as Immer,pn as applyPatches,K as castDraft,$ as castImmutable,ln as createDraft,D as current,J as enableAllPlugins,N as enableES5,C as enableMapSet,T as enablePatches,dn as finishDraft,d as freeze,L as immerable,t as isDraft,r as isDraftable,H as nothing,e as original,fn as produce,cn as produceWithPatches,sn as setAutoFreeze,vn as setUseProxies};\n//# sourceMappingURL=immer.esm.js.map\n","import n,{freeze as r}from\"immer\";import{useState as t,useCallback as o,useMemo as f,useReducer as u}from\"react\";function i(f){var u=t(function(){return r(\"function\"==typeof f?f():f,!0)}),i=u[1];return[u[0],o(function(t){i(\"function\"==typeof t?n(t):r(t))},[])]}function e(r,t,o){var i=f(function(){return n(r)},[r]);return u(i,t,o)}export{i as useImmer,e as useImmerReducer};\n//# sourceMappingURL=use-immer.module.js.map\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\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","/** 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/**\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 */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\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 */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\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 */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\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 */\nfunction 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\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\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 */\nfunction 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\nexport default debounce;\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","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","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\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 */\nfunction 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\nexport default isKey;\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","/** 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 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 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';\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 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","/**\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 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","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 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 MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 */\nfunction 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`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\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 */\nfunction 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\nexport default memoizeCapped;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\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 */\nvar 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\nexport default stringToPath;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\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 */\nfunction 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\nexport default baseToString;\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 */\nfunction 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\nexport default arrayMap;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\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 */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","import baseToString from './_baseToString.js';\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 */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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 */\nfunction 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\nexport default toKey;\n","import baseGet from './_baseGet.js';\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 */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\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 */\nfunction 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\nexport default baseGet;\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 isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\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 */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\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"],"names":["module","exports","obj","__esModule","defaultFormats","normalDateWithWeekday","normalDate","shortDate","monthAndDate","dayOfMonth","year","month","monthShort","monthAndYear","weekday","weekdayShort","minutes","hours12h","hours24h","seconds","fullTime","fullTime12h","fullTime24h","fullDate","fullDateWithWeekday","fullDateTime","fullDateTime12h","fullDateTime24h","keyboardDate","keyboardDateTime","keyboardDateTime12h","keyboardDateTime24h","_a","_this","this","_b","locale","formats","instance","lib","is12HourCycleInCurrentLocale","test","rawDayJsInstance","Ls","LT","getCurrentLocaleCode","getFormatHelperText","format","match","map","token","join","replace","toLocaleLowerCase","parseISO","isoString","dayjs","toISO","value","toISOString","parse","date","toJsDate","toDate","isValid","isNull","getDiff","comparing","units","diff","isAfter","isBefore","isAfterDay","isBeforeDay","isBeforeYear","isAfterYear","startOfDay","clone","startOf","endOfDay","endOf","formatKey","formatByString","formatString","formatNumber","numberToFormat","getHours","hour","addSeconds","count","subtract","Math","abs","add","addMinutes","addHours","addDays","addWeeks","addMonths","setMonth","set","setHours","getMinutes","minute","setMinutes","getSeconds","second","setSeconds","getMonth","getDaysInMonth","daysInMonth","isSameDay","isSame","isSameMonth","isSameYear","isSameHour","getMeridiemText","ampm","startOfMonth","endOfMonth","startOfWeek","endOfWeek","getNextMonth","getPreviousMonth","getMonthArray","monthArray","length","prevMonth","push","getYear","setYear","mergeDateAndTime","time","getWeekdays","start","isEqual","getWeekArray","end","current","nestedWeeks","weekNumber","floor","getYearRange","startDate","endDate","years","isWithinRange","isBetween","args","_i","arguments","apply","withLocale","Object","assign","String","fromCharCode","trim","pattern","replacement","indexof","search","indexOf","index","charCodeAt","begin","slice","array","line","column","position","character","characters","node","root","parent","type","props","children","return","copy","prev","next","peek","caret","alloc","dealloc","delimit","delimiter","whitespace","escaping","commenter","identifier","MS","MOZ","WEBKIT","COMMENT","DECLARATION","serialize","callback","output","i","stringify","element","prefix","hash","compile","rule","rules","rulesets","pseudo","points","declarations","offset","atrule","property","previous","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","size","j","k","x","y","z","fixedElements","WeakMap","compat","isImplicitRule","get","parsed","toRules","getRules","parentRules","removeLabel","defaultStylisPlugins","exec","options","key","ssrStyles","document","querySelectorAll","Array","prototype","forEach","call","getAttribute","head","appendChild","setAttribute","container","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","split","currentSheet","collection","finalizingPlugins","insert","serializer","concat","selector","serialized","sheet","shouldCache","styles","cache","name","nonce","speedy","prepend","registered","hydrate","fn","create","arg","undefined","EmotionCacheContext","hasOwnProperty","createContext","HTMLElement","Provider","withEmotionCache","func","forwardRef","ref","useContext","ThemeContext","Global","w","T","sheetRef","useRef","useLayoutEffect","isSpeedy","rehydrating","querySelector","tags","before","flush","sheetRefCurrent","nextElementSibling","css","_len","_key","keyframes","insertable","anim","toString","str","h","len","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","toLowerCase","processStyleValue","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","__emotion_styles","string","isArray","interpolated","createStringFromObject","previousCursor","result","cached","labelPattern","serializeStyles","stringMode","strings","raw","lastIndex","identifierName","StyleSheet","_insertTag","tag","firstChild","nextSibling","insertBefore","ctr","_proto","nodes","createElement","createTextNode","createStyleElement","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","e","parentNode","removeChild","getRegisteredStyles","registeredStyles","classNames","rawClassName","className","insertStyles","isStringTag","Portal","disablePortal","mountNode","setMountNode","handleRef","getContainer","body","candidatesSelector","defaultGetTabbable","regularTabNodes","orderedTabNodes","from","nodeTabIndex","tabindexAttr","parseInt","Number","isNaN","contentEditable","nodeName","tabIndex","getTabIndex","disabled","tagName","getRadio","ownerDocument","roving","isNonTabbableRadio","isNodeMatchingSelectorFocusable","documentOrder","sort","a","b","defaultIsEnabled","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","open","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","lastKeydown","doc","contains","activeElement","hasAttribute","focus","contain","nativeEvent","rootElement","hasFocus","target","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","Boolean","shiftKey","focusNext","focusPrevious","loopFocus","addEventListener","interval","setInterval","clearInterval","removeEventListener","handleFocusSentinel","event","relatedTarget","onFocus","childrenPropsHandler","composeClasses","slots","getUtilityClass","classes","keys","slot","reduce","acc","globalStateClassesMapping","active","checked","completed","error","expanded","focused","focusVisible","required","selected","generateUtilityClass","componentName","generateUtilityClasses","_interopRequireDefault","_createSvgIcon","_jsxRuntime","_default","default","jsx","d","defineProperty","enumerable","_utils","createSvgIcon","useLocalizationContext","localization","Error","useUtils","utils","useDefaultDates","defaultDates","useNow","_excluded","isYearOnlyView","views","isYearAndMonthViews","getFormatAndMaskByViews","mask","inputFormat","disableMaskedInput","useDatePickerDefaultizedProps","_ref","openTo","minDate","minDateProp","maxDate","maxDateProp","other","useThemeProps","_ClockIcon","_CalendarIcon","_PenIcon","PickersToolbarRoot","styled","skipSx","theme","ownerState","display","flexDirection","alignItems","justifyContent","padding","spacing","isLandscape","height","maxWidth","flexWrap","PickersToolbarGrid","Grid","getViewTypeIcon","viewType","Clock","color","Calendar","defaultGetKeyboardInputSwitchingButtonText","isKeyboardInputOpen","getMobileKeyboardInputViewButtonText","isMobileKeyboardViewOpen","landscapeDirection","penIconClassName","toggleMobileKeyboardView","toolbarTitle","Typography","variant","dateTitleContainer","direction","IconButton","onClick","Pen","DatePickerToolbarRoot","penIcon","top","DatePickerToolbarTitle","margin","toolbarFormat","toolbarPlaceholder","dateText","align","WrapperVariantContext","getBoundingClientRect","includeScale","rect","width","right","bottom","left","getWindow","window","defaultView","getWindowScroll","win","scrollLeft","pageXOffset","scrollTop","pageYOffset","isElement","Element","isHTMLElement","isShadowRoot","ShadowRoot","getNodeName","getDocumentElement","documentElement","getWindowScrollBarX","getComputedStyle","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getCompositeRect","elementOrVirtualElement","offsetParent","isFixed","isOffsetParentAnElement","offsetParentIsScaled","scaleX","offsetWidth","scaleY","offsetHeight","isElementScaled","scroll","offsets","clientLeft","clientTop","getLayoutRect","clientRect","offsetLeft","offsetTop","getParentNode","assignedSlot","host","getScrollParent","listScrollParents","list","_element$ownerDocumen","scrollParent","isBody","visualViewport","updatedList","isTableElement","getTrueOffsetParent","getOffsetParent","isFirefox","navigator","userAgent","currentNode","transform","perspective","willChange","filter","getContainingBlock","auto","basePlacements","viewport","popper","variationPlacements","placement","modifierPhases","modifiers","Map","visited","Set","modifier","requires","requiresIfExists","dep","has","depModifier","DEFAULT_OPTIONS","strategy","areValidElements","some","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","state","orderedModifiers","modifiersData","elements","attributes","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","scrollParents","contextElement","merged","phase","orderModifiers","existing","data","m","enabled","_ref3","_ref3$options","effect","cleanupFn","update","forceUpdate","_state$elements","rects","reset","_state$orderedModifie","_state$orderedModifie2","_options","Promise","resolve","then","destroy","onFirstUpdate","passive","_options$scroll","_options$resize","resize","getBasePlacement","getVariation","getMainAxisFromPlacement","computeOffsets","basePlacement","variation","commonX","commonY","mainAxis","max","min","round","unsetSides","mapToStyles","_ref2","_Object$assign2","popperRect","gpuAcceleration","adaptive","roundOffsets","dpr","devicePixelRatio","roundOffsetsByDPR","_ref3$x","_ref3$y","hasX","hasY","sideX","sideY","heightProp","widthProp","_Object$assign","commonStyles","getOppositePlacement","matched","getOppositeVariationPlacement","child","rootNode","getRootNode","isSameNode","rectToClientRect","getClientRectFromMixedType","clippingParent","html","clientWidth","clientHeight","getViewportRect","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","getDocumentRect","mergePaddingObject","paddingObject","expandToHashMap","hashMap","detectOverflow","_options$placement","_options$boundary","boundary","_options$rootBoundary","rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","mainClippingParents","clippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","getClippingRect","referenceClientRect","popperOffsets","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","axis","within","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","eventListeners","_ref4","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","arrow","style","removeAttribute","initialStyles","attribute","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","overflows","computeAutoPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","every","check","_loop","fittingPlacement","find","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","mainSide","altSide","additive","minLen","maxLen","arrowElement","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_mainSide","_altSide","_offset","_min","_max","_preventedOffset","_state$modifiersData$","toPaddingObject","minProp","maxProp","endDiff","startDiff","clientSize","centerToReference","center","axisProp","centerOffset","_options$element","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_excluded2","resolveAnchorEl","anchorEl","defaultPopperOptions","PopperTooltip","initialPlacement","popperOptions","popperRef","popperRefProp","TransitionProps","tooltipRef","ownRef","useForkRef","handlePopperRef","handlePopperRefRef","useEnhancedEffect","rtlPlacement","flipPlacement","setPlacement","popperModifiers","childProps","role","containerProp","keepMounted","transition","exited","setExited","in","onEnter","onExited","PickersPopperRoot","modal","PickersPopperPaper","Paper","transformOrigin","outline","containerRef","onClose","PopperProps","TransitionComponent","Grow","TrapFocusProps","PaperProps","handleKeyDown","lastFocusedElementRef","clickAwayRef","onPaperClick","onPaperTouchStart","onClickAway","movedRef","syntheticEventRef","nodeRef","activatedRef","armClickAwayListener","handleClickAway","useEventCallback","insideReactTree","clientX","clientY","clickedRootScrollbar","insideDOM","composedPath","handleSynthetic","handleTouchMove","useClickAwayListener","paperRef","handlePaperRef","onPaperClickProp","onTouchStart","onPaperTouchStartProp","otherPaperProps","elevation","DateInputProps","KeyboardDateInputComponent","onDismiss","ownInputRef","inputRef","arrayIncludes","itemOrItems","item","onSpaceOrEnter","innerFn","preventDefault","stopPropagation","pipe","fns","reduceRight","prevFn","nextFn","createDelegatedEventHandler","onEvent","useViews","onChange","onViewChange","view","_views","_views2","openView","setOpenView","useControlled","controlled","previousView","nextView","changeView","newView","openNext","handleChangeAndOpenNext","currentViewSelectionState","isSelectionFinishedOnCurrentView","globalSelectionState","clockCenter","CLOCK_WIDTH","cx","cy","getAngleValue","step","offsetX","offsetY","deg","atan2","PI","delta","sqrt","ClockPointerRoot","backgroundColor","palette","primary","main","toAnimateTransform","transitions","ClockPointerThumb","contrastText","borderRadius","border","boxSizing","hasSelected","ClockPointer","constructor","super","previousType","render","_this$props","isInner","angle","getAngleStyle","getDerivedStateFromProps","nextProps","_ClockPin","_Typography","_Typography2","ClockRoot","ClockClock","pointerEvents","ClockSquareMask","touchAction","userSelect","ClockPin","ClockAmButton","ampmInClock","meridiemMode","light","ClockPmButton","autoFocus","getClockLabelText","handleMeridiemChange","isTimeDisabled","minutesStep","selectedId","wrapperVariant","isMoving","isSelectedTimeDisabled","isPointerInner","handleValueChange","newValue","isFinish","setTime","changedTouches","newSelectedValue","angleStep","keyboardControlStep","listboxRef","onTouchMove","onTouchEnd","onMouseUp","onMouseMove","buttons","onKeyDown","ClockNumberRoot","text","background","paper","inner","typography","body2","secondary","label","cos","sin","getHourNumbers","getClockNumberText","isDisabled","currentHours","hourNumbers","endHour","isSelected","id","getMinutesNumbers","f","numberValue","PickersArrowSwitcherRoot","PickersArrowSwitcherSpacer","PickersArrowSwitcherButton","hidden","visibility","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText","isRtl","useTheme","leftArrowButtonProps","leftArrowButton","LeftArrowIcon","ArrowLeft","rightArrowButtonProps","rightArrowButton","RightArrowIcon","ArrowRight","as","LeftArrowButton","title","edge","component","RightArrowButton","convertValueToMeridiem","meridiem","getSecondsInDay","getClockPickerUtilityClass","ClockPickerArrowSwitcher","overridesResolver","arrowSwitcher","defaultGetClockLabelText","adapter","defaultGetMinutesClockNumberText","defaultGetHoursClockNumberText","hours","defaultGetSecondsClockNumberText","inProps","disableIgnoringDatePartForTimeValidation","getHoursClockNumberText","getMinutesClockNumberText","getSecondsClockNumberText","maxTime","minTime","nextViewAvailable","openNextView","openPreviousView","previousViewAvailable","shouldDisableTime","showViewSwitcher","now","midnight","dateOrMidnight","getMeridiem","mode","timeWithMeridiem","newHoursAmount","convertToMeridiem","useMeridiemMode","rawValue","validateTimeValue","getRequestedTimePoint","isAfterComparingFn","dateLeft","dateRight","createIsAfterIgnoreDatePart","hoursWithMeridiem","when","currentDate","dateWithHours","dateWithMinutes","useId","viewProps","handleHoursChange","valueWithMeridiem","minutesValue","handleMinutesChange","secondsValue","handleSecondsChange","useUtilityClasses","PickersMonthRoot","duration","fontWeightMedium","onSelect","handleSelection","getMonthPickerUtilityClass","MonthPickerRoot","alignContent","MonthPicker","disableFuture","disablePast","onMonthChange","currentMonth","shouldDisableMonth","firstEnabledMonth","lastEnabledMonth","isBeforeFirstEnabled","isAfterLastEnabled","onMonthSelect","newDate","monthNumber","monthText","findClosestEnabledDate","shouldDisableDate","today","forward","backward","parsePickerInputValue","parsedValue","validateDate","PickersFadeTransitionGroupRoot","TransitionGroup","reduceAnimations","transKey","Fade","appear","mountOnEnter","unmountOnExit","timeout","enter","animationDuration","exit","getPickersDayUtilityClass","pickersDayClasses","styleArg","caption","action","hoverOpacity","dark","short","disableMargin","outsideCurrentMonth","showDaysOutsideCurrentMonth","disableHighlightToday","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","PickersDayRoot","ButtonBase","PickersDayFiller","noop","PickersDay","forwardedRef","allowSameDateSelection","day","isAnimating","onDayFocus","onDaySelect","isToday","centerRipple","areDayPropsEqual","prevProps","replaceClassName","origClass","classToRemove","RegExp","removeClass","c","classList","remove","baseVal","CSSTransition","_React$Component","appliedClasses","maybeNode","maybeAppearing","_this$resolveArgument","resolveArguments","appearing","removeClasses","addClass","onEntering","_this$resolveArgument2","onEntered","_this$resolveArgument3","onExit","onExiting","getClassNames","isStringClassNames","baseClassName","activeClassName","doneClassName","hasClass","_addClass","_this$appliedClasses$","base","done","Transition","defaultProps","propTypes","PickersSlideTransitionRoot","slideTransition","easing","slideEnterActive","slideExit","_span","PickersCalendarDayHeader","PickersCalendarWeekDayLabel","textAlign","PickersCalendarLoadingContainer","minHeight","PickersCalendarSlideTransition","slideDirection","transitionClasses","enterActive","exitActive","childFactory","PickersCalendarWeekContainer","PickersCalendarWeek","onFocusedDayChange","changeFocusedDay","focusedDay","isDateDisabled","isMonthSwitchingAnimating","loading","onMonthSwitchingAnimationEnd","renderDay","renderLoading","handleDaySelect","finalDate","currentMonthNumber","selectedDates","selectedDateItem","transitionKey","slideNodeRef","charAt","toUpperCase","week","pickersDayProps","selectedDate","PickersCalendarHeaderRoot","marginTop","marginBottom","paddingLeft","paddingRight","maxHeight","PickersCalendarHeaderLabel","marginRight","body1","PickersCalendarHeaderLabelItem","PickersCalendarHeaderSwitchViewButton","PickersCalendarHeaderSwitchView","ArrowDropDown","getSwitchingViewAriaText","getViewSwitchingButtonText","currentView","switchViewButtonProps","switchViewButton","isNextMonthDisabled","useNextMonthDisabled","isPreviousMonthDisabled","usePreviousMonthDisabled","nextIndexToOpen","SwitchViewButton","SwitchViewIcon","getPickersYearUtilityClass","pickersYearClasses","PickersYearRoot","flexBasis","PickersYearButton","subtitle1","PickersYear","refHandle","capitalize","yearButton","getYearPickerUtilityClass","YearPickerRoot","YearPicker","onYearChange","shouldDisableYear","currentYear","selectedYearRef","focusedYear","setFocusedYear","handleYearSelection","submitDate","focusYear","yearsInRow","yearNumber","getCalendarPickerUtilityClass","CalendarPickerRoot","CalendarPickerViewTransitionContainer","viewTransitionContainer","defaultReduceAnimations","CalendarPicker","defaultCalendarMonth","calendarState","changeMonth","handleChangeMonth","disableSwitchToMonthOnDayFocus","reducerFn","newMonth","needMonthSwitch","createCalendarStateReducer","dispatch","payload","newDateRequested","newFocusedDate","useCalendarState","closestEnabledDate","getInputAdornmentUtilityClass","InputAdornmentRoot","disablePointerEvents","whiteSpace","marginLeft","InputAdornment","disableTypography","variantProp","muiFormControl","useFormControl","hiddenLabel","FormControlContext","dangerouslySetInnerHTML","__html","getTextFieldAriaText","getDisplayDate","useMaskedInput","acceptRegex","ignoreInvalidInputs","inputProps","readOnly","rifmFormatter","TextFieldProps","validationError","isFocused","setIsFocused","formatHelperText","shouldUseMaskedInput","inferredFormatPatternWith1Digits","isMaskValid","checkMaskIsValidForCurrentFormat","formatter","acceptRegexp","char","maskChar","nextMaskChar","acceptedChar","formattedChar","maskedDateFormatter","st","currentInputValue","innerInputValue","setInnerInputValue","previousInputValueRef","notTyping","valueChanged","handleChange","finalString","rifmProps","refresh","useReducer","valueRef","append","userValue","isDeleleteButtonDownRef","eventValue","input","isSizeIncreaseOperation","isDeleleteButtonDown","isNoOperation","deleteWasNoOp","acceptedCharIndexAfterDelete","selectionStart","accept","charsToSkipAfterDelete","clean","valueBeforeSelectionStart","substr","getCursorPosition","val","cleanPos","newPos","newCleanPos","formattedValue","replacedValue","selectionEnd","useEffect","evt","code","handleKeyUp","useRifm","inputStateArgs","currentTarget","placeholder","onBlur","KeyboardDateInput","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","openPicker","OpenPickerButtonProps","renderInput","textFieldProps","adornmentPosition","OpenPickerIcon","getOrientation","screen","orientation","MobileKeyboardInputView","PickerRoot","MobileKeyboardTextFieldProps","fullWidth","isDatePickerView","onDateChange","showToolbar","ToolbarComponent","customOrientation","setOrientation","eventHandler","useIsLandscape","toShowToolbar","handleDateChange","selectionState","handleViewChange","isSameDateOrTimeError","useDateValidation","validate","isSameError","onError","previousValidationErrorRef","useValidation","usePickerState","valueManager","disableCloseOnSelect","onAccept","isOpen","setIsOpen","onOpen","isControllingOpenProp","openState","setIsOpenState","newIsOpen","useOpenState","initDraftableDate","committed","draft","parsedDateValue","parseInput","draftState","areValuesEqual","setMobileKeyboardViewOpen","acceptDate","acceptedDate","needClosePicker","wrapperProps","onClear","emptyValue","onSetToday","pickerState","pickerProps","MuiPickerState","pickerDraft","AllDateInputProps","getDialogActionsUtilityClass","DialogActionsRoot","disableSpacing","DialogActions","getDialogContentUtilityClass","DialogContentRoot","dividers","WebkitOverflowScrolling","borderTop","divider","borderBottom","paddingTop","DialogContent","getDialogUtilityClass","DialogBackdrop","Backdrop","overrides","backdrop","DialogRoot","Modal","DialogContainer","content","verticalAlign","DialogPaper","paperFullWidth","fullScreen","paperFullScreen","boxShadow","breakpoints","unit","values","xs","down","defaultTransitionDuration","Dialog","ariaDescribedby","ariaLabelledbyProp","BackdropComponent","BackdropProps","disableEscapeKeyDown","onBackdropClick","PaperComponent","transitionDuration","backdropClick","ariaLabelledby","dialogContextValue","titleId","closeAfterTransition","onMouseDown","PickersModalDialogRoot","minWidth","PickersModalDialogContent","PickersModalDialogActions","clearable","showTodayButton","cancelText","clearText","DialogProps","okText","todayText","Button","PureDateInputComponent","PureDateInput","PureDateInputProps","inputValue","desktopModeMediaQuery","useMediaQuery","getLoadingButtonUtilityClass","LoadingButtonRoot","shouldForwardProp","prop","rootShouldForwardProp","startIconLoadingStart","endIconLoadingEnd","loadingPosition","LoadingButtonLoadingIndicator","loadingIndicator","LoadingIndicator","CircularProgress","startIcon","endIcon","composedClasses","MuiPickersAdapterContext","dateAdapter","Utils","dateFormats","dateLibInstance","contextValue","getAlertTitleUtilityClass","AlertTitleRoot","gutterBottom","getAlertUtilityClass","_CloseIcon","AlertRoot","severity","getColor","getBackgroundColor","shape","AlertIcon","icon","fontSize","AlertMessage","message","AlertAction","defaultIconMapping","success","SuccessOutlined","warning","ReportProblemOutlined","ErrorOutline","info","InfoOutlined","closeText","iconMapping","square","Close","getAppBarUtilityClass","AppBarRoot","backgroundColorDefault","grey","appBar","getContrastText","enableColorOnDark","backgroundImage","getAvatarUtilityClass","AvatarRoot","colorDefault","fontFamily","pxToRem","AvatarImg","img","objectFit","textIndent","AvatarFallback","Person","fallback","alt","childrenProp","imgProps","sizes","src","srcSet","loaded","crossOrigin","referrerPolicy","setLoaded","image","Image","onload","onerror","srcset","useLoaded","hasImg","hasImgNotFailing","getBackdropUtilityClass","classesProp","invisible","Root","rootProps","isHostComponent","BackdropRoot","WebkitTapHighlightColor","_componentsProps$root","extendUtilityClasses","defaultTheme","BoxRoot","styleFunctionSx","_extendSxProp","extendSxProp","createBox","_t","_t2","_t3","_t4","_","t","enterKeyframe","exitKeyframe","pulsateKeyframe","TouchRippleRoot","TouchRippleRipple","pulsate","rippleX","rippleY","rippleSize","inProp","leaving","setLeaving","rippleClassName","ripple","rippleVisible","ripplePulsate","rippleStyles","childClassName","childLeaving","childPulsate","timeoutId","setTimeout","clearTimeout","easeInOut","shorter","centerProp","ripples","setRipples","nextKey","rippleCallback","ignoringMouseDown","startTimer","startTimerCommit","startCommit","params","cb","oldRipples","fakeElement","touches","sizeX","sizeY","stop","getButtonBaseUtilityClass","ButtonBaseRoot","MozAppearance","WebkitAppearance","textDecoration","borderStyle","colorAdjust","disableRipple","disableTouchRipple","focusRipple","LinkComponent","onContextMenu","onDragLeave","onFocusVisible","onKeyUp","onMouseLeave","TouchRippleProps","buttonRef","rippleRef","isFocusVisibleRef","handleFocusVisible","handleBlurVisible","focusVisibleRef","useIsFocusVisible","setFocusVisible","useRippleHandler","rippleAction","eventCallback","skipRippleAction","handleMouseDown","handleContextMenu","handleDragLeave","handleMouseUp","handleMouseLeave","handleTouchStart","handleTouchEnd","handleBlur","handleFocus","isNonNativeButton","button","href","keydownRef","defaultPrevented","ComponentProp","to","buttonProps","handleOwnRef","mountedState","setMountedState","enableTouchRipple","focusVisibleClassName","getButtonUtilityClass","commonIconStyles","ButtonRoot","colorInherit","disableElevation","A100","shadows","disabledBackground","borderColor","ButtonStartIcon","ButtonEndIcon","disableFocusRipple","endIconProp","startIconProp","getCardContentUtilityClass","CardContentRoot","paddingBottom","getCardUtilityClass","CardRoot","raised","getCheckboxUtilityClass","CheckboxRoot","SwitchBase","indeterminate","defaultCheckedIcon","CheckBox","defaultIcon","CheckBoxOutlineBlank","defaultIndeterminateIcon","IndeterminateCheckBox","_icon$props$fontSize","_indeterminateIcon$pr","checkedIcon","iconProp","indeterminateIcon","indeterminateIconProp","getCircularProgressUtilityClass","circularRotateKeyframe","circularDashKeyframe","CircularProgressRoot","CircularProgressSVG","svg","CircularProgressCircle","circle","disableShrink","circleDisableShrink","stroke","thickness","circleStyle","rootStyle","circumference","toFixed","viewBox","r","fill","getDividerUtilityClass","DividerRoot","absolute","vertical","flexItem","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","borderWidth","borderBottomWidth","borderRightWidth","alignSelf","borderLeft","DividerWrapper","wrapper","wrapperVertical","entering","entered","defaultTimeout","addEndListener","foreignRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","handleEnter","isAppearing","transitionProps","webkitTransition","handleEntered","handleExiting","handleExit","handleExited","getFormControlLabelUtilityClasses","FormControlLabelRoot","labelPlacement","control","disabledProp","controlProps","getFormControlUtilityClasses","FormControlRoot","visuallyFocused","adornedStart","setAdornedStart","initialAdornedStart","isMuiElement","filled","setFilled","initialFilled","focusedState","setFocused","onFilled","childContext","onEmpty","registerEffect","formControlState","states","getFormGroupUtilityClass","FormGroupRoot","row","getGridUtilityClass","GRID_SIZES","wrap","getOffset","parseFloat","GridRoot","lg","md","sm","xl","zeroMinWidth","propValue","rowSpacing","themeSpacing","columnSpacing","globalStyles","breakpoint","columnsBreakpointValues","more","up","generateGrid","themeProps","columnsProp","columnSpacingProp","rowSpacingProp","getScale","timer","autoTimeout","delay","transitionTimingFunction","getAutoHeightDuration","muiSupportAuto","getIconButtonUtilityClass","IconButtonRoot","shortest","getStyleValue","computedStyle","maxRows","minRows","isControlled","shadowRef","renders","setState","syncHeight","ownerWindow","inputShallow","innerHeight","singleRowHeight","outerHeight","outerHeightStyle","prevState","handleResize","debounce","containerWindow","resizeObserver","ResizeObserver","observe","clear","disconnect","rows","GlobalStyles","themeInput","getInputBaseUtilityClass","rootOverridesResolver","formControl","startAdornment","endAdornment","adornedEnd","sizeSmall","multiline","inputOverridesResolver","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel","InputBaseRoot","InputBaseComponent","placeholderHidden","placeholderVisible","font","letterSpacing","animationName","WebkitTextFillColor","inputGlobalStyles","autoComplete","defaultValue","inputComponent","inputPropsProp","inputRefProp","renderSuffix","valueProp","handleInputRefWarning","handleInputPropsRefProp","handleInputRefProp","handleInputRef","fcs","checkDirty","InputComponent","Input","onAnimationStart","hasValue","isFilled","SSR","isAdornedStart","getFormLabelUtilityClasses","FormLabelRoot","colorSecondary","AsteriskComponent","asterisk","getInputLabelUtilityClasses","InputLabelRoot","shrink","disableAnimation","animated","textOverflow","easeOut","shrinkProp","getInputUtilityClass","InputRoot","InputBase","disableUnderline","underline","bottomLineColor","borderBottomColor","borderBottomStyle","InputInput","componentsPropsProp","inputComponentsProps","deepmerge","muiName","ariaHidden","show","getPaddingRight","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","blacklistTagNames","findIndexOf","items","idx","getModalUtilityClass","defaultManager","containers","modals","modalIndex","modalRef","hiddenSiblings","getHiddenSiblings","mount","containerIndex","restore","containerInfo","restoreStyle","disableScrollLock","innerWidth","isOverflowing","scrollbarSize","getScrollbarSize","el","parentElement","scrollContainer","setProperty","removeProperty","handleContainer","splice","nextTop","isTopModal","hideBackdrop","manager","onTransitionEnter","onTransitionExited","mountNodeRef","hasTransition","getHasTransition","getModal","handleMounted","handleOpen","resolvedContainer","handlePortalRef","handleClose","createChainedFunction","ModalRoot","ModalBackdrop","commonProps","defaultInput","NativeSelect","IconComponent","otherClasses","nativeSelectSelectStyles","NativeSelectSelect","select","nativeSelectIconStyles","NativeSelectIcon","iconOpen","NativeSelectInput","multiple","getNativeSelectUtilityClasses","nativeSelectClasses","getPaperUtilityClass","getOverlayAlpha","alphaValue","log","PaperRoot","rounded","RadioGroup","actions","nameProp","setValueState","RadioGroupContext","RadioButtonIconRoot","RadioButtonIconBackground","RadioButtonUnchecked","RadioButtonIconDot","RadioButtonChecked","easeIn","dot","getRadioUtilityClass","RadioRoot","_defaultIcon$props$fo","_defaultCheckedIcon$p","checkedProp","onChangeProp","radioGroup","joinChildren","separator","childrenArray","StackRoot","transformer","directionValues","spacingValues","styleFromPropValue","Stack","getSwitchUtilityClass","SwitchRoot","SwitchSwitchBase","switchBase","common","white","SwitchTrack","track","black","SwitchThumb","thumb","sx","getTabUtilityClass","TabRoot","labelIcon","textColor","wrapped","disabledOpacity","indicator","selectionFollowsFocus","cachedType","detectScrollType","dummy","dir","getNormalizedScrollLeft","easeInOutSin","getTabScrollButtonUtilityClass","_KeyboardArrowLeft","_KeyboardArrowRight","TabScrollButtonRoot","KeyboardArrowLeft","KeyboardArrowRight","getTabsUtilityClass","nextItem","previousItem","lastChild","previousElementSibling","moveFocus","currentFocus","traversalFunction","wrappedOnce","nextFocus","nextFocusDisabled","TabsRoot","scrollButtons","scrollButtonsHideMobile","TabsScroller","scroller","fixed","hideScrollbar","scrollableX","scrollableY","scrollbarWidth","FlexContainer","flexContainer","flexContainerVertical","centered","TabsIndicator","indicatorColor","TabsScrollbarSize","scrollbarHeight","setMeasurements","prevHeight","defaultIndicatorStyle","ariaLabel","ariaLabelledBy","allowScrollButtonsMobile","ScrollButtonComponent","TabIndicatorProps","TabScrollButtonProps","visibleScrollbar","scrollable","scrollStart","mounted","setMounted","indicatorStyle","setIndicatorStyle","displayScroll","setDisplayScroll","scrollerStyle","setScrollerStyle","valueToIndex","tabsRef","tabListRef","getTabsMeta","tabsNode","tabsMeta","tabMeta","scrollLeftNormalized","tab","updateIndicatorState","startIndicator","startValue","correction","newIndicatorStyle","dStart","dSize","scrollValue","animation","ease","cancelled","timestamp","requestAnimationFrame","animate","standard","moveTabsScroll","getScrollSize","containerSize","totalSize","handleStartScrollClick","handleEndScrollClick","handleScrollbarSizeChange","scrollSelectedIntoView","nextScrollStart","updateScrollButtonState","showStartScroll","showEndScroll","handleTabsScroll","updateIndicator","updateScrollButtons","childIndex","childValue","conditionalElements","scrollbarSizeListener","scrollButtonsActive","showScrollButtons","scrollButtonStart","scrollButtonEnd","getConditionalElements","onScroll","previousItemKey","nextItemKey","getFilledInputUtilityClass","FilledInputRoot","borderTopLeftRadius","borderTopRightRadius","FilledInputInput","WebkitBoxShadow","caretColor","FilledInput","filledInputComponentsProps","NotchedOutlineRoot","NotchedOutlineLegend","notched","getOutlinedInputUtilityClass","OutlinedInputRoot","notchedOutline","OutlinedInputInput","OutlinedInput","getFormHelperTextUtilityClasses","FormHelperTextRoot","contained","getListUtilityClass","ListRoot","disablePadding","dense","subheader","listStyle","context","disableListWrap","textCriteriaMatches","textCriteria","innerText","textContent","repeating","disabledItemsFocusable","autoFocusItem","listRef","textCriteriaRef","previousKeyMatched","lastTime","adjustStyleForScrollbar","containerElement","noExplicitWidth","activeItemIndex","newChildProps","criteria","lowerKey","currTime","performance","keepFocusOnCurrent","getPopoverUtilityClass","getOffsetTop","getOffsetLeft","horizontal","getTransformOriginValue","n","PopoverRoot","PopoverPaper","anchorOrigin","anchorPosition","anchorReference","marginThreshold","transitionDurationProp","getAnchorOffset","resolvedAnchorEl","anchorRect","nodeType","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","setPositioningStyles","positioning","updatePosition","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","MenuMenuList","disableAutoFocusItem","MenuListProps","PopoverClasses","menuListActionsRef","getSelectUtilityClasses","SelectSelect","SelectIcon","SelectNativeInput","nativeInput","areEqualValues","isEmpty","_Input","_FilledInput","autoWidth","displayEmpty","labelId","MenuProps","openProp","renderValue","SelectDisplayProps","tabIndexProp","displayRef","displayNode","setDisplayNode","isOpenControlled","menuMinWidthState","setMenuMinWidthState","setOpenState","handleDisplayRef","getElementById","handler","getSelection","isCollapsed","handleItemClick","itemIndex","clonedEvent","writable","displaySingle","displayMultiple","computeDisplay","foundMatch","v","menuMinWidth","buttonId","Select","native","variantProps","outlined","inputComponentRef","getTextFieldUtilityClass","variantComponent","TextFieldRoot","FormControl","FormHelperTextProps","helperText","InputLabelProps","SelectProps","InputMore","_InputLabelProps$requ","displayRequired","helperTextId","inputLabelId","InputElement","InputLabel","htmlFor","getToolbarUtilityClass","ToolbarRoot","disableGutters","gutters","mixins","toolbar","getTypographyUtilityClass","TypographyRoot","noWrap","paragraph","defaultVariantMapping","h1","h2","h3","h4","h5","h6","subtitle2","inherit","colorTransformations","textPrimary","textSecondary","transformDeprecatedColors","variantMapping","Component","A200","A400","A700","getSwitchBaseUtilityClass","SwitchBaseRoot","SwitchBaseInput","defaultChecked","setCheckedState","hasLabelFor","newChecked","hover","selectedOpacity","focusOpacity","activatedOpacity","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","caseAllCaps","textTransform","defaultFontFamily","createTypography","fontWeightLight","fontWeightRegular","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","buildVariant","casing","variants","overline","createShadow","px","mobileStepper","speedDial","drawer","snackbar","tooltip","mixinsInput","paletteInput","transitionsInput","typographyInput","contrastThreshold","blue","getDefaultPrimary","purple","getDefaultSecondary","red","getDefaultError","lightBlue","getDefaultInfo","green","getDefaultSuccess","orange","getDefaultWarning","augmentColor","mainShade","lightShade","darkShade","JSON","modes","createPalette","systemTheme","muiTheme","createTransitions","argument","sharp","complex","enteringScreen","leavingScreen","formatMs","milliseconds","constant","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","animatedProp","propsToClassKey","classKey","_excluded3","systemDefaultTheme","createTheme","slotShouldForwardProp","inputOptions","componentSlot","skipVariantsResolver","inputSkipVariantsResolver","inputSkipSx","shouldForwardPropOption","defaultStyledResolver","expressions","expressionsWithDefaultTheme","stylesArg","transformedStyleArg","styleOverrides","getStyleOverrides","_theme$components","_theme$components$nam","variantsStyles","themeVariants","themeVariant","isMatch","variantsResolver","definition","getVariantStyles","numOfCustomFnsApplied","placeholders","createStyled","getThemeProps","reflow","getTransitionProps","_style$transitionDura","_style$transitionTimi","transitionDelay","queryInput","supportMatchMedia","matchMedia","defaultMatches","noSsr","ssrMatchMedia","query","setMatch","matches","queryList","updateMatch","addListener","removeListener","getSvgIconUtilityClass","SvgIconRoot","_theme$palette$ownerS","_theme$palette$ownerS2","small","medium","large","SvgIcon","htmlColor","titleAccess","focusable","path","displayName","wait","debounced","validator","reason","componentNameInError","propName","location","propFullName","muiNames","defaultProp","valueState","setValue","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","url","tel","email","password","number","datetime","metaKey","altKey","ctrlKey","handlePointerDown","handleVisibilityChange","visibilityState","isContentEditable","focusTriggersKeyboardModality","isFocusVisible","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","optionsShouldForwardProp","__emotion_forwardProp","newStyled","targetClassName","__emotion_real","baseTag","__emotion_base","defaultShouldForwardProp","shouldUseAs","Styled","finalTag","classInterpolations","finalShouldForwardProp","newProps","withComponent","nextTag","nextOptions","Symbol","for","localTheme","outerTheme","mergeOuterLocalTheme","nested","InnerThemeProvider","defaultBreakpoints","handleBreakpoints","themeBreakpoints","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","removeUnusedBreakpoints","breakpointKeys","breakpointOutput","resolveBreakpointValues","breakpointValues","clamp","decomposeColor","re","colors","hexToRgb","marker","substring","colorSpace","shift","recomposeColor","getLuminance","rgb","s","l","hslToRgb","getContrastRatio","foreground","lumA","lumB","alpha","darken","coefficient","lighten","spacingInput","shapeInput","between","endIndex","only","createBreakpoints","mui","argsInput","createSpacing","handlers","filterProps","merge","getBorder","themeKey","borderRight","borderTopColor","borderRightColor","borderLeftColor","cssProperty","gap","columnGap","rowGap","_props$theme","_props$theme$breakpoi","_props$theme$breakpoi2","fontStyle","filterPropsMapping","borders","flexbox","grid","positions","sizing","styleFunctionMapping","propToStyleFunction","styleFnName","styleFunction","properties","p","directions","aliases","marginX","marginY","paddingX","paddingY","getCssProperties","memoize","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","createUnarySpacing","getValue","transformed","cssProperties","getStyleFromPropValue","resolveCssProperty","getPath","themeMapping","propValueFinal","inSx","systemProps","otherProps","splitProps","emptyBreakpoints","breakpointsKeys","styleKey","maybeFn","breakpointsValues","objects","allKeys","object","union","objectsHaveSameKeys","contextTheme","funcs","isPlainObject","source","formatMuiErrorMessage","encodeURIComponent","documentWidth","setRef","refA","refB","refValue","idOverride","defaultId","setDefaultId","random","__spreadArrays","il","jl","self","g","global","angular","fromJson","bind","toJson","extend","toObj","equals","_equals","o1","o2","t1","a1","a2","tup","arrayTuples","getTime","identity","createProxyFunctions","fnNames","latebind","bindFunction","fnName","extra","inArray","removeFrom","pushTo","arr","deregAll","functions","defaults","opts","defaultsList","defaultVals","reverse","pick","mergeR","memo","ancestors","first","propNames","objCopy","_prop","omit","mapObj","allTrueR","elem","anyTrueR","unnestR","flattenR","pushR","uniqR","unnest","assertPredicate","predicateOrMap","errMsg","maxArrayLen","_loop_1","applyPairs","keyValTuple","tail","dest","silenceUncaughtInPromise","promise","catch","silentRejection","makeStub","service","methods","fnname","services","$q","$injector","Glob","glob","regexpString","seg","regexp","is","fromString","curry","curried","compose","propEq","_val","not","and","fn1","fn2","or","all","any","ctor","struct","toStr","tis","isUndefined","isDefined","o","isNullOrUndefined","isFunction","isNumber","isString","isObject","isDate","isRegExp","isInjectable","isPromise","Queue","_items","_limit","_evictListeners","onEvict","enqueue","evict","dequeue","peekTail","peekHead","noopConsoleStub","table","safeConsole","documentMode","console","bound","Function","ie9Console","fallbackConsole","maxLength","padString","kebobString","camelCase","$1","functionToString","fnStr","fnToString","namedFunctionMatch","_fn","seen","isRejection","stringifyPattern","_transitionRejection","beforeAfterSubstr","stripLastPathElement","splitHash","splitQuery","splitEqual","trimHashVal","splitOnDelim","delim","joinNeighborsR","Category","uiViewString","uiview","creationContext","$type","fqn","normalizedCat","_tid","_rid","transLbl","trans","Trace","_enabled","approximateDigests","_set","categories","category","enable","disable","traceTransitionStart","TRANSITION","traceTransitionIgnored","traceHookInvocation","HOOK","registeredHook","traceHookResult","hookResult","transitionOptions","traceResolvePath","RESOLVE","traceResolvableResolved","resolvable","traceError","traceSuccess","finalState","traceUIViewEvent","viewData","UIVIEW","traceUIViewConfigUpdated","traceUIViewFill","traceViewSync","pairs","VIEWCONFIG","uivheader","mapping","uiView","viewConfig","uiv","cfg","viewDecl","$context","$name","localeCompare","traceViewServiceEvent","$id","$uiViewName","$uiViewContextAnchor","viewConfigString","traceViewServiceUIViewEvent","trace","UIRouterGlobals","lastStartedTransitionId","transitionHistory","successfulTransitions","dispose","lazyLoadHook","router","promises","$$state","lazyLoad","lazyLoadState","originalTransition","orig","targetState","stateService","$url","urlService","parts","sync","registerLazyLoadHook","transitionService","onBefore","lazyLoadFn","_state","stateRegistry","register","err","DefType","hasOwn","Param","urlConfig","config","paramName","noReloadOnSearch","reloadOnSearch","SEARCH","dynamic","defaultConfig","paramConfig","getStaticDefaultValue","isShorthand","$$fn","unwrapShorthand","getParamDeclaration","urlType","paramTypes","CONFIG","PATH","getType","arrayDefaults","arrayParamNomenclature","arrayMode","$asArray","isOptional","squash","defaultPolicy","getSquashPolicy","defaultSquashPolicy","configuredKeys","getReplace","paramValues","params_1","param","changed","values1","values2","validates","isDefaultValue","tuple","replaceSpecialValues","_defaultValueCache","getDefaultValue","$normalize","isSearch","normalized","encoded","encode","ParamType","def","decode","$subPattern","sub","ArrayType","arrayWrap","arrayHandler","allTruthyMode","arrayUnwrap","arrayEqualsHandler","val1","val2","paramTypeFn","wrapperFn","$arrayMode","makeDefaultType","ParamTypes","typeQueue","defaultTypes","types","definitionFn","_flushTypeQueue","valToString","defaultTypeBase","int","bool","getFullYear","getDate","capture","Date","valueOf","json","StateParams","$inherit","newParams","$current","$to","parentParams","parents","inherited","inheritList","PathNode","stateOrNode","paramSchema","resolvables","parameters","res","applyRawParams","pDef","paramDef","parameter","paramsFn","PathUtils","makeTargetState","registry","buildPath","toParams","$state","buildToPath","fromPath","toPath","inheritParams","applyViewConfigs","$view","viewDecls","subPath","viewConfigs","createViewConfig","toKeys","noInherit","toNode","toParamVals","incomingParamVals","fromParamVals","ownParamVals","treeChanges","reloadState","node1","node2","retained","exiting","keep","nonDynamicParams","retainedWithToParams","retainedNode","cloned","matching","pathA","pathB","nodeA","nodeB","predicate","elementIdx","resolvePolicies","LAZY","EAGER","async","WAIT","NOWAIT","Resolvable","arg1","resolveFn","deps","policy","resolved","literal","getPolicy","thisPolicy","statePolicy","resolvePolicy","resolveContext","findNode","asyncPolicy","customAsyncPolicy","getDependencies","resolvedDeps","resolvedValue","fromData","whens","ALL_WHENS","EAGER_WHENS","ResolveContext","_path","getTokens","getResolvable","subContext","addResolvables","newResolvables","resolvePath","matchedWhens","matchesPolicy","acceptedVals","whenOrAsync","nodeResolvables","nowait","getResult","injector","_injector","UIInjectorImpl","availableResolvables","_node","fromInjector","getNative","getAsync","_routerInstance","locationServiceStub","locationConfigStub","UIRouter","locationService","locationConfig","_disposed","_disposables","viewService","globals","urlMatcherFactory","urlRouter","_plugins","_pluginapi","_rootViewContext","disposable","ignored","plugin","pluginInstance","getPlugin","pluginName","nameBuilder","selfBuilder","dataBuilder","getUrlBuilder","$urlMatcherFactoryProvider","stateObject","stateDec","newStateDec","parseUrl","isMatcher","navigable","getNavigableBuilder","isRoot","pathBuilder","includesBuilder","includes","resolvablesBuilder","resolveObj","getToken","provide","literal2Resolvable","useFactory","dependencies","useClass","useValue","useExisting","tuple2Resolvable","annotate","strictDi","item2Resolvable","decl","StateBuilder","matcher","paramFactory","builders","parentName","urlParams","nonUrlParams","fromConfig","builder","build","chain","parentFn","segments","pop","StateMatcher","_states","isRelative","stateName","stateOrName","matchGlob","isStr","__stateObjectCache","nameGlob","baseState","splitName","pathLength","relName","StateObject","stateDecl","isStateClass","matchingKeys","isStateDeclaration","isState","StateQueueManager","listeners","queue","previousQueueLength","getState","notifyListeners","listener","name_1","orphanIdx","existingState","existingFutureState","deregister","attachRoute","abstract","rulesApi","urlRuleFactory","StateRegistry","stateQueue","_registerRoot","_root","onStatesChanged","stateDefinition","_deregisterTree","getChildren","_children","deregistered","removeRule","deregisteredStates","found","decorator","builderFunction","StateService","invalidCallbacks","_defaultErrorHandler","$error$","stack","detail","boundFns","configurable","defaultErrorHandler","_handleInvalidTargetState","toState","fromState","latestThing","latest","callbackQueue","checkForRedirect","valid","toPromise","transitionTo","invokeNextCallback","nextCallback","onInvalid","reload","notify","go","defautGoOpts","relative","transOpts","reg","getCurrentPath","latestSuccess","getCurrent","currentPath","exists","supercede","rejectedTransitionHandler","isLatest","redirected","redirect","run","errorHandler","transitionToPromise","schema","include","defaultHrefOpts","lossy","nav","TargetState","_stateRegistry","_identifier","_params","_definition","withState","withParams","withOptions","newOpts","isDef","HookBuilder","buildHooksForPhase","_getEvents","buildHooks","hookType","matchingHooks","getMatchingHooks","reverseDepthSort","baseHookOptions","hook","criteriaMatchPath","traceData","scope","transitionHook","reverseSort","factor","depthDelta","priority","isCreate","hookPhase","$transitions","getHooks","matchState","criterion","toMatch","globStrings","RegisteredHook","tranSvc","eventType","matchCriteria","removeHookFromRegistry","invokeCount","_deregistered","invokeLimit","_matchingNodes","_getDefaultMatchCriteria","_getPathTypes","_getMatchingNodes","mn","pathtype","isStateHook","makeEvent","hooks","_registeredHooks","removeHookFn","hookRegistrationFn","matchObject","TransitionHookPhase","TransitionHookScope","RejectType","Rejection","isRejectionPromise","superseded","rejection","SUPERSEDED","invalid","INVALID","IGNORED","aborted","ABORTED","errored","ERROR","normalize","stateSelf","_deferred","_hookBuilder","isActive","_targetState","_transitionCount","_treeChanges","createTransitionHookRegFns","onCreateHooks","onStart","onRetain","onFinish","onSuccess","hookName","enteringStates","$from","compare","pathname","freeze","paramsChanged","fromParams","allParamDescriptors","pathNode","changedValues","descriptor","pathName","getResolveTokens","addResolvable","topath","targetNode","redirectedFrom","rf","redirects","redirectOpts","newOptions","newTransition","originalEnteringNodes","redirectEnteringNodes","_changedParams","tc","nodeSchemas","toValues","fromValues","toVals","fromVals","changes","_ignoredReason","same","newTC","pendTC","runAllHooks","getHooksFor","allBeforeHooks","allRunHooks","reject","_error","abort","_aborted","paramDefs","invalidParams","invalidValues","fromStateOrName","toStateOrName","avoidEmptyHash","diToken","TransitionEventType","hookOrder","getResultHandler","getErrorHandler","synchronous","TransitionHook","stateContext","isSuperseded","waitFor","nextHook","invokeHook","invokeHooks","doneCallback","remainingHooks","logError","notCurrent","getNotCurrentRejection","handleError","handleResult","handleHookResult","isTargetState","HANDLE_RESULT","LOG_REJECTED_RESULT","LOG_ERROR","REJECT_ERROR","THROW_ERROR","addCoreResolvables","TRANSITION_TOKENS","isTransition","treeChangesCleanup","replaceTransitionWithNull","redirectToHook","redirectTo","makeEnterExitRetainHook","hookFn","onExitHook","onRetainHook","onEnterHook","RESOLVE_HOOK_PRIORITY","eagerResolvePath","lazyResolveState","resolveRemaining","loadEnteringViews","enteringViews","load","activateViews","exitingViews","vc","deactivateViewConfig","activateViewConfig","updateGlobalState","clearCurrentTransition","updateUrl","$urlRouter","urlOptions","ignoredHook","ignoredReason","invalidTransitionHook","defaultTransOpts","custom","TransitionService","_router","_eventTypes","_criteriaPaths","_deregisterHookFns","_defineCorePaths","_defineCoreEvents","_registerCoreTransitionHooks","onCreate","hooksArray","Phase","TH","paths","NORMAL_SORT","SYNCHRONOUS","_defineEvent","CREATE","BEFORE","RUN","SUCCESS","STATE","_definePathType","cmpByPhase","hookScope","addCoreResolves","registerInvalidTransitionHook","registerRedirectToHook","registerOnExitHook","registerOnRetainHook","registerOnEnterHook","eagerResolve","registerEagerResolvePath","lazyResolve","registerLazyResolveState","resolveAll","registerResolveRemaining","loadViews","registerLoadEnteringViews","registerActivateViews","updateGlobals","registerUpdateGlobalState","registerUpdateUrl","UrlConfig","_decodeParams","_isCaseInsensitive","_isStrictMode","_defaultSquashPolicy","baseHref","hashPrefix","newprefix","html5Mode","port","protocol","caseInsensitive","strictMode","quoteRegExp","surroundPattern","splitOnSlash","strict","decodeParams","UrlMatcher","_cache","_segments","_compiled","matchArray","details","segment","searchPlaceholder","patterns","last","checkParamErrors","nameValidator","matchDetails","fromSearch","_pattern","encodeDashes","pathSegmentsAndParams","staticSegments","pathParams","queryParams","weights","weightsA","weightsB","padVal","padArrays","cmp","_pairs","_getDecodedParamValue","paramValue","decodeURIComponent","reverseString","allReversed","allParams","searchParams","nPathSegments","urlm","findParam","urlMatchers","getDetails","pathString","queryString","paramDetails","__assign","ParamFactory","UrlMatcherFactory","globalConfig","$get","UrlRouter","listen","deferIntercept","defer","urlParts","initial","otherwise","compareFn","read","urlMatcher","isHtml5","appendBasePath","slash","cfgPort","interceptDeferred","UrlRuleFactory","what","makeRule","_what","fromUrlMatcher","fromRegExp","BaseUrlRule","_handler","matchPriority","optional","stateOrDecl","sticky","isUrlRule","defaultRuleSortFn","getHandlerFn","prioritySort","URLMATCHER","REGEXP","RAW","OTHER","typeSort","urlMatcherSort","useMatchPriority","idSort","UrlRules","_sortFn","_rules","_id","_otherwiseFn","handlerFn","_sorted","ensureSorted","sorted","stableSort","group","_group","arrOfWrapper","wrapperA","wrapperB","cmpDiff","UrlService","newurl","best","applyResult","_stopListeningFn","weight","keyValsToObjectR","accum","orEmptyString","beforehash","locationPluginFactory","serviceClass","configurationClass","uiRouter","configuration","extendStatics","BaseLocationServices","fireAfterUpdate","_listeners","_listener","_get","_location","_history","loc","searchObject","__extends","setPrototypeOf","__proto__","__","HashLocationService","_super","MemoryLocationService","_url","PushStateLocationService","_config","_getBasePrefix","basePrefix","exactBaseHrefMatch","startsWithBase","fullUrl","replaceState","pushState","BrowserLocationConfig","_isHtml5","_baseHref","_hashPrefix","hostname","getBaseHref","getElementsByTagName","_port","_protocol","_host","newval","ViewService","_uiViews","_viewConfigs","_viewConfigFactories","_viewConfigFactory","_registeredUIView","_registeredUIViews","_activeViewConfigs","_onSync","normalizeUIViewTarget","rawViewName","viewAtContext","uiViewName","uiViewContextAnchor","relativeViewNameSugar","anchorState","anchor","_rootContext","factory","cfgFactory","cfgs","uiViewsByFqn","viewConfigDepth","depthCompare","depthFn","posNeg","uiViewTuples","stateDepth","matchingConfigs","matchedViewConfigs","unmatchedConfigTuples","configUpdated","allTuples","registerUIView","uiViews","available","vcSegments","uivSegments","negOffset","fqnToFirstSegment","uiViewContext","TRANSITION_PROP","TRANSITIONEND_EVENT","ANIMATION_PROP","ANIMATIONEND_EVENT","ADD_CLASS_SUFFIX","REMOVE_CLASS_SUFFIX","NG_ANIMATE_CLASSNAME","NG_ANIMATE_CHILDREN_DATA","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","DURATION_KEY","PROPERTY_KEY","DELAY_KEY","TIMING_KEY","ANIMATION_DELAY_PROP","ANIMATION_DURATION_PROP","TRANSITION_DELAY_PROP","TRANSITION_DURATION_PROP","ngMinErr","$$minErr","assertArg","mergeClasses","pendClasses","fix","isPrefix","klass","stripCommentsFromElement","jqLite","extractElementNode","elm","applyAnimationClassesFactory","$$jqLite","$$addClass","$$removeClass","prepareAnimationOptions","$$prepared","domOperation","$$domOperationFired","applyAnimationStyles","applyAnimationFromStyles","applyAnimationToStyles","mergeAnimationDetails","oldAnimation","newAnimation","toAdd","toRemove","flags","splitClassesToLookup","allow","resolveElementClasses","attr","preparationClasses","concatWithSpace","realDomOperation","getDomNode","blockKeyframeAnimations","applyBlock","applyInlineStyle","styleTuple","helpers","$$AnimateChildrenDirective","$interpolate","link","attrs","ngAnimateChildren","setData","$observe","ANIMATE_TIMER_KEY","ONE_SECOND","DETECT_CSS_PROPERTIES","transitionProperty","animationDelay","DETECT_STAGGER_CSS_PROPERTIES","getCssDelayStyle","isKeyframeAnimation","computeCssStyles","$window","detectedStyles","formalStyleName","actualStyleName","maxValue","truthyTimingValue","getCssTransitionDurationStyle","applyOnlyDuration","registerRestorableStyles","backup","getPropertyValue","$AnimateCssProvider","$animateProvider","$$AnimateRunner","$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue","applyAnimationClasses","rafWaitQueue","waitUntilQuiet","pageWidth","computeTimings","cacheKey","allowNoDuration","timings","hasDuration","put","computeCachedCssStyles","aD","tD","maxDelay","maxDuration","initialOptions","restoreStyles","closeAndReturnNoopAnimator","animationClosed","animationPaused","animationCompleted","runner","runnerHost","maxDelayTime","maxDurationTime","startTime","temporaryStyles","packageStyles","events","animations","method","isStructural","structural","structuralClassName","addRemoveClassName","applyClassesEarly","hasToStyles","keyframeStyle","stagger","containsCachedAnimationWithoutDuration","staggerVal","staggerCacheKey","staggerClassName","computeCachedCssStaggerStyles","$$skipPreparationClasses","transitionStyle","durationStyle","staggerIndex","isFirst","skipBlocking","fullClassName","relativeDelay","hasTransitions","hasAnimations","hasTransitionAll","applyTransitionDuration","applyAnimationDuration","applyTransitionDelay","applyAnimationDelay","recalculateTimingStyles","delayStyle","activeClasses","blockTransition","blockKeyframeAnimation","cleanupStyles","applyBlocking","$$willAnimate","endFn","cancel","cancelFn","resume","pause","close","rejected","entry","onDone","off","onAnimationProgress","animationTimerData","removeData","complete","ev","originalEvent","timeStamp","$manualTimeStamp","elapsedTime","playPause","playAnimation","maxStagger","triggerAnimationStart","easeProp","easeVal","timerTime","endTime","animationsData","setupFallbackTimer","currentTimerData","expectedEndTime","onAnimationExpired","on","$$AnimateCssDriverProvider","$$animationProvider","drivers","NG_ANIMATE_SHIM_CLASS_NAME","$animateCss","$rootScope","$rootElement","$document","bodyNode","rootBodyElement","animationDetails","anchors","fromAnimation","prepareRegularAnimation","toAnimation","anchorAnimations","animator","outAnchor","inAnchor","cloneNode","startingClasses","filterCssClasses","getClassVal","animatorIn","animatorOut","calculateAnchorStyles","prepareOutAnimation","prepareInAnimation","startingAnimator","currentAnimation","coords","endingClasses","getUniqueValues","NG_IN_ANCHOR_CLASS_NAME","NG_OUT_ANCHOR_CLASS_NAME","prepareAnchoredAnimation","animationRunners","status","prepareFromToAnchorAnimation","$$AnimateJsProvider","after","afterFn","beforeFn","classesToAdd","classesToRemove","lookupAnimations","packageAnimations","closeActiveAnimations","applyOptions","setHost","endAnimations","onComplete","executeAnimationFn","groupEventedAnimations","operations","ani","endProgressCb","onAnimationComplete","runners","animateFn","flagMap","animationFactory","$$registeredAnimations","$$AnimateJsDriverProvider","$$animateJs","prepareAnimation","endFnFactory","NG_ANIMATE_ATTR_NAME","NG_ANIMATE_PIN_DATA","$$AnimateQueueProvider","skip","getEventData","hasMatchingClasses","newClassString","currentClassString","currentClassMap","classString","makeTruthyCssClassMap","isAllowed","ruleType","previousAnimation","hasAnimationClasses","nA","nR","cA","cR","$$rAF","$$Map","$$animation","$templateRequest","$$isDocumentHidden","activeAnimationsLookup","disabledElementsLookup","animationsEnabled","removeFromDisabledElementsLookup","delete","deregisterWatch","$watch","totalPendingRequests","$$postDigest","callbackRegistry","customFilter","classNameFilter","returnTrue","isAnimatableByFilter","isAnimatableClassName","normalizeAnimationDetails","Node","compareDocumentPosition","filterFromRegistry","matchContainer","matchCallback","containerNode","cleanupEventListeners","$animate","entries","pin","originalElement","postDigestCalled","runInNextPostDigestOrNow","documentHidden","skipAnimations","existingAnimation","hasExistingAnimation","animateChildren","bodyNodeDetected","rootNodeDetected","parentAnimationDetected","elementDisabled","parentHost","parentNodeDisabled","areAnimationsAllowed","notifyProgress","closeChildAnimations","applyGeneratedPreparationClasses","isValidAnimation","clearElementAnimationState","counter","markElementAnimationState","animationCancelled","realRunner","callbacks","targetParentNode","findCallbacks","progress","clearGeneratedClasses","queueAnimation","argCount","hasElement","oldValue","$$AnimationProvider","NG_ANIMATE_REF_ATTR","RUNNER_STORAGE_KEY","PREPARE_CLASSES_KEY","getRunner","animationQueue","tempClasses","setRunner","beforeStart","prepareClassName","handleDestroyedElement","groupedAnimations","preparedAnimations","refLookup","enterOrMove","anchorNodes","getAnchorNodes","animationID","usedIndicesLookup","anchorGroups","lookupKey","cssClassesIntersection","indexKey","groupAnimations","toBeSortedAnimations","animationEntry","extraClasses","domNode","startAnimationFn","closeFn","operation","driverName","driver","invokeFirstDriver","animationRunner","newRunner","updateAnimationRunners","finalAnimations","tree","lookup","processNode","remainingLevelEntries","nextLevelEntries","childEntry","flatten","processed","parentEntry","elementNode","sortAnimations","innerArray","aa","removeRunner","angularVersion","directive","restrict","transclude","terminal","$element","ctrl","$transclude","previousElement","previousScope","$watchCollection","ngAnimateSwap","leave","$destroy","childScope","scheduler","tasks","nextTick","provider","KEY","parentCounter","total","ARIA_DISABLE_ATTR","ngAriaModule","ariaChecked","ariaReadonly","ariaDisabled","ariaRequired","ariaInvalid","ariaValue","tabindex","bindKeydown","bindRoleForClick","watchExpr","attrName","ariaAttr","nativeAriaNodeNames","negate","ariaCamelName","isNodeOneOf","boolVal","newConfig","$$watchExpr","nodeTypeArray","$aria","shouldAttachAttr","normalizedAttr","allowNonAriaNodes","shouldAttachRole","require","getShape","ngModel","needsTabIndex","ngAriaWatchModelValue","$modelValue","newVal","$viewValue","$isEmpty","needsAriaValuemin","needsAriaValuemax","needsAriaValuenow","$validators","$invalid","ngMessages","$parse","ngClick","ngKeydown","ngKeypress","ngKeyup","keyCode","which","$apply","$event","DetectNgTouch","$log","warn","MdCoreConfigure","$provide","$mdThemingProvider","rAFDecorator","qDecorator","primaryPalette","accentPalette","warnPalette","backgroundPalette","$delegate","throttle","queuedArgs","alreadyQueued","queueCb","$inject","MdAutofocusDirective","pre","attrExp","mdAutoFocus","mdAutofocus","mdSidenavFocus","updateExpression","toggleClass","rgbaToHex","hexToRgba","hex","dig","rgbToRgba","rgbaToRgb","prefixTestEl","vendorPrefix","testElement","vendorRegex","getVendorPrefix","isWebkit","SPECIAL_CHARS_REGEXP","vendorProperty","ucPrefix","letter","lcPrefix","hasStyleProperty","isInputKey","isNumPadKey","isMetaKey","isFnLockKey","isNavigationKey","kc","KEY_CODE","SPACE","ENTER","UP_ARROW","DOWN_ARROW","hasModifierKey","ELEMENT_MAX_PIXELS","BEFORE_NG_ARIA","COMMA","SEMICOLON","ESCAPE","PAGE_UP","PAGE_DOWN","END","HOME","LEFT_ARROW","RIGHT_ARROW","TAB","BACKSPACE","DELETE","CSS","TRANSITIONEND","ANIMATIONEND","TRANSFORM","TRANSFORM_ORIGIN","TRANSITION_DURATION","ANIMATION_PLAY_STATE","ANIMATION_DURATION","ANIMATION_NAME","ANIMATION_TIMING","ANIMATION_DIRECTION","MEDIA","MEDIA_PRIORITY","MdIterator","reloop","trueFn","inRange","itemAt","findBy","findSubsequentItem","hasPrevious","hasNext","backwards","limit","curIndex","nextIndex","foundItem","iterator","mdMediaFactory","$mdConstant","queries","mqls","results","normalizeCache","$mdMedia","getResponsiveAttribute","mediaName","normalizedName","getNormalizedName","getQuery","watchResponsiveAttributes","attrNames","watchFn","unwatchFns","validated","onQueryChange","media","$evalAsync","MdPrefixer","initialAttributes","buildSelector","PREFIXES","_buildSelector","_buildList","buildList","_getNativeElement","prefixedAttrs","prefixedAttribute","prefixer","UtilFactory","isIos","isAndroid","nextUniqueId","vendor","opera","$compile","$$mdAnimate","startSymbol","endSymbol","usesStandardSymbols","hasComputedStyle","expectedVal","computedStyles","validateCssValue","hasPx","hasPercent","$mdUtil","dom","getModelOption","ngModelCtrl","optionName","$options","getOption","bidi","lValue","rValue","ltr","bidiProperty","lProperty","rProperty","isOffsetRect","getNode","nodeRect","offsetRect","nodesToArray","getViewportTop","disableScrollAround","_count","_viewPortTop","scrollY","findFocusTarget","containerEl","attributeVal","elToFocus","AUTO_FOCUS","scanForFocusable","elFound","it","_restoreScroll","restoreBody","prevDocumentStyle","cssText","prevBodyStyle","viewportTop","hasVerticalScrollbar","scrollElement","disableBodyScroll","restoreElement","elementToDisable","scrollMaskOptions","scrollMask","wrappedElementToDisable","disableScrollMask","disableElementScroll","enableScrolling","restoreFn","floatingScrollbars","tempNode","childNodes","forceFocus","focusOnClick","$focus","stopImmediatePropagation","newEvent","createEvent","initMouseEvent","$material","dispatchEvent","createBackdrop","supplant","template","fakeNgModel","$fake","$setTouched","$setViewValue","$render","$viewChangeListeners","$parsers","$formatters","invokeApply","recent","valueOnUse","getter","nextUid","disconnectScope","$root","$$destroyed","$parent","$$disconnected","$$childHead","$$nextSibling","$$childTail","$$prevSibling","reconnectScope","getSiblings","upperCasedTagName","sibling","getClosest","validateWith","onlyParent","elementContains","extractElementByName","scanDeep","warnNotFound","scanTree","scanLevel","numChild","scanChildren","outerHTML","initOptionalProperties","$$isolateBindings","binding","attrIsDefined","digest","queueItem","$digest","processTemplate","getParentWithPointerEvents","getNearestContentElement","checkStickySupport","stickyProp","testEl","stickyProps","parseAttributeBoolean","negatedCheck","isParentFormSubmitted","form","controller","$submitted","animateScrollTo","scrollEnd","scrollChange","scrollingDown","scrollChunk","easeDuration","newPosition","currentTime","change","ts","uniq","getInnerHTML","XMLSerializer","serializeToString","getOuterHTML","msie","getTouchAction","vendorPrefixes","getEventPath","sanitize","term","isVisible","hasGeometry","isTabbable","frameElement","getFrameElement","getTabIndexValue","tabIndexValue","isPotentiallyTabbableIOS","isFocusable","isPotentiallyFocusable","isHiddenInput","isNativeFormElement","isAnchorWithHref","hasValidTabIndex","inputType","getClientRects","isInputElement","isAnchorElement","getFirstTabbableElement","tabbableChild","ELEMENT_NODE","getLastTabbableElement","blur","translate3d","transitionInClass","transitionOutClass","reverseTranslate","newFrom","waitTransitionEnd","TIMEOUT","cachedTransitionStyles","finished","calculateTransformValues","originator","origin","bounds","originBnds","copyRect","dialogRect","dialogCenterPt","centerPointFor","originCenterPt","centerX","centerY","calculateZoomToOrigin","buildZoom","calculateSlideToOrigin","buildSlide","toCss","convertToVendor","toTransformCss","addTransition","destination","targetRect","AnimateDomUtils","version","minor","PREFIX","TRANSITION_EVENTS","ANIMATION_EVENTS","$$AnimateRunnerFactory","$$rAFMutex","AnimateRunner","_doneCallbacks","_runInAnimationFrame","getPromise","resolveHandler","rejectHandler","_resolve","response","onProgress","passed","applyClasses","parseMaxTime","cancelLastRAFRequest","hasCompleteStyles","hasCompleteClasses","hasCompleteAnimation","eventFn","cs","tdr","adr","tdy","ady","moreStyles","MdAriaService","showWarnings","expect","expectAsync","expectWithText","getText","expectWithoutText","hasAriaLabel","parentHasAriaLabel","level","performCheck","hasAttr","hasChildNodes","currentStyle","childHasAttribute","defaultValueGetter","walker","createTreeWalker","NodeFilter","SHOW_TEXT","nextNode","isAriaHiddenNode","disableWarnings","MdCompilerProvider","MdCompilerService","$controller","contentElement","_prepareContentElement","_compileTemplate","_fetchContentElement","cleanup","locals","templateUrl","transformTemplate","invoke","$$ngTemplate","contents","_compileElement","ngLinkFn","compileData","$scope","injectLocals","_createController","$onDestroy","$on","bindToController","controllerAs","$onInit","contentEl","createRestoreFn","MdGesture","attachToDocument","pointer","lastPointer","HANDLERS","maxClickDistance","forceSkipClickHijack","disableAllGestures","lastLabelClickPos","isInitialized","MdGestureProvider","$$MdGestureHandler","touchActionProperty","hasJQuery","jQuery","handlerName","registerElement","isHijackingClicks","checkDistanceAndEmit","eventName","maxDistance","onEnd","canFocus","onCancel","registeredParent","pos","onMove","dx","dy","minDistance","cancelMultiplier","onSetup","oldTouchAction","onCleanup","shouldStartDrag","shouldCancel","dragPointer","dispatchDragMove","distanceX","distanceY","makeStartPointer","updatePointerState","isRunning","minVelocity","velocityX","directionX","velocityY","directionY","GestureHandler","$mdGesture","mouseInputHijacker","isIonicTap","isInputEventFromLabelClick","runHandlers","handlerEvent","webkitForce","typesMatch","point","getEventPoint","startPointer","startX","pageX","startY","pageY","srcEvent","eventPointer","eventObj","Event","screenX","screenY","trigger","MouseEvent","bubbles","cancelable","CustomEvent","initCustomEvent","parentTarget","getNearestParent","parentTargetOptions","move","onDestroy","disableAll","skipClickHijack","setMaxClickDistance","clickDistance","MdInteractionService","pointerEvent","bodyElement","isBuffering","bufferTimeout","lastInteractionType","lastInteractionTime","inputHandler","onInputEvent","bufferedInputHandler","onBufferInputEvent","inputEventMap","iePointerMap","initializeEvents","pointerType","getLastInteractionType","isUserInvoked","checkDelay","InterimElementFactory","createInterimElementProvider","interimFactoryName","EXPOSED_METHODS","customMethods","providerConfig","presets","setDefaults","optionsFactory","addPreset","argOption","addMethod","$$interimElement","defaultMethods","interimElementService","publicService","hide","invokeFactory","presetDefaults","presetMethods","Preset","methodName","defaultVal","$mdCompiler","$mdTheming","$exceptionHandler","showPromises","hidePromises","showingInterims","interimElement","InterimElement","hideAction","promiseArray","showAction","finally","deferred","fault","waitForInterim","closeAll","closeElement","closeTo","interim","cancelAction","targetEl","parentEl","filtered","$injector_","callbackFn","fnArguments","preserveScope","cancelAutoHide","$new","isolateScope","onShow","onRemove","configureScopeAndTransitions","rejectAll","onCompiling","skipCompile","compileElement","compiledData","findParent","themable","linkElement","cleanupElement","notifyShowing","onShowing","notifyComplete","startAutoHide","showElement","isCancelled","triggerHandler","hideElement","autoHideTimer","hideDelay","announceRemoving","onRemoving","SUFFIXES","WHITESPACE","FLEX_OPTIONS","LAYOUT_OPTIONS","ALIGNMENT_MAIN_AXIS","ALIGNMENT_CROSS_AXIS","detectDisabledLayouts","disableLayoutDirective","attributeWithoutValue","_$mdUtil_","_$interpolate_","_$log_","linkFn","validateAttributeValue","getNormalizedAttrValue","buildUpdateFn","translateToCssClass","validateAttributeUsage","usage","updateFn","origValue","needsInterpolation","findIn","attrValue","cross","extractAlignAxis","replaceWith","PREFIX_REGEXP","API_WITH_VALUES","API_NO_VALUES","directiveNormalize","mqb","fullName","translateWithValueToCssClass","lastClass","updateClassWithValue","unwatch","attributeWithObserve","disableLayouts","registerLayoutAPI","MdLiveAnnouncer","_$timeout","_liveElement","_createLiveElement","_announceTimeout","announce","politeness","liveEl","metaElements","mapExistingElement","getElementsByName","setMeta","newMeta","getMeta","ComponentRegistry","instances","pendings","notFoundError","handle","msgContext","getInstances","isValidID","$$mdHandle","dfd","MdButtonInkRipple","$mdInkRipple","attach","isMenuItem","fitRipple","dimBackground","optionsForElement","MdCheckboxInkRipple","MdListInkRipple","InkRippleDirective","$mdButtonInkRipple","$mdCheckboxInkRipple","InkRippleCtrl","rippleOptions","$mdColorUtil","mousedown","lastRipple","createContainer","createRipple","setColor","bindEvents","autoCleanup","attrNoDirective","isDisabledGlobally","disableInkRipple","instantiate","_color","_parseColor","inkRipple","colorElement","calculateColor","multiplier","colorUtil","handleMousedown","handleMouseup","handleTouchmove","srcElement","layerRect","layerX","layerY","clearRipples","deleteRipples","fadeInComplete","isRippleAllowed","fit","pow","getSize","DURATION","removeRipple","fadeOutComplete","MdTabInkRipple","detectDisabledThemes","disableTheming","ThemingDirective","ThemableDirective","ThemingProvider","generateAllThemes","themeConfig","PALETTES","GENERATED","DARK_FOREGROUND","LIGHT_FOREGROUND","DARK_SHADOW","DARK_CONTRAST_COLOR","colorToRgbaArray","LIGHT_CONTRAST_COLOR","STRONG_LIGHT_CONTRAST_COLOR","THEME_COLOR_TYPES","LIGHT_DEFAULT_HUES","DARK_DEFAULT_HUES","DARK_CONTRAST_OPACITY","LIGHT_CONTRAST_OPACITY","STRONG_LIGHT_CONTRAST_OPACITY","colorType","defaultDefaultHues","VALID_HUE_VALUES","generateOnDemand","$mdColorPalette","$$mdMetaProvider","ThemingService","themingProvider","THEMES","alwaysWatchTheme","enableBrowserColor","hue","removeChrome","removeWindows","setBrowserColor","definePalette","checkPaletteValid","extendPalette","registerTheme","registerStyles","setNonce","nonceValue","generateThemesOnDemand","onDemand","setDefaultTheme","alwaysWatch","_LIGHT_DEFAULT_HUES","_DARK_DEFAULT_HUES","_PALETTES","_THEMES","_parseRules","parseRules","_rgba","rgba","missingColors","field","inheritFrom","parentTheme","Theme","hues","setDark","isDark","foregroundPalette","foregroundShadow","newDefaultHues","oldDefaultHues","newDefaults","oldDefaults","hueName","defaultHues","paletteName","hueValue","applyTheme","updateThemeClass","$mdTheme","watchTheme","$shouldWatch","isAsyncTheme","clearNameWatcher","registerChanges","oldTheme","generateTheme","defineTheme","primaryHues","accent","accentHues","warnHues","backgroundHues","themeName","registeredCallbacks","mdTheme","hasInterpolation","lastIndexOf","oneTimeBind","getTheme","$setTheme","ALWAYS_WATCH","setParsedTheme","checkValidPalette","themeNameRegex","hueRegex","defaultBgHue","defaultBgContrastType","contrastType","contrast","regexColorType","colorDetails","generatedRules","newRule","matchedColorType","hueType","rulesByType","firstElementChild","themeCss","defaultContrast","contrastDefaultColor","lightColors","contrastLightColors","strongLightColors","contrastStrongLightColors","darkColors","contrastDarkColors","getContrastColor","getOpacityValues","rgbValue","getContrastType","currentRule","openedCurlyBrackets","closedCurlyBrackets","textInQuotes","splitCss","styleStrings","styleContent","clr","grn","blu","rgbArray","MdAutocompleteCtrl","MODE_STANDARD","MODE_VIRTUAL","$attrs","$mdLiveAnnouncer","itemParts","itemsExpr","itemExpr","noBlur","selectedItemWatchers","fetchesInProgress","enableWrapScroll","inputModelCtrl","debouncedOnResize","positionDropdown","oldHidden","scrollContainerElement","reportMessages","ReportType","handleTouchOutsidePanel","getDefaultIndex","updateActiveOption","updateScroll","itemName","activeOption","isRequired","isReadonly","hasNotFound","selectedMessage","noMatchMessage","singleMatchMessage","multipleMatchStartMessage","multipleMatchEndMessage","defaultEscapeOptions","keydown","hasSelection","onListLeave","hasEscapeOption","searchText","clearSelectedItem","clearSearchText","doBlur","shouldHide","evalAttr","isSearchable","isMinLengthMet","handleQuery","listEnter","listLeave","focusInput","focusInputElement","getCurrentDisplayValue","registerSelectedItemWatcher","unregisterSelectedItemWatcher","notFoundVisible","loadingIsVisible","selectedItem","clearButton","disableVirtualRepeat","handleSearchText","previousSelectedItem","updateModelValidators","getDisplayValue","watcher","handleSelectedItemChange","displayValue","itemChange","getItemAsNameVal","$","snapWrap","snap","gatherSnapWrap","ul","li","getAngularElements","detach","autofocus","inputAriaDescribedBy","floatingLabel","inputAriaLabel","inputAriaLabelledBy","requireMatch","$setValidity","dropdownHeight","dropdownItems","hrect","vrect","bot","inputContainer","getVerticalOffset","dropdownPosition","bottomSpace","topSpace","mdFloatingLabel","INPUT_PADDING","dropdown","selectedOption","previousSearchText","textChange","setLoading","forceBlur","getMinLength","minLength","itemText","getItemText","autoselect","hasMatches","option","escapeOptions","isPolite","messages","getCountMessage","containerHeight","scrollTo","optionHeight","updateVirtualScroll","textLength","noCache","handleResults","$eval","isList","onResultsRetrieved","handleAsyncResults","fetchResults","selectOnMatch","isMatching","matchInsensitive","MdAutocomplete","$$mdSvgRegistry","REPEAT_VIRTUAL","REPEAT_MODES","getRepeatMode","modeStr","inputName","inputMinlength","inputMaxlength","menuClass","menuContainerClass","inputClass","inputId","mdMode","tElement","tAttrs","mdClearButton","templateTag","repeatMode","noItemsTemplate","itemTemplate","empty","getItemTemplate","leftover","mdClose","mdMenuContainerClass","isVirtualRepeatDisabled","getContainerClosingTags","MdAutocompleteItemScopeDirective","tAttr","scopeDigesting","newScopeDigesting","$mdAutocompleteCtrl","newScope","watchVariable","alias","MdHighlightCtrl","regex","init","unsafeTermFn","unsafeContentFn","mdHighlightFlags","unregisterFn","contentText","onRender","createRegex","applyRegex","tokens","resolveTokens","tokenEl","appendToken","targetText","startFlag","endFlag","regexTerm","MdHighlight","termExpr","mdHighlightText","unsafeContentExpr","bodyStyles","viewportHeight","resizeHandler","MdBottomSheetDirective","$mdBottomSheet","MdBottomSheetProvider","$$interimElementProvider","bottomSheetDefaults","isLockedOpen","clickOutsideToClose","escapeToClose","cleanupGestures","onDragStart","onDrag","onDragEnd","distanceRemaining","registerGestures","disableBackdrop","disableParentScroll","restoreScroll","rootElementKeyupCallback","MdAnchorDirective","MdButtonDirective","$mdAria","$mdInteraction","isAnchor","ngDisabled","ngHref","ngLink","uiSref","mdCardDirective","MdCheckboxDirective","inputDirective","$set","ctrls","isIndeterminate","expr","htmlAttr","valueOpts","containerCtrl","formCtrl","labelHasLink","isErrorGetter","$touched","setInvalid","skipToggle","viewValue","ngChecked","setIndeterminateState","mdIndeterminate","true","false","submit","click","MdChipCtrl","isEditing","parentController","enableChipEdit","chipKeyDown","chipMouseDoubleClick","getChipContent","chipContents","getElementsByClassName","getContentElement","getChipIndex","goOutOfEditMode","chipIndex","updateChipContents","selectedChip","focusChip","removeChipAndFocusInput","selectNodeContents","range","selection","createTextRange","moveToElementText","createRange","removeAllRanges","addRange","goInEditMode","MdChip","chipsController","chipController","chipContentElement","resetSelectedChip","$applyAsync","shouldFocusLastChip","focusLastChipThenInput","MdChipRemove","removeChip","$$replacedScope","$index","MdChipTransclude","$mdChipsCtrl","$chip","newHtml","mdChipTransclude","MdChipsCtrl","userInputNgModelCtrl","autocompleteCtrl","userInputElement","mdEnableChipEdit","addOnBlur","mdAddOnBlur","containerHint","containerEmptyHint","deleteHint","deleteButtonLabel","chipBuffer","useTransformChip","useOnAdd","useOnRemove","wrapperId","contentIds","ariaTabIndex","chipAppendDelay","deRegister","addedMessage","removedMessage","setupStaticChips","setupInputAria","setupWrapperAria","$destroyFn","removeAttr","staticChips","inputKeydown","getChipBuffer","isDefaultPrevented","selectAndFocusChipSafe","separatorKeys","hasMaxChipsReached","appendChip","resetChipBuffer","updateNgModel","isEditingChip","_isChipObject","chip","isRemovable","readonly","removable","chipKeydown","removeAndSelectAdjacentChip","getPlaceholder","secondaryPlaceholder","selIndex","getAdjacentChipIndex","newChip","transformChip","transformedChip","chipContent","onAdd","useTransformChipExpression","useOnAddExpression","useOnRemoveExpression","useOnSelectExpression","useOnSelect","maxChips","validateModel","$validate","skipValidation","removed","$setDirty","selectChip","configureNgModel","onInputFocus","inputHasFocus","onInputBlur","shouldAddOnBlur","configureInput","inputElement","isTouched","$dirty","isDirty","configureUserInput","scopeApplyFn","configureAutocomplete","isModelValid","$valid","isAutocompleteShowing","contentIdFor","MdChips","templates","chips","userTemplate","chipTemplate","getTemplateByQuery","chipRemoveSelector","chipRemoveTemplate","chipContentsTemplate","chipInputTemplate","controllers","mdChipsCtrl","mdCloseIcon","mdCancel","mdTransformChip","mdOnAdd","mdOnRemove","mdOnSelect","autocompleteEl","compiledStaticChips","chipAppendDelayString","ngChange","MdContactChipsCtrl","setupChipsAria","setupAutocompleteAria","chipsCtrl","autocompleteInput","queryContact","contactQuery","contactName","MdContactChips","contactChipsController","contactImage","contactEmail","contacts","highlightFlags","MdColorsDirective","MdColorsService","STATIC_COLOR_EXPRESSION","colorPalettes","applyThemeColors","colorExpression","rgbColors","hasColorProperty","themeColors","extractColorOptions","hasBackground","parseColor","getThemeColor","expression","hasTheme","rgbValues","extractPalette","extractHue","isTwoWord","scheme","hueNumber","availableThemes","usedTheme","$mdColors","tElem","shouldWatch","rawColorExpression","mdColors","bindOnce","isStatic","hasWatchAttr","mdColorsWatch","shouldColorsWatch","mdThemeController","lastColors","parseColors","cleanElement","unregisterChanges","mdContentDirective","$broadcast","$materialScrollFixed","calendarDirective","dateFilter","monthFilter","_mode","_currentView","CalendarCtrl","MODE_MAP","$$mdDateUtil","$mdDateLocale","$filter","dateUtil","ngDateFilter","createDateAtMidnight","SELECTED_DATE_CLASS","TODAY_CLASS","FOCUSED_DATE_CLASS","displayDate","firstRenderableDate","lastRenderableDate","standaloneMode","handleKeyElement","boundKeyHandler","handleKeyEvent","major","convertedDate","isValidDate","removeLocalTzAndReparseDate","setNgModelValue","timezone","focusDate","$emit","getTimezoneOffset","setCurrentView","previousFocus","cellId","getDateId","cell","changeSelectedDate","selectedDateClass","prevDateCell","dateCell","getActionFromKeyEvent","hideVerticalScrollbar","childCtrl","setWidth","calendarScroller","namespace","updateVirtualRepeat","virtualRepeatResizeListener","$$phase","CalendarMonthCtrl","calendarCtrl","initialize","dateLocale","isMonthTransitionInProgress","cellClickHandler","getTimestampFromNode","headerClickHandler","getMonthDistance","attachScopeListeners","getSelectedMonthIndex","changeDisplayDate","buildWeekHeader","animationPromise","animateDateChange","monthDistance","firstDayOfWeek","shortDays","th","incrementDays","incrementMonths","getFirstDateOfMonth","getLastDateOfMonth","clampDate","mdCalendarMonthBodyDirective","ARROW_ICON","mdTabsArrow","CalendarMonthBodyCtrl","monthCtrl","monthBodyCtrl","arrowIcon","generateContent","focusAfterAppend","buildCalendarForMonth","buildDateCell","opt_date","longDateFormatter","cellText","dates","isDateEnabled","selectionIndicator","isDateWithinRange","buildDateRow","rowNumber","weekNumberFormatter","opt_dateInMonth","firstDayOfMonth","firstDayOfTheWeek","getLocaleDay_","numberOfDaysInMonth","getNumberOfDaysInMonth","monthBody","createDocumentFragment","isFinalMonth","blankCellOffset","monthLabelCell","monthLabelCellContent","monthHeaderFormatter","monthFormatter","monthLabelRow","dayOfWeek","iterationDate","setDate","whitespaceRow","getDay","CalendarYearCtrl","onTimestampSelected","getYearDistance","getFocusedYearIndex","changeDate","CalendarYearBodyCtrl","yearCtrl","yearBodyCtrl","incrementYears","buildCalendarForYear","buildMonthCell","buildBlankCell","firstOfMonth","isSameMonthAndYear","shortMonths","isMonthWithinRange","yearBody","firstRow","labelCell","secondRow","DateLocaleProvider","months","days","formatDate","parseDate","isDateComplete","msgCalendar","msgOpenCalendar","$locale","defaultShortDays","DATETIME_FORMATS","SHORTDAY","defaultFirstRenderableDate","defaultLastRendereableDate","MONTH","SHORTMONTH","DAY","localeTime","toLocaleTimeString","dateString","getDateInNextMonth","getDateInPreviousMonth","isInNextMonth","isInPreviousMonth","getDateMidpoint","d1","d2","getWeekOfMonth","numberOfDays","setDateTimeToMidnight","dateAtMidnight","minDateAtMidnight","maxDateAtMidnight","numberOfYears","boundDate","dateValue","formattedDate","numberOfMonths","dateInTargetMonth","opt_value","datePickerDirective","hiddenIcons","mdHideIcons","inputAriaDescribedby","inputAriaLabelledby","ariaLabelValue","mdPlaceholder","ngModelOptions","calendarButton","mdCalendar","triangleButton","HAS_TRIANGLE_ICON_CLASS","debounceInterval","DatePickerCtrl","mdDatePickerCtrl","mdInputContainer","parentForm","mdNoAsterisk","spacer","setHasPlaceholder","INPUT_CONTAINER_CLASS","HAS_CALENDAR_ICON_CLASS","parentSubmittedWatcher","isSubmitted","updateErrorState","INVALID_CLASS","OPEN_CLASS","CALENDAR_PANE_WIDTH","IS_MOBILE_REGEX","ngInputElement","calendarPane","inputMask","setDisabled","isCalendarOpen","openOnFocus","calendarPaneOpenedFrom","calendarPaneId","bodyClickHandler","handleBodyClick","windowEventName","windowEventHandler","closeCalendarPane","windowBlurHandler","handleWindowBlur","leftMargin","topMargin","detachCalendarPane","mdIsOpen","shouldBeOpen","openCalendarPane","installPropertyInterceptors","attachChangeListeners","attachInteractionListeners","onExternalChange","unshift","updateOn","setModelValue","resizeInputElement","handleInputEvent","keyCodes","setPointerCapture","pointerId","clearErrorState","parsedDate","isInputValid","inputString","attachCalendarPane","elementRect","bodyRect","paneTop","paneLeft","viewportLeft","viewportBottom","viewportRight","scale","inputFocusedOnWindowBlur","resetInputFocused","focusCalendar","getCalendarCtrl","setHasValue","MdDialogDirective","$mdDialog","images","addOverflowClass","MdDialogProvider","topFocusTrap","bottomFocusTrap","removeFocusTrap","MdDialogController","dialogDefaultOptions","advancedDialogOptions","isPrompt","initialValue","keypress","invalidPrompt","hasBackdrop","targetEvent","themeCtrl","themeWatch","newTheme","detectTheming","dialogElement","hasFn","getDomElement","defaultElement","openFrom","originInteraction","captureParentAndFromToElements","dialogContent","existingDialogId","dialogContentId","words","focusHandler","lastFocusableElement","configureAria","showBackdrop","onWindowResize","stretchDialogContainerToViewport","removeListeners","smartClose","keyHandlerFn","sourceElem","mousedownHandler","mouseupHandler","deactivateListeners","removeFn","activateListeners","reverseContainerStretch","dialogEl","buildTranslateToOrigin","translateOptions","fullscreen","animateReversal","reverseAnimate","clearAnimate","dialogPopIn","isHidden","walkDOM","getParents","unlockScreenReader","lockScreenReader","focusOnOpen","mdHtmlContent","htmlContent","mdTextContent","detachAndClean","dialogPopOut","autoWrap","validatedTemplate","ceil","previousStyles","parentTop","MdDividerDirective","MdFabActionsDirective","actionItemButtons","hasNgRepeat","MdFabController","closeTimeout","initialAnimationAttempts","parseEvents","closestButton","getClosestTrigger","toggle","getClosestAction","resetActionIndex","currentActionIndex","fireInitialAnimations","disableKeyboard","keyPressed","checkForOutsideClick","closestTrigger","closestActions","doActionNext","doActionPrev","doKeyLeft","doKeyUp","doKeyRight","doKeyDown","doShift","focusAction","getActionsElement","previousActionIndex","eventTypes","newDir","oldDir","setClass","MdFabSpeedDialFlingAnimation","delayDone","runAnimation","triggerElement","variablesElement","startZIndex","webkitTransform","triggerItemHeightOffset","triggerItemWidthOffset","newTranslate","MdFabSpeedDialScaleAnimation","offsetDelay","MdFabToolbarAnimation","backgroundElement","toolbarElement","iconElement","GridListDirective","$mdGridLayout","GridListController","mdOnLayout","layoutDelegate","tilesInvalidated","tileElements","tiles","ele","$$mdDestroyed","tileSpans","col","colCount","getColumnCount","rowMode","getRowMode","rowHeight","getRowHeight","gutter","applyDefaultUnit","lastLayoutProps","tilePositions","rowCount","getGridStyle","ps","getTileStyle","spans","invalidateLayout","unwatchAttrs","layoutIfMediaMatch","watchMedia","exprStr","UNIT","POSITION","DIMENSION","hShare","hGutterShare","hUnit","share","gutterShare","span","vShare","vUnit","whRatio","layoutInvalidated","$timeout_","GridLayoutFactory","defaultAnimator","GridTileAnimator","GridLayout","animateWith","customAnimator","layoutInfo","gridStyles","layoutTime","mapTime","reflowTime","curCol","curRow","spaceTracker","tracker","newSpaceTracker","reserveSpace","nextRow","findEnd","adjustRow","cols","by","calculateGridFor","animatorFn","tileCount","totalTime","GridTileDirective","gridCtrl","invalidateTiles","newIdx","oldIdx","GridTileCaptionDirective","layout","$mdIcon","$sce","lastFontIcon","mdFontIcon","lastFontSet","fontSet","mdFontSet","mdSvgIcon","mdSvgSrc","fontIconChanged","$attr","attrVal","MdIconService","MdIconProvider","defaultViewBoxSize","defaultFontSet","fontSets","ConfigurationItem","viewBoxSize","iconCache","svgCache","urlRegex","dataUrlRegex","Icon","prepare","getIcon","getTrustedUrl","transformClone","loadByURL","cacheIcon","loadByID","loadFromIconSet","cacheElement","cacheSuffix","svgUrlQuerySelector","xlinkHrefValue","newUid","svgUrlAttributes","isIeSvg","innerHTML","isFinite","descendantElem","refItem","updateSvgIdReferences","referencedElement","referencingElement","svgElement","iconConfig","setName","iconSetConfig","iconName","announceIdNotFound","msg","atob","loadByDataUrl","statusText","loadByHttpUrl","viewbox","iconSet","defaultIconSet","defaultIconSize","iconSize","mdInputContainerDirective","inputTextareaDirective","mdMaxlengthDirective","placeholderDirective","ngMessageDirective","mdSelectOnFocusDirective","mdInputInvalidMessagesAnimation","ngMessagesAnimation","ngMessageAnimation","inputModule","mdNoFloat","mdAutoHide","visibilityDirectives","hasVisibiltyDirective","ContainerCtrl","INPUT_TAGS","LEFT_SELECTORS","selectors","isel","RIGHT_SELECTORS","hasLeftIcon","hasRightIcon","iconNotRemoved","mdIsError","delegateClick","hasPlaceholder","isInvalid","hasLabelAndInput","hasNgModel","errorsSpacer","placeholderText","isAutogrowing","isDragging","startHeight","dragGestureHandler","disableAutogrow","attachResizeHandle","wasHidden","NaN","scopeResizeListener","growTextarea","formattersListener","handleHiddenChange","originalPadding","listenerIndex","setupTextarea","inputCheckValue","ngValue","ngModelPipelineCheckValue","validity","badInput","maxlength","mdMaxlength","charCountEl","ngTrim","isPasswordInput","calculateInputValueLength","renderCharCount","modelValue","elementVal","noFloat","newLabel","preventMouseUp","_mdMocksIncluded","getElement","getMessagesElement","isInsideInputContainer","initMessageElement","DOCUMENT_FRAGMENT_NODE","isInsideFragment","saveSharedServices","showInputMessages","hideInputMessages","showMessage","hideMessage","animators","getInputElement","_$$AnimateRunner_","_$animateCss_","mdListDirective","tEl","mdListItemDirective","proxiedTypes","hasProxiedElement","proxyElement","secondaryItemsWrapper","secondaryItems","itemContainer","ngDblclick","ngAttrUiSref","wrapIn","buttonWrap","moveAttributes","listItemInner","eq","extraAttrs","copiedAttrs","hasClickEvent","secondaryItem","buttonWrapper","wrapSecondaryItem","toggleTypes","labelElement","setupToggleAria","menuEl","xAxisPosition","menuOpenButton","setupProxiedMenu","proxies","firstElement","clickChild","hasClick","noProxies","attachRipple","proxy","mouseActive","proxyOnBlur","clickChildKeypressListener","keypressEvent","clickEvent","forbiddenControls","eventBubblePath","maxPath","isEventFromControl","MdListController","$mdListInkRipple","MenuController","$mdMenu","menuContainer","nestLevel","mdNestLevel","setMenuContainer","isInMenuBar","mdMenuBarCtrl","nestedMenus","onIsOpenChanged","menuContainerId","disableHoverListener","openMenuTimeout","menuItems","deregisterScopeListeners","enableHoverListener","currentlyOpenMenu","isAlreadyOpening","registerContainerProxy","triggerContainerProxy","handleMenuItemHover","handleMenuItemMouseLeave","nestedMenu","focusableTarget","mdMenuCtrl","preserveElement","$mdMenuIsOpen","focusMenuContainer","focusTarget","containerProxy","skipFocus","closeOpts","eventDetails","restoreFocusTo","positionMode","attachment","mdPositionMode","mdOffset","MenuDirective","INVALID_PREFIX","templateElement","triggerEl","isButtonTrigger","nestingDepth","menuContents","MenuProvider","menuDefaultOptions","alreadyOpen","isRemoved","menuContentEl","sanitizeAndConfigure","cleanupResizing","repositionMenu","calculateMenuPosition","backdropParent","cleanupInteraction","onMenuKeyDown","captureClickListener","childrenLen","handled","focusMenuItem","parentMenu","hasAnyAttribute","closestMenu","activateInteraction","cleanupBackdrop","detachElement","didFocus","currentItem","attemptFocus","alignTarget","openMenuNode","openMenuNodeRect","boundryNodeRect","menuStyle","originNode","originNodeRect","alignTargetRect","existingOffsets","firstVisibleChild","rtl","willFitRight","MenuBarController","BOUND_MENU_METHODS","deregisterFns","parentToolbar","getMenus","enableOpenOnHover","rootMenus","disableOpenOnHover","setKeyboardMode","openOnHoverEnabled","handleParentClick","handleMenuHover","scheduleOpenHoveredMenu","menuCtrl","scheduleOpenMenu","pendingMenuOpen","newMenu","newMenuCtrl","currentMenu","wasOpen","openFocusedMenu","focusMenu","menus","focusedIndex","getFocusedMenuIndex","getOpenMenuIndex","menu","getFocusedMenu","focusedEl","openMenu","MenuBarDirective","templateEl","templateAttrs","ariaRole","contentEls","MenuItemController","iconEl","buttonEl","initClickListeners","clearNgAria","handleClick","MenuItemDirective","inMenuBarClass","setDefault","iconTemplate","mdChecked","mdPreventMenuClose","MdNavBar","MdNavBarController","onResize","updateSelectedTabInkBar","navBarAriaLabel","_$scope","_$mdConstant","mdSelectedNavItem","_navBarEl","_inkbar","deregisterTabWatch","newLength","_initTabs","MdNavItem","MdNavItemController","navigationAttribute","buttonTemplate","hasNavClick","mdNavClick","hasNavHref","mdNavHref","hasNavSref","mdNavSref","hasSrefOpts","srefOpts","mdNavItem","mdNavBar","navButton","onKeydown","_focused","observer","MutationObserver","mutationList","attributeName","attributeFilter","navItemAriaLabel","_$element","_selected","_updateTabs","tabs","_getTabs","sameTab","newIndex","newTab","_getTabByName","oldTab","setSelected","_updateInkBarStyles","_moveFocus","tabEl","getButtonEl","tabWidth","navBarWidth","translate","_getSelectedTab","_findTab","getName","getFocusedTab","startIndex","_findTabReverse","_focusFirstTab","tabToFocus","_isEnabled","_focusLastTab","_focusNextTab","focusedTabIndex","_focusPreviousTab","focusedTab","getNgClassMap","MdPanelService","definePreset","getAllPresets","clearPresets","_presets","FOCUS_TRAP_TEMPLATE","MD_PANEL_HIDDEN","preset","coerceToArray","_defaultConfigOptions","propagateContainerEvents","_wrapTemplate","trapFocus","_$rootElement","_$rootScope","_$injector","_$window","_$mdUtil","_trackedPanels","_groups","MdPanelAnimation","xPosition","MdPanelPosition","yPosition","interceptorTypes","MdPanelRef","closeReasons","absPosition","_$q","_$mdCompiler","_$mdTheming","_$animate","_$mdPanel","_$log","_$$rAF","panelContainer","panelEl","innerWrapper","isAttached","_removeListeners","_topFocusTrap","_bottomFocusTrap","_backdropRef","_interceptors","_compilerCleanup","_restoreCache","_isRTL","_absolute","_relativeToEl","_top","_bottom","_left","_right","_translateX","_translateY","_positions","_actualPosition","_openFrom","_closeTo","_animationClass","_openDuration","_closeDuration","_rawDuration","queryResult","validatePosition","positionMap","positionKeys","positionValues","addUnits","_getPresetByName","trackedPanel","attachTo","panelRef","groupName","addToGroup","newPanelPosition","newPanelAnimation","newPanelGroup","panels","openPanels","maxOpen","Infinity","setGroupMaxOpen","_openCountExceedsMaxOpen","_closeFirstOpenedPanel","origTemplate","_wrapContentElement","outerWrapper","CLOSE","_done","_simpleBind","closeReason","_callInterceptors","onCloseSuccess","onDomAdded","_createBackdrop","_createPanel","_addEventListeners","onDomRemoved","_removeEventListeners","removeFromGroup","onOpenComplete","_animateOpen","_focusOnOpen","_animateClose","_compile","mdPanelRef","_configureTrapFocus","_addStyles","hideAndResolve","_setTheming","_updatePosition","positionConfig","_setPanelPosition","TOP","getTop","BOTTOM","getBottom","LEFT","getLeft","RIGHT","getRight","backdropAnimation","withAnimation","backdropConfig","panelClass","_configureEscapeToClose","_configureClickOutsideToClose","_configureScrollListener","sourceEl","CLICK_OUTSIDE","debouncedUpdatePosition","updateAnimation","animationConfig","animateOpen","animateClose","registerInterceptor","interceptors","removeInterceptor","removeAllInterceptors","interceptor","CENTER","ALIGN_START","ALIGN_END","OFFSET_START","OFFSET_END","ALIGN_TOPS","ALIGN_BOTTOMS","ABOVE","BELOW","viewportMargin","_setPosition","centerHorizontally","centerVertically","relativeTo","addPanelPosition","withOffsetX","withOffsetY","getTransform","_reduceTranslateValues","_setTransform","_isOnscreen","openIndex","closeIndex","parsedValues","getComputedTranslations","getActualPosition","translateFn","translation","translationValue","_calculatePanelPosition","_constrainToViewport","initialTop","initialLeft","viewportWidth","_reverseXPosition","_bidi","panelBounds","panelWidth","panelHeight","targetBounds","targetLeft","targetRight","targetWidth","targetTop","targetBottom","targetHeight","SLIDE","SCALE","FADE","_getPanelAnimationTarget","toSeconds","_getBoundingClientRect","cssClass","_fixBounds","animationOptions","panelTransform","openSlide","openScale","reverseAnimationOptions","closeFrom","closeSlide","closeScale","MdProgressCircularDirective","$mdProgressCircular","$interval","rAF","webkitRequestAnimationFrame","cAF","cancelAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","MODE_DETERMINATE","MODE_INDETERMINATE","DISABLED_CLASS","INDETERMINATE_CLASS","mdDiameter","MdProgressCircularLink","lastDrawFrame","startIndeterminate","endIndeterminate","iterationCount","lastAnimationId","renderCircle","animateFrom","animateTo","changeInValue","diameter","getStroke","easeFn","rotation","dashLimit","renderFrame","getDashOffset","animateIndeterminate","easeFnIndeterminate","durationIndeterminate","startIndeterminateAnimation","cleanupIndeterminateAnimation","$watchGroup","newValues","oldValues","getSvgArc","getDashLength","dimensions","radius","arcRadius","maxArcLength","getSpinnerCircumference","progressSize","progressConfig","linearEase","materialEase","easingPresets","configure","MdProgressLinearDirective","MODE_BUFFER","MODE_QUERY","postLink","lastMode","toVendorCSS","bar1","bar2","animateIndicator","validateMode","percentValue","mdRadioGroupDirective","mdRadioButtonDirective","incrementSelection","PREVIOUS","CURRENT","NEXT","RadioGroupController","_ngModelCtrl","rbRender","_radioButtonRenderFns","setViewValue","getViewValue","selectCurrent","changeSelectedButton","selectNext","selectPrevious","setActiveDescendant","radioId","radioGroupController","setFocus","keyboardEvent","radioButtons","getRadioButtons","increment","CHECKED_CSS","lastChecked","SelectDirective","SelectMenuDirective","OptionDirective","SelectProvider","OptionController","CHECKBOX_SELECTION_INDICATOR","selectNextId","$mdSelect","isMultiple","valueEl","mdContentEl","mdOnOpen","autofillClone","newEl","multipleContent","selectTemplate","stopMdMultipleWatch","selectContainer","selectScope","selectMenuCtrl","untouched","mdSelectCtrl","selectValueElement","disableAsterisk","userDefinedLabelledby","listboxContentElement","initialPlaceholder","selectLabel","stopInvalidWatch","mdContainerClass","findSelectContainer","originalRender","syncSelectValueText","stopPlaceholderObserver","stopRequiredObserver","setSelectValueText","useDefaultText","isSelectLabelFromUser","setIsPlaceholder","mdSelectedText","mdSelectedHtml","getTrustedHtml","isPlaceholder","_mdSelectIsOpen","triggerClose","mdOnClose","labelText","stopSelectedLabelsWatcher","getSelectedLabels","stopMdMultipleObserver","parser","prevVal","selectMenu","setMultipleAttrs","setMultiple","stopDisabledObserver","openSelect","handleKeypress","ariaAttrs","containerId","listboxContentId","shouldHandleKey","optNodeForKeyboardSearch","optionCtrl","deselect","hashKey","refreshViewValue","selectCtrl","loadingAsync","SelectMenuController","clickListener","mouseEvent","optionHashKey","hashGetter","defaultIsEmpty","clearSearchTimeout","optNodes","optText","searchStr","renderMultiple","newSelectedValues","oldSelected","newSelectedHashes","renderSingular","updateOptionSetSizeAndPosition","delayedRender","validateArray","modelBinding","parentAttrs","getId","$$mdSelectId","hashedValue","trackByOption","trackBy","$value","optionKeys","$setPristine","mapFn","selectedOptionEls","rippleContainer","checkboxContainer","addOption","$$rawModelValue","removeOption","prevValHashes","prevValItem","newValItem","newValItemHash","prevValHash","hasDefinedValue","setOptionValue","prevAttempt","oldHashKey","newHashKey","selectDefaultOptions","$$loadingAsyncDone","positionAndFocusMenu","selectMenuElement","selectEl","optionNodes","showDropDown","dropDown","selectMenuController","checkCloseMenu","restoreFocus","focusOption","focusedNode","optNode","focusOptionNode","newOption","optionsArray","prevOption","clickOnScrollbar","mouseOnScrollbar","updates","calculateMenuPositions","activateResizing","nodeToFocus","previousNode","menuController","listboxContentNode","scrollBottom","nodeBottom","destroyListener","mdSelect","announceClosed","centeredNode","selectNode","contentNode","parentRect","spaceAvailable","SELECT_EDGE_MARGIN","selectedNode","optgroupNodes","isScrollable","oldDisplay","calculateScrollable","selectMenuRect","centeredRect","centeredStyle","scrollBuffer","containerRect","isNonUsefulKey","createDirective","targetValue","multiElement","unregister","SidenavService","$mdComponentRegistry","errorMsg","shouldWait","waitForInstance","enableWait","falseFn","rejectFn","addLegacyAPI","SidenavDirective","sidenavCtrl","lastParentOverFlow","disableCloseEvents","triggeringInteractionType","previousContainerStyles","disableScrollTarget","triggeringElement","isLockedOpenParsed","mdIsLockedOpen","ngWindow","mdDisableScrollTarget","isLocked","restorePositioning","focusEl","willOpen","drawerEl","positionStyle","updateContainerPositions","$toggleOpen","onCloseCb","SidenavController","rawId","mdComponentId","hasDataBinding","componentId","SliderDirective","thumbText","thumbContainer","trackContainer","activeTrack","tickContainer","throttledRefreshDimensions","refreshSliderDimensions","mdVertical","discrete","mdDiscrete","invert","mdInvert","updateAll","ngModelRender","updateMin","updateMax","updateStep","updateRound","changeAmount","updateValue","numSteps","tickCanvas","tickCtx","getContext","getSliderDimensions","sliderDimensions","trackTicksStyle","fillStyle","fillRect","redrawTicks","clearRect","clearTicks","closestVal","minMaxValidator","stepValidator","percentToValue","positionToPercent","setSliderPercent","valueToPercent","setSliderFromEvent","debouncedUpdateAll","percent","minValue","fitInputWidthToTextLength","thumbPosition","activeTrackPercent","doSlide","calc","slider","setDisable","initialMaxWidth","stopDisabledWatch","newMaxWidth","MdSticky","browserStickySupport","stickyClone","contentCtrl","$$sticky","debouncedRefreshElements","refreshElements","isScrolling","lastScrollTime","loopScrollEvent","setupAugmentedScrollEvents","isScrollingDown","prevScrollTop","setCurrentItem","refreshPosition","currentScrollTop","setStickyState","amount","translateY","setupSticky","cloneElement","MdSubheaderDirective","$mdSticky","getContent","getDirective","DirectiveFactory","directiveName","$target","MdSwitch","mdCheckboxDirective","checkboxDirective","checkboxLink","disabledGetter","drag","switchContainer","labelContainer","isInverted","decreasePageOffset","currentOffset","firstVisibleTabOffset","canvas","tabOffsets","getTabOffsets","increasePageOffset","firstHiddenTabOffset","getTotalTabsWidth","sum","tabClass","getTabElementIndex","insertTab","getIndex","refreshIndex","updateTabOrder","removeTab","MdTabScroll","mdTabScroll","MdTabsController","$mdTabInkRipple","MdTabsPaginationService","locked","destroyed","defineBooleanAttribute","handleWindowResize","handleStretchTabs","getElements","stretchTabs","shouldPaginate","shouldStretchTabs","updateInkBarStyles","handleCenterTabs","shouldCenterTabs","handleMaxTabWidth","newWidth","oldWidth","dummies","handleShouldPaginate","maxTabWidth","getMaxTabWidth","adjustOffset","selectedIndex","handleHasContent","hasContent","handleOffsetChange","paging","handleFocusIndexChange","oldIndex","redirectFocus","handleSelectedIndexChange","getNearestSafeIndex","lastSelectedIndex","updateHeightFromContent","handleResizeWhenVisible","canSkipClick","focusIndex","noSelectClick","fixOffset","updatePagination","handleInkBar","inkBar","handleDynamicHeight","nextButton","prevButton","centerTabs","noPagination","canvasWidth","calcTabsWidth","containerWidth","incrementIndex","inc","styleTabItemFocus","tabWidthsBefore","tabWidthsIncluding","dynamicHeight","tabContent","contentHeight","tabsHeight","newHeight","currentHeight","fromHeight","toHeight","previousTotalWidth","previousWidthOfTabItems","noInkBar","totalWidth","totalWidthOfTabItems","ink","updateInkBarClassName","lastTab","tabContentPrefix","navigationHint","$mdTabsTemplate","tabData","hasLoaded","proto","isLeft","isRight","shouldRender","updateHasContent","setAriaControls","deltaY","deltaX","nextPage","canPageForward","newOffset","previousPage","canPageBack","focusItem","getFocusedTabId","MdTabs","MdTabsDummyWrapper","mutationCallback","childList","subtree","characterData","MdTabsTemplate","compileScope","enableDisconnect","reconnect","connected","MdToastDirective","$mdToast","MdToastProvider","MdToastController","toastDefaultOptions","activeToastContent","newContent","highlightAction","highlightClasses","highlightClass","actionKey","actionHint","dismissHint","SWIPE_EVENTS","isSmScreen","onSwipe","swipe","openClass","toastClass","toast","verticalPositionDefined","positionClasses","templateRoot","mdToolbarDirective","mdScrollShrink","toolbarHeight","disableScrollShrink","shrinkSpeedFactor","mdShrinkSpeedFactor","debouncedContentScroll","onContentScroll","debouncedUpdateHeight","updateToolbarHeight","onMdContentLoad","newContentEl","enableScrollShrink","hasWhiteFrame","shrinkWithScroll","closestContent","ngShow","ngHide","setupScrollShrink","MdTooltipDirective","$mdPanel","$$mdTooltipRegistry","ENTER_EVENTS","LEAVE_EVENTS","TOOLTIP_DIRECTIONS","mdZIndex","mdDelay","mdVisible","mdAutohide","mdDirection","panelPosition","showTimeout","tooltipId","elementFocusedOnWindowBlur","addAriaLabel","interpolatedText","setVisible","queued","visibleWatcher","onVisibleChanged","panelAnimation","panelConfig","showTooltip","attributeObserver","mutations","mutation","isDisabledMutation","windowScrollEventHandler","windowBlurEventHandler","enterEventHandler","leaveEventHandler","one","mousedownEventHandler","onElementDestroy","configureWatchers","useCapture","globalEventHandler","currentHandler","MdTruncateController","virtualRepeatContainerTemplate","VirtualRepeatContainerController","scrollSize","scrollOffset","repeater","autoShrink","autoShrinkMin","mdAutoShrinkMin","originalSize","offsetSize","mdOffsetSize","oldElementSize","maxElementPixels","mdTopIndex","bindTopIndex","topIndex","scrollToIndex","sizer","offsetter","boundUpdateSize","updateSize","debouncedUpdateSize","jWindow","VirtualRepeatDirective","VirtualRepeatController","mdVirtualRepeat","repeatName","repeatListExpression","extraName","mdExtraName","link_","$browser","mdOnDemand","browserCheckUrlChange","$$checkUrlChange","newStartIndex","newEndIndex","newVisibleEnd","itemSize","mdItemSize","isFirstRender","isVirtualRepeatUpdating_","itemsLength","unwatchItemSize_","blocks","pooledBlocks","cleanupBlocks_","VirtualRepeatModelArrayLike","model","getItemAtIndex","getLength","ForceHeightDirective","mdForceHeight","repeaterCtrl","handleScroll_","isHorizontal","setSize_","dimension","getDimensionName_","unsetSize_","containerUpdated","sizeScroller_","crossDimension","numChildren","sizerChild","autoShrink_","shrinkSize","getItemSize","currentSize","_originalSize","setScrollSize","itemsSize","getScrollOffset","resetScroll","maxSize","numItems","getItemCount","Block","rawRepeatListExpression","sized","repeatListExpression_","block","readItemSize_","getBlock_","poolBlock_","repeatList","virtualList","$$includeIndexes","oldItems","virtualRepeatUpdate_","updateIndexes_","lengthChanged","previousScrollOffset","blockIndex","newStartBlocks","newEndBlocks","updateBlock_","maxIndex","domFragmentFromBlocks_","firstRenderStartIndex","mdStartIndex","new","updateScope_","fragment","containerLength","MdWhiteframeDirective","oldClass","newClass","$updateClass","ngMaterial","full","ngMessageDirectiveFactory","isDefault","ngMessagesCtrl","commentNode","records","staticExp","dynamicExp","messageCtrl","ngMessage","assignRecords","reRender","ngMessageExp","whenExp","$$attachId","getAttachId","ACTIVE_CLASS","INACTIVE_CLASS","latestKey","nextAttachId","renderLater","cachedCollection","findPreviousMessage","prevNode","parentLookup","prevKey","$$ngMessageNode","previousSibling","isAttrTruthy","ngMessagesMultiple","unmatchedMessages","matchedKeys","truthyKeys","messageItem","messageFound","totalMessages","messageUsed","truthy","messageMatched","attachDefault","messageNode","insertMessageNode","removeMessageNode","ngMessagesInclude","replaceElementWithMarker","$$createComment","createComment","lowercase","nodeContains","htmlParser","htmlSanitizeWriter","$sanitizeMinErr","hasBeenInstantiated","svgEnabled","$$sanitizeUri","validElements","svgElements","buf","uri","isImage","enableSvg","addValidElements","htmlElements","addElementsTo","voidElements","htmlVoidElements","addValidAttrs","validAttrs","arrayToMap","$$lowercase","inertBodyElement","getInertBodyElement","mXSSAttempts","attrToMap","chars","getNonDescendant","uriValidator","ignoreCurrentElement","out","blockedElements","lkey","uriAttrs","encodeEntities","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","stringToMap","optionalEndTagBlockElements","optionalEndTagInlineElements","optionalEndTagElements","blockElements","inlineElements","htmlAttrs","svgAttrs","lowercaseKeys","elementsMap","newElements","getInertBodyElement_DOMParser","isDOMParserAvailable","implementation","inertDocument","createHTMLDocument","stripCustomNsAttrs","DOMParser","parseFromString","ii","attrNode","removeAttributeNode","outerText","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","linkyMinErr","attributesFn","addText","addLink","linkAttributes","ng_from_global","ng","hasAnyKey","ng1ViewsBuilder","compKeys","nonCompKeys","allViewKeys","viewsObject","$default","resolveAs","Ng1ViewConfig","getTemplate","makeComponentTemplate","bindings","getController","controllerProvider","providerFn","TemplateFactory","_useHttp","$http","$templateCache","useHttpService","asTemplate","asComponent","fromUrl","templateProvider","fromProvider","componentProvider","fromComponentProvider","headers","Accept","kebob","kebobed","cmpDefs","getBindings","getComponentBindings","resolveName","kebobName","scopeBindings","bindingsObj","StateProvider","getStateHookBuilder","getLocals","$state$","$transition$","Ng1LocationServices","$locationProvider","_urlListeners","_lp","monkeyPatchPathParameterType","pathType","history","newUrl","$location","_runtimeServices","_loc","UrlRouterProvider","injectableHandler","$match","$stateParams","ruleFn","urlRules","mod_init","mod_util","mod_rtr","mod_state","mod_main","$uiRouterProvider","templateFactory","stateProvider","ng1LocationService","getProviderFor","serviceName","$urp","runBlock","$uiRouter","checkStrictDi","watchDigests","urlRouterProvider","$urlMatcherFactory","uiSrefDirective","uiStateDirective","uiSrefActiveDirective","ctx","parseStateRef","paramsOnly","paramExpr","$uiView","inheritedData","processedDef","uiState","uiStateOpts","defaultOpts","uiStateParams","getTypeInfo","isSvg","isForm","clickable","clickHook","getDef","transition_1","ignorePreventDefaultCount_1","events_1","event_1","events_2","event_2","$IsStateFilter","isFilter","$stateful","$IncludedByStateFilter","includesFilter","$ViewDirectiveFill","getControllerAs","getResolveAs","$cfg","resolveCtx","controllerInstance","registerControllerCallbacks","tagRegexp_1","deregisterWatch_1","directiveEl","ctrlInstance","uiSrefActive","unlinkInfoFn","rawDef","$$addStateInfo","uiSrefOpts","inputAttrs","watchDeregFns","activeEqClass","deregisterStatesChangedListener","deregisterOnStartListener","deregisterStateChangeSuccessListener","uiSrefActiveEq","updateAfterTransition","setStatesFromDefinitionObject","statesDefinition","activeClass","addStateForClass","addState","stateParams","stateInfo","splitClasses","getClasses","stateList","allClasses","fuzzyClasses","exactClasses","addClasses","cls","newState","$uiViewScroll","rootData","previousEl","currentEl","currentScope","onloadExp","autoScrollExp","renderer","activeUIView","updateView","fromParentTagConfig","fromParentTag","animEnter","animLeave","$uiViewData","$uiViewAnim","$animEnter","$animLeave","$$animLeave","_viewData_1","cleanupLastView","hasComponentImpl","_uiCanExitId","viewState","hookOptions","uiOnParamsChanged","viewCreationTrans_1","getNodeSchema","toSchema","fromSchema","changedToParams","changedKeys_1","uiCanExit","id_1","cacheProp_1","prevTruthyAnswer_1","ids","useAnchorScroll","$anchorScroll","scrollIntoView","minErrConfig","objectMaxDepth","urlErrorParamsEnabled","errorHandlingConfig","isValidObjectMaxDepth","isBoolean","maxDepth","minErr","ErrorConstructor","errRegExp","paramPrefix","templateArgs","sliceArgs","toDebugString","angularModule","REGEX_STRING_REGEXP","uppercase","getPrototypeOf","uid","isArrayLike","isWindow","isPrimitive","isBlankObject","forEachSorted","reverseParams","iteratorFn","setHashKey","$$hashKey","baseExtend","dst","objs","deep","jj","toInt","isNumberNaN","num","valueFn","hasCustomToString","isError","isScope","isPromiseLike","TYPED_ARRAY_REGEXP","escapeForRegexp","nodeName_","arrayRemove","stackSource","stackDest","copyRecurse","copyElement","needsRecurse","buffer","byteOffset","copied","ArrayBuffer","byteLength","Uint8Array","copyType","simpleCompare","keySet","createMap","csp","ngCspElement","ngCspAttribute","noUnsafeEval","noInlineStyle","jq","name_","ngAttrPrefixes","array1","array2","curryArgs","toJsonReplacer","pretty","ALL_COLONS","timezoneToOffset","requestedTimezoneOffset","addDateMinutes","convertTimezoneToLocal","dateTimezoneOffset","startingTag","elemHtml","NODE_TYPE_TEXT","tryDecodeURIComponent","parseKeyValue","keyValue","splitPoint","encodeUriSegment","encodeUriQuery","pctEncodeSpaces","isAutoBootstrapAllowed","script","currentScript","HTMLScriptElement","SVGScriptElement","getNamedItem","allowAutoBootstrap","bootstrap","modules","doBootstrap","debugInfoEnabled","$compileProvider","createInjector","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","getTestability","SNAKE_CASE_REGEXP","snake_case","bindJQueryFired","UNSAFE_restoreLegacyJqLiteXHTMLReplacement","JQLite","legacyXHTMLReplacement","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","getBlockNodes","blockNodes","endNode","shallowCopy","serializeObject","codeName","expando","jqCache","jqId","_data","DASH_LOWERCASE_REGEXP","MS_HACK_REGEXP","MOUSE_EVENT_MAP","mouseleave","mouseenter","jqLiteMinErr","fnCamelCaseReplace","kebabToCamel","SINGLE_TAG_REGEXP","HTML_REGEXP","TAG_NAME_REGEXP","XHTML_TAG_REGEXP","wrapMap","thead","tr","td","tbody","tfoot","colgroup","wrapMapIE9","wrapMapValueClosing","wrapMapValue","jqLiteIsTextNode","jqLiteAcceptsData","jqLiteBuildFragment","tmp","finalHtml","optgroup","jqLiteContains","argIsString","jqLiteAddNodes","jqLiteReady","jqLiteClone","jqLiteDealoc","onlyDescendants","cleanData","isEmptyObject","removeIfEmptyData","expandoId","ng339","expandoStore","jqLiteOff","unsupported","jqLiteExpandoStore","removeHandler","listenerFns","jqLiteRemoveData","createIfNecessary","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","jqLiteRemoveClass","cssClasses","existingClasses","newClasses","jqLiteAddClass","jqLiteController","jqLiteInheritedData","names","jqLiteEmpty","jqLiteRemove","keepData","readyState","JQLitePrototype","ready","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","ALIASED_ATTR","getBooleanAttrName","booleanAttr","defaultHandlerWrapper","specialMouseHandlerWrapper","related","$$jqLiteProvider","nextUidFn","objType","hasData","cssKebabToCamel","ret","lowercasedName","isBooleanAttr","$dv","arg2","nodeCount","nodeValue","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","isImmediatePropagationStopped","handlerWrapper","specialHandlerWrapper","createEventHandler","addHandler","noEventListener","onFn","replaceNode","replaceChild","contentDocument","wrapNode","newElement","condition","classCondition","extraParameters","dummyEvent","eventFnsCopy","handlerArgs","arg3","unbind","nanKey","NgMapShim","_keys","_values","_lastKey","_lastIndex","_idx","_transformKey","NgMap","$$MapProvider","ARROW_ARG","FN_ARGS","FN_ARG_SPLIT","FN_ARG","STRIP_COMMENTS","$injectorMinErr","stringifyFn","extractArgs","fnText","modulesToLoad","INSTANTIATING","providerSuffix","loadedModules","providerCache","supportObject","instanceCache","decorFn","origProvider","providerInjector","orig$get","origInstance","instanceInjector","createInternalInjector","caller","protoInstanceInjector","runBlocks","loadModules","loadNewModules","mods","delegate","provider_","enforceReturnValue","factoryFn","enforce","moduleFn","_runBlocks","runInvokeQueue","_invokeQueue","_configBlocks","invokeArgs","getService","injectionArgs","$$annotate","$$ngIsClass","isClass","Type","$AnchorScrollProvider","autoScrollingEnabled","disableAutoScrolling","yOffset","getYOffset","elemTop","scrollBy","oldVal","anonFn","underscore","$animateMinErr","prepareAnimateOptions","$$CoreAnimateJsProvider","$$CoreAnimateQueueProvider","postDigestQueue","postDigestElements","classesAdded","updateData","classesRemoved","handleCSSClassChanges","addRemoveClassesPostDigest","$AnimateProvider","filterFn","reservedRegex","domInsert","afterElement","afterNode","addclass","$$AnimateAsyncRunFactoryProvider","waitQueue","waitForTick","$$AnimateRunnerFactoryProvider","$$animateAsyncRun","rafTick","_tick","timeoutTick","$CoreAnimateCssProvider","closed","Browser","$$taskTrackerFactory","pendingDeferIds","taskTracker","isMock","$$completeOutstandingRequest","completeTask","$$incOutstandingRequestCount","incTaskCount","notifyWhenNoOutstandingRequests","notifyWhenNoPendingTasks","cachedState","lastHistoryState","lastBrowserUrl","baseElement","pendingLocation","getCurrentState","cacheState","sameState","urlResolve","sameBase","stripHash","getHash","trimEmptyHash","urlChangeListeners","urlChangeInit","cacheStateAndFireUrlChange","fireStateOrUrlChange","lastCachedState","prevLastHistoryState","onUrlChange","$$applicationDestroyed","taskType","DEFAULT_TASK_TYPE","deferId","$BrowserProvider","$CacheFactoryProvider","caches","cacheFactory","cacheId","stats","capacity","MAX_VALUE","lruHash","freshEnd","staleEnd","lruEntry","removeAll","nextEntry","prevEntry","$TemplateCacheProvider","$cacheFactory","$compileMinErr","_UNINITIALIZED_VALUE","$CompileProvider","$$sanitizeUriProvider","hasDirectives","Suffix","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","makeMap","REQUIRE_PREFIX_REGEXP","EVENT_HANDLER_ATTR_REGEXP","bindingCache","parseIsolateBindings","isController","LOCAL_REGEXP","scopeName","parseDirectiveBindings","registerDirective","directiveFactory","assertValidDirectiveName","directives","getDirectiveRequire","getDirectiveRestrict","$$moduleName","registerComponent","makeInjectable","ddo","identifierForController","aHrefSanitizationTrustedUrlList","imgSrcSanitizationTrustedUrlList","strictComponentBindingsEnabled","TTL","onChangesTtl","commentDirectivesEnabledConfig","commentDirectivesEnabled","cssClassDirectivesEnabledConfig","cssClassDirectivesEnabled","PROP_CONTEXTS","addPropertySecurityContext","elementName","propertyName","registerContext","SCE_CONTEXTS","HTML","URL","MEDIA_URL","RESOURCE_URL","onChangesQueue","SIMPLE_ATTR_NAME","specialAttrHolder","flushOnChangesQueue","sanitizeSrcset","invokeType","trimmedSrcset","rawUris","nbrUrisWith2parts","innerIdx","getTrustedMediaUrl","lastTuple","Attributes","attributesToCopy","$$element","safeAddClass","$addClass","classVal","$removeClass","oldClasses","tokenDifference","writeAttr","booleanKey","aliasedKey","removeNamedItem","setNamedItem","setSpecialAttr","$$observers","$$inter","denormalizeTemplate","NG_PREFIX_BINDING","MULTI_ELEMENT_DIR_RE","$$addBindingInfo","$$addBindingClass","$$addScopeInfo","isolated","noTemplate","dataName","$$addScopeClass","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","compositeLinkFn","compileNodes","cloneConnectFn","needsNewScope","$linkNode","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","wrapTemplate","controllerName","nodeList","nodeLinkFn","childLinkFn","linkFnFound","nodeLinkFnFound","linkFns","notLiveList","mergeConsecutiveTextNodes","collectDirectives","applyDirectivesToNode","transcludeOnThisElement","templateOnThisElement","stableNodeList","nodeListLength","createBoundTranscludeFn","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","containingScope","$$transcluded","boundSlots","$$slots","slotName","attrsMap","addDirective","nName","ngPrefixMatch","nAttrs","multiElementMatch","attrStartName","attrEndName","isNgAttr","isNgProp","isNgEvent","directiveIsMultiElement","addPropertyDirective","addEventDirective","addAttrInterpolateDirective","animVal","interpolateFn","templateNode","templateNodeParent","hasCompileParent","addTextInterpolateDirective","collectCommentDirectives","byPriority","groupScan","attrStart","attrEnd","depth","groupElementsLinkFnWrapper","compilationGenerator","eager","compiled","compileNode","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","$template","directiveValue","terminalPriority","newScopeDirective","controllerDirectives","newIsolateScopeDirective","templateDirective","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","hasElementTranscludeDirective","$compileNode","replaceDirective","childTranscludeFn","didScanForMultipleTransclusion","mightHaveMultipleTransclusionError","$$start","$$end","assertNoDuplicate","$$tlb","candidateDirective","scanningIndex","slotMap","filledSlots","elementSelector","slotCompileNodes","$$isolateScope","$$newScope","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectiveScope","mergeTemplateAttributes","compileTemplateUrl","$$originalDirective","addLinkFns","cloneAndAnnotateFn","linkNode","controllerScope","elementControllers","scopeBindingInfo","cloneAttachFn","scopeToChild","slotTranscludeFn","isSlotFilled","controllerKey","setupControllers","initializeDirectiveBindings","removeWatches","controllerDirective","$$bindings","bindingInfo","getControllers","$onChanges","initialChanges","$doCheck","invokeLinkFn","$postLink","inheritType","tDirectives","startAttrName","endAttrName","srcAttr","dstAttr","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","linkQueue","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","tempTemplateAttrs","childBoundTranscludeFn","beforeTemplateLinkNode","linkRootElement","ignoreChildLinkFn","previousDirective","wrapModuleNameIfDefined","moduleName","sanitizeSrcsetPropertyValue","trustedContext","propNormalizedName","getTrustedPropContext","sanitizer","getTrusted","ngPropGetter","ngPropWatch","applyPropValue","createEventDirective","attrNormalizedName","getTrustedAttrContext","mustHaveExpression","allOrNothing","$$scope","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","annotation","strictBindingsCheck","removeWatchCollection","recordChanges","currentValue","previousValue","triggerOnChangesHook","SimpleChange","lastValue","parentGet","parentSet","removeWatch","parentValueWatch","parentValue","isLiteral","isFirstChange","str1","str2","tokens1","tokens2","outer","jqNodes","$controllerMinErr","CNTRL_REG","ident","$ControllerProvider","later","bindFnToScope","controllerPrototype","addIdentifier","$DocumentProvider","$$IsDocumentHiddenProvider","changeListener","$ExceptionHandlerProvider","exception","cause","$$ForceReflowProvider","CONTENT_TYPE_APPLICATION_JSON","APPLICATION_JSON","JSON_START","JSON_ENDS","JSON_PROTECTION_PREFIX","$httpMinErr","serializeValue","$HttpParamSerializerProvider","$HttpParamSerializerJQLikeProvider","toSerialize","topLevel","defaultHttpResponseTransform","tempData","contentType","hasJsonContentType","jsonStart","parseHeaders","fillInParsed","headerVal","headerKey","headersGetter","headersObj","transformData","isSuccess","$HttpProvider","transformResponse","transformRequest","isBlob","isFormData","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","jsonpCallbackParam","useApplyAsync","interceptorFactories","xsrfTrustedOrigins","origins","$httpBackend","$$cookieReader","defaultCache","reversedInterceptors","interceptorFactory","parsedAllowedOriginUrls","urlIsAllowedOrigin","originUrl","requestUrl","parsedUrl","urlsAreSameOrigin","requestConfig","defHeaderName","lowercaseDefHeaderName","reqHeaderName","defHeaders","reqHeaders","defaultHeadersIteration","headerContent","processedHeaders","headerFn","header","executeHeaderFns","mergeHeaders","requestInterceptors","responseInterceptors","request","requestError","responseError","chainInterceptors","reqData","withCredentials","cachedResp","isJsonp","getTrustedResourceUrl","serializedParams","buildUrl","cbKey","sanitizeJsonpCallbackParam","pendingRequests","removePendingReq","resolvePromiseWithResult","resolvePromise","xsrfValue","headersString","xhrStatus","resolveHttpPromise","responseType","createApplyHandlers","eventHandlers","uploadEventHandlers","applyHandlers","callEventHandler","sendReq","thenFn","resp","createShortMethods","createShortMethodsWithData","$xhrFactoryProvider","XMLHttpRequest","$HttpBackendProvider","$jsonpCallbacks","$xhrFactory","createXhr","$browserDefer","rawDocument","callbackPath","createCallback","jsonpDone","wasCalled","jsonpReq","getResponse","completeRequest","removeCallback","xhr","abortedByTimeout","setRequestHeader","responseText","getAllResponseHeaders","ontimeout","onabort","upload","send","timeoutRequest","$$timeoutId","createHttpBackend","$interpolateMinErr","$InterpolateProvider","startSymbolLength","endSymbolLength","escapedStartRegexp","escape","escapedEndRegexp","ch","unescapeText","constantWatchDelegate","objectEquality","constantInterp","contextAllowsConcatenation","unescapedText","exp","$$watchDelegate","parseFns","singleExpression","expressionPositions","interr","compute","throwNoconcat","currValue","$intervalMinErr","$IntervalProvider","$$intervalFactory","intervals","clearIntervalFn","tick","$$intervalId","markQExceptionHandled","$$IntervalFactoryProvider","$$q","setIntervalFn","hasParams","iteration","skipApply","$jsonpCallbacksProvider","callbackMap","callbackId","$$counter","called","PATH_MATCH","DEFAULT_PORTS","$locationMinErr","parseAbsoluteUrl","absoluteUrl","locationObj","$$protocol","$$host","$$port","DOUBLE_SLASH_REGEX","parseAppUrl","prefixed","$$path","decodePath","$$search","$$hash","startsWith","stripBaseUrl","LocationHtml5Url","appBase","appBaseNoFile","$$html5","$$parse","pathUrl","$$compose","$$normalizeUrl","$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","withoutHashUrl","withoutBaseUrl","firstPathSegmentMatch","windowsFilePathExp","removeWindowsDriveName","LocationHashbangInHtml5Url","locationPrototype","$$absUrl","$$replace","pathValue","searchValue","hashValue","$$url","arrayValue","encodePath","$$urlUpdatedByLocation","absUrl","locationGetter","locationGetterSetter","preprocess","$LocationProvider","requireBase","rewriteLinks","LocationMode","initialUrl","stripFile","IGNORE_URI_REGEXP","setBrowserUrlWithFallback","oldUrl","oldState","absHref","initializing","afterLocationChange","currentReplace","urlOrStateChanged","$LogProvider","debug","debugEnabled","flag","formatStackTrace","consoleLog","formatError","sourceURL","logFn","Location","$parseMinErr","objectValueOf","getStringValue","OPERATORS","operator","Lexer","lex","readString","readNumber","isIdentifierStart","peekMultichar","readIdent","isWhitespace","ch2","ch3","op1","op2","op3","throwError","codePointAt","isValidIdentifierStart","isIdentifierContinue","isValidIdentifierContinue","cp","cp1","cp2","isExpOperator","colStr","peekCh","quote","rawString","AST","lexer","ifDefined","plusFn","findConstantAndWatchExpressions","ast","parentIsPure","allConstants","argsToWatch","isStatelessFilter","astIsPure","isPure","MemberExpression","computed","UnaryExpression","BinaryExpression","CallExpression","Program","Literal","toWatch","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","filterName","isStateless","callee","AssignmentExpression","ArrayExpression","ObjectExpression","ThisExpression","LocalsExpression","getInputs","lastExpression","candidate","isAssignable","assignableAST","NGValueParameter","ASTCompiler","ASTInterpreter","Parser","astCompiler","getValueOf","$ParseProvider","identStart","identContinue","literals","addLiteral","literalName","literalValue","setIdentifierFns","identifierStart","identifierContinue","$parseOptions","$$getAst","getAst","interceptorFn","parsedExpression","addWatchDelegate","addInterceptor","expressionInputDirtyCheck","oldValueOfValue","compareObjectIdentity","inputsWatchDelegate","prettyPrintExpression","lastResult","inputExpressions","inputs","oldInputValueOf","newInputValue","oldInputValueOfValues","oldInputValues","oneTimeWatchDelegate","isDone","isAllDefined","$$intercepted","$$interceptor","useInputs","oneTimeWatch","unwatchIfDone","allDefined","oneTime","chainedInterceptor","$$pure","$QProvider","errorOnUnhandledRejections","qFactory","$$QProvider","exceptionHandler","$qMinErr","TypeError","queueSize","checkQueue","Deferred","rejectPromise","notifyPromise","processChecks","toCheck","isStateExceptionHandled","markQStateExceptionHandled","errorMessage","scheduleProcessQueue","processScheduled","$$passToExceptionHandler","processQueue","$$reject","$$resolve","doReject","handleCallback","resolver","callbackOutput","errback","progressBack","onFulfilled","onRejected","$Q","race","pur","q","$$RAFProvider","rafSupported","raf","supported","$RootScopeProvider","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","destroyChildScope","cleanUpScope","$$watchers","Scope","$$suspended","$$listeners","$$listenerCount","$$watchersCount","isolate","$$ChildScope","ChildScope","createChildScopeClass","watchExp","initWatchVal","$$digestWatchIndex","incrementWatchersCount","watchExpressions","changeReactionScheduled","firstRun","shouldCall","watchGroupAction","unwatchFn","$watchCollectionInterceptor","veryOldValue","trackVeryOldValue","changeDetected","changeDetector","internalArray","internalObject","initRun","oldLength","_value","newItem","oldItem","watch","watchers","dirty","logIdx","asyncTask","ttl","asyncQueue","watchLog","beginPhase","flushApplyAsync","asyncQueuePosition","traverseScopesLoop","clearPhase","postDigestQueuePosition","$suspend","$isSuspended","$resume","decrementListenerCount","applyAsyncQueue","namedListeners","indexOfListener","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","$$SanitizeUriProvider","isMediaUrl","normalizedVal","ExpressionStatement","Property","program","expressionStatement","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","multiplicative","unary","arrayDeclaration","selfReferential","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","nextId","filters","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","getHasOwnProperty","nonComputedMember","notNull","member","stringEscapeFn","stringEscapeRegex","rhs","lhs","isConstant","$sceMinErr","JS","UNDERSCORE_LOWERCASE_REGEXP","snakeToCamel","adjustMatchers","matchers","adjustedMatchers","adjustMatcher","$SceDelegateProvider","trustedResourceUrlList","bannedResourceUrlList","htmlSanitizer","matchUrl","baseURI","baseUrlParsingNode","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","trustedValueHolderBase","byType","trustAs","Constructor","maybeTrusted","allowed","isResourceUrlAllowedByPolicy","$SceProvider","$sceDelegate","sce","parseAs","enumValue","lName","$SnifferProvider","eventSupport","hasHistoryPushState","nw","process","chrome","app","runtime","android","boxee","bodyStyle","hasEvent","divElm","$$TaskTrackerFactoryProvider","TaskTracker","taskCounts","taskCallbacks","ALL_TASKS_TYPE","getLastCallback","cbInfo","getLastCallbackForType","decTaskCount","countForType","countForAll","nextCb","getNextCallback","$templateRequestMinErr","$TemplateRequestProvider","httpOptions","handleRequestFn","tpl","ignoreRequestError","$$TestabilityProvider","testability","opt_exactMatch","dataBinding","bindingName","prefixes","$timeoutMinErr","$TimeoutProvider","deferreds","urlParsingNode","ipv6InBrackets","url1","url2","$WindowProvider","$$CookieReader","lastCookies","lastCookieString","safeDecodeURIComponent","cookieArray","cookie","currentCookieString","safeGetCookie","$$CookieReaderProvider","$FilterProvider","suffix","currencyFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","anyPropertyKey","predicateFn","matchAgainstAnyProp","getTypeForFilter","shouldMatchPrimitives","actual","expected","deepCompare","createPredicateFn","dontMatchWholeObject","actualType","expectedType","matchAnyProperty","NUMBER_FORMATS","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","currencySymbolRe","GROUP_SEP","DECIMAL_SEP","groupSep","decimalSep","parsedNumber","isInfinity","isZero","numStr","formattedText","digits","numberOfIntegerDigits","zeros","exponent","MAX_DIGITS","minFrac","fractionLen","roundAt","digit","carry","roundNumber","integerLen","decimals","groups","lgSize","gSize","negPre","negSuf","posPre","posSuf","padNumber","negWrap","neg","dateGetter","dateStrGetter","shortForm","standAlone","getFirstThursdayOfYear","dayOfWeekOnFirst","weekGetter","firstThurs","eraGetter","ERAS","DATE_FORMATS","yyyy","yy","MMMM","MMM","MM","M","LLLL","dd","HH","H","hh","mm","ss","sss","EEEE","EEE","AMPMS","Z","zone","ww","G","GG","GGG","GGGG","ERANAMES","DATE_FORMATS_SPLIT","NUMBER_STRING","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","ms","jsonStringToDate","sliceFn","sortPredicate","reverseOrder","predicates","descending","defaultCompare","compareValues","tieBreaker","predicateValues","objectValue","getPredicateValue","v1","v2","type1","type2","value1","value2","ngDirective","htmlAnchorDirective","xlinkHref","ngAttributeAliasDirectives","defaultLinkFn","ngAttr","ngPattern","nullFormCtrl","$addControl","$getControls","$$renameControl","$removeControl","$setSubmitted","$$setSubmitted","PENDING_CLASS","SUBMITTED_CLASS","FormController","$$controls","$error","$$success","$pending","ngForm","$pristine","$$parentForm","$$animate","setupValidity","$rollbackViewValue","$commitViewValue","newName","oldName","PRISTINE_CLASS","DIRTY_CLASS","$setUntouched","rootForm","addSetValidityMethod","clazz","unset","formDirectiveFactory","isNgForm","formElement","VALID_CLASS","nameAttr","handleFormSubmission","setter","getSetter","formDirective","ngFormDirective","$$classCache","cachedToggleClass","switchValue","toggleValidationCss","validationErrorKey","combinedState","createAndSet","isObjectEmpty","unsetAndCleanup","ISO_DATE_REGEXP","URL_REGEXP","EMAIL_REGEXP","NUMBER_REGEXP","DATE_REGEXP","DATETIMELOCAL_REGEXP","WEEK_REGEXP","MONTH_REGEXP","TIME_REGEXP","PARTIAL_VALIDATION_TYPES","baseInputType","stringBasedInputType","createDateInputType","createDateParser","isoWeek","existingDate","getMilliseconds","parsedMinVal","badInputChecker","numberFormatterParser","ngMin","minVal","parseNumberAttrVal","ngMax","maxVal","parsedMaxVal","ngStep","stepVal","parsedStepVal","isValidForStep","doTrim","supportsRange","$$hasNativeValidators","hasMinAttr","hasMaxAttr","hasStepAttr","setInitialValueAndObserver","htmlAttrName","changeFn","rangeUnderflow","rangeOverflow","elVal","stepMismatch","trueValue","parseConstantExpr","ngTrueValue","falseValue","ngFalseValue","composing","deferListener","origBadInput","origTypeMismatch","typeMismatch","iso","previousDate","part","previousTimezone","isTimeType","parseDateAndConvertTimeZoneToLocal","$$parserName","ngModelMinErr","targetFormat","formatted","parseObservedDateValue","parserName","isNumberInteger","countDecimals","numString","decimalSymbolIndex","stepBase","isNonIntegerValue","isNonIntegerStepBase","isNonIntegerStep","valueDecimals","stepBaseDecimals","stepDecimals","decimalCount","parseFn","hiddenInputBrowserCacheDirective","valueProperty","CONSTANT_VALUE_REGEXP","ngValueDirective","updateElementValue","tplAttr","ngBindDirective","ngBind","ngBindTemplateDirective","ngBindTemplate","ngBindHtmlDirective","ngBindHtmlGetter","ngBindHtml","ngBindHtmlWatch","ngChangeDirective","classDirective","indexWatchExpression","oldClassString","classCounts","oldModulo","digestClassCounts","classArray","classesToUpdate","newModulo","toClassString","oldClassArray","newClassArray","toRemoveArray","arrayDifference","toAddArray","toRemoveString","toAddString","updateClasses","classValue","ngClassDirective","ngClassOddDirective","ngClassEvenDirective","ngCloakDirective","ngControllerDirective","ngEventDirectives","forceAsyncEvents","forceAsync","ngIfDirective","previousElements","ngIf","ngIncludeDirective","srcExp","ngInclude","autoscroll","changeCounter","cleanupLastIncludeContent","afterAnimation","thisChangeId","ngIncludeFillContentDirective","ngInitDirective","ngInit","ngListDirective","ngList","trimValues","UNTOUCHED_CLASS","TOUCHED_CLASS","EMPTY_CLASS","NOT_EMPTY_CLASS","NgModelController","$asyncValidators","$untouched","defaultModelOptions","$$updateEvents","$$updateEventHandler","$$parsedNgModel","$$parsedNgModelAssign","$$ngModelGet","$$ngModelSet","$$pendingDebounce","$$parserValid","$$currentValidationRunId","$$rootScope","$$attr","$$timeout","$$exceptionHandler","$$setModelValue","$$initGetterSetters","invokeModelGetter","invokeModelSetter","$$$p","$$updateEmptyClasses","$$lastCommittedViewValue","prevValid","prevModelValue","allowInvalid","that","$$runValidators","allValid","$$writeModelToScope","validatorPromises","syncValidatorsValid","errorKey","localValidationRunId","setValidity","validationDone","$$parseAndValidate","writeToModelIfNeeded","$$debounceViewValueCommit","debounceDelay","$overrideModelOptions","createChild","$$setUpdateOnEvents","$processModelValue","$$format","formatters","ngModelDirective","modelCtrl","optionsCtrl","setTouched","DEFAULT_REGEXP","ModelOptions","$$options","inheritAll","updateOnDefault","getterSetter","ngModelOptionsDirective","NgModelOptionsController","$$attrs","parentOptions","parentCtrl","modelOptionsDefinition","ngNonBindableDirective","ngOptionsMinErr","NG_OPTIONS_REGEXP","ngOptionsDirective","optionTemplate","optGroupTemplate","selectElement","registerOption","hasEmptyOption","emptyOption","providedEmptyOption","ngOptions","optionsExp","valueName","keyName","selectAs","viewValueFn","trackByFn","getTrackByValueFn","getTrackByValue","displayFn","groupByFn","disableWhenFn","valuesFn","Option","selectValue","getOptionValuesKeys","optionValues","optionValuesKeys","itemKey","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","parseOptionsExpression","listFragment","addOptionElement","optionElement","updateOptionElement","getAndUpdateSelectedOption","generateUnknownOptionValue","writeValue","selectedOptions","readValue","selectedValues","selections","removeUnknownOption","selectUnknownOrEmptyOption","unselectEmptyOption","optionScope","optionEl","needsRerender","$isEmptyOptionSelected","groupElementMap","groupElement","nextValue","ngPluralizeDirective","BRACE","IS_WHEN","lastCount","numberExp","whensExpFns","braceReplacement","watchRemover","updateElementText","newText","tmpMatch","whenKey","countIsNaN","pluralCat","whenExpFn","ngRefMinErr","ngRefDirective","ngRef","ngRefRead","ngRepeatDirective","NG_REMOVED","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","getBlockStart","getBlockEnd","trackByIdArrayFn","trackByIdObjFn","ngRepeat","ngRepeatEndComment","aliasAs","trackByExp","trackByIdExpFn","hashFnLocals","trackByExpGetter","lastBlockMap","collectionLength","trackById","trackByIdFn","collectionKeys","nextBlockOrder","nextBlockMap","blockKey","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","ngShowDirective","ngHideDirective","ngStyleDirective","ngStyle","newStyles","oldStyles","ngSwitchDirective","cases","ngSwitchController","ngSwitch","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","selectedTransclude","caseElement","selectedScope","ngSwitchWhenDirective","ngSwitchWhen","ngSwitchWhenSeparator","whenCase","ngSwitchDefaultDirective","ngTranscludeMinErr","ngTranscludeDirective","fallbackLinkFn","ngTransclude","ngTranscludeSlot","useFallbackContent","notWhitespace","scriptDirective","noopNgModelController","setOptionSelectedStatus","SelectController","optionsMap","unknownOption","renderUnknownOption","unknownVal","updateUnknownOption","selectEmptyOption","realVal","hasOption","currentlySelectedOption","hashedVal","scheduleRender","$hasEmptyOption","$isUnknownOptionSelected","renderScheduled","updateScheduled","scheduleViewValueUpdate","renderAfter","optionAttrs","interpolateValueFn","interpolateTextFn","removal","previouslySelected","removeValue","selectDirective","shouldBeSelected","lastView","lastViewRef","optionDirective","selectCtrlName","requiredDirective","ngRequired","patternDirective","tElm","patternExp","parsePatternAttr","oldRegexp","maxlengthDirective","ngMaxlength","maxlengthParsed","parseLength","minlengthDirective","minlength","ngMinlength","minlengthParsed","intVal","originalCleanData","jqName","elems","bindJQuery","ensure","configFn","invokeQueue","configBlocks","invokeLater","moduleInstance","invokeLaterAndSetModuleName","insertMethod","recipeName","factoryFunction","setupModuleLoader","textarea","ngClass","ngClassEven","ngClassOdd","ngCloak","ngController","ngNonBindable","ngPluralize","ngSwitchDefault","$httpParamSerializer","$httpParamSerializerJQLike","$$testability","publishExternalAPI","opt_precision","vf","getDecimals","getVF","appElement","getNgAttribute","angularInit","$$csp","settle","cookies","buildURL","buildFullPath","isURLSameOrigin","createError","Cancel","onCanceled","requestData","requestHeaders","cancelToken","unsubscribe","signal","auth","username","unescape","Authorization","btoa","fullPath","baseURL","onloadend","responseHeaders","paramsSerializer","onreadystatechange","responseURL","timeoutErrorMessage","transitional","clarifyTimeoutError","isStandardBrowserEnv","onDownloadProgress","onUploadProgress","subscribe","Axios","mergeConfig","axios","createInstance","instanceConfig","CancelToken","isCancel","VERSION","spread","isAxiosError","__CANCEL__","executor","onfulfilled","throwIfRequested","InterceptorManager","dispatchRequest","validators","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","requestInterceptorChain","synchronousRequestInterceptors","runWhen","fulfilled","responseInterceptorChain","getUri","use","eject","isAbsoluteURL","combineURLs","requestedURL","enhanceError","throwIfCancellationRequested","toJSON","description","fileName","lineNumber","columnNumber","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","configValue","validateStatus","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","isArrayBuffer","isBuffer","isStream","isFile","isArrayBufferView","isURLSearchParams","encoder","stringifySafely","strictJSONParsing","maxContentLength","maxBodyLength","thisArg","hashmarkIndex","relativeURL","write","expires","domain","secure","toGMTString","originURL","resolveURL","requestURL","ignoreDuplicateOf","thing","deprecatedWarnings","formatMessage","opt","desc","allowUnknown","FormData","isView","URLSearchParams","product","assignValue","stripBOM","toVal","mix","isCallable","tryToString","isConstructor","wellKnownSymbol","definePropertyModule","UNSCOPABLES","ArrayPrototype","S","unicode","$forEach","STRICT_METHOD","arrayMethodIsStrict","callbackfn","toObject","callWithSafeIterationClosing","isArrayIteratorMethod","lengthOfArrayLike","createProperty","getIterator","getIteratorMethod","arrayLike","O","IS_CONSTRUCTOR","argumentsLength","mapfn","iteratorMethod","toIndexedObject","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","fromIndex","IndexedObject","arraySpeciesCreate","TYPE","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_REJECT","NO_HOLES","specificCreate","boundFunction","findIndex","filterReject","fails","V8_VERSION","SPECIES","METHOD_NAME","foo","aCallable","IS_RIGHT","mergeSort","comparefn","middle","insertionSort","llength","rlength","lindex","rindex","originalArray","C","arraySpeciesConstructor","anObject","iteratorClose","ENTRIES","ITERATOR","SAFE_CLOSING","iteratorWithReturn","SKIP_CLOSING","ITERATION_SUPPORT","TO_STRING_TAG_SUPPORT","classofRaw","TO_STRING_TAG","CORRECT_ARGUMENTS","tryGet","ownKeys","getOwnPropertyDescriptorModule","getOwnPropertyDescriptor","F","IteratorPrototype","createPropertyDescriptor","setToStringTag","Iterators","returnThis","IteratorConstructor","NAME","DESCRIPTORS","bitmap","toPropertyKey","propertyKey","IS_PURE","FunctionName","createIteratorConstructor","createNonEnumerableProperty","redefine","IteratorsCore","PROPER_FUNCTION_NAME","PROPER","CONFIGURABLE_FUNCTION_NAME","CONFIGURABLE","BUGGY_SAFARI_ITERATORS","KEYS","VALUES","Iterable","DEFAULT","IS_SET","FORCED","CurrentIteratorPrototype","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","forced","wrappedWellKnownSymbolModule","EXISTS","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","documentCreateElement","DOMTokenListPrototype","firefox","UA","Pebble","classof","getBuiltIn","Deno","versions","v8","webkit","setGlobal","copyConstructorProperties","isForced","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","noTargetGet","sham","regexpExec","RegExpPrototype","SHAM","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","nativeMethod","forceStringMethod","$exec","flattenIntoArray","original","sourceLen","mapper","elementLen","targetIndex","sourceIndex","FunctionPrototype","getDescriptor","aFunction","getMethod","usingIterator","V","P","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","captures","namedCaptures","tailPos","symbols","globalThis","propertyIsEnumerable","store","inspectSource","NATIVE_WEAK_MAP","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","wmget","wmhas","wmset","metadata","facade","getterFor","construct","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","feature","detection","POLYFILL","NATIVE","MATCH","USE_SYMBOL_AS_UID","$Symbol","Result","stopped","iterable","unboundFunction","iterFn","AS_ENTRIES","IS_ITERATOR","INTERRUPTED","callFn","innerResult","innerError","PrototypeOfArrayIteratorPrototype","arrayIterator","toLength","macrotask","IS_IOS","IS_IOS_PEBBLE","IS_WEBOS_WEBKIT","IS_NODE","WebKitMutationObserver","queueMicrotaskDescriptor","queueMicrotask","task","getOwnPropertySymbols","symbol","PromiseCapability","whitespaces","$parseInt","radix","objectKeys","getOwnPropertySymbolsModule","propertyIsEnumerableModule","$assign","A","B","alphabet","chr","activeXDocument","defineProperties","enumBugKeys","IE_PROTO","EmptyConstructor","scriptTag","NullProtoObjectViaActiveX","temp","parentWindow","NullProtoObject","ActiveXObject","iframeDocument","iframe","contentWindow","Properties","IE8_DOM_DEFINE","$defineProperty","$getOwnPropertyDescriptor","$getOwnPropertyNames","windowNames","getOwnPropertyNames","getWindowNames","internalObjectKeys","CORRECT_PROTOTYPE_GETTER","ObjectPrototype","$propertyIsEnumerable","NASHORN_BUG","aPossiblePrototype","CORRECT_SETTER","pref","getOwnPropertyNamesModule","newPromiseCapability","promiseCapability","InternalStateModule","getInternalState","enforceInternalState","TEMPLATE","unsafe","simple","R","re1","re2","regexpFlags","stickyHelpers","UNSUPPORTED_DOT_ALL","UNSUPPORTED_NCG","nativeExec","nativeReplace","patchedExec","UPDATES_LAST_INDEX_WRONG","UNSUPPORTED_Y","BROKEN_CARET","NPCG_INCLUDED","reCopy","charsAdded","strCopy","ignoreCase","dotAll","$RegExp","CONSTRUCTOR_NAME","TAG","SHARED","copyright","aConstructor","defaultConstructor","toIntegerOrInfinity","requireObjectCoercible","CONVERT_TO_STRING","codeAt","repeat","IS_END","fillString","fillLen","stringFiller","intMaxLength","stringLength","fillStr","RangeError","ltrim","rtrim","channel","setImmediate","clearImmediate","MessageChannel","Dispatch","postMessage","port2","port1","onmessage","importScripts","integer","isSymbol","ordinaryToPrimitive","TO_PRIMITIVE","exoticToPrim","toPrimitive","postfix","NATIVE_SYMBOL","WellKnownSymbolsStore","createWellKnownSymbol","withoutSetter","arrayMethodHasSpeciesSupport","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","IS_CONCAT_SPREADABLE_SUPPORT","SPECIES_SUPPORT","isConcatSpreadable","spreadable","E","$findIndex","addToUnscopables","FIND_INDEX","SKIPS_HOLES","$find","FIND","flatMap","checkCorrectnessOfIteration","$indexOf","nativeIndexOf","NEGATIVE_ZERO","searchElement","defineIterator","ARRAY_ITERATOR","setInternalState","iterated","Arguments","nativeJoin","ES3_STRINGS","$map","$reduce","CHROME_VERSION","HAS_SPECIES_SUPPORT","nativeSlice","fin","internalSort","FF","IE_OR_EDGE","V8","nativeSort","FAILS_ON_UNDEFINED","FAILS_ON_NULL","STABLE_SORT","getSortCompare","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","deleteCount","insertCount","actualDeleteCount","actualStart","FUNCTION_NAME_EXISTS","FunctionPrototypeToString","nameRE","nativeGetOwnPropertyDescriptor","FAILS_ON_PRIMITIVES","getOwnPropertyDescriptors","nativeKeys","NativePromise","speciesConstructor","promiseResolve","real","onFinally","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","redefineAll","setSpecies","anInstance","iterate","microtask","hostReportErrors","newPromiseCapabilityModule","perform","IS_BROWSER","PROMISE","getInternalPromiseState","NativePromisePrototype","PromiseConstructor","PromiseConstructorPrototype","newGenericPromiseCapability","DISPATCH_EVENT","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","UNHANDLED_REJECTION","SUBCLASSING","PROMISE_CONSTRUCTOR_SOURCE","GLOBAL_CORE_JS_PROMISE","FakePromise","INCORRECT_ITERATION","isThenable","isReject","notified","reactions","ok","reaction","fail","onHandleUnhandled","onUnhandled","initEvent","isUnhandled","emit","unwrap","internalReject","internalResolve","capability","$promiseResolve","remaining","alreadyCalled","$toString","TO_STRING","nativeToString","NOT_GENERIC","INCORRECT_NAME","STRING_ITERATOR","$padStart","padStart","fixRegExpWellKnownSymbolLogic","advanceStringIndex","getSubstitution","regExpExec","REPLACE","REPLACE_KEEPS_$0","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","maybeCallNative","UNSAFE_SUBSTITUTE","replaceValue","replacer","rx","functionalReplace","fullUnicode","accumulatedResult","nextSourcePosition","replacerArgs","callRegExpExec","arrayPush","MAX_UINT32","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","SPLIT","nativeSplit","internalSplit","lim","lastLength","lastLastIndex","separatorCopy","splitter","unicodeMatching","$trim","forcedStringTrimMethod","NativeSymbol","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","symbolToString","nativeSymbol","defineWellKnownSymbol","nativeObjectCreate","getOwnPropertyNamesExternal","HIDDEN","$stringify","nativeDefineProperty","nativeGetOwnPropertyNames","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","QObject","USE_SETTER","findChild","setSymbolDescriptor","ObjectPrototypeDescriptor","$defineProperties","$getOwnPropertySymbols","IS_OBJECT_PROTOTYPE","keyFor","sym","useSetter","useSimple","space","$replacer","DOMIterables","handlePrototype","CollectionPrototype","COLLECTION_NAME","ArrayIteratorMethods","ArrayValues","u","weekdays","utcOffset","D","Q","$L","utc","$u","$x","$offset","$d","UTC","$y","$M","$D","$W","$H","$m","$s","$ms","$utils","$g","unix","weekStart","invalidDate","YY","YYYY","monthsShort","DD","weekdaysMin","ddd","weekdaysShort","dddd","SSS","toUTCString","$i","isDayjs","en","yearStart","relativeTime","future","past","LTS","L","LL","LLL","ordinal","afternoon","SS","Do","Y","ZZ","customParseFormat","parseTwoDigitYear","timeZoneName","Intl","DateTimeFormat","hour12","timeZone","formatToParts","tz","toLocaleString","$timezone","offsetName","guess","resolvedOptions","local","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","KNOWN_STATICS","arity","MEMO_STATICS","TYPE_STATICS","getStatics","isMemo","ForwardRef","Memo","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","inheritedComponent","targetStatics","sourceStatics","$$typeof","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Fragment","Lazy","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","maybeNeedQuotes","propIsEnumerable","test1","test2","test3","shouldUseNative","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","secret","getShim","ReactPropTypes","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","exact","checkPropTypes","PropTypes","$channel","$connection","PusherAngular","pusherClient","_assertValidClient","client","connection","channels","channelName","invokeDigest","skipDigest","decoratedCallback","bind_global","allChannels","$members","baseChannel","$pusherClient","_assertValidChannel","members","checkPresenceOrPrivateChannel","baseMembers","_assertValidMembers","me","each","baseConnection","baseClient","_assertValidConnection","installedModules","moduleId","toStringTag","ns","__webpack_require__","INVALID_BYTE","Coder","_paddingCharacter","encodedLength","_encodeByte","maxDecodedLength","decodedLength","_getPaddingLength","paddingLength","op","haveBad","v0","v3","_decodeChar","stdCoder","URLSafeCoder","urlSafeCoder","encodeURLSafe","decodeURLSafe","INVALID_UTF16","INVALID_UTF8","n1","n2","n3","__webpack_exports__","ScriptReceiverFactory","lastId","callbackWrapper","receiver","ScriptReceivers","PROTOCOL","wsPort","wssPort","wsPath","httpHost","httpPort","httpsPort","httpPath","stats_host","authEndpoint","authTransport","activityTimeout","pongTimeout","unavailableTimeout","cluster","cdn_http","cdn_https","dependency_suffix","dependency_loader","DependencyLoader","receivers","createScriptRequest","successCallback","wasSuccessful","getRoot","getDocument","useTLS","DependenciesReceivers","Dependencies","urlStore","baseUrl","urls","authenticationEndpoint","javascriptQuickStart","triggeringClientEvents","encryptedChannelSupport","url_store","urlObj","urlPrefix","BadEventName","_newTarget","RequestTimedOut","TransportPriorityTooLow","TransportClosed","UnsupportedFeature","UnsupportedTransport","UnsupportedStrategy","HTTPAuthError","xhr_auth","socketId","headerName","createXHR","authOptions","composeQuery","b64chars","b64tab","base64_i","cb_utob","cc","cb_encode","ccc","padlen","ord","abstract_timer","Timer","ensureAborted","timers_extends","timers_clearTimeout","timers_clearInterval","OneOffTimer","PeriodicTimer","Util","boundArguments","util","sources","extensions","safeJSONStringify","arrayIndexOf","objectApply","filterObject","encodeParamsObject","derez","nu","$ref","logger_Logger","Logger","globalLog","globalLogWarn","globalLogError","defaultLoggingFunction","core_pusher","logToConsole","logger","jsonp_auth","callbackName","nextAuthCallbackID","auth_callbacks","callback_name","script_request","ScriptRequest","errorString","charset","attachEvent","errorScript","jsonp_request","JSONPRequest","jsonp_timeline","getAgent","sender","createJSONPRequest","getGenericURL","baseScheme","hostTLS","hostNonTLS","getGenericPath","ws","getInitial","http","sockjs","callback_registry","CallbackRegistry","_callbacks","prefixedEventName","removeAllCallbacks","dispatcher","Dispatcher","failThrough","global_callbacks","unbind_global","unbind_all","transport_connection_extends","transport_connection_TransportConnection","TransportConnection","transportConnectionInitializer","timeline","generateUniqueID","handlesActivityChecks","supportsPing","connect","socket","getSocket","changeState","bindListeners","transport","ping","beforeOpen","onopen","buildTimelineMessage","closeEvent","wasClean","unbindListeners","onMessage","onActivity","onclose","onactivity","cid","transport_connection","transports_transport","Transport","isSupported","environment","createConnection","WSTransport","getWebSocketAPI","createWebSocket","httpConfiguration","streamingConfiguration","HTTPFactory","createStreamingSocket","pollingConfiguration","createPollingSocket","xhrConfiguration","isXHRSupported","transports","xhr_streaming","xhr_polling","SockJSTransport","file","SockJS","js_path","ignore_null_origin","ignoreNullOrigin","xdrConfiguration","isXDRSupported","XDRStreamingTransport","XDRPollingTransport","xdr_streaming","xdr_polling","transports_transports","net_info_extends","net_info_Network","NetInfo","isOnline","onLine","assistant_to_the_transport_manager","AssistantToTheTransportManager","minPingDelay","maxPingDelay","pingDelay","openTimestamp","onClosed","reportDeath","lifespan","isAlive","Protocol","decodeMessage","messageEvent","messageData","pusherEventData","pusherEvent","user_id","encodeMessage","processHandshake","activity_timeout","socket_id","getCloseAction","getCloseError","protocol_protocol","connection_extends","connection_connection","Connection","send_event","activity","handleCloseEvent","connection_handshake","Handshake","finish","pusher_authorizer","PusherAuthorizer","getAuthorizers","authorize","authorizers","timeline_sender","TimelineSender","TimelineTransport","channel_extends","channels_channel","Channel","pusher","subscribed","subscriptionPending","subscriptionCancelled","handleEvent","handleSubscriptionSucceededEvent","channel_data","cancelSubscription","reinstateSubscription","private_channel_extends","private_channel_PrivateChannel","PrivateChannel","createAuthorizer","private_channel","Members","setMyID","myID","onSubscription","subscriptionData","presence","addMember","memberData","user_info","removeMember","presence_channel_extends","presence_channel","PresenceChannel","authData","channelData","handleInternalEvent","addedMember","removedMember","utf8","base64","encrypted_channel_extends","encrypted_channel","EncryptedChannel","nacl","sharedSecret","handleEncryptedEvent","ciphertext","cipherText","secretbox","overheadLength","nonceLength","bytes","getDataToEmit","connection_manager_extends","connection_manager","ConnectionManager","usingTLS","errorCallbacks","buildErrorCallbacks","connectionCallbacks","buildConnectionCallbacks","handshakeCallbacks","buildHandshakeCallbacks","Network","getNetwork","netinfo","retryIn","sendActivityCheck","updateStrategy","updateState","startConnecting","setUnavailableTimer","disconnectInternally","isUsingTLS","handshake","handshakeError","abortConnecting","clearRetryTimer","clearUnavailableTimer","abandonConnection","getStrategy","retryTimer","unavailableTimer","stopActivityCheck","activityTimer","pong_timed_out","resetActivityCheck","shouldRetry","setConnection","withErrorEmitted","tls_only","refused","backoff","retry","previousState","newStateDescription","Channels","createEncryptedChannel","createPrivateChannel","createPresenceChannel","createChannel","createChannels","createConnectionManager","createTimelineSender","authorizer","createHandshake","createAssistantToTheTransportManager","transport_manager","TransportManager","livesLeft","lives","getAssistant","sequential_strategy","SequentialStrategy","strategies","loop","failFast","timeoutLimit","minPriority","tryNextStrategy","tryStrategy","forceMinPriority","best_connected_ever_strategy","BestConnectedEverStrategy","callbackBuilder","rs","collections_all","allRunnersFailed","abortRunner","cached_strategy_CachedStrategy","CachedStrategy","storage","getLocalStorage","serializedCache","getTransportCacheKey","flushTransportCache","fetchTransportCache","latency","startTimestamp","storeTransportCache","cached_strategy","delayed_strategy","DelayedStrategy","if_strategy","IfStrategy","trueBranch","falseBranch","first_connected_strategy","FirstConnectedStrategy","testSupportsStrategy","State","http_xdomain_request","getRequest","xdr","XDomainRequest","onprogress","onChunk","abortRequest","http_request_extends","http_request","HTTPRequest","unloader","addUnloadListener","removeUnloadListener","chunk","advanceBuffer","isBufferTooLong","unreadData","endOfLinePosition","autoIncrement","getUniqueURL","randomNumber","TimelineLevel","http_socket","HTTPSocket","session","randomString","getLocation","CONNECTING","openStream","sendRaw","sendHeartbeat","OPEN","createSocketRequest","closeStream","CLOSED","onHeartbeat","stream","getReceiveURL","onFinished","http_streaming_socket","http_polling_socket","http_xhr_request","getXHRAPI","getDefaultStrategy","baseOptions","defineTransport","definedTransports","defineTransportStrategy","wsStrategy","ws_options","wsHost","wss_options","sockjs_options","timeouts","ws_manager","streaming_manager","ws_transport","wss_transport","sockjs_transport","xhr_streaming_transport","xdr_streaming_transport","xhr_polling_transport","xdr_polling_transport","ws_loop","wss_loop","sockjs_loop","streaming_loop","polling_loop","http_loop","http_fallback_loop","Transports","createSocket","createRequest","http_http","WebSocket","MozWebSocket","setup","PusherClass","Pusher","initializeOnDocumentBody","onDocumentBody","getProtocol","ajax","jsonp","localStorage","createXMLHttpRequest","createMicrosoftXHR","createXDR","documentProtocol","detachEvent","timeline_level","timeline_timeline","Timeline","sent","uniqueID","INFO","DEBUG","sendfn","bundle","features","transport_strategy","TransportStrategy","failAttempt","onInitialized","serializedTransport","strategy_builder_Transports","strategy_builder_defineTransport","transportClass","enabledTransports","disabledTransports","strategy_builder_UnsupportedStrategy","getHttpHost","getWebsocketHost","getWebsocketHostFromCluster","shouldUseTLS","forceTLS","getEnableStatsConfig","enableStats","disableStats","pusher_Pusher","app_key","checkAppKey","statsHost","timelineParams","global_emitter","sessionID","getClientFeatures","timelineSender","subscribeAll","internal","isReady","timelineSenderTimer","event_name","channel_name","Runtime","ba","ca","da","ea","fa","ha","ia","ja","ka","acceptsBooleans","attributeNamespace","mustUseProperty","sanitizeURL","removeEmptyString","oa","pa","qa","ma","na","la","setAttributeNS","ra","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","sa","ta","ua","wa","xa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ma","Ka","La","Na","Oa","Pa","prepareStackTrace","Reflect","Qa","_render","Ra","_context","_payload","_init","Sa","Ta","Va","_valueTracker","stopTracking","Ua","Wa","Xa","Ya","_wrapperState","initialChecked","Za","$a","ab","bb","eb","Children","db","fb","defaultSelected","gb","hb","ib","jb","kb","lb","mb","nb","ob","namespaceURI","MSApp","execUnsafeLocalFunction","pb","qb","gridArea","lineClamp","rb","sb","tb","ub","menuitem","area","br","embed","hr","keygen","meta","wbr","vb","wb","xb","correspondingUseElement","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Ob","Pb","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Zb","$b","memoizedState","dehydrated","ac","bc","dc","ec","fc","gc","hc","ic","jc","lc","mc","nc","oc","pc","qc","rc","blockedOn","domEventName","eventSystemFlags","targetContainers","sc","wc","lanePriority","unstable_runWithPriority","xc","yc","zc","Ac","Bc","unstable_scheduleCallback","unstable_NormalPriority","Cc","Dc","Ec","animationend","animationiteration","animationstart","transitionend","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","unstable_now","Rc","Uc","pendingLanes","expiredLanes","suspendedLanes","pingedLanes","Vc","entangledLanes","entanglements","Wc","Xc","Yc","Zc","$c","eventTimes","clz32","bd","cd","LN2","unstable_UserBlockingPriority","ed","fd","gd","hd","uc","jd","kd","ld","nd","od","charCode","pd","qd","rd","_reactName","_targetInst","returnValue","isPropagationStopped","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","isTrusted","ud","vd","Ad","getModifierState","zd","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","Rd","Td","pressure","tangentialPressure","tiltX","tiltY","twist","isPrimary","Vd","targetTouches","Xd","Yd","wheelDeltaX","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","ae","be","ce","de","ee","fe","ge","he","ie","le","ne","oe","pe","qe","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","Be","Ce","De","Ee","Fe","He","Ie","Je","Ke","Le","Me","Ne","HTMLIFrameElement","Oe","Pe","Qe","Re","Se","Te","Ue","anchorNode","focusNode","focusOffset","Ve","We","Xe","Ye","Ze","Yb","$e","af","bf","cf","df","Nb","ef","ff","gf","hf","J","K","je","ke","jf","kf","lf","mf","nf","of","pf","qf","sf","tf","wf","xf","yf","zf","Af","Bf","I","Cf","N","Df","Ef","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Ff","Gf","Hf","If","getChildContext","Jf","__reactInternalMemoizedMergedChildContext","Kf","Lf","Mf","Nf","Of","Pf","unstable_cancelCallback","Qf","unstable_shouldYield","Rf","unstable_requestPaint","Sf","Tf","unstable_getCurrentPriorityLevel","Uf","unstable_ImmediatePriority","Vf","Wf","Xf","unstable_LowPriority","Yf","unstable_IdlePriority","Zf","$f","ag","bg","cg","dg","eg","fg","gg","hg","ig","jg","kg","ReactCurrentBatchConfig","mg","og","pg","qg","rg","_currentValue","sg","childLanes","tg","firstContext","lanes","ug","vg","observedBits","responders","wg","xg","updateQueue","firstBaseUpdate","lastBaseUpdate","effects","yg","zg","eventTime","lane","Ag","Bg","Cg","Dg","Eg","Fg","refs","Gg","Kg","isMounted","_reactInternals","enqueueSetState","Hg","Ig","Jg","enqueueReplaceState","enqueueForceUpdate","Lg","shouldComponentUpdate","isPureReactComponent","Mg","updater","Ng","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","Og","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","componentDidMount","Pg","Qg","_owner","_stringRef","Rg","Sg","lastEffect","nextEffect","firstEffect","Tg","Ug","Vg","Wg","Xg","Yg","Zg","ah","bh","dh","eh","fh","gh","ih","memoizedProps","revealOrder","jh","kh","lh","mh","nh","oh","pendingProps","ph","qh","rh","sh","uh","_workInProgressVersionPrimary","vh","ReactCurrentDispatcher","wh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","baseQueue","Ih","Jh","Kh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","Lh","Mh","_getVersion","_source","mutableReadLanes","Nh","U","useState","getSnapshot","setSnapshot","Oh","Ph","Qh","Rh","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","bi","ci","di","readContext","useCallback","useImperativeHandle","useMemo","useDebugValue","useDeferredValue","useTransition","useMutableSource","useOpaqueIdentifier","unstable_isNewReconciler","uf","ei","ReactCurrentOwner","fi","gi","hi","ji","ki","mi","baseLanes","ni","oi","pi","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","qi","ri","pendingContext","Bi","Di","Ei","si","retryLane","ti","unstable_avoidThisFallback","ui","unstable_expectedLoadTime","vi","wi","xi","yi","zi","isBackwards","rendering","renderingStartTime","tailMode","Ai","Fi","Gi","wasMultiple","onclick","createElementNS","Hi","Ii","W","Ji","Ki","Li","Mi","Ni","Oi","Pi","Qi","Ri","Si","componentDidCatch","Ti","componentStack","Ui","WeakSet","Vi","Wi","Xi","__reactInternalSnapshotBeforeUpdate","Yi","Zi","aj","bj","onCommitFiberUnmount","componentWillUnmount","cj","dj","ej","fj","gj","hj","_reactRootContainer","ij","kj","lj","mj","nj","oj","pj","X","qj","rj","sj","tj","uj","vj","wj","ck","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Sc","Kj","Lj","Mj","callbackNode","expirationTimes","callbackPriority","Tc","Nj","Oj","Pj","Qj","Rj","Sj","Tj","finishedWork","finishedLanes","Uj","timeoutHandle","Wj","Xj","pingCache","Yj","Zj","va","ak","bk","dk","rangeCount","focusedElem","selectionRange","ek","setStart","setEnd","onCommitFiberRoot","fk","gk","ik","isReactComponent","pendingChildren","jk","mutableSourceEagerHydrationData","kk","lk","mk","nk","qk","hydrationOptions","mutableSources","_internalRoot","rk","tk","sk","uk","hk","_calculateChangedBits","unstable_observedBits","unmount","Vj","vk","Events","wk","findFiberByHostInstance","bundleType","rendererPackageName","xk","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","__REACT_DEVTOOLS_GLOBAL_HOOK__","yk","supportsFiber","inject","createPortal","findDOMNode","flushSync","unmountComponentAtNode","unstable_batchedUpdates","unstable_createPortal","unstable_renderSubtreeIntoContainer","checkDCE","isCheckBoxInput","isDateObject","isObjectType","getNodeParentName","isNameInFieldArray","compact","EVENTS","VALIDATION_MODE","INPUT_VALIDATION_RULES","HookFormContext","useFormContext","getProxyFormState","formState","_proxyFormState","localProxyFormState","createGetter","shouldRenderFormState","formStateData","convertToArrayPayload","tearDown","_unsubscribe","useSubscribe","_updateSubscription","subject","updateSubscriptionProps","skipEarlySubscription","useController","shouldUnregister","setInputStateValue","_formValues","_defaultValues","updateFormState","_formState","_localProxyFormState","dirtyFields","touchedFields","isValidating","errors","_name","signalName","currentName","shouldSubscribeByName","_subjects","useFormState","registerProps","updateMounted","_fields","_f","_shouldUnregisterField","_names","_stateFlags","getControllerValue","setCustomValidity","reportValidity","fieldState","Controller","appendErrors","validateAllFieldCriteria","isKey","stringToPath","tempPath","objValue","focusFieldBy","fields","fieldsNames","cloneObject","deepEqual","object1","object2","keys1","keys2","getValidationModes","isOnSubmit","isOnBlur","isOnChange","isOnAll","isOnTouch","isMultipleSelect","isRadioInput","isWeb","live","Subscription","tearDowns","teardown","Subscriber","subscription","Subject","observers","subscriber","updatePath","childObject","baseGet","previousObjRef","objectRef","currentPaths","currentPathsLength","isFileInput","defaultResult","validResult","getCheckboxValue","getFieldValueAs","valueAsNumber","valueAsDate","setValueAs","defaultReturn","getRadioValue","getFieldValue","files","deepMerge","sourceValue","setDirtyFields","defaultValues","setFieldArrayDirtyFields","unsetEmptyArray","isMessage","isRegex","getValidateError","getValueAndMessage","validationData","validateField","shouldUseNativeValidation","setCustomValidty","isRadio","isCheckBox","isRadioOrCheckbox","appendErrorsCurry","getMinMaxMessage","exceedMax","maxLengthMessage","minLengthMessage","maxType","minType","exceedMin","maxOutput","minOutput","valueDate","valueNumber","maxLengthOutput","minLengthOutput","patternValue","validateError","validationResult","reValidateMode","shouldFocusError","isWindowUndefined","createFormControl","delayErrorCallback","submitCount","isSubmitting","isSubmitSuccessful","unMount","validateFields","validationModeBeforeSubmit","validationModeAfterSubmit","shouldDisplayAllAssociatedErrors","criteriaMode","isFieldWatched","isBlurEvent","watchAll","_updateValid","shouldSkipRender","executeResolver","executeBuildInValidation","updateErrors","updateValidAndValue","shouldSkipSetValueAs","setFieldValue","updateTouchAndDirty","fieldValue","isCurrentTouched","isFieldDirty","isPreviousFieldTouched","isPreviousFormDirty","_getDirty","isPreviousFieldDirty","updateFieldArrayDirty","getResolverOptions","shouldOnlyCheckValid","fieldReference","fieldError","getValues","_getWatch","isGlobal","fieldValues","fieldName","selectRef","checkboxRef","radioRef","shouldDirty","shouldTouch","shouldValidate","setValues","fieldKey","shouldSkipValidation","isWatched","parentNodeName","parentField","parentError","previousFieldError","shouldUpdateValid","delayError","updatedFormState","shouldRenderByError","fieldNames","executeResolverValidation","shouldFocus","keepValue","keepError","keepDirty","keepTouched","keepDefaultValue","keepIsValid","fieldRef","isRadioOrCheckboxFunction","_removeUnmounted","_updateFieldArray","shouldSetValues","shouldSetFields","argA","argB","_getFieldArray","handleSubmit","onValid","hasNoPromiseError","isFieldArray","formValues","keepStateOptions","hasUpdatedFormValues","updatedValues","cloneUpdatedValues","keepDefaultValues","keepValues","closest","keepSubmitCount","keepIsSubmitted","keepErrors","clearErrors","setError","useForm","_formControl","FocusManager","_Subscribable","onSubscribe","setDefaultEventListener","setEventListener","_window","focusManager","getLogger","setLogger","newLogger","Mutation","mutationId","mutationCache","failureCount","isPaused","variables","addObserver","removeObserver","retryer","continue","execute","restored","onMutate","executeMutation","onSettled","_this$options$retry","_this2","mutationFn","onFail","onPause","onContinue","retryDelay","_this3","reducer","onMutationUpdate","getDefaultState","NotifyManager","transactions","notifyFn","batchNotifyFn","batch","schedule","batchCalls","setNotifyFunction","setBatchNotifyFunction","notifyManager","OnlineManager","online","setOnline","onOnline","onlineManager","Query","queryKey","queryHash","initialState","scheduleGc","_this$options$cacheTi","cacheTime","setDefaultOptions","clearGcTimeout","gcTimeout","optionalRemove","isFetching","_this$options$isDataE","_this$options","prevData","isDataEqual","structuralSharing","dataUpdatedAt","updatedAt","setStateOptions","_this$retryer","silent","isStale","isInvalidated","getCurrentResult","isStaleByTime","staleTime","_this$retryer2","shouldFetchOnWindowFocus","refetch","_this$retryer3","shouldFetchOnReconnect","isTransportCancelable","revert","cancelRetry","getObserversCount","invalidate","fetch","fetchOptions","_this$options$behavio","_context$fetchOptions","cancelRefetch","queryFn","_this$options$behavio2","_context$fetchOptions2","queryFnContext","pageParam","fetchFn","behavior","onFetch","revertState","fetchMeta","onQueryUpdate","initialData","initialDataUpdatedAt","dataUpdateCount","errorUpdateCount","errorUpdatedAt","fetchFailureCount","_action$meta","_action$dataUpdatedAt","QueryCache","queriesMap","_options$queryHash","defaultQueryOptions","getQueryDefaults","queryInMap","getAll","findAll","_this4","_this5","MutationCache","defaultMutationOptions","mutationKey","getMutationDefaults","resumePausedMutations","pausedMutations","getNextPageParam","pages","QueryClient","queryCache","queryDefaults","mutationDefaults","unsubscribeFocus","unsubscribeOnline","_this$unsubscribeFocu","_this$unsubscribeOnli","fetching","isMutating","getQueryData","_this$queryCache$find","getQueriesData","queryKeyOrFilters","getQueryCache","setQueryData","parsedOptions","defaultedOptions","setQueriesData","getQueryState","_this$queryCache$find2","removeQueries","resetQueries","_parseFilterArgs3","refetchFilters","refetchQueries","cancelQueries","_parseFilterArgs4","_parseFilterArgs4$","cancelOptions","invalidateQueries","_filters$refetchActiv","_filters$refetchInact","_parseFilterArgs5","refetchActive","inactive","refetchInactive","_this6","_parseFilterArgs6","refetchPage","throwOnError","fetchQuery","prefetchQuery","fetchInfiniteQuery","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","fetchMore","isFetchingNextPage","isFetchingPreviousPage","oldPages","oldPageParams","pageParams","newPageParams","buildNewPages","page","fetchPage","manual","queryFnResult","_manual","_param","getPreviousPageParam","shouldFetchFirstPage","_param2","finalPromise","prefetchInfiniteQuery","cancelMutations","_this7","getMutationCache","getDefaultOptions","setQueryDefaults","_this$queryDefaults$f","setMutationDefaults","_this$mutationDefault","_defaulted","defaultQueryObserverOptions","defaultRetryDelay","isCancelable","CancelledError","isCancelledError","Retryer","continueFn","promiseReject","isResolved","outerResolve","outerReject","promiseOrValue","_unused","_config$retry","_config$retryDelay","continueResolve","Subscribable","onUnsubscribe","hasListeners","isServer","functionalUpdate","isValidTimeout","ensureQueryKeyArray","timeUntilStale","parseQueryArgs","isQueryKey","parseMutationArgs","parseFilterArgs","matchQuery","stale","hashQueryKeyByOptions","partialMatchKey","queryStatusFilter","mapQueryStatusFilter","matchMutation","hashQueryKey","queryKeyHashFn","partialDeepEqual","replaceEqualDeep","aSize","bItems","bSize","equalItems","shallowEqualObjects","hasObjectPrototype","prot","sleep","scheduleMicrotask","defaultContext","QueryClientSharingContext","getQueryClientContext","contextSharing","ReactQueryClientContext","useQueryClient","queryClient","QueryClientProvider","_ref$contextSharing","Context","bindMethods","updateResult","mutate","_this$currentMutation","currentMutation","notifyOptions","currentResult","mutateOptions","isLoading","isIdle","shouldThrowError","suspense","_useErrorBoundary","useMutation","mountedRef","obsRef","useErrorBoundary","mutateAsync","QueryObserver","trackedProps","previousSelectError","currentQuery","shouldFetchOnMount","executeFetch","updateTimers","refetchOnReconnect","refetchOnWindowFocus","clearTimers","prevOptions","prevQuery","updateQuery","shouldFetchOptionally","updateStaleTimeout","nextRefetchInterval","computeRefetchInterval","currentRefetchInterval","updateRefetchInterval","getOptimisticResult","createResult","trackResult","trackedResult","typedKey","getNextResult","getCurrentQuery","fetchOptimistic","clearStaleTimeout","staleTimeoutId","_this$options$refetch","refetchInterval","nextInterval","clearRefetchInterval","refetchIntervalId","refetchIntervalInBackground","prevResult","prevResultState","currentResultState","prevResultOptions","currentResultOptions","queryChange","queryInitialState","currentQueryInitialState","prevQueryResult","previousQueryResult","isPreviousData","isPlaceholderData","optimisticResults","fetchOnMount","fetchOptionally","keepPreviousData","selectError","placeholderData","isFetched","isFetchedAfterMount","isRefetching","isLoadingError","isRefetchError","shouldNotifyListeners","notifyOnChangeProps","notifyOnChangePropsExclusions","includedProps","isIncluded","isExcluded","defaultNotifyOptions","_this8","retryOnMount","shouldLoadOnMount","refetchOnMount","shouldRefetchOnMount","_isReset","QueryErrorResetBoundaryContext","clearReset","isReset","useQuery","Observer","errorResetBoundary","useBaseQuery","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","initialStatus","isMounting","appearStatus","updateStatus","nextStatus","cancelNextCallback","getTimeouts","mounting","performEnter","performExit","enterTimeout","safeSetState","onTransitionEnd","nextState","setNextCallback","doesNotHaveTimeoutOrListener","maybeNextCallback","TransitionGroupContext","getChildMapping","isValidElement","getProp","getNextChildMapping","prevChildMapping","nextChildMapping","getValueForKey","nextKeysPending","pendingKeys","childMapping","pendingNextKey","mergeChildMappings","hasPrev","prevChild","isLeaving","ReferenceError","_assertThisInitialized","firstRender","currentChildMapping","__self","__source","jsxs","_status","_result","IsSomeRendererActing","toArray","PureComponent","_currentValue2","_threadCount","Consumer","createFactory","createRef","lazy","Op","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","outerFn","tryLocsList","protoGenerator","Generator","generator","_invoke","GenStateSuspendedStart","GenStateExecuting","GenStateCompleted","doneResult","delegateResult","maybeInvokeDelegate","ContinueSentinel","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isGeneratorFunction","genFun","mark","awrap","iter","skipTempReset","rootRecord","rval","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","unstable_forceFrameRate","sortIndex","expirationTime","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","nn","tn","isFrozen","rn","Proxy","revocable","revoke","deleteProperty","un","produce","produceWithPatches","useProxies","setUseProxies","autoFreeze","setAutoFreeze","createDraft","finishDraft","applyPatches","an","_extends","_setPrototypeOf","_inheritsLoose","subClass","superClass","_objectWithoutPropertiesLoose","excluded","sourceKeys","objectProto","nativeObjectToString","symToStringTag","isOwn","unmasked","freeSelf","reWhitespace","reTrimStart","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","isBinary","nativeMax","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","isInvoking","reIsDeepProp","reIsPlainProp","maskSrcKey","funcToString","reIsHostCtor","reIsNative","Hash","__data__","ListCache","MapCache","memoized","Cache","rePropName","reEscapeChar","subString","symbolProto","baseToString","iteratee"],"sourceRoot":""}