@abw/badger-react-ui
Version:
React UI Components
1 lines • 1.02 MB
Source Map (JSON)
{"version":3,"file":"badger-react-ui.umd.cjs","sources":["../node_modules/.pnpm/@abw+react-context@3.0.0_react-dom@18.3.1_react@18.3.1/node_modules/@abw/react-context/dist/react-context.js","../src/components/Details/Context.js","../node_modules/.pnpm/@abw+badger-icon@1.0.1_react-dom@18.3.1_react@18.3.1/node_modules/@abw/badger-icon/dist/badger-icon.js","../node_modules/.pnpm/@abw+badger-utils@1.2.4/node_modules/@abw/badger-utils/dist/badger-utils.js","../src/utils/classes.js","../node_modules/.pnpm/@abw+react-one-louder@1.0.0_react-dom@18.3.1_react@18.3.1/node_modules/@abw/react-one-louder/dist/react-one-louder.js","../src/components/Icon/Icon.jsx","../src/utils/styles.js","../src/utils/icon.js","../src/components/Icon/WithIcons.jsx","../src/components/Details/Summary.jsx","../src/components/Details/Content.jsx","../src/components/Details/Container.jsx","../src/components/Details/Native/Summary.jsx","../src/components/Details/Native/Container.jsx","../src/components/Details/Details.jsx","../src/components/Accordion/Accordion.jsx","../src/components/Icon/Icons.jsx","../src/components/Alert/Controls.jsx","../src/components/Alert/Headline.jsx","../src/components/Alert/Content.jsx","../src/components/Alert/Icon.jsx","../src/utils/attrs.js","../src/utils/breakpoint.js","../src/utils/option.js","../src/utils/cursor.js","../src/utils/events.js","../src/utils/grid.js","../src/utils/math.js","../src/utils/props.js","../src/utils/refs.js","../src/utils/renderer.jsx","../src/utils/scroll.js","../src/utils/size.js","../src/utils/storage.js","../src/utils/text.js","../src/utils/theme.js","../src/utils/variant.js","../src/components/Alert/Alert.jsx","../src/components/Badge/Prefix.jsx","../src/components/Badge/Suffix.jsx","../src/components/Badge/Badge.jsx","../src/components/Button/Button.jsx","../src/components/Buttons/Buttons.jsx","../src/components/Checkbox/Label.jsx","../src/components/Checkbox/Input.jsx","../src/components/Checkbox/Checkbox.jsx","../src/state/Checked.jsx","../src/components/Checkbox/State.jsx","../src/state/Visible.jsx","../src/components/Modal/Close.jsx","../src/components/Modal/Header.jsx","../src/components/Modal/Footer.jsx","../src/components/Modal/Content.jsx","../src/components/Modal/Modal.jsx","../src/components/Confirm/Modal.jsx","../src/components/Confirm/Confirm.jsx","../src/components/DataTable/Utils/Columns.js","../src/components/DataTable/Utils/Filter.js","../src/components/DataTable/Utils/Paginate.js","../src/components/DataTable/Utils/Sort.js","../src/components/DataTable/Context.js","../src/components/DataTable/Summary.jsx","../src/constants.js","../src/context/Dropdown.js","../src/context/Menu.js","../src/components/DropdownMenu/Context.js","../src/components/DropdownMenu/Trigger.jsx","../src/components/DropdownMenu/Option.jsx","../src/components/DropdownMenu/Separator.jsx","../src/components/DropdownMenu/Heading.jsx","../src/components/DropdownMenu/Options.jsx","../node_modules/.pnpm/@floating-ui+utils@0.2.8/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/.pnpm/@floating-ui+utils@0.2.8/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/.pnpm/@floating-ui+core@1.6.8/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/.pnpm/@floating-ui+dom@1.6.12/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/.pnpm/@floating-ui+react-dom@2.1.2_react-dom@18.3.1_react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@18.3.1_react@18.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.mjs","../src/hooks/useFloating.jsx","../src/components/DropdownMenu/Content.jsx","../src/components/DropdownMenu/DropdownMenu.jsx","../src/components/DataTable/PageSize.jsx","../src/components/Dropdown/Context.js","../src/components/Dropdown/Trigger.jsx","../src/components/Dropdown/Body.jsx","../src/components/Dropdown/Content.jsx","../src/components/Dropdown/Dropdown.jsx","../src/components/DataTable/Columns/Column.jsx","../src/components/DataTable/Columns/Close.jsx","../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@18.3.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@18.3.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@18.3.1_react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js","../node_modules/.pnpm/@dnd-kit+sortable@8.0.0_@dnd-kit+core@6.3.1_react@18.3.1/node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../src/components/Sortable/SortableItem.jsx","../node_modules/.pnpm/@dnd-kit+modifiers@7.0.0_@dnd-kit+core@6.3.1_react@18.3.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js","../src/components/Sortable/MakeSortable.jsx","../src/components/Sortable/Sortable.jsx","../src/components/Sortable/Vertical.jsx","../src/components/DataTable/Columns/Columns.jsx","../src/components/DataTable/Constants.js","../src/components/DataTable/Filtering.jsx","../src/components/DataTable/Controls.jsx","../src/components/DataTable/Header.jsx","../src/components/DataTable/Display.jsx","../src/components/DataTable/Utils/Align.js","../src/components/DataTable/Cell.jsx","../src/components/DataTable/Row.jsx","../src/components/DataTable/NoRows.jsx","../src/components/DataTable/Rows.jsx","../src/components/DataTable/Heading.jsx","../src/components/DataTable/Headings.jsx","../src/components/DataTable/Filter/Boolean.jsx","../src/components/DataTable/Filter/Text.jsx","../src/components/DataTable/Filter/Number.jsx","../src/components/DataTable/Filter/index.jsx","../src/components/DataTable/Filter/Select.jsx","../src/components/DataTable/Filter.jsx","../src/components/DataTable/Filters.jsx","../src/components/DataTable/Table.jsx","../src/components/DataTable/Body.jsx","../src/components/Pager/Context.js","../src/components/Pager/Utils.js","../src/components/Pager/Previous.jsx","../src/components/Pager/Next.jsx","../src/components/Pager/Page.jsx","../src/components/Pager/Separator.jsx","../src/components/Pager/Pages.jsx","../src/components/Pager/Content.jsx","../src/components/Pager/Pager.jsx","../src/components/DataTable/Footer.jsx","../src/components/DataTable/Content.jsx","../src/components/DataTable/DataTable.jsx","../src/components/DataTables/NoRows.jsx","../src/components/DataTables/Row.jsx","../src/components/DataTables/Table.jsx","../src/components/DataTables/Filter.jsx","../src/components/Tiles/Tiles.jsx","../src/components/DataTables/Filters.jsx","../src/components/DataTables/Body.jsx","../src/components/DataTables/Responsive.jsx","../src/components/DataTables/DataTables.jsx","../src/components/MultiSelect/Context.js","../src/components/MultiSelect/Option.jsx","../src/components/Select/Context.js","../src/components/Select/Input.jsx","../src/components/Select/Heading.jsx","../src/components/Select/Option.jsx","../src/components/Select/Separator.jsx","../src/components/Select/Item.jsx","../src/components/Select/NoOptions.jsx","../src/components/Select/Menu.jsx","../src/components/Select/Search.jsx","../src/components/Select/Content.jsx","../src/components/Select/Select.jsx","../src/components/MultiSelect/Selection.jsx","../src/components/MultiSelect/Selections.jsx","../src/components/MultiSelect/SortSelections.jsx","../src/components/MultiSelect/Content.jsx","../src/components/MultiSelect/MultiSelect.jsx","../node_modules/.pnpm/@abw+badger-form@1.1.4_react-dom@18.3.1_react@18.3.1/node_modules/@abw/badger-form/dist/badger-form.js","../src/components/Form/Input/MultiSelect.jsx","../src/components/Form/Input/Select.jsx","../src/components/Search/Context.js","../src/components/Search/Input.jsx","../src/components/Search/Result.jsx","../src/components/Search/NoResults.jsx","../src/components/Search/Results.jsx","../src/components/Search/Error.jsx","../src/components/Search/Content.jsx","../src/components/Search/Search.jsx","../src/components/Form/Input/Search.jsx","../src/components/Range/Utils.js","../src/components/Range/Context.js","../src/components/Range/Selection.jsx","../src/components/Range/ThumbMin.jsx","../src/components/Range/ThumbMax.jsx","../src/components/Range/Thumbs.jsx","../src/components/Range/Track.jsx","../src/components/Range/Ticks.jsx","../src/components/Range/Slider.jsx","../src/components/Range/Input.jsx","../src/components/Range/Select.jsx","../src/components/Range/InputMin.jsx","../src/components/Range/InputMax.jsx","../src/components/Range/Inputs.jsx","../src/components/Range/ValueMin.jsx","../src/components/Range/ValueMax.jsx","../src/components/Range/Values.jsx","../src/components/Range/Output.jsx","../src/components/Range/Limits.jsx","../src/components/Range/Debug.jsx","../src/components/Range/Layout.jsx","../src/components/Range/Content.jsx","../src/components/Range/Range.jsx","../src/components/Form/Input/Range.jsx","../src/components/RangeMin/Thumbs.jsx","../src/components/RangeMin/Values.jsx","../src/components/RangeMin/Inputs.jsx","../src/components/RangeMin/Utils.js","../src/components/RangeMin/RangeMin.jsx","../src/components/Form/Input/RangeMin.jsx","../src/components/RangeMax/Thumbs.jsx","../src/components/RangeMax/Values.jsx","../src/components/RangeMax/Inputs.jsx","../src/components/RangeMax/Utils.js","../src/components/RangeMax/RangeMax.jsx","../src/components/Form/Input/RangeMax.jsx","../src/components/Overlay/Overlay.jsx","../src/components/Spinner/Spinner.jsx","../src/components/Form/Submitting.jsx","../src/components/Form/Control/Cancel.jsx","../src/components/Form/Control/Reset.jsx","../src/components/Form/Control/Submit.jsx","../src/components/Form/Control/ResetSubmit.jsx","../src/components/Form/Control/CancelSubmit.jsx","../src/components/Form/index.jsx","../src/components/Modal/State.jsx","../src/components/Overlay/State.jsx","../src/components/Radio/Label.jsx","../src/components/Radio/Input.jsx","../src/components/Radio/Option.jsx","../src/components/Radio/Radio.jsx","../src/components/Sortable/Horizontal.jsx","../src/components/Table/Cell.jsx","../src/components/Table/Utils.js","../src/components/Table/Columns/Head.jsx","../src/components/Table/Columns/Cell.jsx","../src/components/Table/Columns/Row.jsx","../src/components/Table/Columns/Body.jsx","../src/components/Table/Columns.jsx","../src/components/Table/Row.jsx","../src/components/Table/Head.jsx","../src/components/Table/Body.jsx","../src/components/Table/Foot.jsx","../src/components/Table/Rows.jsx","../src/components/Table/Table.jsx","../src/components/Tabset/Body.jsx","../src/components/Tabset/Tabset.jsx","../src/components/Toggle/Toggle.jsx","../src/components/Toggle/useToggle.jsx","../src/components/Toggle/ToggleState.jsx","../src/elements/Div.jsx","../src/elements/Flex.jsx","../src/elements/Grid.jsx","../src/hooks/useContainer.jsx","../src/hooks/useRenderCount.jsx","../src/hooks/useComplexState.jsx","../src/hooks/useWindow.jsx"],"sourcesContent":["var x = Object.defineProperty;\nvar P = (t, e, o) => e in t ? x(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;\nvar s = (t, e, o) => P(t, typeof e != \"symbol\" ? e + \"\" : e, o);\nimport { jsx as a } from \"react/jsx-runtime\";\nimport g from \"react\";\nfunction m(t) {\n return typeof t == \"string\";\n}\nfunction p(t) {\n return Array.isArray(t);\n}\nfunction b(t) {\n return typeof t == \"function\";\n}\nfunction h(...t) {\n throw new Error(t.join(\"\"));\n}\nconst C = (t, ...e) => b(t) ? t(...e) : t;\nfunction v() {\n return Intl.DateTimeFormat().resolvedOptions().locale;\n}\nv();\nfunction y(t = {}, e = {}, o = {}) {\n return Object.entries(e).reduce(\n (n, [r, i]) => {\n const c = o[i];\n return c !== null && typeof c < \"u\" && (n[r] = c), n;\n },\n { ...t }\n );\n}\nfunction A(t, e = []) {\n return (m(e) ? e.split(/,\\s*|\\s+/) : e).reduce(\n (n, r) => {\n const i = t[r] || h(`Cannot expose non-existent action method: ${r}`);\n return b(i) ? n[r] = i.bind(t) : h(`Cannot bind to non-function method: ${r}`), n;\n },\n {}\n );\n}\nfunction S(t, e) {\n const o = t.debug ?? e.debug, n = C(t.debugPrefix ?? e.debugPrefix, t), r = C(t.debugColor ?? e.debugColor, t);\n return o ? n ? (i, ...c) => console.log(\n `%c${n}%c${i}`,\n `color: ${r}`,\n \"color:black\",\n ...c\n ) : console.log.bind(console) : () => {\n };\n}\nconst $ = (t) => p(t) ? t : [t], F = (t, e = {}) => {\n const o = e.defaultState || {}, n = e.context || g.createContext(o);\n return {\n Context: n,\n Provider: (d) => /* @__PURE__ */ a(\n t,\n {\n ...d,\n render: (u) => /* @__PURE__ */ a(n.Provider, { value: u, children: d.children })\n }\n ),\n Consumer: (d) => (u) => /* @__PURE__ */ a(n.Consumer, { children: (f) => /* @__PURE__ */ a(d, { ...f, ...u }) }),\n Children: ({ children: d }) => $(d).map(\n (u, f) => b(u) ? /* @__PURE__ */ a(n.Consumer, { children: u }, f) : u\n ),\n Use: () => g.useContext(n)\n };\n};\nclass l extends g.Component {\n constructor(o) {\n super(o);\n s(this, \"debug\");\n s(this, \"actions\");\n const n = this.constructor, r = n.debug, i = n.debugPrefix, c = n.debugColor;\n this.debug = S(\n o,\n { debug: r, debugPrefix: i, debugColor: c }\n ), this.state = y(\n n.initialState,\n n.initialProps,\n o\n ), this.actions = this.initActions(n.actions);\n }\n initActions(o) {\n return A(this, o);\n }\n getContext() {\n return {\n ...this.props,\n // properties passed to the context\n ...this.state,\n // internal state\n ...this.actions\n // callable action functions mapped to methods\n };\n }\n getRenderProps() {\n return this.getContext();\n }\n render() {\n return this.props.render(\n this.getRenderProps()\n );\n }\n}\ns(l, \"initialState\", {}), s(l, \"initialProps\", {}), s(l, \"actions\", []), s(l, \"debug\", !1), s(l, \"debugPrefix\"), s(l, \"debugColor\");\nexport {\n l as Context,\n F as Generator\n};\n","import React from 'react'\nimport { Generator } from '@abw/react-context'\n\nconst Context = ({\n render,\n open: initiallyOpen,\n}) => {\n const [isOpen, setOpen] = React.useState(initiallyOpen)\n const toggleOpen = () => setOpen( open => ! open )\n const open = () => setOpen(true)\n const close = () => setOpen(false)\n\n // handle external updates to open/initiallyOpen\n React.useEffect(\n () => {\n setOpen(initiallyOpen)\n },\n [initiallyOpen]\n )\n\n return render({\n isOpen, open, close, toggleOpen,\n })\n}\n\nconst generated = Generator(Context)\nexport const useDetails = generated.Use\nexport default generated\n","import { jsx as l } from \"react/jsx-runtime\";\nimport { createContext as e2, forwardRef as t2, isValidElement as n2 } from \"react\";\nconst r2 = \"svg\", F = \"-\", U2 = \"none\", Z = \"fill\", s2 = \"path\", o2 = \"line\", l2 = \"rect\", x = \"array\", c2 = \"circle\", i2 = \"ellipse\", L2 = \"polygon\", a2 = \"polyline\", z2 = /\\.(?!\\d)/, E = /-(?!\\d)/, _ = \"currentColor\", I = 512, $ = 512, P = {\n defaults: {\n width: 512,\n height: 512,\n type: \"line\"\n },\n icons: {\n alpha: \"M102,448L256,64L410,448 M152,333L360,333\",\n angle: \"M448,336L256,144L64,336\",\n angles: \"M448,448L256,256L64,448M448,256L256,64L64,256\",\n arrow: \"M96,224L256,64L416,224M256,86L256,448\",\n arrows: \"M160,128L256,32L352,128M352,384L256,480L160,384M256,48L256,464\",\n arrowhead: \"M176,112L256,32L336,112M256,48L256,192\",\n asterisk: \"M76,152L436,360M76,360L436,152M256,48L256,464\",\n at: \"M256,160C309,160 352,203 352,256C352,309 309,352 256,352C203,352 160,309 160,256C160,203 203,160 256,160M256,480C132,480 32,380 32,256C32,132 132,32 256,32C380,32 480,132 480,256L480,288C480,323 451,352 416,352C381,352 352,323 352,288L352,176\",\n ban: \"M100,412L412,100 M256,32C380,32 480,132 480,255C480,379 380,480 256,480C132,480 32,379 32,255C32,132 132,32 256,32Z\",\n bars: \"M64,96L448,96M64,256L448,256M64,416L448,416\",\n card: \"rect:32 96 448 320 32 32\",\n caret: \"M448,336L256,144L64,336L448,336Z\",\n check: \"M48,248L192,392L464,120\",\n circle: \"circle:256 256 224\",\n clipboard: \"M192,80L80,80L80,496L432,496L432,80L320,80L320,112L192,112L192,80ZM256,16C282,16 304,38 304,64C304,90 282,112 256,112C230,112 208,90 208,64C208,38 230,16 256,16Z\",\n clone: \"M304,416L304,444C304,468 284,488 260,488L68,488C44,488 24,468 24,444L24,252C24,228 44,208 68,208L96,208M480,75L480,277C480,301 461,320 437,320L235,320C211,320 192,301 192,277L192,75C192,51 211,32 235,32L437,32C461,32 480,51 480,75Z\",\n cloud: \"M480,293C480,234 437,177 362,196C346,161 319,116 240,120C180,124 139,165 125,224C121,223 116,223 111,223C68,223 32,260 32,307C32,354 68,392 111,392C120,392 366,392 380,392C462,392 480,335 480,293Z\",\n cog: \"M306,21L206,21L187,91L147,114L78,95L28,182L78,233L78,279L28,330L78,417L147,398L187,421L206,491L306,491L325,421L365,398L434,417L484,330L434,279L434,233L484,182L434,95L365,114L325,91L306,21Z M256,176C300,176 336,212 336,256C336,300 300,336 256,336C212,336 176,300 176,256C176,212 212,176 256,176Z\",\n columns: [\n \"rect:32 32 448 448 45 45\",\n \"line:180,32 180,480\",\n \"line:332,32 332,480\"\n ],\n comment: \"M256,64C371,64 464,139 464,232C464,325 371,400 256,400C236,400 217,398 199,394C184,390 163,448 80,464C111,426 118,358 110,352C72,321 48,279 48,232C48,139 141,64 256,64Z\",\n crop: \"M32,80L288,80 M80,32L80,288M432,480L432,224M480,432L224,432M80,428L432,80\",\n cross: \"M112,112L400,400M400,112L112,400\",\n crosshairs: [\n \"circle:256 256 192\",\n \"M256,16L256,112 M496,256L400,256 M16,256L112,256 M256,496L256,400\"\n ],\n diamond: \"M256,32L480,256L256,480L32,256L256,32\",\n download: \"M256,64L256,320L352,224M256,320L160,224M384,320L425,320C438,320 448,330 448,342L448,426C448,438 438,448 425,448L86,448C74,448 64,438 64,426L64,342C64,330 74,320 86,320L128,320\",\n drag: \"M96,128L256,32L416,128M96,384L256,480L416,384M144,256L368,256\",\n envelope: [\n \"rect:32 96 448 320 32 32\",\n \"M32,144C32,144 158.906,243.712 221.676,293.031C241.821,308.86 270.179,308.86 290.324,293.031C353.094,243.712 480,144 480,144\"\n ],\n equals: \"M96,320L416,320 M96,192L416,192\",\n exclamation: \"M256,96L256,310M254,416L258,416\",\n eye: [\n \"M21,256C131,42 381,43 493,256 M21,256C130,470 383,469 493,256\",\n \"circle:256 256 80\"\n ],\n eyeshut: \"M21,256C131,42 381,43 493,256M21,256C130,320 383,320 493,256M21,256C130,470 383,469 493,256\",\n filter: \"M64,32L448,32L448,128L320,256L320,432L192,480L192,256L64,128L64,32Z\",\n folder: \"M480,128L480,448L32,448L32,64L176,64L240,128L480,128Z\",\n globe: [\n \"circle:256 256 224\",\n \"ellipse:256 256 116 224\",\n \"M32,255.997L480,256.115M53.867,160L458.413,160M53.867,352.587L458.413,352M256.14,32L256.14,480\"\n ],\n heart: \"M256,128C298,48 382,48 424,88C466,128 466,208 424,288C394,348 319,408 256,448C193,408 118,348 88,288C46,208 46,128 88,88C130,48 214,48 256,128Z\",\n hourglass: \"M80,32L432,32M80,480L432,480M128,32C128,256 384,256 384,480M384,32C384,256 128,256 128,480\",\n image: [\n \"rect:32 80 448 366 32\",\n \"M32,304L128,240L384,432M272,345L367,281L480,366\",\n \"circle:288 192 16\"\n ],\n info: \"M212,202L256,202L256,416M182,416L330,416M252,96L256,96\",\n key: [\n \"M189,246C183,229 180,212 180,194C180,118 242,56 318,56C394,56 456,118 456,194C456,270 394,332 318,332C300,332 283,329 266,323L232,360L184,360L184,408L136,408L136,456L56,456L56,379L189,246Z\",\n \"circle:344 168 8\"\n ],\n list: \"M176,96L448,96M176,256L448,256M176,416L448,416M64,96L80,96M64,256L80,256M64,416L80,416\",\n locked: [\n \"M144,224L144,166C144,105 195,54 256,54C317,54 368,105 368,166L368,224M256,320L256,368\",\n \"rect:80 224 352 240 32 32\"\n ],\n login: \"M192,128L320,256L192,384M304,256L64,256M320,64L448,64L448,448L320,448\",\n logout: \"M320,128L448,256L320,384M432,256L192,256M192,448L64,448L64,64L192,64\",\n minus: \"M96,256L416,256\",\n mobile: [\n \"rect:128 48 256 416 32 32\",\n \"M128,120L384,120M128,392L384,392\"\n ],\n move: \"M192,96L256,32L320,96M416,192L480,256L416,320M320,416L256,480L192,416M96,192L32,256L96,320M48,256L464,256M256,48L256,464\",\n number: \"M256,448L256,64L176,128 M160,448L336,449\",\n page: \"M416,170L416,480L96,480L96,32L288,32L416,170M288,32L288,176L416,176\",\n pen: \"M482,143C491,134 491,120 482,112L401,30C392,21 378,21 369,30L72,326L22,489L186,439L482,143M305,93L418,206\",\n phone: \"M51,59C40,62 32,72 32,84C41,321 192,472 428,480C440,480 451,471 453,459C459,435 469,395 475,371C478,360 472,348 462,343C438,331 395,309 370,297C360,292 347,295 339,304C325,323 303,352 304,352C255,352 160,257 160,208C160,207 188,186 207,172C217,165 220,152 215,141C202,117 181,74 169,50C164,39 152,34 141,37C116,43 75,53 51,59Z\",\n plus: \"M256,96L256,416M96,256L416,256\",\n point: \"M448,224L256,16L64,224L160,224L160,480L352,480L352,224L448,224Z\",\n prime: \"M256,128L256,256\",\n question: \"M160,160C160,126 197,80 255,80C314,80 336,128 336,160C336,236 255,235 255,320 M255,416L256,416\",\n rotate: \"M392,120C356,84 307,64 256,64C150,64 64,150 64,256C64,362 150,448 256,448C303,448 349,430 384,399C349,430 303,448 256,448C150,448 64,362 64,256C64,150 150,64 256,64C307,64 356,84 392,120Z M352,208L480,208L480,80\",\n search: \"M204,32C300,32 384,111 384,208C384,305 305,384 208,384C111,384 32,305 32,208C32,111 107,32 204,32M480,480L332,332\",\n slash: \"M64,448L448,64\",\n square: \"rect:32 32 448 448\",\n square10: \"rect:32 32 448 448 45 45\",\n square20: \"rect:32 32 448 448 90 90\",\n square30: \"rect:32 32 448 448 135 135\",\n square40: \"rect:32 32 448 448 180 180\",\n star: \"M256,32L324,183L489,202L367,313L400,476L256,394L112,476L145,313L23,202L188,183L256,32Z\",\n thumb: \"M149,174L32,174L32,448L149,448L149,184 M149,217C277,160 246,36 282,38C372,44 324,192 324,192L440,192C462,192 480,210 480,232C480,254 462,272 440,272L368,272M424,272C446,272 464,290 464,312C464,334 446,352 424,352L352,352M392,352C414,352 432,370 432,392C432,414 414,432 392,432L256,432C220,432 149,409 149,409\",\n time: \"M256,128L256,256L336,336\",\n trash: \"M32,80L480,80 M80,80C80,80 100,344 109,452C111,477 131,496 156,496C211,496 301,496 356,496C381,496 401,477 403,452C412,344 432,80 432,80 M160,80L208,16L304,16L352,74\",\n triangle: \"M256,64L32,448L480,448L256,64Z\",\n unlocked: [\n \"M144,224L144,166C144,105 195,54 256,54C304,54 346,85 361,128M256,320L256,368\",\n \"rect:80 224 352 240 32 32\"\n ],\n upload: \"M256,320L256,64L160,160M256,64L352,160M384,320L425,320C438,320 448,330 448,342L448,426C448,438 438,448 425,448L86,448C74,448 64,438 64,426L64,342C64,330 74,320 86,320L128,320\",\n user: [\n \"M448,400C448,349 410,308 364,308L149,308C102,308 64,349 64,400C64,424 64,480 64,480L448,480C448,480 448,423 448,400Z\",\n \"circle:256,144,96\"\n ],\n vertical: \"line:256,48 256,464\",\n wrench: \"M486,108C493,124 496,142 496,160C496,239 431,304 352,304C330,304 309,299 290,290L98,482C79,501 49,501 30,482C11,463 11,433 30,414L222,222C213,203 208,182 208,160C208,81 273,16 352,16C370,16 388,19 404,26L336,96L352,160L416,176L486,108Z\"\n }\n};\nfunction u2(e, t, n = P) {\n n.icons[e] = t;\n}\nfunction J2(e, t = P) {\n Object.entries(e).forEach(\n ([n, r]) => u2(n, r, t)\n );\n}\nfunction C2(e) {\n return typeof e == \"string\";\n}\nfunction R(e) {\n return Array.isArray(e);\n}\nfunction f2(e) {\n return typeof e == \"function\";\n}\nfunction W(e) {\n return typeof e == \"object\" && !R(e) && !M2(e);\n}\nfunction M2(e) {\n return e === null;\n}\nfunction y2(...e) {\n throw new Error(e.join(\"\"));\n}\nfunction d2() {\n return Intl.DateTimeFormat().resolvedOptions().locale;\n}\nd2();\nconst p2 = () => {\n const e = e2({});\n return { Context: e, Provider: ({\n children: t,\n ...n\n }) => /* @__PURE__ */ l(e.Provider, { value: n, children: t }), Themed: (t, n = t.displayName || t.name) => t2(\n (r, s) => /* @__PURE__ */ l(e.Consumer, { children: (o) => {\n let c = t;\n const i = o[n];\n let a;\n if (!i)\n return /* @__PURE__ */ l(\n t,\n {\n ref: s,\n ...r\n }\n );\n if (R(i) ? (c = i[0], a = i[1]) : a = i, f2(a)) {\n const f = a(\n r,\n s,\n o\n );\n if (n2(f))\n return f;\n if (W(f))\n return /* @__PURE__ */ l(\n c,\n {\n ref: s,\n ...f\n }\n );\n }\n return W(a) ? /* @__PURE__ */ l(\n c,\n {\n ref: s,\n ...a,\n ...r\n }\n ) : /* @__PURE__ */ l(\n c,\n {\n ref: s,\n ...r\n }\n );\n } })\n ) };\n}, h2 = p2(), m2 = h2.Themed, K2 = (e = {}) => (t) => Object.entries(e).reduce(\n (n, [r, s]) => {\n const o = n[r];\n if (!o || !(C2(o) || o === !0))\n return n;\n const c = { ...o === !0 ? s : s[o] || y2(`Invalid variants value for ${r}: ${o}`), ...n };\n return delete c[r], c;\n },\n t\n);\nfunction u(e) {\n return typeof e == \"string\";\n}\nfunction g(e) {\n return Array.isArray(e);\n}\nfunction h(e) {\n return typeof e == \"object\" && !g(e) && !G(e);\n}\nfunction X(e) {\n return typeof e > \"u\";\n}\nfunction G(e) {\n return e === null;\n}\nfunction w(e) {\n return !(X(e) || G(e));\n}\nfunction g2(e) {\n return !w(e);\n}\nfunction C(...e) {\n throw new Error(e.join(\"\"));\n}\nfunction b2() {\n return Intl.DateTimeFormat().resolvedOptions().locale;\n}\nb2();\nfunction N(e, t = /,\\s*|\\s+/) {\n return g2(e) ? [] : u(e) ? e.length ? e.split(t) : [] : g(e) ? e : [e];\n}\nfunction m(e) {\n return e.split(/\\s*[;&]\\s*/).filter((t) => t.length > 0).reduce(\n (t, n) => {\n const [r, s] = n.split(/\\s*[:=]\\s*/);\n return t[r] = X(s) ? !0 : s, t;\n },\n {}\n );\n}\nconst A = (e) => e.filter(w).join(\" \"), k2 = (e) => Object.entries(e).filter(([, t]) => t).map(([t]) => t), v2 = (...e) => A(\n e.flatMap(\n (t) => h(t) ? k2(t) : t\n )\n), I2 = 4.42, M = (e) => `${I2 * e}%`, H = {\n // fill: 'currentColor',\n // stroke: 'currentColor',\n /*\n strokeWidth: widthMultiple(2),\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n strokeMiterlimit: '1.5'\n */\n}, S = {\n outline: {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: M(2),\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: \"1.5\"\n },\n solid: {\n fill: \"currentColor\",\n stroke: \"none\"\n },\n round: {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: \"1.5\"\n },\n square: {\n strokeLinecap: \"square\",\n strokeLinejoin: \"miter\",\n strokeMiterlimit: \"1.5\"\n },\n butt: {\n strokeLinecap: \"butt\"\n },\n bevel: {\n strokeLinejoin: \"bevel\"\n },\n thinnest: {\n strokeWidth: M(0.5)\n },\n thinner: {\n strokeWidth: M(1)\n },\n thin: {\n strokeWidth: M(1.5)\n },\n medium: {\n strokeWidth: M(2)\n },\n thick: {\n strokeWidth: M(2.5)\n },\n thicker: {\n strokeWidth: M(3)\n },\n thickest: {\n strokeWidth: M(3.5)\n },\n line: {}\n};\nS.line = S.outline;\nconst V = {\n ...Object.entries(S).reduce(\n (e, [t, n]) => (e[t] = (r) => Object.assign(r, n), e),\n {}\n ),\n fill: (e, t) => e.fill = t === !0 ? _ : t,\n stroke: (e, t) => e.stroke = t === !0 ? _ : t,\n nofill: (e) => delete e.fill,\n nostroke: (e) => delete e.stroke,\n strokewidth: (e, t) => e.strokeWidth = t.match(/^[\\d.]+$/) ? M(parseFloat(t)) : t,\n opacity: (e, t) => e.opacity = t,\n fillopacity: (e, t) => e.fillOpacity = t,\n strokeopacity: (e, t) => e.strokeOpacity = t,\n dasharray: (e, t) => e.strokeDasharray = t,\n drawlength: (e, t) => e[\"--draw-length\"] = t,\n drawtime: (e, t) => e[\"--draw-time\"] = t,\n filltime: (e, t) => e[\"--fill-time\"] = t\n};\nfunction Q2(e, t = { ...H }) {\n const n = u(e) ? m(e) : e || {};\n return Object.entries(n).reduce(\n (r, [s, o]) => {\n const c = s.toLowerCase();\n return (V[c] || C(`Invalid style: ${c}`))(r, o), r;\n },\n t\n );\n}\nconst d = (e) => u(e) ? parseFloat(e) : e, $2 = (e) => u(e) ? parseInt(e) : e, U = {\n x: 0,\n y: 0,\n size: 16,\n scaleX: 1,\n scaleY: 1,\n flipX: !1,\n flipY: !1,\n rotate: 0\n}, p = {\n flip: (e, t) => {\n u(t) && t.match(/^y$/i) ? e.flipY = !e.flipY : e.flipX = !e.flipX;\n },\n flipx: (e) => e.flipX = !e.flipX,\n flipy: (e) => e.flipY = !e.flipY,\n grow: (e, t) => e.size += d(t),\n shrink: (e, t) => e.size -= d(t),\n scalex: (e, t) => e.scaleX *= d(t),\n scaley: (e, t) => e.scaleY *= d(t),\n left: (e, t) => t === !0 ? e.rotate -= 90 : e.x -= d(t),\n right: (e, t) => t === !0 ? e.rotate += 90 : e.x += d(t),\n up: (e, t) => t === !0 ? e.rotate += 0 : e.y -= d(t),\n down: (e, t) => t === !0 ? e.rotate += 180 : e.y += d(t),\n rotate: (e, t) => e.rotate += $2(t)\n};\np.flop = p.flipy;\np[\"flip-x\"] = p.flipx;\np[\"flip-y\"] = p.flipy;\nfunction z(e, t = { ...U }) {\n const n = u(e) ? m(e) : e || {};\n return Object.entries(n).reduce(\n (r, [s, o]) => {\n const c = s.toLowerCase();\n return (p[c] || C(`Invalid transform: ${c}`))(r, o), r;\n },\n t\n );\n}\nfunction k(e, t) {\n return (u(t) ? t.split(E) : t).forEach(\n (r) => {\n const [s, o = !0] = r.split(/[:=]/), c = s.toLowerCase(), i = V[c];\n if (i) {\n i(e.style || (e.style = { ...H }), o);\n return;\n }\n (p[c] || C(`Invalid style or transform: ${c}`))(\n e.transform || (e.transform = { ...U }),\n o\n );\n }\n );\n}\nfunction w2(e) {\n const t = e.match(/^(.*?):(.*)/);\n return t ? { path: t[2], type: t[1] } : { path: e };\n}\nfunction b(e, t) {\n const n = g(t) ? [...t] : N(t);\n return N(e).reduce(\n (s, o) => {\n if (n.length) {\n const c = n.shift();\n s[c] = o;\n }\n return s;\n },\n {}\n );\n}\nconst D = {\n svg: (e) => ({\n element: r2,\n svg: e\n }),\n array: (e) => ({\n element: x,\n items: e\n }),\n path: (e) => ({\n element: s2,\n d: e\n }),\n polygon: (e) => ({\n element: L2,\n points: e\n }),\n polyline: (e) => ({\n element: a2,\n points: e\n }),\n circle: (e) => ({\n element: c2,\n ...b(e, \"cx cy r\")\n }),\n ellipse: (e) => ({\n element: i2,\n ...b(e, \"cx cy rx ry\")\n }),\n line: (e) => ({\n element: o2,\n ...b(e, \"x1 y1 x2 y2\")\n }),\n rect: (e) => ({\n element: l2,\n ...b(e, \"x y width height rx ry\")\n })\n};\nfunction e4(e, t) {\n return (D[e] || C(`Invalid icon data element: ${e}`))(t);\n}\nconst O2 = {\n width: I,\n height: $,\n type: Z\n}, J = (e) => {\n const [t, n = \"\"] = e.split(\"?\"), [r, ...s] = t.split(/\\.(?!\\d)/), o = r.split(E).filter((i) => i.length), c = m(n);\n return {\n dashes: o,\n classes: s,\n style: c\n };\n}, j2 = (e, t) => {\n for (let n = e.length; n > 0; n--) {\n const r = e.slice(0, n).join(F);\n if (t[r])\n return [\n r,\n e.slice(n),\n t[r]\n ];\n }\n return null;\n}, q = (e, t, n = {}) => {\n const { icons: r, defaults: s } = t, { dashes: o, classes: c, style: i } = J(e), [a, f, O] = j2(o, r) || C(`No icon found matching any leading subset of ${o.join(F)}`), L = {\n ...O2,\n ...s,\n ...n,\n name: a\n };\n if (x2(L, O), (c.length || n.className) && (L.className = A([\n ...c || [],\n n.className || null\n ])), L.transform && (L.transform = z(L.transform)), L.style ? (L.style = u(L.style) ? m(L.style) : { ...L.style }, i && Object.assign(L.style, i)) : i && (L.style = i), L.type) {\n const Y = L.style && { ...L.style };\n k(L, L.type), delete L.type, Y && Object.assign(L.style, Y);\n }\n return f.length && k(L, f), Object.keys(i).length && (L.style = Object.assign(L.style || {}, i)), L;\n}, t4 = {\n width: I,\n height: $,\n type: Z\n}, x2 = (e, t) => {\n if (h(t) && t.body) {\n const { body: n, ...r } = t;\n e.body = T(n), Object.assign(e, r);\n } else\n e.body = T(t), h(t) && t.type && (e.type = t.type);\n return e;\n}, T = (e) => {\n if (u(e))\n return N2(e);\n if (h(e))\n return S2(e);\n if (g(e))\n return T2(e);\n C(`Cannot parse icon data: ${e}`);\n};\nfunction N2(e) {\n if (e.match(/^\\s*</))\n return {\n element: \"svg\",\n svg: e.replace(/^\\s*/, \"\")\n };\n const t = e.match(/^(.*?):(.*)/);\n if (t) {\n const [, n, r] = t, { dashes: s, classes: o } = J(n), c = s.shift(), a = (D[c] || C(`Invalid icon data element: ${c}`))(r);\n return o.length && (a.className = A(o)), s.length && k(a, s), a;\n }\n return {\n element: \"path\",\n d: e\n };\n}\nfunction S2(e) {\n const t = { ...e };\n if (t.element)\n return t;\n for (const [n, r] of Object.entries(D)) {\n const s = t[n];\n if (w(s))\n return r(s);\n }\n C(`Cannot parse icon data: ${JSON.stringify(e)}`);\n}\nfunction T2(e) {\n return {\n element: x,\n // NOTE: we expand out any nested arrays\n items: e.flatMap(\n (t) => {\n const n = T(t);\n return n.element === x ? n.items : n;\n }\n )\n /* Old nested array version\n items: array.map(\n item => iconBodyType(item)\n )\n */\n };\n}\nconst K = (e) => N(e, /\\s+/), Z2 = ({\n size: e,\n ...t\n}) => {\n t.width ?? (t.width = e || I), t.height ?? (t.height = e || $), t.path && Object.assign(t, w2(t.path));\n let n;\n return t.style && (u(t.style) ? (n = m(t.style), t.style = {}) : n = { ...t.style }), k(\n t,\n t.type ? t.type.split(E).filter((r) => r.length) : Z\n ), delete t.type, t.style && n && Object.assign(t.style, n), t.transform && (t.transform = z(t.transform)), t;\n}, B = (e) => h(e) ? Object.entries(e).reduce(\n (t, [n, r]) => (t[n.replace(/(?!-)-./g, (s) => s[1].toUpperCase())] = r, t),\n {}\n) : e, E2 = (e) => w(e) ? B(m(e)) : null, y = ({\n style: e,\n className: t,\n ...n\n}) => ({\n style: u(e) ? E2(e) : B(e),\n className: t,\n ...n\n}), P2 = (e) => /* @__PURE__ */ l(\"circle\", { ...y(e) }), A2 = (e) => /* @__PURE__ */ l(\"ellipse\", { ...y(e) }), D2 = (e) => /* @__PURE__ */ l(\"line\", { ...y(e) }), Q = (e) => /* @__PURE__ */ l(\"path\", { ...y(e) }), B2 = (e) => /* @__PURE__ */ l(\"polygon\", { ...y(e) }), Y2 = (e) => /* @__PURE__ */ l(\"polyline\", { ...y(e) }), _2 = (e) => /* @__PURE__ */ l(\"rect\", { ...y(e) }), W2 = (e) => {\n const { svg: t, ...n } = e;\n return /* @__PURE__ */ l(\n \"g\",\n {\n dangerouslySetInnerHTML: { __html: t },\n ...y(n)\n }\n );\n}, q2 = (e) => {\n const { items: t, ...n } = e;\n return /* @__PURE__ */ l(\"g\", { ...y(n), children: t.map(\n (r, s) => /* @__PURE__ */ l(v, { body: r }, s)\n ) });\n}, F2 = {\n array: q2,\n circle: P2,\n ellipse: A2,\n line: D2,\n path: Q,\n polygon: B2,\n polyline: Y2,\n rect: _2,\n svg: W2\n}, v = (e) => {\n const { path: t, body: n } = e;\n if (t)\n return /* @__PURE__ */ l(Q, { d: t, ...e });\n if (u(n))\n return /* @__PURE__ */ l(\"g\", { dangerouslySetInnerHTML: { __html: n } });\n if (h(n)) {\n const { element: r, ...s } = n, o = F2[r] || C(`Invalid element type: ${r} => `, JSON.stringify(n));\n return /* @__PURE__ */ l(o, { ...s });\n }\n if (g(n))\n return n.map(\n (r, s) => /* @__PURE__ */ l(v, { body: r }, s)\n );\n C(`Don't know how to handle body: ${n}`);\n};\nfunction R2({\n width: e,\n height: t,\n transform: n,\n children: r\n}) {\n const s = e / 2, o = t / 2, c = n.x * e / 16, i = n.y * t / 16, a = n.size / 16 * (n.flipX ? -1 : 1) * n.scaleX, f = n.size / 16 * (n.flipY ? -1 : 1) * n.scaleY, O = n.rotate;\n return /* @__PURE__ */ l(\"g\", { transform: `translate(${s} ${o})`, children: /* @__PURE__ */ l(\"g\", { transform: `translate(${c}, ${i}) scale(${a}, ${f}) rotate(${O} 0 0)`, children: /* @__PURE__ */ l(\"g\", { transform: `translate(-${s} -${o})`, children: r }) }) });\n}\nconst j = ({\n onClick: e,\n minx: t = 0,\n miny: n = 0,\n width: r = I,\n height: s = $,\n style: o,\n transform: c,\n className: i = \"\",\n // fill='currentColor'\n ...a\n}) => /* @__PURE__ */ l(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"img\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n viewBox: `${t} ${n} ${r} ${s}`,\n className: `${i} icon`,\n style: B(o),\n onClick: e,\n children: c ? /* @__PURE__ */ l(\n R2,\n {\n width: r,\n height: s,\n transform: c,\n children: /* @__PURE__ */ l(v, { ...a })\n }\n ) : /* @__PURE__ */ l(v, { ...a })\n }\n), X2 = ({\n name: e,\n iconsClass: t = \"icons\",\n library: n = P,\n ...r\n}) => {\n if (!e)\n return /* @__PURE__ */ l(j, { ...Z2(r) });\n try {\n const s = K(e);\n return s.length === 1 ? /* @__PURE__ */ l(\n j,\n {\n ...r,\n ...q(e, n, r)\n }\n ) : /* @__PURE__ */ l(\"div\", { className: v2(t, r.className), children: s.map(\n (o) => /* @__PURE__ */ l(\n j,\n {\n ...r,\n ...q(o, n, r)\n },\n o\n )\n ) });\n } catch (s) {\n const o = u(s) ? s : s.message;\n C(`Badger Icon failed to render icon \"${e}\". ${o}`);\n }\n}, G2 = m2(X2, \"Icon\"), n4 = ({\n names: e,\n className: t\n}) => /* @__PURE__ */ l(\"div\", { className: `grid overlap ${t}`, children: K(e).map(\n (n) => /* @__PURE__ */ l(G2, { name: n }, n)\n) });\nexport {\n x as ARRAY,\n q2 as Array,\n v as Body,\n c2 as CIRCLE,\n _ as CURRENT_COLOR,\n P2 as Circle,\n F as DASH,\n $ as DEFAULT_ICON_HEIGHT,\n I as DEFAULT_ICON_WIDTH,\n i2 as ELLIPSE,\n A2 as Ellipse,\n Z as FILL,\n G2 as Icon,\n n4 as Icons,\n o2 as LINE,\n P as Library,\n D2 as Line,\n U2 as NONE,\n s2 as PATH,\n L2 as POLYGON,\n a2 as POLYLINE,\n Q as Path,\n B2 as Polygon,\n Y2 as Polyline,\n l2 as RECT,\n _2 as Rect,\n z2 as SPLIT_CSS,\n E as SPLIT_DASH,\n r2 as SVG,\n j as SVGIcon,\n h2 as Theme,\n m2 as Themed,\n u2 as addIcon,\n J2 as addIcons,\n d as asFloat,\n $2 as asInt,\n v2 as classes,\n w2 as expandPath,\n b as expandPoints,\n e4 as generateBody,\n T2 as iconArrayBody,\n x2 as iconBody,\n D as iconBodyGenerators,\n T as iconBodyType,\n t4 as iconDefaults,\n S2 as iconObjectBody,\n N2 as iconStringBody,\n A as joinClasses,\n H as nullStyle,\n U as nullTransform,\n m as parseAttrs,\n Z2 as prepareIconProps,\n y as reactProps,\n B as reactifty,\n E2 as reactiftyString,\n q as resolveIconData,\n j2 as resolveIconName,\n k2 as setKeys,\n J as splitIconName,\n K as splitSpace,\n Q2 as styleData,\n V as styleFunctions,\n S as styles,\n z as transformData,\n p as transformFunctions,\n K2 as variants\n};\n","function z(n) {\n return typeof n == \"boolean\";\n}\nfunction s(n) {\n return typeof n == \"string\";\n}\nfunction y(n) {\n return typeof n == \"number\";\n}\nfunction E(n) {\n return Number.isInteger(n);\n}\nfunction Z(n) {\n return y(n) && !E(n);\n}\nfunction m(n) {\n return Array.isArray(n);\n}\nfunction l(n) {\n return typeof n == \"function\";\n}\nfunction D(n) {\n return n instanceof RegExp;\n}\nfunction B(n) {\n return typeof n == \"object\" && !m(n) && !C(n);\n}\nfunction k(n) {\n return s(n) || y(n) || z(n);\n}\nfunction _(n) {\n return typeof n > \"u\";\n}\nfunction C(n) {\n return n === null;\n}\nfunction a(n) {\n return !(_(n) || C(n));\n}\nfunction nn(...n) {\n return P(n);\n}\nfunction P(n) {\n return n.every((t) => a(t));\n}\nfunction w(n) {\n return !a(n);\n}\nfunction tn(...n) {\n return n.find((t) => a(t)) ?? void 0;\n}\nconst en = (n) => m(n) ? n.length === 0 : Object.keys(n).length === 0, R = (n, t) => n.replace(\n /<(\\w+)>/g,\n (e, r) => {\n const o = t[r];\n if (w(o))\n throw new Error(`Invalid variable expansion <${r}> in message format: ${n}`);\n return o;\n }\n);\nfunction f(...n) {\n throw new Error(n.join(\"\"));\n}\nfunction rn(n, t) {\n throw new Error(\n R(n, t)\n );\n}\nfunction on(n) {\n throw n;\n}\nconst cn = (n, ...t) => l(n) ? n(...t) : n;\nfunction sn(...n) {\n}\nconst un = (n) => n, j = (n) => {\n const t = n.toString().split(\".\");\n return t.length < 2 ? 1 : Math.pow(10, t[1].length);\n}, p = (...n) => n.reduce(\n (t, e) => {\n const r = j(t), o = j(e);\n return r > o ? r : o;\n },\n -1 / 0\n), fn = (...n) => n.reduce(\n (t, e) => {\n const r = p(t, e);\n return t * r * (e * r) / (r * r);\n },\n 1\n), ln = (...n) => n.reduce(\n (t, e) => {\n const r = p(t, e);\n return t * r / (e * r);\n }\n), an = (...n) => {\n const t = p(...n);\n return n.reduce(\n (e, r) => e + t * r,\n 0\n ) / t;\n}, dn = (...n) => {\n const t = p(...n), [e, ...r] = n;\n return r.reduce(\n (o, c) => o - t * c,\n e * t\n ) / t;\n}, mn = (n, t, e) => Math.min(Math.max(n, t), e);\nfunction U() {\n return Intl.DateTimeFormat().resolvedOptions().locale;\n}\nlet d = {\n locale: U(),\n currency: \"GBP\",\n currencySign: \"£\",\n thousands: \",\"\n};\nfunction pn(n) {\n d = { ...d, ...n };\n}\nconst hn = (n, t, e = 1) => {\n const o = t < n ? -Math.abs(e) : e;\n return Array(1 + Math.floor(Math.abs((t - n) / e))).fill(n).map((c, i) => c + i * o);\n};\nfunction G(n, t = {}) {\n return new Intl.NumberFormat(\n t.locale,\n t\n ).format(n);\n}\nfunction gn(n, t = {}) {\n return G(\n n,\n {\n style: \"currency\",\n currency: d.currency,\n ...t\n }\n );\n}\nfunction H(n, t = d.thousands) {\n if (w(n))\n return \"\";\n const e = n.toString().split(\".\"), r = /(\\d+)(\\d{3})/;\n for (; r.test(e[0]); )\n e[0] = e[0].replace(r, `$1${t}$2`);\n return e.join(\".\");\n}\nfunction V(n, t = /,\\s*|\\s+/) {\n return w(n) ? [] : s(n) ? n.length ? n.split(t) : [] : m(n) ? n : [n];\n}\nfunction W(n, t = !0, e = {}) {\n return B(n) ? n : V(n).reduce(\n (o, c) => (o[c] = l(t) ? t(c) : t, o),\n e\n );\n}\nfunction bn(n) {\n return !s(n) || n.length === 0 ? [] : n.split(/\\s*\\n+\\s*/).filter(\n function(e) {\n return e.length > 0;\n }\n );\n}\nfunction v(n, t = \" \", e = t) {\n const r = [...n], o = r.pop() ?? \"\";\n return r.length ? [r.join(t), o].join(e) : o;\n}\nfunction yn(n, t = \", \", e = \" and \") {\n return v(n, t, e);\n}\nfunction wn(n, t = \", \", e = \" or \") {\n return v(n, t, e);\n}\nfunction h(n) {\n return n.charAt(0).toUpperCase() + n.slice(1).toLowerCase();\n}\nfunction q(n) {\n return n.replace(\n // /(?:^|\\s)\\S/g,\n /(\\w+)/g,\n h\n );\n}\nfunction $n(n) {\n return n.split(\"/\").map(\n // each segment can be like foo_bar which we convert to FooBar\n (t) => t.split(\"_\").map(h).join(\"\")\n ).join(\"/\");\n}\nfunction jn(n) {\n return n.split(\"/\").map(\n // each segment can be like foo_bar which we convert to fooBar\n (t) => t.split(\"_\").map((e, r) => r ? h(e) : e).join(\"\")\n ).join(\"/\");\n}\nfunction $(n, t = {}) {\n const e = t[n];\n if (a(e))\n return e;\n let r;\n return n.match(/(ss?|sh|ch|x)$/) ? n + \"es\" : (r = n.match(/(.*?[^aeiou])y$/)) ? r[1] + \"ies\" : n.match(/([^s\\d\\W])$/) ? n + \"s\" : n;\n}\nfunction In(n, t = {}) {\n const e = t[n];\n return a(e) ? e : n.match(/(ss|sh|ch|x)es$/) ? n.replace(/es$/, \"\") : n.match(/([^aeiou])ies$/) ? n.replace(/ies$/, \"y\") : n.match(/([^s\\d\\W])s$/) ? n.replace(/s$/, \"\") : n;\n}\nfunction J(n, t, e, r = \"no\") {\n return (n ? H(n) : r) + \" \" + (n === 1 ? t : e || $(t));\n}\nfunction Sn(n, t, e, r = \"No\") {\n return J(n, t, e, r);\n}\nconst Fn = h, On = q, xn = $, Ln = $;\nfunction b(n) {\n if (l(n))\n return n;\n if (D(n))\n return (t) => n.test(t);\n if (B(n))\n return (t) => !!n[t];\n if (m(n) || s(n)) {\n const t = W(n);\n return (e) => !!t[e];\n } else\n f(\"Invalid selector() specification: \" + n);\n}\nfunction Mn(n, t = {}) {\n const e = t.include && b(t.include), r = t.exclude && b(t.exclude);\n return Q(W(n)).reduce(\n (o, [c, i]) => e && !e(c, i, n, o) || r && r(c, i, n, o) ? o : (t.key && (c = t.key(c, i, n, o)), t.value && (i = t.value(i, c, n, o)), {\n ...o,\n [c]: i\n }),\n {}\n );\n}\nfunction Nn(n, t) {\n return Object.keys(n).reduce(\n (e, r) => ({\n ...e,\n [r]: t(n[r], r)\n }),\n {}\n );\n}\nconst K = (n, t, e = {}) => {\n let r = {};\n const o = { delete: !1, ...e }, c = b(t);\n return Object.keys(n).map(\n (i) => {\n if (c(i)) {\n let u = n[i];\n o.delete && delete n[i], o.key && (i = o.key(i)), o.value && (u = o.value(u)), r = {\n ...r,\n [i]: u\n };\n }\n }\n ), r;\n}, Tn = K, An = (n, t) => {\n const e = n[t];\n return delete n[t], e;\n}, En = Object.keys, Bn = Object.values, Q = Object.entries, g = (n, t) => l(t) ? t(n) : n[t], I = (n, t) => !!g(n, t), S = (n, t) => {\n const e = g(n, t);\n return E(e) ? e : s(e) && parseInt(e) || 0;\n}, F = (n, t) => {\n const e = g(n, t);\n return y(e) ? e : s(e) && parseFloat(e) || 0;\n}, O = (n, t) => (g(n, t) || \"\").toString(), x = (n) => (t, e) => S(t, n) - S(e, n), L = (n) => (t, e) => F(t, n) - F(e, n), M = (n) => (t, e) => {\n const r = O(t, n).toLowerCase(), o = O(e, n).toLowerCase();\n return r > o ? 1 : o > r ? -1 : 0;\n}, N = (n) => (t, e) => {\n const r = I(t, n), o = I(e, n);\n return r === o ? 0 : r ? 1 : -1;\n}, X = {\n num: L,\n int: x,\n str: M,\n bool: N,\n number: L,\n integer: x,\n string: M,\n boolean: N\n}, T = (n) => n, A = (n) => (t, e) => n(e, t), Y = {\n asc: T,\n desc: A,\n ascending: T,\n descending: A\n}, Cn = (n) => {\n const e = V(n).map(\n (r) => {\n if (l(r))\n return r;\n if (s(r)) {\n const o = r.match(/^(\\w+)(?::(\\w+))?(?::(\\w+))?$/) || f(`Invalid sort field: ${r}`), c = X[o[2] || \"string\"] || f(`Invalid sort type \"${o[2]}\" in sort field: ${r}`);\n return (Y[o[3] || \"asc\"] || f(`Invalid sort order \"${o[3]}\" in sort field: ${r}`))(c(o[1]));\n } else\n f(`Invalid sort field: ${r}`);\n }\n );\n return (r, o) => {\n for (let c = 0; c < e.length; c++) {\n const i = e[c], u = i(r, o);\n if (u !== 0)\n return u;\n }\n return 0;\n };\n};\nfunction Vn(n, t = 300) {\n let e;\n return (...r) => {\n clearTimeout(e), e = setTimeout(\n () => n(...r),\n t\n );\n };\n}\nfunction Wn(n) {\n return new Promise((t) => setTimeout(t, n));\n}\nexport {\n Sn as Inflect,\n an as add,\n T as ascendingOrder,\n I as booleanField,\n N as booleanSort,\n h as capitalise,\n q as capitaliseWords,\n Fn as capitalize,\n On as capitalizeWords,\n mn as clamp,\n H as commas,\n gn as currency,\n Vn as debounce,\n U as defaultLocale,\n A as descendingOrder,\n ln as divide,\n sn as doNothing,\n Q as entries,\n K as extract,\n f as fail,\n rn as failMsg,\n tn as firstValue,\n R as format,\n G as formatNumber,\n g as getField,\n a as hasValue,\n P as hasValues,\n Mn as hash,\n nn as haveValue,\n un as identity,\n J as inflect,\n S as integerField,\n x as integerSort,\n m as isArray,\n z as isBoolean,\n en as isEmpty,\n Z as isFloat,\n l as isFunction,\n E as isInteger,\n C as isNull,\n y as isNumber,\n B as isObject,\n D as isRegExp,\n k as isSimple,\n s as isString,\n _ as isUndefined,\n v as joinList,\n yn as joinListAnd,\n wn as joinListOr,\n En as keys,\n cn as maybeFunction,\n Cn as multiSort,\n fn as multiply,\n w as noValue,\n F as numberField,\n L as numberSort,\n Nn as objMap,\n Tn as objSubset,\n $ as plural,\n xn as pluralise,\n Ln as pluralize,\n hn as range,\n An as remove,\n on as rethrow,\n b as selector,\n pn as setNumberDefaults,\n In as singular,\n Wn as sleep,\n jn as snakeToCamel,\n $n as snakeToStudly,\n Y as sortOrders,\n X as sortTypes,\n W as splitHash,\n bn as splitLines,\n V as splitList,\n O as stringField,\n M as stringSort,\n dn as subtract,\n Bn as values\n};\n//# sourceMappingURL=badger-utils.js.map\n","import { hasValue, isInteger, isObject, maybeFunction, splitList } from '@abw/badger-utils'\n\nexport const joinClasses = classes =>\n classes\n .filter(hasValue)\n .join(' ')\n\nexport const setKeys = props =>\n Object.entries(props)\n .filter( ([ , value]) => value )\n .map( ([key]) => key )\n\nexport const classes = (...inputs) => joinClasses(\n inputs.flatMap(\n input =>\n isObject(input)\n ? setKeys(input)\n : input\n )\n)\n\nexport const colorClass = color => {\n if (! color) {\n return null\n }\n const [range, fore, back, foreDark, backDark] = color.split('-')\n return classes(\n range,\n foregroundClass(fore),\n backgroundClass(back),\n foregroundDarkClass(foreDark),\n backgroundDarkClass(backDark)\n )\n}\n\nexport const sizeColorProps = ({\n className,\n size,\n color,\n ...props\n}) => ({\n ...props,\n className: classes(\n className, size,\n colorClass(color)\n )\n})\n\nexport const styleProps = (\n {\n className,\n size,\n color,\n border,\n radius,\n shadow,\n grid,\n stack,\n gap,\n pad,\n mar,\n padding=pad,\n margin=mar,\n ...props\n },\n ...more\n) => ({\n ...props,\n className: classes(\n ...more,\n className, size,\n colorClass(color),\n borderClass(border),\n radiusClass(radius),\n shadowClass(shadow),\n gridC