@konstructio/ui 0.1.2-alpha.77 → 0.1.2-alpha.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdditionalOptions-Cx9wU01w.js +37 -0
- package/dist/AlertDialogTrigger-C-NMEoDd.js +146 -0
- package/dist/Breadcrumb-C95aOsYk.js +77 -0
- package/dist/CalendarPanel.css +1 -1
- package/dist/Checkbox-Cn0UWlk8.js +239 -0
- package/dist/Combination-DUTBK_qM.js +486 -0
- package/dist/CommandInput-BKv-EZ7T.js +76 -0
- package/dist/Counter-DtQu_T-D.js +191 -0
- package/dist/DayPicker-CNWQ1Oyd.js +2884 -0
- package/dist/DropdownButton-B2XkEqPt.js +92 -0
- package/dist/FlagSelectorList-C17nmEBM.js +597 -0
- package/dist/ImageUpload-BzXjGZ2w.js +181 -0
- package/dist/Input-GBMxM3Z7.js +188 -0
- package/dist/Loading-DKqxR-oV.js +16 -0
- package/dist/Modal-DbTe8PVX.js +76 -0
- package/dist/Spinner-CyuXAaC8.js +41 -0
- package/dist/StepIndicatorContent-D5z1Ziqg.js +30 -0
- package/dist/Switch-DjbC0A8y.js +136 -0
- package/dist/Toast-C3XjAvtC.js +478 -0
- package/dist/Wrapper-BWSOaT1y.js +1056 -0
- package/dist/Wrapper-CjUokv72.js +110 -0
- package/dist/Wrapper-DEJ-hyar.js +161 -0
- package/dist/assets/icons/components/Accounts.js +21 -23
- package/dist/assets/icons/components/AddChart.js +18 -20
- package/dist/assets/icons/components/AlertOutline.js +18 -20
- package/dist/assets/icons/components/AppRepo.js +18 -20
- package/dist/assets/icons/components/Apps.js +18 -20
- package/dist/assets/icons/components/Archives.js +18 -20
- package/dist/assets/icons/components/ArrowDown.js +18 -20
- package/dist/assets/icons/components/ArrowLeft.js +18 -20
- package/dist/assets/icons/components/ArrowRight.js +17 -19
- package/dist/assets/icons/components/ArrowUp.js +18 -20
- package/dist/assets/icons/components/BarChart.js +28 -24
- package/dist/assets/icons/components/BookOpen.js +22 -20
- package/dist/assets/icons/components/CalendarMonth.js +18 -20
- package/dist/assets/icons/components/Check.js +18 -20
- package/dist/assets/icons/components/CheckCircleFilled.js +28 -25
- package/dist/assets/icons/components/CheckCircleOutline.js +18 -20
- package/dist/assets/icons/components/CheckboxMarkedCircleOutline.js +18 -20
- package/dist/assets/icons/components/ClockAlert.js +18 -20
- package/dist/assets/icons/components/ClockOutline.js +18 -20
- package/dist/assets/icons/components/Close.js +18 -20
- package/dist/assets/icons/components/Cloud.js +12 -17
- package/dist/assets/icons/components/CloudLockOutline.js +18 -20
- package/dist/assets/icons/components/Clusters.js +28 -24
- package/dist/assets/icons/components/CogOutline.js +18 -20
- package/dist/assets/icons/components/Copy.js +18 -20
- package/dist/assets/icons/components/Cpu.js +25 -23
- package/dist/assets/icons/components/Cube.js +18 -20
- package/dist/assets/icons/components/Datacenter.js +18 -20
- package/dist/assets/icons/components/Delete.js +18 -20
- package/dist/assets/icons/components/DollarSign.js +20 -20
- package/dist/assets/icons/components/Download.js +17 -19
- package/dist/assets/icons/components/Edit.js +18 -20
- package/dist/assets/icons/components/Ellipses.js +18 -20
- package/dist/assets/icons/components/Environments.js +20 -20
- package/dist/assets/icons/components/Error.js +18 -20
- package/dist/assets/icons/components/ErrorOutline.js +18 -20
- package/dist/assets/icons/components/Exclamation.js +21 -20
- package/dist/assets/icons/components/Git.js +15 -17
- package/dist/assets/icons/components/GitOpsCatalog.js +25 -23
- package/dist/assets/icons/components/GridView.js +15 -20
- package/dist/assets/icons/components/Help.js +24 -25
- package/dist/assets/icons/components/HideOutline.js +21 -23
- package/dist/assets/icons/components/Home.js +18 -20
- package/dist/assets/icons/components/Home2.js +21 -20
- package/dist/assets/icons/components/Id.js +17 -19
- package/dist/assets/icons/components/InfoCircle.js +28 -25
- package/dist/assets/icons/components/InformationOutline.js +18 -20
- package/dist/assets/icons/components/InvoiceList.js +18 -20
- package/dist/assets/icons/components/Key.js +18 -20
- package/dist/assets/icons/components/LightBulb.js +27 -23
- package/dist/assets/icons/components/Loader.js +18 -20
- package/dist/assets/icons/components/Network.js +18 -20
- package/dist/assets/icons/components/PagesStack.js +24 -25
- package/dist/assets/icons/components/Pageview.js +18 -20
- package/dist/assets/icons/components/People.js +18 -20
- package/dist/assets/icons/components/PhotoLibrary.js +14 -16
- package/dist/assets/icons/components/Pipeline.js +20 -20
- package/dist/assets/icons/components/Plus.js +18 -20
- package/dist/assets/icons/components/PowerSettings.js +18 -20
- package/dist/assets/icons/components/Preview.js +18 -20
- package/dist/assets/icons/components/ReceiptLong.js +15 -20
- package/dist/assets/icons/components/Refresh.js +18 -20
- package/dist/assets/icons/components/ScatterPlot.js +15 -20
- package/dist/assets/icons/components/Search.js +30 -25
- package/dist/assets/icons/components/Server.js +18 -20
- package/dist/assets/icons/components/Start.js +18 -20
- package/dist/assets/icons/components/TabNew.js +34 -24
- package/dist/assets/icons/components/Teams.js +17 -19
- package/dist/assets/icons/components/Upload.js +18 -20
- package/dist/assets/icons/components/Warning.js +18 -20
- package/dist/assets/icons/components/WarningTriangle.js +18 -20
- package/dist/assets/icons/components/X.js +18 -20
- package/dist/assets/icons/components/index.js +82 -82
- package/dist/assets/icons/index.js +88 -88
- package/dist/chevron-down-DgssmYWu.js +8 -0
- package/dist/chevron-left-DRJXef9g.js +8 -0
- package/dist/chevron-right-BooB_b7g.js +8 -0
- package/dist/chevron-up-DuS9MUNr.js +8 -0
- package/dist/chunk-D1xtDmiO.js +31 -0
- package/dist/{clsx-OuTLNxxd.js → clsx-kDhLfUq2.js} +1 -1
- package/dist/components/Alert/Alert.js +58 -79
- package/dist/components/Alert/Alert.variants.js +86 -46
- package/dist/components/AlertDialog/AlertDialog.js +71 -103
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -7
- package/dist/components/AlertDialog/components/index.js +2 -2
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +12 -25
- package/dist/components/Autocomplete/Autocomplete.js +58 -54
- package/dist/components/Autocomplete/Autocomplete.variants.js +26 -2
- package/dist/components/Autocomplete/components/List/List.js +33 -48
- package/dist/components/Autocomplete/components/List/List.variants.js +33 -5
- package/dist/components/Autocomplete/components/index.js +2 -2
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +32 -79
- package/dist/components/Autocomplete/hooks/useNavigationList.js +47 -65
- package/dist/components/Badge/Badge.js +62 -66
- package/dist/components/Badge/Badge.variants.js +69 -16
- package/dist/components/Breadcrumb/Breadcrumb.js +2 -97
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +14 -4
- package/dist/components/Breadcrumb/components/Item/Item.js +33 -33
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +47 -23
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +2 -2
- package/dist/components/Button/Button.js +22 -37
- package/dist/components/Button/Button.variants.js +294 -75
- package/dist/components/ButtonGroup/ButtonGroup.js +84 -101
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +29 -14
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +57 -105
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +60 -27
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +20 -25
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +16 -28
- package/dist/components/ButtonGroup/components/index.js +6 -6
- package/dist/components/ButtonGroup/hooks/index.js +2 -2
- package/dist/components/ButtonGroup/hooks/useButtonGroup.js +49 -64
- package/dist/components/Card/Card.js +22 -34
- package/dist/components/Card/Card.variants.js +26 -13
- package/dist/components/Checkbox/Checkbox.js +2 -343
- package/dist/components/Checkbox/Checkbox.variants.js +50 -13
- package/dist/components/Command/Command.js +29 -46
- package/dist/components/Command/Command.variants.js +46 -3
- package/dist/components/Command/components/Command.js +14 -19
- package/dist/components/Command/components/CommandEmpty.js +9 -10
- package/dist/components/Command/components/CommandGroup.js +10 -18
- package/dist/components/Command/components/CommandInput.js +2 -90
- package/dist/components/Command/components/CommandItem.js +17 -28
- package/dist/components/Command/components/CommandList.js +11 -19
- package/dist/components/Command/components/CommandSeparator.js +11 -19
- package/dist/components/Command/components/CommandShortcut.js +7 -16
- package/dist/components/Command/components/DialogContent.js +20 -35
- package/dist/components/Command/components/DialogOverlay.js +11 -19
- package/dist/components/Command/components/index.js +16 -16
- package/dist/components/Command/contexts/Command.context.js +1 -1
- package/dist/components/Command/contexts/Command.provider.js +15 -23
- package/dist/components/Command/contexts/index.js +2 -2
- package/dist/components/Counter/Counter.js +3 -206
- package/dist/components/Counter/Counter.variants.js +53 -19
- package/dist/components/DateRangePicker/DateRangePicker.js +77 -93
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +23 -4
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +75 -81
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +54 -10
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +8 -14
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +35 -50
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +179 -107
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +19 -34
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +78 -61
- package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +6 -6
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +2 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +10 -31
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +19 -19
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +121 -144
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +82 -53
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +8 -8
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +60 -69
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +31 -5
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +43 -55
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +43 -55
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.js +2 -2
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.js +2 -2
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +144 -176
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +37 -56
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +20 -2
- package/dist/components/DateRangePicker/components/index.js +6 -6
- package/dist/components/DateRangePicker/constants/index.js +2 -2
- package/dist/components/DateRangePicker/constants/presets.js +22 -16
- package/dist/components/DateRangePicker/contexts/date-range-picker.context.js +3 -3
- package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +4 -5
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +114 -187
- package/dist/components/DateRangePicker/contexts/index.js +6 -6
- package/dist/components/DateRangePicker/utils/disabled-dates.js +25 -39
- package/dist/components/DateRangePicker/utils/index.js +20 -20
- package/dist/components/DateRangePicker/utils/presets.js +6 -8
- package/dist/components/DateRangePicker/utils/validation.js +60 -57
- package/dist/components/Datepicker/DatePicker.js +48 -81
- package/dist/components/Datepicker/DatePicker.variants.js +3 -3
- package/dist/components/Divider/Divider.js +6 -17
- package/dist/components/Divider/Divider.variants.js +9 -11
- package/dist/components/Drawer/Drawer.js +73 -109
- package/dist/components/Drawer/Drawer.variants.js +74 -24
- package/dist/components/Drawer/components/Body/Body.js +12 -18
- package/dist/components/Drawer/components/Body/index.js +2 -2
- package/dist/components/Drawer/components/Footer/Footer.js +12 -18
- package/dist/components/Drawer/components/Footer/index.js +2 -2
- package/dist/components/Drawer/components/Header/Header.js +13 -20
- package/dist/components/Drawer/components/Header/index.js +2 -2
- package/dist/components/Drawer/components/index.js +6 -6
- package/dist/components/Drawer/constants/index.js +1 -1
- package/dist/components/Drawer/contexts/Drawer.context.js +3 -3
- package/dist/components/Drawer/contexts/index.js +3 -3
- package/dist/components/Drawer/hooks/index.js +2 -2
- package/dist/components/Drawer/hooks/useDrawer.js +54 -82
- package/dist/components/DropdownButton/DropdownButton.js +2 -118
- package/dist/components/Filter/Filter.js +32 -40
- package/dist/components/Filter/Filter.variants.js +24 -4
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +59 -127
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +73 -84
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +47 -84
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +52 -67
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +29 -39
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +55 -75
- package/dist/components/Filter/components/ResetButton/ResetButton.js +19 -25
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +73 -84
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +48 -83
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +81 -81
- package/dist/components/Filter/components/index.js +6 -6
- package/dist/components/Filter/contexts/filter.context.js +2 -4
- package/dist/components/Filter/contexts/filter.hook.js +5 -6
- package/dist/components/Filter/contexts/filter.provider.js +7 -16
- package/dist/components/Filter/contexts/index.js +4 -4
- package/dist/components/Filter/events/index.js +4 -8
- package/dist/components/Filter/utils/index.js +2 -2435
- package/dist/components/ImageUpload/ImageUpload.js +2 -119
- package/dist/components/ImageUpload/ImageUpload.variants.js +86 -51
- package/dist/components/Input/Input.js +2 -161
- package/dist/components/Input/Input.variants.js +46 -11
- package/dist/components/LineChart/LineChart.js +63 -56
- package/dist/components/Loading/Loading.js +2 -22
- package/dist/components/Loading/Loading.variants.js +9 -2
- package/dist/components/Modal/Modal.js +3 -9
- package/dist/components/Modal/components/Body/Body.js +8 -16
- package/dist/components/Modal/components/Footer/Footer.js +8 -16
- package/dist/components/Modal/components/Header/Header.js +8 -16
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -11
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +29 -2
- package/dist/components/Modal/components/index.js +8 -8
- package/dist/components/Modal/contexts/Modal.context.js +1 -1
- package/dist/components/Modal/contexts/Modal.provider.js +20 -33
- package/dist/components/Modal/contexts/index.js +2 -2
- package/dist/components/Modal/hooks/useModal.js +20 -31
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +2 -26
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +29 -5
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +19 -32
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +21 -11
- package/dist/components/MultiSelectDropdown/components/List/List.js +2 -27
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +23 -3
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +2 -74
- package/dist/components/MultiSelectDropdown/components/index.js +4 -5
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -4
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +3 -4
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +94 -122
- package/dist/components/MultiSelectDropdown/contexts/index.js +2 -2
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +18 -31
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +11 -18
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +37 -14
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +16 -28
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +2 -670
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +22 -20
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +48 -52
- package/dist/components/PhoneNumberInput/components/Wrapper.js +2 -612
- package/dist/components/PhoneNumberInput/components/index.js +4 -4
- package/dist/components/PhoneNumberInput/contexts/index.js +3 -3
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +5 -6
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +2 -6092
- package/dist/components/PhoneNumberInput/utils/index.js +7 -8
- package/dist/components/PieChart/PieChart.js +49 -85
- package/dist/components/ProgressBar/ProgressBar.js +29 -47
- package/dist/components/ProgressBar/ProgressBar.variants.js +24 -14
- package/dist/components/Radio/Radio.js +50 -70
- package/dist/components/Radio/Radio.variants.js +76 -30
- package/dist/components/RadioCard/RadioCard.js +19 -32
- package/dist/components/RadioCard/RadioCard.variants.js +7 -2
- package/dist/components/RadioCardGroup/RadioCardGroup.js +25 -42
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +8 -12
- package/dist/components/RadioGroup/RadioGroup.js +26 -48
- package/dist/components/RadioGroup/RadioGroup.variants.js +8 -12
- package/dist/components/Range/Range.js +49 -83
- package/dist/components/Range/Range.variants.js +46 -25
- package/dist/components/Select/Select.js +36 -56
- package/dist/components/Select/Select.variants.js +59 -5
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +2 -10
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +3 -3
- package/dist/components/Select/components/EmptyList.js +3 -8
- package/dist/components/Select/components/List/List.js +113 -88
- package/dist/components/Select/components/List/List.variants.js +42 -2
- package/dist/components/Select/components/ListItem/ListItem.js +51 -49
- package/dist/components/Select/components/ListItem/ListItem.variants.js +21 -3
- package/dist/components/Select/components/Wrapper.js +2 -125
- package/dist/components/Select/components/index.js +8 -8
- package/dist/components/Select/constants/index.js +4 -4
- package/dist/components/Select/constants/list.js +2 -2
- package/dist/components/Select/constants/pagination.js +2 -2
- package/dist/components/Select/contexts/index.js +4 -4
- package/dist/components/Select/contexts/select.context.js +2 -2
- package/dist/components/Select/contexts/select.hook.js +6 -7
- package/dist/components/Select/contexts/select.provider.js +39 -42
- package/dist/components/Select/hooks/useNavigationList.js +34 -49
- package/dist/components/Select/hooks/useSelect.js +54 -100
- package/dist/components/Sidebar/Sidebar.js +22 -26
- package/dist/components/Sidebar/Sidebar.variants.js +29 -3
- package/dist/components/Sidebar/components/Footer/Footer.js +9 -18
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -2
- package/dist/components/Sidebar/components/Logo/Logo.js +9 -18
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -2
- package/dist/components/Sidebar/components/Navigation/Navigation.js +17 -26
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +8 -3
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +14 -33
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +6 -2
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +14 -25
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +28 -8
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +6 -17
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -2
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -21
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +12 -3
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +27 -34
- package/dist/components/Sidebar/components/index.js +14 -14
- package/dist/components/Slider/Slider.js +38 -70
- package/dist/components/Slider/Slider.variants.js +39 -26
- package/dist/components/Spinner/Spinner.js +2 -56
- package/dist/components/Spinner/Spinner.variants.js +36 -24
- package/dist/components/Stepper/Stepper.js +45 -56
- package/dist/components/Stepper/Stepper.variants.js +174 -77
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +120 -151
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +15 -24
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +2 -40
- package/dist/components/Stepper/components/StepItem/StepItem.js +6 -15
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +70 -94
- package/dist/components/Stepper/constants/index.js +1 -1
- package/dist/components/Stepper/hooks/index.js +2 -2
- package/dist/components/Stepper/hooks/useStepItemLogic.js +15 -15
- package/dist/components/Stepper/utils/index.js +4 -5
- package/dist/components/Switch/Switch.js +2 -185
- package/dist/components/Switch/Switch.variants.js +41 -2
- package/dist/components/Table/Table.js +18 -29
- package/dist/components/Table/Table.variants.js +29 -12
- package/dist/components/Table/components/Body.js +9 -20
- package/dist/components/Table/components/Filter.js +13 -21
- package/dist/components/Table/components/Head.js +9 -20
- package/dist/components/Table/components/Row.js +14 -28
- package/dist/components/Table/components/index.js +6 -6
- package/dist/components/Tabs/Tabs.js +26 -34
- package/dist/components/Tabs/Tabs.variants.js +54 -42
- package/dist/components/Tabs/components/Content.js +12 -21
- package/dist/components/Tabs/components/List.js +17 -28
- package/dist/components/Tabs/components/Trigger.js +19 -25
- package/dist/components/Tabs/components/index.js +4 -4
- package/dist/components/Tag/Tag.js +26 -33
- package/dist/components/Tag/Tag.variants.js +31 -25
- package/dist/components/TagSelect/TagSelect.js +13 -18
- package/dist/components/TagSelect/TagSelect.variants.js +26 -5
- package/dist/components/TagSelect/components/Item/Item.js +14 -23
- package/dist/components/TagSelect/components/Item/Item.variants.js +16 -12
- package/dist/components/TagSelect/components/List/List.js +17 -22
- package/dist/components/TagSelect/components/List/List.variants.js +21 -3
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -69
- package/dist/components/TagSelect/components/index.js +6 -6
- package/dist/components/TagSelect/contexts/TagSelect.context.js +1 -1
- package/dist/components/TagSelect/contexts/TagSelect.hook.js +6 -7
- package/dist/components/TagSelect/contexts/TagSelect.provider.js +49 -75
- package/dist/components/TagSelect/contexts/index.js +4 -4
- package/dist/components/TagSelect/hooks/useTagSelect.js +18 -31
- package/dist/components/TextArea/TextArea.js +27 -35
- package/dist/components/TextArea/TextArea.variants.js +18 -3
- package/dist/components/TimePicker/TimePicker.js +15 -23
- package/dist/components/TimePicker/TimePicker.variants.js +65 -2
- package/dist/components/TimePicker/components/HoursList/HoursList.js +88 -75
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +53 -79
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +61 -64
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +134 -143
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +38 -44
- package/dist/components/TimePicker/components/index.js +2 -2
- package/dist/components/TimePicker/contexts/index.js +6 -6
- package/dist/components/TimePicker/contexts/time-picker.context.js +1 -1
- package/dist/components/TimePicker/contexts/time-picker.hook.js +4 -5
- package/dist/components/TimePicker/contexts/time-picker.provider.js +56 -76
- package/dist/components/TimePicker/utils/index.js +17 -19
- package/dist/components/Toast/Toast.js +3 -547
- package/dist/components/Toast/Toast.variants.js +44 -14
- package/dist/components/Tooltip/Tooltip.js +16 -36
- package/dist/components/Typography/Typography.js +16 -27
- package/dist/components/Typography/Typography.variants.js +71 -26
- package/dist/components/VirtualizedTable/VirtualizedTable.js +89 -77
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +2 -2
- package/dist/components/VirtualizedTable/assets/chevron-down.js +14 -13
- package/dist/components/VirtualizedTable/assets/chevron-up.js +14 -13
- package/dist/components/VirtualizedTable/assets/index.js +4 -4
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +35 -63
- package/dist/components/VirtualizedTable/components/Body/Body.js +49 -57
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +100 -105
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +18 -20
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +29 -43
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +110 -117
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +42 -32
- package/dist/components/VirtualizedTable/components/Header/Header.js +33 -58
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +29 -65
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +39 -32
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +39 -52
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +9 -19
- package/dist/components/VirtualizedTable/components/index.js +10 -10
- package/dist/components/VirtualizedTable/constants/index.js +3 -3
- package/dist/components/VirtualizedTable/constants/pagination.js +6 -1
- package/dist/components/VirtualizedTable/contexts/index.js +6 -6
- package/dist/components/VirtualizedTable/contexts/table.context.js +3 -3
- package/dist/components/VirtualizedTable/contexts/table.hook.js +7 -8
- package/dist/components/VirtualizedTable/contexts/table.provider.js +2 -239
- package/dist/components/VirtualizedTable/contexts/table.types.d.ts +1 -1
- package/dist/components/VirtualizedTable/events/index.js +19 -24
- package/dist/components/index.js +140 -140
- package/dist/components-DNFycJGm.js +120 -0
- package/dist/constants-D96yCePL.js +31 -0
- package/dist/contexts/index.js +6 -6
- package/dist/contexts/theme.context.js +2 -2
- package/dist/contexts/theme.hook.js +2 -2
- package/dist/contexts/theme.provider.js +2 -96
- package/dist/createLucideIcon-BVGkzDZC.js +42 -0
- package/dist/debounce-CzFlgg9h.js +86 -0
- package/dist/dist-B5SlrgYz.js +263 -0
- package/dist/{index-BZPx6jYI.js → dist-BL-H4bEw2.js} +5 -2
- package/dist/dist-BL8l9uRy.js +361 -0
- package/dist/{index-DLcqcWxM.js → dist-ByyYBtbL.js} +9 -11
- package/dist/dist-C8r5DW7s.js +10 -0
- package/dist/dist-CBnErrr1.js +58 -0
- package/dist/dist-COY3FRYC.js +480 -0
- package/dist/dist-CSP6X06u.js +1701 -0
- package/dist/dist-DNSmoWJp.js +469 -0
- package/dist/dist-DRmqW28Z2.js +7479 -0
- package/dist/dist-DXJSck4j.js +74 -0
- package/dist/dist-DXXHfL7M.js +132 -0
- package/dist/dist-DZNdbzbm.js +120 -0
- package/dist/dist-DZcOdXgW.js +13 -0
- package/dist/dist-DeVdyMHW2.js +31 -0
- package/dist/{index-3fEdeexs.js → dist-DpqiA4Yn.js} +25 -28
- package/dist/dist-DstQl8xY.js +10 -0
- package/dist/dist-DtEbXv47.js +34 -0
- package/dist/dist-uVUx9i0a.js +223 -0
- package/dist/ellipsis-vertical-My0S9QY5.js +24 -0
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/useToggle.js +5 -10
- package/dist/icons.js +88 -88
- package/dist/index.js +150 -149
- package/dist/isObject--aYwGuhx.js +62 -0
- package/dist/libphonenumber-7uXgv7U8.js +81977 -0
- package/dist/package.json +18 -19
- package/dist/phone-number.provider-B5TfHi8y.js +6646 -0
- package/dist/prop-types-DTnODft1.js +547 -0
- package/dist/proxy-uLtw-ZML.js +4690 -0
- package/dist/style.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{index-CSWGJT-v.js → table.provider-4OQNqxH3.js} +805 -674
- package/dist/theme.provider-BgxXUOMP.js +74 -0
- package/dist/useBreadcrumb-BBm5lX0U.js +1263 -0
- package/dist/utils/index.js +5 -2920
- package/dist/utils-CQSRNcoF.js +2022 -0
- package/dist/utils-DHuiYnx1.js +1689 -0
- package/dist/x-BwIi6Wii.js +63 -0
- package/dist/x-a0ouxoIM.js +11 -0
- package/package.json +18 -19
- package/dist/AdditionalOptions-DiXvUzhu.js +0 -42
- package/dist/Combination-BtmnusWq.js +0 -480
- package/dist/DayPicker-CaeUXRCF.js +0 -2798
- package/dist/Modal-h5H4yxYg.js +0 -128
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/chevron-down-BBFYYzZq.js +0 -5
- package/dist/chevron-left-BHBf-gQY.js +0 -5
- package/dist/chevron-right-DvXGOiS_.js +0 -5
- package/dist/chevron-up-DEfvgPCw.js +0 -54
- package/dist/chevron-up-IlDPxR7j.js +0 -5
- package/dist/compiler-runtime-DA41awpA.js +0 -36
- package/dist/createLucideIcon-CP-mMPfa.js +0 -75
- package/dist/debounce-DJveWHr_.js +0 -114
- package/dist/ellipsis-vertical-Cl3yNtOy.js +0 -9
- package/dist/index--l0zux8V.js +0 -200
- package/dist/index-0g-eSmV1.js +0 -142
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-B9v5VxE2.js +0 -431
- package/dist/index-BKMaItIC.js +0 -13
- package/dist/index-BKjcReYh.js +0 -55
- package/dist/index-BOE_3f_Z.js +0 -646
- package/dist/index-BRXMsxSL.js +0 -27
- package/dist/index-BdMNhZnh.js +0 -9
- package/dist/index-BmVmDQGH.js +0 -662
- package/dist/index-BvEpLnOv.js +0 -144
- package/dist/index-BvoZGpli.js +0 -60
- package/dist/index-C6mt--X_.js +0 -478
- package/dist/index-CJnS4BVW.js +0 -93
- package/dist/index-CiACf4ao.js +0 -1885
- package/dist/index-D29mdTf5.js +0 -34
- package/dist/index-Dy4FVowi.js +0 -314
- package/dist/index-kTGTSLpq.js +0 -322
- package/dist/index-qDQP8rW4.js +0 -7281
- package/dist/isObject-9XxUefZH.js +0 -97
- package/dist/libphonenumber-aZ-2KWIf.js +0 -11581
- package/dist/proxy-BGrSEZuV.js +0 -5046
- package/dist/useBreadcrumb-C_Wb2cXs.js +0 -1435
- package/dist/x-B9bYxG31.js +0 -8
- package/dist/x-Eoa9FJjA.js +0 -62
|
@@ -0,0 +1,4690 @@
|
|
|
1
|
+
import { a as _r, n as Kr, r as $r } from "./chunk-D1xtDmiO.js";
|
|
2
|
+
import { Component as zr, Fragment as Yn, createContext as Mt, createElement as Hr, forwardRef as Gr, useCallback as qn, useContext as U, useEffect as ni, useId as Xr, useInsertionEffect as Zn, useLayoutEffect as Yr, useMemo as he, useRef as dt } from "react";
|
|
3
|
+
import { jsx as Jn, jsxs as qr } from "react/jsx-runtime";
|
|
4
|
+
var Qn = Mt({});
|
|
5
|
+
function Zr(t) {
|
|
6
|
+
const e = dt(null);
|
|
7
|
+
return e.current === null && (e.current = t()), e.current;
|
|
8
|
+
}
|
|
9
|
+
var Jr = typeof window < "u", Qr = Jr ? Yr : ni, si = /* @__PURE__ */ Mt(null);
|
|
10
|
+
function ri(t, e) {
|
|
11
|
+
t.indexOf(e) === -1 && t.push(e);
|
|
12
|
+
}
|
|
13
|
+
function ne(t, e) {
|
|
14
|
+
const i = t.indexOf(e);
|
|
15
|
+
i > -1 && t.splice(i, 1);
|
|
16
|
+
}
|
|
17
|
+
var tt = (t, e, i) => i > e ? e : i < t ? t : i;
|
|
18
|
+
function Le(t, e) {
|
|
19
|
+
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
20
|
+
}
|
|
21
|
+
var Ct = () => {
|
|
22
|
+
}, it = () => {
|
|
23
|
+
};
|
|
24
|
+
typeof process < "u" && process.env.NODE_ENV !== "production" && (Ct = (t, e, i) => {
|
|
25
|
+
!t && typeof console < "u" && console.warn(Le(e, i));
|
|
26
|
+
}, it = (t, e, i) => {
|
|
27
|
+
if (!t) throw new Error(Le(e, i));
|
|
28
|
+
});
|
|
29
|
+
var rt = {}, ts = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
30
|
+
function es(t) {
|
|
31
|
+
return typeof t == "object" && t !== null;
|
|
32
|
+
}
|
|
33
|
+
var is = (t) => /^0[^.\s]+$/u.test(t);
|
|
34
|
+
// @__NO_SIDE_EFFECTS__
|
|
35
|
+
function ns(t) {
|
|
36
|
+
let e;
|
|
37
|
+
return () => (e === void 0 && (e = t()), e);
|
|
38
|
+
}
|
|
39
|
+
var $ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (i) => e(t(i)), Wt = (...t) => t.reduce(to), Ot = /* @__NO_SIDE_EFFECTS__ */ (t, e, i) => {
|
|
40
|
+
const n = e - t;
|
|
41
|
+
return n === 0 ? 1 : (i - t) / n;
|
|
42
|
+
}, oi = class {
|
|
43
|
+
constructor() {
|
|
44
|
+
this.subscriptions = [];
|
|
45
|
+
}
|
|
46
|
+
add(t) {
|
|
47
|
+
return ri(this.subscriptions, t), () => ne(this.subscriptions, t);
|
|
48
|
+
}
|
|
49
|
+
notify(t, e, i) {
|
|
50
|
+
const n = this.subscriptions.length;
|
|
51
|
+
if (n)
|
|
52
|
+
if (n === 1) this.subscriptions[0](t, e, i);
|
|
53
|
+
else for (let s = 0; s < n; s++) {
|
|
54
|
+
const o = this.subscriptions[s];
|
|
55
|
+
o && o(t, e, i);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
getSize() {
|
|
59
|
+
return this.subscriptions.length;
|
|
60
|
+
}
|
|
61
|
+
clear() {
|
|
62
|
+
this.subscriptions.length = 0;
|
|
63
|
+
}
|
|
64
|
+
}, W = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, K = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
65
|
+
function ss(t, e) {
|
|
66
|
+
return e ? t * (1e3 / e) : 0;
|
|
67
|
+
}
|
|
68
|
+
var Ri = /* @__PURE__ */ new Set();
|
|
69
|
+
function ai(t, e, i) {
|
|
70
|
+
t || Ri.has(e) || (console.warn(Le(e, i)), Ri.add(e));
|
|
71
|
+
}
|
|
72
|
+
var rs = (t, e, i) => (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t, eo = 1e-7, io = 12;
|
|
73
|
+
function no(t, e, i, n, s) {
|
|
74
|
+
let o, r, a = 0;
|
|
75
|
+
do
|
|
76
|
+
r = e + (i - e) / 2, o = rs(r, n, s) - t, o > 0 ? i = r : e = r;
|
|
77
|
+
while (Math.abs(o) > eo && ++a < io);
|
|
78
|
+
return r;
|
|
79
|
+
}
|
|
80
|
+
function _t(t, e, i, n) {
|
|
81
|
+
if (t === e && i === n) return $;
|
|
82
|
+
const s = (o) => no(o, 0, 1, t, i);
|
|
83
|
+
return (o) => o === 0 || o === 1 ? o : rs(s(o), e, n);
|
|
84
|
+
}
|
|
85
|
+
var os = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, as = (t) => (e) => 1 - t(1 - e), ls = /* @__PURE__ */ _t(0.33, 1.53, 0.69, 0.99), li = /* @__PURE__ */ as(ls), us = /* @__PURE__ */ os(li), cs = (t) => t >= 1 ? 1 : (t *= 2) < 1 ? 0.5 * li(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ui = (t) => 1 - Math.sin(Math.acos(t)), hs = as(ui), fs = os(ui), so = /* @__PURE__ */ _t(0.42, 0, 1, 1), ro = /* @__PURE__ */ _t(0, 0, 0.58, 1), ds = /* @__PURE__ */ _t(0.42, 0, 0.58, 1), oo = (t) => Array.isArray(t) && typeof t[0] != "number", ps = (t) => Array.isArray(t) && typeof t[0] == "number", Li = {
|
|
86
|
+
linear: $,
|
|
87
|
+
easeIn: so,
|
|
88
|
+
easeInOut: ds,
|
|
89
|
+
easeOut: ro,
|
|
90
|
+
circIn: ui,
|
|
91
|
+
circInOut: fs,
|
|
92
|
+
circOut: hs,
|
|
93
|
+
backIn: li,
|
|
94
|
+
backInOut: us,
|
|
95
|
+
backOut: ls,
|
|
96
|
+
anticipate: cs
|
|
97
|
+
}, ao = (t) => typeof t == "string", ki = (t) => {
|
|
98
|
+
if (ps(t)) {
|
|
99
|
+
it(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
100
|
+
const [e, i, n, s] = t;
|
|
101
|
+
return _t(e, i, n, s);
|
|
102
|
+
} else if (ao(t))
|
|
103
|
+
return it(Li[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Li[t];
|
|
104
|
+
return t;
|
|
105
|
+
}, zt = [
|
|
106
|
+
"setup",
|
|
107
|
+
"read",
|
|
108
|
+
"resolveKeyframes",
|
|
109
|
+
"preUpdate",
|
|
110
|
+
"update",
|
|
111
|
+
"preRender",
|
|
112
|
+
"render",
|
|
113
|
+
"postRender"
|
|
114
|
+
], J = {
|
|
115
|
+
value: null,
|
|
116
|
+
addProjectionMetrics: null
|
|
117
|
+
};
|
|
118
|
+
function lo(t, e) {
|
|
119
|
+
let i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, o = !1;
|
|
120
|
+
const r = /* @__PURE__ */ new WeakSet();
|
|
121
|
+
let a = {
|
|
122
|
+
delta: 0,
|
|
123
|
+
timestamp: 0,
|
|
124
|
+
isProcessing: !1
|
|
125
|
+
}, l = 0;
|
|
126
|
+
function c(h) {
|
|
127
|
+
r.has(h) && (u.schedule(h), t()), l++, h(a);
|
|
128
|
+
}
|
|
129
|
+
const u = {
|
|
130
|
+
schedule: (h, f = !1, p = !1) => {
|
|
131
|
+
const d = p && s ? i : n;
|
|
132
|
+
return f && r.add(h), d.add(h), h;
|
|
133
|
+
},
|
|
134
|
+
cancel: (h) => {
|
|
135
|
+
n.delete(h), r.delete(h);
|
|
136
|
+
},
|
|
137
|
+
process: (h) => {
|
|
138
|
+
if (a = h, s) {
|
|
139
|
+
o = !0;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
s = !0;
|
|
143
|
+
const f = i;
|
|
144
|
+
i = n, n = f, i.forEach(c), e && J.value && J.value.frameloop[e].push(l), l = 0, i.clear(), s = !1, o && (o = !1, u.process(h));
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
return u;
|
|
148
|
+
}
|
|
149
|
+
var uo = 40;
|
|
150
|
+
function ms(t, e) {
|
|
151
|
+
let i = !1, n = !0;
|
|
152
|
+
const s = {
|
|
153
|
+
delta: 0,
|
|
154
|
+
timestamp: 0,
|
|
155
|
+
isProcessing: !1
|
|
156
|
+
}, o = () => i = !0, r = zt.reduce((y, w) => (y[w] = lo(o, e ? w : void 0), y), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: p, postRender: d } = r, v = () => {
|
|
157
|
+
const y = rt.useManualTiming, w = y ? s.timestamp : performance.now();
|
|
158
|
+
i = !1, y || (s.delta = n ? 1e3 / 60 : Math.max(Math.min(w - s.timestamp, uo), 1)), s.timestamp = w, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), h.process(s), f.process(s), p.process(s), d.process(s), s.isProcessing = !1, i && e && (n = !1, t(v));
|
|
159
|
+
}, g = () => {
|
|
160
|
+
i = !0, n = !0, s.isProcessing || t(v);
|
|
161
|
+
};
|
|
162
|
+
return {
|
|
163
|
+
schedule: zt.reduce((y, w) => {
|
|
164
|
+
const b = r[w];
|
|
165
|
+
return y[w] = (E, L = !1, P = !1) => (i || g(), b.schedule(E, L, P)), y;
|
|
166
|
+
}, {}),
|
|
167
|
+
cancel: (y) => {
|
|
168
|
+
for (let w = 0; w < zt.length; w++) r[zt[w]].cancel(y);
|
|
169
|
+
},
|
|
170
|
+
state: s,
|
|
171
|
+
steps: r
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
var { schedule: A, cancel: ot, state: B, steps: ve } = /* @__PURE__ */ ms(typeof requestAnimationFrame < "u" ? requestAnimationFrame : $, !0), Yt;
|
|
175
|
+
function co() {
|
|
176
|
+
Yt = void 0;
|
|
177
|
+
}
|
|
178
|
+
var O = {
|
|
179
|
+
now: () => (Yt === void 0 && O.set(B.isProcessing || rt.useManualTiming ? B.timestamp : performance.now()), Yt),
|
|
180
|
+
set: (t) => {
|
|
181
|
+
Yt = t, queueMicrotask(co);
|
|
182
|
+
}
|
|
183
|
+
}, vt = {
|
|
184
|
+
layout: 0,
|
|
185
|
+
mainThread: 0,
|
|
186
|
+
waapi: 0
|
|
187
|
+
}, vs = (t) => (e) => typeof e == "string" && e.startsWith(t), gs = /* @__PURE__ */ vs("--"), ho = /* @__PURE__ */ vs("var(--"), ci = (t) => ho(t) ? fo.test(t.split("/*")[0].trim()) : !1, fo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
188
|
+
function Bi(t) {
|
|
189
|
+
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
190
|
+
}
|
|
191
|
+
var Dt = {
|
|
192
|
+
test: (t) => typeof t == "number",
|
|
193
|
+
parse: parseFloat,
|
|
194
|
+
transform: (t) => t
|
|
195
|
+
}, jt = {
|
|
196
|
+
...Dt,
|
|
197
|
+
transform: (t) => tt(0, 1, t)
|
|
198
|
+
}, Ht = {
|
|
199
|
+
...Dt,
|
|
200
|
+
default: 1
|
|
201
|
+
}, Bt = (t) => Math.round(t * 1e5) / 1e5, hi = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
202
|
+
function po(t) {
|
|
203
|
+
return t == null;
|
|
204
|
+
}
|
|
205
|
+
var mo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, fi = (t, e) => (i) => !!(typeof i == "string" && mo.test(i) && i.startsWith(t) || e && !po(i) && Object.prototype.hasOwnProperty.call(i, e)), ys = (t, e, i) => (n) => {
|
|
206
|
+
if (typeof n != "string") return n;
|
|
207
|
+
const [s, o, r, a] = n.match(hi);
|
|
208
|
+
return {
|
|
209
|
+
[t]: parseFloat(s),
|
|
210
|
+
[e]: parseFloat(o),
|
|
211
|
+
[i]: parseFloat(r),
|
|
212
|
+
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
213
|
+
};
|
|
214
|
+
}, vo = (t) => tt(0, 255, t), ge = {
|
|
215
|
+
...Dt,
|
|
216
|
+
transform: (t) => Math.round(vo(t))
|
|
217
|
+
}, pt = {
|
|
218
|
+
test: /* @__PURE__ */ fi("rgb", "red"),
|
|
219
|
+
parse: /* @__PURE__ */ ys("red", "green", "blue"),
|
|
220
|
+
transform: ({ red: t, green: e, blue: i, alpha: n = 1 }) => "rgba(" + ge.transform(t) + ", " + ge.transform(e) + ", " + ge.transform(i) + ", " + Bt(jt.transform(n)) + ")"
|
|
221
|
+
};
|
|
222
|
+
function go(t) {
|
|
223
|
+
let e = "", i = "", n = "", s = "";
|
|
224
|
+
return t.length > 5 ? (e = t.substring(1, 3), i = t.substring(3, 5), n = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), i = t.substring(2, 3), n = t.substring(3, 4), s = t.substring(4, 5), e += e, i += i, n += n, s += s), {
|
|
225
|
+
red: parseInt(e, 16),
|
|
226
|
+
green: parseInt(i, 16),
|
|
227
|
+
blue: parseInt(n, 16),
|
|
228
|
+
alpha: s ? parseInt(s, 16) / 255 : 1
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
var ke = {
|
|
232
|
+
test: /* @__PURE__ */ fi("#"),
|
|
233
|
+
parse: go,
|
|
234
|
+
transform: pt.transform
|
|
235
|
+
}, Kt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
236
|
+
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
237
|
+
parse: parseFloat,
|
|
238
|
+
transform: (e) => `${e}${t}`
|
|
239
|
+
}), nt = /* @__PURE__ */ Kt("deg"), Q = /* @__PURE__ */ Kt("%"), T = /* @__PURE__ */ Kt("px"), yo = /* @__PURE__ */ Kt("vh"), To = /* @__PURE__ */ Kt("vw"), Ii = {
|
|
240
|
+
...Q,
|
|
241
|
+
parse: (t) => Q.parse(t) / 100,
|
|
242
|
+
transform: (t) => Q.transform(t * 100)
|
|
243
|
+
}, wt = {
|
|
244
|
+
test: /* @__PURE__ */ fi("hsl", "hue"),
|
|
245
|
+
parse: /* @__PURE__ */ ys("hue", "saturation", "lightness"),
|
|
246
|
+
transform: ({ hue: t, saturation: e, lightness: i, alpha: n = 1 }) => "hsla(" + Math.round(t) + ", " + Q.transform(Bt(e)) + ", " + Q.transform(Bt(i)) + ", " + Bt(jt.transform(n)) + ")"
|
|
247
|
+
}, D = {
|
|
248
|
+
test: (t) => pt.test(t) || ke.test(t) || wt.test(t),
|
|
249
|
+
parse: (t) => pt.test(t) ? pt.parse(t) : wt.test(t) ? wt.parse(t) : ke.parse(t),
|
|
250
|
+
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? pt.transform(t) : wt.transform(t),
|
|
251
|
+
getAnimatableNone: (t) => {
|
|
252
|
+
const e = D.parse(t);
|
|
253
|
+
return e.alpha = 0, D.transform(e);
|
|
254
|
+
}
|
|
255
|
+
}, xo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
256
|
+
function wo(t) {
|
|
257
|
+
return isNaN(t) && typeof t == "string" && (t.match(hi)?.length || 0) + (t.match(xo)?.length || 0) > 0;
|
|
258
|
+
}
|
|
259
|
+
var Ts = "number", xs = "color", Po = "var", So = "var(", Fi = "${}", bo = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
260
|
+
function At(t) {
|
|
261
|
+
const e = t.toString(), i = [], n = {
|
|
262
|
+
color: [],
|
|
263
|
+
number: [],
|
|
264
|
+
var: []
|
|
265
|
+
}, s = [];
|
|
266
|
+
let o = 0;
|
|
267
|
+
return {
|
|
268
|
+
values: i,
|
|
269
|
+
split: e.replace(bo, (r) => (D.test(r) ? (n.color.push(o), s.push(xs), i.push(D.parse(r))) : r.startsWith(So) ? (n.var.push(o), s.push(Po), i.push(r)) : (n.number.push(o), s.push(Ts), i.push(parseFloat(r))), ++o, Fi)).split(Fi),
|
|
270
|
+
indexes: n,
|
|
271
|
+
types: s
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function Ao(t) {
|
|
275
|
+
return At(t).values;
|
|
276
|
+
}
|
|
277
|
+
function ws({ split: t, types: e }) {
|
|
278
|
+
const i = t.length;
|
|
279
|
+
return (n) => {
|
|
280
|
+
let s = "";
|
|
281
|
+
for (let o = 0; o < i; o++)
|
|
282
|
+
if (s += t[o], n[o] !== void 0) {
|
|
283
|
+
const r = e[o];
|
|
284
|
+
r === Ts ? s += Bt(n[o]) : r === xs ? s += D.transform(n[o]) : s += n[o];
|
|
285
|
+
}
|
|
286
|
+
return s;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
function Vo(t) {
|
|
290
|
+
return ws(At(t));
|
|
291
|
+
}
|
|
292
|
+
var Mo = (t) => typeof t == "number" ? 0 : D.test(t) ? D.getAnimatableNone(t) : t, Co = (t, e) => typeof t == "number" ? e?.trim().endsWith("/") ? t : 0 : Mo(t);
|
|
293
|
+
function Do(t) {
|
|
294
|
+
const e = At(t);
|
|
295
|
+
return ws(e)(e.values.map((i, n) => Co(i, e.split[n])));
|
|
296
|
+
}
|
|
297
|
+
var G = {
|
|
298
|
+
test: wo,
|
|
299
|
+
parse: Ao,
|
|
300
|
+
createTransformer: Vo,
|
|
301
|
+
getAnimatableNone: Do
|
|
302
|
+
};
|
|
303
|
+
function ye(t, e, i) {
|
|
304
|
+
return i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? t + (e - t) * 6 * i : i < 1 / 2 ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t;
|
|
305
|
+
}
|
|
306
|
+
function Eo({ hue: t, saturation: e, lightness: i, alpha: n }) {
|
|
307
|
+
t /= 360, e /= 100, i /= 100;
|
|
308
|
+
let s = 0, o = 0, r = 0;
|
|
309
|
+
if (!e) s = o = r = i;
|
|
310
|
+
else {
|
|
311
|
+
const a = i < 0.5 ? i * (1 + e) : i + e - i * e, l = 2 * i - a;
|
|
312
|
+
s = ye(l, a, t + 1 / 3), o = ye(l, a, t), r = ye(l, a, t - 1 / 3);
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
red: Math.round(s * 255),
|
|
316
|
+
green: Math.round(o * 255),
|
|
317
|
+
blue: Math.round(r * 255),
|
|
318
|
+
alpha: n
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function se(t, e) {
|
|
322
|
+
return (i) => i > 0 ? e : t;
|
|
323
|
+
}
|
|
324
|
+
var V = (t, e, i) => t + (e - t) * i, Te = (t, e, i) => {
|
|
325
|
+
const n = t * t, s = i * (e * e - n) + n;
|
|
326
|
+
return s < 0 ? 0 : Math.sqrt(s);
|
|
327
|
+
}, Ro = [
|
|
328
|
+
ke,
|
|
329
|
+
pt,
|
|
330
|
+
wt
|
|
331
|
+
], Lo = (t) => Ro.find((e) => e.test(t));
|
|
332
|
+
function Oi(t) {
|
|
333
|
+
const e = Lo(t);
|
|
334
|
+
if (Ct(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e) return !1;
|
|
335
|
+
let i = e.parse(t);
|
|
336
|
+
return e === wt && (i = Eo(i)), i;
|
|
337
|
+
}
|
|
338
|
+
var ji = (t, e) => {
|
|
339
|
+
const i = Oi(t), n = Oi(e);
|
|
340
|
+
if (!i || !n) return se(t, e);
|
|
341
|
+
const s = { ...i };
|
|
342
|
+
return (o) => (s.red = Te(i.red, n.red, o), s.green = Te(i.green, n.green, o), s.blue = Te(i.blue, n.blue, o), s.alpha = V(i.alpha, n.alpha, o), pt.transform(s));
|
|
343
|
+
}, Be = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
344
|
+
function ko(t, e) {
|
|
345
|
+
return Be.has(t) ? (i) => i <= 0 ? t : e : (i) => i >= 1 ? e : t;
|
|
346
|
+
}
|
|
347
|
+
function Bo(t, e) {
|
|
348
|
+
return (i) => V(t, e, i);
|
|
349
|
+
}
|
|
350
|
+
function di(t) {
|
|
351
|
+
return typeof t == "number" ? Bo : typeof t == "string" ? ci(t) ? se : D.test(t) ? ji : Oo : Array.isArray(t) ? Ps : typeof t == "object" ? D.test(t) ? ji : Io : se;
|
|
352
|
+
}
|
|
353
|
+
function Ps(t, e) {
|
|
354
|
+
const i = [...t], n = i.length, s = t.map((o, r) => di(o)(o, e[r]));
|
|
355
|
+
return (o) => {
|
|
356
|
+
for (let r = 0; r < n; r++) i[r] = s[r](o);
|
|
357
|
+
return i;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function Io(t, e) {
|
|
361
|
+
const i = {
|
|
362
|
+
...t,
|
|
363
|
+
...e
|
|
364
|
+
}, n = {};
|
|
365
|
+
for (const s in i) t[s] !== void 0 && e[s] !== void 0 && (n[s] = di(t[s])(t[s], e[s]));
|
|
366
|
+
return (s) => {
|
|
367
|
+
for (const o in n) i[o] = n[o](s);
|
|
368
|
+
return i;
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function Fo(t, e) {
|
|
372
|
+
const i = [], n = {
|
|
373
|
+
color: 0,
|
|
374
|
+
var: 0,
|
|
375
|
+
number: 0
|
|
376
|
+
};
|
|
377
|
+
for (let s = 0; s < e.values.length; s++) {
|
|
378
|
+
const o = e.types[s], r = t.indexes[o][n[o]];
|
|
379
|
+
i[s] = t.values[r] ?? 0, n[o]++;
|
|
380
|
+
}
|
|
381
|
+
return i;
|
|
382
|
+
}
|
|
383
|
+
var Oo = (t, e) => {
|
|
384
|
+
const i = G.createTransformer(e), n = At(t), s = At(e);
|
|
385
|
+
return n.indexes.var.length === s.indexes.var.length && n.indexes.color.length === s.indexes.color.length && n.indexes.number.length >= s.indexes.number.length ? Be.has(t) && !s.values.length || Be.has(e) && !n.values.length ? ko(t, e) : Wt(Ps(Fo(n, s), s.values), i) : (Ct(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), se(t, e));
|
|
386
|
+
};
|
|
387
|
+
function Ss(t, e, i) {
|
|
388
|
+
return typeof t == "number" && typeof e == "number" && typeof i == "number" ? V(t, e, i) : di(t)(t, e);
|
|
389
|
+
}
|
|
390
|
+
var jo = (t) => {
|
|
391
|
+
const e = ({ timestamp: i }) => t(i);
|
|
392
|
+
return {
|
|
393
|
+
start: (i = !0) => A.update(e, i),
|
|
394
|
+
stop: () => ot(e),
|
|
395
|
+
now: () => B.isProcessing ? B.timestamp : O.now()
|
|
396
|
+
};
|
|
397
|
+
}, bs = (t, e, i = 10) => {
|
|
398
|
+
let n = "";
|
|
399
|
+
const s = Math.max(Math.round(e / i), 2);
|
|
400
|
+
for (let o = 0; o < s; o++) n += Math.round(t(o / (s - 1)) * 1e4) / 1e4 + ", ";
|
|
401
|
+
return `linear(${n.substring(0, n.length - 2)})`;
|
|
402
|
+
}, As = 2e4;
|
|
403
|
+
function pi(t) {
|
|
404
|
+
let e = 0;
|
|
405
|
+
const i = 50;
|
|
406
|
+
let n = t.next(e);
|
|
407
|
+
for (; !n.done && e < 2e4; )
|
|
408
|
+
e += i, n = t.next(e);
|
|
409
|
+
return e >= 2e4 ? 1 / 0 : e;
|
|
410
|
+
}
|
|
411
|
+
function No(t, e = 100, i) {
|
|
412
|
+
const n = i({
|
|
413
|
+
...t,
|
|
414
|
+
keyframes: [0, e]
|
|
415
|
+
}), s = Math.min(pi(n), As);
|
|
416
|
+
return {
|
|
417
|
+
type: "keyframes",
|
|
418
|
+
ease: (o) => n.next(s * o).value / e,
|
|
419
|
+
duration: K(s)
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
var M = {
|
|
423
|
+
stiffness: 100,
|
|
424
|
+
damping: 10,
|
|
425
|
+
mass: 1,
|
|
426
|
+
velocity: 0,
|
|
427
|
+
duration: 800,
|
|
428
|
+
bounce: 0.3,
|
|
429
|
+
visualDuration: 0.3,
|
|
430
|
+
restSpeed: {
|
|
431
|
+
granular: 0.01,
|
|
432
|
+
default: 2
|
|
433
|
+
},
|
|
434
|
+
restDelta: {
|
|
435
|
+
granular: 5e-3,
|
|
436
|
+
default: 0.5
|
|
437
|
+
},
|
|
438
|
+
minDuration: 0.01,
|
|
439
|
+
maxDuration: 10,
|
|
440
|
+
minDamping: 0.05,
|
|
441
|
+
maxDamping: 1
|
|
442
|
+
};
|
|
443
|
+
function Ie(t, e) {
|
|
444
|
+
return t * Math.sqrt(1 - e * e);
|
|
445
|
+
}
|
|
446
|
+
var Uo = 12;
|
|
447
|
+
function Wo(t, e, i) {
|
|
448
|
+
let n = i;
|
|
449
|
+
for (let s = 1; s < Uo; s++) n = n - t(n) / e(n);
|
|
450
|
+
return n;
|
|
451
|
+
}
|
|
452
|
+
var xe = 1e-3;
|
|
453
|
+
function _o({ duration: t = M.duration, bounce: e = M.bounce, velocity: i = M.velocity, mass: n = M.mass }) {
|
|
454
|
+
let s, o;
|
|
455
|
+
Ct(t <= W(M.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
456
|
+
let r = 1 - e;
|
|
457
|
+
r = tt(M.minDamping, M.maxDamping, r), t = tt(M.minDuration, M.maxDuration, K(t)), r < 1 ? (s = (c) => {
|
|
458
|
+
const u = c * r, h = u * t, f = u - i, p = Ie(c, r), d = Math.exp(-h);
|
|
459
|
+
return xe - f / p * d;
|
|
460
|
+
}, o = (c) => {
|
|
461
|
+
const u = c * r * t, h = u * i + i, f = Math.pow(r, 2) * Math.pow(c, 2) * t, p = Math.exp(-u), d = Ie(Math.pow(c, 2), r);
|
|
462
|
+
return (-s(c) + xe > 0 ? -1 : 1) * ((h - f) * p) / d;
|
|
463
|
+
}) : (s = (c) => {
|
|
464
|
+
const u = Math.exp(-c * t), h = (c - i) * t + 1;
|
|
465
|
+
return -xe + u * h;
|
|
466
|
+
}, o = (c) => Math.exp(-c * t) * ((i - c) * (t * t)));
|
|
467
|
+
const a = 5 / t, l = Wo(s, o, a);
|
|
468
|
+
if (t = W(t), isNaN(l)) return {
|
|
469
|
+
stiffness: M.stiffness,
|
|
470
|
+
damping: M.damping,
|
|
471
|
+
duration: t
|
|
472
|
+
};
|
|
473
|
+
{
|
|
474
|
+
const c = Math.pow(l, 2) * n;
|
|
475
|
+
return {
|
|
476
|
+
stiffness: c,
|
|
477
|
+
damping: r * 2 * Math.sqrt(n * c),
|
|
478
|
+
duration: t
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
var Ko = ["duration", "bounce"], $o = [
|
|
483
|
+
"stiffness",
|
|
484
|
+
"damping",
|
|
485
|
+
"mass"
|
|
486
|
+
];
|
|
487
|
+
function Ni(t, e) {
|
|
488
|
+
return e.some((i) => t[i] !== void 0);
|
|
489
|
+
}
|
|
490
|
+
function zo(t) {
|
|
491
|
+
let e = {
|
|
492
|
+
velocity: M.velocity,
|
|
493
|
+
stiffness: M.stiffness,
|
|
494
|
+
damping: M.damping,
|
|
495
|
+
mass: M.mass,
|
|
496
|
+
isResolvedFromDuration: !1,
|
|
497
|
+
...t
|
|
498
|
+
};
|
|
499
|
+
if (!Ni(t, $o) && Ni(t, Ko))
|
|
500
|
+
if (e.velocity = 0, t.visualDuration) {
|
|
501
|
+
const i = t.visualDuration, n = 2 * Math.PI / (i * 1.2), s = n * n, o = 2 * tt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
|
|
502
|
+
e = {
|
|
503
|
+
...e,
|
|
504
|
+
mass: M.mass,
|
|
505
|
+
stiffness: s,
|
|
506
|
+
damping: o
|
|
507
|
+
};
|
|
508
|
+
} else {
|
|
509
|
+
const i = _o({
|
|
510
|
+
...t,
|
|
511
|
+
velocity: 0
|
|
512
|
+
});
|
|
513
|
+
e = {
|
|
514
|
+
...e,
|
|
515
|
+
...i,
|
|
516
|
+
mass: M.mass
|
|
517
|
+
}, e.isResolvedFromDuration = !0;
|
|
518
|
+
}
|
|
519
|
+
return e;
|
|
520
|
+
}
|
|
521
|
+
function re(t = M.visualDuration, e = M.bounce) {
|
|
522
|
+
const i = typeof t != "object" ? {
|
|
523
|
+
visualDuration: t,
|
|
524
|
+
keyframes: [0, 1],
|
|
525
|
+
bounce: e
|
|
526
|
+
} : t;
|
|
527
|
+
let { restSpeed: n, restDelta: s } = i;
|
|
528
|
+
const o = i.keyframes[0], r = i.keyframes[i.keyframes.length - 1], a = {
|
|
529
|
+
done: !1,
|
|
530
|
+
value: o
|
|
531
|
+
}, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } = zo({
|
|
532
|
+
...i,
|
|
533
|
+
velocity: -K(i.velocity || 0)
|
|
534
|
+
}), d = f || 0, v = c / (2 * Math.sqrt(l * u)), g = r - o, m = K(Math.sqrt(l / u)), x = Math.abs(g) < 5;
|
|
535
|
+
n || (n = x ? M.restSpeed.granular : M.restSpeed.default), s || (s = x ? M.restDelta.granular : M.restDelta.default);
|
|
536
|
+
let y, w, b, E, L, P;
|
|
537
|
+
if (v < 1)
|
|
538
|
+
b = Ie(m, v), E = (d + v * m * g) / b, y = (S) => r - Math.exp(-v * m * S) * (E * Math.sin(b * S) + g * Math.cos(b * S)), L = v * m * E + g * b, P = v * m * g - E * b, w = (S) => Math.exp(-v * m * S) * (L * Math.sin(b * S) + P * Math.cos(b * S));
|
|
539
|
+
else if (v === 1) {
|
|
540
|
+
y = (F) => r - Math.exp(-m * F) * (g + (d + m * g) * F);
|
|
541
|
+
const S = d + m * g;
|
|
542
|
+
w = (F) => Math.exp(-m * F) * (m * S * F - d);
|
|
543
|
+
} else {
|
|
544
|
+
const S = m * Math.sqrt(v * v - 1);
|
|
545
|
+
y = (X) => {
|
|
546
|
+
const et = Math.exp(-v * m * X), Y = Math.min(S * X, 300);
|
|
547
|
+
return r - et * ((d + v * m * g) * Math.sinh(Y) + S * g * Math.cosh(Y)) / S;
|
|
548
|
+
};
|
|
549
|
+
const F = (d + v * m * g) / S, N = v * m * F - g * S, lt = v * m * g - F * S;
|
|
550
|
+
w = (X) => {
|
|
551
|
+
const et = Math.exp(-v * m * X), Y = Math.min(S * X, 300);
|
|
552
|
+
return et * (N * Math.sinh(Y) + lt * Math.cosh(Y));
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
const C = {
|
|
556
|
+
calculatedDuration: p && h || null,
|
|
557
|
+
velocity: (S) => W(w(S)),
|
|
558
|
+
next: (S) => {
|
|
559
|
+
if (!p && v < 1) {
|
|
560
|
+
const N = Math.exp(-v * m * S), lt = Math.sin(b * S), X = Math.cos(b * S), et = r - N * (E * lt + g * X), Y = W(N * (L * lt + P * X));
|
|
561
|
+
return a.done = Math.abs(Y) <= n && Math.abs(r - et) <= s, a.value = a.done ? r : et, a;
|
|
562
|
+
}
|
|
563
|
+
const F = y(S);
|
|
564
|
+
if (p)
|
|
565
|
+
a.done = S >= h;
|
|
566
|
+
else {
|
|
567
|
+
const N = W(w(S));
|
|
568
|
+
a.done = Math.abs(N) <= n && Math.abs(r - F) <= s;
|
|
569
|
+
}
|
|
570
|
+
return a.value = a.done ? r : F, a;
|
|
571
|
+
},
|
|
572
|
+
toString: () => {
|
|
573
|
+
const S = Math.min(pi(C), As), F = bs((N) => C.next(S * N).value, S, 30);
|
|
574
|
+
return S + "ms " + F;
|
|
575
|
+
},
|
|
576
|
+
toTransition: () => {
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
return C;
|
|
580
|
+
}
|
|
581
|
+
re.applyToOptions = (t) => {
|
|
582
|
+
const e = No(t, 100, re);
|
|
583
|
+
return t.ease = e.ease, t.duration = W(e.duration), t.type = "keyframes", t;
|
|
584
|
+
};
|
|
585
|
+
var Ho = 5;
|
|
586
|
+
function Vs(t, e, i) {
|
|
587
|
+
const n = Math.max(e - Ho, 0);
|
|
588
|
+
return ss(i - t(n), e - n);
|
|
589
|
+
}
|
|
590
|
+
function Fe({ keyframes: t, velocity: e = 0, power: i = 0.8, timeConstant: n = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
591
|
+
const h = t[0], f = {
|
|
592
|
+
done: !1,
|
|
593
|
+
value: h
|
|
594
|
+
}, p = (P) => a !== void 0 && P < a || l !== void 0 && P > l, d = (P) => a === void 0 ? l : l === void 0 || Math.abs(a - P) < Math.abs(l - P) ? a : l;
|
|
595
|
+
let v = i * e;
|
|
596
|
+
const g = h + v, m = r === void 0 ? g : r(g);
|
|
597
|
+
m !== g && (v = m - h);
|
|
598
|
+
const x = (P) => -v * Math.exp(-P / n), y = (P) => m + x(P), w = (P) => {
|
|
599
|
+
const C = x(P), S = y(P);
|
|
600
|
+
f.done = Math.abs(C) <= c, f.value = f.done ? m : S;
|
|
601
|
+
};
|
|
602
|
+
let b, E;
|
|
603
|
+
const L = (P) => {
|
|
604
|
+
p(f.value) && (b = P, E = re({
|
|
605
|
+
keyframes: [f.value, d(f.value)],
|
|
606
|
+
velocity: Vs(y, P, f.value),
|
|
607
|
+
damping: s,
|
|
608
|
+
stiffness: o,
|
|
609
|
+
restDelta: c,
|
|
610
|
+
restSpeed: u
|
|
611
|
+
}));
|
|
612
|
+
};
|
|
613
|
+
return L(0), {
|
|
614
|
+
calculatedDuration: null,
|
|
615
|
+
next: (P) => {
|
|
616
|
+
let C = !1;
|
|
617
|
+
return !E && b === void 0 && (C = !0, w(P), L(P)), b !== void 0 && P >= b ? E.next(P - b) : (!C && w(P), f);
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
function Go(t, e, i) {
|
|
622
|
+
const n = [], s = i || rt.mix || Ss, o = t.length - 1;
|
|
623
|
+
for (let r = 0; r < o; r++) {
|
|
624
|
+
let a = s(t[r], t[r + 1]);
|
|
625
|
+
e && (a = Wt(Array.isArray(e) ? e[r] || $ : e, a)), n.push(a);
|
|
626
|
+
}
|
|
627
|
+
return n;
|
|
628
|
+
}
|
|
629
|
+
function Xo(t, e, { clamp: i = !0, ease: n, mixer: s } = {}) {
|
|
630
|
+
const o = t.length;
|
|
631
|
+
if (it(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1) return () => e[0];
|
|
632
|
+
if (o === 2 && e[0] === e[1]) return () => e[1];
|
|
633
|
+
const r = t[0] === t[1];
|
|
634
|
+
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
635
|
+
const a = Go(e, n, s), l = a.length, c = (u) => {
|
|
636
|
+
if (r && u < t[0]) return e[0];
|
|
637
|
+
let h = 0;
|
|
638
|
+
if (l > 1)
|
|
639
|
+
for (; h < t.length - 2 && !(u < t[h + 1]); h++) ;
|
|
640
|
+
const f = Ot(t[h], t[h + 1], u);
|
|
641
|
+
return a[h](f);
|
|
642
|
+
};
|
|
643
|
+
return i ? (u) => c(tt(t[0], t[o - 1], u)) : c;
|
|
644
|
+
}
|
|
645
|
+
function Yo(t, e) {
|
|
646
|
+
const i = t[t.length - 1];
|
|
647
|
+
for (let n = 1; n <= e; n++) {
|
|
648
|
+
const s = Ot(0, e, n);
|
|
649
|
+
t.push(V(i, 1, s));
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
function qo(t) {
|
|
653
|
+
const e = [0];
|
|
654
|
+
return Yo(e, t.length - 1), e;
|
|
655
|
+
}
|
|
656
|
+
function Zo(t, e) {
|
|
657
|
+
return t.map((i) => i * e);
|
|
658
|
+
}
|
|
659
|
+
function Jo(t, e) {
|
|
660
|
+
return t.map(() => e || ds).splice(0, t.length - 1);
|
|
661
|
+
}
|
|
662
|
+
function Pt({ duration: t = 300, keyframes: e, times: i, ease: n = "easeInOut" }) {
|
|
663
|
+
const s = oo(n) ? n.map(ki) : ki(n), o = {
|
|
664
|
+
done: !1,
|
|
665
|
+
value: e[0]
|
|
666
|
+
}, r = Xo(Zo(i && i.length === e.length ? i : qo(e), t), e, { ease: Array.isArray(s) ? s : Jo(e, s) });
|
|
667
|
+
return {
|
|
668
|
+
calculatedDuration: t,
|
|
669
|
+
next: (a) => (o.value = r(a), o.done = a >= t, o)
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
var Qo = (t) => t !== null;
|
|
673
|
+
function fe(t, { repeat: e, repeatType: i = "loop" }, n, s = 1) {
|
|
674
|
+
const o = t.filter(Qo), r = s < 0 || e && i !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
|
|
675
|
+
return !r || n === void 0 ? o[r] : n;
|
|
676
|
+
}
|
|
677
|
+
var ta = {
|
|
678
|
+
decay: Fe,
|
|
679
|
+
inertia: Fe,
|
|
680
|
+
tween: Pt,
|
|
681
|
+
keyframes: Pt,
|
|
682
|
+
spring: re
|
|
683
|
+
};
|
|
684
|
+
function Ms(t) {
|
|
685
|
+
typeof t.type == "string" && (t.type = ta[t.type]);
|
|
686
|
+
}
|
|
687
|
+
var mi = class {
|
|
688
|
+
constructor() {
|
|
689
|
+
this.updateFinished();
|
|
690
|
+
}
|
|
691
|
+
get finished() {
|
|
692
|
+
return this._finished;
|
|
693
|
+
}
|
|
694
|
+
updateFinished() {
|
|
695
|
+
this._finished = new Promise((t) => {
|
|
696
|
+
this.resolve = t;
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
notifyFinished() {
|
|
700
|
+
this.resolve();
|
|
701
|
+
}
|
|
702
|
+
then(t, e) {
|
|
703
|
+
return this.finished.then(t, e);
|
|
704
|
+
}
|
|
705
|
+
}, ea = (t) => t / 100, oe = class extends mi {
|
|
706
|
+
constructor(t) {
|
|
707
|
+
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
708
|
+
done: !1,
|
|
709
|
+
value: void 0
|
|
710
|
+
}, this.stop = () => {
|
|
711
|
+
const { motionValue: e } = this.options;
|
|
712
|
+
e && e.updatedAt !== O.now() && this.tick(O.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
|
|
713
|
+
}, vt.mainThread++, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
714
|
+
}
|
|
715
|
+
initAnimation() {
|
|
716
|
+
const { options: t } = this;
|
|
717
|
+
Ms(t);
|
|
718
|
+
const { type: e = Pt, repeat: i = 0, repeatDelay: n = 0, repeatType: s, velocity: o = 0 } = t;
|
|
719
|
+
let { keyframes: r } = t;
|
|
720
|
+
const a = e || Pt;
|
|
721
|
+
process.env.NODE_ENV !== "production" && a !== Pt && it(r.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`, "spring-two-frames"), a !== Pt && typeof r[0] != "number" && (this.mixKeyframes = Wt(ea, Ss(r[0], r[1])), r = [0, 100]);
|
|
722
|
+
const l = a({
|
|
723
|
+
...t,
|
|
724
|
+
keyframes: r
|
|
725
|
+
});
|
|
726
|
+
s === "mirror" && (this.mirroredGenerator = a({
|
|
727
|
+
...t,
|
|
728
|
+
keyframes: [...r].reverse(),
|
|
729
|
+
velocity: -o
|
|
730
|
+
})), l.calculatedDuration === null && (l.calculatedDuration = pi(l));
|
|
731
|
+
const { calculatedDuration: c } = l;
|
|
732
|
+
this.calculatedDuration = c, this.resolvedDuration = c + n, this.totalDuration = this.resolvedDuration * (i + 1) - n, this.generator = l;
|
|
733
|
+
}
|
|
734
|
+
updateTime(t) {
|
|
735
|
+
const e = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
736
|
+
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = e;
|
|
737
|
+
}
|
|
738
|
+
tick(t, e = !1) {
|
|
739
|
+
const { generator: i, totalDuration: n, mixKeyframes: s, mirroredGenerator: o, resolvedDuration: r, calculatedDuration: a } = this;
|
|
740
|
+
if (this.startTime === null) return i.next(0);
|
|
741
|
+
const { delay: l = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: f, type: p, onUpdate: d, finalKeyframe: v } = this.options;
|
|
742
|
+
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - n / this.speed, this.startTime)), e ? this.currentTime = t : this.updateTime(t);
|
|
743
|
+
const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), m = this.playbackSpeed >= 0 ? g < 0 : g > n;
|
|
744
|
+
this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = n);
|
|
745
|
+
let x = this.currentTime, y = i;
|
|
746
|
+
if (u) {
|
|
747
|
+
const L = Math.min(this.currentTime, n) / r;
|
|
748
|
+
let P = Math.floor(L), C = L % 1;
|
|
749
|
+
!C && L >= 1 && (C = 1), C === 1 && P--, P = Math.min(P, u + 1), P % 2 && (h === "reverse" ? (C = 1 - C, f && (C -= f / r)) : h === "mirror" && (y = o)), x = tt(0, 1, C) * r;
|
|
750
|
+
}
|
|
751
|
+
let w;
|
|
752
|
+
m ? (this.delayState.value = c[0], w = this.delayState) : w = y.next(x), s && !m && (w.value = s(w.value));
|
|
753
|
+
let { done: b } = w;
|
|
754
|
+
!m && a !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= n : this.currentTime <= 0);
|
|
755
|
+
const E = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
|
|
756
|
+
return E && p !== Fe && (w.value = fe(c, this.options, v, this.speed)), d && d(w.value), E && this.finish(), w;
|
|
757
|
+
}
|
|
758
|
+
then(t, e) {
|
|
759
|
+
return this.finished.then(t, e);
|
|
760
|
+
}
|
|
761
|
+
get duration() {
|
|
762
|
+
return K(this.calculatedDuration);
|
|
763
|
+
}
|
|
764
|
+
get iterationDuration() {
|
|
765
|
+
const { delay: t = 0 } = this.options || {};
|
|
766
|
+
return this.duration + K(t);
|
|
767
|
+
}
|
|
768
|
+
get time() {
|
|
769
|
+
return K(this.currentTime);
|
|
770
|
+
}
|
|
771
|
+
set time(t) {
|
|
772
|
+
t = W(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
773
|
+
}
|
|
774
|
+
getGeneratorVelocity() {
|
|
775
|
+
const t = this.currentTime;
|
|
776
|
+
if (t <= 0) return this.options.velocity || 0;
|
|
777
|
+
if (this.generator.velocity) return this.generator.velocity(t);
|
|
778
|
+
const e = this.generator.next(t).value;
|
|
779
|
+
return Vs((i) => this.generator.next(i).value, t, e);
|
|
780
|
+
}
|
|
781
|
+
get speed() {
|
|
782
|
+
return this.playbackSpeed;
|
|
783
|
+
}
|
|
784
|
+
set speed(t) {
|
|
785
|
+
const e = this.playbackSpeed !== t;
|
|
786
|
+
e && this.driver && this.updateTime(O.now()), this.playbackSpeed = t, e && this.driver && (this.time = K(this.currentTime));
|
|
787
|
+
}
|
|
788
|
+
play() {
|
|
789
|
+
if (this.isStopped) return;
|
|
790
|
+
const { driver: t = jo, startTime: e } = this.options;
|
|
791
|
+
this.driver || (this.driver = t((n) => this.tick(n))), this.options.onPlay?.();
|
|
792
|
+
const i = this.driver.now();
|
|
793
|
+
this.state === "finished" ? (this.updateFinished(), this.startTime = i) : this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime || (this.startTime = e ?? i), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
794
|
+
}
|
|
795
|
+
pause() {
|
|
796
|
+
this.state = "paused", this.updateTime(O.now()), this.holdTime = this.currentTime;
|
|
797
|
+
}
|
|
798
|
+
complete() {
|
|
799
|
+
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
800
|
+
}
|
|
801
|
+
finish() {
|
|
802
|
+
this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
|
|
803
|
+
}
|
|
804
|
+
cancel() {
|
|
805
|
+
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
|
|
806
|
+
}
|
|
807
|
+
teardown() {
|
|
808
|
+
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null, vt.mainThread--;
|
|
809
|
+
}
|
|
810
|
+
stopDriver() {
|
|
811
|
+
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
812
|
+
}
|
|
813
|
+
sample(t) {
|
|
814
|
+
return this.startTime = 0, this.tick(t, !0);
|
|
815
|
+
}
|
|
816
|
+
attachTimeline(t) {
|
|
817
|
+
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
function ia(t) {
|
|
821
|
+
for (let e = 1; e < t.length; e++) t[e] ?? (t[e] = t[e - 1]);
|
|
822
|
+
}
|
|
823
|
+
var mt = (t) => t * 180 / Math.PI, Oe = (t) => je(mt(Math.atan2(t[1], t[0]))), na = {
|
|
824
|
+
x: 4,
|
|
825
|
+
y: 5,
|
|
826
|
+
translateX: 4,
|
|
827
|
+
translateY: 5,
|
|
828
|
+
scaleX: 0,
|
|
829
|
+
scaleY: 3,
|
|
830
|
+
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
831
|
+
rotate: Oe,
|
|
832
|
+
rotateZ: Oe,
|
|
833
|
+
skewX: (t) => mt(Math.atan(t[1])),
|
|
834
|
+
skewY: (t) => mt(Math.atan(t[2])),
|
|
835
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
836
|
+
}, je = (t) => (t = t % 360, t < 0 && (t += 360), t), Ui = Oe, Wi = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), _i = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), sa = {
|
|
837
|
+
x: 12,
|
|
838
|
+
y: 13,
|
|
839
|
+
z: 14,
|
|
840
|
+
translateX: 12,
|
|
841
|
+
translateY: 13,
|
|
842
|
+
translateZ: 14,
|
|
843
|
+
scaleX: Wi,
|
|
844
|
+
scaleY: _i,
|
|
845
|
+
scale: (t) => (Wi(t) + _i(t)) / 2,
|
|
846
|
+
rotateX: (t) => je(mt(Math.atan2(t[6], t[5]))),
|
|
847
|
+
rotateY: (t) => je(mt(Math.atan2(-t[2], t[0]))),
|
|
848
|
+
rotateZ: Ui,
|
|
849
|
+
rotate: Ui,
|
|
850
|
+
skewX: (t) => mt(Math.atan(t[4])),
|
|
851
|
+
skewY: (t) => mt(Math.atan(t[1])),
|
|
852
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
853
|
+
};
|
|
854
|
+
function Ne(t) {
|
|
855
|
+
return t.includes("scale") ? 1 : 0;
|
|
856
|
+
}
|
|
857
|
+
function Ue(t, e) {
|
|
858
|
+
if (!t || t === "none") return Ne(e);
|
|
859
|
+
const i = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
860
|
+
let n, s;
|
|
861
|
+
if (i)
|
|
862
|
+
n = sa, s = i;
|
|
863
|
+
else {
|
|
864
|
+
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
865
|
+
n = na, s = a;
|
|
866
|
+
}
|
|
867
|
+
if (!s) return Ne(e);
|
|
868
|
+
const o = n[e], r = s[1].split(",").map(oa);
|
|
869
|
+
return typeof o == "function" ? o(r) : r[o];
|
|
870
|
+
}
|
|
871
|
+
var ra = (t, e) => {
|
|
872
|
+
const { transform: i = "none" } = getComputedStyle(t);
|
|
873
|
+
return Ue(i, e);
|
|
874
|
+
};
|
|
875
|
+
function oa(t) {
|
|
876
|
+
return parseFloat(t.trim());
|
|
877
|
+
}
|
|
878
|
+
var Et = [
|
|
879
|
+
"transformPerspective",
|
|
880
|
+
"x",
|
|
881
|
+
"y",
|
|
882
|
+
"z",
|
|
883
|
+
"translateX",
|
|
884
|
+
"translateY",
|
|
885
|
+
"translateZ",
|
|
886
|
+
"scale",
|
|
887
|
+
"scaleX",
|
|
888
|
+
"scaleY",
|
|
889
|
+
"rotate",
|
|
890
|
+
"rotateX",
|
|
891
|
+
"rotateY",
|
|
892
|
+
"rotateZ",
|
|
893
|
+
"skew",
|
|
894
|
+
"skewX",
|
|
895
|
+
"skewY"
|
|
896
|
+
], Rt = new Set(Et), Ki = (t) => t === Dt || t === T, aa = /* @__PURE__ */ new Set([
|
|
897
|
+
"x",
|
|
898
|
+
"y",
|
|
899
|
+
"z"
|
|
900
|
+
]), la = Et.filter((t) => !aa.has(t));
|
|
901
|
+
function ua(t) {
|
|
902
|
+
const e = [];
|
|
903
|
+
return la.forEach((i) => {
|
|
904
|
+
const n = t.getValue(i);
|
|
905
|
+
n !== void 0 && (e.push([i, n.get()]), n.set(i.startsWith("scale") ? 1 : 0));
|
|
906
|
+
}), e;
|
|
907
|
+
}
|
|
908
|
+
var st = {
|
|
909
|
+
width: ({ x: t }, { paddingLeft: e = "0", paddingRight: i = "0", boxSizing: n }) => {
|
|
910
|
+
const s = t.max - t.min;
|
|
911
|
+
return n === "border-box" ? s : s - parseFloat(e) - parseFloat(i);
|
|
912
|
+
},
|
|
913
|
+
height: ({ y: t }, { paddingTop: e = "0", paddingBottom: i = "0", boxSizing: n }) => {
|
|
914
|
+
const s = t.max - t.min;
|
|
915
|
+
return n === "border-box" ? s : s - parseFloat(e) - parseFloat(i);
|
|
916
|
+
},
|
|
917
|
+
top: (t, { top: e }) => parseFloat(e),
|
|
918
|
+
left: (t, { left: e }) => parseFloat(e),
|
|
919
|
+
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
920
|
+
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
921
|
+
x: (t, { transform: e }) => Ue(e, "x"),
|
|
922
|
+
y: (t, { transform: e }) => Ue(e, "y")
|
|
923
|
+
};
|
|
924
|
+
st.translateX = st.x;
|
|
925
|
+
st.translateY = st.y;
|
|
926
|
+
var gt = /* @__PURE__ */ new Set(), We = !1, _e = !1, Ke = !1;
|
|
927
|
+
function Cs() {
|
|
928
|
+
if (_e) {
|
|
929
|
+
const t = Array.from(gt).filter((n) => n.needsMeasurement), e = new Set(t.map((n) => n.element)), i = /* @__PURE__ */ new Map();
|
|
930
|
+
e.forEach((n) => {
|
|
931
|
+
const s = ua(n);
|
|
932
|
+
s.length && (i.set(n, s), n.render());
|
|
933
|
+
}), t.forEach((n) => n.measureInitialState()), e.forEach((n) => {
|
|
934
|
+
n.render();
|
|
935
|
+
const s = i.get(n);
|
|
936
|
+
s && s.forEach(([o, r]) => {
|
|
937
|
+
n.getValue(o)?.set(r);
|
|
938
|
+
});
|
|
939
|
+
}), t.forEach((n) => n.measureEndState()), t.forEach((n) => {
|
|
940
|
+
n.suspendedScrollY !== void 0 && window.scrollTo(0, n.suspendedScrollY);
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
_e = !1, We = !1, gt.forEach((t) => t.complete(Ke)), gt.clear();
|
|
944
|
+
}
|
|
945
|
+
function Ds() {
|
|
946
|
+
gt.forEach((t) => {
|
|
947
|
+
t.readKeyframes(), t.needsMeasurement && (_e = !0);
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
function ca() {
|
|
951
|
+
Ke = !0, Ds(), Cs(), Ke = !1;
|
|
952
|
+
}
|
|
953
|
+
var vi = class {
|
|
954
|
+
constructor(t, e, i, n, s, o = !1) {
|
|
955
|
+
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = e, this.name = i, this.motionValue = n, this.element = s, this.isAsync = o;
|
|
956
|
+
}
|
|
957
|
+
scheduleResolve() {
|
|
958
|
+
this.state = "scheduled", this.isAsync ? (gt.add(this), We || (We = !0, A.read(Ds), A.resolveKeyframes(Cs))) : (this.readKeyframes(), this.complete());
|
|
959
|
+
}
|
|
960
|
+
readKeyframes() {
|
|
961
|
+
const { unresolvedKeyframes: t, name: e, element: i, motionValue: n } = this;
|
|
962
|
+
if (t[0] === null) {
|
|
963
|
+
const s = n?.get(), o = t[t.length - 1];
|
|
964
|
+
if (s !== void 0) t[0] = s;
|
|
965
|
+
else if (i && e) {
|
|
966
|
+
const r = i.readValue(e, o);
|
|
967
|
+
r != null && (t[0] = r);
|
|
968
|
+
}
|
|
969
|
+
t[0] === void 0 && (t[0] = o), n && s === void 0 && n.set(t[0]);
|
|
970
|
+
}
|
|
971
|
+
ia(t);
|
|
972
|
+
}
|
|
973
|
+
setFinalKeyframe() {
|
|
974
|
+
}
|
|
975
|
+
measureInitialState() {
|
|
976
|
+
}
|
|
977
|
+
renderEndStyles() {
|
|
978
|
+
}
|
|
979
|
+
measureEndState() {
|
|
980
|
+
}
|
|
981
|
+
complete(t = !1) {
|
|
982
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), gt.delete(this);
|
|
983
|
+
}
|
|
984
|
+
cancel() {
|
|
985
|
+
this.state === "scheduled" && (gt.delete(this), this.state = "pending");
|
|
986
|
+
}
|
|
987
|
+
resume() {
|
|
988
|
+
this.state === "pending" && this.scheduleResolve();
|
|
989
|
+
}
|
|
990
|
+
}, ha = (t) => t.startsWith("--");
|
|
991
|
+
function Es(t, e, i) {
|
|
992
|
+
ha(e) ? t.style.setProperty(e, i) : t.style[e] = i;
|
|
993
|
+
}
|
|
994
|
+
var fa = {};
|
|
995
|
+
function Rs(t, e) {
|
|
996
|
+
const i = /* @__PURE__ */ ns(t);
|
|
997
|
+
return () => fa[e] ?? i();
|
|
998
|
+
}
|
|
999
|
+
var da = /* @__PURE__ */ Rs(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Ls = /* @__PURE__ */ Rs(() => {
|
|
1000
|
+
try {
|
|
1001
|
+
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1002
|
+
} catch {
|
|
1003
|
+
return !1;
|
|
1004
|
+
}
|
|
1005
|
+
return !0;
|
|
1006
|
+
}, "linearEasing"), kt = ([t, e, i, n]) => `cubic-bezier(${t}, ${e}, ${i}, ${n})`, $i = {
|
|
1007
|
+
linear: "linear",
|
|
1008
|
+
ease: "ease",
|
|
1009
|
+
easeIn: "ease-in",
|
|
1010
|
+
easeOut: "ease-out",
|
|
1011
|
+
easeInOut: "ease-in-out",
|
|
1012
|
+
circIn: /* @__PURE__ */ kt([
|
|
1013
|
+
0,
|
|
1014
|
+
0.65,
|
|
1015
|
+
0.55,
|
|
1016
|
+
1
|
|
1017
|
+
]),
|
|
1018
|
+
circOut: /* @__PURE__ */ kt([
|
|
1019
|
+
0.55,
|
|
1020
|
+
0,
|
|
1021
|
+
1,
|
|
1022
|
+
0.45
|
|
1023
|
+
]),
|
|
1024
|
+
backIn: /* @__PURE__ */ kt([
|
|
1025
|
+
0.31,
|
|
1026
|
+
0.01,
|
|
1027
|
+
0.66,
|
|
1028
|
+
-0.59
|
|
1029
|
+
]),
|
|
1030
|
+
backOut: /* @__PURE__ */ kt([
|
|
1031
|
+
0.33,
|
|
1032
|
+
1.53,
|
|
1033
|
+
0.69,
|
|
1034
|
+
0.99
|
|
1035
|
+
])
|
|
1036
|
+
};
|
|
1037
|
+
function ks(t, e) {
|
|
1038
|
+
if (t) return typeof t == "function" ? Ls() ? bs(t, e) : "ease-out" : ps(t) ? kt(t) : Array.isArray(t) ? t.map((i) => ks(i, e) || $i.easeOut) : $i[t];
|
|
1039
|
+
}
|
|
1040
|
+
function pa(t, e, i, { delay: n = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
|
|
1041
|
+
const u = { [e]: i };
|
|
1042
|
+
l && (u.offset = l);
|
|
1043
|
+
const h = ks(a, s);
|
|
1044
|
+
Array.isArray(h) && (u.easing = h), J.value && vt.waapi++;
|
|
1045
|
+
const f = {
|
|
1046
|
+
delay: n,
|
|
1047
|
+
duration: s,
|
|
1048
|
+
easing: Array.isArray(h) ? "linear" : h,
|
|
1049
|
+
fill: "both",
|
|
1050
|
+
iterations: o + 1,
|
|
1051
|
+
direction: r === "reverse" ? "alternate" : "normal"
|
|
1052
|
+
};
|
|
1053
|
+
c && (f.pseudoElement = c);
|
|
1054
|
+
const p = t.animate(u, f);
|
|
1055
|
+
return J.value && p.finished.finally(() => {
|
|
1056
|
+
vt.waapi--;
|
|
1057
|
+
}), p;
|
|
1058
|
+
}
|
|
1059
|
+
function Bs(t) {
|
|
1060
|
+
return typeof t == "function" && "applyToOptions" in t;
|
|
1061
|
+
}
|
|
1062
|
+
function ma({ type: t, ...e }) {
|
|
1063
|
+
return Bs(t) && Ls() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1064
|
+
}
|
|
1065
|
+
var Is = class extends mi {
|
|
1066
|
+
constructor(t) {
|
|
1067
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t) return;
|
|
1068
|
+
const { element: e, name: i, keyframes: n, pseudoElement: s, allowFlatten: o = !1, finalKeyframe: r, onComplete: a } = t;
|
|
1069
|
+
this.isPseudoElement = !!s, this.allowFlatten = o, this.options = t, it(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1070
|
+
const l = ma(t);
|
|
1071
|
+
this.animation = pa(e, i, n, l, s), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1072
|
+
if (this.finishedTime = this.time, !s) {
|
|
1073
|
+
const c = fe(n, this.options, r, this.speed);
|
|
1074
|
+
this.updateMotionValue && this.updateMotionValue(c), Es(e, i, c), this.animation.cancel();
|
|
1075
|
+
}
|
|
1076
|
+
a?.(), this.notifyFinished();
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
play() {
|
|
1080
|
+
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1081
|
+
}
|
|
1082
|
+
pause() {
|
|
1083
|
+
this.animation.pause();
|
|
1084
|
+
}
|
|
1085
|
+
complete() {
|
|
1086
|
+
this.animation.finish?.();
|
|
1087
|
+
}
|
|
1088
|
+
cancel() {
|
|
1089
|
+
try {
|
|
1090
|
+
this.animation.cancel();
|
|
1091
|
+
} catch {
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
stop() {
|
|
1095
|
+
if (this.isStopped) return;
|
|
1096
|
+
this.isStopped = !0;
|
|
1097
|
+
const { state: t } = this;
|
|
1098
|
+
t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
1099
|
+
}
|
|
1100
|
+
commitStyles() {
|
|
1101
|
+
const t = this.options?.element;
|
|
1102
|
+
!this.isPseudoElement && t?.isConnected && this.animation.commitStyles?.();
|
|
1103
|
+
}
|
|
1104
|
+
get duration() {
|
|
1105
|
+
const t = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
1106
|
+
return K(Number(t));
|
|
1107
|
+
}
|
|
1108
|
+
get iterationDuration() {
|
|
1109
|
+
const { delay: t = 0 } = this.options || {};
|
|
1110
|
+
return this.duration + K(t);
|
|
1111
|
+
}
|
|
1112
|
+
get time() {
|
|
1113
|
+
return K(Number(this.animation.currentTime) || 0);
|
|
1114
|
+
}
|
|
1115
|
+
set time(t) {
|
|
1116
|
+
const e = this.finishedTime !== null;
|
|
1117
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = W(t), e && this.animation.pause();
|
|
1118
|
+
}
|
|
1119
|
+
get speed() {
|
|
1120
|
+
return this.animation.playbackRate;
|
|
1121
|
+
}
|
|
1122
|
+
set speed(t) {
|
|
1123
|
+
t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
|
|
1124
|
+
}
|
|
1125
|
+
get state() {
|
|
1126
|
+
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
1127
|
+
}
|
|
1128
|
+
get startTime() {
|
|
1129
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
1130
|
+
}
|
|
1131
|
+
set startTime(t) {
|
|
1132
|
+
this.manualStartTime = this.animation.startTime = t;
|
|
1133
|
+
}
|
|
1134
|
+
attachTimeline({ timeline: t, rangeStart: e, rangeEnd: i, observe: n }) {
|
|
1135
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && da() ? (this.animation.timeline = t, e && (this.animation.rangeStart = e), i && (this.animation.rangeEnd = i), $) : n(this);
|
|
1136
|
+
}
|
|
1137
|
+
}, Fs = {
|
|
1138
|
+
anticipate: cs,
|
|
1139
|
+
backInOut: us,
|
|
1140
|
+
circInOut: fs
|
|
1141
|
+
};
|
|
1142
|
+
function va(t) {
|
|
1143
|
+
return t in Fs;
|
|
1144
|
+
}
|
|
1145
|
+
function ga(t) {
|
|
1146
|
+
typeof t.ease == "string" && va(t.ease) && (t.ease = Fs[t.ease]);
|
|
1147
|
+
}
|
|
1148
|
+
var we = 10, ya = class extends Is {
|
|
1149
|
+
constructor(t) {
|
|
1150
|
+
ga(t), Ms(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
|
|
1151
|
+
}
|
|
1152
|
+
updateMotionValue(t) {
|
|
1153
|
+
const { motionValue: e, onUpdate: i, onComplete: n, element: s, ...o } = this.options;
|
|
1154
|
+
if (!e) return;
|
|
1155
|
+
if (t !== void 0) {
|
|
1156
|
+
e.set(t);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
const r = new oe({
|
|
1160
|
+
...o,
|
|
1161
|
+
autoplay: !1
|
|
1162
|
+
}), a = Math.max(we, O.now() - this.startTime), l = tt(0, we, a - we), c = r.sample(a).value, { name: u } = this.options;
|
|
1163
|
+
s && u && Es(s, u, c), e.setWithVelocity(r.sample(Math.max(0, a - l)).value, c, l), r.stop();
|
|
1164
|
+
}
|
|
1165
|
+
}, zi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && (G.test(t) || t === "0") && !t.startsWith("url("));
|
|
1166
|
+
function Ta(t) {
|
|
1167
|
+
const e = t[0];
|
|
1168
|
+
if (t.length === 1) return !0;
|
|
1169
|
+
for (let i = 0; i < t.length; i++) if (t[i] !== e) return !0;
|
|
1170
|
+
}
|
|
1171
|
+
function xa(t, e, i, n) {
|
|
1172
|
+
const s = t[0];
|
|
1173
|
+
if (s === null) return !1;
|
|
1174
|
+
if (e === "display" || e === "visibility") return !0;
|
|
1175
|
+
const o = t[t.length - 1], r = zi(s, e), a = zi(o, e);
|
|
1176
|
+
return Ct(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : Ta(t) || (i === "spring" || Bs(i)) && n;
|
|
1177
|
+
}
|
|
1178
|
+
function $e(t) {
|
|
1179
|
+
t.duration = 0, t.type = "keyframes";
|
|
1180
|
+
}
|
|
1181
|
+
var Os = /* @__PURE__ */ new Set([
|
|
1182
|
+
"opacity",
|
|
1183
|
+
"clipPath",
|
|
1184
|
+
"filter",
|
|
1185
|
+
"transform"
|
|
1186
|
+
]), wa = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
1187
|
+
function Pa(t) {
|
|
1188
|
+
for (let e = 0; e < t.length; e++) if (typeof t[e] == "string" && wa.test(t[e])) return !0;
|
|
1189
|
+
return !1;
|
|
1190
|
+
}
|
|
1191
|
+
var Sa = /* @__PURE__ */ new Set([
|
|
1192
|
+
"color",
|
|
1193
|
+
"backgroundColor",
|
|
1194
|
+
"outlineColor",
|
|
1195
|
+
"fill",
|
|
1196
|
+
"stroke",
|
|
1197
|
+
"borderColor",
|
|
1198
|
+
"borderTopColor",
|
|
1199
|
+
"borderRightColor",
|
|
1200
|
+
"borderBottomColor",
|
|
1201
|
+
"borderLeftColor"
|
|
1202
|
+
]), ba = /* @__PURE__ */ ns(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1203
|
+
function Aa(t) {
|
|
1204
|
+
const { motionValue: e, name: i, repeatDelay: n, repeatType: s, damping: o, type: r, keyframes: a } = t;
|
|
1205
|
+
if (!(e?.owner?.current instanceof HTMLElement)) return !1;
|
|
1206
|
+
const { onUpdate: l, transformTemplate: c } = e.owner.getProps();
|
|
1207
|
+
return ba() && i && (Os.has(i) || Sa.has(i) && Pa(a)) && (i !== "transform" || !c) && !l && !n && s !== "mirror" && o !== 0 && r !== "inertia";
|
|
1208
|
+
}
|
|
1209
|
+
var Va = 40, Ma = class extends mi {
|
|
1210
|
+
constructor({ autoplay: t = !0, delay: e = 0, type: i = "keyframes", repeat: n = 0, repeatDelay: s = 0, repeatType: o = "loop", keyframes: r, name: a, motionValue: l, element: c, ...u }) {
|
|
1211
|
+
super(), this.stop = () => {
|
|
1212
|
+
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
1213
|
+
}, this.createdAt = O.now();
|
|
1214
|
+
const h = {
|
|
1215
|
+
autoplay: t,
|
|
1216
|
+
delay: e,
|
|
1217
|
+
type: i,
|
|
1218
|
+
repeat: n,
|
|
1219
|
+
repeatDelay: s,
|
|
1220
|
+
repeatType: o,
|
|
1221
|
+
name: a,
|
|
1222
|
+
motionValue: l,
|
|
1223
|
+
element: c,
|
|
1224
|
+
...u
|
|
1225
|
+
};
|
|
1226
|
+
this.keyframeResolver = new (c?.KeyframeResolver || vi)(r, (f, p, d) => this.onKeyframesResolved(f, p, h, !d), a, l, c), this.keyframeResolver?.scheduleResolve();
|
|
1227
|
+
}
|
|
1228
|
+
onKeyframesResolved(t, e, i, n) {
|
|
1229
|
+
this.keyframeResolver = void 0;
|
|
1230
|
+
const { name: s, type: o, velocity: r, delay: a, isHandoff: l, onUpdate: c } = i;
|
|
1231
|
+
this.resolvedAt = O.now();
|
|
1232
|
+
let u = !0;
|
|
1233
|
+
xa(t, s, o, r) || (u = !1, (rt.instantAnimations || !a) && c?.(fe(t, i, e)), t[0] = t[t.length - 1], $e(i), i.repeat = 0);
|
|
1234
|
+
const h = {
|
|
1235
|
+
startTime: n ? this.resolvedAt ? this.resolvedAt - this.createdAt > Va ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1236
|
+
finalKeyframe: e,
|
|
1237
|
+
...i,
|
|
1238
|
+
keyframes: t
|
|
1239
|
+
}, f = u && !l && Aa(h), p = h.motionValue?.owner?.current;
|
|
1240
|
+
let d;
|
|
1241
|
+
if (f) try {
|
|
1242
|
+
d = new ya({
|
|
1243
|
+
...h,
|
|
1244
|
+
element: p
|
|
1245
|
+
});
|
|
1246
|
+
} catch {
|
|
1247
|
+
d = new oe(h);
|
|
1248
|
+
}
|
|
1249
|
+
else d = new oe(h);
|
|
1250
|
+
d.finished.then(() => {
|
|
1251
|
+
this.notifyFinished();
|
|
1252
|
+
}).catch($), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
|
|
1253
|
+
}
|
|
1254
|
+
get finished() {
|
|
1255
|
+
return this._animation ? this.animation.finished : this._finished;
|
|
1256
|
+
}
|
|
1257
|
+
then(t, e) {
|
|
1258
|
+
return this.finished.finally(t).then(() => {
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
get animation() {
|
|
1262
|
+
return this._animation || (this.keyframeResolver?.resume(), ca()), this._animation;
|
|
1263
|
+
}
|
|
1264
|
+
get duration() {
|
|
1265
|
+
return this.animation.duration;
|
|
1266
|
+
}
|
|
1267
|
+
get iterationDuration() {
|
|
1268
|
+
return this.animation.iterationDuration;
|
|
1269
|
+
}
|
|
1270
|
+
get time() {
|
|
1271
|
+
return this.animation.time;
|
|
1272
|
+
}
|
|
1273
|
+
set time(t) {
|
|
1274
|
+
this.animation.time = t;
|
|
1275
|
+
}
|
|
1276
|
+
get speed() {
|
|
1277
|
+
return this.animation.speed;
|
|
1278
|
+
}
|
|
1279
|
+
get state() {
|
|
1280
|
+
return this.animation.state;
|
|
1281
|
+
}
|
|
1282
|
+
set speed(t) {
|
|
1283
|
+
this.animation.speed = t;
|
|
1284
|
+
}
|
|
1285
|
+
get startTime() {
|
|
1286
|
+
return this.animation.startTime;
|
|
1287
|
+
}
|
|
1288
|
+
attachTimeline(t) {
|
|
1289
|
+
return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
|
|
1290
|
+
}
|
|
1291
|
+
play() {
|
|
1292
|
+
this.animation.play();
|
|
1293
|
+
}
|
|
1294
|
+
pause() {
|
|
1295
|
+
this.animation.pause();
|
|
1296
|
+
}
|
|
1297
|
+
complete() {
|
|
1298
|
+
this.animation.complete();
|
|
1299
|
+
}
|
|
1300
|
+
cancel() {
|
|
1301
|
+
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
function js(t, e, i, n = 0, s = 1) {
|
|
1305
|
+
const o = Array.from(t).sort((l, c) => l.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * n;
|
|
1306
|
+
return typeof i == "function" ? i(o, r) : s === 1 ? o * n : a - o * n;
|
|
1307
|
+
}
|
|
1308
|
+
var Ca = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
1309
|
+
function Da(t) {
|
|
1310
|
+
const e = Ca.exec(t);
|
|
1311
|
+
if (!e) return [,];
|
|
1312
|
+
const [, i, n, s] = e;
|
|
1313
|
+
return [`--${i ?? n}`, s];
|
|
1314
|
+
}
|
|
1315
|
+
var Ea = 4;
|
|
1316
|
+
function Ns(t, e, i = 1) {
|
|
1317
|
+
it(i <= Ea, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1318
|
+
const [n, s] = Da(t);
|
|
1319
|
+
if (!n) return;
|
|
1320
|
+
const o = window.getComputedStyle(e).getPropertyValue(n);
|
|
1321
|
+
if (o) {
|
|
1322
|
+
const r = o.trim();
|
|
1323
|
+
return ts(r) ? parseFloat(r) : r;
|
|
1324
|
+
}
|
|
1325
|
+
return ci(s) ? Ns(s, e, i + 1) : s;
|
|
1326
|
+
}
|
|
1327
|
+
var Ra = {
|
|
1328
|
+
type: "spring",
|
|
1329
|
+
stiffness: 500,
|
|
1330
|
+
damping: 25,
|
|
1331
|
+
restSpeed: 10
|
|
1332
|
+
}, La = (t) => ({
|
|
1333
|
+
type: "spring",
|
|
1334
|
+
stiffness: 550,
|
|
1335
|
+
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1336
|
+
restSpeed: 10
|
|
1337
|
+
}), ka = {
|
|
1338
|
+
type: "keyframes",
|
|
1339
|
+
duration: 0.8
|
|
1340
|
+
}, Ba = {
|
|
1341
|
+
type: "keyframes",
|
|
1342
|
+
ease: [
|
|
1343
|
+
0.25,
|
|
1344
|
+
0.1,
|
|
1345
|
+
0.35,
|
|
1346
|
+
1
|
|
1347
|
+
],
|
|
1348
|
+
duration: 0.3
|
|
1349
|
+
}, Ia = (t, { keyframes: e }) => e.length > 2 ? ka : Rt.has(t) ? t.startsWith("scale") ? La(e[1]) : Ra : Ba;
|
|
1350
|
+
function Us(t, e) {
|
|
1351
|
+
if (t?.inherit && e) {
|
|
1352
|
+
const { inherit: i, ...n } = t;
|
|
1353
|
+
return {
|
|
1354
|
+
...e,
|
|
1355
|
+
...n
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
return t;
|
|
1359
|
+
}
|
|
1360
|
+
function gi(t, e) {
|
|
1361
|
+
const i = t?.[e] ?? t?.default ?? t;
|
|
1362
|
+
return i !== t ? Us(i, t) : i;
|
|
1363
|
+
}
|
|
1364
|
+
var Fa = /* @__PURE__ */ new Set([
|
|
1365
|
+
"when",
|
|
1366
|
+
"delay",
|
|
1367
|
+
"delayChildren",
|
|
1368
|
+
"staggerChildren",
|
|
1369
|
+
"staggerDirection",
|
|
1370
|
+
"repeat",
|
|
1371
|
+
"repeatType",
|
|
1372
|
+
"repeatDelay",
|
|
1373
|
+
"from",
|
|
1374
|
+
"elapsed"
|
|
1375
|
+
]);
|
|
1376
|
+
function Oa(t) {
|
|
1377
|
+
for (const e in t) if (!Fa.has(e)) return !0;
|
|
1378
|
+
return !1;
|
|
1379
|
+
}
|
|
1380
|
+
var yi = (t, e, i, n = {}, s, o) => (r) => {
|
|
1381
|
+
const a = gi(n, t) || {}, l = a.delay || n.delay || 0;
|
|
1382
|
+
let { elapsed: c = 0 } = n;
|
|
1383
|
+
c = c - W(l);
|
|
1384
|
+
const u = {
|
|
1385
|
+
keyframes: Array.isArray(i) ? i : [null, i],
|
|
1386
|
+
ease: "easeOut",
|
|
1387
|
+
velocity: e.getVelocity(),
|
|
1388
|
+
...a,
|
|
1389
|
+
delay: -c,
|
|
1390
|
+
onUpdate: (f) => {
|
|
1391
|
+
e.set(f), a.onUpdate && a.onUpdate(f);
|
|
1392
|
+
},
|
|
1393
|
+
onComplete: () => {
|
|
1394
|
+
r(), a.onComplete && a.onComplete();
|
|
1395
|
+
},
|
|
1396
|
+
name: t,
|
|
1397
|
+
motionValue: e,
|
|
1398
|
+
element: o ? void 0 : s
|
|
1399
|
+
};
|
|
1400
|
+
Oa(a) || Object.assign(u, Ia(t, u)), u.duration && (u.duration = W(u.duration)), u.repeatDelay && (u.repeatDelay = W(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
1401
|
+
let h = !1;
|
|
1402
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && ($e(u), u.delay === 0 && (h = !0)), (rt.instantAnimations || rt.skipAnimations || s?.shouldSkipAnimations) && (h = !0, $e(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
|
|
1403
|
+
const f = fe(u.keyframes, a);
|
|
1404
|
+
if (f !== void 0) {
|
|
1405
|
+
A.update(() => {
|
|
1406
|
+
u.onUpdate(f), u.onComplete();
|
|
1407
|
+
});
|
|
1408
|
+
return;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
return a.isSync ? new oe(u) : new Ma(u);
|
|
1412
|
+
};
|
|
1413
|
+
function Hi(t) {
|
|
1414
|
+
const e = [{}, {}];
|
|
1415
|
+
return t?.values.forEach((i, n) => {
|
|
1416
|
+
e[0][n] = i.get(), e[1][n] = i.getVelocity();
|
|
1417
|
+
}), e;
|
|
1418
|
+
}
|
|
1419
|
+
function Ti(t, e, i, n) {
|
|
1420
|
+
if (typeof e == "function") {
|
|
1421
|
+
const [s, o] = Hi(n);
|
|
1422
|
+
e = e(i !== void 0 ? i : t.custom, s, o);
|
|
1423
|
+
}
|
|
1424
|
+
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1425
|
+
const [s, o] = Hi(n);
|
|
1426
|
+
e = e(i !== void 0 ? i : t.custom, s, o);
|
|
1427
|
+
}
|
|
1428
|
+
return e;
|
|
1429
|
+
}
|
|
1430
|
+
function yt(t, e, i) {
|
|
1431
|
+
const n = t.getProps();
|
|
1432
|
+
return Ti(n, e, i !== void 0 ? i : n.custom, t);
|
|
1433
|
+
}
|
|
1434
|
+
var Ws = /* @__PURE__ */ new Set([
|
|
1435
|
+
"width",
|
|
1436
|
+
"height",
|
|
1437
|
+
"top",
|
|
1438
|
+
"left",
|
|
1439
|
+
"right",
|
|
1440
|
+
"bottom",
|
|
1441
|
+
...Et
|
|
1442
|
+
]), Gi = 30, ja = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, Na = class {
|
|
1443
|
+
constructor(t, e = {}) {
|
|
1444
|
+
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
|
|
1445
|
+
const n = O.now();
|
|
1446
|
+
if (this.updatedAt !== n && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
|
|
1447
|
+
for (const s of this.dependents) s.dirty();
|
|
1448
|
+
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
|
|
1449
|
+
}
|
|
1450
|
+
setCurrent(t) {
|
|
1451
|
+
this.current = t, this.updatedAt = O.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ja(this.current));
|
|
1452
|
+
}
|
|
1453
|
+
setPrevFrameValue(t = this.current) {
|
|
1454
|
+
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
1455
|
+
}
|
|
1456
|
+
onChange(t) {
|
|
1457
|
+
return process.env.NODE_ENV !== "production" && ai(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
1458
|
+
}
|
|
1459
|
+
on(t, e) {
|
|
1460
|
+
this.events[t] || (this.events[t] = new oi());
|
|
1461
|
+
const i = this.events[t].add(e);
|
|
1462
|
+
return t === "change" ? () => {
|
|
1463
|
+
i(), A.read(() => {
|
|
1464
|
+
this.events.change.getSize() || this.stop();
|
|
1465
|
+
});
|
|
1466
|
+
} : i;
|
|
1467
|
+
}
|
|
1468
|
+
clearListeners() {
|
|
1469
|
+
for (const t in this.events) this.events[t].clear();
|
|
1470
|
+
}
|
|
1471
|
+
attach(t, e) {
|
|
1472
|
+
this.passiveEffect = t, this.stopPassiveEffect = e;
|
|
1473
|
+
}
|
|
1474
|
+
set(t) {
|
|
1475
|
+
this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
|
|
1476
|
+
}
|
|
1477
|
+
setWithVelocity(t, e, i) {
|
|
1478
|
+
this.set(e), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - i;
|
|
1479
|
+
}
|
|
1480
|
+
jump(t, e = !0) {
|
|
1481
|
+
this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, e && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1482
|
+
}
|
|
1483
|
+
dirty() {
|
|
1484
|
+
this.events.change?.notify(this.current);
|
|
1485
|
+
}
|
|
1486
|
+
addDependent(t) {
|
|
1487
|
+
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
|
|
1488
|
+
}
|
|
1489
|
+
removeDependent(t) {
|
|
1490
|
+
this.dependents && this.dependents.delete(t);
|
|
1491
|
+
}
|
|
1492
|
+
get() {
|
|
1493
|
+
return Xi.current && Xi.current.push(this), this.current;
|
|
1494
|
+
}
|
|
1495
|
+
getPrevious() {
|
|
1496
|
+
return this.prev;
|
|
1497
|
+
}
|
|
1498
|
+
getVelocity() {
|
|
1499
|
+
const t = O.now();
|
|
1500
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Gi) return 0;
|
|
1501
|
+
const e = Math.min(this.updatedAt - this.prevUpdatedAt, Gi);
|
|
1502
|
+
return ss(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
1503
|
+
}
|
|
1504
|
+
start(t) {
|
|
1505
|
+
return this.stop(), new Promise((e) => {
|
|
1506
|
+
this.hasAnimated = !0, this.animation = t(e), this.events.animationStart && this.events.animationStart.notify();
|
|
1507
|
+
}).then(() => {
|
|
1508
|
+
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
stop() {
|
|
1512
|
+
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
1513
|
+
}
|
|
1514
|
+
isAnimating() {
|
|
1515
|
+
return !!this.animation;
|
|
1516
|
+
}
|
|
1517
|
+
clearAnimation() {
|
|
1518
|
+
delete this.animation;
|
|
1519
|
+
}
|
|
1520
|
+
destroy() {
|
|
1521
|
+
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1524
|
+
function Vt(t, e) {
|
|
1525
|
+
return new Na(t, e);
|
|
1526
|
+
}
|
|
1527
|
+
var ze = (t) => Array.isArray(t);
|
|
1528
|
+
function Ua(t, e, i) {
|
|
1529
|
+
t.hasValue(e) ? t.getValue(e).set(i) : t.addValue(e, Vt(i));
|
|
1530
|
+
}
|
|
1531
|
+
function Wa(t) {
|
|
1532
|
+
return ze(t) ? t[t.length - 1] || 0 : t;
|
|
1533
|
+
}
|
|
1534
|
+
function _a(t, e) {
|
|
1535
|
+
let { transitionEnd: i = {}, transition: n = {}, ...s } = yt(t, e) || {};
|
|
1536
|
+
s = {
|
|
1537
|
+
...s,
|
|
1538
|
+
...i
|
|
1539
|
+
};
|
|
1540
|
+
for (const o in s) Ua(t, o, Wa(s[o]));
|
|
1541
|
+
}
|
|
1542
|
+
var I = (t) => !!(t && t.getVelocity);
|
|
1543
|
+
function Ka(t) {
|
|
1544
|
+
return !!(I(t) && t.add);
|
|
1545
|
+
}
|
|
1546
|
+
function He(t, e) {
|
|
1547
|
+
const i = t.getValue("willChange");
|
|
1548
|
+
if (Ka(i)) return i.add(e);
|
|
1549
|
+
if (!i && rt.WillChange) {
|
|
1550
|
+
const n = new rt.WillChange("auto");
|
|
1551
|
+
t.addValue("willChange", n), n.add(e);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
function xi(t) {
|
|
1555
|
+
return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1556
|
+
}
|
|
1557
|
+
var $a = "framerAppearId", _s = "data-" + xi($a);
|
|
1558
|
+
function Ks(t) {
|
|
1559
|
+
return t.props[_s];
|
|
1560
|
+
}
|
|
1561
|
+
function za({ protectedKeys: t, needsAnimating: e }, i) {
|
|
1562
|
+
const n = t.hasOwnProperty(i) && e[i] !== !0;
|
|
1563
|
+
return e[i] = !1, n;
|
|
1564
|
+
}
|
|
1565
|
+
function $s(t, e, { delay: i = 0, transitionOverride: n, type: s } = {}) {
|
|
1566
|
+
let { transition: o, transitionEnd: r, ...a } = e;
|
|
1567
|
+
const l = t.getDefaultTransition();
|
|
1568
|
+
o = o ? Us(o, l) : l;
|
|
1569
|
+
const c = o?.reduceMotion;
|
|
1570
|
+
n && (o = n);
|
|
1571
|
+
const u = [], h = s && t.animationState && t.animationState.getState()[s];
|
|
1572
|
+
for (const f in a) {
|
|
1573
|
+
const p = t.getValue(f, t.latestValues[f] ?? null), d = a[f];
|
|
1574
|
+
if (d === void 0 || h && za(h, f)) continue;
|
|
1575
|
+
const v = {
|
|
1576
|
+
delay: i,
|
|
1577
|
+
...gi(o || {}, f)
|
|
1578
|
+
}, g = p.get();
|
|
1579
|
+
if (g !== void 0 && !p.isAnimating() && !Array.isArray(d) && d === g && !v.velocity) {
|
|
1580
|
+
A.update(() => p.set(d));
|
|
1581
|
+
continue;
|
|
1582
|
+
}
|
|
1583
|
+
let m = !1;
|
|
1584
|
+
if (window.MotionHandoffAnimation) {
|
|
1585
|
+
const w = Ks(t);
|
|
1586
|
+
if (w) {
|
|
1587
|
+
const b = window.MotionHandoffAnimation(w, f, A);
|
|
1588
|
+
b !== null && (v.startTime = b, m = !0);
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
He(t, f);
|
|
1592
|
+
const x = c ?? t.shouldReduceMotion;
|
|
1593
|
+
p.start(yi(f, p, d, x && Ws.has(f) ? { type: !1 } : v, t, m));
|
|
1594
|
+
const y = p.animation;
|
|
1595
|
+
y && u.push(y);
|
|
1596
|
+
}
|
|
1597
|
+
if (r) {
|
|
1598
|
+
const f = () => A.update(() => {
|
|
1599
|
+
r && _a(t, r);
|
|
1600
|
+
});
|
|
1601
|
+
u.length ? Promise.all(u).then(f) : f();
|
|
1602
|
+
}
|
|
1603
|
+
return u;
|
|
1604
|
+
}
|
|
1605
|
+
function Ge(t, e, i = {}) {
|
|
1606
|
+
const n = yt(t, e, i.type === "exit" ? t.presenceContext?.custom : void 0);
|
|
1607
|
+
let { transition: s = t.getDefaultTransition() || {} } = n || {};
|
|
1608
|
+
i.transitionOverride && (s = i.transitionOverride);
|
|
1609
|
+
const o = n ? () => Promise.all($s(t, n, i)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
1610
|
+
const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = s;
|
|
1611
|
+
return Ha(t, e, l, c, u, h, i);
|
|
1612
|
+
} : () => Promise.resolve(), { when: a } = s;
|
|
1613
|
+
if (a) {
|
|
1614
|
+
const [l, c] = a === "beforeChildren" ? [o, r] : [r, o];
|
|
1615
|
+
return l().then(() => c());
|
|
1616
|
+
} else return Promise.all([o(), r(i.delay)]);
|
|
1617
|
+
}
|
|
1618
|
+
function Ha(t, e, i = 0, n = 0, s = 0, o = 1, r) {
|
|
1619
|
+
const a = [];
|
|
1620
|
+
for (const l of t.variantChildren)
|
|
1621
|
+
l.notify("AnimationStart", e), a.push(Ge(l, e, {
|
|
1622
|
+
...r,
|
|
1623
|
+
delay: i + (typeof n == "function" ? 0 : n) + js(t.variantChildren, l, n, s, o)
|
|
1624
|
+
}).then(() => l.notify("AnimationComplete", e)));
|
|
1625
|
+
return Promise.all(a);
|
|
1626
|
+
}
|
|
1627
|
+
function Ga(t, e, i = {}) {
|
|
1628
|
+
t.notify("AnimationStart", e);
|
|
1629
|
+
let n;
|
|
1630
|
+
if (Array.isArray(e)) {
|
|
1631
|
+
const s = e.map((o) => Ge(t, o, i));
|
|
1632
|
+
n = Promise.all(s);
|
|
1633
|
+
} else if (typeof e == "string") n = Ge(t, e, i);
|
|
1634
|
+
else {
|
|
1635
|
+
const s = typeof e == "function" ? yt(t, e, i.custom) : e;
|
|
1636
|
+
n = Promise.all($s(t, s, i));
|
|
1637
|
+
}
|
|
1638
|
+
return n.then(() => {
|
|
1639
|
+
t.notify("AnimationComplete", e);
|
|
1640
|
+
});
|
|
1641
|
+
}
|
|
1642
|
+
var Xa = {
|
|
1643
|
+
test: (t) => t === "auto",
|
|
1644
|
+
parse: (t) => t
|
|
1645
|
+
}, zs = (t) => (e) => e.test(t), Hs = [
|
|
1646
|
+
Dt,
|
|
1647
|
+
T,
|
|
1648
|
+
Q,
|
|
1649
|
+
nt,
|
|
1650
|
+
To,
|
|
1651
|
+
yo,
|
|
1652
|
+
Xa
|
|
1653
|
+
], Yi = (t) => Hs.find(zs(t));
|
|
1654
|
+
function Ya(t) {
|
|
1655
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || is(t) : !0;
|
|
1656
|
+
}
|
|
1657
|
+
var qa = /* @__PURE__ */ new Set([
|
|
1658
|
+
"brightness",
|
|
1659
|
+
"contrast",
|
|
1660
|
+
"saturate",
|
|
1661
|
+
"opacity"
|
|
1662
|
+
]);
|
|
1663
|
+
function Za(t) {
|
|
1664
|
+
const [e, i] = t.slice(0, -1).split("(");
|
|
1665
|
+
if (e === "drop-shadow") return t;
|
|
1666
|
+
const [n] = i.match(hi) || [];
|
|
1667
|
+
if (!n) return t;
|
|
1668
|
+
const s = i.replace(n, "");
|
|
1669
|
+
let o = qa.has(e) ? 1 : 0;
|
|
1670
|
+
return n !== i && (o *= 100), e + "(" + o + s + ")";
|
|
1671
|
+
}
|
|
1672
|
+
var Ja = /\b([a-z-]*)\(.*?\)/gu, Xe = {
|
|
1673
|
+
...G,
|
|
1674
|
+
getAnimatableNone: (t) => {
|
|
1675
|
+
const e = t.match(Ja);
|
|
1676
|
+
return e ? e.map(Za).join(" ") : t;
|
|
1677
|
+
}
|
|
1678
|
+
}, Ye = {
|
|
1679
|
+
...G,
|
|
1680
|
+
getAnimatableNone: (t) => {
|
|
1681
|
+
const e = G.parse(t);
|
|
1682
|
+
return G.createTransformer(t)(e.map((i) => typeof i == "number" ? 0 : typeof i == "object" ? {
|
|
1683
|
+
...i,
|
|
1684
|
+
alpha: 1
|
|
1685
|
+
} : i));
|
|
1686
|
+
}
|
|
1687
|
+
}, qi = {
|
|
1688
|
+
...Dt,
|
|
1689
|
+
transform: Math.round
|
|
1690
|
+
}, Qa = {
|
|
1691
|
+
rotate: nt,
|
|
1692
|
+
rotateX: nt,
|
|
1693
|
+
rotateY: nt,
|
|
1694
|
+
rotateZ: nt,
|
|
1695
|
+
scale: Ht,
|
|
1696
|
+
scaleX: Ht,
|
|
1697
|
+
scaleY: Ht,
|
|
1698
|
+
scaleZ: Ht,
|
|
1699
|
+
skew: nt,
|
|
1700
|
+
skewX: nt,
|
|
1701
|
+
skewY: nt,
|
|
1702
|
+
distance: T,
|
|
1703
|
+
translateX: T,
|
|
1704
|
+
translateY: T,
|
|
1705
|
+
translateZ: T,
|
|
1706
|
+
x: T,
|
|
1707
|
+
y: T,
|
|
1708
|
+
z: T,
|
|
1709
|
+
perspective: T,
|
|
1710
|
+
transformPerspective: T,
|
|
1711
|
+
opacity: jt,
|
|
1712
|
+
originX: Ii,
|
|
1713
|
+
originY: Ii,
|
|
1714
|
+
originZ: T
|
|
1715
|
+
}, wi = {
|
|
1716
|
+
borderWidth: T,
|
|
1717
|
+
borderTopWidth: T,
|
|
1718
|
+
borderRightWidth: T,
|
|
1719
|
+
borderBottomWidth: T,
|
|
1720
|
+
borderLeftWidth: T,
|
|
1721
|
+
borderRadius: T,
|
|
1722
|
+
borderTopLeftRadius: T,
|
|
1723
|
+
borderTopRightRadius: T,
|
|
1724
|
+
borderBottomRightRadius: T,
|
|
1725
|
+
borderBottomLeftRadius: T,
|
|
1726
|
+
width: T,
|
|
1727
|
+
maxWidth: T,
|
|
1728
|
+
height: T,
|
|
1729
|
+
maxHeight: T,
|
|
1730
|
+
top: T,
|
|
1731
|
+
right: T,
|
|
1732
|
+
bottom: T,
|
|
1733
|
+
left: T,
|
|
1734
|
+
inset: T,
|
|
1735
|
+
insetBlock: T,
|
|
1736
|
+
insetBlockStart: T,
|
|
1737
|
+
insetBlockEnd: T,
|
|
1738
|
+
insetInline: T,
|
|
1739
|
+
insetInlineStart: T,
|
|
1740
|
+
insetInlineEnd: T,
|
|
1741
|
+
padding: T,
|
|
1742
|
+
paddingTop: T,
|
|
1743
|
+
paddingRight: T,
|
|
1744
|
+
paddingBottom: T,
|
|
1745
|
+
paddingLeft: T,
|
|
1746
|
+
paddingBlock: T,
|
|
1747
|
+
paddingBlockStart: T,
|
|
1748
|
+
paddingBlockEnd: T,
|
|
1749
|
+
paddingInline: T,
|
|
1750
|
+
paddingInlineStart: T,
|
|
1751
|
+
paddingInlineEnd: T,
|
|
1752
|
+
margin: T,
|
|
1753
|
+
marginTop: T,
|
|
1754
|
+
marginRight: T,
|
|
1755
|
+
marginBottom: T,
|
|
1756
|
+
marginLeft: T,
|
|
1757
|
+
marginBlock: T,
|
|
1758
|
+
marginBlockStart: T,
|
|
1759
|
+
marginBlockEnd: T,
|
|
1760
|
+
marginInline: T,
|
|
1761
|
+
marginInlineStart: T,
|
|
1762
|
+
marginInlineEnd: T,
|
|
1763
|
+
fontSize: T,
|
|
1764
|
+
backgroundPositionX: T,
|
|
1765
|
+
backgroundPositionY: T,
|
|
1766
|
+
...Qa,
|
|
1767
|
+
zIndex: qi,
|
|
1768
|
+
fillOpacity: jt,
|
|
1769
|
+
strokeOpacity: jt,
|
|
1770
|
+
numOctaves: qi
|
|
1771
|
+
}, tl = {
|
|
1772
|
+
...wi,
|
|
1773
|
+
color: D,
|
|
1774
|
+
backgroundColor: D,
|
|
1775
|
+
outlineColor: D,
|
|
1776
|
+
fill: D,
|
|
1777
|
+
stroke: D,
|
|
1778
|
+
borderColor: D,
|
|
1779
|
+
borderTopColor: D,
|
|
1780
|
+
borderRightColor: D,
|
|
1781
|
+
borderBottomColor: D,
|
|
1782
|
+
borderLeftColor: D,
|
|
1783
|
+
filter: Xe,
|
|
1784
|
+
WebkitFilter: Xe,
|
|
1785
|
+
mask: Ye,
|
|
1786
|
+
WebkitMask: Ye
|
|
1787
|
+
}, Gs = (t) => tl[t], el = /* @__PURE__ */ new Set([Xe, Ye]);
|
|
1788
|
+
function Xs(t, e) {
|
|
1789
|
+
let i = Gs(t);
|
|
1790
|
+
return el.has(i) || (i = G), i.getAnimatableNone ? i.getAnimatableNone(e) : void 0;
|
|
1791
|
+
}
|
|
1792
|
+
var il = /* @__PURE__ */ new Set([
|
|
1793
|
+
"auto",
|
|
1794
|
+
"none",
|
|
1795
|
+
"0"
|
|
1796
|
+
]);
|
|
1797
|
+
function nl(t, e, i) {
|
|
1798
|
+
let n = 0, s;
|
|
1799
|
+
for (; n < t.length && !s; ) {
|
|
1800
|
+
const o = t[n];
|
|
1801
|
+
typeof o == "string" && !il.has(o) && At(o).values.length && (s = t[n]), n++;
|
|
1802
|
+
}
|
|
1803
|
+
if (s && i) for (const o of e) t[o] = Xs(i, s);
|
|
1804
|
+
}
|
|
1805
|
+
var sl = class extends vi {
|
|
1806
|
+
constructor(t, e, i, n, s) {
|
|
1807
|
+
super(t, e, i, n, s, !0);
|
|
1808
|
+
}
|
|
1809
|
+
readKeyframes() {
|
|
1810
|
+
const { unresolvedKeyframes: t, element: e, name: i } = this;
|
|
1811
|
+
if (!e || !e.current) return;
|
|
1812
|
+
super.readKeyframes();
|
|
1813
|
+
for (let a = 0; a < t.length; a++) {
|
|
1814
|
+
let l = t[a];
|
|
1815
|
+
if (typeof l == "string" && (l = l.trim(), ci(l))) {
|
|
1816
|
+
const c = Ns(l, e.current);
|
|
1817
|
+
c !== void 0 && (t[a] = c), a === t.length - 1 && (this.finalKeyframe = l);
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
if (this.resolveNoneKeyframes(), !Ws.has(i) || t.length !== 2) return;
|
|
1821
|
+
const [n, s] = t, o = Yi(n), r = Yi(s);
|
|
1822
|
+
if (Bi(n) !== Bi(s) && st[i]) {
|
|
1823
|
+
this.needsMeasurement = !0;
|
|
1824
|
+
return;
|
|
1825
|
+
}
|
|
1826
|
+
if (o !== r)
|
|
1827
|
+
if (Ki(o) && Ki(r)) for (let a = 0; a < t.length; a++) {
|
|
1828
|
+
const l = t[a];
|
|
1829
|
+
typeof l == "string" && (t[a] = parseFloat(l));
|
|
1830
|
+
}
|
|
1831
|
+
else st[i] && (this.needsMeasurement = !0);
|
|
1832
|
+
}
|
|
1833
|
+
resolveNoneKeyframes() {
|
|
1834
|
+
const { unresolvedKeyframes: t, name: e } = this, i = [];
|
|
1835
|
+
for (let n = 0; n < t.length; n++) (t[n] === null || Ya(t[n])) && i.push(n);
|
|
1836
|
+
i.length && nl(t, i, e);
|
|
1837
|
+
}
|
|
1838
|
+
measureInitialState() {
|
|
1839
|
+
const { element: t, unresolvedKeyframes: e, name: i } = this;
|
|
1840
|
+
if (!t || !t.current) return;
|
|
1841
|
+
i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = st[i](t.measureViewportBox(), window.getComputedStyle(t.current)), e[0] = this.measuredOrigin;
|
|
1842
|
+
const n = e[e.length - 1];
|
|
1843
|
+
n !== void 0 && t.getValue(i, n).jump(n, !1);
|
|
1844
|
+
}
|
|
1845
|
+
measureEndState() {
|
|
1846
|
+
const { element: t, name: e, unresolvedKeyframes: i } = this;
|
|
1847
|
+
if (!t || !t.current) return;
|
|
1848
|
+
const n = t.getValue(e);
|
|
1849
|
+
n && n.jump(this.measuredOrigin, !1);
|
|
1850
|
+
const s = i.length - 1, o = i[s];
|
|
1851
|
+
i[s] = st[e](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([r, a]) => {
|
|
1852
|
+
t.getValue(r).set(a);
|
|
1853
|
+
}), this.resolveNoneKeyframes();
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
function Ys(t, e, i) {
|
|
1857
|
+
if (t == null) return [];
|
|
1858
|
+
if (t instanceof EventTarget) return [t];
|
|
1859
|
+
if (typeof t == "string") {
|
|
1860
|
+
let n = document;
|
|
1861
|
+
e && (n = e.current);
|
|
1862
|
+
const s = i?.[t] ?? n.querySelectorAll(t);
|
|
1863
|
+
return s ? Array.from(s) : [];
|
|
1864
|
+
}
|
|
1865
|
+
return Array.from(t).filter((n) => n != null);
|
|
1866
|
+
}
|
|
1867
|
+
var qs = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
1868
|
+
function rl(t) {
|
|
1869
|
+
return es(t) && "offsetHeight" in t && !("ownerSVGElement" in t);
|
|
1870
|
+
}
|
|
1871
|
+
var { schedule: Pi, cancel: Qc } = /* @__PURE__ */ ms(queueMicrotask, !1), H = {
|
|
1872
|
+
x: !1,
|
|
1873
|
+
y: !1
|
|
1874
|
+
};
|
|
1875
|
+
function Zs() {
|
|
1876
|
+
return H.x || H.y;
|
|
1877
|
+
}
|
|
1878
|
+
function ol(t) {
|
|
1879
|
+
return t === "x" || t === "y" ? H[t] ? null : (H[t] = !0, () => {
|
|
1880
|
+
H[t] = !1;
|
|
1881
|
+
}) : H.x || H.y ? null : (H.x = H.y = !0, () => {
|
|
1882
|
+
H.x = H.y = !1;
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1885
|
+
function Js(t, e) {
|
|
1886
|
+
const i = Ys(t), n = new AbortController(), s = {
|
|
1887
|
+
passive: !0,
|
|
1888
|
+
...e,
|
|
1889
|
+
signal: n.signal
|
|
1890
|
+
};
|
|
1891
|
+
return [
|
|
1892
|
+
i,
|
|
1893
|
+
s,
|
|
1894
|
+
() => n.abort()
|
|
1895
|
+
];
|
|
1896
|
+
}
|
|
1897
|
+
function al(t) {
|
|
1898
|
+
return !(t.pointerType === "touch" || Zs());
|
|
1899
|
+
}
|
|
1900
|
+
function ll(t, e, i = {}) {
|
|
1901
|
+
const [n, s, o] = Js(t, i);
|
|
1902
|
+
return n.forEach((r) => {
|
|
1903
|
+
let a = !1, l = !1, c;
|
|
1904
|
+
const u = () => {
|
|
1905
|
+
r.removeEventListener("pointerleave", d);
|
|
1906
|
+
}, h = (g) => {
|
|
1907
|
+
c && (c(g), c = void 0), u();
|
|
1908
|
+
}, f = (g) => {
|
|
1909
|
+
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(g));
|
|
1910
|
+
}, p = () => {
|
|
1911
|
+
a = !0, window.addEventListener("pointerup", f, s), window.addEventListener("pointercancel", f, s);
|
|
1912
|
+
}, d = (g) => {
|
|
1913
|
+
if (g.pointerType !== "touch") {
|
|
1914
|
+
if (a) {
|
|
1915
|
+
l = !0;
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
h(g);
|
|
1919
|
+
}
|
|
1920
|
+
}, v = (g) => {
|
|
1921
|
+
if (!al(g)) return;
|
|
1922
|
+
l = !1;
|
|
1923
|
+
const m = e(r, g);
|
|
1924
|
+
typeof m == "function" && (c = m, r.addEventListener("pointerleave", d, s));
|
|
1925
|
+
};
|
|
1926
|
+
r.addEventListener("pointerenter", v, s), r.addEventListener("pointerdown", p, s);
|
|
1927
|
+
}), o;
|
|
1928
|
+
}
|
|
1929
|
+
var Qs = (t, e) => e ? t === e ? !0 : Qs(t, e.parentElement) : !1, Si = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, ul = /* @__PURE__ */ new Set([
|
|
1930
|
+
"BUTTON",
|
|
1931
|
+
"INPUT",
|
|
1932
|
+
"SELECT",
|
|
1933
|
+
"TEXTAREA",
|
|
1934
|
+
"A"
|
|
1935
|
+
]);
|
|
1936
|
+
function cl(t) {
|
|
1937
|
+
return ul.has(t.tagName) || t.isContentEditable === !0;
|
|
1938
|
+
}
|
|
1939
|
+
var hl = /* @__PURE__ */ new Set([
|
|
1940
|
+
"INPUT",
|
|
1941
|
+
"SELECT",
|
|
1942
|
+
"TEXTAREA"
|
|
1943
|
+
]);
|
|
1944
|
+
function fl(t) {
|
|
1945
|
+
return hl.has(t.tagName) || t.isContentEditable === !0;
|
|
1946
|
+
}
|
|
1947
|
+
var qt = /* @__PURE__ */ new WeakSet();
|
|
1948
|
+
function Zi(t) {
|
|
1949
|
+
return (e) => {
|
|
1950
|
+
e.key === "Enter" && t(e);
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1953
|
+
function Pe(t, e) {
|
|
1954
|
+
t.dispatchEvent(new PointerEvent("pointer" + e, {
|
|
1955
|
+
isPrimary: !0,
|
|
1956
|
+
bubbles: !0
|
|
1957
|
+
}));
|
|
1958
|
+
}
|
|
1959
|
+
var dl = (t, e) => {
|
|
1960
|
+
const i = t.currentTarget;
|
|
1961
|
+
if (!i) return;
|
|
1962
|
+
const n = Zi(() => {
|
|
1963
|
+
if (qt.has(i)) return;
|
|
1964
|
+
Pe(i, "down");
|
|
1965
|
+
const s = Zi(() => {
|
|
1966
|
+
Pe(i, "up");
|
|
1967
|
+
}), o = () => Pe(i, "cancel");
|
|
1968
|
+
i.addEventListener("keyup", s, e), i.addEventListener("blur", o, e);
|
|
1969
|
+
});
|
|
1970
|
+
i.addEventListener("keydown", n, e), i.addEventListener("blur", () => i.removeEventListener("keydown", n), e);
|
|
1971
|
+
};
|
|
1972
|
+
function Ji(t) {
|
|
1973
|
+
return Si(t) && !Zs();
|
|
1974
|
+
}
|
|
1975
|
+
var Qi = /* @__PURE__ */ new WeakSet();
|
|
1976
|
+
function pl(t, e, i = {}) {
|
|
1977
|
+
const [n, s, o] = Js(t, i), r = (a) => {
|
|
1978
|
+
const l = a.currentTarget;
|
|
1979
|
+
if (!Ji(a) || Qi.has(a)) return;
|
|
1980
|
+
qt.add(l), i.stopPropagation && Qi.add(a);
|
|
1981
|
+
const c = e(l, a), u = (p, d) => {
|
|
1982
|
+
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), qt.has(l) && qt.delete(l), Ji(p) && typeof c == "function" && c(p, { success: d });
|
|
1983
|
+
}, h = (p) => {
|
|
1984
|
+
u(p, l === window || l === document || i.useGlobalTarget || Qs(l, p.target));
|
|
1985
|
+
}, f = (p) => {
|
|
1986
|
+
u(p, !1);
|
|
1987
|
+
};
|
|
1988
|
+
window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", f, s);
|
|
1989
|
+
};
|
|
1990
|
+
return n.forEach((a) => {
|
|
1991
|
+
(i.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), rl(a) && (a.addEventListener("focus", (l) => dl(l, s)), !cl(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1992
|
+
}), o;
|
|
1993
|
+
}
|
|
1994
|
+
function bi(t) {
|
|
1995
|
+
return es(t) && "ownerSVGElement" in t;
|
|
1996
|
+
}
|
|
1997
|
+
var Zt = /* @__PURE__ */ new WeakMap(), Jt, tr = (t, e, i) => (n, s) => s && s[0] ? s[0][t + "Size"] : bi(n) && "getBBox" in n ? n.getBBox()[e] : n[i], ml = /* @__PURE__ */ tr("inline", "width", "offsetWidth"), vl = /* @__PURE__ */ tr("block", "height", "offsetHeight");
|
|
1998
|
+
function gl({ target: t, borderBoxSize: e }) {
|
|
1999
|
+
Zt.get(t)?.forEach((i) => {
|
|
2000
|
+
i(t, {
|
|
2001
|
+
get width() {
|
|
2002
|
+
return ml(t, e);
|
|
2003
|
+
},
|
|
2004
|
+
get height() {
|
|
2005
|
+
return vl(t, e);
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
function yl(t) {
|
|
2011
|
+
t.forEach(gl);
|
|
2012
|
+
}
|
|
2013
|
+
function Tl() {
|
|
2014
|
+
typeof ResizeObserver > "u" || (Jt = new ResizeObserver(yl));
|
|
2015
|
+
}
|
|
2016
|
+
function xl(t, e) {
|
|
2017
|
+
Jt || Tl();
|
|
2018
|
+
const i = Ys(t);
|
|
2019
|
+
return i.forEach((n) => {
|
|
2020
|
+
let s = Zt.get(n);
|
|
2021
|
+
s || (s = /* @__PURE__ */ new Set(), Zt.set(n, s)), s.add(e), Jt?.observe(n);
|
|
2022
|
+
}), () => {
|
|
2023
|
+
i.forEach((n) => {
|
|
2024
|
+
const s = Zt.get(n);
|
|
2025
|
+
s?.delete(e), s?.size || Jt?.unobserve(n);
|
|
2026
|
+
});
|
|
2027
|
+
};
|
|
2028
|
+
}
|
|
2029
|
+
var Qt = /* @__PURE__ */ new Set(), St;
|
|
2030
|
+
function wl() {
|
|
2031
|
+
St = () => {
|
|
2032
|
+
const t = {
|
|
2033
|
+
get width() {
|
|
2034
|
+
return window.innerWidth;
|
|
2035
|
+
},
|
|
2036
|
+
get height() {
|
|
2037
|
+
return window.innerHeight;
|
|
2038
|
+
}
|
|
2039
|
+
};
|
|
2040
|
+
Qt.forEach((e) => e(t));
|
|
2041
|
+
}, window.addEventListener("resize", St);
|
|
2042
|
+
}
|
|
2043
|
+
function Pl(t) {
|
|
2044
|
+
return Qt.add(t), St || wl(), () => {
|
|
2045
|
+
Qt.delete(t), !Qt.size && typeof St == "function" && (window.removeEventListener("resize", St), St = void 0);
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
function tn(t, e) {
|
|
2049
|
+
return typeof t == "function" ? Pl(t) : xl(t, e);
|
|
2050
|
+
}
|
|
2051
|
+
function Sl(t) {
|
|
2052
|
+
return bi(t) && t.tagName === "svg";
|
|
2053
|
+
}
|
|
2054
|
+
var bl = [
|
|
2055
|
+
...Hs,
|
|
2056
|
+
D,
|
|
2057
|
+
G
|
|
2058
|
+
], Al = (t) => bl.find(zs(t)), en = () => ({
|
|
2059
|
+
translate: 0,
|
|
2060
|
+
scale: 1,
|
|
2061
|
+
origin: 0,
|
|
2062
|
+
originPoint: 0
|
|
2063
|
+
}), bt = () => ({
|
|
2064
|
+
x: en(),
|
|
2065
|
+
y: en()
|
|
2066
|
+
}), nn = () => ({
|
|
2067
|
+
min: 0,
|
|
2068
|
+
max: 0
|
|
2069
|
+
}), R = () => ({
|
|
2070
|
+
x: nn(),
|
|
2071
|
+
y: nn()
|
|
2072
|
+
}), Vl = /* @__PURE__ */ new WeakMap();
|
|
2073
|
+
function de(t) {
|
|
2074
|
+
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2075
|
+
}
|
|
2076
|
+
function Nt(t) {
|
|
2077
|
+
return typeof t == "string" || Array.isArray(t);
|
|
2078
|
+
}
|
|
2079
|
+
var Ai = [
|
|
2080
|
+
"animate",
|
|
2081
|
+
"whileInView",
|
|
2082
|
+
"whileFocus",
|
|
2083
|
+
"whileHover",
|
|
2084
|
+
"whileTap",
|
|
2085
|
+
"whileDrag",
|
|
2086
|
+
"exit"
|
|
2087
|
+
], Vi = ["initial", ...Ai];
|
|
2088
|
+
function pe(t) {
|
|
2089
|
+
return de(t.animate) || Vi.some((e) => Nt(t[e]));
|
|
2090
|
+
}
|
|
2091
|
+
function er(t) {
|
|
2092
|
+
return !!(pe(t) || t.variants);
|
|
2093
|
+
}
|
|
2094
|
+
function Ml(t, e, i) {
|
|
2095
|
+
for (const n in e) {
|
|
2096
|
+
const s = e[n], o = i[n];
|
|
2097
|
+
if (I(s)) t.addValue(n, s);
|
|
2098
|
+
else if (I(o)) t.addValue(n, Vt(s, { owner: t }));
|
|
2099
|
+
else if (o !== s) if (t.hasValue(n)) {
|
|
2100
|
+
const r = t.getValue(n);
|
|
2101
|
+
r.liveStyle === !0 ? r.jump(s) : r.hasAnimated || r.set(s);
|
|
2102
|
+
} else {
|
|
2103
|
+
const r = t.getStaticValue(n);
|
|
2104
|
+
t.addValue(n, Vt(r !== void 0 ? r : s, { owner: t }));
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
for (const n in i) e[n] === void 0 && t.removeValue(n);
|
|
2108
|
+
return e;
|
|
2109
|
+
}
|
|
2110
|
+
var qe = { current: null }, ir = { current: !1 }, Cl = typeof window < "u";
|
|
2111
|
+
function Dl() {
|
|
2112
|
+
if (ir.current = !0, !!Cl)
|
|
2113
|
+
if (window.matchMedia) {
|
|
2114
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => qe.current = t.matches;
|
|
2115
|
+
t.addEventListener("change", e), e();
|
|
2116
|
+
} else qe.current = !1;
|
|
2117
|
+
}
|
|
2118
|
+
var sn = [
|
|
2119
|
+
"AnimationStart",
|
|
2120
|
+
"AnimationComplete",
|
|
2121
|
+
"Update",
|
|
2122
|
+
"BeforeLayoutMeasure",
|
|
2123
|
+
"LayoutMeasure",
|
|
2124
|
+
"LayoutAnimationStart",
|
|
2125
|
+
"LayoutAnimationComplete"
|
|
2126
|
+
], ae = {};
|
|
2127
|
+
function nr(t) {
|
|
2128
|
+
ae = t;
|
|
2129
|
+
}
|
|
2130
|
+
function El() {
|
|
2131
|
+
return ae;
|
|
2132
|
+
}
|
|
2133
|
+
var Rl = class {
|
|
2134
|
+
scrapeMotionValuesFromProps(t, e, i) {
|
|
2135
|
+
return {};
|
|
2136
|
+
}
|
|
2137
|
+
constructor({ parent: t, props: e, presenceContext: i, reducedMotionConfig: n, skipAnimations: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
2138
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = vi, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2139
|
+
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2140
|
+
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2141
|
+
const f = O.now();
|
|
2142
|
+
this.renderScheduledAt < f && (this.renderScheduledAt = f, A.render(this.render, !1, !0));
|
|
2143
|
+
};
|
|
2144
|
+
const { latestValues: l, renderState: c } = r;
|
|
2145
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = e.initial ? { ...l } : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = i, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = n, this.skipAnimationsConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = pe(e), this.isVariantNode = er(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2146
|
+
const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(e, {}, this);
|
|
2147
|
+
for (const f in h) {
|
|
2148
|
+
const p = h[f];
|
|
2149
|
+
l[f] !== void 0 && I(p) && p.set(l[f]);
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
mount(t) {
|
|
2153
|
+
if (this.hasBeenMounted) for (const e in this.initialValues)
|
|
2154
|
+
this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
|
|
2155
|
+
this.current = t, Vl.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, i) => this.bindToMotionValue(i, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (ir.current || Dl(), this.shouldReduceMotion = qe.current), process.env.NODE_ENV !== "production" && ai(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2156
|
+
}
|
|
2157
|
+
unmount() {
|
|
2158
|
+
this.projection && this.projection.unmount(), ot(this.notifyUpdate), ot(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
2159
|
+
for (const t in this.events) this.events[t].clear();
|
|
2160
|
+
for (const t in this.features) {
|
|
2161
|
+
const e = this.features[t];
|
|
2162
|
+
e && (e.unmount(), e.isMounted = !1);
|
|
2163
|
+
}
|
|
2164
|
+
this.current = null;
|
|
2165
|
+
}
|
|
2166
|
+
addChild(t) {
|
|
2167
|
+
this.children.add(t), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(t);
|
|
2168
|
+
}
|
|
2169
|
+
removeChild(t) {
|
|
2170
|
+
this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
|
|
2171
|
+
}
|
|
2172
|
+
bindToMotionValue(t, e) {
|
|
2173
|
+
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), e.accelerate && Os.has(t) && this.current instanceof HTMLElement) {
|
|
2174
|
+
const { factory: o, keyframes: r, times: a, ease: l, duration: c } = e.accelerate, u = new Is({
|
|
2175
|
+
element: this.current,
|
|
2176
|
+
name: t,
|
|
2177
|
+
keyframes: r,
|
|
2178
|
+
times: a,
|
|
2179
|
+
ease: l,
|
|
2180
|
+
duration: W(c)
|
|
2181
|
+
}), h = o(u);
|
|
2182
|
+
this.valueSubscriptions.set(t, () => {
|
|
2183
|
+
h(), u.cancel();
|
|
2184
|
+
});
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2187
|
+
const i = Rt.has(t);
|
|
2188
|
+
i && this.onBindTransform && this.onBindTransform();
|
|
2189
|
+
const n = e.on("change", (o) => {
|
|
2190
|
+
this.latestValues[t] = o, this.props.onUpdate && A.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
2191
|
+
});
|
|
2192
|
+
let s;
|
|
2193
|
+
typeof window < "u" && window.MotionCheckAppearSync && (s = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
|
|
2194
|
+
n(), s && s(), e.owner && e.stop();
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
sortNodePosition(t) {
|
|
2198
|
+
return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
|
|
2199
|
+
}
|
|
2200
|
+
updateFeatures() {
|
|
2201
|
+
let t = "animation";
|
|
2202
|
+
for (t in ae) {
|
|
2203
|
+
const e = ae[t];
|
|
2204
|
+
if (!e) continue;
|
|
2205
|
+
const { isEnabled: i, Feature: n } = e;
|
|
2206
|
+
if (!this.features[t] && n && i(this.props) && (this.features[t] = new n(this)), this.features[t]) {
|
|
2207
|
+
const s = this.features[t];
|
|
2208
|
+
s.isMounted ? s.update() : (s.mount(), s.isMounted = !0);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
triggerBuild() {
|
|
2213
|
+
this.build(this.renderState, this.latestValues, this.props);
|
|
2214
|
+
}
|
|
2215
|
+
measureViewportBox() {
|
|
2216
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : R();
|
|
2217
|
+
}
|
|
2218
|
+
getStaticValue(t) {
|
|
2219
|
+
return this.latestValues[t];
|
|
2220
|
+
}
|
|
2221
|
+
setStaticValue(t, e) {
|
|
2222
|
+
this.latestValues[t] = e;
|
|
2223
|
+
}
|
|
2224
|
+
update(t, e) {
|
|
2225
|
+
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
|
|
2226
|
+
for (let i = 0; i < sn.length; i++) {
|
|
2227
|
+
const n = sn[i];
|
|
2228
|
+
this.propEventSubscriptions[n] && (this.propEventSubscriptions[n](), delete this.propEventSubscriptions[n]);
|
|
2229
|
+
const s = t["on" + n];
|
|
2230
|
+
s && (this.propEventSubscriptions[n] = this.on(n, s));
|
|
2231
|
+
}
|
|
2232
|
+
this.prevMotionValues = Ml(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2233
|
+
}
|
|
2234
|
+
getProps() {
|
|
2235
|
+
return this.props;
|
|
2236
|
+
}
|
|
2237
|
+
getVariant(t) {
|
|
2238
|
+
return this.props.variants ? this.props.variants[t] : void 0;
|
|
2239
|
+
}
|
|
2240
|
+
getDefaultTransition() {
|
|
2241
|
+
return this.props.transition;
|
|
2242
|
+
}
|
|
2243
|
+
getTransformPagePoint() {
|
|
2244
|
+
return this.props.transformPagePoint;
|
|
2245
|
+
}
|
|
2246
|
+
getClosestVariantNode() {
|
|
2247
|
+
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
2248
|
+
}
|
|
2249
|
+
addVariantChild(t) {
|
|
2250
|
+
const e = this.getClosestVariantNode();
|
|
2251
|
+
if (e)
|
|
2252
|
+
return e.variantChildren && e.variantChildren.add(t), () => e.variantChildren.delete(t);
|
|
2253
|
+
}
|
|
2254
|
+
addValue(t, e) {
|
|
2255
|
+
const i = this.values.get(t);
|
|
2256
|
+
e !== i && (i && this.removeValue(t), this.bindToMotionValue(t, e), this.values.set(t, e), this.latestValues[t] = e.get());
|
|
2257
|
+
}
|
|
2258
|
+
removeValue(t) {
|
|
2259
|
+
this.values.delete(t);
|
|
2260
|
+
const e = this.valueSubscriptions.get(t);
|
|
2261
|
+
e && (e(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
|
|
2262
|
+
}
|
|
2263
|
+
hasValue(t) {
|
|
2264
|
+
return this.values.has(t);
|
|
2265
|
+
}
|
|
2266
|
+
getValue(t, e) {
|
|
2267
|
+
if (this.props.values && this.props.values[t]) return this.props.values[t];
|
|
2268
|
+
let i = this.values.get(t);
|
|
2269
|
+
return i === void 0 && e !== void 0 && (i = Vt(e === null ? void 0 : e, { owner: this }), this.addValue(t, i)), i;
|
|
2270
|
+
}
|
|
2271
|
+
readValue(t, e) {
|
|
2272
|
+
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2273
|
+
return i != null && (typeof i == "string" && (ts(i) || is(i)) ? i = parseFloat(i) : !Al(i) && G.test(e) && (i = Xs(t, e)), this.setBaseTarget(t, I(i) ? i.get() : i)), I(i) ? i.get() : i;
|
|
2274
|
+
}
|
|
2275
|
+
setBaseTarget(t, e) {
|
|
2276
|
+
this.baseTarget[t] = e;
|
|
2277
|
+
}
|
|
2278
|
+
getBaseTarget(t) {
|
|
2279
|
+
const { initial: e } = this.props;
|
|
2280
|
+
let i;
|
|
2281
|
+
if (typeof e == "string" || typeof e == "object") {
|
|
2282
|
+
const s = Ti(this.props, e, this.presenceContext?.custom);
|
|
2283
|
+
s && (i = s[t]);
|
|
2284
|
+
}
|
|
2285
|
+
if (e && i !== void 0) return i;
|
|
2286
|
+
const n = this.getBaseTargetFromProps(this.props, t);
|
|
2287
|
+
return n !== void 0 && !I(n) ? n : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
2288
|
+
}
|
|
2289
|
+
on(t, e) {
|
|
2290
|
+
return this.events[t] || (this.events[t] = new oi()), this.events[t].add(e);
|
|
2291
|
+
}
|
|
2292
|
+
notify(t, ...e) {
|
|
2293
|
+
this.events[t] && this.events[t].notify(...e);
|
|
2294
|
+
}
|
|
2295
|
+
scheduleRenderMicrotask() {
|
|
2296
|
+
Pi.render(this.render);
|
|
2297
|
+
}
|
|
2298
|
+
}, sr = class extends Rl {
|
|
2299
|
+
constructor() {
|
|
2300
|
+
super(...arguments), this.KeyframeResolver = sl;
|
|
2301
|
+
}
|
|
2302
|
+
sortInstanceNodePosition(t, e) {
|
|
2303
|
+
return t.compareDocumentPosition(e) & 2 ? 1 : -1;
|
|
2304
|
+
}
|
|
2305
|
+
getBaseTargetFromProps(t, e) {
|
|
2306
|
+
const i = t.style;
|
|
2307
|
+
return i ? i[e] : void 0;
|
|
2308
|
+
}
|
|
2309
|
+
removeValueFromRenderState(t, { vars: e, style: i }) {
|
|
2310
|
+
delete e[t], delete i[t];
|
|
2311
|
+
}
|
|
2312
|
+
handleChildMotionValue() {
|
|
2313
|
+
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2314
|
+
const { children: t } = this.props;
|
|
2315
|
+
I(t) && (this.childSubscription = t.on("change", (e) => {
|
|
2316
|
+
this.current && (this.current.textContent = `${e}`);
|
|
2317
|
+
}));
|
|
2318
|
+
}
|
|
2319
|
+
}, at = class {
|
|
2320
|
+
constructor(t) {
|
|
2321
|
+
this.isMounted = !1, this.node = t;
|
|
2322
|
+
}
|
|
2323
|
+
update() {
|
|
2324
|
+
}
|
|
2325
|
+
};
|
|
2326
|
+
function rr({ top: t, left: e, right: i, bottom: n }) {
|
|
2327
|
+
return {
|
|
2328
|
+
x: {
|
|
2329
|
+
min: e,
|
|
2330
|
+
max: i
|
|
2331
|
+
},
|
|
2332
|
+
y: {
|
|
2333
|
+
min: t,
|
|
2334
|
+
max: n
|
|
2335
|
+
}
|
|
2336
|
+
};
|
|
2337
|
+
}
|
|
2338
|
+
function Ll({ x: t, y: e }) {
|
|
2339
|
+
return {
|
|
2340
|
+
top: e.min,
|
|
2341
|
+
right: t.max,
|
|
2342
|
+
bottom: e.max,
|
|
2343
|
+
left: t.min
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2346
|
+
function kl(t, e) {
|
|
2347
|
+
if (!e) return t;
|
|
2348
|
+
const i = e({
|
|
2349
|
+
x: t.left,
|
|
2350
|
+
y: t.top
|
|
2351
|
+
}), n = e({
|
|
2352
|
+
x: t.right,
|
|
2353
|
+
y: t.bottom
|
|
2354
|
+
});
|
|
2355
|
+
return {
|
|
2356
|
+
top: i.y,
|
|
2357
|
+
left: i.x,
|
|
2358
|
+
bottom: n.y,
|
|
2359
|
+
right: n.x
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2362
|
+
function Se(t) {
|
|
2363
|
+
return t === void 0 || t === 1;
|
|
2364
|
+
}
|
|
2365
|
+
function Ze({ scale: t, scaleX: e, scaleY: i }) {
|
|
2366
|
+
return !Se(t) || !Se(e) || !Se(i);
|
|
2367
|
+
}
|
|
2368
|
+
function ht(t) {
|
|
2369
|
+
return Ze(t) || or(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2370
|
+
}
|
|
2371
|
+
function or(t) {
|
|
2372
|
+
return rn(t.x) || rn(t.y);
|
|
2373
|
+
}
|
|
2374
|
+
function rn(t) {
|
|
2375
|
+
return t && t !== "0%";
|
|
2376
|
+
}
|
|
2377
|
+
function le(t, e, i) {
|
|
2378
|
+
return i + e * (t - i);
|
|
2379
|
+
}
|
|
2380
|
+
function on(t, e, i, n, s) {
|
|
2381
|
+
return s !== void 0 && (t = le(t, s, n)), le(t, i, n) + e;
|
|
2382
|
+
}
|
|
2383
|
+
function Je(t, e = 0, i = 1, n, s) {
|
|
2384
|
+
t.min = on(t.min, e, i, n, s), t.max = on(t.max, e, i, n, s);
|
|
2385
|
+
}
|
|
2386
|
+
function ar(t, { x: e, y: i }) {
|
|
2387
|
+
Je(t.x, e.translate, e.scale, e.originPoint), Je(t.y, i.translate, i.scale, i.originPoint);
|
|
2388
|
+
}
|
|
2389
|
+
var an = 0.999999999999, ln = 1.0000000000001;
|
|
2390
|
+
function Bl(t, e, i, n = !1) {
|
|
2391
|
+
const s = i.length;
|
|
2392
|
+
if (!s) return;
|
|
2393
|
+
e.x = e.y = 1;
|
|
2394
|
+
let o, r;
|
|
2395
|
+
for (let a = 0; a < s; a++) {
|
|
2396
|
+
o = i[a], r = o.projectionDelta;
|
|
2397
|
+
const { visualElement: l } = o.options;
|
|
2398
|
+
l && l.props.style && l.props.style.display === "contents" || (n && o.options.layoutScroll && o.scroll && o !== o.root && (Z(t.x, -o.scroll.offset.x), Z(t.y, -o.scroll.offset.y)), r && (e.x *= r.x.scale, e.y *= r.y.scale, ar(t, r)), n && ht(o.latestValues) && te(t, o.latestValues, o.layout?.layoutBox));
|
|
2399
|
+
}
|
|
2400
|
+
e.x < ln && e.x > an && (e.x = 1), e.y < ln && e.y > an && (e.y = 1);
|
|
2401
|
+
}
|
|
2402
|
+
function Z(t, e) {
|
|
2403
|
+
t.min += e, t.max += e;
|
|
2404
|
+
}
|
|
2405
|
+
function un(t, e, i, n, s = 0.5) {
|
|
2406
|
+
Je(t, e, i, V(t.min, t.max, s), n);
|
|
2407
|
+
}
|
|
2408
|
+
function cn(t, e) {
|
|
2409
|
+
return typeof t == "string" ? parseFloat(t) / 100 * (e.max - e.min) : t;
|
|
2410
|
+
}
|
|
2411
|
+
function te(t, e, i) {
|
|
2412
|
+
const n = i ?? t;
|
|
2413
|
+
un(t.x, cn(e.x, n.x), e.scaleX, e.scale, e.originX), un(t.y, cn(e.y, n.y), e.scaleY, e.scale, e.originY);
|
|
2414
|
+
}
|
|
2415
|
+
function lr(t, e) {
|
|
2416
|
+
return rr(kl(t.getBoundingClientRect(), e));
|
|
2417
|
+
}
|
|
2418
|
+
function Il(t, e, i) {
|
|
2419
|
+
const n = lr(t, i), { scroll: s } = e;
|
|
2420
|
+
return s && (Z(n.x, s.offset.x), Z(n.y, s.offset.y)), n;
|
|
2421
|
+
}
|
|
2422
|
+
var Fl = {
|
|
2423
|
+
x: "translateX",
|
|
2424
|
+
y: "translateY",
|
|
2425
|
+
z: "translateZ",
|
|
2426
|
+
transformPerspective: "perspective"
|
|
2427
|
+
}, Ol = Et.length;
|
|
2428
|
+
function jl(t, e, i) {
|
|
2429
|
+
let n = "", s = !0;
|
|
2430
|
+
for (let o = 0; o < Ol; o++) {
|
|
2431
|
+
const r = Et[o], a = t[r];
|
|
2432
|
+
if (a === void 0) continue;
|
|
2433
|
+
let l = !0;
|
|
2434
|
+
if (typeof a == "number") l = a === (r.startsWith("scale") ? 1 : 0);
|
|
2435
|
+
else {
|
|
2436
|
+
const c = parseFloat(a);
|
|
2437
|
+
l = r.startsWith("scale") ? c === 1 : c === 0;
|
|
2438
|
+
}
|
|
2439
|
+
if (!l || i) {
|
|
2440
|
+
const c = qs(a, wi[r]);
|
|
2441
|
+
if (!l) {
|
|
2442
|
+
s = !1;
|
|
2443
|
+
const u = Fl[r] || r;
|
|
2444
|
+
n += `${u}(${c}) `;
|
|
2445
|
+
}
|
|
2446
|
+
i && (e[r] = c);
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
return n = n.trim(), i ? n = i(e, s ? "" : n) : s && (n = "none"), n;
|
|
2450
|
+
}
|
|
2451
|
+
function Mi(t, e, i) {
|
|
2452
|
+
const { style: n, vars: s, transformOrigin: o } = t;
|
|
2453
|
+
let r = !1, a = !1;
|
|
2454
|
+
for (const l in e) {
|
|
2455
|
+
const c = e[l];
|
|
2456
|
+
if (Rt.has(l)) {
|
|
2457
|
+
r = !0;
|
|
2458
|
+
continue;
|
|
2459
|
+
} else if (gs(l)) {
|
|
2460
|
+
s[l] = c;
|
|
2461
|
+
continue;
|
|
2462
|
+
} else {
|
|
2463
|
+
const u = qs(c, wi[l]);
|
|
2464
|
+
l.startsWith("origin") ? (a = !0, o[l] = u) : n[l] = u;
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
if (e.transform || (r || i ? n.transform = jl(e, t.transform, i) : n.transform && (n.transform = "none")), a) {
|
|
2468
|
+
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = o;
|
|
2469
|
+
n.transformOrigin = `${l} ${c} ${u}`;
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
function ur(t, { style: e, vars: i }, n, s) {
|
|
2473
|
+
const o = t.style;
|
|
2474
|
+
let r;
|
|
2475
|
+
for (r in e) o[r] = e[r];
|
|
2476
|
+
s?.applyProjectionStyles(o, n);
|
|
2477
|
+
for (r in i) o.setProperty(r, i[r]);
|
|
2478
|
+
}
|
|
2479
|
+
function hn(t, e) {
|
|
2480
|
+
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
2481
|
+
}
|
|
2482
|
+
var Lt = { correct: (t, e) => {
|
|
2483
|
+
if (!e.target) return t;
|
|
2484
|
+
if (typeof t == "string") if (T.test(t)) t = parseFloat(t);
|
|
2485
|
+
else return t;
|
|
2486
|
+
return `${hn(t, e.target.x)}% ${hn(t, e.target.y)}%`;
|
|
2487
|
+
} }, Nl = { correct: (t, { treeScale: e, projectionDelta: i }) => {
|
|
2488
|
+
const n = t, s = G.parse(t);
|
|
2489
|
+
if (s.length > 5) return n;
|
|
2490
|
+
const o = G.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = i.x.scale * e.x, l = i.y.scale * e.y;
|
|
2491
|
+
s[0 + r] /= a, s[1 + r] /= l;
|
|
2492
|
+
const c = V(a, l, 0.5);
|
|
2493
|
+
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
2494
|
+
} }, Qe = {
|
|
2495
|
+
borderRadius: {
|
|
2496
|
+
...Lt,
|
|
2497
|
+
applyTo: [
|
|
2498
|
+
"borderTopLeftRadius",
|
|
2499
|
+
"borderTopRightRadius",
|
|
2500
|
+
"borderBottomLeftRadius",
|
|
2501
|
+
"borderBottomRightRadius"
|
|
2502
|
+
]
|
|
2503
|
+
},
|
|
2504
|
+
borderTopLeftRadius: Lt,
|
|
2505
|
+
borderTopRightRadius: Lt,
|
|
2506
|
+
borderBottomLeftRadius: Lt,
|
|
2507
|
+
borderBottomRightRadius: Lt,
|
|
2508
|
+
boxShadow: Nl
|
|
2509
|
+
};
|
|
2510
|
+
function cr(t, { layout: e, layoutId: i }) {
|
|
2511
|
+
return Rt.has(t) || t.startsWith("origin") || (e || i !== void 0) && (!!Qe[t] || t === "opacity");
|
|
2512
|
+
}
|
|
2513
|
+
function Ci(t, e, i) {
|
|
2514
|
+
const n = t.style, s = e?.style, o = {};
|
|
2515
|
+
if (!n) return o;
|
|
2516
|
+
for (const r in n) (I(n[r]) || s && I(s[r]) || cr(r, t) || i?.getValue(r)?.liveStyle !== void 0) && (o[r] = n[r]);
|
|
2517
|
+
return o;
|
|
2518
|
+
}
|
|
2519
|
+
function Ul(t) {
|
|
2520
|
+
return window.getComputedStyle(t);
|
|
2521
|
+
}
|
|
2522
|
+
var Wl = class extends sr {
|
|
2523
|
+
constructor() {
|
|
2524
|
+
super(...arguments), this.type = "html", this.renderInstance = ur;
|
|
2525
|
+
}
|
|
2526
|
+
readValueFromInstance(t, e) {
|
|
2527
|
+
if (Rt.has(e)) return this.projection?.isProjecting ? Ne(e) : ra(t, e);
|
|
2528
|
+
{
|
|
2529
|
+
const i = Ul(t), n = (gs(e) ? i.getPropertyValue(e) : i[e]) || 0;
|
|
2530
|
+
return typeof n == "string" ? n.trim() : n;
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
measureInstanceViewportBox(t, { transformPagePoint: e }) {
|
|
2534
|
+
return lr(t, e);
|
|
2535
|
+
}
|
|
2536
|
+
build(t, e, i) {
|
|
2537
|
+
Mi(t, e, i.transformTemplate);
|
|
2538
|
+
}
|
|
2539
|
+
scrapeMotionValuesFromProps(t, e, i) {
|
|
2540
|
+
return Ci(t, e, i);
|
|
2541
|
+
}
|
|
2542
|
+
}, _l = {
|
|
2543
|
+
offset: "stroke-dashoffset",
|
|
2544
|
+
array: "stroke-dasharray"
|
|
2545
|
+
}, Kl = {
|
|
2546
|
+
offset: "strokeDashoffset",
|
|
2547
|
+
array: "strokeDasharray"
|
|
2548
|
+
};
|
|
2549
|
+
function $l(t, e, i = 1, n = 0, s = !0) {
|
|
2550
|
+
t.pathLength = 1;
|
|
2551
|
+
const o = s ? _l : Kl;
|
|
2552
|
+
t[o.offset] = `${-n}`, t[o.array] = `${e} ${i}`;
|
|
2553
|
+
}
|
|
2554
|
+
var zl = [
|
|
2555
|
+
"offsetDistance",
|
|
2556
|
+
"offsetPath",
|
|
2557
|
+
"offsetRotate",
|
|
2558
|
+
"offsetAnchor"
|
|
2559
|
+
];
|
|
2560
|
+
function hr(t, { attrX: e, attrY: i, attrScale: n, pathLength: s, pathSpacing: o = 1, pathOffset: r = 0, ...a }, l, c, u) {
|
|
2561
|
+
if (Mi(t, a, c), l) {
|
|
2562
|
+
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2563
|
+
return;
|
|
2564
|
+
}
|
|
2565
|
+
t.attrs = t.style, t.style = {};
|
|
2566
|
+
const { attrs: h, style: f } = t;
|
|
2567
|
+
h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete h.transformBox);
|
|
2568
|
+
for (const p of zl) h[p] !== void 0 && (f[p] = h[p], delete h[p]);
|
|
2569
|
+
e !== void 0 && (h.x = e), i !== void 0 && (h.y = i), n !== void 0 && (h.scale = n), s !== void 0 && $l(h, s, o, r, !1);
|
|
2570
|
+
}
|
|
2571
|
+
var fr = /* @__PURE__ */ new Set([
|
|
2572
|
+
"baseFrequency",
|
|
2573
|
+
"diffuseConstant",
|
|
2574
|
+
"kernelMatrix",
|
|
2575
|
+
"kernelUnitLength",
|
|
2576
|
+
"keySplines",
|
|
2577
|
+
"keyTimes",
|
|
2578
|
+
"limitingConeAngle",
|
|
2579
|
+
"markerHeight",
|
|
2580
|
+
"markerWidth",
|
|
2581
|
+
"numOctaves",
|
|
2582
|
+
"targetX",
|
|
2583
|
+
"targetY",
|
|
2584
|
+
"surfaceScale",
|
|
2585
|
+
"specularConstant",
|
|
2586
|
+
"specularExponent",
|
|
2587
|
+
"stdDeviation",
|
|
2588
|
+
"tableValues",
|
|
2589
|
+
"viewBox",
|
|
2590
|
+
"gradientTransform",
|
|
2591
|
+
"pathLength",
|
|
2592
|
+
"startOffset",
|
|
2593
|
+
"textLength",
|
|
2594
|
+
"lengthAdjust"
|
|
2595
|
+
]), dr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2596
|
+
function Hl(t, e, i, n) {
|
|
2597
|
+
ur(t, e, void 0, n);
|
|
2598
|
+
for (const s in e.attrs) t.setAttribute(fr.has(s) ? s : xi(s), e.attrs[s]);
|
|
2599
|
+
}
|
|
2600
|
+
function pr(t, e, i) {
|
|
2601
|
+
const n = Ci(t, e, i);
|
|
2602
|
+
for (const s in t) if (I(t[s]) || I(e[s])) {
|
|
2603
|
+
const o = Et.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
2604
|
+
n[o] = t[s];
|
|
2605
|
+
}
|
|
2606
|
+
return n;
|
|
2607
|
+
}
|
|
2608
|
+
var Gl = class extends sr {
|
|
2609
|
+
constructor() {
|
|
2610
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = R;
|
|
2611
|
+
}
|
|
2612
|
+
getBaseTargetFromProps(t, e) {
|
|
2613
|
+
return t[e];
|
|
2614
|
+
}
|
|
2615
|
+
readValueFromInstance(t, e) {
|
|
2616
|
+
if (Rt.has(e)) {
|
|
2617
|
+
const i = Gs(e);
|
|
2618
|
+
return i && i.default || 0;
|
|
2619
|
+
}
|
|
2620
|
+
return e = fr.has(e) ? e : xi(e), t.getAttribute(e);
|
|
2621
|
+
}
|
|
2622
|
+
scrapeMotionValuesFromProps(t, e, i) {
|
|
2623
|
+
return pr(t, e, i);
|
|
2624
|
+
}
|
|
2625
|
+
build(t, e, i) {
|
|
2626
|
+
hr(t, e, this.isSVGTag, i.transformTemplate, i.style);
|
|
2627
|
+
}
|
|
2628
|
+
renderInstance(t, e, i, n) {
|
|
2629
|
+
Hl(t, e, i, n);
|
|
2630
|
+
}
|
|
2631
|
+
mount(t) {
|
|
2632
|
+
this.isSVGTag = dr(t.tagName), super.mount(t);
|
|
2633
|
+
}
|
|
2634
|
+
}, Xl = Vi.length;
|
|
2635
|
+
function mr(t) {
|
|
2636
|
+
if (!t) return;
|
|
2637
|
+
if (!t.isControllingVariants) {
|
|
2638
|
+
const i = t.parent ? mr(t.parent) || {} : {};
|
|
2639
|
+
return t.props.initial !== void 0 && (i.initial = t.props.initial), i;
|
|
2640
|
+
}
|
|
2641
|
+
const e = {};
|
|
2642
|
+
for (let i = 0; i < Xl; i++) {
|
|
2643
|
+
const n = Vi[i], s = t.props[n];
|
|
2644
|
+
(Nt(s) || s === !1) && (e[n] = s);
|
|
2645
|
+
}
|
|
2646
|
+
return e;
|
|
2647
|
+
}
|
|
2648
|
+
function vr(t, e) {
|
|
2649
|
+
if (!Array.isArray(e)) return !1;
|
|
2650
|
+
const i = e.length;
|
|
2651
|
+
if (i !== t.length) return !1;
|
|
2652
|
+
for (let n = 0; n < i; n++) if (e[n] !== t[n]) return !1;
|
|
2653
|
+
return !0;
|
|
2654
|
+
}
|
|
2655
|
+
var Yl = [...Ai].reverse(), ql = Ai.length;
|
|
2656
|
+
function Zl(t) {
|
|
2657
|
+
return (e) => Promise.all(e.map(({ animation: i, options: n }) => Ga(t, i, n)));
|
|
2658
|
+
}
|
|
2659
|
+
function Jl(t) {
|
|
2660
|
+
let e = Zl(t), i = fn(), n = !0, s = !1;
|
|
2661
|
+
const o = (c) => (u, h) => {
|
|
2662
|
+
const f = yt(t, h, c === "exit" ? t.presenceContext?.custom : void 0);
|
|
2663
|
+
if (f) {
|
|
2664
|
+
const { transition: p, transitionEnd: d, ...v } = f;
|
|
2665
|
+
u = {
|
|
2666
|
+
...u,
|
|
2667
|
+
...v,
|
|
2668
|
+
...d
|
|
2669
|
+
};
|
|
2670
|
+
}
|
|
2671
|
+
return u;
|
|
2672
|
+
};
|
|
2673
|
+
function r(c) {
|
|
2674
|
+
e = c(t);
|
|
2675
|
+
}
|
|
2676
|
+
function a(c) {
|
|
2677
|
+
const { props: u } = t, h = mr(t.parent) || {}, f = [], p = /* @__PURE__ */ new Set();
|
|
2678
|
+
let d = {}, v = 1 / 0;
|
|
2679
|
+
for (let m = 0; m < ql; m++) {
|
|
2680
|
+
const x = Yl[m], y = i[x], w = u[x] !== void 0 ? u[x] : h[x], b = Nt(w), E = x === c ? y.isActive : null;
|
|
2681
|
+
E === !1 && (v = m);
|
|
2682
|
+
let L = w === h[x] && w !== u[x] && b;
|
|
2683
|
+
if (L && (n || s) && t.manuallyAnimateOnMount && (L = !1), y.protectedKeys = { ...d }, !y.isActive && E === null || !w && !y.prevProp || de(w) || typeof w == "boolean") continue;
|
|
2684
|
+
if (x === "exit" && y.isActive && E !== !0) {
|
|
2685
|
+
y.prevResolvedValues && (d = {
|
|
2686
|
+
...d,
|
|
2687
|
+
...y.prevResolvedValues
|
|
2688
|
+
});
|
|
2689
|
+
continue;
|
|
2690
|
+
}
|
|
2691
|
+
const P = Ql(y.prevProp, w);
|
|
2692
|
+
let C = P || x === c && y.isActive && !L && b || m > v && b, S = !1;
|
|
2693
|
+
const F = Array.isArray(w) ? w : [w];
|
|
2694
|
+
let N = F.reduce(o(x), {});
|
|
2695
|
+
E === !1 && (N = {});
|
|
2696
|
+
const { prevResolvedValues: lt = {} } = y, X = {
|
|
2697
|
+
...lt,
|
|
2698
|
+
...N
|
|
2699
|
+
}, et = (k) => {
|
|
2700
|
+
C = !0, p.has(k) && (S = !0, p.delete(k)), y.needsAnimating[k] = !0;
|
|
2701
|
+
const _ = t.getValue(k);
|
|
2702
|
+
_ && (_.liveStyle = !1);
|
|
2703
|
+
};
|
|
2704
|
+
for (const k in X) {
|
|
2705
|
+
const _ = N[k], ut = lt[k];
|
|
2706
|
+
if (d.hasOwnProperty(k)) continue;
|
|
2707
|
+
let Tt = !1;
|
|
2708
|
+
ze(_) && ze(ut) ? Tt = !vr(_, ut) : Tt = _ !== ut, Tt ? _ != null ? et(k) : p.add(k) : _ !== void 0 && p.has(k) ? et(k) : y.protectedKeys[k] = !0;
|
|
2709
|
+
}
|
|
2710
|
+
y.prevProp = w, y.prevResolvedValues = N, y.isActive && (d = {
|
|
2711
|
+
...d,
|
|
2712
|
+
...N
|
|
2713
|
+
}), (n || s) && t.blockInitialAnimation && (C = !1);
|
|
2714
|
+
const Y = L && P;
|
|
2715
|
+
C && (!Y || S) && f.push(...F.map((k) => {
|
|
2716
|
+
const _ = { type: x };
|
|
2717
|
+
if (typeof k == "string" && (n || s) && !Y && t.manuallyAnimateOnMount && t.parent) {
|
|
2718
|
+
const { parent: ut } = t, Tt = yt(ut, k);
|
|
2719
|
+
if (ut.enteringChildren && Tt) {
|
|
2720
|
+
const { delayChildren: Wr } = Tt.transition || {};
|
|
2721
|
+
_.delay = js(ut.enteringChildren, t, Wr);
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
return {
|
|
2725
|
+
animation: k,
|
|
2726
|
+
options: _
|
|
2727
|
+
};
|
|
2728
|
+
}));
|
|
2729
|
+
}
|
|
2730
|
+
if (p.size) {
|
|
2731
|
+
const m = {};
|
|
2732
|
+
if (typeof u.initial != "boolean") {
|
|
2733
|
+
const x = yt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
2734
|
+
x && x.transition && (m.transition = x.transition);
|
|
2735
|
+
}
|
|
2736
|
+
p.forEach((x) => {
|
|
2737
|
+
const y = t.getBaseTarget(x), w = t.getValue(x);
|
|
2738
|
+
w && (w.liveStyle = !0), m[x] = y ?? null;
|
|
2739
|
+
}), f.push({ animation: m });
|
|
2740
|
+
}
|
|
2741
|
+
let g = !!f.length;
|
|
2742
|
+
return n && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (g = !1), n = !1, s = !1, g ? e(f) : Promise.resolve();
|
|
2743
|
+
}
|
|
2744
|
+
function l(c, u) {
|
|
2745
|
+
if (i[c].isActive === u) return Promise.resolve();
|
|
2746
|
+
t.variantChildren?.forEach((f) => f.animationState?.setActive(c, u)), i[c].isActive = u;
|
|
2747
|
+
const h = a(c);
|
|
2748
|
+
for (const f in i) i[f].protectedKeys = {};
|
|
2749
|
+
return h;
|
|
2750
|
+
}
|
|
2751
|
+
return {
|
|
2752
|
+
animateChanges: a,
|
|
2753
|
+
setActive: l,
|
|
2754
|
+
setAnimateFunction: r,
|
|
2755
|
+
getState: () => i,
|
|
2756
|
+
reset: () => {
|
|
2757
|
+
i = fn(), s = !0;
|
|
2758
|
+
}
|
|
2759
|
+
};
|
|
2760
|
+
}
|
|
2761
|
+
function Ql(t, e) {
|
|
2762
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !vr(e, t) : !1;
|
|
2763
|
+
}
|
|
2764
|
+
function ct(t = !1) {
|
|
2765
|
+
return {
|
|
2766
|
+
isActive: t,
|
|
2767
|
+
protectedKeys: {},
|
|
2768
|
+
needsAnimating: {},
|
|
2769
|
+
prevResolvedValues: {}
|
|
2770
|
+
};
|
|
2771
|
+
}
|
|
2772
|
+
function fn() {
|
|
2773
|
+
return {
|
|
2774
|
+
animate: ct(!0),
|
|
2775
|
+
whileInView: ct(),
|
|
2776
|
+
whileHover: ct(),
|
|
2777
|
+
whileTap: ct(),
|
|
2778
|
+
whileDrag: ct(),
|
|
2779
|
+
whileFocus: ct(),
|
|
2780
|
+
exit: ct()
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2783
|
+
function ti(t, e) {
|
|
2784
|
+
t.min = e.min, t.max = e.max;
|
|
2785
|
+
}
|
|
2786
|
+
function z(t, e) {
|
|
2787
|
+
ti(t.x, e.x), ti(t.y, e.y);
|
|
2788
|
+
}
|
|
2789
|
+
function dn(t, e) {
|
|
2790
|
+
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
2791
|
+
}
|
|
2792
|
+
var gr = 1e-4, tu = 1 - gr, eu = 1 + gr, yr = 0.01, iu = 0 - yr, nu = 0 + yr;
|
|
2793
|
+
function j(t) {
|
|
2794
|
+
return t.max - t.min;
|
|
2795
|
+
}
|
|
2796
|
+
function su(t, e, i) {
|
|
2797
|
+
return Math.abs(t - e) <= i;
|
|
2798
|
+
}
|
|
2799
|
+
function pn(t, e, i, n = 0.5) {
|
|
2800
|
+
t.origin = n, t.originPoint = V(e.min, e.max, t.origin), t.scale = j(i) / j(e), t.translate = V(i.min, i.max, t.origin) - t.originPoint, (t.scale >= tu && t.scale <= eu || isNaN(t.scale)) && (t.scale = 1), (t.translate >= iu && t.translate <= nu || isNaN(t.translate)) && (t.translate = 0);
|
|
2801
|
+
}
|
|
2802
|
+
function It(t, e, i, n) {
|
|
2803
|
+
pn(t.x, e.x, i.x, n ? n.originX : void 0), pn(t.y, e.y, i.y, n ? n.originY : void 0);
|
|
2804
|
+
}
|
|
2805
|
+
function mn(t, e, i, n = 0) {
|
|
2806
|
+
t.min = (n ? V(i.min, i.max, n) : i.min) + e.min, t.max = t.min + j(e);
|
|
2807
|
+
}
|
|
2808
|
+
function ru(t, e, i, n) {
|
|
2809
|
+
mn(t.x, e.x, i.x, n?.x), mn(t.y, e.y, i.y, n?.y);
|
|
2810
|
+
}
|
|
2811
|
+
function vn(t, e, i, n = 0) {
|
|
2812
|
+
const s = n ? V(i.min, i.max, n) : i.min;
|
|
2813
|
+
t.min = e.min - s, t.max = t.min + j(e);
|
|
2814
|
+
}
|
|
2815
|
+
function ue(t, e, i, n) {
|
|
2816
|
+
vn(t.x, e.x, i.x, n?.x), vn(t.y, e.y, i.y, n?.y);
|
|
2817
|
+
}
|
|
2818
|
+
function gn(t, e, i, n, s) {
|
|
2819
|
+
return t -= e, t = le(t, 1 / i, n), s !== void 0 && (t = le(t, 1 / s, n)), t;
|
|
2820
|
+
}
|
|
2821
|
+
function ou(t, e = 0, i = 1, n = 0.5, s, o = t, r = t) {
|
|
2822
|
+
if (Q.test(e) && (e = parseFloat(e), e = V(r.min, r.max, e / 100) - r.min), typeof e != "number") return;
|
|
2823
|
+
let a = V(o.min, o.max, n);
|
|
2824
|
+
t === o && (a -= e), t.min = gn(t.min, e, i, a, s), t.max = gn(t.max, e, i, a, s);
|
|
2825
|
+
}
|
|
2826
|
+
function yn(t, e, [i, n, s], o, r) {
|
|
2827
|
+
ou(t, e[i], e[n], e[s], e.scale, o, r);
|
|
2828
|
+
}
|
|
2829
|
+
var au = [
|
|
2830
|
+
"x",
|
|
2831
|
+
"scaleX",
|
|
2832
|
+
"originX"
|
|
2833
|
+
], lu = [
|
|
2834
|
+
"y",
|
|
2835
|
+
"scaleY",
|
|
2836
|
+
"originY"
|
|
2837
|
+
];
|
|
2838
|
+
function Tn(t, e, i, n) {
|
|
2839
|
+
yn(t.x, e, au, i ? i.x : void 0, n ? n.x : void 0), yn(t.y, e, lu, i ? i.y : void 0, n ? n.y : void 0);
|
|
2840
|
+
}
|
|
2841
|
+
function xn(t) {
|
|
2842
|
+
return t.translate === 0 && t.scale === 1;
|
|
2843
|
+
}
|
|
2844
|
+
function Tr(t) {
|
|
2845
|
+
return xn(t.x) && xn(t.y);
|
|
2846
|
+
}
|
|
2847
|
+
function wn(t, e) {
|
|
2848
|
+
return t.min === e.min && t.max === e.max;
|
|
2849
|
+
}
|
|
2850
|
+
function uu(t, e) {
|
|
2851
|
+
return wn(t.x, e.x) && wn(t.y, e.y);
|
|
2852
|
+
}
|
|
2853
|
+
function Pn(t, e) {
|
|
2854
|
+
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
2855
|
+
}
|
|
2856
|
+
function xr(t, e) {
|
|
2857
|
+
return Pn(t.x, e.x) && Pn(t.y, e.y);
|
|
2858
|
+
}
|
|
2859
|
+
function Sn(t) {
|
|
2860
|
+
return j(t.x) / j(t.y);
|
|
2861
|
+
}
|
|
2862
|
+
function bn(t, e) {
|
|
2863
|
+
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
2864
|
+
}
|
|
2865
|
+
function q(t) {
|
|
2866
|
+
return [t("x"), t("y")];
|
|
2867
|
+
}
|
|
2868
|
+
function cu(t, e, i) {
|
|
2869
|
+
let n = "";
|
|
2870
|
+
const s = t.x.translate / e.x, o = t.y.translate / e.y, r = i?.z || 0;
|
|
2871
|
+
if ((s || o || r) && (n = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (n += `scale(${1 / e.x}, ${1 / e.y}) `), i) {
|
|
2872
|
+
const { transformPerspective: c, rotate: u, rotateX: h, rotateY: f, skewX: p, skewY: d } = i;
|
|
2873
|
+
c && (n = `perspective(${c}px) ${n}`), u && (n += `rotate(${u}deg) `), h && (n += `rotateX(${h}deg) `), f && (n += `rotateY(${f}deg) `), p && (n += `skewX(${p}deg) `), d && (n += `skewY(${d}deg) `);
|
|
2874
|
+
}
|
|
2875
|
+
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
2876
|
+
return (a !== 1 || l !== 1) && (n += `scale(${a}, ${l})`), n || "none";
|
|
2877
|
+
}
|
|
2878
|
+
var wr = [
|
|
2879
|
+
"borderTopLeftRadius",
|
|
2880
|
+
"borderTopRightRadius",
|
|
2881
|
+
"borderBottomLeftRadius",
|
|
2882
|
+
"borderBottomRightRadius"
|
|
2883
|
+
], hu = wr.length, An = (t) => typeof t == "string" ? parseFloat(t) : t, Vn = (t) => typeof t == "number" || T.test(t);
|
|
2884
|
+
function fu(t, e, i, n, s, o) {
|
|
2885
|
+
s ? (t.opacity = V(0, i.opacity ?? 1, du(n)), t.opacityExit = V(e.opacity ?? 1, 0, pu(n))) : o && (t.opacity = V(e.opacity ?? 1, i.opacity ?? 1, n));
|
|
2886
|
+
for (let r = 0; r < hu; r++) {
|
|
2887
|
+
const a = wr[r];
|
|
2888
|
+
let l = Mn(e, a), c = Mn(i, a);
|
|
2889
|
+
l === void 0 && c === void 0 || (l || (l = 0), c || (c = 0), l === 0 || c === 0 || Vn(l) === Vn(c) ? (t[a] = Math.max(V(An(l), An(c), n), 0), (Q.test(c) || Q.test(l)) && (t[a] += "%")) : t[a] = c);
|
|
2890
|
+
}
|
|
2891
|
+
(e.rotate || i.rotate) && (t.rotate = V(e.rotate || 0, i.rotate || 0, n));
|
|
2892
|
+
}
|
|
2893
|
+
function Mn(t, e) {
|
|
2894
|
+
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
2895
|
+
}
|
|
2896
|
+
var du = /* @__PURE__ */ Pr(0, 0.5, hs), pu = /* @__PURE__ */ Pr(0.5, 0.95, $);
|
|
2897
|
+
function Pr(t, e, i) {
|
|
2898
|
+
return (n) => n < t ? 0 : n > e ? 1 : i(Ot(t, e, n));
|
|
2899
|
+
}
|
|
2900
|
+
function mu(t, e, i) {
|
|
2901
|
+
const n = I(t) ? t : Vt(t);
|
|
2902
|
+
return n.start(yi("", n, e, i)), n.animation;
|
|
2903
|
+
}
|
|
2904
|
+
function Ut(t, e, i, n = { passive: !0 }) {
|
|
2905
|
+
return t.addEventListener(e, i, n), () => t.removeEventListener(e, i);
|
|
2906
|
+
}
|
|
2907
|
+
var vu = (t, e) => t.depth - e.depth, gu = class {
|
|
2908
|
+
constructor() {
|
|
2909
|
+
this.children = [], this.isDirty = !1;
|
|
2910
|
+
}
|
|
2911
|
+
add(t) {
|
|
2912
|
+
ri(this.children, t), this.isDirty = !0;
|
|
2913
|
+
}
|
|
2914
|
+
remove(t) {
|
|
2915
|
+
ne(this.children, t), this.isDirty = !0;
|
|
2916
|
+
}
|
|
2917
|
+
forEach(t) {
|
|
2918
|
+
this.isDirty && this.children.sort(vu), this.isDirty = !1, this.children.forEach(t);
|
|
2919
|
+
}
|
|
2920
|
+
};
|
|
2921
|
+
function yu(t, e) {
|
|
2922
|
+
const i = O.now(), n = ({ timestamp: s }) => {
|
|
2923
|
+
const o = s - i;
|
|
2924
|
+
o >= e && (ot(n), t(o - e));
|
|
2925
|
+
};
|
|
2926
|
+
return A.setup(n, !0), () => ot(n);
|
|
2927
|
+
}
|
|
2928
|
+
function ee(t) {
|
|
2929
|
+
return I(t) ? t.get() : t;
|
|
2930
|
+
}
|
|
2931
|
+
var Tu = class {
|
|
2932
|
+
constructor() {
|
|
2933
|
+
this.members = [];
|
|
2934
|
+
}
|
|
2935
|
+
add(t) {
|
|
2936
|
+
ri(this.members, t);
|
|
2937
|
+
for (let e = this.members.length - 1; e >= 0; e--) {
|
|
2938
|
+
const i = this.members[e];
|
|
2939
|
+
if (i === t || i === this.lead || i === this.prevLead) continue;
|
|
2940
|
+
const n = i.instance;
|
|
2941
|
+
(!n || n.isConnected === !1) && !i.snapshot && (ne(this.members, i), i.unmount());
|
|
2942
|
+
}
|
|
2943
|
+
t.scheduleRender();
|
|
2944
|
+
}
|
|
2945
|
+
remove(t) {
|
|
2946
|
+
if (ne(this.members, t), t === this.prevLead && (this.prevLead = void 0), t === this.lead) {
|
|
2947
|
+
const e = this.members[this.members.length - 1];
|
|
2948
|
+
e && this.promote(e);
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
relegate(t) {
|
|
2952
|
+
for (let e = this.members.indexOf(t) - 1; e >= 0; e--) {
|
|
2953
|
+
const i = this.members[e];
|
|
2954
|
+
if (i.isPresent !== !1 && i.instance?.isConnected !== !1)
|
|
2955
|
+
return this.promote(i), !0;
|
|
2956
|
+
}
|
|
2957
|
+
return !1;
|
|
2958
|
+
}
|
|
2959
|
+
promote(t, e) {
|
|
2960
|
+
const i = this.lead;
|
|
2961
|
+
if (t !== i && (this.prevLead = i, this.lead = t, t.show(), i)) {
|
|
2962
|
+
i.updateSnapshot(), t.scheduleRender();
|
|
2963
|
+
const { layoutDependency: n } = i.options, { layoutDependency: s } = t.options;
|
|
2964
|
+
(n === void 0 || n !== s) && (t.resumeFrom = i, e && (i.preserveOpacity = !0), i.snapshot && (t.snapshot = i.snapshot, t.snapshot.latestValues = i.animationValues || i.latestValues), t.root?.isUpdating && (t.isLayoutDirty = !0)), t.options.crossfade === !1 && i.hide();
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
exitAnimationComplete() {
|
|
2968
|
+
this.members.forEach((t) => {
|
|
2969
|
+
t.options.onExitComplete?.(), t.resumingFrom?.options.onExitComplete?.();
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
scheduleRender() {
|
|
2973
|
+
this.members.forEach((t) => t.instance && t.scheduleRender(!1));
|
|
2974
|
+
}
|
|
2975
|
+
removeLeadSnapshot() {
|
|
2976
|
+
this.lead?.snapshot && (this.lead.snapshot = void 0);
|
|
2977
|
+
}
|
|
2978
|
+
}, ie = {
|
|
2979
|
+
hasAnimatedSinceResize: !0,
|
|
2980
|
+
hasEverUpdated: !1
|
|
2981
|
+
}, ft = {
|
|
2982
|
+
nodes: 0,
|
|
2983
|
+
calculatedTargetDeltas: 0,
|
|
2984
|
+
calculatedProjections: 0
|
|
2985
|
+
}, be = [
|
|
2986
|
+
"",
|
|
2987
|
+
"X",
|
|
2988
|
+
"Y",
|
|
2989
|
+
"Z"
|
|
2990
|
+
], xu = 1e3, wu = 0;
|
|
2991
|
+
function Ae(t, e, i, n) {
|
|
2992
|
+
const { latestValues: s } = e;
|
|
2993
|
+
s[t] && (i[t] = s[t], e.setStaticValue(t, 0), n && (n[t] = 0));
|
|
2994
|
+
}
|
|
2995
|
+
function Sr(t) {
|
|
2996
|
+
if (t.hasCheckedOptimisedAppear = !0, t.root === t) return;
|
|
2997
|
+
const { visualElement: e } = t.options;
|
|
2998
|
+
if (!e) return;
|
|
2999
|
+
const i = Ks(e);
|
|
3000
|
+
if (window.MotionHasOptimisedAnimation(i, "transform")) {
|
|
3001
|
+
const { layout: s, layoutId: o } = t.options;
|
|
3002
|
+
window.MotionCancelOptimisedAnimation(i, "transform", A, !(s || o));
|
|
3003
|
+
}
|
|
3004
|
+
const { parent: n } = t;
|
|
3005
|
+
n && !n.hasCheckedOptimisedAppear && Sr(n);
|
|
3006
|
+
}
|
|
3007
|
+
function br({ attachResizeListener: t, defaultParent: e, measureScroll: i, checkIsScrollRoot: n, resetTransform: s }) {
|
|
3008
|
+
return class {
|
|
3009
|
+
constructor(r = {}, a = e?.()) {
|
|
3010
|
+
this.id = wu++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
|
|
3011
|
+
x: 1,
|
|
3012
|
+
y: 1
|
|
3013
|
+
}, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3014
|
+
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3015
|
+
}, this.updateProjection = () => {
|
|
3016
|
+
this.projectionUpdateScheduled = !1, J.value && (ft.nodes = ft.calculatedTargetDeltas = ft.calculatedProjections = 0), this.nodes.forEach(bu), this.nodes.forEach(Eu), this.nodes.forEach(Ru), this.nodes.forEach(Au), J.addProjectionMetrics && J.addProjectionMetrics(ft);
|
|
3017
|
+
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3018
|
+
for (let l = 0; l < this.path.length; l++) this.path[l].shouldResetTransform = !0;
|
|
3019
|
+
this.root === this && (this.nodes = new gu());
|
|
3020
|
+
}
|
|
3021
|
+
addEventListener(r, a) {
|
|
3022
|
+
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new oi()), this.eventHandlers.get(r).add(a);
|
|
3023
|
+
}
|
|
3024
|
+
notifyListeners(r, ...a) {
|
|
3025
|
+
const l = this.eventHandlers.get(r);
|
|
3026
|
+
l && l.notify(...a);
|
|
3027
|
+
}
|
|
3028
|
+
hasListeners(r) {
|
|
3029
|
+
return this.eventHandlers.has(r);
|
|
3030
|
+
}
|
|
3031
|
+
mount(r) {
|
|
3032
|
+
if (this.instance) return;
|
|
3033
|
+
this.isSVG = bi(r) && !Sl(r), this.instance = r;
|
|
3034
|
+
const { layoutId: a, layout: l, visualElement: c } = this.options;
|
|
3035
|
+
if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
3036
|
+
let u, h = 0;
|
|
3037
|
+
const f = () => this.root.updateBlockedByResize = !1;
|
|
3038
|
+
A.read(() => {
|
|
3039
|
+
h = window.innerWidth;
|
|
3040
|
+
}), t(r, () => {
|
|
3041
|
+
const p = window.innerWidth;
|
|
3042
|
+
p !== h && (h = p, this.root.updateBlockedByResize = !0, u && u(), u = yu(f, 250), ie.hasAnimatedSinceResize && (ie.hasAnimatedSinceResize = !1, this.nodes.forEach(En)));
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: p }) => {
|
|
3046
|
+
if (this.isTreeAnimationBlocked()) {
|
|
3047
|
+
this.target = void 0, this.relativeTarget = void 0;
|
|
3048
|
+
return;
|
|
3049
|
+
}
|
|
3050
|
+
const d = this.options.transition || c.getDefaultTransition() || Fu, { onLayoutAnimationStart: v, onLayoutAnimationComplete: g } = c.getProps(), m = !this.targetLayout || !xr(this.targetLayout, p), x = !h && f;
|
|
3051
|
+
if (this.options.layoutRoot || this.resumeFrom || x || h && (m || !this.currentAnimation)) {
|
|
3052
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
3053
|
+
const y = {
|
|
3054
|
+
...gi(d, "layout"),
|
|
3055
|
+
onPlay: v,
|
|
3056
|
+
onComplete: g
|
|
3057
|
+
};
|
|
3058
|
+
(c.shouldReduceMotion || this.options.layoutRoot) && (y.delay = 0, y.type = !1), this.startAnimation(y), this.setAnimationOrigin(u, x);
|
|
3059
|
+
} else
|
|
3060
|
+
h || En(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3061
|
+
this.targetLayout = p;
|
|
3062
|
+
});
|
|
3063
|
+
}
|
|
3064
|
+
unmount() {
|
|
3065
|
+
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
3066
|
+
const r = this.getStack();
|
|
3067
|
+
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), ot(this.updateProjection);
|
|
3068
|
+
}
|
|
3069
|
+
blockUpdate() {
|
|
3070
|
+
this.updateManuallyBlocked = !0;
|
|
3071
|
+
}
|
|
3072
|
+
unblockUpdate() {
|
|
3073
|
+
this.updateManuallyBlocked = !1;
|
|
3074
|
+
}
|
|
3075
|
+
isUpdateBlocked() {
|
|
3076
|
+
return this.updateManuallyBlocked || this.updateBlockedByResize;
|
|
3077
|
+
}
|
|
3078
|
+
isTreeAnimationBlocked() {
|
|
3079
|
+
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
|
|
3080
|
+
}
|
|
3081
|
+
startUpdate() {
|
|
3082
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Lu), this.animationId++);
|
|
3083
|
+
}
|
|
3084
|
+
getTransformTemplate() {
|
|
3085
|
+
const { visualElement: r } = this.options;
|
|
3086
|
+
return r && r.getProps().transformTemplate;
|
|
3087
|
+
}
|
|
3088
|
+
willUpdate(r = !0) {
|
|
3089
|
+
if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
|
|
3090
|
+
this.options.onExitComplete && this.options.onExitComplete();
|
|
3091
|
+
return;
|
|
3092
|
+
}
|
|
3093
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Sr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
|
|
3094
|
+
this.isLayoutDirty = !0;
|
|
3095
|
+
for (let u = 0; u < this.path.length; u++) {
|
|
3096
|
+
const h = this.path[u];
|
|
3097
|
+
h.shouldResetTransform = !0, (typeof h.latestValues.x == "string" || typeof h.latestValues.y == "string") && (h.isLayoutDirty = !0), h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
|
|
3098
|
+
}
|
|
3099
|
+
const { layoutId: a, layout: l } = this.options;
|
|
3100
|
+
if (a === void 0 && !l) return;
|
|
3101
|
+
const c = this.getTransformTemplate();
|
|
3102
|
+
this.prevTransformTemplateValue = c ? c(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
|
|
3103
|
+
}
|
|
3104
|
+
update() {
|
|
3105
|
+
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
3106
|
+
const a = this.updateBlockedByResize;
|
|
3107
|
+
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), a && this.nodes.forEach(Mu), this.nodes.forEach(Cn);
|
|
3108
|
+
return;
|
|
3109
|
+
}
|
|
3110
|
+
if (this.animationId <= this.animationCommitId) {
|
|
3111
|
+
this.nodes.forEach(Dn);
|
|
3112
|
+
return;
|
|
3113
|
+
}
|
|
3114
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Cu), this.nodes.forEach(Du), this.nodes.forEach(Pu), this.nodes.forEach(Su)) : this.nodes.forEach(Dn), this.clearAllSnapshots();
|
|
3115
|
+
const r = O.now();
|
|
3116
|
+
B.delta = tt(0, 1e3 / 60, r - B.timestamp), B.timestamp = r, B.isProcessing = !0, ve.update.process(B), ve.preRender.process(B), ve.render.process(B), B.isProcessing = !1;
|
|
3117
|
+
}
|
|
3118
|
+
didUpdate() {
|
|
3119
|
+
this.updateScheduled || (this.updateScheduled = !0, Pi.read(this.scheduleUpdate));
|
|
3120
|
+
}
|
|
3121
|
+
clearAllSnapshots() {
|
|
3122
|
+
this.nodes.forEach(Vu), this.sharedNodes.forEach(ku);
|
|
3123
|
+
}
|
|
3124
|
+
scheduleUpdateProjection() {
|
|
3125
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, A.preRender(this.updateProjection, !1, !0));
|
|
3126
|
+
}
|
|
3127
|
+
scheduleCheckAfterUnmount() {
|
|
3128
|
+
A.postRender(() => {
|
|
3129
|
+
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
3130
|
+
});
|
|
3131
|
+
}
|
|
3132
|
+
updateSnapshot() {
|
|
3133
|
+
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !j(this.snapshot.measuredBox.x) && !j(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
3134
|
+
}
|
|
3135
|
+
updateLayout() {
|
|
3136
|
+
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
|
|
3137
|
+
if (this.resumeFrom && !this.resumeFrom.instance) for (let l = 0; l < this.path.length; l++) this.path[l].updateScroll();
|
|
3138
|
+
const r = this.layout;
|
|
3139
|
+
this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected || (this.layoutCorrected = R()), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
3140
|
+
const { visualElement: a } = this.options;
|
|
3141
|
+
a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
|
|
3142
|
+
}
|
|
3143
|
+
updateScroll(r = "measure") {
|
|
3144
|
+
let a = !!(this.options.layoutScroll && this.instance);
|
|
3145
|
+
if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a && this.instance) {
|
|
3146
|
+
const l = n(this.instance);
|
|
3147
|
+
this.scroll = {
|
|
3148
|
+
animationId: this.root.animationId,
|
|
3149
|
+
phase: r,
|
|
3150
|
+
isRoot: l,
|
|
3151
|
+
offset: i(this.instance),
|
|
3152
|
+
wasRoot: this.scroll ? this.scroll.isRoot : l
|
|
3153
|
+
};
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
resetTransform() {
|
|
3157
|
+
if (!s) return;
|
|
3158
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Tr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
3159
|
+
r && this.instance && (a || ht(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3160
|
+
}
|
|
3161
|
+
measure(r = !0) {
|
|
3162
|
+
const a = this.measurePageBox();
|
|
3163
|
+
let l = this.removeElementScroll(a);
|
|
3164
|
+
return r && (l = this.removeTransform(l)), Ou(l), {
|
|
3165
|
+
animationId: this.root.animationId,
|
|
3166
|
+
measuredBox: a,
|
|
3167
|
+
layoutBox: l,
|
|
3168
|
+
latestValues: {},
|
|
3169
|
+
source: this.id
|
|
3170
|
+
};
|
|
3171
|
+
}
|
|
3172
|
+
measurePageBox() {
|
|
3173
|
+
const { visualElement: r } = this.options;
|
|
3174
|
+
if (!r) return R();
|
|
3175
|
+
const a = r.measureViewportBox();
|
|
3176
|
+
if (!(this.scroll?.wasRoot || this.path.some(ju))) {
|
|
3177
|
+
const { scroll: l } = this.root;
|
|
3178
|
+
l && (Z(a.x, l.offset.x), Z(a.y, l.offset.y));
|
|
3179
|
+
}
|
|
3180
|
+
return a;
|
|
3181
|
+
}
|
|
3182
|
+
removeElementScroll(r) {
|
|
3183
|
+
const a = R();
|
|
3184
|
+
if (z(a, r), this.scroll?.wasRoot) return a;
|
|
3185
|
+
for (let l = 0; l < this.path.length; l++) {
|
|
3186
|
+
const c = this.path[l], { scroll: u, options: h } = c;
|
|
3187
|
+
c !== this.root && u && h.layoutScroll && (u.wasRoot && z(a, r), Z(a.x, u.offset.x), Z(a.y, u.offset.y));
|
|
3188
|
+
}
|
|
3189
|
+
return a;
|
|
3190
|
+
}
|
|
3191
|
+
applyTransform(r, a = !1, l) {
|
|
3192
|
+
const c = l || R();
|
|
3193
|
+
z(c, r);
|
|
3194
|
+
for (let u = 0; u < this.path.length; u++) {
|
|
3195
|
+
const h = this.path[u];
|
|
3196
|
+
!a && h.options.layoutScroll && h.scroll && h !== h.root && (Z(c.x, -h.scroll.offset.x), Z(c.y, -h.scroll.offset.y)), ht(h.latestValues) && te(c, h.latestValues, h.layout?.layoutBox);
|
|
3197
|
+
}
|
|
3198
|
+
return ht(this.latestValues) && te(c, this.latestValues, this.layout?.layoutBox), c;
|
|
3199
|
+
}
|
|
3200
|
+
removeTransform(r) {
|
|
3201
|
+
const a = R();
|
|
3202
|
+
z(a, r);
|
|
3203
|
+
for (let l = 0; l < this.path.length; l++) {
|
|
3204
|
+
const c = this.path[l];
|
|
3205
|
+
if (!ht(c.latestValues)) continue;
|
|
3206
|
+
let u;
|
|
3207
|
+
c.instance && (Ze(c.latestValues) && c.updateSnapshot(), u = R(), z(u, c.measurePageBox())), Tn(a, c.latestValues, c.snapshot?.layoutBox, u);
|
|
3208
|
+
}
|
|
3209
|
+
return ht(this.latestValues) && Tn(a, this.latestValues), a;
|
|
3210
|
+
}
|
|
3211
|
+
setTargetDelta(r) {
|
|
3212
|
+
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
3213
|
+
}
|
|
3214
|
+
setOptions(r) {
|
|
3215
|
+
this.options = {
|
|
3216
|
+
...this.options,
|
|
3217
|
+
...r,
|
|
3218
|
+
crossfade: r.crossfade !== void 0 ? r.crossfade : !0
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
clearMeasurements() {
|
|
3222
|
+
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
3223
|
+
}
|
|
3224
|
+
forceRelativeParentToResolveTarget() {
|
|
3225
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== B.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
3226
|
+
}
|
|
3227
|
+
resolveTargetDelta(r = !1) {
|
|
3228
|
+
const a = this.getLead();
|
|
3229
|
+
this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
|
|
3230
|
+
const l = !!this.resumingFrom || this !== a;
|
|
3231
|
+
if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
|
|
3232
|
+
const { layout: c, layoutId: u } = this.options;
|
|
3233
|
+
if (!this.layout || !(c || u)) return;
|
|
3234
|
+
this.resolvedRelativeTargetAt = B.timestamp;
|
|
3235
|
+
const h = this.getClosestProjectingParent();
|
|
3236
|
+
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = R(), this.targetWithTransforms = R()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), ru(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : z(this.target, this.layout.layoutBox), ar(this.target, this.targetDelta)) : z(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? this.createRelativeTarget(h, this.target, h.target) : this.relativeParent = this.relativeTarget = void 0), J.value && ft.calculatedTargetDeltas++);
|
|
3237
|
+
}
|
|
3238
|
+
getClosestProjectingParent() {
|
|
3239
|
+
if (!(!this.parent || Ze(this.parent.latestValues) || or(this.parent.latestValues)))
|
|
3240
|
+
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
3241
|
+
}
|
|
3242
|
+
isProjecting() {
|
|
3243
|
+
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
3244
|
+
}
|
|
3245
|
+
createRelativeTarget(r, a, l) {
|
|
3246
|
+
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = R(), this.relativeTargetOrigin = R(), ue(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0), z(this.relativeTarget, this.relativeTargetOrigin);
|
|
3247
|
+
}
|
|
3248
|
+
removeRelativeTarget() {
|
|
3249
|
+
this.relativeParent = this.relativeTarget = void 0;
|
|
3250
|
+
}
|
|
3251
|
+
calcProjection() {
|
|
3252
|
+
const r = this.getLead(), a = !!this.resumingFrom || this !== r;
|
|
3253
|
+
let l = !0;
|
|
3254
|
+
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === B.timestamp && (l = !1), l) return;
|
|
3255
|
+
const { layout: c, layoutId: u } = this.options;
|
|
3256
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || u)) return;
|
|
3257
|
+
z(this.layoutCorrected, this.layout.layoutBox);
|
|
3258
|
+
const h = this.treeScale.x, f = this.treeScale.y;
|
|
3259
|
+
Bl(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = R());
|
|
3260
|
+
const { target: p } = r;
|
|
3261
|
+
if (!p) {
|
|
3262
|
+
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
3263
|
+
return;
|
|
3264
|
+
}
|
|
3265
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (dn(this.prevProjectionDelta.x, this.projectionDelta.x), dn(this.prevProjectionDelta.y, this.projectionDelta.y)), It(this.projectionDelta, this.layoutCorrected, p, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !bn(this.projectionDelta.x, this.prevProjectionDelta.x) || !bn(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", p)), J.value && ft.calculatedProjections++;
|
|
3266
|
+
}
|
|
3267
|
+
hide() {
|
|
3268
|
+
this.isVisible = !1;
|
|
3269
|
+
}
|
|
3270
|
+
show() {
|
|
3271
|
+
this.isVisible = !0;
|
|
3272
|
+
}
|
|
3273
|
+
scheduleRender(r = !0) {
|
|
3274
|
+
if (this.options.visualElement?.scheduleRender(), r) {
|
|
3275
|
+
const a = this.getStack();
|
|
3276
|
+
a && a.scheduleRender();
|
|
3277
|
+
}
|
|
3278
|
+
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
3279
|
+
}
|
|
3280
|
+
createProjectionDeltas() {
|
|
3281
|
+
this.prevProjectionDelta = bt(), this.projectionDelta = bt(), this.projectionDeltaWithTransform = bt();
|
|
3282
|
+
}
|
|
3283
|
+
setAnimationOrigin(r, a = !1) {
|
|
3284
|
+
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = bt();
|
|
3285
|
+
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
3286
|
+
const f = R(), p = (l ? l.source : void 0) !== (this.layout ? this.layout.source : void 0), d = this.getStack(), v = !d || d.members.length <= 1, g = !!(p && !v && this.options.crossfade === !0 && !this.path.some(Iu));
|
|
3287
|
+
this.animationProgress = 0;
|
|
3288
|
+
let m;
|
|
3289
|
+
this.mixTargetDelta = (x) => {
|
|
3290
|
+
const y = x / 1e3;
|
|
3291
|
+
Rn(h.x, r.x, y), Rn(h.y, r.y, y), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ue(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Bu(this.relativeTarget, this.relativeTargetOrigin, f, y), m && uu(this.relativeTarget, m) && (this.isProjectionDirty = !1), m || (m = R()), z(m, this.relativeTarget)), p && (this.animationValues = u, fu(u, c, this.latestValues, y, g, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = y;
|
|
3292
|
+
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
3293
|
+
}
|
|
3294
|
+
startAnimation(r) {
|
|
3295
|
+
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (ot(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = A.update(() => {
|
|
3296
|
+
ie.hasAnimatedSinceResize = !0, vt.layout++, this.motionValue || (this.motionValue = Vt(0)), this.motionValue.jump(0, !1), this.currentAnimation = mu(this.motionValue, [0, 1e3], {
|
|
3297
|
+
...r,
|
|
3298
|
+
velocity: 0,
|
|
3299
|
+
isSync: !0,
|
|
3300
|
+
onUpdate: (a) => {
|
|
3301
|
+
this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
|
|
3302
|
+
},
|
|
3303
|
+
onStop: () => {
|
|
3304
|
+
vt.layout--;
|
|
3305
|
+
},
|
|
3306
|
+
onComplete: () => {
|
|
3307
|
+
vt.layout--, r.onComplete && r.onComplete(), this.completeAnimation();
|
|
3308
|
+
}
|
|
3309
|
+
}), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
|
|
3310
|
+
});
|
|
3311
|
+
}
|
|
3312
|
+
completeAnimation() {
|
|
3313
|
+
this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
|
|
3314
|
+
const r = this.getStack();
|
|
3315
|
+
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
3316
|
+
}
|
|
3317
|
+
finishAnimation() {
|
|
3318
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(xu), this.currentAnimation.stop()), this.completeAnimation();
|
|
3319
|
+
}
|
|
3320
|
+
applyTransformsToTarget() {
|
|
3321
|
+
const r = this.getLead();
|
|
3322
|
+
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
|
|
3323
|
+
if (!(!a || !l || !c)) {
|
|
3324
|
+
if (this !== r && this.layout && c && Ar(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
3325
|
+
l = this.target || R();
|
|
3326
|
+
const h = j(this.layout.layoutBox.x);
|
|
3327
|
+
l.x.min = r.target.x.min, l.x.max = l.x.min + h;
|
|
3328
|
+
const f = j(this.layout.layoutBox.y);
|
|
3329
|
+
l.y.min = r.target.y.min, l.y.max = l.y.min + f;
|
|
3330
|
+
}
|
|
3331
|
+
z(a, l), te(a, u), It(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
registerSharedNode(r, a) {
|
|
3335
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new Tu()), this.sharedNodes.get(r).add(a);
|
|
3336
|
+
const l = a.options.initialPromotionConfig;
|
|
3337
|
+
a.promote({
|
|
3338
|
+
transition: l ? l.transition : void 0,
|
|
3339
|
+
preserveFollowOpacity: l && l.shouldPreserveFollowOpacity ? l.shouldPreserveFollowOpacity(a) : void 0
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
isLead() {
|
|
3343
|
+
const r = this.getStack();
|
|
3344
|
+
return r ? r.lead === this : !0;
|
|
3345
|
+
}
|
|
3346
|
+
getLead() {
|
|
3347
|
+
const { layoutId: r } = this.options;
|
|
3348
|
+
return r ? this.getStack()?.lead || this : this;
|
|
3349
|
+
}
|
|
3350
|
+
getPrevLead() {
|
|
3351
|
+
const { layoutId: r } = this.options;
|
|
3352
|
+
return r ? this.getStack()?.prevLead : void 0;
|
|
3353
|
+
}
|
|
3354
|
+
getStack() {
|
|
3355
|
+
const { layoutId: r } = this.options;
|
|
3356
|
+
if (r) return this.root.sharedNodes.get(r);
|
|
3357
|
+
}
|
|
3358
|
+
promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
|
|
3359
|
+
const c = this.getStack();
|
|
3360
|
+
c && c.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
|
|
3361
|
+
}
|
|
3362
|
+
relegate() {
|
|
3363
|
+
const r = this.getStack();
|
|
3364
|
+
return r ? r.relegate(this) : !1;
|
|
3365
|
+
}
|
|
3366
|
+
resetSkewAndRotation() {
|
|
3367
|
+
const { visualElement: r } = this.options;
|
|
3368
|
+
if (!r) return;
|
|
3369
|
+
let a = !1;
|
|
3370
|
+
const { latestValues: l } = r;
|
|
3371
|
+
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a) return;
|
|
3372
|
+
const c = {};
|
|
3373
|
+
l.z && Ae("z", r, c, this.animationValues);
|
|
3374
|
+
for (let u = 0; u < be.length; u++)
|
|
3375
|
+
Ae(`rotate${be[u]}`, r, c, this.animationValues), Ae(`skew${be[u]}`, r, c, this.animationValues);
|
|
3376
|
+
r.render();
|
|
3377
|
+
for (const u in c)
|
|
3378
|
+
r.setStaticValue(u, c[u]), this.animationValues && (this.animationValues[u] = c[u]);
|
|
3379
|
+
r.scheduleRender();
|
|
3380
|
+
}
|
|
3381
|
+
applyProjectionStyles(r, a) {
|
|
3382
|
+
if (!this.instance || this.isSVG) return;
|
|
3383
|
+
if (!this.isVisible) {
|
|
3384
|
+
r.visibility = "hidden";
|
|
3385
|
+
return;
|
|
3386
|
+
}
|
|
3387
|
+
const l = this.getTransformTemplate();
|
|
3388
|
+
if (this.needsReset) {
|
|
3389
|
+
this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = ee(a?.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
3392
|
+
const c = this.getLead();
|
|
3393
|
+
if (!this.projectionDelta || !this.layout || !c.target) {
|
|
3394
|
+
this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = ee(a?.pointerEvents) || ""), this.hasProjected && !ht(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
|
|
3395
|
+
return;
|
|
3396
|
+
}
|
|
3397
|
+
r.visibility = "";
|
|
3398
|
+
const u = c.animationValues || c.latestValues;
|
|
3399
|
+
this.applyTransformsToTarget();
|
|
3400
|
+
let h = cu(this.projectionDeltaWithTransform, this.treeScale, u);
|
|
3401
|
+
l && (h = l(u, h)), r.transform = h;
|
|
3402
|
+
const { x: f, y: p } = this.projectionDelta;
|
|
3403
|
+
r.transformOrigin = `${f.origin * 100}% ${p.origin * 100}% 0`, c.animationValues ? r.opacity = c === this ? u.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : r.opacity = c === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
|
|
3404
|
+
for (const d in Qe) {
|
|
3405
|
+
if (u[d] === void 0) continue;
|
|
3406
|
+
const { correct: v, applyTo: g, isCSSVariable: m } = Qe[d], x = h === "none" ? u[d] : v(u[d], c);
|
|
3407
|
+
if (g) {
|
|
3408
|
+
const y = g.length;
|
|
3409
|
+
for (let w = 0; w < y; w++) r[g[w]] = x;
|
|
3410
|
+
} else m ? this.options.visualElement.renderState.vars[d] = x : r[d] = x;
|
|
3411
|
+
}
|
|
3412
|
+
this.options.layoutId && (r.pointerEvents = c === this ? ee(a?.pointerEvents) || "" : "none");
|
|
3413
|
+
}
|
|
3414
|
+
clearSnapshot() {
|
|
3415
|
+
this.resumeFrom = this.snapshot = void 0;
|
|
3416
|
+
}
|
|
3417
|
+
resetTree() {
|
|
3418
|
+
this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(Cn), this.root.sharedNodes.clear();
|
|
3419
|
+
}
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
3422
|
+
function Pu(t) {
|
|
3423
|
+
t.updateLayout();
|
|
3424
|
+
}
|
|
3425
|
+
function Su(t) {
|
|
3426
|
+
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
3427
|
+
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
3428
|
+
const { layoutBox: i, measuredBox: n } = t.layout, { animationType: s } = t.options, o = e.source !== t.layout.source;
|
|
3429
|
+
if (s === "size") q((u) => {
|
|
3430
|
+
const h = o ? e.measuredBox[u] : e.layoutBox[u], f = j(h);
|
|
3431
|
+
h.min = i[u].min, h.max = h.min + f;
|
|
3432
|
+
});
|
|
3433
|
+
else if (s === "x" || s === "y") {
|
|
3434
|
+
const u = s === "x" ? "y" : "x";
|
|
3435
|
+
ti(o ? e.measuredBox[u] : e.layoutBox[u], i[u]);
|
|
3436
|
+
} else Ar(s, e.layoutBox, i) && q((u) => {
|
|
3437
|
+
const h = o ? e.measuredBox[u] : e.layoutBox[u], f = j(i[u]);
|
|
3438
|
+
h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[u].max = t.relativeTarget[u].min + f);
|
|
3439
|
+
});
|
|
3440
|
+
const r = bt();
|
|
3441
|
+
It(r, i, e.layoutBox);
|
|
3442
|
+
const a = bt();
|
|
3443
|
+
o ? It(a, t.applyTransform(n, !0), e.measuredBox) : It(a, i, e.layoutBox);
|
|
3444
|
+
const l = !Tr(r);
|
|
3445
|
+
let c = !1;
|
|
3446
|
+
if (!t.resumeFrom) {
|
|
3447
|
+
const u = t.getClosestProjectingParent();
|
|
3448
|
+
if (u && !u.resumeFrom) {
|
|
3449
|
+
const { snapshot: h, layout: f } = u;
|
|
3450
|
+
if (h && f) {
|
|
3451
|
+
const p = t.options.layoutAnchor || void 0, d = R();
|
|
3452
|
+
ue(d, e.layoutBox, h.layoutBox, p);
|
|
3453
|
+
const v = R();
|
|
3454
|
+
ue(v, i, f.layoutBox, p), xr(d, v) || (c = !0), u.options.layoutRoot && (t.relativeTarget = v, t.relativeTargetOrigin = d, t.relativeParent = u);
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
t.notifyListeners("didUpdate", {
|
|
3459
|
+
layout: i,
|
|
3460
|
+
snapshot: e,
|
|
3461
|
+
delta: a,
|
|
3462
|
+
layoutDelta: r,
|
|
3463
|
+
hasLayoutChanged: l,
|
|
3464
|
+
hasRelativeLayoutChanged: c
|
|
3465
|
+
});
|
|
3466
|
+
} else if (t.isLead()) {
|
|
3467
|
+
const { onExitComplete: i } = t.options;
|
|
3468
|
+
i && i();
|
|
3469
|
+
}
|
|
3470
|
+
t.options.transition = void 0;
|
|
3471
|
+
}
|
|
3472
|
+
function bu(t) {
|
|
3473
|
+
J.value && ft.nodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
3474
|
+
}
|
|
3475
|
+
function Au(t) {
|
|
3476
|
+
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
3477
|
+
}
|
|
3478
|
+
function Vu(t) {
|
|
3479
|
+
t.clearSnapshot();
|
|
3480
|
+
}
|
|
3481
|
+
function Cn(t) {
|
|
3482
|
+
t.clearMeasurements();
|
|
3483
|
+
}
|
|
3484
|
+
function Mu(t) {
|
|
3485
|
+
t.isLayoutDirty = !0, t.updateLayout();
|
|
3486
|
+
}
|
|
3487
|
+
function Dn(t) {
|
|
3488
|
+
t.isLayoutDirty = !1;
|
|
3489
|
+
}
|
|
3490
|
+
function Cu(t) {
|
|
3491
|
+
t.isAnimationBlocked && t.layout && !t.isLayoutDirty && (t.snapshot = t.layout, t.isLayoutDirty = !0);
|
|
3492
|
+
}
|
|
3493
|
+
function Du(t) {
|
|
3494
|
+
const { visualElement: e } = t.options;
|
|
3495
|
+
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
3496
|
+
}
|
|
3497
|
+
function En(t) {
|
|
3498
|
+
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
3499
|
+
}
|
|
3500
|
+
function Eu(t) {
|
|
3501
|
+
t.resolveTargetDelta();
|
|
3502
|
+
}
|
|
3503
|
+
function Ru(t) {
|
|
3504
|
+
t.calcProjection();
|
|
3505
|
+
}
|
|
3506
|
+
function Lu(t) {
|
|
3507
|
+
t.resetSkewAndRotation();
|
|
3508
|
+
}
|
|
3509
|
+
function ku(t) {
|
|
3510
|
+
t.removeLeadSnapshot();
|
|
3511
|
+
}
|
|
3512
|
+
function Rn(t, e, i) {
|
|
3513
|
+
t.translate = V(e.translate, 0, i), t.scale = V(e.scale, 1, i), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
3514
|
+
}
|
|
3515
|
+
function Ln(t, e, i, n) {
|
|
3516
|
+
t.min = V(e.min, i.min, n), t.max = V(e.max, i.max, n);
|
|
3517
|
+
}
|
|
3518
|
+
function Bu(t, e, i, n) {
|
|
3519
|
+
Ln(t.x, e.x, i.x, n), Ln(t.y, e.y, i.y, n);
|
|
3520
|
+
}
|
|
3521
|
+
function Iu(t) {
|
|
3522
|
+
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
3523
|
+
}
|
|
3524
|
+
var Fu = {
|
|
3525
|
+
duration: 0.45,
|
|
3526
|
+
ease: [
|
|
3527
|
+
0.4,
|
|
3528
|
+
0,
|
|
3529
|
+
0.1,
|
|
3530
|
+
1
|
|
3531
|
+
]
|
|
3532
|
+
}, kn = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Bn = kn("applewebkit/") && !kn("chrome/") ? Math.round : $;
|
|
3533
|
+
function In(t) {
|
|
3534
|
+
t.min = Bn(t.min), t.max = Bn(t.max);
|
|
3535
|
+
}
|
|
3536
|
+
function Ou(t) {
|
|
3537
|
+
In(t.x), In(t.y);
|
|
3538
|
+
}
|
|
3539
|
+
function Ar(t, e, i) {
|
|
3540
|
+
return t === "position" || t === "preserve-aspect" && !su(Sn(e), Sn(i), 0.2);
|
|
3541
|
+
}
|
|
3542
|
+
function ju(t) {
|
|
3543
|
+
return t !== t.root && t.scroll?.wasRoot;
|
|
3544
|
+
}
|
|
3545
|
+
var Nu = br({
|
|
3546
|
+
attachResizeListener: (t, e) => Ut(t, "resize", e),
|
|
3547
|
+
measureScroll: () => ({
|
|
3548
|
+
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
3549
|
+
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
|
|
3550
|
+
}),
|
|
3551
|
+
checkIsScrollRoot: () => !0
|
|
3552
|
+
}), Ve = { current: void 0 }, Vr = br({
|
|
3553
|
+
measureScroll: (t) => ({
|
|
3554
|
+
x: t.scrollLeft,
|
|
3555
|
+
y: t.scrollTop
|
|
3556
|
+
}),
|
|
3557
|
+
defaultParent: () => {
|
|
3558
|
+
if (!Ve.current) {
|
|
3559
|
+
const t = new Nu({});
|
|
3560
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), Ve.current = t;
|
|
3561
|
+
}
|
|
3562
|
+
return Ve.current;
|
|
3563
|
+
},
|
|
3564
|
+
resetTransform: (t, e) => {
|
|
3565
|
+
t.style.transform = e !== void 0 ? e : "none";
|
|
3566
|
+
},
|
|
3567
|
+
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
3568
|
+
}), Mr = Mt({
|
|
3569
|
+
transformPagePoint: (t) => t,
|
|
3570
|
+
isStatic: !1,
|
|
3571
|
+
reducedMotion: "never"
|
|
3572
|
+
});
|
|
3573
|
+
function Uu(t = !0) {
|
|
3574
|
+
const e = U(si);
|
|
3575
|
+
if (e === null) return [!0, null];
|
|
3576
|
+
const { isPresent: i, onExitComplete: n, register: s } = e, o = Xr();
|
|
3577
|
+
ni(() => {
|
|
3578
|
+
if (t) return s(o);
|
|
3579
|
+
}, [t]);
|
|
3580
|
+
const r = qn(() => t && n && n(o), [
|
|
3581
|
+
o,
|
|
3582
|
+
n,
|
|
3583
|
+
t
|
|
3584
|
+
]);
|
|
3585
|
+
return !i && n ? [!1, r] : [!0];
|
|
3586
|
+
}
|
|
3587
|
+
var Cr = Mt({ strict: !1 }), Fn = {
|
|
3588
|
+
animation: [
|
|
3589
|
+
"animate",
|
|
3590
|
+
"variants",
|
|
3591
|
+
"whileHover",
|
|
3592
|
+
"whileTap",
|
|
3593
|
+
"exit",
|
|
3594
|
+
"whileInView",
|
|
3595
|
+
"whileFocus",
|
|
3596
|
+
"whileDrag"
|
|
3597
|
+
],
|
|
3598
|
+
exit: ["exit"],
|
|
3599
|
+
drag: ["drag", "dragControls"],
|
|
3600
|
+
focus: ["whileFocus"],
|
|
3601
|
+
hover: [
|
|
3602
|
+
"whileHover",
|
|
3603
|
+
"onHoverStart",
|
|
3604
|
+
"onHoverEnd"
|
|
3605
|
+
],
|
|
3606
|
+
tap: [
|
|
3607
|
+
"whileTap",
|
|
3608
|
+
"onTap",
|
|
3609
|
+
"onTapStart",
|
|
3610
|
+
"onTapCancel"
|
|
3611
|
+
],
|
|
3612
|
+
pan: [
|
|
3613
|
+
"onPan",
|
|
3614
|
+
"onPanStart",
|
|
3615
|
+
"onPanSessionStart",
|
|
3616
|
+
"onPanEnd"
|
|
3617
|
+
],
|
|
3618
|
+
inView: [
|
|
3619
|
+
"whileInView",
|
|
3620
|
+
"onViewportEnter",
|
|
3621
|
+
"onViewportLeave"
|
|
3622
|
+
],
|
|
3623
|
+
layout: ["layout", "layoutId"]
|
|
3624
|
+
}, On = !1;
|
|
3625
|
+
function Wu() {
|
|
3626
|
+
if (On) return;
|
|
3627
|
+
const t = {};
|
|
3628
|
+
for (const e in Fn) t[e] = { isEnabled: (i) => Fn[e].some((n) => !!i[n]) };
|
|
3629
|
+
nr(t), On = !0;
|
|
3630
|
+
}
|
|
3631
|
+
function Dr() {
|
|
3632
|
+
return Wu(), El();
|
|
3633
|
+
}
|
|
3634
|
+
function _u(t) {
|
|
3635
|
+
const e = Dr();
|
|
3636
|
+
for (const i in t) e[i] = {
|
|
3637
|
+
...e[i],
|
|
3638
|
+
...t[i]
|
|
3639
|
+
};
|
|
3640
|
+
nr(e);
|
|
3641
|
+
}
|
|
3642
|
+
var Ku = /* @__PURE__ */ new Set([
|
|
3643
|
+
"animate",
|
|
3644
|
+
"exit",
|
|
3645
|
+
"variants",
|
|
3646
|
+
"initial",
|
|
3647
|
+
"style",
|
|
3648
|
+
"values",
|
|
3649
|
+
"variants",
|
|
3650
|
+
"transition",
|
|
3651
|
+
"transformTemplate",
|
|
3652
|
+
"custom",
|
|
3653
|
+
"inherit",
|
|
3654
|
+
"onBeforeLayoutMeasure",
|
|
3655
|
+
"onAnimationStart",
|
|
3656
|
+
"onAnimationComplete",
|
|
3657
|
+
"onUpdate",
|
|
3658
|
+
"onDragStart",
|
|
3659
|
+
"onDrag",
|
|
3660
|
+
"onDragEnd",
|
|
3661
|
+
"onMeasureDragConstraints",
|
|
3662
|
+
"onDirectionLock",
|
|
3663
|
+
"onDragTransitionEnd",
|
|
3664
|
+
"_dragX",
|
|
3665
|
+
"_dragY",
|
|
3666
|
+
"onHoverStart",
|
|
3667
|
+
"onHoverEnd",
|
|
3668
|
+
"onViewportEnter",
|
|
3669
|
+
"onViewportLeave",
|
|
3670
|
+
"globalTapTarget",
|
|
3671
|
+
"propagate",
|
|
3672
|
+
"ignoreStrict",
|
|
3673
|
+
"viewport"
|
|
3674
|
+
]);
|
|
3675
|
+
function ce(t) {
|
|
3676
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Ku.has(t);
|
|
3677
|
+
}
|
|
3678
|
+
var $u = /* @__PURE__ */ $r({ default: () => Er }), Er, zu = Kr((() => {
|
|
3679
|
+
throw Er = {}, new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?');
|
|
3680
|
+
})), Rr = (t) => !ce(t);
|
|
3681
|
+
function Hu(t) {
|
|
3682
|
+
typeof t == "function" && (Rr = (e) => e.startsWith("on") ? !ce(e) : t(e));
|
|
3683
|
+
}
|
|
3684
|
+
try {
|
|
3685
|
+
Hu((zu(), _r($u)).default);
|
|
3686
|
+
} catch {
|
|
3687
|
+
}
|
|
3688
|
+
function Gu(t, e, i) {
|
|
3689
|
+
const n = {};
|
|
3690
|
+
for (const s in t)
|
|
3691
|
+
s === "values" && typeof t.values == "object" || I(t[s]) || (Rr(s) || i === !0 && ce(s) || !e && !ce(s) || t.draggable && s.startsWith("onDrag")) && (n[s] = t[s]);
|
|
3692
|
+
return n;
|
|
3693
|
+
}
|
|
3694
|
+
var me = /* @__PURE__ */ Mt({});
|
|
3695
|
+
function Xu(t, e) {
|
|
3696
|
+
if (pe(t)) {
|
|
3697
|
+
const { initial: i, animate: n } = t;
|
|
3698
|
+
return {
|
|
3699
|
+
initial: i === !1 || Nt(i) ? i : void 0,
|
|
3700
|
+
animate: Nt(n) ? n : void 0
|
|
3701
|
+
};
|
|
3702
|
+
}
|
|
3703
|
+
return t.inherit !== !1 ? e : {};
|
|
3704
|
+
}
|
|
3705
|
+
function Yu(t) {
|
|
3706
|
+
const { initial: e, animate: i } = Xu(t, U(me));
|
|
3707
|
+
return he(() => ({
|
|
3708
|
+
initial: e,
|
|
3709
|
+
animate: i
|
|
3710
|
+
}), [jn(e), jn(i)]);
|
|
3711
|
+
}
|
|
3712
|
+
function jn(t) {
|
|
3713
|
+
return Array.isArray(t) ? t.join(" ") : t;
|
|
3714
|
+
}
|
|
3715
|
+
var Di = () => ({
|
|
3716
|
+
style: {},
|
|
3717
|
+
transform: {},
|
|
3718
|
+
transformOrigin: {},
|
|
3719
|
+
vars: {}
|
|
3720
|
+
});
|
|
3721
|
+
function Lr(t, e, i) {
|
|
3722
|
+
for (const n in e) !I(e[n]) && !cr(n, i) && (t[n] = e[n]);
|
|
3723
|
+
}
|
|
3724
|
+
function qu({ transformTemplate: t }, e) {
|
|
3725
|
+
return he(() => {
|
|
3726
|
+
const i = Di();
|
|
3727
|
+
return Mi(i, e, t), Object.assign({}, i.vars, i.style);
|
|
3728
|
+
}, [e]);
|
|
3729
|
+
}
|
|
3730
|
+
function Zu(t, e) {
|
|
3731
|
+
const i = t.style || {}, n = {};
|
|
3732
|
+
return Lr(n, i, t), Object.assign(n, qu(t, e)), n;
|
|
3733
|
+
}
|
|
3734
|
+
function Ju(t, e) {
|
|
3735
|
+
const i = {}, n = Zu(t, e);
|
|
3736
|
+
return t.drag && t.dragListener !== !1 && (i.draggable = !1, n.userSelect = n.WebkitUserSelect = n.WebkitTouchCallout = "none", n.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (i.tabIndex = 0), i.style = n, i;
|
|
3737
|
+
}
|
|
3738
|
+
var kr = () => ({
|
|
3739
|
+
...Di(),
|
|
3740
|
+
attrs: {}
|
|
3741
|
+
});
|
|
3742
|
+
function Qu(t, e, i, n) {
|
|
3743
|
+
const s = he(() => {
|
|
3744
|
+
const o = kr();
|
|
3745
|
+
return hr(o, e, dr(n), t.transformTemplate, t.style), {
|
|
3746
|
+
...o.attrs,
|
|
3747
|
+
style: { ...o.style }
|
|
3748
|
+
};
|
|
3749
|
+
}, [e]);
|
|
3750
|
+
if (t.style) {
|
|
3751
|
+
const o = {};
|
|
3752
|
+
Lr(o, t.style, t), s.style = {
|
|
3753
|
+
...o,
|
|
3754
|
+
...s.style
|
|
3755
|
+
};
|
|
3756
|
+
}
|
|
3757
|
+
return s;
|
|
3758
|
+
}
|
|
3759
|
+
var tc = [
|
|
3760
|
+
"animate",
|
|
3761
|
+
"circle",
|
|
3762
|
+
"defs",
|
|
3763
|
+
"desc",
|
|
3764
|
+
"ellipse",
|
|
3765
|
+
"g",
|
|
3766
|
+
"image",
|
|
3767
|
+
"line",
|
|
3768
|
+
"filter",
|
|
3769
|
+
"marker",
|
|
3770
|
+
"mask",
|
|
3771
|
+
"metadata",
|
|
3772
|
+
"path",
|
|
3773
|
+
"pattern",
|
|
3774
|
+
"polygon",
|
|
3775
|
+
"polyline",
|
|
3776
|
+
"rect",
|
|
3777
|
+
"stop",
|
|
3778
|
+
"switch",
|
|
3779
|
+
"symbol",
|
|
3780
|
+
"svg",
|
|
3781
|
+
"text",
|
|
3782
|
+
"tspan",
|
|
3783
|
+
"use",
|
|
3784
|
+
"view"
|
|
3785
|
+
];
|
|
3786
|
+
function Ei(t) {
|
|
3787
|
+
return typeof t != "string" || t.includes("-") ? !1 : !!(tc.indexOf(t) > -1 || /[A-Z]/u.test(t));
|
|
3788
|
+
}
|
|
3789
|
+
function ec(t, e, i, { latestValues: n }, s, o = !1, r) {
|
|
3790
|
+
const a = (r ?? Ei(t) ? Qu : Ju)(e, n, s, t), l = Gu(e, typeof t == "string", o), c = t !== Yn ? {
|
|
3791
|
+
...l,
|
|
3792
|
+
...a,
|
|
3793
|
+
ref: i
|
|
3794
|
+
} : {}, { children: u } = e, h = he(() => I(u) ? u.get() : u, [u]);
|
|
3795
|
+
return Hr(t, {
|
|
3796
|
+
...c,
|
|
3797
|
+
children: h
|
|
3798
|
+
});
|
|
3799
|
+
}
|
|
3800
|
+
function ic({ scrapeMotionValuesFromProps: t, createRenderState: e }, i, n, s) {
|
|
3801
|
+
return {
|
|
3802
|
+
latestValues: nc(i, n, s, t),
|
|
3803
|
+
renderState: e()
|
|
3804
|
+
};
|
|
3805
|
+
}
|
|
3806
|
+
function nc(t, e, i, n) {
|
|
3807
|
+
const s = {}, o = n(t, {});
|
|
3808
|
+
for (const f in o) s[f] = ee(o[f]);
|
|
3809
|
+
let { initial: r, animate: a } = t;
|
|
3810
|
+
const l = pe(t), c = er(t);
|
|
3811
|
+
e && c && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
3812
|
+
let u = i ? i.initial === !1 : !1;
|
|
3813
|
+
u = u || r === !1;
|
|
3814
|
+
const h = u ? a : r;
|
|
3815
|
+
if (h && typeof h != "boolean" && !de(h)) {
|
|
3816
|
+
const f = Array.isArray(h) ? h : [h];
|
|
3817
|
+
for (let p = 0; p < f.length; p++) {
|
|
3818
|
+
const d = Ti(t, f[p]);
|
|
3819
|
+
if (d) {
|
|
3820
|
+
const { transitionEnd: v, transition: g, ...m } = d;
|
|
3821
|
+
for (const x in m) {
|
|
3822
|
+
let y = m[x];
|
|
3823
|
+
if (Array.isArray(y)) {
|
|
3824
|
+
const w = u ? y.length - 1 : 0;
|
|
3825
|
+
y = y[w];
|
|
3826
|
+
}
|
|
3827
|
+
y !== null && (s[x] = y);
|
|
3828
|
+
}
|
|
3829
|
+
for (const x in v) s[x] = v[x];
|
|
3830
|
+
}
|
|
3831
|
+
}
|
|
3832
|
+
}
|
|
3833
|
+
return s;
|
|
3834
|
+
}
|
|
3835
|
+
var Br = (t) => (e, i) => {
|
|
3836
|
+
const n = U(me), s = U(si), o = () => ic(t, e, n, s);
|
|
3837
|
+
return i ? o() : Zr(o);
|
|
3838
|
+
}, sc = /* @__PURE__ */ Br({
|
|
3839
|
+
scrapeMotionValuesFromProps: Ci,
|
|
3840
|
+
createRenderState: Di
|
|
3841
|
+
}), rc = /* @__PURE__ */ Br({
|
|
3842
|
+
scrapeMotionValuesFromProps: pr,
|
|
3843
|
+
createRenderState: kr
|
|
3844
|
+
}), oc = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
|
|
3845
|
+
function ac(t, e, i) {
|
|
3846
|
+
const n = dt(i);
|
|
3847
|
+
Zn(() => {
|
|
3848
|
+
n.current = i;
|
|
3849
|
+
});
|
|
3850
|
+
const s = dt(null);
|
|
3851
|
+
return qn((o) => {
|
|
3852
|
+
o && t.onMount?.(o);
|
|
3853
|
+
const r = n.current;
|
|
3854
|
+
if (typeof r == "function") if (o) {
|
|
3855
|
+
const a = r(o);
|
|
3856
|
+
typeof a == "function" && (s.current = a);
|
|
3857
|
+
} else s.current ? (s.current(), s.current = null) : r(o);
|
|
3858
|
+
else r && (r.current = o);
|
|
3859
|
+
e && (o ? e.mount(o) : e.unmount());
|
|
3860
|
+
}, [e]);
|
|
3861
|
+
}
|
|
3862
|
+
var Ir = Mt({});
|
|
3863
|
+
function xt(t) {
|
|
3864
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
3865
|
+
}
|
|
3866
|
+
function lc(t, e, i, n, s, o) {
|
|
3867
|
+
const { visualElement: r } = U(me), a = U(Cr), l = U(si), c = U(Mr), u = c.reducedMotion, h = c.skipAnimations, f = dt(null), p = dt(!1);
|
|
3868
|
+
n = n || a.renderer, !f.current && n && (f.current = n(t, {
|
|
3869
|
+
visualState: e,
|
|
3870
|
+
parent: r,
|
|
3871
|
+
props: i,
|
|
3872
|
+
presenceContext: l,
|
|
3873
|
+
blockInitialAnimation: l ? l.initial === !1 : !1,
|
|
3874
|
+
reducedMotionConfig: u,
|
|
3875
|
+
skipAnimations: h,
|
|
3876
|
+
isSVG: o
|
|
3877
|
+
}), p.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
3878
|
+
const d = f.current, v = U(Ir);
|
|
3879
|
+
d && !d.projection && s && (d.type === "html" || d.type === "svg") && uc(f.current, i, s, v);
|
|
3880
|
+
const g = dt(!1);
|
|
3881
|
+
Zn(() => {
|
|
3882
|
+
d && g.current && d.update(i, l);
|
|
3883
|
+
});
|
|
3884
|
+
const m = i[_s], x = dt(!!m && typeof window < "u" && !window.MotionHandoffIsComplete?.(m) && window.MotionHasOptimisedAnimation?.(m));
|
|
3885
|
+
return Qr(() => {
|
|
3886
|
+
p.current = !0, d && (g.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), d.scheduleRenderMicrotask(), x.current && d.animationState && d.animationState.animateChanges());
|
|
3887
|
+
}), ni(() => {
|
|
3888
|
+
d && (!x.current && d.animationState && d.animationState.animateChanges(), x.current && (queueMicrotask(() => {
|
|
3889
|
+
window.MotionHandoffMarkAsComplete?.(m);
|
|
3890
|
+
}), x.current = !1), d.enteringChildren = void 0);
|
|
3891
|
+
}), d;
|
|
3892
|
+
}
|
|
3893
|
+
function uc(t, e, i, n) {
|
|
3894
|
+
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c, layoutAnchor: u, layoutCrossfade: h } = e;
|
|
3895
|
+
t.projection = new i(t.latestValues, e["data-framer-portal-id"] ? void 0 : Fr(t.parent)), t.projection.setOptions({
|
|
3896
|
+
layoutId: s,
|
|
3897
|
+
layout: o,
|
|
3898
|
+
alwaysMeasureLayout: !!r || a && xt(a),
|
|
3899
|
+
visualElement: t,
|
|
3900
|
+
animationType: typeof o == "string" ? o : "both",
|
|
3901
|
+
initialPromotionConfig: n,
|
|
3902
|
+
crossfade: h,
|
|
3903
|
+
layoutScroll: l,
|
|
3904
|
+
layoutRoot: c,
|
|
3905
|
+
layoutAnchor: u
|
|
3906
|
+
});
|
|
3907
|
+
}
|
|
3908
|
+
function Fr(t) {
|
|
3909
|
+
if (t)
|
|
3910
|
+
return t.options.allowProjection !== !1 ? t.projection : Fr(t.parent);
|
|
3911
|
+
}
|
|
3912
|
+
function Me(t, { forwardMotionProps: e = !1, type: i } = {}, n, s) {
|
|
3913
|
+
n && _u(n);
|
|
3914
|
+
const o = i ? i === "svg" : Ei(t), r = o ? rc : sc;
|
|
3915
|
+
function a(c, u) {
|
|
3916
|
+
let h;
|
|
3917
|
+
const f = {
|
|
3918
|
+
...U(Mr),
|
|
3919
|
+
...c,
|
|
3920
|
+
layoutId: cc(c)
|
|
3921
|
+
}, { isStatic: p } = f, d = Yu(c), v = r(c, p);
|
|
3922
|
+
if (!p && typeof window < "u") {
|
|
3923
|
+
hc(f, n);
|
|
3924
|
+
const g = fc(f);
|
|
3925
|
+
h = g.MeasureLayout, d.visualElement = lc(t, v, f, s, g.ProjectionNode, o);
|
|
3926
|
+
}
|
|
3927
|
+
return qr(me.Provider, {
|
|
3928
|
+
value: d,
|
|
3929
|
+
children: [h && d.visualElement ? Jn(h, {
|
|
3930
|
+
visualElement: d.visualElement,
|
|
3931
|
+
...f
|
|
3932
|
+
}) : null, ec(t, c, ac(v, d.visualElement, u), v, p, e, o)]
|
|
3933
|
+
});
|
|
3934
|
+
}
|
|
3935
|
+
a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
3936
|
+
const l = Gr(a);
|
|
3937
|
+
return l[oc] = t, l;
|
|
3938
|
+
}
|
|
3939
|
+
function cc({ layoutId: t }) {
|
|
3940
|
+
const e = U(Qn).id;
|
|
3941
|
+
return e && t !== void 0 ? e + "-" + t : t;
|
|
3942
|
+
}
|
|
3943
|
+
function hc(t, e) {
|
|
3944
|
+
const i = U(Cr).strict;
|
|
3945
|
+
if (process.env.NODE_ENV !== "production" && e && i) {
|
|
3946
|
+
const n = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
3947
|
+
t.ignoreStrict ? Ct(!1, n, "lazy-strict-mode") : it(!1, n, "lazy-strict-mode");
|
|
3948
|
+
}
|
|
3949
|
+
}
|
|
3950
|
+
function fc(t) {
|
|
3951
|
+
const { drag: e, layout: i } = Dr();
|
|
3952
|
+
if (!e && !i) return {};
|
|
3953
|
+
const n = {
|
|
3954
|
+
...e,
|
|
3955
|
+
...i
|
|
3956
|
+
};
|
|
3957
|
+
return {
|
|
3958
|
+
MeasureLayout: e?.isEnabled(t) || i?.isEnabled(t) ? n.MeasureLayout : void 0,
|
|
3959
|
+
ProjectionNode: n.ProjectionNode
|
|
3960
|
+
};
|
|
3961
|
+
}
|
|
3962
|
+
function dc(t, e) {
|
|
3963
|
+
if (typeof Proxy > "u") return Me;
|
|
3964
|
+
const i = /* @__PURE__ */ new Map(), n = (o, r) => Me(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && ai(!1, "motion() is deprecated. Use motion.create() instead."), n(o, r));
|
|
3965
|
+
return new Proxy(s, { get: (o, r) => r === "create" ? n : (i.has(r) || i.set(r, Me(r, void 0, t, e)), i.get(r)) });
|
|
3966
|
+
}
|
|
3967
|
+
var pc = (t, e) => e.isSVG ?? Ei(t) ? new Gl(e) : new Wl(e, { allowProjection: t !== Yn }), mc = class extends at {
|
|
3968
|
+
constructor(t) {
|
|
3969
|
+
super(t), t.animationState || (t.animationState = Jl(t));
|
|
3970
|
+
}
|
|
3971
|
+
updateAnimationControlsSubscription() {
|
|
3972
|
+
const { animate: t } = this.node.getProps();
|
|
3973
|
+
de(t) && (this.unmountControls = t.subscribe(this.node));
|
|
3974
|
+
}
|
|
3975
|
+
mount() {
|
|
3976
|
+
this.updateAnimationControlsSubscription();
|
|
3977
|
+
}
|
|
3978
|
+
update() {
|
|
3979
|
+
const { animate: t } = this.node.getProps(), { animate: e } = this.node.prevProps || {};
|
|
3980
|
+
t !== e && this.updateAnimationControlsSubscription();
|
|
3981
|
+
}
|
|
3982
|
+
unmount() {
|
|
3983
|
+
this.node.animationState.reset(), this.unmountControls?.();
|
|
3984
|
+
}
|
|
3985
|
+
}, vc = 0, gc = class extends at {
|
|
3986
|
+
constructor() {
|
|
3987
|
+
super(...arguments), this.id = vc++, this.isExitComplete = !1;
|
|
3988
|
+
}
|
|
3989
|
+
update() {
|
|
3990
|
+
if (!this.node.presenceContext) return;
|
|
3991
|
+
const { isPresent: t, onExitComplete: e } = this.node.presenceContext, { isPresent: i } = this.node.prevPresenceContext || {};
|
|
3992
|
+
if (!this.node.animationState || t === i) return;
|
|
3993
|
+
if (t && i === !1) {
|
|
3994
|
+
if (this.isExitComplete) {
|
|
3995
|
+
const { initial: s, custom: o } = this.node.getProps();
|
|
3996
|
+
if (typeof s == "string") {
|
|
3997
|
+
const r = yt(this.node, s, o);
|
|
3998
|
+
if (r) {
|
|
3999
|
+
const { transition: a, transitionEnd: l, ...c } = r;
|
|
4000
|
+
for (const u in c) this.node.getValue(u)?.jump(c[u]);
|
|
4001
|
+
}
|
|
4002
|
+
}
|
|
4003
|
+
this.node.animationState.reset(), this.node.animationState.animateChanges();
|
|
4004
|
+
} else this.node.animationState.setActive("exit", !1);
|
|
4005
|
+
this.isExitComplete = !1;
|
|
4006
|
+
return;
|
|
4007
|
+
}
|
|
4008
|
+
const n = this.node.animationState.setActive("exit", !t);
|
|
4009
|
+
e && !t && n.then(() => {
|
|
4010
|
+
this.isExitComplete = !0, e(this.id);
|
|
4011
|
+
});
|
|
4012
|
+
}
|
|
4013
|
+
mount() {
|
|
4014
|
+
const { register: t, onExitComplete: e } = this.node.presenceContext || {};
|
|
4015
|
+
e && e(this.id), t && (this.unmount = t(this.id));
|
|
4016
|
+
}
|
|
4017
|
+
unmount() {
|
|
4018
|
+
}
|
|
4019
|
+
}, yc = {
|
|
4020
|
+
animation: { Feature: mc },
|
|
4021
|
+
exit: { Feature: gc }
|
|
4022
|
+
};
|
|
4023
|
+
function $t(t) {
|
|
4024
|
+
return { point: {
|
|
4025
|
+
x: t.pageX,
|
|
4026
|
+
y: t.pageY
|
|
4027
|
+
} };
|
|
4028
|
+
}
|
|
4029
|
+
var Tc = (t) => (e) => Si(e) && t(e, $t(e));
|
|
4030
|
+
function Ft(t, e, i, n) {
|
|
4031
|
+
return Ut(t, e, Tc(i), n);
|
|
4032
|
+
}
|
|
4033
|
+
var Or = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Nn = (t, e) => Math.abs(t - e);
|
|
4034
|
+
function xc(t, e) {
|
|
4035
|
+
const i = Nn(t.x, e.x), n = Nn(t.y, e.y);
|
|
4036
|
+
return Math.sqrt(i ** 2 + n ** 2);
|
|
4037
|
+
}
|
|
4038
|
+
var Un = /* @__PURE__ */ new Set(["auto", "scroll"]), jr = class {
|
|
4039
|
+
constructor(t, e, { transformPagePoint: i, contextWindow: n = window, dragSnapToOrigin: s = !1, distanceThreshold: o = 3, element: r } = {}) {
|
|
4040
|
+
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (h) => {
|
|
4041
|
+
this.handleScroll(h.target);
|
|
4042
|
+
}, this.onWindowScroll = () => {
|
|
4043
|
+
this.handleScroll(window);
|
|
4044
|
+
}, this.updatePoint = () => {
|
|
4045
|
+
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4046
|
+
this.lastRawMoveEventInfo && (this.lastMoveEventInfo = Gt(this.lastRawMoveEventInfo, this.transformPagePoint));
|
|
4047
|
+
const h = Ce(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, p = xc(h.offset, {
|
|
4048
|
+
x: 0,
|
|
4049
|
+
y: 0
|
|
4050
|
+
}) >= this.distanceThreshold;
|
|
4051
|
+
if (!f && !p) return;
|
|
4052
|
+
const { point: d } = h, { timestamp: v } = B;
|
|
4053
|
+
this.history.push({
|
|
4054
|
+
...d,
|
|
4055
|
+
timestamp: v
|
|
4056
|
+
});
|
|
4057
|
+
const { onStart: g, onMove: m } = this.handlers;
|
|
4058
|
+
f || (g && g(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), m && m(this.lastMoveEvent, h);
|
|
4059
|
+
}, this.handlePointerMove = (h, f) => {
|
|
4060
|
+
this.lastMoveEvent = h, this.lastRawMoveEventInfo = f, this.lastMoveEventInfo = Gt(f, this.transformPagePoint), A.update(this.updatePoint, !0);
|
|
4061
|
+
}, this.handlePointerUp = (h, f) => {
|
|
4062
|
+
this.end();
|
|
4063
|
+
const { onEnd: p, onSessionEnd: d, resumeAnimation: v } = this.handlers;
|
|
4064
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4065
|
+
const g = Ce(h.type === "pointercancel" ? this.lastMoveEventInfo : Gt(f, this.transformPagePoint), this.history);
|
|
4066
|
+
this.startEvent && p && p(h, g), d && d(h, g);
|
|
4067
|
+
}, !Si(t)) return;
|
|
4068
|
+
this.dragSnapToOrigin = s, this.handlers = e, this.transformPagePoint = i, this.distanceThreshold = o, this.contextWindow = n || window;
|
|
4069
|
+
const a = Gt($t(t), this.transformPagePoint), { point: l } = a, { timestamp: c } = B;
|
|
4070
|
+
this.history = [{
|
|
4071
|
+
...l,
|
|
4072
|
+
timestamp: c
|
|
4073
|
+
}];
|
|
4074
|
+
const { onSessionStart: u } = e;
|
|
4075
|
+
u && u(t, Ce(a, this.history)), this.removeListeners = Wt(Ft(this.contextWindow, "pointermove", this.handlePointerMove), Ft(this.contextWindow, "pointerup", this.handlePointerUp), Ft(this.contextWindow, "pointercancel", this.handlePointerUp)), r && this.startScrollTracking(r);
|
|
4076
|
+
}
|
|
4077
|
+
startScrollTracking(t) {
|
|
4078
|
+
let e = t.parentElement;
|
|
4079
|
+
for (; e; ) {
|
|
4080
|
+
const i = getComputedStyle(e);
|
|
4081
|
+
(Un.has(i.overflowX) || Un.has(i.overflowY)) && this.scrollPositions.set(e, {
|
|
4082
|
+
x: e.scrollLeft,
|
|
4083
|
+
y: e.scrollTop
|
|
4084
|
+
}), e = e.parentElement;
|
|
4085
|
+
}
|
|
4086
|
+
this.scrollPositions.set(window, {
|
|
4087
|
+
x: window.scrollX,
|
|
4088
|
+
y: window.scrollY
|
|
4089
|
+
}), window.addEventListener("scroll", this.onElementScroll, { capture: !0 }), window.addEventListener("scroll", this.onWindowScroll), this.removeScrollListeners = () => {
|
|
4090
|
+
window.removeEventListener("scroll", this.onElementScroll, { capture: !0 }), window.removeEventListener("scroll", this.onWindowScroll);
|
|
4091
|
+
};
|
|
4092
|
+
}
|
|
4093
|
+
handleScroll(t) {
|
|
4094
|
+
const e = this.scrollPositions.get(t);
|
|
4095
|
+
if (!e) return;
|
|
4096
|
+
const i = t === window, n = i ? {
|
|
4097
|
+
x: window.scrollX,
|
|
4098
|
+
y: window.scrollY
|
|
4099
|
+
} : {
|
|
4100
|
+
x: t.scrollLeft,
|
|
4101
|
+
y: t.scrollTop
|
|
4102
|
+
}, s = {
|
|
4103
|
+
x: n.x - e.x,
|
|
4104
|
+
y: n.y - e.y
|
|
4105
|
+
};
|
|
4106
|
+
s.x === 0 && s.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += s.x, this.lastMoveEventInfo.point.y += s.y) : this.history.length > 0 && (this.history[0].x -= s.x, this.history[0].y -= s.y), this.scrollPositions.set(t, n), A.update(this.updatePoint, !0));
|
|
4107
|
+
}
|
|
4108
|
+
updateHandlers(t) {
|
|
4109
|
+
this.handlers = t;
|
|
4110
|
+
}
|
|
4111
|
+
end() {
|
|
4112
|
+
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), ot(this.updatePoint);
|
|
4113
|
+
}
|
|
4114
|
+
};
|
|
4115
|
+
function Gt(t, e) {
|
|
4116
|
+
return e ? { point: e(t.point) } : t;
|
|
4117
|
+
}
|
|
4118
|
+
function Wn(t, e) {
|
|
4119
|
+
return {
|
|
4120
|
+
x: t.x - e.x,
|
|
4121
|
+
y: t.y - e.y
|
|
4122
|
+
};
|
|
4123
|
+
}
|
|
4124
|
+
function Ce({ point: t }, e) {
|
|
4125
|
+
return {
|
|
4126
|
+
point: t,
|
|
4127
|
+
delta: Wn(t, Nr(e)),
|
|
4128
|
+
offset: Wn(t, wc(e)),
|
|
4129
|
+
velocity: Pc(e, 0.1)
|
|
4130
|
+
};
|
|
4131
|
+
}
|
|
4132
|
+
function wc(t) {
|
|
4133
|
+
return t[0];
|
|
4134
|
+
}
|
|
4135
|
+
function Nr(t) {
|
|
4136
|
+
return t[t.length - 1];
|
|
4137
|
+
}
|
|
4138
|
+
function Pc(t, e) {
|
|
4139
|
+
if (t.length < 2) return {
|
|
4140
|
+
x: 0,
|
|
4141
|
+
y: 0
|
|
4142
|
+
};
|
|
4143
|
+
let i = t.length - 1, n = null;
|
|
4144
|
+
const s = Nr(t);
|
|
4145
|
+
for (; i >= 0 && (n = t[i], !(s.timestamp - n.timestamp > W(e))); )
|
|
4146
|
+
i--;
|
|
4147
|
+
if (!n) return {
|
|
4148
|
+
x: 0,
|
|
4149
|
+
y: 0
|
|
4150
|
+
};
|
|
4151
|
+
n === t[0] && t.length > 2 && s.timestamp - n.timestamp > W(e) * 2 && (n = t[1]);
|
|
4152
|
+
const o = K(s.timestamp - n.timestamp);
|
|
4153
|
+
if (o === 0) return {
|
|
4154
|
+
x: 0,
|
|
4155
|
+
y: 0
|
|
4156
|
+
};
|
|
4157
|
+
const r = {
|
|
4158
|
+
x: (s.x - n.x) / o,
|
|
4159
|
+
y: (s.y - n.y) / o
|
|
4160
|
+
};
|
|
4161
|
+
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
4162
|
+
}
|
|
4163
|
+
function Sc(t, { min: e, max: i }, n) {
|
|
4164
|
+
return e !== void 0 && t < e ? t = n ? V(e, t, n.min) : Math.max(t, e) : i !== void 0 && t > i && (t = n ? V(i, t, n.max) : Math.min(t, i)), t;
|
|
4165
|
+
}
|
|
4166
|
+
function _n(t, e, i) {
|
|
4167
|
+
return {
|
|
4168
|
+
min: e !== void 0 ? t.min + e : void 0,
|
|
4169
|
+
max: i !== void 0 ? t.max + i - (t.max - t.min) : void 0
|
|
4170
|
+
};
|
|
4171
|
+
}
|
|
4172
|
+
function bc(t, { top: e, left: i, bottom: n, right: s }) {
|
|
4173
|
+
return {
|
|
4174
|
+
x: _n(t.x, i, s),
|
|
4175
|
+
y: _n(t.y, e, n)
|
|
4176
|
+
};
|
|
4177
|
+
}
|
|
4178
|
+
function Kn(t, e) {
|
|
4179
|
+
let i = e.min - t.min, n = e.max - t.max;
|
|
4180
|
+
return e.max - e.min < t.max - t.min && ([i, n] = [n, i]), {
|
|
4181
|
+
min: i,
|
|
4182
|
+
max: n
|
|
4183
|
+
};
|
|
4184
|
+
}
|
|
4185
|
+
function Ac(t, e) {
|
|
4186
|
+
return {
|
|
4187
|
+
x: Kn(t.x, e.x),
|
|
4188
|
+
y: Kn(t.y, e.y)
|
|
4189
|
+
};
|
|
4190
|
+
}
|
|
4191
|
+
function Vc(t, e) {
|
|
4192
|
+
let i = 0.5;
|
|
4193
|
+
const n = j(t), s = j(e);
|
|
4194
|
+
return s > n ? i = Ot(e.min, e.max - n, t.min) : n > s && (i = Ot(t.min, t.max - s, e.min)), tt(0, 1, i);
|
|
4195
|
+
}
|
|
4196
|
+
function Mc(t, e) {
|
|
4197
|
+
const i = {};
|
|
4198
|
+
return e.min !== void 0 && (i.min = e.min - t.min), e.max !== void 0 && (i.max = e.max - t.min), i;
|
|
4199
|
+
}
|
|
4200
|
+
var ei = 0.35;
|
|
4201
|
+
function Cc(t = ei) {
|
|
4202
|
+
return t === !1 ? t = 0 : t === !0 && (t = ei), {
|
|
4203
|
+
x: $n(t, "left", "right"),
|
|
4204
|
+
y: $n(t, "top", "bottom")
|
|
4205
|
+
};
|
|
4206
|
+
}
|
|
4207
|
+
function $n(t, e, i) {
|
|
4208
|
+
return {
|
|
4209
|
+
min: zn(t, e),
|
|
4210
|
+
max: zn(t, i)
|
|
4211
|
+
};
|
|
4212
|
+
}
|
|
4213
|
+
function zn(t, e) {
|
|
4214
|
+
return typeof t == "number" ? t : t[e] || 0;
|
|
4215
|
+
}
|
|
4216
|
+
var Dc = /* @__PURE__ */ new WeakMap(), Ec = class {
|
|
4217
|
+
constructor(t) {
|
|
4218
|
+
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = {
|
|
4219
|
+
x: 0,
|
|
4220
|
+
y: 0
|
|
4221
|
+
}, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = R(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
|
|
4222
|
+
}
|
|
4223
|
+
start(t, { snapToCursor: e = !1, distanceThreshold: i } = {}) {
|
|
4224
|
+
const { presenceContext: n } = this.visualElement;
|
|
4225
|
+
if (n && n.isPresent === !1) return;
|
|
4226
|
+
const s = (u) => {
|
|
4227
|
+
e && this.snapToCursor($t(u).point), this.stopAnimation();
|
|
4228
|
+
}, o = (u, h) => {
|
|
4229
|
+
const { drag: f, dragPropagation: p, onDragStart: d } = this.getProps();
|
|
4230
|
+
if (f && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = ol(f), !this.openDragLock))
|
|
4231
|
+
return;
|
|
4232
|
+
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), q((g) => {
|
|
4233
|
+
let m = this.getAxisMotionValue(g).get() || 0;
|
|
4234
|
+
if (Q.test(m)) {
|
|
4235
|
+
const { projection: x } = this.visualElement;
|
|
4236
|
+
if (x && x.layout) {
|
|
4237
|
+
const y = x.layout.layoutBox[g];
|
|
4238
|
+
y && (m = j(y) * (parseFloat(m) / 100));
|
|
4239
|
+
}
|
|
4240
|
+
}
|
|
4241
|
+
this.originPoint[g] = m;
|
|
4242
|
+
}), d && A.update(() => d(u, h), !1, !0), He(this.visualElement, "transform");
|
|
4243
|
+
const { animationState: v } = this.visualElement;
|
|
4244
|
+
v && v.setActive("whileDrag", !0);
|
|
4245
|
+
}, r = (u, h) => {
|
|
4246
|
+
this.latestPointerEvent = u, this.latestPanInfo = h;
|
|
4247
|
+
const { dragPropagation: f, dragDirectionLock: p, onDirectionLock: d, onDrag: v } = this.getProps();
|
|
4248
|
+
if (!f && !this.openDragLock) return;
|
|
4249
|
+
const { offset: g } = h;
|
|
4250
|
+
if (p && this.currentDirection === null) {
|
|
4251
|
+
this.currentDirection = Lc(g), this.currentDirection !== null && d && d(this.currentDirection);
|
|
4252
|
+
return;
|
|
4253
|
+
}
|
|
4254
|
+
this.updateAxis("x", h.point, g), this.updateAxis("y", h.point, g), this.visualElement.render(), v && A.update(() => v(u, h), !1, !0);
|
|
4255
|
+
}, a = (u, h) => {
|
|
4256
|
+
this.latestPointerEvent = u, this.latestPanInfo = h, this.stop(u, h), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
4257
|
+
}, l = () => {
|
|
4258
|
+
const { dragSnapToOrigin: u } = this.getProps();
|
|
4259
|
+
(u || this.constraints) && this.startAnimation({
|
|
4260
|
+
x: 0,
|
|
4261
|
+
y: 0
|
|
4262
|
+
});
|
|
4263
|
+
}, { dragSnapToOrigin: c } = this.getProps();
|
|
4264
|
+
this.panSession = new jr(t, {
|
|
4265
|
+
onSessionStart: s,
|
|
4266
|
+
onStart: o,
|
|
4267
|
+
onMove: r,
|
|
4268
|
+
onSessionEnd: a,
|
|
4269
|
+
resumeAnimation: l
|
|
4270
|
+
}, {
|
|
4271
|
+
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
4272
|
+
dragSnapToOrigin: c,
|
|
4273
|
+
distanceThreshold: i,
|
|
4274
|
+
contextWindow: Or(this.visualElement),
|
|
4275
|
+
element: this.visualElement.current
|
|
4276
|
+
});
|
|
4277
|
+
}
|
|
4278
|
+
stop(t, e) {
|
|
4279
|
+
const i = t || this.latestPointerEvent, n = e || this.latestPanInfo, s = this.isDragging;
|
|
4280
|
+
if (this.cancel(), !s || !n || !i) return;
|
|
4281
|
+
const { velocity: o } = n;
|
|
4282
|
+
this.startAnimation(o);
|
|
4283
|
+
const { onDragEnd: r } = this.getProps();
|
|
4284
|
+
r && A.postRender(() => r(i, n));
|
|
4285
|
+
}
|
|
4286
|
+
cancel() {
|
|
4287
|
+
this.isDragging = !1;
|
|
4288
|
+
const { projection: t, animationState: e } = this.visualElement;
|
|
4289
|
+
t && (t.isAnimationBlocked = !1), this.endPanSession();
|
|
4290
|
+
const { dragPropagation: i } = this.getProps();
|
|
4291
|
+
!i && this.openDragLock && (this.openDragLock(), this.openDragLock = null), e && e.setActive("whileDrag", !1);
|
|
4292
|
+
}
|
|
4293
|
+
endPanSession() {
|
|
4294
|
+
this.panSession && this.panSession.end(), this.panSession = void 0;
|
|
4295
|
+
}
|
|
4296
|
+
updateAxis(t, e, i) {
|
|
4297
|
+
const { drag: n } = this.getProps();
|
|
4298
|
+
if (!i || !Xt(t, n, this.currentDirection)) return;
|
|
4299
|
+
const s = this.getAxisMotionValue(t);
|
|
4300
|
+
let o = this.originPoint[t] + i[t];
|
|
4301
|
+
this.constraints && this.constraints[t] && (o = Sc(o, this.constraints[t], this.elastic[t])), s.set(o);
|
|
4302
|
+
}
|
|
4303
|
+
resolveConstraints() {
|
|
4304
|
+
const { dragConstraints: t, dragElastic: e } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, n = this.constraints;
|
|
4305
|
+
t && xt(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && i ? this.constraints = bc(i.layoutBox, t) : this.constraints = !1, this.elastic = Cc(e), n !== this.constraints && !xt(t) && i && this.constraints && !this.hasMutatedConstraints && q((s) => {
|
|
4306
|
+
this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] = Mc(i.layoutBox[s], this.constraints[s]));
|
|
4307
|
+
});
|
|
4308
|
+
}
|
|
4309
|
+
resolveRefConstraints() {
|
|
4310
|
+
const { dragConstraints: t, onMeasureDragConstraints: e } = this.getProps();
|
|
4311
|
+
if (!t || !xt(t)) return !1;
|
|
4312
|
+
const i = t.current;
|
|
4313
|
+
it(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
|
|
4314
|
+
const { projection: n } = this.visualElement;
|
|
4315
|
+
if (!n || !n.layout) return !1;
|
|
4316
|
+
const s = Il(i, n.root, this.visualElement.getTransformPagePoint());
|
|
4317
|
+
let o = Ac(n.layout.layoutBox, s);
|
|
4318
|
+
if (e) {
|
|
4319
|
+
const r = e(Ll(o));
|
|
4320
|
+
this.hasMutatedConstraints = !!r, r && (o = rr(r));
|
|
4321
|
+
}
|
|
4322
|
+
return o;
|
|
4323
|
+
}
|
|
4324
|
+
startAnimation(t) {
|
|
4325
|
+
const { drag: e, dragMomentum: i, dragElastic: n, dragTransition: s, dragSnapToOrigin: o, onDragTransitionEnd: r } = this.getProps(), a = this.constraints || {}, l = q((c) => {
|
|
4326
|
+
if (!Xt(c, e, this.currentDirection)) return;
|
|
4327
|
+
let u = a && a[c] || {};
|
|
4328
|
+
(o === !0 || o === c) && (u = {
|
|
4329
|
+
min: 0,
|
|
4330
|
+
max: 0
|
|
4331
|
+
});
|
|
4332
|
+
const h = n ? 200 : 1e6, f = n ? 40 : 1e7, p = {
|
|
4333
|
+
type: "inertia",
|
|
4334
|
+
velocity: i ? t[c] : 0,
|
|
4335
|
+
bounceStiffness: h,
|
|
4336
|
+
bounceDamping: f,
|
|
4337
|
+
timeConstant: 750,
|
|
4338
|
+
restDelta: 1,
|
|
4339
|
+
restSpeed: 10,
|
|
4340
|
+
...s,
|
|
4341
|
+
...u
|
|
4342
|
+
};
|
|
4343
|
+
return this.startAxisValueAnimation(c, p);
|
|
4344
|
+
});
|
|
4345
|
+
return Promise.all(l).then(r);
|
|
4346
|
+
}
|
|
4347
|
+
startAxisValueAnimation(t, e) {
|
|
4348
|
+
const i = this.getAxisMotionValue(t);
|
|
4349
|
+
return He(this.visualElement, t), i.start(yi(t, i, 0, e, this.visualElement, !1));
|
|
4350
|
+
}
|
|
4351
|
+
stopAnimation() {
|
|
4352
|
+
q((t) => this.getAxisMotionValue(t).stop());
|
|
4353
|
+
}
|
|
4354
|
+
getAxisMotionValue(t) {
|
|
4355
|
+
const e = `_drag${t.toUpperCase()}`, i = this.visualElement.getProps(), n = i[e];
|
|
4356
|
+
return n || this.visualElement.getValue(t, (i.initial ? i.initial[t] : void 0) || 0);
|
|
4357
|
+
}
|
|
4358
|
+
snapToCursor(t) {
|
|
4359
|
+
q((e) => {
|
|
4360
|
+
const { drag: i } = this.getProps();
|
|
4361
|
+
if (!Xt(e, i, this.currentDirection)) return;
|
|
4362
|
+
const { projection: n } = this.visualElement, s = this.getAxisMotionValue(e);
|
|
4363
|
+
if (n && n.layout) {
|
|
4364
|
+
const { min: o, max: r } = n.layout.layoutBox[e], a = s.get() || 0;
|
|
4365
|
+
s.set(t[e] - V(o, r, 0.5) + a);
|
|
4366
|
+
}
|
|
4367
|
+
});
|
|
4368
|
+
}
|
|
4369
|
+
scalePositionWithinConstraints() {
|
|
4370
|
+
if (!this.visualElement.current) return;
|
|
4371
|
+
const { drag: t, dragConstraints: e } = this.getProps(), { projection: i } = this.visualElement;
|
|
4372
|
+
if (!xt(e) || !i || !this.constraints) return;
|
|
4373
|
+
this.stopAnimation();
|
|
4374
|
+
const n = {
|
|
4375
|
+
x: 0,
|
|
4376
|
+
y: 0
|
|
4377
|
+
};
|
|
4378
|
+
q((o) => {
|
|
4379
|
+
const r = this.getAxisMotionValue(o);
|
|
4380
|
+
if (r && this.constraints !== !1) {
|
|
4381
|
+
const a = r.get();
|
|
4382
|
+
n[o] = Vc({
|
|
4383
|
+
min: a,
|
|
4384
|
+
max: a
|
|
4385
|
+
}, this.constraints[o]);
|
|
4386
|
+
}
|
|
4387
|
+
});
|
|
4388
|
+
const { transformTemplate: s } = this.visualElement.getProps();
|
|
4389
|
+
this.visualElement.current.style.transform = s ? s({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.constraints = !1, this.resolveConstraints(), q((o) => {
|
|
4390
|
+
if (!Xt(o, t, null)) return;
|
|
4391
|
+
const r = this.getAxisMotionValue(o), { min: a, max: l } = this.constraints[o];
|
|
4392
|
+
r.set(V(a, l, n[o]));
|
|
4393
|
+
}), this.visualElement.render();
|
|
4394
|
+
}
|
|
4395
|
+
addListeners() {
|
|
4396
|
+
if (!this.visualElement.current) return;
|
|
4397
|
+
Dc.set(this.visualElement, this);
|
|
4398
|
+
const t = this.visualElement.current, e = Ft(t, "pointerdown", (l) => {
|
|
4399
|
+
const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== t && fl(h);
|
|
4400
|
+
c && u && !f && this.start(l);
|
|
4401
|
+
});
|
|
4402
|
+
let i;
|
|
4403
|
+
const n = () => {
|
|
4404
|
+
const { dragConstraints: l } = this.getProps();
|
|
4405
|
+
xt(l) && l.current && (this.constraints = this.resolveRefConstraints(), i || (i = Rc(t, l.current, () => this.scalePositionWithinConstraints())));
|
|
4406
|
+
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", n);
|
|
4407
|
+
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), A.read(n);
|
|
4408
|
+
const r = Ut(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: c }) => {
|
|
4409
|
+
this.isDragging && c && (q((u) => {
|
|
4410
|
+
const h = this.getAxisMotionValue(u);
|
|
4411
|
+
h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
|
|
4412
|
+
}), this.visualElement.render());
|
|
4413
|
+
}));
|
|
4414
|
+
return () => {
|
|
4415
|
+
r(), e(), o(), a && a(), i && i();
|
|
4416
|
+
};
|
|
4417
|
+
}
|
|
4418
|
+
getProps() {
|
|
4419
|
+
const t = this.visualElement.getProps(), { drag: e = !1, dragDirectionLock: i = !1, dragPropagation: n = !1, dragConstraints: s = !1, dragElastic: o = ei, dragMomentum: r = !0 } = t;
|
|
4420
|
+
return {
|
|
4421
|
+
...t,
|
|
4422
|
+
drag: e,
|
|
4423
|
+
dragDirectionLock: i,
|
|
4424
|
+
dragPropagation: n,
|
|
4425
|
+
dragConstraints: s,
|
|
4426
|
+
dragElastic: o,
|
|
4427
|
+
dragMomentum: r
|
|
4428
|
+
};
|
|
4429
|
+
}
|
|
4430
|
+
};
|
|
4431
|
+
function Hn(t) {
|
|
4432
|
+
let e = !0;
|
|
4433
|
+
return () => {
|
|
4434
|
+
if (e) {
|
|
4435
|
+
e = !1;
|
|
4436
|
+
return;
|
|
4437
|
+
}
|
|
4438
|
+
t();
|
|
4439
|
+
};
|
|
4440
|
+
}
|
|
4441
|
+
function Rc(t, e, i) {
|
|
4442
|
+
const n = tn(t, Hn(i)), s = tn(e, Hn(i));
|
|
4443
|
+
return () => {
|
|
4444
|
+
n(), s();
|
|
4445
|
+
};
|
|
4446
|
+
}
|
|
4447
|
+
function Xt(t, e, i) {
|
|
4448
|
+
return (e === !0 || e === t) && (i === null || i === t);
|
|
4449
|
+
}
|
|
4450
|
+
function Lc(t, e = 10) {
|
|
4451
|
+
let i = null;
|
|
4452
|
+
return Math.abs(t.y) > e ? i = "y" : Math.abs(t.x) > e && (i = "x"), i;
|
|
4453
|
+
}
|
|
4454
|
+
var kc = class extends at {
|
|
4455
|
+
constructor(t) {
|
|
4456
|
+
super(t), this.removeGroupControls = $, this.removeListeners = $, this.controls = new Ec(t);
|
|
4457
|
+
}
|
|
4458
|
+
mount() {
|
|
4459
|
+
const { dragControls: t } = this.node.getProps();
|
|
4460
|
+
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || $;
|
|
4461
|
+
}
|
|
4462
|
+
update() {
|
|
4463
|
+
const { dragControls: t } = this.node.getProps(), { dragControls: e } = this.node.prevProps || {};
|
|
4464
|
+
t !== e && (this.removeGroupControls(), t && (this.removeGroupControls = t.subscribe(this.controls)));
|
|
4465
|
+
}
|
|
4466
|
+
unmount() {
|
|
4467
|
+
this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
|
|
4468
|
+
}
|
|
4469
|
+
}, De = (t) => (e, i) => {
|
|
4470
|
+
t && A.update(() => t(e, i), !1, !0);
|
|
4471
|
+
}, Bc = class extends at {
|
|
4472
|
+
constructor() {
|
|
4473
|
+
super(...arguments), this.removePointerDownListener = $;
|
|
4474
|
+
}
|
|
4475
|
+
onPointerDown(t) {
|
|
4476
|
+
this.session = new jr(t, this.createPanHandlers(), {
|
|
4477
|
+
transformPagePoint: this.node.getTransformPagePoint(),
|
|
4478
|
+
contextWindow: Or(this.node)
|
|
4479
|
+
});
|
|
4480
|
+
}
|
|
4481
|
+
createPanHandlers() {
|
|
4482
|
+
const { onPanSessionStart: t, onPanStart: e, onPan: i, onPanEnd: n } = this.node.getProps();
|
|
4483
|
+
return {
|
|
4484
|
+
onSessionStart: De(t),
|
|
4485
|
+
onStart: De(e),
|
|
4486
|
+
onMove: De(i),
|
|
4487
|
+
onEnd: (s, o) => {
|
|
4488
|
+
delete this.session, n && A.postRender(() => n(s, o));
|
|
4489
|
+
}
|
|
4490
|
+
};
|
|
4491
|
+
}
|
|
4492
|
+
mount() {
|
|
4493
|
+
this.removePointerDownListener = Ft(this.node.current, "pointerdown", (t) => this.onPointerDown(t));
|
|
4494
|
+
}
|
|
4495
|
+
update() {
|
|
4496
|
+
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
4497
|
+
}
|
|
4498
|
+
unmount() {
|
|
4499
|
+
this.removePointerDownListener(), this.session && this.session.end();
|
|
4500
|
+
}
|
|
4501
|
+
}, Ee = !1, Ic = class extends zr {
|
|
4502
|
+
componentDidMount() {
|
|
4503
|
+
const { visualElement: t, layoutGroup: e, switchLayoutGroup: i, layoutId: n } = this.props, { projection: s } = t;
|
|
4504
|
+
s && (e.group && e.group.add(s), i && i.register && n && i.register(s), Ee && s.root.didUpdate(), s.addEventListener("animationComplete", () => {
|
|
4505
|
+
this.safeToRemove();
|
|
4506
|
+
}), s.setOptions({
|
|
4507
|
+
...s.options,
|
|
4508
|
+
layoutDependency: this.props.layoutDependency,
|
|
4509
|
+
onExitComplete: () => this.safeToRemove()
|
|
4510
|
+
})), ie.hasEverUpdated = !0;
|
|
4511
|
+
}
|
|
4512
|
+
getSnapshotBeforeUpdate(t) {
|
|
4513
|
+
const { layoutDependency: e, visualElement: i, drag: n, isPresent: s } = this.props, { projection: o } = i;
|
|
4514
|
+
return o && (o.isPresent = s, t.layoutDependency !== e && o.setOptions({
|
|
4515
|
+
...o.options,
|
|
4516
|
+
layoutDependency: e
|
|
4517
|
+
}), Ee = !0, n || t.layoutDependency !== e || e === void 0 || t.isPresent !== s ? o.willUpdate() : this.safeToRemove(), t.isPresent !== s && (s ? o.promote() : o.relegate() || A.postRender(() => {
|
|
4518
|
+
const r = o.getStack();
|
|
4519
|
+
(!r || !r.members.length) && this.safeToRemove();
|
|
4520
|
+
}))), null;
|
|
4521
|
+
}
|
|
4522
|
+
componentDidUpdate() {
|
|
4523
|
+
const { visualElement: t, layoutAnchor: e } = this.props, { projection: i } = t;
|
|
4524
|
+
i && (i.options.layoutAnchor = e, i.root.didUpdate(), Pi.postRender(() => {
|
|
4525
|
+
!i.currentAnimation && i.isLead() && this.safeToRemove();
|
|
4526
|
+
}));
|
|
4527
|
+
}
|
|
4528
|
+
componentWillUnmount() {
|
|
4529
|
+
const { visualElement: t, layoutGroup: e, switchLayoutGroup: i } = this.props, { projection: n } = t;
|
|
4530
|
+
Ee = !0, n && (n.scheduleCheckAfterUnmount(), e && e.group && e.group.remove(n), i && i.deregister && i.deregister(n));
|
|
4531
|
+
}
|
|
4532
|
+
safeToRemove() {
|
|
4533
|
+
const { safeToRemove: t } = this.props;
|
|
4534
|
+
t && t();
|
|
4535
|
+
}
|
|
4536
|
+
render() {
|
|
4537
|
+
return null;
|
|
4538
|
+
}
|
|
4539
|
+
};
|
|
4540
|
+
function Ur(t) {
|
|
4541
|
+
const [e, i] = Uu(), n = U(Qn);
|
|
4542
|
+
return Jn(Ic, {
|
|
4543
|
+
...t,
|
|
4544
|
+
layoutGroup: n,
|
|
4545
|
+
switchLayoutGroup: U(Ir),
|
|
4546
|
+
isPresent: e,
|
|
4547
|
+
safeToRemove: i
|
|
4548
|
+
});
|
|
4549
|
+
}
|
|
4550
|
+
var Fc = {
|
|
4551
|
+
pan: { Feature: Bc },
|
|
4552
|
+
drag: {
|
|
4553
|
+
Feature: kc,
|
|
4554
|
+
ProjectionNode: Vr,
|
|
4555
|
+
MeasureLayout: Ur
|
|
4556
|
+
}
|
|
4557
|
+
};
|
|
4558
|
+
function Gn(t, e, i) {
|
|
4559
|
+
const { props: n } = t;
|
|
4560
|
+
t.animationState && n.whileHover && t.animationState.setActive("whileHover", i === "Start");
|
|
4561
|
+
const s = n["onHover" + i];
|
|
4562
|
+
s && A.postRender(() => s(e, $t(e)));
|
|
4563
|
+
}
|
|
4564
|
+
var Oc = class extends at {
|
|
4565
|
+
mount() {
|
|
4566
|
+
const { current: t } = this.node;
|
|
4567
|
+
t && (this.unmount = ll(t, (e, i) => (Gn(this.node, i, "Start"), (n) => Gn(this.node, n, "End"))));
|
|
4568
|
+
}
|
|
4569
|
+
unmount() {
|
|
4570
|
+
}
|
|
4571
|
+
}, jc = class extends at {
|
|
4572
|
+
constructor() {
|
|
4573
|
+
super(...arguments), this.isActive = !1;
|
|
4574
|
+
}
|
|
4575
|
+
onFocus() {
|
|
4576
|
+
let t = !1;
|
|
4577
|
+
try {
|
|
4578
|
+
t = this.node.current.matches(":focus-visible");
|
|
4579
|
+
} catch {
|
|
4580
|
+
t = !0;
|
|
4581
|
+
}
|
|
4582
|
+
!t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
4583
|
+
}
|
|
4584
|
+
onBlur() {
|
|
4585
|
+
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
4586
|
+
}
|
|
4587
|
+
mount() {
|
|
4588
|
+
this.unmount = Wt(Ut(this.node.current, "focus", () => this.onFocus()), Ut(this.node.current, "blur", () => this.onBlur()));
|
|
4589
|
+
}
|
|
4590
|
+
unmount() {
|
|
4591
|
+
}
|
|
4592
|
+
};
|
|
4593
|
+
function Xn(t, e, i) {
|
|
4594
|
+
const { props: n } = t;
|
|
4595
|
+
if (t.current instanceof HTMLButtonElement && t.current.disabled) return;
|
|
4596
|
+
t.animationState && n.whileTap && t.animationState.setActive("whileTap", i === "Start");
|
|
4597
|
+
const s = n["onTap" + (i === "End" ? "" : i)];
|
|
4598
|
+
s && A.postRender(() => s(e, $t(e)));
|
|
4599
|
+
}
|
|
4600
|
+
var Nc = class extends at {
|
|
4601
|
+
mount() {
|
|
4602
|
+
const { current: t } = this.node;
|
|
4603
|
+
if (!t) return;
|
|
4604
|
+
const { globalTapTarget: e, propagate: i } = this.node.props;
|
|
4605
|
+
this.unmount = pl(t, (n, s) => (Xn(this.node, s, "Start"), (o, { success: r }) => Xn(this.node, o, r ? "End" : "Cancel")), {
|
|
4606
|
+
useGlobalTarget: e,
|
|
4607
|
+
stopPropagation: i?.tap === !1
|
|
4608
|
+
});
|
|
4609
|
+
}
|
|
4610
|
+
unmount() {
|
|
4611
|
+
}
|
|
4612
|
+
}, ii = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Uc = (t) => {
|
|
4613
|
+
const e = ii.get(t.target);
|
|
4614
|
+
e && e(t);
|
|
4615
|
+
}, Wc = (t) => {
|
|
4616
|
+
t.forEach(Uc);
|
|
4617
|
+
};
|
|
4618
|
+
function _c({ root: t, ...e }) {
|
|
4619
|
+
const i = t || document;
|
|
4620
|
+
Re.has(i) || Re.set(i, {});
|
|
4621
|
+
const n = Re.get(i), s = JSON.stringify(e);
|
|
4622
|
+
return n[s] || (n[s] = new IntersectionObserver(Wc, {
|
|
4623
|
+
root: t,
|
|
4624
|
+
...e
|
|
4625
|
+
})), n[s];
|
|
4626
|
+
}
|
|
4627
|
+
function Kc(t, e, i) {
|
|
4628
|
+
const n = _c(e);
|
|
4629
|
+
return ii.set(t, i), n.observe(t), () => {
|
|
4630
|
+
ii.delete(t), n.unobserve(t);
|
|
4631
|
+
};
|
|
4632
|
+
}
|
|
4633
|
+
var $c = {
|
|
4634
|
+
some: 0,
|
|
4635
|
+
all: 1
|
|
4636
|
+
}, zc = class extends at {
|
|
4637
|
+
constructor() {
|
|
4638
|
+
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
4639
|
+
}
|
|
4640
|
+
startObserver() {
|
|
4641
|
+
this.stopObserver?.();
|
|
4642
|
+
const { viewport: t = {} } = this.node.getProps(), { root: e, margin: i, amount: n = "some", once: s } = t, o = {
|
|
4643
|
+
root: e ? e.current : void 0,
|
|
4644
|
+
rootMargin: i,
|
|
4645
|
+
threshold: typeof n == "number" ? n : $c[n]
|
|
4646
|
+
}, r = (a) => {
|
|
4647
|
+
const { isIntersecting: l } = a;
|
|
4648
|
+
if (this.isInView === l || (this.isInView = l, s && !l && this.hasEnteredView)) return;
|
|
4649
|
+
l && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", l);
|
|
4650
|
+
const { onViewportEnter: c, onViewportLeave: u } = this.node.getProps(), h = l ? c : u;
|
|
4651
|
+
h && h(a);
|
|
4652
|
+
};
|
|
4653
|
+
this.stopObserver = Kc(this.node.current, o, r);
|
|
4654
|
+
}
|
|
4655
|
+
mount() {
|
|
4656
|
+
this.startObserver();
|
|
4657
|
+
}
|
|
4658
|
+
update() {
|
|
4659
|
+
if (typeof IntersectionObserver > "u") return;
|
|
4660
|
+
const { props: t, prevProps: e } = this.node;
|
|
4661
|
+
[
|
|
4662
|
+
"amount",
|
|
4663
|
+
"margin",
|
|
4664
|
+
"root"
|
|
4665
|
+
].some(Hc(t, e)) && this.startObserver();
|
|
4666
|
+
}
|
|
4667
|
+
unmount() {
|
|
4668
|
+
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
|
|
4669
|
+
}
|
|
4670
|
+
};
|
|
4671
|
+
function Hc({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
4672
|
+
return (i) => t[i] !== e[i];
|
|
4673
|
+
}
|
|
4674
|
+
var Gc = {
|
|
4675
|
+
inView: { Feature: zc },
|
|
4676
|
+
tap: { Feature: Nc },
|
|
4677
|
+
focus: { Feature: jc },
|
|
4678
|
+
hover: { Feature: Oc }
|
|
4679
|
+
}, Xc = { layout: {
|
|
4680
|
+
ProjectionNode: Vr,
|
|
4681
|
+
MeasureLayout: Ur
|
|
4682
|
+
} }, Yc = {
|
|
4683
|
+
...yc,
|
|
4684
|
+
...Gc,
|
|
4685
|
+
...Fc,
|
|
4686
|
+
...Xc
|
|
4687
|
+
}, eh = /* @__PURE__ */ dc(Yc, pc);
|
|
4688
|
+
export {
|
|
4689
|
+
eh as t
|
|
4690
|
+
};
|