ivt 0.1.0 → 0.1.2
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 +9 -0
- package/dist/accordion/index.mjs +1 -1
- package/dist/alert/index.mjs +1 -1
- package/dist/alert-dialog/index.d.ts +17 -0
- package/dist/alert-dialog/index.mjs +2 -0
- package/dist/alert-dialog/index.mjs.map +1 -0
- package/dist/avatar/index.mjs +1 -1
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.mjs +1 -1
- package/dist/base/index.d.ts +1 -0
- package/dist/base/index.mjs +1 -1
- package/dist/base/index.mjs.map +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/card/index.mjs +1 -1
- package/dist/checkbox/index.mjs +1 -1
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/{TextWrap-23P8STqb.mjs → TextWrap-DM8p5RY0.mjs} +2 -2
- package/dist/chunks/{TextWrap-23P8STqb.mjs.map → TextWrap-DM8p5RY0.mjs.map} +1 -1
- package/dist/chunks/{accordion-pKx1Q4tK.mjs → accordion-CJbwVC50.mjs} +2 -2
- package/dist/chunks/{accordion-pKx1Q4tK.mjs.map → accordion-CJbwVC50.mjs.map} +1 -1
- package/dist/chunks/{badge-Cy4rR7ko.mjs → badge-Bl0X9ruG.mjs} +2 -2
- package/dist/chunks/{badge-Cy4rR7ko.mjs.map → badge-Bl0X9ruG.mjs.map} +1 -1
- package/dist/chunks/bundle-mjs-BYGwPY3j.mjs +2 -0
- package/dist/chunks/bundle-mjs-BYGwPY3j.mjs.map +1 -0
- package/dist/chunks/{button-L19W2fGF.mjs → button-B7K2JEBG.mjs} +2 -2
- package/dist/chunks/{button-L19W2fGF.mjs.map → button-B7K2JEBG.mjs.map} +1 -1
- package/dist/chunks/calendar-CDaopDjB.mjs +2 -0
- package/dist/chunks/calendar-CDaopDjB.mjs.map +1 -0
- package/dist/chunks/check-DoBi3iW5.mjs +2 -0
- package/dist/chunks/{check-1SKm0QUI.mjs.map → check-DoBi3iW5.mjs.map} +1 -1
- package/dist/chunks/chevron-down-BlskY22a.mjs +2 -0
- package/dist/chunks/{chevron-down-i6P9lr6K.mjs.map → chevron-down-BlskY22a.mjs.map} +1 -1
- package/dist/chunks/chevron-left-BXFDtxhQ.mjs +2 -0
- package/dist/chunks/{chevron-left-kY7-JEU4.mjs.map → chevron-left-BXFDtxhQ.mjs.map} +1 -1
- package/dist/chunks/chevron-right-DAqTCOj7.mjs +2 -0
- package/dist/chunks/{chevron-right-BCy8nVMg.mjs.map → chevron-right-DAqTCOj7.mjs.map} +1 -1
- package/dist/chunks/{command-BLs86fLx.mjs → command-DYONarI_.mjs} +2 -2
- package/dist/chunks/{command-BLs86fLx.mjs.map → command-DYONarI_.mjs.map} +1 -1
- package/dist/chunks/createLucideIcon-CkKdyF_L.mjs +2 -0
- package/dist/chunks/{createLucideIcon-NXzoJfn7.mjs.map → createLucideIcon-CkKdyF_L.mjs.map} +1 -1
- package/dist/chunks/{dialog-BDBNWwYT.mjs → dialog-Bs3UmyLz.mjs} +2 -2
- package/dist/chunks/{dialog-BDBNWwYT.mjs.map → dialog-Bs3UmyLz.mjs.map} +1 -1
- package/dist/chunks/{hover-card-BjXLQEhK.mjs → hover-card-CujP4Atn.mjs} +2 -2
- package/dist/chunks/{hover-card-BjXLQEhK.mjs.map → hover-card-CujP4Atn.mjs.map} +1 -1
- package/dist/chunks/index-BSf-atXx.mjs +2 -0
- package/dist/chunks/index-BSf-atXx.mjs.map +1 -0
- package/dist/chunks/{index-BkrjWCcN.mjs → index-BX6nSpY1.mjs} +1 -1
- package/dist/chunks/index-BX6nSpY1.mjs.map +1 -0
- package/dist/chunks/{index-BXYIPnYd.mjs → index-CAVVTG3h.mjs} +2 -2
- package/dist/chunks/{index-BXYIPnYd.mjs.map → index-CAVVTG3h.mjs.map} +1 -1
- package/dist/chunks/{index-CRTXCtD-.mjs → index-CUXMuJ__.mjs} +2 -2
- package/dist/chunks/{index-CRTXCtD-.mjs.map → index-CUXMuJ__.mjs.map} +1 -1
- package/dist/chunks/{index-B_Oam-QU.mjs → index-Ck1fOwnt.mjs} +2 -2
- package/dist/chunks/{index-B_Oam-QU.mjs.map → index-Ck1fOwnt.mjs.map} +1 -1
- package/dist/chunks/{index-DXDEMoyA.mjs → index-DB6P4Tz1.mjs} +1 -1
- package/dist/chunks/{index-DXDEMoyA.mjs.map → index-DB6P4Tz1.mjs.map} +1 -1
- package/dist/chunks/{index-DFm8Tejm.mjs → index-DZldl4eo.mjs} +2 -2
- package/dist/chunks/{index-DFm8Tejm.mjs.map → index-DZldl4eo.mjs.map} +1 -1
- package/dist/chunks/index-DdNjMgpV.mjs +2 -0
- package/dist/chunks/index-DdNjMgpV.mjs.map +1 -0
- package/dist/chunks/index-Dix9fE1x.mjs +2 -0
- package/dist/chunks/index-Dix9fE1x.mjs.map +1 -0
- package/dist/chunks/index-DuMyb05s.mjs +2 -0
- package/dist/chunks/index-DuMyb05s.mjs.map +1 -0
- package/dist/chunks/{index-VNeBf_qQ.mjs → index-DyUn0c26.mjs} +2 -2
- package/dist/chunks/index-DyUn0c26.mjs.map +1 -0
- package/dist/chunks/{index-BzUzK8k1.mjs → index-IXx8l3RV.mjs} +2 -2
- package/dist/chunks/index-IXx8l3RV.mjs.map +1 -0
- package/dist/chunks/{index-Cj8SbPde.mjs → index-XatPIL6c.mjs} +2 -2
- package/dist/chunks/index-XatPIL6c.mjs.map +1 -0
- package/dist/chunks/index-qP_a6BiF.mjs +2 -0
- package/dist/chunks/index-qP_a6BiF.mjs.map +1 -0
- package/dist/chunks/{input-CIOLnRPP.mjs → input-BtSMyTkT.mjs} +2 -2
- package/dist/chunks/{input-CIOLnRPP.mjs.map → input-BtSMyTkT.mjs.map} +1 -1
- package/dist/chunks/{label-JzY_9HXj.mjs → label-BL5NIn0A.mjs} +2 -2
- package/dist/chunks/{label-JzY_9HXj.mjs.map → label-BL5NIn0A.mjs.map} +1 -1
- package/dist/chunks/{pagination-Duu8Xw3w.mjs → pagination-BiktkEzi.mjs} +2 -2
- package/dist/chunks/{pagination-Duu8Xw3w.mjs.map → pagination-BiktkEzi.mjs.map} +1 -1
- package/dist/chunks/popover-CSY_ub7s.mjs +2 -0
- package/dist/chunks/popover-CSY_ub7s.mjs.map +1 -0
- package/dist/chunks/progress-CmBH1a8S.mjs +2 -0
- package/dist/chunks/{progress-sKEf-fjz.mjs.map → progress-CmBH1a8S.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-B-ktzHvu.mjs → scroll-area-B-b-oQYr.mjs} +2 -2
- package/dist/chunks/{scroll-area-B-ktzHvu.mjs.map → scroll-area-B-b-oQYr.mjs.map} +1 -1
- package/dist/chunks/{select-DqeznJec.mjs → select-Co76oy2I.mjs} +2 -2
- package/dist/chunks/{select-DqeznJec.mjs.map → select-Co76oy2I.mjs.map} +1 -1
- package/dist/chunks/{skeleton-cSOJ-vH8.mjs → skeleton-cvIjllDp.mjs} +2 -2
- package/dist/chunks/{skeleton-cSOJ-vH8.mjs.map → skeleton-cvIjllDp.mjs.map} +1 -1
- package/dist/chunks/{sortable-BX5MRGOc.mjs → sortable-DaXPlC2-.mjs} +2 -2
- package/dist/chunks/{sortable-BX5MRGOc.mjs.map → sortable-DaXPlC2-.mjs.map} +1 -1
- package/dist/chunks/{table-BGjJ1DhO.mjs → table-xzX2584j.mjs} +2 -2
- package/dist/chunks/{table-BGjJ1DhO.mjs.map → table-xzX2584j.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-DnJNy3VA.mjs → tslib.es6-CC_zzJ2l.mjs} +1 -1
- package/dist/chunks/{tslib.es6-DnJNy3VA.mjs.map → tslib.es6-CC_zzJ2l.mjs.map} +1 -1
- package/dist/chunks/{utils-C6LYO_CH.mjs → utils-B9uwc_lt.mjs} +2 -2
- package/dist/chunks/{utils-C6LYO_CH.mjs.map → utils-B9uwc_lt.mjs.map} +1 -1
- package/dist/chunks/x-Bdqqbrz4.mjs +2 -0
- package/dist/chunks/{x-DjF9gicP.mjs.map → x-Bdqqbrz4.mjs.map} +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/data-table/index.d.ts +4 -4
- package/dist/data-table/index.mjs +1 -1
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +1 -6
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/hover-card/index.mjs +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/label/index.mjs +1 -1
- package/dist/pagination/index.mjs +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/progress/index.mjs +1 -1
- package/dist/scroll-area/index.mjs +1 -1
- package/dist/select/index.mjs +1 -1
- package/dist/separator/index.mjs +1 -1
- package/dist/sheet/index.mjs +1 -1
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/sonner/index.mjs +1 -1
- package/dist/sonner/index.mjs.map +1 -1
- package/dist/sortable/index.mjs +1 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/toast/index.mjs.map +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +11 -5
- package/dist/chunks/Combination-CaCdPc0V.mjs +0 -2
- package/dist/chunks/Combination-CaCdPc0V.mjs.map +0 -1
- package/dist/chunks/bundle-mjs-E0baekTQ.mjs +0 -2
- package/dist/chunks/bundle-mjs-E0baekTQ.mjs.map +0 -1
- package/dist/chunks/calendar-BQrtnevv.mjs +0 -2
- package/dist/chunks/calendar-BQrtnevv.mjs.map +0 -1
- package/dist/chunks/check-1SKm0QUI.mjs +0 -2
- package/dist/chunks/chevron-down-i6P9lr6K.mjs +0 -2
- package/dist/chunks/chevron-left-kY7-JEU4.mjs +0 -2
- package/dist/chunks/chevron-right-BCy8nVMg.mjs +0 -2
- package/dist/chunks/createLucideIcon-NXzoJfn7.mjs +0 -14
- package/dist/chunks/index-5xCD9zck.mjs +0 -2
- package/dist/chunks/index-5xCD9zck.mjs.map +0 -1
- package/dist/chunks/index-BkrjWCcN.mjs.map +0 -1
- package/dist/chunks/index-BzUzK8k1.mjs.map +0 -1
- package/dist/chunks/index-CBuWa3V_.mjs +0 -2
- package/dist/chunks/index-CBuWa3V_.mjs.map +0 -1
- package/dist/chunks/index-Cj8SbPde.mjs.map +0 -1
- package/dist/chunks/index-DU2SqYv7.mjs +0 -2
- package/dist/chunks/index-DU2SqYv7.mjs.map +0 -1
- package/dist/chunks/index-DagWVwpf.mjs +0 -2
- package/dist/chunks/index-DagWVwpf.mjs.map +0 -1
- package/dist/chunks/index-VNeBf_qQ.mjs.map +0 -1
- package/dist/chunks/popover-CstNJ6EN.mjs +0 -2
- package/dist/chunks/popover-CstNJ6EN.mjs.map +0 -1
- package/dist/chunks/progress-sKEf-fjz.mjs +0 -2
- package/dist/chunks/x-DjF9gicP.mjs +0 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select-
|
1
|
+
{"version":3,"file":"select-Co76oy2I.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/chevron-up.js","../../src/components/ui/select/select.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m18 15-6-6-6 6\", key: \"153udz\" }]];\nconst ChevronUp = createLucideIcon(\"ChevronUp\", __iconNode);\n\nexport { __iconNode, ChevronUp as default };\n//# sourceMappingURL=chevron-up.js.map\n","import { cn } from \"@/lib/utils\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\nimport React from \"react\";\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n\treturn <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n\treturn <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n\treturn <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger>) {\n\treturn (\n\t\t<SelectPrimitive.Trigger\n\t\t\tdata-slot=\"select-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input text-muted-foreground ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full cursor-pointer items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SelectPrimitive.Icon asChild>\n\t\t\t\t<ChevronDownIcon className=\"size-4 opacity-50\" />\n\t\t\t</SelectPrimitive.Icon>\n\t\t</SelectPrimitive.Trigger>\n\t);\n}\n\nfunction SelectContent({\n\tclassName,\n\tchildren,\n\tposition = \"popper\",\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n\treturn (\n\t\t<SelectPrimitive.Portal>\n\t\t\t<SelectPrimitive.Content\n\t\t\t\tdata-slot=\"select-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tposition={position}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SelectScrollUpButton />\n\t\t\t\t<SelectPrimitive.Viewport\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"p-1\",\n\t\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\t\"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SelectPrimitive.Viewport>\n\t\t\t\t<SelectScrollDownButton />\n\t\t\t</SelectPrimitive.Content>\n\t\t</SelectPrimitive.Portal>\n\t);\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n\treturn (\n\t\t<SelectPrimitive.Label\n\t\t\tdata-slot=\"select-label\"\n\t\t\tclassName={cn(\"py-1.5 pr-2 pl-8 text-sm font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SelectItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n\treturn (\n\t\t<SelectPrimitive.Item\n\t\t\tdata-slot=\"select-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"size-4\" />\n\t\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t\t</SelectPrimitive.Item>\n\t);\n}\n\nfunction SelectSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n\treturn (\n\t\t<SelectPrimitive.Separator\n\t\t\tdata-slot=\"select-separator\"\n\t\t\tclassName={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SelectScrollUpButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollUpButton\n\t\t\tdata-slot=\"select-scroll-up-button\"\n\t\t\tclassName={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronUpIcon className=\"size-4\" />\n\t\t</SelectPrimitive.ScrollUpButton>\n\t);\n}\n\nfunction SelectScrollDownButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollDownButton\n\t\t\tdata-slot=\"select-scroll-down-button\"\n\t\t\tclassName={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronDownIcon className=\"size-4\" />\n\t\t</SelectPrimitive.ScrollDownButton>\n\t);\n}\n\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectScrollDownButton,\n\tSelectScrollUpButton,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n};\n"],"names":["ChevronUp","createLucideIcon","d","key","Select","props","React","createElement","SelectPrimitive","Root","data-slot","SelectGroup","Group","SelectValue","Value","SelectTrigger","className","children","Trigger","cn","Icon","asChild","ChevronDownIcon","SelectContent","position","Portal","Content","SelectScrollUpButton","Viewport","SelectScrollDownButton","SelectLabel","Label","SelectItem","Item","span","ItemIndicator","CheckIcon","ItemText","SelectSeparator","Separator","ScrollUpButton","ChevronUpIcon","ScrollDownButton"],"mappings":"oPAGa,MAaPA,EAAYC,EAAiB,YAbC,CAAC,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK,aCE1E,SAASC,MAAYC,IACpB,OAAOC,EAAAC,cAACC,EAAgBC,KAAI,CAACC,YAAU,YAAaL,GACrD,CAEA,SAASM,MAAiBN,IACzB,OAAOC,EAAAC,cAACC,EAAgBI,MAAK,CAACF,YAAU,kBAAmBL,GAC5D,CAEA,SAASQ,MAAiBR,IACzB,OAAOC,EAAAC,cAACC,EAAgBM,MAAK,CAACJ,YAAU,kBAAmBL,GAC5D,CAEA,SAASU,GAAcC,UACtBA,EAASC,SACTA,KACGZ,IAEH,OACCC,EAAAC,cAACC,EAAgBU,QAAO,CACvBR,YAAU,iBACVM,UAAWG,EACV,gWACAH,MAEGX,GAEHY,EACDX,EAAAC,cAACC,EAAgBY,KAAI,CAACC,SAAAA,GACrBf,EAACgB,cAAAA,EAAAA,CAAgBN,UAAU,uBAI/B,CAEA,SAASO,GAAcP,UACtBA,EAASC,SACTA,EAAQO,SACRA,EAAW,YACRnB,IAEH,OACCC,gBAACE,EAAgBiB,OAChB,KAAAnB,EAAAC,cAACC,EAAgBkB,QAAO,CACvBhB,YAAU,iBACVM,UAAWG,EACV,scACa,WAAbK,GACC,kIACDR,GAEDQ,SAAUA,KACNnB,GAEJC,EAACqB,cAAAA,EAAAA,MACDrB,EAACE,cAAAA,EAAgBoB,SAAQ,CACxBZ,UAAWG,EACV,MACa,WAAbK,GACC,wGAGDP,GAEFX,EAACuB,cAAAA,EAAAA,OAIL,CAEA,SAASC,GAAYd,UAAEA,KAAcX,IACpC,OACCC,EAAAC,cAACC,EAAgBuB,MAAK,CACrBrB,YAAU,eACVM,UAAWG,EAAG,yCAA0CH,MACpDX,GAGP,CAEA,SAAS2B,GAAWhB,UACnBA,EAASC,SACTA,KACGZ,IAEH,OACCC,EAAAC,cAACC,EAAgByB,KAAI,CACpBvB,YAAU,cACVM,UAAWG,EACV,4NACAH,MAEGX,GAEJC,EAAC4B,cAAAA,OAAAA,CAAKlB,UAAU,6DACfV,EAACE,cAAAA,EAAgB2B,cAAa,KAC7B7B,EAAC8B,cAAAA,EAAAA,CAAUpB,UAAU,aAGvBV,EAACE,cAAAA,EAAgB6B,SAAUpB,KAAAA,GAG9B,CAEA,SAASqB,GAAgBtB,UACxBA,KACGX,IAEH,OACCC,EAAAC,cAACC,EAAgB+B,UAAS,CACzB7B,YAAU,mBACVM,UAAWG,EAAG,2BAA4BH,MACtCX,GAGP,CAEA,SAASsB,GAAqBX,UAC7BA,KACGX,IAEH,OACCC,EAAAC,cAACC,EAAgBgC,eAAc,CAC9B9B,YAAU,0BACVM,UAAWG,EAAG,uDAAwDH,MAClEX,GAEJC,EAACmC,cAAAA,EAAAA,CAAczB,UAAU,WAG5B,CAEA,SAASa,GAAuBb,UAC/BA,KACGX,IAEH,OACCC,EAAAC,cAACC,EAAgBkC,iBAAgB,CAChChC,YAAU,4BACVM,UAAWG,EAAG,uDAAwDH,MAClEX,GAEJC,EAACgB,cAAAA,EAAAA,CAAgBN,UAAU,WAG9B","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e}from"./utils-
|
2
|
-
//# sourceMappingURL=skeleton-
|
1
|
+
import{c as e}from"./utils-B9uwc_lt.mjs";import t from"react";function a({className:a,...m}){return t.createElement("div",{"data-slot":"skeleton",className:e("bg-muted animate-pulse rounded-md",a),...m})}export{a as S};
|
2
|
+
//# sourceMappingURL=skeleton-cvIjllDp.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"skeleton-
|
1
|
+
{"version":3,"file":"skeleton-cvIjllDp.mjs","sources":["../../src/components/ui/skeleton/skeleton.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport React from \"react\";\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"skeleton\"\n\t\t\tclassName={cn(\"bg-muted animate-pulse rounded-md\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Skeleton };\n"],"names":["Skeleton","className","props","React","div","data-slot","cn"],"mappings":"8DAEA,SAASA,GAASC,UAAEA,KAAcC,IACjC,OACCC,EAACC,cAAAA,MAAAA,CACAC,YAAU,WACVJ,UAAWK,EAAG,oCAAqCL,MAC/CC,GAGP"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import t,{useLayoutEffect as n,useEffect as r,useRef as i,useMemo as o,useCallback as a,useState as l,memo as s,useReducer as c,createContext as d,useContext as u,forwardRef as g,cloneElement as f}from"react";import{unstable_batchedUpdates as v,createPortal as h}from"react-dom";import{Slot as p}from"@radix-ui/react-slot";import{c as m}from"./utils-C6LYO_CH.mjs";import{B as b}from"./button-L19W2fGF.mjs";const y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function w(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function x(e){return"nodeType"in e}function D(e){var t,n;return e?w(e)?e:x(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function E(e){const{Document:t}=D(e);return e instanceof t}function C(e){return!w(e)&&e instanceof D(e).HTMLElement}function R(e){return e instanceof D(e).SVGElement}function S(e){return e?w(e)?e.document:x(e)?E(e)?e:C(e)||R(e)?e.ownerDocument:document:document:document}const N=y?n:r;function I(e){const t=i(e);return N((()=>{t.current=e})),a((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function O(e,t){void 0===t&&(t=[e]);const n=i(e);return N((()=>{n.current!==e&&(n.current=e)}),t),n}function T(e,t){const n=i();return o((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function A(e){const t=I(e),n=i(null),r=a((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function M(e){const t=i();return r((()=>{t.current=e}),[e]),t.current}let L={};function k(e,t){return o((()=>{if(t)return t;const n=null==L[e]?0:L[e]+1;return L[e]=n,e+"-"+n}),[e,t])}function B(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t}),{...t})}}const P=B(1),z=B(-1);function j(e){if(!e)return!1;const{KeyboardEvent:t}=D(e.target);return t&&e instanceof t}function X(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=D(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Y=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Y.Translate.toString(e),Y.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),F="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function K(e){return e.matches(F)?e:e.querySelector(F)}const W={display:"none"};function U(e){let{id:n,value:r}=e;return t.createElement("div",{id:n,style:W},r)}function H(e){let{id:n,announcement:r,ariaLiveType:i="assertive"}=e;return t.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},r)}const J=d(null);const V={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},q={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function G(e){let{announcements:n=q,container:i,hiddenTextDescribedById:s,screenReaderInstructions:c=V}=e;const{announce:d,announcement:g}=function(){const[e,t]=l("");return{announce:a((e=>{null!=e&&t(e)}),[]),announcement:e}}(),f=k("DndLiveRegion"),[v,p]=l(!1);if(r((()=>{p(!0)}),[]),function(e){const t=u(J);r((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(o((()=>({onDragStart(e){let{active:t}=e;d(n.onDragStart({active:t}))},onDragMove(e){let{active:t,over:r}=e;n.onDragMove&&d(n.onDragMove({active:t,over:r}))},onDragOver(e){let{active:t,over:r}=e;d(n.onDragOver({active:t,over:r}))},onDragEnd(e){let{active:t,over:r}=e;d(n.onDragEnd({active:t,over:r}))},onDragCancel(e){let{active:t,over:r}=e;d(n.onDragCancel({active:t,over:r}))}})),[d,n])),!v)return null;const m=t.createElement(t.Fragment,null,t.createElement(U,{id:s,value:c.draggable}),t.createElement(H,{id:f,announcement:g}));return i?h(m,i):m}var Q;function Z(){}function $(e,t){return o((()=>({sensor:e,options:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Q||(Q={}));const _=Object.freeze({x:0,y:0});function ee(e,t){const n=X(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function te(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ne(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function re(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const ie=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=re(t,t.left,t.top),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(a=re(r),l=i,Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)));o.push({id:t,data:{droppableContainer:e,value:n}})}}var a,l;return o.sort(te)};function oe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,l=o-n;if(r<i&&n<o){const n=t.width*t.height,r=e.width*e.height,i=a*l;return Number((i/(n+r-i)).toFixed(4))}return 0}const ae=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=n.get(r);if(o){const n=oe(o,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ne)};function le(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:_}function se(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const ce=se(1);function de(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const ue={ignoreTransform:!1};function ge(e,t){void 0===t&&(t=ue);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=D(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=de(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,u=o?e.height/o:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}(n,t,r))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function fe(e){return ge(e,{ignoreTransform:!0})}function ve(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(E(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!C(i)||R(i))return n;if(n.includes(i))return n;const o=D(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=D(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(i,o)&&n.push(i),function(e,t){return void 0===t&&(t=D(e).getComputedStyle(e)),"fixed"===t.position}(i,o)?n:r(i.parentNode)}(e):n}function he(e){const[t]=ve(e,1);return null!=t?t:null}function pe(e){return y&&e?w(e)?e:x(e)?E(e)||e===S(e).scrollingElement?window:C(e)?e:null:null:null}function me(e){return w(e)?e.scrollX:e.scrollLeft}function be(e){return w(e)?e.scrollY:e.scrollTop}function ye(e){return{x:me(e),y:be(e)}}var we;function xe(e){return!(!y||!e)&&e===document.scrollingElement}function De(e){const t={x:0,y:0},n=xe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(we||(we={}));const Ee={x:.2,y:.2};function Ce(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===i&&(i=Ee);const{isTop:c,isBottom:d,isLeft:u,isRight:g}=De(e),f={x:0,y:0},v={x:0,y:0},h=t.height*i.y,p=t.width*i.x;return!c&&o<=t.top+h?(f.y=we.Backward,v.y=r*Math.abs((t.top+h-o)/h)):!d&&s>=t.bottom-h&&(f.y=we.Forward,v.y=r*Math.abs((t.bottom-h-s)/h)),!g&&l>=t.right-p?(f.x=we.Forward,v.x=r*Math.abs((t.right-p-l)/p)):!u&&a<=t.left+p&&(f.x=we.Backward,v.x=r*Math.abs((t.left+p-a)/p)),{direction:f,speed:v}}function Re(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Se(e){return e.reduce(((e,t)=>P(e,ye(t))),_)}function Ne(e,t){if(void 0===t&&(t=ge),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);he(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ie=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+me(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+be(t)),0)}]];class Oe{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ve(t),r=Se(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of Ie)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=i(n),a=r[e]-t;return this.rect[o]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Te{add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}}function Ae(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Me,Le;function ke(e){e.preventDefault()}function Be(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Me||(Me={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Le||(Le={}));const Pe={start:[Le.Space,Le.Enter],cancel:[Le.Esc],end:[Le.Space,Le.Enter,Le.Tab]},ze=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Le.Right:return{...n,x:n.x+25};case Le.Left:return{...n,x:n.x-25};case Le.Down:return{...n,y:n.y+25};case Le.Up:return{...n,y:n.y-25}}};class je{attach(){this.handleStart(),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Me.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Ne(n),t(_)}handleKeyDown(e){if(j(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Pe,coordinateGetter:o=ze,scrollBehavior:a="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:_;this.referenceCoordinates||(this.referenceCoordinates=c);const d=o(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=z(d,c),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:o,isRight:l,isLeft:s,isBottom:c,maxScroll:u,minScroll:g}=De(n),f=Re(n),v={x:Math.min(i===Le.Right?f.right-f.width/2:f.right,Math.max(i===Le.Right?f.left:f.left+f.width/2,d.x)),y:Math.min(i===Le.Down?f.bottom-f.height/2:f.bottom,Math.max(i===Le.Down?f.top:f.top+f.height/2,d.y))},h=i===Le.Right&&!l||i===Le.Left&&!s,p=i===Le.Down&&!c||i===Le.Up&&!o;if(h&&v.x!==d.x){const e=n.scrollLeft+t.x,o=i===Le.Right&&e<=u.x||i===Le.Left&&e>=g.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=o?n.scrollLeft-e:i===Le.Right?n.scrollLeft-u.x:n.scrollLeft-g.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(p&&v.y!==d.y){const e=n.scrollTop+t.y,o=i===Le.Down&&e<=u.y||i===Le.Up&&e>=g.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=o?n.scrollTop-e:i===Le.Down?n.scrollTop-u.y:n.scrollTop-g.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,P(z(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Te(S(t)),this.windowListeners=new Te(D(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}}function Xe(e){return Boolean(e&&"distance"in e)}function Ye(e){return Boolean(e&&"delay"in e)}je.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Pe,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=o.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class Fe{attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.DragStart,ke),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),this.windowListeners.add(Me.ContextMenu,ke),this.documentListeners.add(Me.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ye(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Xe(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Me.Click,Be,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Me.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!r)return;const l=null!=(t=X(e))?t:_,s=z(r,l);if(!n&&a){if(Xe(a)){if(null!=a.tolerance&&Ae(s,a.tolerance))return this.handleCancel();if(Ae(s,a.distance))return this.handleStart()}return Ye(a)&&Ae(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Le.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=D(e);return e instanceof t?e:S(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:o}=i;this.props=e,this.events=t,this.document=S(o),this.documentListeners=new Te(this.document),this.listeners=new Te(n),this.windowListeners=new Te(D(o)),this.initialCoordinates=null!=(r=X(i))?r:_,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}}const Ke={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class We extends Fe{constructor(e){const{event:t}=e,n=S(t.target);super(e,Ke,n)}}We.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Ue={move:{name:"mousemove"},end:{name:"mouseup"}};var He;!function(e){e[e.RightClick=2]="RightClick"}(He||(He={}));class Je extends Fe{constructor(e){super(e,Ue,S(e.event.target))}}Je.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==He.RightClick&&(null==r||r({event:n}),!0)}}];const Ve={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class qe extends Fe{static setup(){return window.addEventListener(Ve.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ve.move.name,e)};function e(){}}constructor(e){super(e,Ve)}}var Ge,Qe;function Ze(e){let{acceleration:t,activator:n=Ge.Pointer,canScroll:l,draggingRect:s,enabled:c,interval:d=5,order:u=Qe.TreeOrder,pointerCoordinates:g,scrollableAncestors:f,scrollableAncestorRects:v,delta:h,threshold:p}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=M(t);return T((e=>{if(n||!r||!e)return $e;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[we.Backward]:e.x[we.Backward]||-1===i.x,[we.Forward]:e.x[we.Forward]||1===i.x},y:{[we.Backward]:e.y[we.Backward]||-1===i.y,[we.Forward]:e.y[we.Forward]||1===i.y}}}),[n,t,r])}({delta:h,disabled:!c}),[b,y]=function(){const e=i(null);return[a(((t,n)=>{e.current=setInterval(t,n)}),[]),a((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),w=i({x:0,y:0}),x=i({x:0,y:0}),D=o((()=>{switch(n){case Ge.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case Ge.DraggableRect:return s}}),[n,s,g]),E=i(null),C=a((()=>{const e=E.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)}),[]),R=o((()=>u===Qe.TreeOrder?[...f].reverse():f),[u,f]);r((()=>{if(c&&f.length&&D){for(const e of R){if(!1===(null==l?void 0:l(e)))continue;const n=f.indexOf(e),r=v[n];if(!r)continue;const{direction:i,speed:o}=Ce(e,r,D,t,p);for(const e of["x","y"])m[e][i[e]]||(o[e]=0,i[e]=0);if(o.x>0||o.y>0)return y(),E.current=e,b(C,d),w.current=o,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()}),[t,C,l,y,c,d,JSON.stringify(D),JSON.stringify(m),b,f,R,v,JSON.stringify(p)])}qe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Ge||(Ge={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Qe||(Qe={}));const $e={x:{[we.Backward]:!1,[we.Forward]:!1},y:{[we.Backward]:!1,[we.Forward]:!1}};var _e,et;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(_e||(_e={})),function(e){e.Optimized="optimized"}(et||(et={}));const tt=new Map;function nt(e,t){return T((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function rt(e){let{callback:t,disabled:n}=e;const i=I(t),a=o((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)}),[n]);return r((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function it(e){return new Oe(ge(e),e)}function ot(e,t,n){void 0===t&&(t=it);const[i,a]=l(null);function s(){a((r=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const o=t(e);return JSON.stringify(r)===JSON.stringify(o)?r:o}))}const c=function(e){let{callback:t,disabled:n}=e;const i=I(t),a=o((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)}),[i,n]);return r((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){s();break}}}}),d=rt({callback:s});return N((()=>{s(),e?(null==d||d.observe(e),null==c||c.observe(document.body,{childList:!0,subtree:!0})):(null==d||d.disconnect(),null==c||c.disconnect())}),[e]),i}const at=[];function lt(e,t){void 0===t&&(t=[]);const n=i(null);return r((()=>{n.current=null}),t),r((()=>{const t=e!==_;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?z(e,n.current):_}function st(e){return o((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const ct=[];function dt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return C(t)?t:e}const ut=[{sensor:We,options:{}},{sensor:je,options:{}}],gt={current:{}},ft={draggable:{measure:fe},droppable:{measure:fe,strategy:_e.WhileDragging,frequency:et.Optimized},dragOverlay:{measure:ge}};class vt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const ht={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Z},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ft,measureDroppableContainers:Z,windowRect:null,measuringScheduled:!1},pt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Z,draggableNodes:new Map,over:null,measureDroppableContainers:Z},mt=d(pt),bt=d(ht);function yt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vt}}}function wt(e,t){switch(t.type){case Q.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Q.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Q.DragEnd:case Q.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Q.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new vt(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Q.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new vt(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Q.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new vt(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function xt(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:o}=u(mt),a=M(i),l=M(null==n?void 0:n.id);return r((()=>{if(!t&&!i&&a&&null!=l){if(!j(a))return;if(document.activeElement===a.target)return;const e=o.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=K(e);if(t){t.focus();break}}}))}}),[i,t,o,l,a]),null}function Dt(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Et=d({..._,scaleX:1,scaleY:1});var Ct;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ct||(Ct={}));const Rt=s((function(e){var n,s,d,u;let{id:g,accessibility:f,autoScroll:h=!0,children:p,sensors:m=ut,collisionDetection:b=ae,measuring:w,modifiers:x,...E}=e;const R=c(wt,void 0,yt),[S,I]=R,[M,L]=function(){const[e]=l((()=>new Set)),t=a((t=>(e.add(t),()=>e.delete(t))),[e]);return[a((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[B,z]=l(Ct.Uninitialized),j=B===Ct.Initialized,{draggable:{active:Y,nodes:F,translate:K},droppable:{containers:W}}=S,U=null!=Y?F.get(Y):null,H=i({initial:null,translated:null}),V=o((()=>{var e;return null!=Y?{id:Y,data:null!=(e=null==U?void 0:U.data)?e:gt,rect:H}:null}),[Y,U]),q=i(null),[Z,$]=l(null),[ee,te]=l(null),ne=O(E,Object.values(E)),re=k("DndDescribedBy",g),ie=o((()=>W.getEnabled()),[W]),oe=o((()=>({draggable:{...ft.draggable,...null==se?void 0:se.draggable},droppable:{...ft.droppable,...null==se?void 0:se.droppable},dragOverlay:{...ft.dragOverlay,...null==se?void 0:se.dragOverlay}})),[null==(se=w)?void 0:se.draggable,null==se?void 0:se.droppable,null==se?void 0:se.dragOverlay]);var se;const{droppableRects:de,measureDroppableContainers:ue,measuringScheduled:fe}=function(e,t){let{dragging:n,dependencies:o,config:s}=t;const[c,d]=l(null),{frequency:u,measure:g,strategy:f}=s,v=i(e),h=function(){switch(f){case _e.Always:return!1;case _e.BeforeDragging:return n;default:return!n}}(),p=O(h),m=a((function(e){void 0===e&&(e=[]),p.current||d((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),b=i(null),y=T((t=>{if(h&&!n)return tt;if(!t||t===tt||v.current!==e||null!=c){const t=new Map;for(let n of e){if(!n)continue;if(c&&c.length>0&&!c.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Oe(g(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,c,n,h,g]);return r((()=>{v.current=e}),[e]),r((()=>{h||m()}),[n,h]),r((()=>{c&&c.length>0&&d(null)}),[JSON.stringify(c)]),r((()=>{h||"number"!=typeof u||null!==b.current||(b.current=setTimeout((()=>{m(),b.current=null}),u))}),[u,h,m,...o]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:null!=c}}(ie,{dragging:j,dependencies:[K.x,K.y],config:oe.droppable}),me=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return T((e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(F,Y),be=o((()=>ee?X(ee):null),[ee]),we=function(){const e=!1===(null==Z?void 0:Z.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=j&&!e&&!t;if("object"==typeof h)return{...h,enabled:n};return{enabled:n}}(),De=function(e,t){return nt(e,t)}(me,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=i(!1),{x:l,y:s}="boolean"==typeof o?{x:o,y:o}:o;N((()=>{if(!l&&!s||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=le(n(e),r);if(l||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=he(e);t&&t.scrollBy({top:i.y,left:i.x})}}),[t,l,s,r,n])}({activeNode:null!=Y?F.get(Y):null,config:we.layoutShiftCompensation,initialRect:De,measure:oe.draggable.measure});const Ee=ot(me,oe.draggable.measure,De),Ce=ot(me?me.parentElement:null),Re=i({activatorEvent:null,active:null,activeNode:me,collisionRect:null,collisions:null,droppableRects:de,draggableNodes:F,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ne=W.getNodeFor(null==(n=Re.current.over)?void 0:n.id),Ie=function(e){let{measure:t}=e;const[n,r]=l(null),i=rt({callback:a((e=>{for(const{target:n}of e)if(C(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),s=a((e=>{const n=dt(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[c,d]=A(s);return o((()=>({nodeRef:c,rect:n,setRef:d})),[n,c,d])}({measure:oe.dragOverlay.measure}),Te=null!=(s=Ie.nodeRef.current)?s:me,Ae=j?null!=(d=Ie.rect)?d:Ee:null,Me=Boolean(Ie.nodeRef.current&&Ie.rect),Le=le(ke=Me?null:Ee,nt(ke));var ke;const Be=st(Te?D(Te):null),Pe=function(e){const t=i(e),n=T((n=>e?n&&n!==at&&e&&t.current&&e.parentNode===t.current.parentNode?n:ve(e):at),[e]);return r((()=>{t.current=e}),[e]),n}(j?null!=Ne?Ne:me:null),ze=function(e,t){void 0===t&&(t=ge);const[n]=e,r=st(n?D(n):null),[i,o]=l(ct);function a(){o((()=>e.length?e.map((e=>xe(e)?r:new Oe(t(e),e))):ct))}const s=rt({callback:a});return N((()=>{null==s||s.disconnect(),a(),e.forEach((e=>null==s?void 0:s.observe(e)))}),[e]),i}(Pe),je=Dt(x,{transform:{x:K.x-Le.x,y:K.y-Le.y,scaleX:1,scaleY:1},activatorEvent:ee,active:V,activeNodeRect:Ee,containerNodeRect:Ce,draggingNodeRect:Ae,over:Re.current.over,overlayNodeRect:Ie.rect,scrollableAncestors:Pe,scrollableAncestorRects:ze,windowRect:Be}),Xe=be?P(be,K):null,Ye=function(e){const[t,n]=l(null),s=i(e),c=a((e=>{const t=pe(e.target);t&&n((e=>e?(e.set(t,ye(t)),new Map(e)):null))}),[]);return r((()=>{const t=s.current;if(e!==t){r(t);const i=e.map((e=>{const t=pe(e);return t?(t.addEventListener("scroll",c,{passive:!0}),[t,ye(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),s.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=pe(e);null==t||t.removeEventListener("scroll",c)}))}}),[c,e]),o((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>P(e,t)),_):Se(e):_),[e,t])}(Pe),Fe=lt(Ye),Ke=lt(Ye,[Ee]),We=P(je,Fe),Ue=Ae?ce(Ae,je):null,He=V&&Ue?b({active:V,collisionRect:Ue,droppableRects:de,droppableContainers:ie,pointerCoordinates:Xe}):null,Je=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(He,"id"),[Ve,qe]=l(null),Ge=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Me?je:P(je,Ke),null!=(u=null==Ve?void 0:Ve.rect)?u:null,Ee),Qe=i(null),$e=a(((e,t)=>{let{sensor:n,options:r}=t;if(null==q.current)return;const i=F.get(q.current);if(!i)return;const o=e.nativeEvent,a=new n({active:q.current,activeNode:i,event:o,options:r,context:Re,onAbort(e){if(!F.get(e))return;const{onDragAbort:t}=ne.current,n={id:e};null==t||t(n),M({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!F.get(e))return;const{onDragPending:i}=ne.current,o={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(o),M({type:"onDragPending",event:o})},onStart(e){const t=q.current;if(null==t)return;const n=F.get(t);if(!n)return;const{onDragStart:r}=ne.current,i={activatorEvent:o,active:{id:t,data:n.data,rect:H}};v((()=>{null==r||r(i),z(Ct.Initializing),I({type:Q.DragStart,initialCoordinates:e,active:t}),M({type:"onDragStart",event:i}),$(Qe.current),te(o)}))},onMove(e){I({type:Q.DragMove,coordinates:e})},onEnd:l(Q.DragEnd),onCancel:l(Q.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=Re.current;let a=null;if(t&&i){const{cancelDrop:l}=ne.current;if(a={activatorEvent:o,active:t,collisions:n,delta:i,over:r},e===Q.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=Q.DragCancel)}}q.current=null,v((()=>{I({type:e}),z(Ct.Uninitialized),qe(null),$(null),te(null),Qe.current=null;const t=e===Q.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=ne.current[t];null==e||e(a),M({type:t,event:a})}}))}}Qe.current=a}),[F]),et=a(((e,t)=>(n,r)=>{const i=n.nativeEvent,o=F.get(r);if(null!==q.current||!o||i.dndKit||i.defaultPrevented)return;const a={active:o};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},q.current=r,$e(n,t))}),[F,$e]),it=function(e,t){return o((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,et);!function(e){r((()=>{if(!y)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(m),N((()=>{Ee&&B===Ct.Initializing&&z(Ct.Initialized)}),[Ee,B]),r((()=>{const{onDragMove:e}=ne.current,{active:t,activatorEvent:n,collisions:r,over:i}=Re.current;if(!t||!n)return;const o={active:t,activatorEvent:n,collisions:r,delta:{x:We.x,y:We.y},over:i};v((()=>{null==e||e(o),M({type:"onDragMove",event:o})}))}),[We.x,We.y]),r((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=Re.current;if(!e||null==q.current||!t||!i)return;const{onDragOver:o}=ne.current,a=r.get(Je),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:l};v((()=>{qe(l),null==o||o(s),M({type:"onDragOver",event:s})}))}),[Je]),N((()=>{Re.current={activatorEvent:ee,active:V,activeNode:me,collisionRect:Ue,collisions:He,droppableRects:de,draggableNodes:F,draggingNode:Te,draggingNodeRect:Ae,droppableContainers:W,over:Ve,scrollableAncestors:Pe,scrollAdjustedTranslate:We},H.current={initial:Ae,translated:Ue}}),[V,me,He,Ue,F,Te,Ae,de,W,Ve,Pe,We]),Ze({...we,delta:K,draggingRect:Ue,pointerCoordinates:Xe,scrollableAncestors:Pe,scrollableAncestorRects:ze});const vt=o((()=>({active:V,activeNode:me,activeNodeRect:Ee,activatorEvent:ee,collisions:He,containerNodeRect:Ce,dragOverlay:Ie,draggableNodes:F,droppableContainers:W,droppableRects:de,over:Ve,measureDroppableContainers:ue,scrollableAncestors:Pe,scrollableAncestorRects:ze,measuringConfiguration:oe,measuringScheduled:fe,windowRect:Be})),[V,me,Ee,ee,He,Ce,Ie,F,W,de,Ve,ue,Pe,ze,oe,fe,Be]),ht=o((()=>({activatorEvent:ee,activators:it,active:V,activeNodeRect:Ee,ariaDescribedById:{draggable:re},dispatch:I,draggableNodes:F,over:Ve,measureDroppableContainers:ue})),[ee,it,V,Ee,I,re,F,Ve,ue]);return t.createElement(J.Provider,{value:L},t.createElement(mt.Provider,{value:ht},t.createElement(bt.Provider,{value:vt},t.createElement(Et.Provider,{value:Ge},p)),t.createElement(xt,{disabled:!1===(null==f?void 0:f.restoreFocus)})),t.createElement(G,{...f,hiddenTextDescribedById:re}))})),St=d(null),Nt="button";function It(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=k("Draggable"),{activators:l,activatorEvent:s,active:c,activeNodeRect:d,ariaDescribedById:g,draggableNodes:f,over:v}=u(mt),{role:h=Nt,roleDescription:p="draggable",tabIndex:m=0}=null!=i?i:{},b=(null==c?void 0:c.id)===t,y=u(b?Et:St),[w,x]=A(),[D,E]=A(),C=function(e,t){return o((()=>e.reduce(((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e}),{})),[e,t])}(l,t),R=O(n);N((()=>(f.set(t,{id:t,key:a,node:w,activatorNode:D,data:R}),()=>{const e=f.get(t);e&&e.key===a&&f.delete(t)})),[f,t]);return{active:c,activatorEvent:s,activeNodeRect:d,attributes:o((()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":!(!b||h!==Nt)||void 0,"aria-roledescription":p,"aria-describedby":g.draggable})),[r,h,m,b,p,g.draggable]),isDragging:b,listeners:r?void 0:C,node:w,over:v,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function Ot(){return u(bt)}const Tt={timeout:25};function At(e){let{animation:n,children:r}=e;const[i,o]=l(null),[a,s]=l(null),c=M(r);return r||i||!c||o(c),N((()=>{if(!a)return;const e=null==i?void 0:i.key,t=null==i?void 0:i.props.id;null!=e&&null!=t?Promise.resolve(n(t,a)).then((()=>{o(null)})):o(null)}),[n,i,a]),t.createElement(t.Fragment,null,r,i?f(i,{ref:s}):null)}const Mt={x:0,y:0,scaleX:1,scaleY:1};function Lt(e){let{children:n}=e;return t.createElement(mt.Provider,{value:pt},t.createElement(Et.Provider,{value:Mt},n))}const kt={position:"fixed",touchAction:"none"},Bt=e=>j(e)?"transform 250ms ease":void 0,Pt=g(((e,n)=>{let{as:r,activatorEvent:i,adjustScale:o,children:a,className:l,rect:s,style:c,transform:d,transition:u=Bt}=e;if(!s)return null;const g=o?d:{...d,scaleX:1,scaleY:1},f={...kt,width:s.width,height:s.height,top:s.top,left:s.left,transform:Y.Transform.toString(g),transformOrigin:o&&i?ee(i,s):void 0,transition:"function"==typeof u?u(i):u,...c};return t.createElement(r,{className:l,style:f,ref:n},a)})),zt=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(null!=o&&o.active)for(const[e,t]of Object.entries(o.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},jt={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Y.Transform.toString(t)},{transform:Y.Transform.toString(n)}]},sideEffects:zt({styles:{active:{opacity:"0"}}})};function Xt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return I(((e,o)=>{if(null===t)return;const a=n.get(e);if(!a)return;const l=a.node.current;if(!l)return;const s=dt(o);if(!s)return;const{transform:c}=D(o).getComputedStyle(o),d=de(c);if(!d)return;const u="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...jt,...e};return e=>{let{active:o,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c={x:a.rect.left-o.rect.left,y:a.rect.top-o.rect.top},d={scaleX:1!==l.scaleX?o.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?o.rect.height*l.scaleY/a.rect.height:1},u={x:l.x-c.x,y:l.y-c.y,...d},g=i({...s,active:o,dragOverlay:a,transform:{initial:l,final:u}}),[f]=g,v=g[g.length-1];if(JSON.stringify(f)===JSON.stringify(v))return;const h=null==r?void 0:r({active:o,dragOverlay:a,...s}),p=a.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{p.onfinish=()=>{null==h||h(),e()}}))}}(t);return Ne(l,i.draggable.measure),u({active:{id:e,data:a.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:o,rect:i.dragOverlay.measure(s)},droppableContainers:r,measuringConfiguration:i,transform:d})}))}let Yt=0;function Ft(e){return o((()=>{if(null!=e)return Yt++,Yt}),[e])}const Kt=t.memo((e=>{let{adjustScale:n=!1,children:r,dropAnimation:i,style:o,transition:a,modifiers:l,wrapperElement:s="div",className:c,zIndex:d=999}=e;const{activatorEvent:g,active:f,activeNodeRect:v,containerNodeRect:h,draggableNodes:p,droppableContainers:m,dragOverlay:b,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:D,windowRect:E}=Ot(),C=u(Et),R=Ft(null==f?void 0:f.id),S=Dt(l,{activatorEvent:g,active:f,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:x,scrollableAncestorRects:D,transform:C,windowRect:E}),N=nt(v),I=Xt({config:i,draggableNodes:p,droppableContainers:m,measuringConfiguration:w}),O=N?b.setRef:void 0;return t.createElement(Lt,null,t.createElement(At,{animation:I},f&&R?t.createElement(Pt,{key:R,id:f.id,ref:O,as:s,activatorEvent:g,adjustScale:n,className:c,transition:a,rect:N,style:{zIndex:d,...o},transform:S},r):null))}));const Wt=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?function(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(r,n,t):r};function Ut(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ht(e,t){return e.reduce(((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e}),Array(e.length))}function Jt(e){return null!==e&&e>=0}const Vt={scaleX:1,scaleY:1};const qt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Ut(t,r,n),a=t[i],l=o[i];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},Gt={scaleX:1,scaleY:1};const Qt="Sortable",Zt=t.createContext({activeIndex:-1,containerId:Qt,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:qt,disabled:{draggable:!1,droppable:!1}});function $t(e){let{children:n,id:a,items:l,strategy:s=qt,disabled:c=!1}=e;const{active:d,dragOverlay:u,droppableRects:g,over:f,measureDroppableContainers:v}=Ot(),h=k(Qt,a),p=Boolean(null!==u.rect),m=o((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),b=null!=d,y=d?m.indexOf(d.id):-1,w=f?m.indexOf(f.id):-1,x=i(m),D=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(m,x.current),E=-1!==w&&-1===y||D,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);N((()=>{D&&b&&v(m)}),[D,m,b,v]),r((()=>{x.current=m}),[m]);const R=o((()=>({activeIndex:y,containerId:h,disabled:C,disableTransforms:E,items:m,overIndex:w,useDragOverlay:p,sortedRects:Ht(m,g),strategy:s})),[y,h,C.draggable,C.droppable,E,m,w,g,p,s]);return t.createElement(Zt.Provider,{value:R},n)}const _t=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Ut(n,r,i).indexOf(t)},en=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r)&&((l===o||i!==a)&&(!!n||a!==i&&t===s))},tn={duration:200,easing:"ease"},nn="transform",rn=Y.Transition.toString({property:nn,duration:0,easing:"linear"}),on={roleDescription:"sortable"};function an(e){let{animateLayoutChanges:t=en,attributes:n,disabled:s,data:c,getNewIndex:d=_t,id:g,strategy:f,resizeObserverConfig:v,transition:h=tn}=e;const{items:p,containerId:m,activeIndex:b,disabled:y,disableTransforms:w,sortedRects:x,overIndex:D,useDragOverlay:E,strategy:C}=u(Zt),R=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(s,y),S=p.indexOf(g),I=o((()=>({sortable:{containerId:m,index:S,items:p},...c})),[m,c,S,p]),T=o((()=>p.slice(p.indexOf(g))),[p,g]),{rect:M,node:L,isOver:B,setNodeRef:P}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:l}=e;const s=k("Droppable"),{active:c,dispatch:d,over:g,measureDroppableContainers:f}=u(mt),v=i({disabled:n}),h=i(!1),p=i(null),m=i(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...Tt,...l},x=O(null!=y?y:o),D=rt({callback:a((()=>{h.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{f(Array.isArray(x.current)?x.current:[x.current]),m.current=null}),w)):h.current=!0}),[w]),disabled:b||!c}),E=a(((e,t)=>{D&&(t&&(D.unobserve(t),h.current=!1),e&&D.observe(e))}),[D]),[C,R]=A(E),S=O(t);return r((()=>{D&&C.current&&(D.disconnect(),h.current=!1,D.observe(C.current))}),[C,D]),r((()=>(d({type:Q.RegisterDroppable,element:{id:o,key:s,disabled:n,node:C,rect:p,data:S}}),()=>d({type:Q.UnregisterDroppable,key:s,id:o}))),[o]),r((()=>{n!==v.current.disabled&&(d({type:Q.SetDroppableDisabled,id:o,key:s,disabled:n}),v.current.disabled=n)}),[o,s,n,d]),{active:c,rect:p,isOver:(null==g?void 0:g.id)===o,node:C,over:g,setNodeRef:R}}({id:g,data:I,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...v}}),{active:z,activatorEvent:X,activeNodeRect:F,attributes:K,setNodeRef:W,listeners:U,isDragging:H,over:J,setActivatorNodeRef:V,transform:q}=It({id:g,data:I,attributes:{...on,...n},disabled:R.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o((()=>e=>{t.forEach((t=>t(e)))}),t)}(P,W),Z=Boolean(z),$=Z&&!w&&Jt(b)&&Jt(D),_=!E&&H,ee=_&&$?q:null,te=$?null!=ee?ee:(null!=f?f:C)({rects:x,activeNodeRect:F,activeIndex:b,overIndex:D,index:S}):null,ne=Jt(b)&&Jt(D)?d({id:g,items:p,activeIndex:b,overIndex:D}):S,re=null==z?void 0:z.id,ie=i({activeId:re,items:p,newIndex:ne,containerId:m}),oe=p!==ie.current.items,ae=t({active:z,containerId:m,isDragging:H,isSorting:Z,id:g,index:S,items:p,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:h,wasDragging:null!=ie.current.activeId}),le=function(e){let{disabled:t,index:n,node:o,rect:a}=e;const[s,c]=l(null),d=i(n);return N((()=>{if(!t&&n!==d.current&&o.current){const e=a.current;if(e){const t=ge(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==d.current&&(d.current=n)}),[t,n,o,a]),r((()=>{s&&c(null)}),[s]),s}({disabled:!ae,index:S,node:L,rect:M});return r((()=>{Z&&ie.current.newIndex!==ne&&(ie.current.newIndex=ne),m!==ie.current.containerId&&(ie.current.containerId=m),p!==ie.current.items&&(ie.current.items=p)}),[Z,ne,m,p]),r((()=>{if(re===ie.current.activeId)return;if(null!=re&&null==ie.current.activeId)return void(ie.current.activeId=re);const e=setTimeout((()=>{ie.current.activeId=re}),50);return()=>clearTimeout(e)}),[re]),{active:z,activeIndex:b,attributes:K,data:I,rect:M,index:S,newIndex:ne,items:p,isOver:B,isSorting:Z,isDragging:H,listeners:U,node:L,overIndex:D,over:J,setNodeRef:G,setActivatorNodeRef:V,setDroppableNodeRef:P,setDraggableNodeRef:W,transform:null!=le?le:te,transition:function(){if(le||oe&&ie.current.newIndex===S)return rn;if(_&&!j(X)||!h)return;if(Z||ae)return Y.Transition.toString({...h,property:nn});return}()}}function ln(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function sn(...e){return t=>{for(const n of e)ln(n,t)}}Le.Down,Le.Right,Le.Up,Le.Left;const cn={vertical:{modifiers:[e=>{let{transform:t}=e;return{...t,x:0}},Wt],strategy:e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:a}=e;const l=null!=(t=o[n])?t:r;if(!l)return null;if(i===n){const e=o[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...Gt}:null}const s=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];if(!r)return 0;if(n<t)return i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0;return o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0}(o,i,n);return i>n&&i<=a?{x:0,y:-l.height-s,...Gt}:i<n&&i>=a?{x:0,y:l.height+s,...Gt}:{x:0,y:0,...Gt}}},horizontal:{modifiers:[e=>{let{transform:t}=e;return{...t,y:0}},Wt],strategy:e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:o,index:a}=e;const l=null!=(t=n[i])?t:r;if(!l)return null;const s=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];if(!r||!i&&!o)return 0;if(n<t)return i?r.left-(i.left+i.width):o.left-(r.left+r.width);return o?o.left-(r.left+r.width):r.left-(i.left+i.width)}(n,a,i);if(a===i){const e=n[o];return e?{x:i<o?e.left+e.width-(l.left+l.width):e.left-l.left,y:0,...Vt}:null}return a>i&&a<=o?{x:-l.width-s,y:0,...Vt}:a<i&&a>=o?{x:l.width+s,y:0,...Vt}:{x:0,y:0,...Vt}}},mixed:{modifiers:[Wt],strategy:void 0}};function dn({value:t,onValueChange:n,collisionDetection:r=ie,modifiers:i,strategy:a,onMove:l,orientation:s="vertical",overlay:c,children:d,...u}){const[g,f]=e.useState(null),v=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o((()=>[...t].filter((e=>null!=e))),[...t])}($(Je),$(qe),$(je)),h=cn[s];return e.createElement(Rt,{modifiers:i??h.modifiers,sensors:v,onDragStart:({active:e})=>f(e.id),onDragEnd:({active:e,over:r})=>{if(r&&e.id!==r?.id){const i=t.findIndex((t=>t.id===e.id)),o=t.findIndex((e=>e.id===r.id));l?l({activeIndex:i,overIndex:o}):n?.(Ut(t,i,o))}f(null)},onDragCancel:()=>f(null),collisionDetection:r,...u},e.createElement($t,{items:t,strategy:a??h.strategy},d),c?e.createElement(gn,{activeId:g},c):null)}const un={sideEffects:zt({styles:{active:{opacity:"0.4"}}})},gn=e.forwardRef((({activeId:t,dropAnimation:n=un,children:r,...i},o)=>e.createElement(Kt,{dropAnimation:n,...i},t?e.createElement(vn,{ref:o,value:t,className:"cursor-grabbing",asChild:!0},r):null)));gn.displayName="SortableOverlay";const fn=e.createContext({attributes:{},listeners:void 0,isDragging:!1});const vn=e.forwardRef((({value:t,asTrigger:n,asChild:r,className:i,...o},a)=>{const{attributes:l,listeners:s,setNodeRef:c,transform:d,transition:u,isDragging:g}=an({id:t}),f=e.useMemo((()=>({attributes:l,listeners:s,isDragging:g})),[l,s,g]),v={opacity:g?.5:1,transform:Y.Translate.toString(d),transition:u},h=r?p:"div";return e.createElement(fn.Provider,{value:f},e.createElement(h,{"data-state":g?"dragging":void 0,className:m("data-[state=dragging]:cursor-grabbing",{"cursor-grab":!g&&n},i),ref:sn(a,c),style:v,...n?l:{},...n?s:{},...o}))}));vn.displayName="SortableItem";const hn=e.forwardRef((({className:t,...n},r)=>{const{attributes:i,listeners:o,isDragging:a}=function(){const t=e.useContext(fn);if(!t)throw new Error("useSortableItem must be used within a SortableItem");return t}();return e.createElement(b,{ref:sn(r),"data-state":a?"dragging":void 0,className:m("cursor-grab data-[state=dragging]:cursor-grabbing",t),...i,...o,...n})}));hn.displayName="SortableDragHandle";export{dn as S,hn as a,vn as b,gn as c};
|
2
|
-
//# sourceMappingURL=sortable-
|
1
|
+
import*as e from"react";import t,{useLayoutEffect as n,useEffect as r,useRef as i,useMemo as o,useCallback as a,useState as l,memo as s,useReducer as c,createContext as d,useContext as u,forwardRef as g,cloneElement as f}from"react";import{unstable_batchedUpdates as v,createPortal as h}from"react-dom";import{Slot as p}from"@radix-ui/react-slot";import{c as m}from"./utils-B9uwc_lt.mjs";import{B as b}from"./button-B7K2JEBG.mjs";const y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function w(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function x(e){return"nodeType"in e}function D(e){var t,n;return e?w(e)?e:x(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function E(e){const{Document:t}=D(e);return e instanceof t}function C(e){return!w(e)&&e instanceof D(e).HTMLElement}function R(e){return e instanceof D(e).SVGElement}function S(e){return e?w(e)?e.document:x(e)?E(e)?e:C(e)||R(e)?e.ownerDocument:document:document:document}const N=y?n:r;function I(e){const t=i(e);return N((()=>{t.current=e})),a((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function O(e,t){void 0===t&&(t=[e]);const n=i(e);return N((()=>{n.current!==e&&(n.current=e)}),t),n}function T(e,t){const n=i();return o((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function A(e){const t=I(e),n=i(null),r=a((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function M(e){const t=i();return r((()=>{t.current=e}),[e]),t.current}let L={};function k(e,t){return o((()=>{if(t)return t;const n=null==L[e]?0:L[e]+1;return L[e]=n,e+"-"+n}),[e,t])}function B(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t}),{...t})}}const P=B(1),z=B(-1);function j(e){if(!e)return!1;const{KeyboardEvent:t}=D(e.target);return t&&e instanceof t}function X(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=D(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Y=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Y.Translate.toString(e),Y.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),F="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function K(e){return e.matches(F)?e:e.querySelector(F)}const W={display:"none"};function U(e){let{id:n,value:r}=e;return t.createElement("div",{id:n,style:W},r)}function H(e){let{id:n,announcement:r,ariaLiveType:i="assertive"}=e;return t.createElement("div",{id:n,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},r)}const J=d(null);const V={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},q={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function G(e){let{announcements:n=q,container:i,hiddenTextDescribedById:s,screenReaderInstructions:c=V}=e;const{announce:d,announcement:g}=function(){const[e,t]=l("");return{announce:a((e=>{null!=e&&t(e)}),[]),announcement:e}}(),f=k("DndLiveRegion"),[v,p]=l(!1);if(r((()=>{p(!0)}),[]),function(e){const t=u(J);r((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(o((()=>({onDragStart(e){let{active:t}=e;d(n.onDragStart({active:t}))},onDragMove(e){let{active:t,over:r}=e;n.onDragMove&&d(n.onDragMove({active:t,over:r}))},onDragOver(e){let{active:t,over:r}=e;d(n.onDragOver({active:t,over:r}))},onDragEnd(e){let{active:t,over:r}=e;d(n.onDragEnd({active:t,over:r}))},onDragCancel(e){let{active:t,over:r}=e;d(n.onDragCancel({active:t,over:r}))}})),[d,n])),!v)return null;const m=t.createElement(t.Fragment,null,t.createElement(U,{id:s,value:c.draggable}),t.createElement(H,{id:f,announcement:g}));return i?h(m,i):m}var Q;function Z(){}function $(e,t){return o((()=>({sensor:e,options:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Q||(Q={}));const _=Object.freeze({x:0,y:0});function ee(e,t){const n=X(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function te(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ne(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function re(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const ie=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=re(t,t.left,t.top),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(a=re(r),l=i,Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)));o.push({id:t,data:{droppableContainer:e,value:n}})}}var a,l;return o.sort(te)};function oe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,l=o-n;if(r<i&&n<o){const n=t.width*t.height,r=e.width*e.height,i=a*l;return Number((i/(n+r-i)).toFixed(4))}return 0}const ae=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=n.get(r);if(o){const n=oe(o,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ne)};function le(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:_}function se(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const ce=se(1);function de(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const ue={ignoreTransform:!1};function ge(e,t){void 0===t&&(t=ue);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=D(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=de(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,u=o?e.height/o:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}(n,t,r))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function fe(e){return ge(e,{ignoreTransform:!0})}function ve(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(E(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!C(i)||R(i))return n;if(n.includes(i))return n;const o=D(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=D(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(i,o)&&n.push(i),function(e,t){return void 0===t&&(t=D(e).getComputedStyle(e)),"fixed"===t.position}(i,o)?n:r(i.parentNode)}(e):n}function he(e){const[t]=ve(e,1);return null!=t?t:null}function pe(e){return y&&e?w(e)?e:x(e)?E(e)||e===S(e).scrollingElement?window:C(e)?e:null:null:null}function me(e){return w(e)?e.scrollX:e.scrollLeft}function be(e){return w(e)?e.scrollY:e.scrollTop}function ye(e){return{x:me(e),y:be(e)}}var we;function xe(e){return!(!y||!e)&&e===document.scrollingElement}function De(e){const t={x:0,y:0},n=xe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(we||(we={}));const Ee={x:.2,y:.2};function Ce(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===i&&(i=Ee);const{isTop:c,isBottom:d,isLeft:u,isRight:g}=De(e),f={x:0,y:0},v={x:0,y:0},h=t.height*i.y,p=t.width*i.x;return!c&&o<=t.top+h?(f.y=we.Backward,v.y=r*Math.abs((t.top+h-o)/h)):!d&&s>=t.bottom-h&&(f.y=we.Forward,v.y=r*Math.abs((t.bottom-h-s)/h)),!g&&l>=t.right-p?(f.x=we.Forward,v.x=r*Math.abs((t.right-p-l)/p)):!u&&a<=t.left+p&&(f.x=we.Backward,v.x=r*Math.abs((t.left+p-a)/p)),{direction:f,speed:v}}function Re(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Se(e){return e.reduce(((e,t)=>P(e,ye(t))),_)}function Ne(e,t){if(void 0===t&&(t=ge),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);he(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ie=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+me(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+be(t)),0)}]];class Oe{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ve(t),r=Se(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of Ie)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=i(n),a=r[e]-t;return this.rect[o]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Te{add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}}function Ae(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Me,Le;function ke(e){e.preventDefault()}function Be(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Me||(Me={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Le||(Le={}));const Pe={start:[Le.Space,Le.Enter],cancel:[Le.Esc],end:[Le.Space,Le.Enter,Le.Tab]},ze=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Le.Right:return{...n,x:n.x+25};case Le.Left:return{...n,x:n.x-25};case Le.Down:return{...n,y:n.y+25};case Le.Up:return{...n,y:n.y-25}}};class je{attach(){this.handleStart(),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Me.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Ne(n),t(_)}handleKeyDown(e){if(j(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Pe,coordinateGetter:o=ze,scrollBehavior:a="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:_;this.referenceCoordinates||(this.referenceCoordinates=c);const d=o(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=z(d,c),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:o,isRight:l,isLeft:s,isBottom:c,maxScroll:u,minScroll:g}=De(n),f=Re(n),v={x:Math.min(i===Le.Right?f.right-f.width/2:f.right,Math.max(i===Le.Right?f.left:f.left+f.width/2,d.x)),y:Math.min(i===Le.Down?f.bottom-f.height/2:f.bottom,Math.max(i===Le.Down?f.top:f.top+f.height/2,d.y))},h=i===Le.Right&&!l||i===Le.Left&&!s,p=i===Le.Down&&!c||i===Le.Up&&!o;if(h&&v.x!==d.x){const e=n.scrollLeft+t.x,o=i===Le.Right&&e<=u.x||i===Le.Left&&e>=g.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=o?n.scrollLeft-e:i===Le.Right?n.scrollLeft-u.x:n.scrollLeft-g.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(p&&v.y!==d.y){const e=n.scrollTop+t.y,o=i===Le.Down&&e<=u.y||i===Le.Up&&e>=g.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=o?n.scrollTop-e:i===Le.Down?n.scrollTop-u.y:n.scrollTop-g.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,P(z(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Te(S(t)),this.windowListeners=new Te(D(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}}function Xe(e){return Boolean(e&&"distance"in e)}function Ye(e){return Boolean(e&&"delay"in e)}je.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Pe,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=o.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class Fe{attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.DragStart,ke),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),this.windowListeners.add(Me.ContextMenu,ke),this.documentListeners.add(Me.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ye(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Xe(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Me.Click,Be,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Me.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!r)return;const l=null!=(t=X(e))?t:_,s=z(r,l);if(!n&&a){if(Xe(a)){if(null!=a.tolerance&&Ae(s,a.tolerance))return this.handleCancel();if(Ae(s,a.distance))return this.handleStart()}return Ye(a)&&Ae(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Le.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=D(e);return e instanceof t?e:S(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:o}=i;this.props=e,this.events=t,this.document=S(o),this.documentListeners=new Te(this.document),this.listeners=new Te(n),this.windowListeners=new Te(D(o)),this.initialCoordinates=null!=(r=X(i))?r:_,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}}const Ke={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class We extends Fe{constructor(e){const{event:t}=e,n=S(t.target);super(e,Ke,n)}}We.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Ue={move:{name:"mousemove"},end:{name:"mouseup"}};var He;!function(e){e[e.RightClick=2]="RightClick"}(He||(He={}));class Je extends Fe{constructor(e){super(e,Ue,S(e.event.target))}}Je.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==He.RightClick&&(null==r||r({event:n}),!0)}}];const Ve={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class qe extends Fe{static setup(){return window.addEventListener(Ve.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ve.move.name,e)};function e(){}}constructor(e){super(e,Ve)}}var Ge,Qe;function Ze(e){let{acceleration:t,activator:n=Ge.Pointer,canScroll:l,draggingRect:s,enabled:c,interval:d=5,order:u=Qe.TreeOrder,pointerCoordinates:g,scrollableAncestors:f,scrollableAncestorRects:v,delta:h,threshold:p}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=M(t);return T((e=>{if(n||!r||!e)return $e;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[we.Backward]:e.x[we.Backward]||-1===i.x,[we.Forward]:e.x[we.Forward]||1===i.x},y:{[we.Backward]:e.y[we.Backward]||-1===i.y,[we.Forward]:e.y[we.Forward]||1===i.y}}}),[n,t,r])}({delta:h,disabled:!c}),[b,y]=function(){const e=i(null);return[a(((t,n)=>{e.current=setInterval(t,n)}),[]),a((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),w=i({x:0,y:0}),x=i({x:0,y:0}),D=o((()=>{switch(n){case Ge.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case Ge.DraggableRect:return s}}),[n,s,g]),E=i(null),C=a((()=>{const e=E.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)}),[]),R=o((()=>u===Qe.TreeOrder?[...f].reverse():f),[u,f]);r((()=>{if(c&&f.length&&D){for(const e of R){if(!1===(null==l?void 0:l(e)))continue;const n=f.indexOf(e),r=v[n];if(!r)continue;const{direction:i,speed:o}=Ce(e,r,D,t,p);for(const e of["x","y"])m[e][i[e]]||(o[e]=0,i[e]=0);if(o.x>0||o.y>0)return y(),E.current=e,b(C,d),w.current=o,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()}),[t,C,l,y,c,d,JSON.stringify(D),JSON.stringify(m),b,f,R,v,JSON.stringify(p)])}qe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Ge||(Ge={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Qe||(Qe={}));const $e={x:{[we.Backward]:!1,[we.Forward]:!1},y:{[we.Backward]:!1,[we.Forward]:!1}};var _e,et;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(_e||(_e={})),function(e){e.Optimized="optimized"}(et||(et={}));const tt=new Map;function nt(e,t){return T((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function rt(e){let{callback:t,disabled:n}=e;const i=I(t),a=o((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)}),[n]);return r((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function it(e){return new Oe(ge(e),e)}function ot(e,t,n){void 0===t&&(t=it);const[i,a]=l(null);function s(){a((r=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const o=t(e);return JSON.stringify(r)===JSON.stringify(o)?r:o}))}const c=function(e){let{callback:t,disabled:n}=e;const i=I(t),a=o((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)}),[i,n]);return r((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){s();break}}}}),d=rt({callback:s});return N((()=>{s(),e?(null==d||d.observe(e),null==c||c.observe(document.body,{childList:!0,subtree:!0})):(null==d||d.disconnect(),null==c||c.disconnect())}),[e]),i}const at=[];function lt(e,t){void 0===t&&(t=[]);const n=i(null);return r((()=>{n.current=null}),t),r((()=>{const t=e!==_;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?z(e,n.current):_}function st(e){return o((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const ct=[];function dt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return C(t)?t:e}const ut=[{sensor:We,options:{}},{sensor:je,options:{}}],gt={current:{}},ft={draggable:{measure:fe},droppable:{measure:fe,strategy:_e.WhileDragging,frequency:et.Optimized},dragOverlay:{measure:ge}};class vt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const ht={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Z},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ft,measureDroppableContainers:Z,windowRect:null,measuringScheduled:!1},pt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Z,draggableNodes:new Map,over:null,measureDroppableContainers:Z},mt=d(pt),bt=d(ht);function yt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vt}}}function wt(e,t){switch(t.type){case Q.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Q.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Q.DragEnd:case Q.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Q.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new vt(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Q.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new vt(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Q.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new vt(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function xt(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:o}=u(mt),a=M(i),l=M(null==n?void 0:n.id);return r((()=>{if(!t&&!i&&a&&null!=l){if(!j(a))return;if(document.activeElement===a.target)return;const e=o.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=K(e);if(t){t.focus();break}}}))}}),[i,t,o,l,a]),null}function Dt(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Et=d({..._,scaleX:1,scaleY:1});var Ct;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ct||(Ct={}));const Rt=s((function(e){var n,s,d,u;let{id:g,accessibility:f,autoScroll:h=!0,children:p,sensors:m=ut,collisionDetection:b=ae,measuring:w,modifiers:x,...E}=e;const R=c(wt,void 0,yt),[S,I]=R,[M,L]=function(){const[e]=l((()=>new Set)),t=a((t=>(e.add(t),()=>e.delete(t))),[e]);return[a((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[B,z]=l(Ct.Uninitialized),j=B===Ct.Initialized,{draggable:{active:Y,nodes:F,translate:K},droppable:{containers:W}}=S,U=null!=Y?F.get(Y):null,H=i({initial:null,translated:null}),V=o((()=>{var e;return null!=Y?{id:Y,data:null!=(e=null==U?void 0:U.data)?e:gt,rect:H}:null}),[Y,U]),q=i(null),[Z,$]=l(null),[ee,te]=l(null),ne=O(E,Object.values(E)),re=k("DndDescribedBy",g),ie=o((()=>W.getEnabled()),[W]),oe=o((()=>({draggable:{...ft.draggable,...null==se?void 0:se.draggable},droppable:{...ft.droppable,...null==se?void 0:se.droppable},dragOverlay:{...ft.dragOverlay,...null==se?void 0:se.dragOverlay}})),[null==(se=w)?void 0:se.draggable,null==se?void 0:se.droppable,null==se?void 0:se.dragOverlay]);var se;const{droppableRects:de,measureDroppableContainers:ue,measuringScheduled:fe}=function(e,t){let{dragging:n,dependencies:o,config:s}=t;const[c,d]=l(null),{frequency:u,measure:g,strategy:f}=s,v=i(e),h=function(){switch(f){case _e.Always:return!1;case _e.BeforeDragging:return n;default:return!n}}(),p=O(h),m=a((function(e){void 0===e&&(e=[]),p.current||d((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),b=i(null),y=T((t=>{if(h&&!n)return tt;if(!t||t===tt||v.current!==e||null!=c){const t=new Map;for(let n of e){if(!n)continue;if(c&&c.length>0&&!c.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Oe(g(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,c,n,h,g]);return r((()=>{v.current=e}),[e]),r((()=>{h||m()}),[n,h]),r((()=>{c&&c.length>0&&d(null)}),[JSON.stringify(c)]),r((()=>{h||"number"!=typeof u||null!==b.current||(b.current=setTimeout((()=>{m(),b.current=null}),u))}),[u,h,m,...o]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:null!=c}}(ie,{dragging:j,dependencies:[K.x,K.y],config:oe.droppable}),me=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return T((e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(F,Y),be=o((()=>ee?X(ee):null),[ee]),we=function(){const e=!1===(null==Z?void 0:Z.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=j&&!e&&!t;if("object"==typeof h)return{...h,enabled:n};return{enabled:n}}(),De=function(e,t){return nt(e,t)}(me,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=i(!1),{x:l,y:s}="boolean"==typeof o?{x:o,y:o}:o;N((()=>{if(!l&&!s||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=le(n(e),r);if(l||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=he(e);t&&t.scrollBy({top:i.y,left:i.x})}}),[t,l,s,r,n])}({activeNode:null!=Y?F.get(Y):null,config:we.layoutShiftCompensation,initialRect:De,measure:oe.draggable.measure});const Ee=ot(me,oe.draggable.measure,De),Ce=ot(me?me.parentElement:null),Re=i({activatorEvent:null,active:null,activeNode:me,collisionRect:null,collisions:null,droppableRects:de,draggableNodes:F,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ne=W.getNodeFor(null==(n=Re.current.over)?void 0:n.id),Ie=function(e){let{measure:t}=e;const[n,r]=l(null),i=rt({callback:a((e=>{for(const{target:n}of e)if(C(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),s=a((e=>{const n=dt(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[c,d]=A(s);return o((()=>({nodeRef:c,rect:n,setRef:d})),[n,c,d])}({measure:oe.dragOverlay.measure}),Te=null!=(s=Ie.nodeRef.current)?s:me,Ae=j?null!=(d=Ie.rect)?d:Ee:null,Me=Boolean(Ie.nodeRef.current&&Ie.rect),Le=le(ke=Me?null:Ee,nt(ke));var ke;const Be=st(Te?D(Te):null),Pe=function(e){const t=i(e),n=T((n=>e?n&&n!==at&&e&&t.current&&e.parentNode===t.current.parentNode?n:ve(e):at),[e]);return r((()=>{t.current=e}),[e]),n}(j?null!=Ne?Ne:me:null),ze=function(e,t){void 0===t&&(t=ge);const[n]=e,r=st(n?D(n):null),[i,o]=l(ct);function a(){o((()=>e.length?e.map((e=>xe(e)?r:new Oe(t(e),e))):ct))}const s=rt({callback:a});return N((()=>{null==s||s.disconnect(),a(),e.forEach((e=>null==s?void 0:s.observe(e)))}),[e]),i}(Pe),je=Dt(x,{transform:{x:K.x-Le.x,y:K.y-Le.y,scaleX:1,scaleY:1},activatorEvent:ee,active:V,activeNodeRect:Ee,containerNodeRect:Ce,draggingNodeRect:Ae,over:Re.current.over,overlayNodeRect:Ie.rect,scrollableAncestors:Pe,scrollableAncestorRects:ze,windowRect:Be}),Xe=be?P(be,K):null,Ye=function(e){const[t,n]=l(null),s=i(e),c=a((e=>{const t=pe(e.target);t&&n((e=>e?(e.set(t,ye(t)),new Map(e)):null))}),[]);return r((()=>{const t=s.current;if(e!==t){r(t);const i=e.map((e=>{const t=pe(e);return t?(t.addEventListener("scroll",c,{passive:!0}),[t,ye(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),s.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=pe(e);null==t||t.removeEventListener("scroll",c)}))}}),[c,e]),o((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>P(e,t)),_):Se(e):_),[e,t])}(Pe),Fe=lt(Ye),Ke=lt(Ye,[Ee]),We=P(je,Fe),Ue=Ae?ce(Ae,je):null,He=V&&Ue?b({active:V,collisionRect:Ue,droppableRects:de,droppableContainers:ie,pointerCoordinates:Xe}):null,Je=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(He,"id"),[Ve,qe]=l(null),Ge=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Me?je:P(je,Ke),null!=(u=null==Ve?void 0:Ve.rect)?u:null,Ee),Qe=i(null),$e=a(((e,t)=>{let{sensor:n,options:r}=t;if(null==q.current)return;const i=F.get(q.current);if(!i)return;const o=e.nativeEvent,a=new n({active:q.current,activeNode:i,event:o,options:r,context:Re,onAbort(e){if(!F.get(e))return;const{onDragAbort:t}=ne.current,n={id:e};null==t||t(n),M({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!F.get(e))return;const{onDragPending:i}=ne.current,o={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(o),M({type:"onDragPending",event:o})},onStart(e){const t=q.current;if(null==t)return;const n=F.get(t);if(!n)return;const{onDragStart:r}=ne.current,i={activatorEvent:o,active:{id:t,data:n.data,rect:H}};v((()=>{null==r||r(i),z(Ct.Initializing),I({type:Q.DragStart,initialCoordinates:e,active:t}),M({type:"onDragStart",event:i}),$(Qe.current),te(o)}))},onMove(e){I({type:Q.DragMove,coordinates:e})},onEnd:l(Q.DragEnd),onCancel:l(Q.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=Re.current;let a=null;if(t&&i){const{cancelDrop:l}=ne.current;if(a={activatorEvent:o,active:t,collisions:n,delta:i,over:r},e===Q.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=Q.DragCancel)}}q.current=null,v((()=>{I({type:e}),z(Ct.Uninitialized),qe(null),$(null),te(null),Qe.current=null;const t=e===Q.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=ne.current[t];null==e||e(a),M({type:t,event:a})}}))}}Qe.current=a}),[F]),et=a(((e,t)=>(n,r)=>{const i=n.nativeEvent,o=F.get(r);if(null!==q.current||!o||i.dndKit||i.defaultPrevented)return;const a={active:o};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},q.current=r,$e(n,t))}),[F,$e]),it=function(e,t){return o((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,et);!function(e){r((()=>{if(!y)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(m),N((()=>{Ee&&B===Ct.Initializing&&z(Ct.Initialized)}),[Ee,B]),r((()=>{const{onDragMove:e}=ne.current,{active:t,activatorEvent:n,collisions:r,over:i}=Re.current;if(!t||!n)return;const o={active:t,activatorEvent:n,collisions:r,delta:{x:We.x,y:We.y},over:i};v((()=>{null==e||e(o),M({type:"onDragMove",event:o})}))}),[We.x,We.y]),r((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=Re.current;if(!e||null==q.current||!t||!i)return;const{onDragOver:o}=ne.current,a=r.get(Je),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:l};v((()=>{qe(l),null==o||o(s),M({type:"onDragOver",event:s})}))}),[Je]),N((()=>{Re.current={activatorEvent:ee,active:V,activeNode:me,collisionRect:Ue,collisions:He,droppableRects:de,draggableNodes:F,draggingNode:Te,draggingNodeRect:Ae,droppableContainers:W,over:Ve,scrollableAncestors:Pe,scrollAdjustedTranslate:We},H.current={initial:Ae,translated:Ue}}),[V,me,He,Ue,F,Te,Ae,de,W,Ve,Pe,We]),Ze({...we,delta:K,draggingRect:Ue,pointerCoordinates:Xe,scrollableAncestors:Pe,scrollableAncestorRects:ze});const vt=o((()=>({active:V,activeNode:me,activeNodeRect:Ee,activatorEvent:ee,collisions:He,containerNodeRect:Ce,dragOverlay:Ie,draggableNodes:F,droppableContainers:W,droppableRects:de,over:Ve,measureDroppableContainers:ue,scrollableAncestors:Pe,scrollableAncestorRects:ze,measuringConfiguration:oe,measuringScheduled:fe,windowRect:Be})),[V,me,Ee,ee,He,Ce,Ie,F,W,de,Ve,ue,Pe,ze,oe,fe,Be]),ht=o((()=>({activatorEvent:ee,activators:it,active:V,activeNodeRect:Ee,ariaDescribedById:{draggable:re},dispatch:I,draggableNodes:F,over:Ve,measureDroppableContainers:ue})),[ee,it,V,Ee,I,re,F,Ve,ue]);return t.createElement(J.Provider,{value:L},t.createElement(mt.Provider,{value:ht},t.createElement(bt.Provider,{value:vt},t.createElement(Et.Provider,{value:Ge},p)),t.createElement(xt,{disabled:!1===(null==f?void 0:f.restoreFocus)})),t.createElement(G,{...f,hiddenTextDescribedById:re}))})),St=d(null),Nt="button";function It(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=k("Draggable"),{activators:l,activatorEvent:s,active:c,activeNodeRect:d,ariaDescribedById:g,draggableNodes:f,over:v}=u(mt),{role:h=Nt,roleDescription:p="draggable",tabIndex:m=0}=null!=i?i:{},b=(null==c?void 0:c.id)===t,y=u(b?Et:St),[w,x]=A(),[D,E]=A(),C=function(e,t){return o((()=>e.reduce(((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e}),{})),[e,t])}(l,t),R=O(n);N((()=>(f.set(t,{id:t,key:a,node:w,activatorNode:D,data:R}),()=>{const e=f.get(t);e&&e.key===a&&f.delete(t)})),[f,t]);return{active:c,activatorEvent:s,activeNodeRect:d,attributes:o((()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":!(!b||h!==Nt)||void 0,"aria-roledescription":p,"aria-describedby":g.draggable})),[r,h,m,b,p,g.draggable]),isDragging:b,listeners:r?void 0:C,node:w,over:v,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function Ot(){return u(bt)}const Tt={timeout:25};function At(e){let{animation:n,children:r}=e;const[i,o]=l(null),[a,s]=l(null),c=M(r);return r||i||!c||o(c),N((()=>{if(!a)return;const e=null==i?void 0:i.key,t=null==i?void 0:i.props.id;null!=e&&null!=t?Promise.resolve(n(t,a)).then((()=>{o(null)})):o(null)}),[n,i,a]),t.createElement(t.Fragment,null,r,i?f(i,{ref:s}):null)}const Mt={x:0,y:0,scaleX:1,scaleY:1};function Lt(e){let{children:n}=e;return t.createElement(mt.Provider,{value:pt},t.createElement(Et.Provider,{value:Mt},n))}const kt={position:"fixed",touchAction:"none"},Bt=e=>j(e)?"transform 250ms ease":void 0,Pt=g(((e,n)=>{let{as:r,activatorEvent:i,adjustScale:o,children:a,className:l,rect:s,style:c,transform:d,transition:u=Bt}=e;if(!s)return null;const g=o?d:{...d,scaleX:1,scaleY:1},f={...kt,width:s.width,height:s.height,top:s.top,left:s.left,transform:Y.Transform.toString(g),transformOrigin:o&&i?ee(i,s):void 0,transition:"function"==typeof u?u(i):u,...c};return t.createElement(r,{className:l,style:f,ref:n},a)})),zt=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(null!=o&&o.active)for(const[e,t]of Object.entries(o.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},jt={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Y.Transform.toString(t)},{transform:Y.Transform.toString(n)}]},sideEffects:zt({styles:{active:{opacity:"0"}}})};function Xt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return I(((e,o)=>{if(null===t)return;const a=n.get(e);if(!a)return;const l=a.node.current;if(!l)return;const s=dt(o);if(!s)return;const{transform:c}=D(o).getComputedStyle(o),d=de(c);if(!d)return;const u="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...jt,...e};return e=>{let{active:o,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c={x:a.rect.left-o.rect.left,y:a.rect.top-o.rect.top},d={scaleX:1!==l.scaleX?o.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?o.rect.height*l.scaleY/a.rect.height:1},u={x:l.x-c.x,y:l.y-c.y,...d},g=i({...s,active:o,dragOverlay:a,transform:{initial:l,final:u}}),[f]=g,v=g[g.length-1];if(JSON.stringify(f)===JSON.stringify(v))return;const h=null==r?void 0:r({active:o,dragOverlay:a,...s}),p=a.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{p.onfinish=()=>{null==h||h(),e()}}))}}(t);return Ne(l,i.draggable.measure),u({active:{id:e,data:a.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:o,rect:i.dragOverlay.measure(s)},droppableContainers:r,measuringConfiguration:i,transform:d})}))}let Yt=0;function Ft(e){return o((()=>{if(null!=e)return Yt++,Yt}),[e])}const Kt=t.memo((e=>{let{adjustScale:n=!1,children:r,dropAnimation:i,style:o,transition:a,modifiers:l,wrapperElement:s="div",className:c,zIndex:d=999}=e;const{activatorEvent:g,active:f,activeNodeRect:v,containerNodeRect:h,draggableNodes:p,droppableContainers:m,dragOverlay:b,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:D,windowRect:E}=Ot(),C=u(Et),R=Ft(null==f?void 0:f.id),S=Dt(l,{activatorEvent:g,active:f,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:x,scrollableAncestorRects:D,transform:C,windowRect:E}),N=nt(v),I=Xt({config:i,draggableNodes:p,droppableContainers:m,measuringConfiguration:w}),O=N?b.setRef:void 0;return t.createElement(Lt,null,t.createElement(At,{animation:I},f&&R?t.createElement(Pt,{key:R,id:f.id,ref:O,as:s,activatorEvent:g,adjustScale:n,className:c,transition:a,rect:N,style:{zIndex:d,...o},transform:S},r):null))}));const Wt=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?function(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(r,n,t):r};function Ut(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ht(e,t){return e.reduce(((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e}),Array(e.length))}function Jt(e){return null!==e&&e>=0}const Vt={scaleX:1,scaleY:1};const qt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Ut(t,r,n),a=t[i],l=o[i];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},Gt={scaleX:1,scaleY:1};const Qt="Sortable",Zt=t.createContext({activeIndex:-1,containerId:Qt,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:qt,disabled:{draggable:!1,droppable:!1}});function $t(e){let{children:n,id:a,items:l,strategy:s=qt,disabled:c=!1}=e;const{active:d,dragOverlay:u,droppableRects:g,over:f,measureDroppableContainers:v}=Ot(),h=k(Qt,a),p=Boolean(null!==u.rect),m=o((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),b=null!=d,y=d?m.indexOf(d.id):-1,w=f?m.indexOf(f.id):-1,x=i(m),D=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(m,x.current),E=-1!==w&&-1===y||D,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);N((()=>{D&&b&&v(m)}),[D,m,b,v]),r((()=>{x.current=m}),[m]);const R=o((()=>({activeIndex:y,containerId:h,disabled:C,disableTransforms:E,items:m,overIndex:w,useDragOverlay:p,sortedRects:Ht(m,g),strategy:s})),[y,h,C.draggable,C.droppable,E,m,w,g,p,s]);return t.createElement(Zt.Provider,{value:R},n)}const _t=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Ut(n,r,i).indexOf(t)},en=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r)&&((l===o||i!==a)&&(!!n||a!==i&&t===s))},tn={duration:200,easing:"ease"},nn="transform",rn=Y.Transition.toString({property:nn,duration:0,easing:"linear"}),on={roleDescription:"sortable"};function an(e){let{animateLayoutChanges:t=en,attributes:n,disabled:s,data:c,getNewIndex:d=_t,id:g,strategy:f,resizeObserverConfig:v,transition:h=tn}=e;const{items:p,containerId:m,activeIndex:b,disabled:y,disableTransforms:w,sortedRects:x,overIndex:D,useDragOverlay:E,strategy:C}=u(Zt),R=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(s,y),S=p.indexOf(g),I=o((()=>({sortable:{containerId:m,index:S,items:p},...c})),[m,c,S,p]),T=o((()=>p.slice(p.indexOf(g))),[p,g]),{rect:M,node:L,isOver:B,setNodeRef:P}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:l}=e;const s=k("Droppable"),{active:c,dispatch:d,over:g,measureDroppableContainers:f}=u(mt),v=i({disabled:n}),h=i(!1),p=i(null),m=i(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...Tt,...l},x=O(null!=y?y:o),D=rt({callback:a((()=>{h.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{f(Array.isArray(x.current)?x.current:[x.current]),m.current=null}),w)):h.current=!0}),[w]),disabled:b||!c}),E=a(((e,t)=>{D&&(t&&(D.unobserve(t),h.current=!1),e&&D.observe(e))}),[D]),[C,R]=A(E),S=O(t);return r((()=>{D&&C.current&&(D.disconnect(),h.current=!1,D.observe(C.current))}),[C,D]),r((()=>(d({type:Q.RegisterDroppable,element:{id:o,key:s,disabled:n,node:C,rect:p,data:S}}),()=>d({type:Q.UnregisterDroppable,key:s,id:o}))),[o]),r((()=>{n!==v.current.disabled&&(d({type:Q.SetDroppableDisabled,id:o,key:s,disabled:n}),v.current.disabled=n)}),[o,s,n,d]),{active:c,rect:p,isOver:(null==g?void 0:g.id)===o,node:C,over:g,setNodeRef:R}}({id:g,data:I,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...v}}),{active:z,activatorEvent:X,activeNodeRect:F,attributes:K,setNodeRef:W,listeners:U,isDragging:H,over:J,setActivatorNodeRef:V,transform:q}=It({id:g,data:I,attributes:{...on,...n},disabled:R.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o((()=>e=>{t.forEach((t=>t(e)))}),t)}(P,W),Z=Boolean(z),$=Z&&!w&&Jt(b)&&Jt(D),_=!E&&H,ee=_&&$?q:null,te=$?null!=ee?ee:(null!=f?f:C)({rects:x,activeNodeRect:F,activeIndex:b,overIndex:D,index:S}):null,ne=Jt(b)&&Jt(D)?d({id:g,items:p,activeIndex:b,overIndex:D}):S,re=null==z?void 0:z.id,ie=i({activeId:re,items:p,newIndex:ne,containerId:m}),oe=p!==ie.current.items,ae=t({active:z,containerId:m,isDragging:H,isSorting:Z,id:g,index:S,items:p,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:h,wasDragging:null!=ie.current.activeId}),le=function(e){let{disabled:t,index:n,node:o,rect:a}=e;const[s,c]=l(null),d=i(n);return N((()=>{if(!t&&n!==d.current&&o.current){const e=a.current;if(e){const t=ge(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==d.current&&(d.current=n)}),[t,n,o,a]),r((()=>{s&&c(null)}),[s]),s}({disabled:!ae,index:S,node:L,rect:M});return r((()=>{Z&&ie.current.newIndex!==ne&&(ie.current.newIndex=ne),m!==ie.current.containerId&&(ie.current.containerId=m),p!==ie.current.items&&(ie.current.items=p)}),[Z,ne,m,p]),r((()=>{if(re===ie.current.activeId)return;if(null!=re&&null==ie.current.activeId)return void(ie.current.activeId=re);const e=setTimeout((()=>{ie.current.activeId=re}),50);return()=>clearTimeout(e)}),[re]),{active:z,activeIndex:b,attributes:K,data:I,rect:M,index:S,newIndex:ne,items:p,isOver:B,isSorting:Z,isDragging:H,listeners:U,node:L,overIndex:D,over:J,setNodeRef:G,setActivatorNodeRef:V,setDroppableNodeRef:P,setDraggableNodeRef:W,transform:null!=le?le:te,transition:function(){if(le||oe&&ie.current.newIndex===S)return rn;if(_&&!j(X)||!h)return;if(Z||ae)return Y.Transition.toString({...h,property:nn});return}()}}function ln(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function sn(...e){return t=>{for(const n of e)ln(n,t)}}Le.Down,Le.Right,Le.Up,Le.Left;const cn={vertical:{modifiers:[e=>{let{transform:t}=e;return{...t,x:0}},Wt],strategy:e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:a}=e;const l=null!=(t=o[n])?t:r;if(!l)return null;if(i===n){const e=o[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...Gt}:null}const s=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];if(!r)return 0;if(n<t)return i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0;return o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0}(o,i,n);return i>n&&i<=a?{x:0,y:-l.height-s,...Gt}:i<n&&i>=a?{x:0,y:l.height+s,...Gt}:{x:0,y:0,...Gt}}},horizontal:{modifiers:[e=>{let{transform:t}=e;return{...t,y:0}},Wt],strategy:e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:o,index:a}=e;const l=null!=(t=n[i])?t:r;if(!l)return null;const s=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];if(!r||!i&&!o)return 0;if(n<t)return i?r.left-(i.left+i.width):o.left-(r.left+r.width);return o?o.left-(r.left+r.width):r.left-(i.left+i.width)}(n,a,i);if(a===i){const e=n[o];return e?{x:i<o?e.left+e.width-(l.left+l.width):e.left-l.left,y:0,...Vt}:null}return a>i&&a<=o?{x:-l.width-s,y:0,...Vt}:a<i&&a>=o?{x:l.width+s,y:0,...Vt}:{x:0,y:0,...Vt}}},mixed:{modifiers:[Wt],strategy:void 0}};function dn({value:t,onValueChange:n,collisionDetection:r=ie,modifiers:i,strategy:a,onMove:l,orientation:s="vertical",overlay:c,children:d,...u}){const[g,f]=e.useState(null),v=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o((()=>[...t].filter((e=>null!=e))),[...t])}($(Je),$(qe),$(je)),h=cn[s];return e.createElement(Rt,{modifiers:i??h.modifiers,sensors:v,onDragStart:({active:e})=>f(e.id),onDragEnd:({active:e,over:r})=>{if(r&&e.id!==r?.id){const i=t.findIndex((t=>t.id===e.id)),o=t.findIndex((e=>e.id===r.id));l?l({activeIndex:i,overIndex:o}):n?.(Ut(t,i,o))}f(null)},onDragCancel:()=>f(null),collisionDetection:r,...u},e.createElement($t,{items:t,strategy:a??h.strategy},d),c?e.createElement(gn,{activeId:g},c):null)}const un={sideEffects:zt({styles:{active:{opacity:"0.4"}}})},gn=e.forwardRef((({activeId:t,dropAnimation:n=un,children:r,...i},o)=>e.createElement(Kt,{dropAnimation:n,...i},t?e.createElement(vn,{ref:o,value:t,className:"cursor-grabbing",asChild:!0},r):null)));gn.displayName="SortableOverlay";const fn=e.createContext({attributes:{},listeners:void 0,isDragging:!1});const vn=e.forwardRef((({value:t,asTrigger:n,asChild:r,className:i,...o},a)=>{const{attributes:l,listeners:s,setNodeRef:c,transform:d,transition:u,isDragging:g}=an({id:t}),f=e.useMemo((()=>({attributes:l,listeners:s,isDragging:g})),[l,s,g]),v={opacity:g?.5:1,transform:Y.Translate.toString(d),transition:u},h=r?p:"div";return e.createElement(fn.Provider,{value:f},e.createElement(h,{"data-state":g?"dragging":void 0,className:m("data-[state=dragging]:cursor-grabbing",{"cursor-grab":!g&&n},i),ref:sn(a,c),style:v,...n?l:{},...n?s:{},...o}))}));vn.displayName="SortableItem";const hn=e.forwardRef((({className:t,...n},r)=>{const{attributes:i,listeners:o,isDragging:a}=function(){const t=e.useContext(fn);if(!t)throw new Error("useSortableItem must be used within a SortableItem");return t}();return e.createElement(b,{ref:sn(r),"data-state":a?"dragging":void 0,className:m("cursor-grab data-[state=dragging]:cursor-grabbing",t),...i,...o,...n})}));hn.displayName="SortableDragHandle";export{dn as S,hn as a,vn as b,gn as c};
|
2
|
+
//# sourceMappingURL=sortable-DaXPlC2-.mjs.map
|