@acronis-platform/ui-react 0.55.0 → 0.56.0
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/README.md +1 -1
- package/package.json +4 -2
- package/dist/components/ui/accordion/accordion.js +0 -53
- package/dist/components/ui/accordion/accordion.js.map +0 -1
- package/dist/components/ui/alert/alert.js +0 -99
- package/dist/components/ui/alert/alert.js.map +0 -1
- package/dist/components/ui/app-shell/app-shell.js +0 -75
- package/dist/components/ui/app-shell/app-shell.js.map +0 -1
- package/dist/components/ui/auth-layout/auth-layout.js +0 -56
- package/dist/components/ui/auth-layout/auth-layout.js.map +0 -1
- package/dist/components/ui/avatar/avatar.js +0 -70
- package/dist/components/ui/avatar/avatar.js.map +0 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +0 -116
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +0 -1
- package/dist/components/ui/button/button.js +0 -50
- package/dist/components/ui/button/button.js.map +0 -1
- package/dist/components/ui/button-icon/button-icon.js +0 -35
- package/dist/components/ui/button-icon/button-icon.js.map +0 -1
- package/dist/components/ui/button-menu/button-menu.js +0 -52
- package/dist/components/ui/button-menu/button-menu.js.map +0 -1
- package/dist/components/ui/card/card.js +0 -92
- package/dist/components/ui/card/card.js.map +0 -1
- package/dist/components/ui/card-filter/card-filter.js +0 -63
- package/dist/components/ui/card-filter/card-filter.js.map +0 -1
- package/dist/components/ui/chart/chart.js +0 -213
- package/dist/components/ui/chart/chart.js.map +0 -1
- package/dist/components/ui/checkbox/checkbox.js +0 -70
- package/dist/components/ui/checkbox/checkbox.js.map +0 -1
- package/dist/components/ui/chip/chip.js +0 -70
- package/dist/components/ui/chip/chip.js.map +0 -1
- package/dist/components/ui/collapsible/collapsible.js +0 -22
- package/dist/components/ui/collapsible/collapsible.js.map +0 -1
- package/dist/components/ui/combobox/combobox.js +0 -153
- package/dist/components/ui/combobox/combobox.js.map +0 -1
- package/dist/components/ui/data-table/data-table-column-header.js +0 -36
- package/dist/components/ui/data-table/data-table-column-header.js.map +0 -1
- package/dist/components/ui/data-table/data-table-pagination.js +0 -89
- package/dist/components/ui/data-table/data-table-pagination.js.map +0 -1
- package/dist/components/ui/data-table/data-table-toolbar.js +0 -46
- package/dist/components/ui/data-table/data-table-toolbar.js.map +0 -1
- package/dist/components/ui/data-table/data-table-view-options.js +0 -40
- package/dist/components/ui/data-table/data-table-view-options.js.map +0 -1
- package/dist/components/ui/data-table/data-table.js +0 -89
- package/dist/components/ui/data-table/data-table.js.map +0 -1
- package/dist/components/ui/description-list/description-list.js +0 -54
- package/dist/components/ui/description-list/description-list.js.map +0 -1
- package/dist/components/ui/dialog/dialog.js +0 -141
- package/dist/components/ui/dialog/dialog.js.map +0 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +0 -160
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +0 -1
- package/dist/components/ui/empty/empty.js +0 -78
- package/dist/components/ui/empty/empty.js.map +0 -1
- package/dist/components/ui/field/field.js +0 -189
- package/dist/components/ui/field/field.js.map +0 -1
- package/dist/components/ui/filter-search/filter-search.js +0 -28
- package/dist/components/ui/filter-search/filter-search.js.map +0 -1
- package/dist/components/ui/form/form.js +0 -16
- package/dist/components/ui/form/form.js.map +0 -1
- package/dist/components/ui/grid/grid.js +0 -69
- package/dist/components/ui/grid/grid.js.map +0 -1
- package/dist/components/ui/input/input.js +0 -22
- package/dist/components/ui/input/input.js.map +0 -1
- package/dist/components/ui/input-date-picker/input-date-picker.js +0 -104
- package/dist/components/ui/input-date-picker/input-date-picker.js.map +0 -1
- package/dist/components/ui/input-search/input-search.js +0 -56
- package/dist/components/ui/input-search/input-search.js.map +0 -1
- package/dist/components/ui/input-select/input-select.js +0 -269
- package/dist/components/ui/input-select/input-select.js.map +0 -1
- package/dist/components/ui/input-text/input-text.js +0 -87
- package/dist/components/ui/input-text/input-text.js.map +0 -1
- package/dist/components/ui/input-text-area/input-text-area.js +0 -77
- package/dist/components/ui/input-text-area/input-text-area.js.map +0 -1
- package/dist/components/ui/label/label.js +0 -12
- package/dist/components/ui/label/label.js.map +0 -1
- package/dist/components/ui/link/link.js +0 -39
- package/dist/components/ui/link/link.js.map +0 -1
- package/dist/components/ui/number-field/number-field.js +0 -61
- package/dist/components/ui/number-field/number-field.js.map +0 -1
- package/dist/components/ui/page-content/page-content.js +0 -19
- package/dist/components/ui/page-content/page-content.js.map +0 -1
- package/dist/components/ui/page-header/page-header.js +0 -74
- package/dist/components/ui/page-header/page-header.js.map +0 -1
- package/dist/components/ui/pagination/pagination.js +0 -87
- package/dist/components/ui/pagination/pagination.js.map +0 -1
- package/dist/components/ui/popover/popover.js +0 -49
- package/dist/components/ui/popover/popover.js.map +0 -1
- package/dist/components/ui/progress/progress.js +0 -30
- package/dist/components/ui/progress/progress.js.map +0 -1
- package/dist/components/ui/progress-circle/progress-circle.js +0 -115
- package/dist/components/ui/progress-circle/progress-circle.js.map +0 -1
- package/dist/components/ui/radio/radio.js +0 -44
- package/dist/components/ui/radio/radio.js.map +0 -1
- package/dist/components/ui/resizable/resizable.js +0 -44
- package/dist/components/ui/resizable/resizable.js.map +0 -1
- package/dist/components/ui/scroll-area/scroll-area.js +0 -61
- package/dist/components/ui/scroll-area/scroll-area.js.map +0 -1
- package/dist/components/ui/search/search.js +0 -93
- package/dist/components/ui/search/search.js.map +0 -1
- package/dist/components/ui/search-global/search-global.js +0 -60
- package/dist/components/ui/search-global/search-global.js.map +0 -1
- package/dist/components/ui/section/section.js +0 -37
- package/dist/components/ui/section/section.js.map +0 -1
- package/dist/components/ui/separator/separator.js +0 -22
- package/dist/components/ui/separator/separator.js.map +0 -1
- package/dist/components/ui/sheet/sheet-details.js +0 -80
- package/dist/components/ui/sheet/sheet-details.js.map +0 -1
- package/dist/components/ui/sheet/sheet.js +0 -139
- package/dist/components/ui/sheet/sheet.js.map +0 -1
- package/dist/components/ui/sidebar-primary/sidebar-primary.js +0 -318
- package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +0 -1
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +0 -624
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +0 -1
- package/dist/components/ui/skeleton/skeleton.js +0 -22
- package/dist/components/ui/skeleton/skeleton.js.map +0 -1
- package/dist/components/ui/slider/slider.js +0 -42
- package/dist/components/ui/slider/slider.js.map +0 -1
- package/dist/components/ui/spinner/spinner.js +0 -38
- package/dist/components/ui/spinner/spinner.js.map +0 -1
- package/dist/components/ui/stack/stack.js +0 -61
- package/dist/components/ui/stack/stack.js.map +0 -1
- package/dist/components/ui/switch/switch.js +0 -41
- package/dist/components/ui/switch/switch.js.map +0 -1
- package/dist/components/ui/table/table.js +0 -118
- package/dist/components/ui/table/table.js.map +0 -1
- package/dist/components/ui/tabs/tabs.js +0 -44
- package/dist/components/ui/tabs/tabs.js.map +0 -1
- package/dist/components/ui/tag/tag.js +0 -47
- package/dist/components/ui/tag/tag.js.map +0 -1
- package/dist/components/ui/toast/toast.js +0 -85
- package/dist/components/ui/toast/toast.js.map +0 -1
- package/dist/components/ui/toggle-group/toggle-group.js +0 -47
- package/dist/components/ui/toggle-group/toggle-group.js.map +0 -1
- package/dist/components/ui/tooltip/tooltip.js +0 -53
- package/dist/components/ui/tooltip/tooltip.js.map +0 -1
- package/dist/components/ui/widget-placeholder/widget-placeholder.js +0 -106
- package/dist/components/ui/widget-placeholder/widget-placeholder.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -361
- package/dist/index.js.map +0 -1
- package/dist/lib/portal-container.js +0 -14
- package/dist/lib/portal-container.js.map +0 -1
- package/dist/lib/utils.js +0 -9
- package/dist/lib/utils.js.map +0 -1
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js +0 -104
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js +0 -1900
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js.map +0 -1
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +0 -36
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -17
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/.pnpm/react-resizable-panels@4.11.2_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2093
- package/dist/node_modules/.pnpm/react-resizable-panels@4.11.2_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
- package/dist/node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2996
- package/dist/node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
- package/dist/react.d.ts +0 -2
- package/dist/react.js +0 -361
- package/dist/react.js.map +0 -1
- package/dist/src/components/ui/accordion/accordion.d.ts +0 -7
- package/dist/src/components/ui/accordion/index.d.ts +0 -1
- package/dist/src/components/ui/alert/alert.d.ts +0 -14
- package/dist/src/components/ui/alert/index.d.ts +0 -2
- package/dist/src/components/ui/app-shell/app-shell.d.ts +0 -8
- package/dist/src/components/ui/app-shell/index.d.ts +0 -1
- package/dist/src/components/ui/auth-layout/auth-layout.d.ts +0 -6
- package/dist/src/components/ui/auth-layout/index.d.ts +0 -1
- package/dist/src/components/ui/avatar/avatar.d.ts +0 -27
- package/dist/src/components/ui/avatar/index.d.ts +0 -1
- package/dist/src/components/ui/breadcrumb/breadcrumb.d.ts +0 -30
- package/dist/src/components/ui/breadcrumb/index.d.ts +0 -1
- package/dist/src/components/ui/button/button.d.ts +0 -16
- package/dist/src/components/ui/button/index.d.ts +0 -1
- package/dist/src/components/ui/button-icon/button-icon.d.ts +0 -20
- package/dist/src/components/ui/button-icon/index.d.ts +0 -1
- package/dist/src/components/ui/button-menu/button-menu.d.ts +0 -29
- package/dist/src/components/ui/button-menu/index.d.ts +0 -1
- package/dist/src/components/ui/card/card.d.ts +0 -17
- package/dist/src/components/ui/card/index.d.ts +0 -1
- package/dist/src/components/ui/card-filter/card-filter.d.ts +0 -27
- package/dist/src/components/ui/card-filter/index.d.ts +0 -1
- package/dist/src/components/ui/chart/chart.d.ts +0 -55
- package/dist/src/components/ui/chart/index.d.ts +0 -2
- package/dist/src/components/ui/checkbox/checkbox.d.ts +0 -10
- package/dist/src/components/ui/checkbox/index.d.ts +0 -1
- package/dist/src/components/ui/chip/chip.d.ts +0 -20
- package/dist/src/components/ui/chip/index.d.ts +0 -1
- package/dist/src/components/ui/collapsible/collapsible.d.ts +0 -5
- package/dist/src/components/ui/collapsible/index.d.ts +0 -1
- package/dist/src/components/ui/combobox/combobox.d.ts +0 -28
- package/dist/src/components/ui/combobox/index.d.ts +0 -2
- package/dist/src/components/ui/data-table/data-table-column-header.d.ts +0 -8
- package/dist/src/components/ui/data-table/data-table-pagination.d.ts +0 -8
- package/dist/src/components/ui/data-table/data-table-toolbar.d.ts +0 -9
- package/dist/src/components/ui/data-table/data-table-view-options.d.ts +0 -6
- package/dist/src/components/ui/data-table/data-table.d.ts +0 -24
- package/dist/src/components/ui/data-table/data-table.docs.d.ts +0 -22
- package/dist/src/components/ui/data-table/index.d.ts +0 -5
- package/dist/src/components/ui/description-list/description-list.d.ts +0 -8
- package/dist/src/components/ui/description-list/index.d.ts +0 -1
- package/dist/src/components/ui/dialog/dialog.d.ts +0 -39
- package/dist/src/components/ui/dialog/dialog.docs.d.ts +0 -24
- package/dist/src/components/ui/dialog/index.d.ts +0 -1
- package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +0 -39
- package/dist/src/components/ui/dropdown-menu/dropdown-menu.docs.d.ts +0 -25
- package/dist/src/components/ui/dropdown-menu/index.d.ts +0 -1
- package/dist/src/components/ui/empty/empty.d.ts +0 -9
- package/dist/src/components/ui/empty/index.d.ts +0 -1
- package/dist/src/components/ui/field/field.d.ts +0 -39
- package/dist/src/components/ui/field/field.docs.d.ts +0 -27
- package/dist/src/components/ui/field/index.d.ts +0 -2
- package/dist/src/components/ui/filter-search/filter-search.d.ts +0 -6
- package/dist/src/components/ui/filter-search/index.d.ts +0 -2
- package/dist/src/components/ui/form/form.d.ts +0 -6
- package/dist/src/components/ui/form/index.d.ts +0 -1
- package/dist/src/components/ui/grid/grid.d.ts +0 -15
- package/dist/src/components/ui/grid/index.d.ts +0 -1
- package/dist/src/components/ui/input/index.d.ts +0 -1
- package/dist/src/components/ui/input/input.d.ts +0 -4
- package/dist/src/components/ui/input-date-picker/index.d.ts +0 -1
- package/dist/src/components/ui/input-date-picker/input-date-picker.d.ts +0 -27
- package/dist/src/components/ui/input-search/index.d.ts +0 -1
- package/dist/src/components/ui/input-search/input-search.d.ts +0 -10
- package/dist/src/components/ui/input-select/index.d.ts +0 -1
- package/dist/src/components/ui/input-select/input-select.d.ts +0 -46
- package/dist/src/components/ui/input-text/index.d.ts +0 -1
- package/dist/src/components/ui/input-text/input-text.d.ts +0 -20
- package/dist/src/components/ui/input-text-area/index.d.ts +0 -1
- package/dist/src/components/ui/input-text-area/input-text-area.d.ts +0 -16
- package/dist/src/components/ui/label/index.d.ts +0 -1
- package/dist/src/components/ui/label/label.d.ts +0 -5
- package/dist/src/components/ui/label/label.docs.d.ts +0 -10
- package/dist/src/components/ui/link/index.d.ts +0 -1
- package/dist/src/components/ui/link/link.d.ts +0 -15
- package/dist/src/components/ui/number-field/index.d.ts +0 -1
- package/dist/src/components/ui/number-field/number-field.d.ts +0 -7
- package/dist/src/components/ui/page-content/index.d.ts +0 -1
- package/dist/src/components/ui/page-content/page-content.d.ts +0 -4
- package/dist/src/components/ui/page-header/index.d.ts +0 -1
- package/dist/src/components/ui/page-header/page-header.d.ts +0 -8
- package/dist/src/components/ui/pagination/index.d.ts +0 -2
- package/dist/src/components/ui/pagination/pagination.d.ts +0 -25
- package/dist/src/components/ui/popover/index.d.ts +0 -1
- package/dist/src/components/ui/popover/popover.d.ts +0 -27
- package/dist/src/components/ui/popover/popover.docs.d.ts +0 -25
- package/dist/src/components/ui/progress/index.d.ts +0 -1
- package/dist/src/components/ui/progress/progress.d.ts +0 -9
- package/dist/src/components/ui/progress/progress.docs.d.ts +0 -16
- package/dist/src/components/ui/progress-circle/index.d.ts +0 -1
- package/dist/src/components/ui/progress-circle/progress-circle.d.ts +0 -47
- package/dist/src/components/ui/progress-circle/progress-circle.docs.d.ts +0 -21
- package/dist/src/components/ui/radio/index.d.ts +0 -1
- package/dist/src/components/ui/radio/radio.d.ts +0 -8
- package/dist/src/components/ui/resizable/index.d.ts +0 -2
- package/dist/src/components/ui/resizable/resizable.d.ts +0 -6
- package/dist/src/components/ui/scroll-area/index.d.ts +0 -1
- package/dist/src/components/ui/scroll-area/scroll-area.d.ts +0 -10
- package/dist/src/components/ui/search/index.d.ts +0 -1
- package/dist/src/components/ui/search/search.d.ts +0 -7
- package/dist/src/components/ui/search-global/index.d.ts +0 -1
- package/dist/src/components/ui/search-global/search-global.d.ts +0 -7
- package/dist/src/components/ui/section/index.d.ts +0 -1
- package/dist/src/components/ui/section/section.d.ts +0 -7
- package/dist/src/components/ui/select/index.d.ts +0 -1
- package/dist/src/components/ui/select/select.d.ts +0 -1
- package/dist/src/components/ui/separator/index.d.ts +0 -1
- package/dist/src/components/ui/separator/separator.d.ts +0 -3
- package/dist/src/components/ui/sheet/index.d.ts +0 -3
- package/dist/src/components/ui/sheet/sheet-details.d.ts +0 -42
- package/dist/src/components/ui/sheet/sheet.d.ts +0 -36
- package/dist/src/components/ui/sheet/sheet.docs.d.ts +0 -21
- package/dist/src/components/ui/sidebar-primary/index.d.ts +0 -1
- package/dist/src/components/ui/sidebar-primary/sidebar-primary.d.ts +0 -99
- package/dist/src/components/ui/sidebar-secondary/index.d.ts +0 -1
- package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +0 -117
- package/dist/src/components/ui/skeleton/index.d.ts +0 -1
- package/dist/src/components/ui/skeleton/skeleton.d.ts +0 -4
- package/dist/src/components/ui/slider/index.d.ts +0 -1
- package/dist/src/components/ui/slider/slider.d.ts +0 -7
- package/dist/src/components/ui/spinner/index.d.ts +0 -1
- package/dist/src/components/ui/spinner/spinner.d.ts +0 -9
- package/dist/src/components/ui/stack/index.d.ts +0 -1
- package/dist/src/components/ui/stack/stack.d.ts +0 -13
- package/dist/src/components/ui/switch/index.d.ts +0 -1
- package/dist/src/components/ui/switch/switch.d.ts +0 -8
- package/dist/src/components/ui/table/index.d.ts +0 -1
- package/dist/src/components/ui/table/table.d.ts +0 -23
- package/dist/src/components/ui/tabs/index.d.ts +0 -1
- package/dist/src/components/ui/tabs/tabs.d.ts +0 -6
- package/dist/src/components/ui/tabs/tabs.docs.d.ts +0 -25
- package/dist/src/components/ui/tag/index.d.ts +0 -1
- package/dist/src/components/ui/tag/tag.d.ts +0 -12
- package/dist/src/components/ui/toast/index.d.ts +0 -1
- package/dist/src/components/ui/toast/toast.d.ts +0 -48
- package/dist/src/components/ui/toast/toast.docs.d.ts +0 -12
- package/dist/src/components/ui/toggle-group/index.d.ts +0 -1
- package/dist/src/components/ui/toggle-group/toggle-group.d.ts +0 -7
- package/dist/src/components/ui/tooltip/index.d.ts +0 -1
- package/dist/src/components/ui/tooltip/tooltip.d.ts +0 -13
- package/dist/src/components/ui/widget-placeholder/index.d.ts +0 -1
- package/dist/src/components/ui/widget-placeholder/widget-placeholder.d.ts +0 -18
- package/dist/src/components/ui/widget-placeholder/widget-placeholder.docs.d.ts +0 -14
- package/dist/src/index.d.ts +0 -68
- package/dist/src/lib/portal-container.d.ts +0 -36
- package/dist/src/lib/utils.d.ts +0 -2
- package/dist/src/react.d.ts +0 -1
- package/dist/styles.d.ts +0 -1
- package/dist/ui-react.css +0 -1
|
@@ -1,2093 +0,0 @@
|
|
|
1
|
-
var Ee = (e) => {
|
|
2
|
-
throw TypeError(e);
|
|
3
|
-
};
|
|
4
|
-
var De = (e, t, n) => t.has(e) || Ee("Cannot " + n);
|
|
5
|
-
var re = (e, t, n) => (De(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Re = (e, t, n) => t.has(e) ? Ee("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ie = (e, t, n, o) => (De(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n);
|
|
6
|
-
import { jsx as se } from "react/jsx-runtime";
|
|
7
|
-
import { useState as pe, useRef as F, useEffect as ge, useSyncExternalStore as gt, useMemo as vt, useId as mt, useContext as bt, useLayoutEffect as yt, useCallback as Ue, useImperativeHandle as Ze, createContext as zt } from "react";
|
|
8
|
-
function St(e, t) {
|
|
9
|
-
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
10
|
-
return t * o;
|
|
11
|
-
}
|
|
12
|
-
function wt(e, t) {
|
|
13
|
-
const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
|
|
14
|
-
return t * o;
|
|
15
|
-
}
|
|
16
|
-
function xt(e) {
|
|
17
|
-
return e / 100 * window.innerHeight;
|
|
18
|
-
}
|
|
19
|
-
function Ct(e) {
|
|
20
|
-
return e / 100 * window.innerWidth;
|
|
21
|
-
}
|
|
22
|
-
function Pt(e) {
|
|
23
|
-
switch (typeof e) {
|
|
24
|
-
case "number":
|
|
25
|
-
return [e, "px"];
|
|
26
|
-
case "string": {
|
|
27
|
-
const t = parseFloat(e);
|
|
28
|
-
return e.endsWith("%") ? [t, "%"] : e.endsWith("px") ? [t, "px"] : e.endsWith("rem") ? [t, "rem"] : e.endsWith("em") ? [t, "em"] : e.endsWith("vh") ? [t, "vh"] : e.endsWith("vw") ? [t, "vw"] : [t, "%"];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function ae({
|
|
33
|
-
groupSize: e,
|
|
34
|
-
panelElement: t,
|
|
35
|
-
styleProp: n
|
|
36
|
-
}) {
|
|
37
|
-
let o;
|
|
38
|
-
const [r, a] = Pt(n);
|
|
39
|
-
switch (a) {
|
|
40
|
-
case "%": {
|
|
41
|
-
o = r / 100 * e;
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
case "px": {
|
|
45
|
-
o = r;
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
case "rem": {
|
|
49
|
-
o = wt(t, r);
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
case "em": {
|
|
53
|
-
o = St(t, r);
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
case "vh": {
|
|
57
|
-
o = xt(r);
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
case "vw": {
|
|
61
|
-
o = Ct(r);
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return o;
|
|
66
|
-
}
|
|
67
|
-
function I(e) {
|
|
68
|
-
return parseFloat(e.toFixed(3));
|
|
69
|
-
}
|
|
70
|
-
function te({
|
|
71
|
-
group: e
|
|
72
|
-
}) {
|
|
73
|
-
const { orientation: t, panels: n } = e;
|
|
74
|
-
return n.reduce((o, r) => (o += t === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o), 0);
|
|
75
|
-
}
|
|
76
|
-
function be(e) {
|
|
77
|
-
const { panels: t } = e, n = te({ group: e });
|
|
78
|
-
return n === 0 ? t.map((o) => ({
|
|
79
|
-
groupResizeBehavior: o.panelConstraints.groupResizeBehavior,
|
|
80
|
-
collapsedSize: 0,
|
|
81
|
-
collapsible: o.panelConstraints.collapsible === !0,
|
|
82
|
-
defaultSize: void 0,
|
|
83
|
-
disabled: o.panelConstraints.disabled,
|
|
84
|
-
minSize: 0,
|
|
85
|
-
maxSize: 100,
|
|
86
|
-
panelId: o.id
|
|
87
|
-
})) : t.map((o) => {
|
|
88
|
-
const { element: r, panelConstraints: a } = o;
|
|
89
|
-
let u = 0;
|
|
90
|
-
if (a.collapsedSize !== void 0) {
|
|
91
|
-
const c = ae({
|
|
92
|
-
groupSize: n,
|
|
93
|
-
panelElement: r,
|
|
94
|
-
styleProp: a.collapsedSize
|
|
95
|
-
});
|
|
96
|
-
u = I(c / n * 100);
|
|
97
|
-
}
|
|
98
|
-
let s;
|
|
99
|
-
if (a.defaultSize !== void 0) {
|
|
100
|
-
const c = ae({
|
|
101
|
-
groupSize: n,
|
|
102
|
-
panelElement: r,
|
|
103
|
-
styleProp: a.defaultSize
|
|
104
|
-
});
|
|
105
|
-
s = I(c / n * 100);
|
|
106
|
-
}
|
|
107
|
-
let i = 0;
|
|
108
|
-
if (a.minSize !== void 0) {
|
|
109
|
-
const c = ae({
|
|
110
|
-
groupSize: n,
|
|
111
|
-
panelElement: r,
|
|
112
|
-
styleProp: a.minSize
|
|
113
|
-
});
|
|
114
|
-
i = I(c / n * 100);
|
|
115
|
-
}
|
|
116
|
-
let l = 100;
|
|
117
|
-
if (a.maxSize !== void 0) {
|
|
118
|
-
const c = ae({
|
|
119
|
-
groupSize: n,
|
|
120
|
-
panelElement: r,
|
|
121
|
-
styleProp: a.maxSize
|
|
122
|
-
});
|
|
123
|
-
l = I(c / n * 100);
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
groupResizeBehavior: a.groupResizeBehavior,
|
|
127
|
-
collapsedSize: u,
|
|
128
|
-
collapsible: a.collapsible === !0,
|
|
129
|
-
defaultSize: s,
|
|
130
|
-
disabled: a.disabled,
|
|
131
|
-
minSize: i,
|
|
132
|
-
maxSize: l,
|
|
133
|
-
panelId: o.id
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function P(e, t = "Assertion error") {
|
|
138
|
-
if (!e)
|
|
139
|
-
throw Error(t);
|
|
140
|
-
}
|
|
141
|
-
function ye(e, t) {
|
|
142
|
-
return Array.from(t).sort(
|
|
143
|
-
e === "horizontal" ? Lt : kt
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
function Lt(e, t) {
|
|
147
|
-
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
148
|
-
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
149
|
-
}
|
|
150
|
-
function kt(e, t) {
|
|
151
|
-
const n = e.element.offsetTop - t.element.offsetTop;
|
|
152
|
-
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
153
|
-
}
|
|
154
|
-
function Ke(e) {
|
|
155
|
-
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
156
|
-
}
|
|
157
|
-
function Qe(e, t) {
|
|
158
|
-
return {
|
|
159
|
-
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
160
|
-
Math.abs(e.x - t.left),
|
|
161
|
-
Math.abs(e.x - t.right)
|
|
162
|
-
),
|
|
163
|
-
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(
|
|
164
|
-
Math.abs(e.y - t.top),
|
|
165
|
-
Math.abs(e.y - t.bottom)
|
|
166
|
-
)
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
function Mt({
|
|
170
|
-
orientation: e,
|
|
171
|
-
rects: t,
|
|
172
|
-
targetRect: n
|
|
173
|
-
}) {
|
|
174
|
-
const o = {
|
|
175
|
-
x: n.x + n.width / 2,
|
|
176
|
-
y: n.y + n.height / 2
|
|
177
|
-
};
|
|
178
|
-
let r, a = Number.MAX_VALUE;
|
|
179
|
-
for (const u of t) {
|
|
180
|
-
const { x: s, y: i } = Qe(o, u), l = e === "horizontal" ? s : i;
|
|
181
|
-
l < a && (a = l, r = u);
|
|
182
|
-
}
|
|
183
|
-
return P(r, "No rect found"), r;
|
|
184
|
-
}
|
|
185
|
-
let de;
|
|
186
|
-
function Et() {
|
|
187
|
-
return de === void 0 && (typeof matchMedia == "function" ? de = !!matchMedia("(pointer:coarse)").matches : de = !1), de;
|
|
188
|
-
}
|
|
189
|
-
function _e(e) {
|
|
190
|
-
const { element: t, orientation: n, panels: o, separators: r } = e, a = ye(
|
|
191
|
-
n,
|
|
192
|
-
Array.from(t.children).filter(Ke).map((m) => ({ element: m }))
|
|
193
|
-
).map(({ element: m }) => m), u = [];
|
|
194
|
-
let s = !1, i = !1, l = -1, c = -1, h = 0, f, S = [];
|
|
195
|
-
{
|
|
196
|
-
let m = -1;
|
|
197
|
-
for (const d of a)
|
|
198
|
-
d.hasAttribute("data-panel") && (m++, d.hasAttribute("data-disabled") || (h++, l === -1 && (l = m), c = m));
|
|
199
|
-
}
|
|
200
|
-
if (h > 1) {
|
|
201
|
-
let m = -1;
|
|
202
|
-
for (const d of a)
|
|
203
|
-
if (d.hasAttribute("data-panel")) {
|
|
204
|
-
m++;
|
|
205
|
-
const g = o.find(
|
|
206
|
-
(p) => p.element === d
|
|
207
|
-
);
|
|
208
|
-
if (g) {
|
|
209
|
-
if (f) {
|
|
210
|
-
const p = f.element.getBoundingClientRect(), b = d.getBoundingClientRect();
|
|
211
|
-
let z;
|
|
212
|
-
if (i) {
|
|
213
|
-
const y = n === "horizontal" ? new DOMRect(
|
|
214
|
-
p.right,
|
|
215
|
-
p.top,
|
|
216
|
-
0,
|
|
217
|
-
p.height
|
|
218
|
-
) : new DOMRect(
|
|
219
|
-
p.left,
|
|
220
|
-
p.bottom,
|
|
221
|
-
p.width,
|
|
222
|
-
0
|
|
223
|
-
), v = n === "horizontal" ? new DOMRect(b.left, b.top, 0, b.height) : new DOMRect(b.left, b.top, b.width, 0);
|
|
224
|
-
switch (S.length) {
|
|
225
|
-
case 0: {
|
|
226
|
-
z = [
|
|
227
|
-
y,
|
|
228
|
-
v
|
|
229
|
-
];
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
case 1: {
|
|
233
|
-
const L = S[0], k = Mt({
|
|
234
|
-
orientation: n,
|
|
235
|
-
rects: [p, b],
|
|
236
|
-
targetRect: L.element.getBoundingClientRect()
|
|
237
|
-
});
|
|
238
|
-
z = [
|
|
239
|
-
L,
|
|
240
|
-
k === p ? v : y
|
|
241
|
-
];
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
|
-
default: {
|
|
245
|
-
z = S;
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
} else
|
|
250
|
-
S.length ? z = S : z = [
|
|
251
|
-
n === "horizontal" ? new DOMRect(
|
|
252
|
-
p.right,
|
|
253
|
-
b.top,
|
|
254
|
-
b.left - p.right,
|
|
255
|
-
b.height
|
|
256
|
-
) : new DOMRect(
|
|
257
|
-
b.left,
|
|
258
|
-
p.bottom,
|
|
259
|
-
b.width,
|
|
260
|
-
b.top - p.bottom
|
|
261
|
-
)
|
|
262
|
-
];
|
|
263
|
-
for (const y of z) {
|
|
264
|
-
let v = "width" in y ? y : y.element.getBoundingClientRect();
|
|
265
|
-
const L = Et() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
266
|
-
if (v.width < L) {
|
|
267
|
-
const E = L - v.width;
|
|
268
|
-
v = new DOMRect(
|
|
269
|
-
v.x - E / 2,
|
|
270
|
-
v.y,
|
|
271
|
-
v.width + E,
|
|
272
|
-
v.height
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
if (v.height < L) {
|
|
276
|
-
const E = L - v.height;
|
|
277
|
-
v = new DOMRect(
|
|
278
|
-
v.x,
|
|
279
|
-
v.y - E / 2,
|
|
280
|
-
v.width,
|
|
281
|
-
v.height + E
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
const k = m <= l || m > c;
|
|
285
|
-
!s && !k && u.push({
|
|
286
|
-
group: e,
|
|
287
|
-
groupSize: te({ group: e }),
|
|
288
|
-
panels: [f, g],
|
|
289
|
-
separator: "width" in y ? void 0 : y,
|
|
290
|
-
rect: v
|
|
291
|
-
}), s = !1;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
i = !1, f = g, S = [];
|
|
295
|
-
}
|
|
296
|
-
} else if (d.hasAttribute("data-separator")) {
|
|
297
|
-
d.ariaDisabled !== null && (s = !0);
|
|
298
|
-
const g = r.find(
|
|
299
|
-
(p) => p.element === d
|
|
300
|
-
);
|
|
301
|
-
g ? S.push(g) : (f = void 0, S = []);
|
|
302
|
-
} else
|
|
303
|
-
i = !0;
|
|
304
|
-
}
|
|
305
|
-
return u;
|
|
306
|
-
}
|
|
307
|
-
var W;
|
|
308
|
-
class et {
|
|
309
|
-
constructor() {
|
|
310
|
-
Re(this, W, {});
|
|
311
|
-
}
|
|
312
|
-
addListener(t, n) {
|
|
313
|
-
const o = re(this, W)[t];
|
|
314
|
-
return o === void 0 ? re(this, W)[t] = [n] : o.includes(n) || o.push(n), () => {
|
|
315
|
-
this.removeListener(t, n);
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
emit(t, n) {
|
|
319
|
-
const o = re(this, W)[t];
|
|
320
|
-
if (o !== void 0)
|
|
321
|
-
if (o.length === 1)
|
|
322
|
-
o[0].call(null, n);
|
|
323
|
-
else {
|
|
324
|
-
let r = !1, a = null;
|
|
325
|
-
const u = Array.from(o);
|
|
326
|
-
for (let s = 0; s < u.length; s++) {
|
|
327
|
-
const i = u[s];
|
|
328
|
-
try {
|
|
329
|
-
i.call(null, n);
|
|
330
|
-
} catch (l) {
|
|
331
|
-
a === null && (r = !0, a = l);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
if (r)
|
|
335
|
-
throw a;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
removeAllListeners() {
|
|
339
|
-
Ie(this, W, {});
|
|
340
|
-
}
|
|
341
|
-
removeListener(t, n) {
|
|
342
|
-
const o = re(this, W)[t];
|
|
343
|
-
if (o !== void 0) {
|
|
344
|
-
const r = o.indexOf(n);
|
|
345
|
-
r >= 0 && o.splice(r, 1);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
W = new WeakMap();
|
|
350
|
-
let A = /* @__PURE__ */ new Map();
|
|
351
|
-
const tt = new et();
|
|
352
|
-
function Dt(e) {
|
|
353
|
-
A = new Map(A), A.delete(e);
|
|
354
|
-
}
|
|
355
|
-
function Te(e, t) {
|
|
356
|
-
for (const [n] of A)
|
|
357
|
-
if (n.id === e)
|
|
358
|
-
return n;
|
|
359
|
-
}
|
|
360
|
-
function V(e, t) {
|
|
361
|
-
for (const [n, o] of A)
|
|
362
|
-
if (n.id === e)
|
|
363
|
-
return o;
|
|
364
|
-
if (t)
|
|
365
|
-
throw Error(`Could not find data for Group with id ${e}`);
|
|
366
|
-
}
|
|
367
|
-
function J() {
|
|
368
|
-
return A;
|
|
369
|
-
}
|
|
370
|
-
function ze(e, t) {
|
|
371
|
-
return tt.addListener("groupChange", (n) => {
|
|
372
|
-
n.group.id === e && t(n);
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
function j(e, t) {
|
|
376
|
-
const n = A.get(e);
|
|
377
|
-
A = new Map(A), A.set(e, t), tt.emit("groupChange", {
|
|
378
|
-
group: e,
|
|
379
|
-
prev: n,
|
|
380
|
-
next: t
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
function Rt(e, t, n) {
|
|
384
|
-
let o, r = {
|
|
385
|
-
x: 1 / 0,
|
|
386
|
-
y: 1 / 0
|
|
387
|
-
};
|
|
388
|
-
for (const a of t) {
|
|
389
|
-
const u = Qe(n, a.rect);
|
|
390
|
-
switch (e) {
|
|
391
|
-
case "horizontal": {
|
|
392
|
-
u.x <= r.x && (o = a, r = u);
|
|
393
|
-
break;
|
|
394
|
-
}
|
|
395
|
-
case "vertical": {
|
|
396
|
-
u.y <= r.y && (o = a, r = u);
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
return o ? {
|
|
402
|
-
distance: r,
|
|
403
|
-
hitRegion: o
|
|
404
|
-
} : void 0;
|
|
405
|
-
}
|
|
406
|
-
function It(e) {
|
|
407
|
-
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
408
|
-
}
|
|
409
|
-
function Tt(e, t) {
|
|
410
|
-
if (e === t) throw new Error("Cannot compare node with itself");
|
|
411
|
-
const n = {
|
|
412
|
-
a: Fe(e),
|
|
413
|
-
b: Fe(t)
|
|
414
|
-
};
|
|
415
|
-
let o;
|
|
416
|
-
for (; n.a.at(-1) === n.b.at(-1); )
|
|
417
|
-
o = n.a.pop(), n.b.pop();
|
|
418
|
-
P(
|
|
419
|
-
o,
|
|
420
|
-
"Stacking order can only be calculated for elements with a common ancestor"
|
|
421
|
-
);
|
|
422
|
-
const r = {
|
|
423
|
-
a: Ne(Oe(n.a)),
|
|
424
|
-
b: Ne(Oe(n.b))
|
|
425
|
-
};
|
|
426
|
-
if (r.a === r.b) {
|
|
427
|
-
const a = o.childNodes, u = {
|
|
428
|
-
a: n.a.at(-1),
|
|
429
|
-
b: n.b.at(-1)
|
|
430
|
-
};
|
|
431
|
-
let s = a.length;
|
|
432
|
-
for (; s--; ) {
|
|
433
|
-
const i = a[s];
|
|
434
|
-
if (i === u.a) return 1;
|
|
435
|
-
if (i === u.b) return -1;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
return Math.sign(r.a - r.b);
|
|
439
|
-
}
|
|
440
|
-
const Ot = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
441
|
-
function Nt(e) {
|
|
442
|
-
const t = getComputedStyle(nt(e) ?? e).display;
|
|
443
|
-
return t === "flex" || t === "inline-flex";
|
|
444
|
-
}
|
|
445
|
-
function Ft(e) {
|
|
446
|
-
const t = getComputedStyle(e);
|
|
447
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Nt(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || Ot.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
448
|
-
}
|
|
449
|
-
function Oe(e) {
|
|
450
|
-
let t = e.length;
|
|
451
|
-
for (; t--; ) {
|
|
452
|
-
const n = e[t];
|
|
453
|
-
if (P(n, "Missing node"), Ft(n)) return n;
|
|
454
|
-
}
|
|
455
|
-
return null;
|
|
456
|
-
}
|
|
457
|
-
function Ne(e) {
|
|
458
|
-
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
459
|
-
}
|
|
460
|
-
function Fe(e) {
|
|
461
|
-
const t = [];
|
|
462
|
-
for (; e; )
|
|
463
|
-
t.push(e), e = nt(e);
|
|
464
|
-
return t;
|
|
465
|
-
}
|
|
466
|
-
function nt(e) {
|
|
467
|
-
const { parentNode: t } = e;
|
|
468
|
-
return It(t) ? t.host : t;
|
|
469
|
-
}
|
|
470
|
-
function At(e, t) {
|
|
471
|
-
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
472
|
-
}
|
|
473
|
-
function $t({
|
|
474
|
-
groupElement: e,
|
|
475
|
-
hitRegion: t,
|
|
476
|
-
pointerEventTarget: n
|
|
477
|
-
}) {
|
|
478
|
-
if (!Ke(n) || n.contains(e) || e.contains(n))
|
|
479
|
-
return !0;
|
|
480
|
-
if (Tt(n, e) > 0) {
|
|
481
|
-
let o = n;
|
|
482
|
-
for (; o; ) {
|
|
483
|
-
if (o.contains(e))
|
|
484
|
-
return !0;
|
|
485
|
-
if (At(o.getBoundingClientRect(), t))
|
|
486
|
-
return !1;
|
|
487
|
-
o = o.parentElement;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
return !0;
|
|
491
|
-
}
|
|
492
|
-
function Se(e, t) {
|
|
493
|
-
const n = [];
|
|
494
|
-
return t.forEach((o, r) => {
|
|
495
|
-
if (r.disabled)
|
|
496
|
-
return;
|
|
497
|
-
const a = _e(r), u = Rt(r.orientation, a, {
|
|
498
|
-
x: e.clientX,
|
|
499
|
-
y: e.clientY
|
|
500
|
-
});
|
|
501
|
-
u && u.distance.x <= 0 && u.distance.y <= 0 && $t({
|
|
502
|
-
groupElement: r.element,
|
|
503
|
-
hitRegion: u.hitRegion.rect,
|
|
504
|
-
pointerEventTarget: e.target
|
|
505
|
-
}) && n.push(u.hitRegion);
|
|
506
|
-
}), n;
|
|
507
|
-
}
|
|
508
|
-
function Gt(e, t) {
|
|
509
|
-
if (e.length !== t.length)
|
|
510
|
-
return !1;
|
|
511
|
-
for (let n = 0; n < e.length; n++)
|
|
512
|
-
if (e[n] != t[n])
|
|
513
|
-
return !1;
|
|
514
|
-
return !0;
|
|
515
|
-
}
|
|
516
|
-
function R(e, t, n = 0) {
|
|
517
|
-
return Math.abs(I(e) - I(t)) <= n;
|
|
518
|
-
}
|
|
519
|
-
function N(e, t) {
|
|
520
|
-
return R(e, t) ? 0 : e > t ? 1 : -1;
|
|
521
|
-
}
|
|
522
|
-
function Q({
|
|
523
|
-
overrideDisabledPanels: e,
|
|
524
|
-
panelConstraints: t,
|
|
525
|
-
prevSize: n,
|
|
526
|
-
size: o
|
|
527
|
-
}) {
|
|
528
|
-
const {
|
|
529
|
-
collapsedSize: r = 0,
|
|
530
|
-
collapsible: a,
|
|
531
|
-
disabled: u,
|
|
532
|
-
maxSize: s = 100,
|
|
533
|
-
minSize: i = 0
|
|
534
|
-
} = t;
|
|
535
|
-
if (u && !e)
|
|
536
|
-
return n;
|
|
537
|
-
if (N(o, i) < 0)
|
|
538
|
-
if (a) {
|
|
539
|
-
const l = (r + i) / 2;
|
|
540
|
-
N(o, l) < 0 ? o = r : o = i;
|
|
541
|
-
} else
|
|
542
|
-
o = i;
|
|
543
|
-
return o = Math.min(s, o), o = I(o), o;
|
|
544
|
-
}
|
|
545
|
-
function le({
|
|
546
|
-
delta: e,
|
|
547
|
-
initialLayout: t,
|
|
548
|
-
panelConstraints: n,
|
|
549
|
-
pivotIndices: o,
|
|
550
|
-
prevLayout: r,
|
|
551
|
-
trigger: a
|
|
552
|
-
}) {
|
|
553
|
-
if (R(e, 0))
|
|
554
|
-
return t;
|
|
555
|
-
const u = a === "imperative-api", s = Object.values(t), i = Object.values(r), l = [...s], [c, h] = o;
|
|
556
|
-
P(c != null, "Invalid first pivot index"), P(h != null, "Invalid second pivot index");
|
|
557
|
-
let f = 0;
|
|
558
|
-
switch (a) {
|
|
559
|
-
case "keyboard": {
|
|
560
|
-
{
|
|
561
|
-
const d = e < 0 ? h : c, g = n[d];
|
|
562
|
-
P(
|
|
563
|
-
g,
|
|
564
|
-
`Panel constraints not found for index ${d}`
|
|
565
|
-
);
|
|
566
|
-
const {
|
|
567
|
-
collapsedSize: p = 0,
|
|
568
|
-
collapsible: b,
|
|
569
|
-
minSize: z = 0
|
|
570
|
-
} = g;
|
|
571
|
-
if (b) {
|
|
572
|
-
const y = s[d];
|
|
573
|
-
if (P(
|
|
574
|
-
y != null,
|
|
575
|
-
`Previous layout not found for panel index ${d}`
|
|
576
|
-
), R(y, p)) {
|
|
577
|
-
const v = z - y;
|
|
578
|
-
N(v, Math.abs(e)) > 0 && (e = e < 0 ? 0 - v : v);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
{
|
|
583
|
-
const d = e < 0 ? c : h, g = n[d];
|
|
584
|
-
P(
|
|
585
|
-
g,
|
|
586
|
-
`No panel constraints found for index ${d}`
|
|
587
|
-
);
|
|
588
|
-
const {
|
|
589
|
-
collapsedSize: p = 0,
|
|
590
|
-
collapsible: b,
|
|
591
|
-
minSize: z = 0
|
|
592
|
-
} = g;
|
|
593
|
-
if (b) {
|
|
594
|
-
const y = s[d];
|
|
595
|
-
if (P(
|
|
596
|
-
y != null,
|
|
597
|
-
`Previous layout not found for panel index ${d}`
|
|
598
|
-
), R(y, z)) {
|
|
599
|
-
const v = y - p;
|
|
600
|
-
N(v, Math.abs(e)) > 0 && (e = e < 0 ? 0 - v : v);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
break;
|
|
605
|
-
}
|
|
606
|
-
default: {
|
|
607
|
-
const d = e < 0 ? h : c, g = n[d];
|
|
608
|
-
P(
|
|
609
|
-
g,
|
|
610
|
-
`Panel constraints not found for index ${d}`
|
|
611
|
-
);
|
|
612
|
-
const p = s[d], { collapsible: b, collapsedSize: z, minSize: y } = g;
|
|
613
|
-
if (b && N(p, y) < 0)
|
|
614
|
-
if (e > 0) {
|
|
615
|
-
const v = y - z, L = v / 2, k = p + e;
|
|
616
|
-
N(k, y) < 0 && (e = N(e, L) <= 0 ? 0 : v);
|
|
617
|
-
} else {
|
|
618
|
-
const v = y - z, L = 100 - v / 2, k = p - e;
|
|
619
|
-
N(k, y) < 0 && (e = N(100 + e, L) > 0 ? 0 : -v);
|
|
620
|
-
}
|
|
621
|
-
break;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
{
|
|
625
|
-
const d = e < 0 ? 1 : -1;
|
|
626
|
-
let g = e < 0 ? h : c, p = 0;
|
|
627
|
-
for (; ; ) {
|
|
628
|
-
const z = s[g];
|
|
629
|
-
P(
|
|
630
|
-
z != null,
|
|
631
|
-
`Previous layout not found for panel index ${g}`
|
|
632
|
-
);
|
|
633
|
-
const y = Q({
|
|
634
|
-
overrideDisabledPanels: u,
|
|
635
|
-
panelConstraints: n[g],
|
|
636
|
-
prevSize: z,
|
|
637
|
-
size: 100
|
|
638
|
-
}) - z;
|
|
639
|
-
if (p += y, g += d, g < 0 || g >= n.length)
|
|
640
|
-
break;
|
|
641
|
-
}
|
|
642
|
-
const b = Math.min(Math.abs(e), Math.abs(p));
|
|
643
|
-
e = e < 0 ? 0 - b : b;
|
|
644
|
-
}
|
|
645
|
-
{
|
|
646
|
-
let d = e < 0 ? c : h;
|
|
647
|
-
for (; d >= 0 && d < n.length; ) {
|
|
648
|
-
const g = Math.abs(e) - Math.abs(f), p = s[d];
|
|
649
|
-
P(
|
|
650
|
-
p != null,
|
|
651
|
-
`Previous layout not found for panel index ${d}`
|
|
652
|
-
);
|
|
653
|
-
const b = p - g, z = Q({
|
|
654
|
-
overrideDisabledPanels: u,
|
|
655
|
-
panelConstraints: n[d],
|
|
656
|
-
prevSize: p,
|
|
657
|
-
size: b
|
|
658
|
-
});
|
|
659
|
-
if (!R(p, z) && (f += p - z, l[d] = z, f.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
660
|
-
numeric: !0
|
|
661
|
-
}) >= 0))
|
|
662
|
-
break;
|
|
663
|
-
e < 0 ? d-- : d++;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
if (Gt(i, l))
|
|
667
|
-
return r;
|
|
668
|
-
{
|
|
669
|
-
const d = e < 0 ? h : c, g = s[d];
|
|
670
|
-
P(
|
|
671
|
-
g != null,
|
|
672
|
-
`Previous layout not found for panel index ${d}`
|
|
673
|
-
);
|
|
674
|
-
const p = g + f, b = Q({
|
|
675
|
-
overrideDisabledPanels: u,
|
|
676
|
-
panelConstraints: n[d],
|
|
677
|
-
prevSize: g,
|
|
678
|
-
size: p
|
|
679
|
-
});
|
|
680
|
-
if (l[d] = b, !R(b, p)) {
|
|
681
|
-
let z = p - b, y = e < 0 ? h : c;
|
|
682
|
-
for (; y >= 0 && y < n.length; ) {
|
|
683
|
-
const v = l[y];
|
|
684
|
-
P(
|
|
685
|
-
v != null,
|
|
686
|
-
`Previous layout not found for panel index ${y}`
|
|
687
|
-
);
|
|
688
|
-
const L = v + z, k = Q({
|
|
689
|
-
overrideDisabledPanels: u,
|
|
690
|
-
panelConstraints: n[y],
|
|
691
|
-
prevSize: v,
|
|
692
|
-
size: L
|
|
693
|
-
});
|
|
694
|
-
if (R(v, k) || (z -= k - v, l[y] = k), R(z, 0))
|
|
695
|
-
break;
|
|
696
|
-
e > 0 ? y-- : y++;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
const S = Object.values(l).reduce(
|
|
701
|
-
(d, g) => g + d,
|
|
702
|
-
0
|
|
703
|
-
);
|
|
704
|
-
if (!R(S, 100, 0.1))
|
|
705
|
-
return r;
|
|
706
|
-
const m = Object.keys(r);
|
|
707
|
-
return l.reduce((d, g, p) => (d[m[p]] = g, d), {});
|
|
708
|
-
}
|
|
709
|
-
function Y(e, t) {
|
|
710
|
-
if (Object.keys(e).length !== Object.keys(t).length)
|
|
711
|
-
return !1;
|
|
712
|
-
for (const n in e)
|
|
713
|
-
if (t[n] === void 0 || N(e[n], t[n]) !== 0)
|
|
714
|
-
return !1;
|
|
715
|
-
return !0;
|
|
716
|
-
}
|
|
717
|
-
function X({
|
|
718
|
-
layout: e,
|
|
719
|
-
panelConstraints: t
|
|
720
|
-
}) {
|
|
721
|
-
const n = Object.values(e), o = [...n], r = o.reduce(
|
|
722
|
-
(s, i) => s + i,
|
|
723
|
-
0
|
|
724
|
-
);
|
|
725
|
-
if (o.length !== t.length)
|
|
726
|
-
throw Error(
|
|
727
|
-
`Invalid ${t.length} panel layout: ${o.map((s) => `${s}%`).join(", ")}`
|
|
728
|
-
);
|
|
729
|
-
if (!R(r, 100) && o.length > 0)
|
|
730
|
-
for (let s = 0; s < t.length; s++) {
|
|
731
|
-
const i = o[s];
|
|
732
|
-
P(i != null, `No layout data found for index ${s}`);
|
|
733
|
-
const l = 100 / r * i;
|
|
734
|
-
o[s] = l;
|
|
735
|
-
}
|
|
736
|
-
let a = 0;
|
|
737
|
-
for (let s = 0; s < t.length; s++) {
|
|
738
|
-
const i = n[s];
|
|
739
|
-
P(i != null, `No layout data found for index ${s}`);
|
|
740
|
-
const l = o[s];
|
|
741
|
-
P(l != null, `No layout data found for index ${s}`);
|
|
742
|
-
const c = Q({
|
|
743
|
-
overrideDisabledPanels: !0,
|
|
744
|
-
panelConstraints: t[s],
|
|
745
|
-
prevSize: i,
|
|
746
|
-
size: l
|
|
747
|
-
});
|
|
748
|
-
l != c && (a += l - c, o[s] = c);
|
|
749
|
-
}
|
|
750
|
-
if (!R(a, 0))
|
|
751
|
-
for (let s = 0; s < t.length; s++) {
|
|
752
|
-
const i = o[s];
|
|
753
|
-
P(i != null, `No layout data found for index ${s}`);
|
|
754
|
-
const l = i + a, c = Q({
|
|
755
|
-
overrideDisabledPanels: !0,
|
|
756
|
-
panelConstraints: t[s],
|
|
757
|
-
prevSize: i,
|
|
758
|
-
size: l
|
|
759
|
-
});
|
|
760
|
-
if (i !== c && (a -= c - i, o[s] = c, R(a, 0)))
|
|
761
|
-
break;
|
|
762
|
-
}
|
|
763
|
-
const u = Object.keys(e);
|
|
764
|
-
return o.reduce((s, i, l) => (s[u[l]] = i, s), {});
|
|
765
|
-
}
|
|
766
|
-
function ot({
|
|
767
|
-
groupId: e,
|
|
768
|
-
panelId: t
|
|
769
|
-
}) {
|
|
770
|
-
const n = () => {
|
|
771
|
-
const i = J();
|
|
772
|
-
for (const [
|
|
773
|
-
l,
|
|
774
|
-
{
|
|
775
|
-
defaultLayoutDeferred: c,
|
|
776
|
-
derivedPanelConstraints: h,
|
|
777
|
-
layout: f,
|
|
778
|
-
groupSize: S,
|
|
779
|
-
separatorToPanels: m
|
|
780
|
-
}
|
|
781
|
-
] of i)
|
|
782
|
-
if (l.id === e)
|
|
783
|
-
return {
|
|
784
|
-
defaultLayoutDeferred: c,
|
|
785
|
-
derivedPanelConstraints: h,
|
|
786
|
-
group: l,
|
|
787
|
-
groupSize: S,
|
|
788
|
-
layout: f,
|
|
789
|
-
separatorToPanels: m
|
|
790
|
-
};
|
|
791
|
-
throw Error(`Group ${e} not found`);
|
|
792
|
-
}, o = () => {
|
|
793
|
-
const i = n().derivedPanelConstraints.find(
|
|
794
|
-
(l) => l.panelId === t
|
|
795
|
-
);
|
|
796
|
-
if (i !== void 0)
|
|
797
|
-
return i;
|
|
798
|
-
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
799
|
-
}, r = () => {
|
|
800
|
-
const i = n().group.panels.find((l) => l.id === t);
|
|
801
|
-
if (i !== void 0)
|
|
802
|
-
return i;
|
|
803
|
-
throw Error(`Layout not found for Panel ${t}`);
|
|
804
|
-
}, a = () => {
|
|
805
|
-
const i = n().layout[t];
|
|
806
|
-
if (i !== void 0)
|
|
807
|
-
return i;
|
|
808
|
-
throw Error(`Layout not found for Panel ${t}`);
|
|
809
|
-
}, u = ({
|
|
810
|
-
nextSize: i,
|
|
811
|
-
panels: l,
|
|
812
|
-
prevLayout: c,
|
|
813
|
-
derivedPanelConstraints: h
|
|
814
|
-
}) => {
|
|
815
|
-
const f = a(), S = l.findIndex((g) => g.id === t), m = S === 0, d = S === l.length - 1;
|
|
816
|
-
if (d && i < f && (m || l.slice(0, S).every((g, p) => {
|
|
817
|
-
const b = h[p];
|
|
818
|
-
return (b == null ? void 0 : b.collapsible) && R(b.collapsedSize, c[b.panelId]);
|
|
819
|
-
}))) {
|
|
820
|
-
const g = l.slice(0, S).reduce((p, b) => p + c[b.id], 0);
|
|
821
|
-
return {
|
|
822
|
-
...c,
|
|
823
|
-
[t]: I(100 - g)
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
return le({
|
|
827
|
-
delta: d ? f - i : i - f,
|
|
828
|
-
initialLayout: c,
|
|
829
|
-
panelConstraints: h,
|
|
830
|
-
pivotIndices: d ? [S - 1, S] : [S, S + 1],
|
|
831
|
-
prevLayout: c,
|
|
832
|
-
trigger: "imperative-api"
|
|
833
|
-
});
|
|
834
|
-
}, s = (i) => {
|
|
835
|
-
const l = a();
|
|
836
|
-
if (i === l)
|
|
837
|
-
return;
|
|
838
|
-
const {
|
|
839
|
-
defaultLayoutDeferred: c,
|
|
840
|
-
derivedPanelConstraints: h,
|
|
841
|
-
group: f,
|
|
842
|
-
groupSize: S,
|
|
843
|
-
layout: m,
|
|
844
|
-
separatorToPanels: d
|
|
845
|
-
} = n(), g = u({
|
|
846
|
-
nextSize: i,
|
|
847
|
-
panels: f.panels,
|
|
848
|
-
prevLayout: m,
|
|
849
|
-
derivedPanelConstraints: h
|
|
850
|
-
}), p = X({
|
|
851
|
-
layout: g,
|
|
852
|
-
panelConstraints: h
|
|
853
|
-
});
|
|
854
|
-
Y(m, p) || j(f, {
|
|
855
|
-
defaultLayoutDeferred: c,
|
|
856
|
-
derivedPanelConstraints: h,
|
|
857
|
-
groupSize: S,
|
|
858
|
-
layout: p,
|
|
859
|
-
separatorToPanels: d
|
|
860
|
-
});
|
|
861
|
-
};
|
|
862
|
-
return {
|
|
863
|
-
collapse: () => {
|
|
864
|
-
const { collapsible: i, collapsedSize: l } = o(), { mutableValues: c } = r(), h = a();
|
|
865
|
-
i && h !== l && (c.expandToSize = h, s(l));
|
|
866
|
-
},
|
|
867
|
-
expand: () => {
|
|
868
|
-
const { collapsible: i, collapsedSize: l, minSize: c } = o(), { mutableValues: h } = r(), f = a();
|
|
869
|
-
if (i && f === l) {
|
|
870
|
-
let S = h.expandToSize ?? c;
|
|
871
|
-
S === 0 && (S = 1), s(S);
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
getSize: () => {
|
|
875
|
-
const { group: i } = n(), l = a(), { element: c } = r(), h = i.orientation === "horizontal" ? c.offsetWidth : c.offsetHeight;
|
|
876
|
-
return {
|
|
877
|
-
asPercentage: l,
|
|
878
|
-
inPixels: h
|
|
879
|
-
};
|
|
880
|
-
},
|
|
881
|
-
isCollapsed: () => {
|
|
882
|
-
const { collapsible: i, collapsedSize: l } = o(), c = a();
|
|
883
|
-
return i && R(l, c);
|
|
884
|
-
},
|
|
885
|
-
resize: (i) => {
|
|
886
|
-
const { group: l } = n(), { element: c } = r(), h = te({ group: l }), f = ae({
|
|
887
|
-
groupSize: h,
|
|
888
|
-
panelElement: c,
|
|
889
|
-
styleProp: i
|
|
890
|
-
}), S = I(f / h * 100);
|
|
891
|
-
s(S);
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
function Ae(e) {
|
|
896
|
-
if (e.defaultPrevented)
|
|
897
|
-
return;
|
|
898
|
-
const t = J();
|
|
899
|
-
Se(e, t).forEach((n) => {
|
|
900
|
-
if (n.separator && !n.separator.disableDoubleClick) {
|
|
901
|
-
const o = n.panels.find(
|
|
902
|
-
(r) => r.panelConstraints.defaultSize !== void 0
|
|
903
|
-
);
|
|
904
|
-
if (o) {
|
|
905
|
-
const r = o.panelConstraints.defaultSize, a = ot({
|
|
906
|
-
groupId: n.group.id,
|
|
907
|
-
panelId: o.id
|
|
908
|
-
});
|
|
909
|
-
a && r !== void 0 && (a.resize(r), e.preventDefault());
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
function he(e) {
|
|
915
|
-
const t = J();
|
|
916
|
-
for (const [n] of t)
|
|
917
|
-
if (n.separators.some(
|
|
918
|
-
(o) => o.element === e
|
|
919
|
-
))
|
|
920
|
-
return n;
|
|
921
|
-
throw Error("Could not find parent Group for separator element");
|
|
922
|
-
}
|
|
923
|
-
function rt({
|
|
924
|
-
groupId: e
|
|
925
|
-
}) {
|
|
926
|
-
const t = () => {
|
|
927
|
-
const n = J();
|
|
928
|
-
for (const [o, r] of n)
|
|
929
|
-
if (o.id === e)
|
|
930
|
-
return { group: o, ...r };
|
|
931
|
-
throw Error(`Could not find Group with id "${e}"`);
|
|
932
|
-
};
|
|
933
|
-
return {
|
|
934
|
-
getLayout() {
|
|
935
|
-
const { defaultLayoutDeferred: n, layout: o } = t();
|
|
936
|
-
return n ? {} : o;
|
|
937
|
-
},
|
|
938
|
-
setLayout(n) {
|
|
939
|
-
const {
|
|
940
|
-
defaultLayoutDeferred: o,
|
|
941
|
-
derivedPanelConstraints: r,
|
|
942
|
-
group: a,
|
|
943
|
-
groupSize: u,
|
|
944
|
-
layout: s,
|
|
945
|
-
separatorToPanels: i
|
|
946
|
-
} = t(), l = X({
|
|
947
|
-
layout: n,
|
|
948
|
-
panelConstraints: r
|
|
949
|
-
});
|
|
950
|
-
return o ? s : (Y(s, l) || j(a, {
|
|
951
|
-
defaultLayoutDeferred: o,
|
|
952
|
-
derivedPanelConstraints: r,
|
|
953
|
-
groupSize: u,
|
|
954
|
-
layout: l,
|
|
955
|
-
separatorToPanels: i
|
|
956
|
-
}), l);
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
function H(e, t) {
|
|
961
|
-
const n = he(e), o = V(n.id, !0), r = n.separators.find(
|
|
962
|
-
(c) => c.element === e
|
|
963
|
-
);
|
|
964
|
-
P(r, "Matching separator not found");
|
|
965
|
-
const a = o.separatorToPanels.get(r);
|
|
966
|
-
P(a, "Matching panels not found");
|
|
967
|
-
const u = a.map((c) => n.panels.indexOf(c)), s = rt({ groupId: n.id }).getLayout(), i = le({
|
|
968
|
-
delta: t,
|
|
969
|
-
initialLayout: s,
|
|
970
|
-
panelConstraints: o.derivedPanelConstraints,
|
|
971
|
-
pivotIndices: u,
|
|
972
|
-
prevLayout: s,
|
|
973
|
-
trigger: "keyboard"
|
|
974
|
-
}), l = X({
|
|
975
|
-
layout: i,
|
|
976
|
-
panelConstraints: o.derivedPanelConstraints
|
|
977
|
-
});
|
|
978
|
-
Y(s, l) || j(n, {
|
|
979
|
-
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
980
|
-
derivedPanelConstraints: o.derivedPanelConstraints,
|
|
981
|
-
groupSize: o.groupSize,
|
|
982
|
-
layout: l,
|
|
983
|
-
separatorToPanels: o.separatorToPanels
|
|
984
|
-
});
|
|
985
|
-
}
|
|
986
|
-
function $e(e) {
|
|
987
|
-
if (e.defaultPrevented)
|
|
988
|
-
return;
|
|
989
|
-
const t = e.currentTarget, n = he(t);
|
|
990
|
-
if (!n.disabled)
|
|
991
|
-
switch (e.key) {
|
|
992
|
-
case "ArrowDown": {
|
|
993
|
-
e.preventDefault(), n.orientation === "vertical" && H(t, 5);
|
|
994
|
-
break;
|
|
995
|
-
}
|
|
996
|
-
case "ArrowLeft": {
|
|
997
|
-
e.preventDefault(), n.orientation === "horizontal" && H(t, -5);
|
|
998
|
-
break;
|
|
999
|
-
}
|
|
1000
|
-
case "ArrowRight": {
|
|
1001
|
-
e.preventDefault(), n.orientation === "horizontal" && H(t, 5);
|
|
1002
|
-
break;
|
|
1003
|
-
}
|
|
1004
|
-
case "ArrowUp": {
|
|
1005
|
-
e.preventDefault(), n.orientation === "vertical" && H(t, -5);
|
|
1006
|
-
break;
|
|
1007
|
-
}
|
|
1008
|
-
case "End": {
|
|
1009
|
-
e.preventDefault(), H(t, 100);
|
|
1010
|
-
break;
|
|
1011
|
-
}
|
|
1012
|
-
case "Enter": {
|
|
1013
|
-
e.preventDefault();
|
|
1014
|
-
const o = he(t), r = V(o.id, !0), { derivedPanelConstraints: a, layout: u, separatorToPanels: s } = r, i = o.separators.find(
|
|
1015
|
-
(f) => f.element === t
|
|
1016
|
-
);
|
|
1017
|
-
P(i, "Matching separator not found");
|
|
1018
|
-
const l = s.get(i);
|
|
1019
|
-
P(l, "Matching panels not found");
|
|
1020
|
-
const c = l[0], h = a.find(
|
|
1021
|
-
(f) => f.panelId === c.id
|
|
1022
|
-
);
|
|
1023
|
-
if (P(h, "Panel metadata not found"), h.collapsible) {
|
|
1024
|
-
const f = u[c.id], S = h.collapsedSize === f ? o.mutableState.expandedPanelSizes[c.id] ?? h.minSize : h.collapsedSize;
|
|
1025
|
-
H(t, S - f);
|
|
1026
|
-
}
|
|
1027
|
-
break;
|
|
1028
|
-
}
|
|
1029
|
-
case "F6": {
|
|
1030
|
-
e.preventDefault();
|
|
1031
|
-
const o = he(t).separators.map(
|
|
1032
|
-
(u) => u.element
|
|
1033
|
-
), r = Array.from(o).findIndex(
|
|
1034
|
-
(u) => u === e.currentTarget
|
|
1035
|
-
);
|
|
1036
|
-
P(r !== null, "Index not found");
|
|
1037
|
-
const a = e.shiftKey ? r > 0 ? r - 1 : o.length - 1 : r + 1 < o.length ? r + 1 : 0;
|
|
1038
|
-
o[a].focus({
|
|
1039
|
-
preventScroll: !0
|
|
1040
|
-
});
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
case "Home": {
|
|
1044
|
-
e.preventDefault(), H(t, -100);
|
|
1045
|
-
break;
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
let _ = {
|
|
1050
|
-
cursorFlags: 0,
|
|
1051
|
-
state: "inactive"
|
|
1052
|
-
};
|
|
1053
|
-
const we = new et();
|
|
1054
|
-
function q() {
|
|
1055
|
-
return _;
|
|
1056
|
-
}
|
|
1057
|
-
function jt(e) {
|
|
1058
|
-
return we.addListener("change", e);
|
|
1059
|
-
}
|
|
1060
|
-
function Bt(e) {
|
|
1061
|
-
const t = _, n = { ..._ };
|
|
1062
|
-
n.cursorFlags = e, _ = n, we.emit("change", {
|
|
1063
|
-
prev: t,
|
|
1064
|
-
next: n
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
function ee(e) {
|
|
1068
|
-
const t = _;
|
|
1069
|
-
_ = e, we.emit("change", {
|
|
1070
|
-
prev: t,
|
|
1071
|
-
next: e
|
|
1072
|
-
});
|
|
1073
|
-
}
|
|
1074
|
-
function Ge(e) {
|
|
1075
|
-
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0)
|
|
1076
|
-
return;
|
|
1077
|
-
const t = J(), n = Se(e, t), o = /* @__PURE__ */ new Map();
|
|
1078
|
-
let r = !1;
|
|
1079
|
-
n.forEach((a) => {
|
|
1080
|
-
a.separator && (r || (r = !0, a.separator.element.focus({
|
|
1081
|
-
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
|
|
1082
|
-
focusVisible: !1,
|
|
1083
|
-
preventScroll: !0
|
|
1084
|
-
})));
|
|
1085
|
-
const u = t.get(a.group);
|
|
1086
|
-
u && o.set(a.group, u.layout);
|
|
1087
|
-
}), ee({
|
|
1088
|
-
cursorFlags: 0,
|
|
1089
|
-
hitRegions: n,
|
|
1090
|
-
initialLayoutMap: o,
|
|
1091
|
-
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
1092
|
-
state: "active"
|
|
1093
|
-
}), n.length && e.preventDefault();
|
|
1094
|
-
}
|
|
1095
|
-
const Wt = (e) => e, me = () => {
|
|
1096
|
-
}, at = 1, it = 2, st = 4, lt = 8, je = 3, Be = 12;
|
|
1097
|
-
let fe;
|
|
1098
|
-
function We() {
|
|
1099
|
-
return fe === void 0 && (fe = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (fe = !0)), fe;
|
|
1100
|
-
}
|
|
1101
|
-
function Vt({
|
|
1102
|
-
cursorFlags: e,
|
|
1103
|
-
groups: t,
|
|
1104
|
-
state: n
|
|
1105
|
-
}) {
|
|
1106
|
-
let o = 0, r = 0;
|
|
1107
|
-
switch (n) {
|
|
1108
|
-
case "active":
|
|
1109
|
-
case "hover":
|
|
1110
|
-
t.forEach((a) => {
|
|
1111
|
-
if (!a.mutableState.disableCursor)
|
|
1112
|
-
switch (a.orientation) {
|
|
1113
|
-
case "horizontal": {
|
|
1114
|
-
o++;
|
|
1115
|
-
break;
|
|
1116
|
-
}
|
|
1117
|
-
case "vertical": {
|
|
1118
|
-
r++;
|
|
1119
|
-
break;
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
if (!(o === 0 && r === 0)) {
|
|
1125
|
-
switch (n) {
|
|
1126
|
-
case "active": {
|
|
1127
|
-
if (e && We()) {
|
|
1128
|
-
const a = (e & at) !== 0, u = (e & it) !== 0, s = (e & st) !== 0, i = (e & lt) !== 0;
|
|
1129
|
-
if (a)
|
|
1130
|
-
return s ? "se-resize" : i ? "ne-resize" : "e-resize";
|
|
1131
|
-
if (u)
|
|
1132
|
-
return s ? "sw-resize" : i ? "nw-resize" : "w-resize";
|
|
1133
|
-
if (s)
|
|
1134
|
-
return "s-resize";
|
|
1135
|
-
if (i)
|
|
1136
|
-
return "n-resize";
|
|
1137
|
-
}
|
|
1138
|
-
break;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
return We() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
const Ve = /* @__PURE__ */ new WeakMap();
|
|
1145
|
-
function xe(e) {
|
|
1146
|
-
if (e.defaultView === null || e.defaultView === void 0)
|
|
1147
|
-
return;
|
|
1148
|
-
let { prevStyle: t, styleSheet: n } = Ve.get(e) ?? {};
|
|
1149
|
-
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
1150
|
-
...e.adoptedStyleSheets,
|
|
1151
|
-
n
|
|
1152
|
-
]));
|
|
1153
|
-
const o = q();
|
|
1154
|
-
switch (o.state) {
|
|
1155
|
-
case "active":
|
|
1156
|
-
case "hover": {
|
|
1157
|
-
const r = Vt({
|
|
1158
|
-
cursorFlags: o.cursorFlags,
|
|
1159
|
-
groups: o.hitRegions.map((u) => u.group),
|
|
1160
|
-
state: o.state
|
|
1161
|
-
}), a = `*, *:hover {cursor: ${r} !important; }`;
|
|
1162
|
-
if (t === a)
|
|
1163
|
-
return;
|
|
1164
|
-
t = a, r ? n.cssRules.length === 0 ? n.insertRule(a) : n.replaceSync(a) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
1165
|
-
break;
|
|
1166
|
-
}
|
|
1167
|
-
case "inactive": {
|
|
1168
|
-
t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
1169
|
-
break;
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
Ve.set(e, {
|
|
1173
|
-
prevStyle: t,
|
|
1174
|
-
styleSheet: n
|
|
1175
|
-
});
|
|
1176
|
-
}
|
|
1177
|
-
function ut({
|
|
1178
|
-
document: e,
|
|
1179
|
-
event: t,
|
|
1180
|
-
hitRegions: n,
|
|
1181
|
-
initialLayoutMap: o,
|
|
1182
|
-
mountedGroups: r,
|
|
1183
|
-
pointerDownAtPoint: a,
|
|
1184
|
-
prevCursorFlags: u
|
|
1185
|
-
}) {
|
|
1186
|
-
let s = 0;
|
|
1187
|
-
n.forEach((l) => {
|
|
1188
|
-
const { group: c, groupSize: h } = l, { orientation: f, panels: S } = c, { disableCursor: m } = c.mutableState;
|
|
1189
|
-
let d = 0;
|
|
1190
|
-
a ? f === "horizontal" ? d = (t.clientX - a.x) / h * 100 : d = (t.clientY - a.y) / h * 100 : f === "horizontal" ? d = t.clientX < 0 ? -100 : 100 : d = t.clientY < 0 ? -100 : 100;
|
|
1191
|
-
const g = o.get(c), p = r.get(c);
|
|
1192
|
-
if (!g || !p)
|
|
1193
|
-
return;
|
|
1194
|
-
const {
|
|
1195
|
-
defaultLayoutDeferred: b,
|
|
1196
|
-
derivedPanelConstraints: z,
|
|
1197
|
-
groupSize: y,
|
|
1198
|
-
layout: v,
|
|
1199
|
-
separatorToPanels: L
|
|
1200
|
-
} = p;
|
|
1201
|
-
if (z && v && L) {
|
|
1202
|
-
const k = le({
|
|
1203
|
-
delta: d,
|
|
1204
|
-
initialLayout: g,
|
|
1205
|
-
panelConstraints: z,
|
|
1206
|
-
pivotIndices: l.panels.map((E) => S.indexOf(E)),
|
|
1207
|
-
prevLayout: v,
|
|
1208
|
-
trigger: "mouse-or-touch"
|
|
1209
|
-
});
|
|
1210
|
-
if (Y(k, v)) {
|
|
1211
|
-
if (d !== 0 && !m)
|
|
1212
|
-
switch (f) {
|
|
1213
|
-
case "horizontal": {
|
|
1214
|
-
s |= d < 0 ? at : it;
|
|
1215
|
-
break;
|
|
1216
|
-
}
|
|
1217
|
-
case "vertical": {
|
|
1218
|
-
s |= d < 0 ? st : lt;
|
|
1219
|
-
break;
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
} else
|
|
1223
|
-
j(l.group, {
|
|
1224
|
-
defaultLayoutDeferred: b,
|
|
1225
|
-
derivedPanelConstraints: z,
|
|
1226
|
-
groupSize: y,
|
|
1227
|
-
layout: k,
|
|
1228
|
-
separatorToPanels: L
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
});
|
|
1232
|
-
let i = 0;
|
|
1233
|
-
t.movementX === 0 ? i |= u & je : i |= s & je, t.movementY === 0 ? i |= u & Be : i |= s & Be, Bt(i), xe(e);
|
|
1234
|
-
}
|
|
1235
|
-
function He(e) {
|
|
1236
|
-
const t = J(), n = q();
|
|
1237
|
-
switch (n.state) {
|
|
1238
|
-
case "active":
|
|
1239
|
-
ut({
|
|
1240
|
-
document: e.currentTarget,
|
|
1241
|
-
event: e,
|
|
1242
|
-
hitRegions: n.hitRegions,
|
|
1243
|
-
initialLayoutMap: n.initialLayoutMap,
|
|
1244
|
-
mountedGroups: t,
|
|
1245
|
-
prevCursorFlags: n.cursorFlags
|
|
1246
|
-
});
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
function Ye(e) {
|
|
1250
|
-
var o, r;
|
|
1251
|
-
if (e.defaultPrevented)
|
|
1252
|
-
return;
|
|
1253
|
-
const t = q(), n = J();
|
|
1254
|
-
switch (t.state) {
|
|
1255
|
-
case "active": {
|
|
1256
|
-
if (
|
|
1257
|
-
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
1258
|
-
e.buttons === 0
|
|
1259
|
-
) {
|
|
1260
|
-
ee({
|
|
1261
|
-
cursorFlags: 0,
|
|
1262
|
-
state: "inactive"
|
|
1263
|
-
}), t.hitRegions.forEach((a) => {
|
|
1264
|
-
const u = V(a.group.id, !0);
|
|
1265
|
-
j(a.group, u);
|
|
1266
|
-
});
|
|
1267
|
-
return;
|
|
1268
|
-
}
|
|
1269
|
-
for (const a of t.hitRegions)
|
|
1270
|
-
if (a.separator) {
|
|
1271
|
-
const { element: u } = a.separator;
|
|
1272
|
-
(o = u.hasPointerCapture) != null && o.call(u, e.pointerId) || ((r = u.setPointerCapture) == null || r.call(u, e.pointerId));
|
|
1273
|
-
}
|
|
1274
|
-
ut({
|
|
1275
|
-
document: e.currentTarget,
|
|
1276
|
-
event: e,
|
|
1277
|
-
hitRegions: t.hitRegions,
|
|
1278
|
-
initialLayoutMap: t.initialLayoutMap,
|
|
1279
|
-
mountedGroups: n,
|
|
1280
|
-
pointerDownAtPoint: t.pointerDownAtPoint,
|
|
1281
|
-
prevCursorFlags: t.cursorFlags
|
|
1282
|
-
});
|
|
1283
|
-
break;
|
|
1284
|
-
}
|
|
1285
|
-
default: {
|
|
1286
|
-
const a = Se(e, n);
|
|
1287
|
-
a.length === 0 ? t.state !== "inactive" && ee({
|
|
1288
|
-
cursorFlags: 0,
|
|
1289
|
-
state: "inactive"
|
|
1290
|
-
}) : ee({
|
|
1291
|
-
cursorFlags: 0,
|
|
1292
|
-
hitRegions: a,
|
|
1293
|
-
state: "hover"
|
|
1294
|
-
}), xe(e.currentTarget);
|
|
1295
|
-
break;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
function Xe(e) {
|
|
1300
|
-
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
1301
|
-
switch (q().state) {
|
|
1302
|
-
case "hover":
|
|
1303
|
-
ee({
|
|
1304
|
-
cursorFlags: 0,
|
|
1305
|
-
state: "inactive"
|
|
1306
|
-
});
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
function qe(e) {
|
|
1310
|
-
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0)
|
|
1311
|
-
return;
|
|
1312
|
-
const t = q();
|
|
1313
|
-
switch (t.state) {
|
|
1314
|
-
case "active":
|
|
1315
|
-
ee({
|
|
1316
|
-
cursorFlags: 0,
|
|
1317
|
-
state: "inactive"
|
|
1318
|
-
}), t.hitRegions.length > 0 && (xe(e.currentTarget), t.hitRegions.forEach((n) => {
|
|
1319
|
-
const o = V(n.group.id, !0);
|
|
1320
|
-
j(n.group, o);
|
|
1321
|
-
}), e.preventDefault());
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
function Je(e) {
|
|
1325
|
-
let t = 0, n = 0;
|
|
1326
|
-
const o = {};
|
|
1327
|
-
for (const a of e)
|
|
1328
|
-
if (a.defaultSize !== void 0) {
|
|
1329
|
-
t++;
|
|
1330
|
-
const u = I(a.defaultSize);
|
|
1331
|
-
n += u, o[a.panelId] = u;
|
|
1332
|
-
} else
|
|
1333
|
-
o[a.panelId] = void 0;
|
|
1334
|
-
const r = e.length - t;
|
|
1335
|
-
if (r !== 0) {
|
|
1336
|
-
const a = I((100 - n) / r);
|
|
1337
|
-
for (const u of e)
|
|
1338
|
-
u.defaultSize === void 0 && (o[u.panelId] = a);
|
|
1339
|
-
}
|
|
1340
|
-
return o;
|
|
1341
|
-
}
|
|
1342
|
-
function Ht(e, t, n) {
|
|
1343
|
-
if (!n[0])
|
|
1344
|
-
return;
|
|
1345
|
-
const o = e.panels.find((i) => i.element === t);
|
|
1346
|
-
if (!o || !o.onResize)
|
|
1347
|
-
return;
|
|
1348
|
-
const r = te({ group: e }), a = e.orientation === "horizontal" ? o.element.offsetWidth : o.element.offsetHeight, u = o.mutableValues.prevSize, s = {
|
|
1349
|
-
asPercentage: I(a / r * 100),
|
|
1350
|
-
inPixels: a
|
|
1351
|
-
};
|
|
1352
|
-
o.mutableValues.prevSize = s, o.onResize(s, o.id, u);
|
|
1353
|
-
}
|
|
1354
|
-
function Yt(e, t) {
|
|
1355
|
-
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1356
|
-
return !1;
|
|
1357
|
-
for (const n in e)
|
|
1358
|
-
if (e[n] !== t[n])
|
|
1359
|
-
return !1;
|
|
1360
|
-
return !0;
|
|
1361
|
-
}
|
|
1362
|
-
function Xt({
|
|
1363
|
-
group: e,
|
|
1364
|
-
nextGroupSize: t,
|
|
1365
|
-
prevGroupSize: n,
|
|
1366
|
-
prevLayout: o
|
|
1367
|
-
}) {
|
|
1368
|
-
if (n <= 0 || t <= 0 || n === t)
|
|
1369
|
-
return o;
|
|
1370
|
-
let r = 0, a = 0, u = !1;
|
|
1371
|
-
const s = /* @__PURE__ */ new Map(), i = [];
|
|
1372
|
-
for (const h of e.panels) {
|
|
1373
|
-
const f = o[h.id] ?? 0;
|
|
1374
|
-
switch (h.panelConstraints.groupResizeBehavior) {
|
|
1375
|
-
case "preserve-pixel-size": {
|
|
1376
|
-
u = !0;
|
|
1377
|
-
const S = f / 100 * n, m = I(
|
|
1378
|
-
S / t * 100
|
|
1379
|
-
);
|
|
1380
|
-
s.set(h.id, m), r += m;
|
|
1381
|
-
break;
|
|
1382
|
-
}
|
|
1383
|
-
case "preserve-relative-size":
|
|
1384
|
-
default: {
|
|
1385
|
-
i.push(h.id), a += f;
|
|
1386
|
-
break;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
if (!u || i.length === 0)
|
|
1391
|
-
return o;
|
|
1392
|
-
const l = 100 - r, c = { ...o };
|
|
1393
|
-
if (s.forEach((h, f) => {
|
|
1394
|
-
c[f] = h;
|
|
1395
|
-
}), a > 0)
|
|
1396
|
-
for (const h of i) {
|
|
1397
|
-
const f = o[h] ?? 0;
|
|
1398
|
-
c[h] = I(
|
|
1399
|
-
f / a * l
|
|
1400
|
-
);
|
|
1401
|
-
}
|
|
1402
|
-
else {
|
|
1403
|
-
const h = I(
|
|
1404
|
-
l / i.length
|
|
1405
|
-
);
|
|
1406
|
-
for (const f of i)
|
|
1407
|
-
c[f] = h;
|
|
1408
|
-
}
|
|
1409
|
-
return c;
|
|
1410
|
-
}
|
|
1411
|
-
function qt(e, t) {
|
|
1412
|
-
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
1413
|
-
if (n.length !== o.length)
|
|
1414
|
-
return !1;
|
|
1415
|
-
for (const r of n)
|
|
1416
|
-
if (!o.includes(r))
|
|
1417
|
-
return !1;
|
|
1418
|
-
return !0;
|
|
1419
|
-
}
|
|
1420
|
-
const K = /* @__PURE__ */ new Map();
|
|
1421
|
-
function Jt(e) {
|
|
1422
|
-
let t = !0;
|
|
1423
|
-
P(
|
|
1424
|
-
e.element.ownerDocument.defaultView,
|
|
1425
|
-
"Cannot register an unmounted Group"
|
|
1426
|
-
);
|
|
1427
|
-
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = new n((m) => {
|
|
1428
|
-
for (const d of m) {
|
|
1429
|
-
const { borderBoxSize: g, target: p } = d;
|
|
1430
|
-
if (p === e.element) {
|
|
1431
|
-
if (t) {
|
|
1432
|
-
const b = te({ group: e });
|
|
1433
|
-
if (b === 0)
|
|
1434
|
-
return;
|
|
1435
|
-
const z = V(e.id);
|
|
1436
|
-
if (!z)
|
|
1437
|
-
return;
|
|
1438
|
-
const y = be(e), v = z.defaultLayoutDeferred ? Je(y) : z.layout, L = Xt({
|
|
1439
|
-
group: e,
|
|
1440
|
-
nextGroupSize: b,
|
|
1441
|
-
prevGroupSize: z.groupSize,
|
|
1442
|
-
prevLayout: v
|
|
1443
|
-
}), k = X({
|
|
1444
|
-
layout: L,
|
|
1445
|
-
panelConstraints: y
|
|
1446
|
-
});
|
|
1447
|
-
if (!z.defaultLayoutDeferred && Y(z.layout, k) && Yt(
|
|
1448
|
-
z.derivedPanelConstraints,
|
|
1449
|
-
y
|
|
1450
|
-
) && z.groupSize === b)
|
|
1451
|
-
return;
|
|
1452
|
-
j(e, {
|
|
1453
|
-
defaultLayoutDeferred: !1,
|
|
1454
|
-
derivedPanelConstraints: y,
|
|
1455
|
-
groupSize: b,
|
|
1456
|
-
layout: k,
|
|
1457
|
-
separatorToPanels: z.separatorToPanels
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
} else
|
|
1461
|
-
Ht(e, p, g);
|
|
1462
|
-
}
|
|
1463
|
-
});
|
|
1464
|
-
a.observe(e.element), e.panels.forEach((m) => {
|
|
1465
|
-
P(
|
|
1466
|
-
!o.has(m.id),
|
|
1467
|
-
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
1468
|
-
), o.add(m.id), m.onResize && a.observe(m.element);
|
|
1469
|
-
});
|
|
1470
|
-
const u = te({ group: e }), s = be(e), i = e.panels.map(({ id: m }) => m).join(",");
|
|
1471
|
-
let l = e.mutableState.defaultLayout;
|
|
1472
|
-
l && (qt(e.panels, l) || (l = void 0));
|
|
1473
|
-
const c = e.mutableState.layouts[i] ?? l ?? Je(s), h = X({
|
|
1474
|
-
layout: c,
|
|
1475
|
-
panelConstraints: s
|
|
1476
|
-
}), f = e.element.ownerDocument;
|
|
1477
|
-
K.set(
|
|
1478
|
-
f,
|
|
1479
|
-
(K.get(f) ?? 0) + 1
|
|
1480
|
-
);
|
|
1481
|
-
const S = /* @__PURE__ */ new Map();
|
|
1482
|
-
return _e(e).forEach((m) => {
|
|
1483
|
-
m.separator && S.set(m.separator, m.panels);
|
|
1484
|
-
}), j(e, {
|
|
1485
|
-
defaultLayoutDeferred: u === 0,
|
|
1486
|
-
derivedPanelConstraints: s,
|
|
1487
|
-
groupSize: u,
|
|
1488
|
-
layout: h,
|
|
1489
|
-
separatorToPanels: S
|
|
1490
|
-
}), e.separators.forEach((m) => {
|
|
1491
|
-
P(
|
|
1492
|
-
!r.has(m.id),
|
|
1493
|
-
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
1494
|
-
), r.add(m.id), m.element.addEventListener("keydown", $e);
|
|
1495
|
-
}), K.get(f) === 1 && (f.addEventListener("dblclick", Ae, !0), f.addEventListener("pointerdown", Ge, !0), f.addEventListener("pointerleave", He), f.addEventListener("pointermove", Ye), f.addEventListener("pointerout", Xe), f.addEventListener("pointerup", qe, !0)), function() {
|
|
1496
|
-
t = !1, K.set(
|
|
1497
|
-
f,
|
|
1498
|
-
Math.max(0, (K.get(f) ?? 0) - 1)
|
|
1499
|
-
), Dt(e), e.separators.forEach((m) => {
|
|
1500
|
-
m.element.removeEventListener("keydown", $e);
|
|
1501
|
-
}), K.get(f) || (f.removeEventListener(
|
|
1502
|
-
"dblclick",
|
|
1503
|
-
Ae,
|
|
1504
|
-
!0
|
|
1505
|
-
), f.removeEventListener(
|
|
1506
|
-
"pointerdown",
|
|
1507
|
-
Ge,
|
|
1508
|
-
!0
|
|
1509
|
-
), f.removeEventListener("pointerleave", He), f.removeEventListener("pointermove", Ye), f.removeEventListener("pointerout", Xe), f.removeEventListener("pointerup", qe, !0)), a.disconnect();
|
|
1510
|
-
};
|
|
1511
|
-
}
|
|
1512
|
-
function Ut() {
|
|
1513
|
-
const [e, t] = pe({}), n = Ue(() => t({}), []);
|
|
1514
|
-
return [e, n];
|
|
1515
|
-
}
|
|
1516
|
-
function Ce(e) {
|
|
1517
|
-
const t = mt();
|
|
1518
|
-
return `${e ?? t}`;
|
|
1519
|
-
}
|
|
1520
|
-
const U = typeof window < "u" ? yt : ge;
|
|
1521
|
-
function ie(e) {
|
|
1522
|
-
const t = F(e);
|
|
1523
|
-
return U(() => {
|
|
1524
|
-
t.current = e;
|
|
1525
|
-
}, [e]), Ue(
|
|
1526
|
-
(...n) => {
|
|
1527
|
-
var o;
|
|
1528
|
-
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
1529
|
-
},
|
|
1530
|
-
[t]
|
|
1531
|
-
);
|
|
1532
|
-
}
|
|
1533
|
-
function Pe(...e) {
|
|
1534
|
-
return ie((t) => {
|
|
1535
|
-
e.forEach((n) => {
|
|
1536
|
-
if (n)
|
|
1537
|
-
switch (typeof n) {
|
|
1538
|
-
case "function": {
|
|
1539
|
-
n(t);
|
|
1540
|
-
break;
|
|
1541
|
-
}
|
|
1542
|
-
case "object": {
|
|
1543
|
-
n.current = t;
|
|
1544
|
-
break;
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
});
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
function Le(e) {
|
|
1551
|
-
const t = F({ ...e });
|
|
1552
|
-
return U(() => {
|
|
1553
|
-
for (const n in e)
|
|
1554
|
-
t.current[n] = e[n];
|
|
1555
|
-
}, [e]), t.current;
|
|
1556
|
-
}
|
|
1557
|
-
const ct = zt(null);
|
|
1558
|
-
function Zt(e, t) {
|
|
1559
|
-
const n = F({
|
|
1560
|
-
getLayout: () => ({}),
|
|
1561
|
-
setLayout: Wt
|
|
1562
|
-
});
|
|
1563
|
-
Ze(t, () => n.current, []), U(() => {
|
|
1564
|
-
Object.assign(
|
|
1565
|
-
n.current,
|
|
1566
|
-
rt({ groupId: e })
|
|
1567
|
-
);
|
|
1568
|
-
});
|
|
1569
|
-
}
|
|
1570
|
-
function Kt({
|
|
1571
|
-
children: e,
|
|
1572
|
-
className: t,
|
|
1573
|
-
defaultLayout: n,
|
|
1574
|
-
disableCursor: o,
|
|
1575
|
-
disabled: r,
|
|
1576
|
-
elementRef: a,
|
|
1577
|
-
groupRef: u,
|
|
1578
|
-
id: s,
|
|
1579
|
-
onLayoutChange: i,
|
|
1580
|
-
onLayoutChanged: l,
|
|
1581
|
-
orientation: c = "horizontal",
|
|
1582
|
-
resizeTargetMinimumSize: h = {
|
|
1583
|
-
coarse: 20,
|
|
1584
|
-
fine: 10
|
|
1585
|
-
},
|
|
1586
|
-
style: f,
|
|
1587
|
-
...S
|
|
1588
|
-
}) {
|
|
1589
|
-
const m = F({
|
|
1590
|
-
onLayoutChange: {},
|
|
1591
|
-
onLayoutChanged: {}
|
|
1592
|
-
}), d = ie((w) => {
|
|
1593
|
-
Y(m.current.onLayoutChange, w) || (m.current.onLayoutChange = w, i == null || i(w));
|
|
1594
|
-
}), g = ie((w) => {
|
|
1595
|
-
Y(m.current.onLayoutChanged, w) || (m.current.onLayoutChanged = w, l == null || l(w));
|
|
1596
|
-
}), p = Ce(s), b = F(null), [z, y] = Ut(), v = F({
|
|
1597
|
-
lastExpandedPanelSizes: {},
|
|
1598
|
-
layouts: {},
|
|
1599
|
-
panels: [],
|
|
1600
|
-
resizeTargetMinimumSize: h,
|
|
1601
|
-
separators: []
|
|
1602
|
-
}), L = Pe(b, a);
|
|
1603
|
-
Zt(p, u);
|
|
1604
|
-
const k = ie(
|
|
1605
|
-
(w, x) => {
|
|
1606
|
-
const M = q(), C = Te(w), D = V(w);
|
|
1607
|
-
if (D) {
|
|
1608
|
-
let T = !1;
|
|
1609
|
-
switch (M.state) {
|
|
1610
|
-
case "active": {
|
|
1611
|
-
T = M.hitRegions.some(
|
|
1612
|
-
(ne) => ne.group === C
|
|
1613
|
-
);
|
|
1614
|
-
break;
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
return {
|
|
1618
|
-
flexGrow: D.layout[x] ?? 1,
|
|
1619
|
-
pointerEvents: T ? "none" : void 0
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
if (n != null && n[x])
|
|
1623
|
-
return {
|
|
1624
|
-
flexGrow: n == null ? void 0 : n[x]
|
|
1625
|
-
};
|
|
1626
|
-
}
|
|
1627
|
-
), E = Le({
|
|
1628
|
-
defaultLayout: n,
|
|
1629
|
-
disableCursor: o
|
|
1630
|
-
}), O = vt(
|
|
1631
|
-
() => ({
|
|
1632
|
-
get disableCursor() {
|
|
1633
|
-
return !!E.disableCursor;
|
|
1634
|
-
},
|
|
1635
|
-
getPanelStyles: k,
|
|
1636
|
-
id: p,
|
|
1637
|
-
orientation: c,
|
|
1638
|
-
registerPanel: (w) => {
|
|
1639
|
-
const x = v.current;
|
|
1640
|
-
return x.panels = ye(c, [
|
|
1641
|
-
...x.panels,
|
|
1642
|
-
w
|
|
1643
|
-
]), y(), () => {
|
|
1644
|
-
x.panels = x.panels.filter(
|
|
1645
|
-
(M) => M !== w
|
|
1646
|
-
), y();
|
|
1647
|
-
};
|
|
1648
|
-
},
|
|
1649
|
-
registerSeparator: (w) => {
|
|
1650
|
-
const x = v.current;
|
|
1651
|
-
return x.separators = ye(c, [
|
|
1652
|
-
...x.separators,
|
|
1653
|
-
w
|
|
1654
|
-
]), y(), () => {
|
|
1655
|
-
x.separators = x.separators.filter(
|
|
1656
|
-
(M) => M !== w
|
|
1657
|
-
), y();
|
|
1658
|
-
};
|
|
1659
|
-
},
|
|
1660
|
-
updatePanelProps: (w, { disabled: x }) => {
|
|
1661
|
-
const M = v.current.panels.find(
|
|
1662
|
-
(T) => T.id === w
|
|
1663
|
-
);
|
|
1664
|
-
M && (M.panelConstraints.disabled = x);
|
|
1665
|
-
const C = Te(p), D = V(p);
|
|
1666
|
-
C && D && j(C, {
|
|
1667
|
-
...D,
|
|
1668
|
-
derivedPanelConstraints: be(C)
|
|
1669
|
-
});
|
|
1670
|
-
},
|
|
1671
|
-
updateSeparatorProps: (w, {
|
|
1672
|
-
disabled: x,
|
|
1673
|
-
disableDoubleClick: M
|
|
1674
|
-
}) => {
|
|
1675
|
-
const C = v.current.separators.find(
|
|
1676
|
-
(D) => D.id === w
|
|
1677
|
-
);
|
|
1678
|
-
C && (C.disabled = x, C.disableDoubleClick = M);
|
|
1679
|
-
}
|
|
1680
|
-
}),
|
|
1681
|
-
[k, p, y, c, E]
|
|
1682
|
-
), $ = F(null);
|
|
1683
|
-
return U(() => {
|
|
1684
|
-
const w = b.current;
|
|
1685
|
-
if (w === null)
|
|
1686
|
-
return;
|
|
1687
|
-
const x = v.current;
|
|
1688
|
-
let M;
|
|
1689
|
-
if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === x.panels.length) {
|
|
1690
|
-
M = {};
|
|
1691
|
-
for (const B of x.panels) {
|
|
1692
|
-
const Z = E.defaultLayout[B.id];
|
|
1693
|
-
Z !== void 0 && (M[B.id] = Z);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
const C = {
|
|
1697
|
-
disabled: !!r,
|
|
1698
|
-
element: w,
|
|
1699
|
-
id: p,
|
|
1700
|
-
mutableState: {
|
|
1701
|
-
defaultLayout: M,
|
|
1702
|
-
disableCursor: !!E.disableCursor,
|
|
1703
|
-
expandedPanelSizes: v.current.lastExpandedPanelSizes,
|
|
1704
|
-
layouts: v.current.layouts
|
|
1705
|
-
},
|
|
1706
|
-
orientation: c,
|
|
1707
|
-
panels: x.panels,
|
|
1708
|
-
resizeTargetMinimumSize: x.resizeTargetMinimumSize,
|
|
1709
|
-
separators: x.separators
|
|
1710
|
-
};
|
|
1711
|
-
$.current = C;
|
|
1712
|
-
const D = Jt(C), { defaultLayoutDeferred: T, derivedPanelConstraints: ne, layout: ue } = V(C.id, !0);
|
|
1713
|
-
!T && ne.length > 0 && (d(ue), g(ue));
|
|
1714
|
-
const oe = ze(p, (B) => {
|
|
1715
|
-
const { defaultLayoutDeferred: Z, derivedPanelConstraints: Me, layout: ce } = B.next;
|
|
1716
|
-
if (Z || Me.length === 0)
|
|
1717
|
-
return;
|
|
1718
|
-
const dt = C.panels.map(({ id: G }) => G).join(",");
|
|
1719
|
-
C.mutableState.layouts[dt] = ce, Me.forEach((G) => {
|
|
1720
|
-
if (G.collapsible) {
|
|
1721
|
-
const { layout: ve } = B.prev ?? {};
|
|
1722
|
-
if (ve) {
|
|
1723
|
-
const pt = R(
|
|
1724
|
-
G.collapsedSize,
|
|
1725
|
-
ce[G.panelId]
|
|
1726
|
-
), ht = R(
|
|
1727
|
-
G.collapsedSize,
|
|
1728
|
-
ve[G.panelId]
|
|
1729
|
-
);
|
|
1730
|
-
pt && !ht && (C.mutableState.expandedPanelSizes[G.panelId] = ve[G.panelId]);
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
});
|
|
1734
|
-
const ft = q().state !== "active";
|
|
1735
|
-
d(ce), ft && g(ce);
|
|
1736
|
-
});
|
|
1737
|
-
return () => {
|
|
1738
|
-
$.current = null, D(), oe();
|
|
1739
|
-
};
|
|
1740
|
-
}, [
|
|
1741
|
-
r,
|
|
1742
|
-
p,
|
|
1743
|
-
g,
|
|
1744
|
-
d,
|
|
1745
|
-
c,
|
|
1746
|
-
z,
|
|
1747
|
-
E
|
|
1748
|
-
]), ge(() => {
|
|
1749
|
-
const w = $.current;
|
|
1750
|
-
w && (w.mutableState.defaultLayout = n, w.mutableState.disableCursor = !!o);
|
|
1751
|
-
}), /* @__PURE__ */ se(ct.Provider, { value: O, children: /* @__PURE__ */ se(
|
|
1752
|
-
"div",
|
|
1753
|
-
{
|
|
1754
|
-
...S,
|
|
1755
|
-
className: t,
|
|
1756
|
-
"data-group": !0,
|
|
1757
|
-
"data-testid": p,
|
|
1758
|
-
id: p,
|
|
1759
|
-
ref: L,
|
|
1760
|
-
style: {
|
|
1761
|
-
height: "100%",
|
|
1762
|
-
width: "100%",
|
|
1763
|
-
overflow: "hidden",
|
|
1764
|
-
...f,
|
|
1765
|
-
display: "flex",
|
|
1766
|
-
flexDirection: c === "horizontal" ? "row" : "column",
|
|
1767
|
-
flexWrap: "nowrap",
|
|
1768
|
-
// Inform the browser that the library is handling touch events for this element
|
|
1769
|
-
// but still allow users to scroll content within panels in the non-resizing direction
|
|
1770
|
-
// NOTE This is not an inherited style
|
|
1771
|
-
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
1772
|
-
touchAction: c === "horizontal" ? "pan-y" : "pan-x"
|
|
1773
|
-
},
|
|
1774
|
-
children: e
|
|
1775
|
-
}
|
|
1776
|
-
) });
|
|
1777
|
-
}
|
|
1778
|
-
Kt.displayName = "Group";
|
|
1779
|
-
function ke() {
|
|
1780
|
-
const e = bt(ct);
|
|
1781
|
-
return P(
|
|
1782
|
-
e,
|
|
1783
|
-
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
1784
|
-
), e;
|
|
1785
|
-
}
|
|
1786
|
-
function Qt(e, t) {
|
|
1787
|
-
const { id: n } = ke(), o = F({
|
|
1788
|
-
collapse: me,
|
|
1789
|
-
expand: me,
|
|
1790
|
-
getSize: () => ({
|
|
1791
|
-
asPercentage: 0,
|
|
1792
|
-
inPixels: 0
|
|
1793
|
-
}),
|
|
1794
|
-
isCollapsed: () => !1,
|
|
1795
|
-
resize: me
|
|
1796
|
-
});
|
|
1797
|
-
Ze(t, () => o.current, []), U(() => {
|
|
1798
|
-
Object.assign(
|
|
1799
|
-
o.current,
|
|
1800
|
-
ot({ groupId: n, panelId: e })
|
|
1801
|
-
);
|
|
1802
|
-
});
|
|
1803
|
-
}
|
|
1804
|
-
function _t({
|
|
1805
|
-
children: e,
|
|
1806
|
-
className: t,
|
|
1807
|
-
collapsedSize: n = "0%",
|
|
1808
|
-
collapsible: o = !1,
|
|
1809
|
-
defaultSize: r,
|
|
1810
|
-
disabled: a,
|
|
1811
|
-
elementRef: u,
|
|
1812
|
-
groupResizeBehavior: s = "preserve-relative-size",
|
|
1813
|
-
id: i,
|
|
1814
|
-
maxSize: l = "100%",
|
|
1815
|
-
minSize: c = "0%",
|
|
1816
|
-
onResize: h,
|
|
1817
|
-
panelRef: f,
|
|
1818
|
-
style: S,
|
|
1819
|
-
...m
|
|
1820
|
-
}) {
|
|
1821
|
-
const d = !!i, g = Ce(i), p = Le({
|
|
1822
|
-
disabled: a
|
|
1823
|
-
}), b = F(null), z = Pe(b, u), {
|
|
1824
|
-
getPanelStyles: y,
|
|
1825
|
-
id: v,
|
|
1826
|
-
orientation: L,
|
|
1827
|
-
registerPanel: k,
|
|
1828
|
-
updatePanelProps: E
|
|
1829
|
-
} = ke(), O = h !== null, $ = ie(
|
|
1830
|
-
(C, D, T) => {
|
|
1831
|
-
h == null || h(C, i, T);
|
|
1832
|
-
}
|
|
1833
|
-
);
|
|
1834
|
-
U(() => {
|
|
1835
|
-
const C = b.current;
|
|
1836
|
-
if (C !== null) {
|
|
1837
|
-
const D = {
|
|
1838
|
-
element: C,
|
|
1839
|
-
id: g,
|
|
1840
|
-
idIsStable: d,
|
|
1841
|
-
mutableValues: {
|
|
1842
|
-
expandToSize: void 0,
|
|
1843
|
-
prevSize: void 0
|
|
1844
|
-
},
|
|
1845
|
-
onResize: O ? $ : void 0,
|
|
1846
|
-
panelConstraints: {
|
|
1847
|
-
groupResizeBehavior: s,
|
|
1848
|
-
collapsedSize: n,
|
|
1849
|
-
collapsible: o,
|
|
1850
|
-
defaultSize: r,
|
|
1851
|
-
disabled: p.disabled,
|
|
1852
|
-
maxSize: l,
|
|
1853
|
-
minSize: c
|
|
1854
|
-
}
|
|
1855
|
-
};
|
|
1856
|
-
return k(D);
|
|
1857
|
-
}
|
|
1858
|
-
}, [
|
|
1859
|
-
s,
|
|
1860
|
-
n,
|
|
1861
|
-
o,
|
|
1862
|
-
r,
|
|
1863
|
-
O,
|
|
1864
|
-
g,
|
|
1865
|
-
d,
|
|
1866
|
-
l,
|
|
1867
|
-
c,
|
|
1868
|
-
$,
|
|
1869
|
-
k,
|
|
1870
|
-
p
|
|
1871
|
-
]), ge(() => {
|
|
1872
|
-
E(g, { disabled: a });
|
|
1873
|
-
}, [a, g, E]), Qt(g, f);
|
|
1874
|
-
const w = () => {
|
|
1875
|
-
const C = y(v, g);
|
|
1876
|
-
if (C)
|
|
1877
|
-
return JSON.stringify(C);
|
|
1878
|
-
}, x = gt(
|
|
1879
|
-
(C) => ze(v, C),
|
|
1880
|
-
w,
|
|
1881
|
-
w
|
|
1882
|
-
);
|
|
1883
|
-
let M;
|
|
1884
|
-
return x ? M = JSON.parse(x) : r !== void 0 ? M = {
|
|
1885
|
-
flexGrow: void 0,
|
|
1886
|
-
flexShrink: void 0,
|
|
1887
|
-
flexBasis: r
|
|
1888
|
-
} : M = { flexGrow: 1 }, /* @__PURE__ */ se(
|
|
1889
|
-
"div",
|
|
1890
|
-
{
|
|
1891
|
-
...m,
|
|
1892
|
-
"data-disabled": a || void 0,
|
|
1893
|
-
"data-panel": !0,
|
|
1894
|
-
"data-testid": g,
|
|
1895
|
-
id: g,
|
|
1896
|
-
ref: z,
|
|
1897
|
-
style: {
|
|
1898
|
-
...en,
|
|
1899
|
-
display: "flex",
|
|
1900
|
-
flexBasis: 0,
|
|
1901
|
-
flexShrink: 1,
|
|
1902
|
-
overflow: "visible",
|
|
1903
|
-
...M
|
|
1904
|
-
},
|
|
1905
|
-
children: /* @__PURE__ */ se(
|
|
1906
|
-
"div",
|
|
1907
|
-
{
|
|
1908
|
-
className: t,
|
|
1909
|
-
style: {
|
|
1910
|
-
maxHeight: "100%",
|
|
1911
|
-
maxWidth: "100%",
|
|
1912
|
-
flexGrow: 1,
|
|
1913
|
-
overflow: "auto",
|
|
1914
|
-
...S,
|
|
1915
|
-
// Inform the browser that the library is handling touch events for this element
|
|
1916
|
-
// but still allow users to scroll content within panels in the non-resizing direction
|
|
1917
|
-
// NOTE This is not an inherited style
|
|
1918
|
-
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
1919
|
-
touchAction: L === "horizontal" ? "pan-y" : "pan-x"
|
|
1920
|
-
},
|
|
1921
|
-
children: e
|
|
1922
|
-
}
|
|
1923
|
-
)
|
|
1924
|
-
}
|
|
1925
|
-
);
|
|
1926
|
-
}
|
|
1927
|
-
_t.displayName = "Panel";
|
|
1928
|
-
const en = {
|
|
1929
|
-
minHeight: 0,
|
|
1930
|
-
maxHeight: "100%",
|
|
1931
|
-
height: "auto",
|
|
1932
|
-
minWidth: 0,
|
|
1933
|
-
maxWidth: "100%",
|
|
1934
|
-
width: "auto",
|
|
1935
|
-
border: "none",
|
|
1936
|
-
borderWidth: 0,
|
|
1937
|
-
padding: 0,
|
|
1938
|
-
margin: 0
|
|
1939
|
-
};
|
|
1940
|
-
function tn({
|
|
1941
|
-
layout: e,
|
|
1942
|
-
panelConstraints: t,
|
|
1943
|
-
panelId: n,
|
|
1944
|
-
panelIndex: o
|
|
1945
|
-
}) {
|
|
1946
|
-
let r, a;
|
|
1947
|
-
const u = e[n], s = t.find(
|
|
1948
|
-
(i) => i.panelId === n
|
|
1949
|
-
);
|
|
1950
|
-
if (s) {
|
|
1951
|
-
const i = s.maxSize, l = s.collapsible ? s.collapsedSize : s.minSize, c = [o, o + 1];
|
|
1952
|
-
a = X({
|
|
1953
|
-
layout: le({
|
|
1954
|
-
delta: l - u,
|
|
1955
|
-
initialLayout: e,
|
|
1956
|
-
panelConstraints: t,
|
|
1957
|
-
pivotIndices: c,
|
|
1958
|
-
prevLayout: e
|
|
1959
|
-
}),
|
|
1960
|
-
panelConstraints: t
|
|
1961
|
-
})[n], r = X({
|
|
1962
|
-
layout: le({
|
|
1963
|
-
delta: i - u,
|
|
1964
|
-
initialLayout: e,
|
|
1965
|
-
panelConstraints: t,
|
|
1966
|
-
pivotIndices: c,
|
|
1967
|
-
prevLayout: e
|
|
1968
|
-
}),
|
|
1969
|
-
panelConstraints: t
|
|
1970
|
-
})[n];
|
|
1971
|
-
}
|
|
1972
|
-
return {
|
|
1973
|
-
valueControls: n,
|
|
1974
|
-
valueMax: r,
|
|
1975
|
-
valueMin: a,
|
|
1976
|
-
valueNow: u
|
|
1977
|
-
};
|
|
1978
|
-
}
|
|
1979
|
-
function nn({
|
|
1980
|
-
children: e,
|
|
1981
|
-
className: t,
|
|
1982
|
-
disabled: n,
|
|
1983
|
-
disableDoubleClick: o,
|
|
1984
|
-
elementRef: r,
|
|
1985
|
-
id: a,
|
|
1986
|
-
style: u,
|
|
1987
|
-
...s
|
|
1988
|
-
}) {
|
|
1989
|
-
const i = Ce(a), l = Le({
|
|
1990
|
-
disabled: n,
|
|
1991
|
-
disableDoubleClick: o
|
|
1992
|
-
}), [c, h] = pe({}), [f, S] = pe("inactive"), [m, d] = pe(!1), g = F(null), p = Pe(g, r), {
|
|
1993
|
-
disableCursor: b,
|
|
1994
|
-
id: z,
|
|
1995
|
-
orientation: y,
|
|
1996
|
-
registerSeparator: v,
|
|
1997
|
-
updateSeparatorProps: L
|
|
1998
|
-
} = ke(), k = y === "horizontal" ? "vertical" : "horizontal";
|
|
1999
|
-
U(() => {
|
|
2000
|
-
const $ = g.current;
|
|
2001
|
-
if ($ !== null) {
|
|
2002
|
-
const w = {
|
|
2003
|
-
disabled: l.disabled,
|
|
2004
|
-
disableDoubleClick: l.disableDoubleClick,
|
|
2005
|
-
element: $,
|
|
2006
|
-
id: i
|
|
2007
|
-
}, x = v(w), M = jt(
|
|
2008
|
-
(D) => {
|
|
2009
|
-
S(
|
|
2010
|
-
D.next.state !== "inactive" && D.next.hitRegions.some(
|
|
2011
|
-
(T) => T.separator === w
|
|
2012
|
-
) ? D.next.state : "inactive"
|
|
2013
|
-
);
|
|
2014
|
-
}
|
|
2015
|
-
), C = ze(
|
|
2016
|
-
z,
|
|
2017
|
-
(D) => {
|
|
2018
|
-
const { derivedPanelConstraints: T, layout: ne, separatorToPanels: ue } = D.next, oe = ue.get(w);
|
|
2019
|
-
if (oe) {
|
|
2020
|
-
const B = oe[0], Z = oe.indexOf(B);
|
|
2021
|
-
h(
|
|
2022
|
-
tn({
|
|
2023
|
-
layout: ne,
|
|
2024
|
-
panelConstraints: T,
|
|
2025
|
-
panelId: B.id,
|
|
2026
|
-
panelIndex: Z
|
|
2027
|
-
})
|
|
2028
|
-
);
|
|
2029
|
-
}
|
|
2030
|
-
}
|
|
2031
|
-
);
|
|
2032
|
-
return () => {
|
|
2033
|
-
M(), C(), x();
|
|
2034
|
-
};
|
|
2035
|
-
}
|
|
2036
|
-
}, [z, i, v, l]), ge(() => {
|
|
2037
|
-
L(i, { disabled: n, disableDoubleClick: o });
|
|
2038
|
-
}, [n, o, i, L]);
|
|
2039
|
-
let E;
|
|
2040
|
-
n && !b && (E = "not-allowed");
|
|
2041
|
-
let O;
|
|
2042
|
-
if (n)
|
|
2043
|
-
O = "disabled";
|
|
2044
|
-
else
|
|
2045
|
-
switch (f) {
|
|
2046
|
-
case "active": {
|
|
2047
|
-
O = "active";
|
|
2048
|
-
break;
|
|
2049
|
-
}
|
|
2050
|
-
default:
|
|
2051
|
-
m ? O = "focus" : O = f;
|
|
2052
|
-
}
|
|
2053
|
-
return /* @__PURE__ */ se(
|
|
2054
|
-
"div",
|
|
2055
|
-
{
|
|
2056
|
-
...s,
|
|
2057
|
-
"aria-controls": c.valueControls,
|
|
2058
|
-
"aria-disabled": n || void 0,
|
|
2059
|
-
"aria-orientation": k,
|
|
2060
|
-
"aria-valuemax": c.valueMax,
|
|
2061
|
-
"aria-valuemin": c.valueMin,
|
|
2062
|
-
"aria-valuenow": c.valueNow,
|
|
2063
|
-
children: e,
|
|
2064
|
-
className: t,
|
|
2065
|
-
"data-separator": O,
|
|
2066
|
-
"data-testid": i,
|
|
2067
|
-
id: i,
|
|
2068
|
-
onBlur: () => d(!1),
|
|
2069
|
-
onFocus: () => d(!0),
|
|
2070
|
-
ref: p,
|
|
2071
|
-
role: "separator",
|
|
2072
|
-
style: {
|
|
2073
|
-
flexBasis: "auto",
|
|
2074
|
-
cursor: E,
|
|
2075
|
-
...u,
|
|
2076
|
-
flexGrow: 0,
|
|
2077
|
-
flexShrink: 0,
|
|
2078
|
-
// Inform the browser that the library is handling touch events for this element
|
|
2079
|
-
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2080
|
-
touchAction: "none"
|
|
2081
|
-
},
|
|
2082
|
-
tabIndex: n ? void 0 : 0
|
|
2083
|
-
}
|
|
2084
|
-
);
|
|
2085
|
-
}
|
|
2086
|
-
nn.displayName = "Separator";
|
|
2087
|
-
export {
|
|
2088
|
-
Kt as Group,
|
|
2089
|
-
_t as Panel,
|
|
2090
|
-
nn as Separator,
|
|
2091
|
-
Et as isCoarsePointer
|
|
2092
|
-
};
|
|
2093
|
-
//# sourceMappingURL=react-resizable-panels.js.map
|