{"ast":null,"code":"import classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function useCol(_ref) {\n let {\n as,\n bsPrefix,\n className,\n ...props\n } = _ref;\n bsPrefix = useBootstrapPrefix(bsPrefix, 'col');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const spans = [];\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let span;\n let offset;\n let order;\n if (typeof propValue === 'object' && propValue != null) {\n ({\n span,\n offset,\n order\n } = propValue);\n } else {\n span = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (span) spans.push(span === true ? `${bsPrefix}${infix}` : `${bsPrefix}${infix}-${span}`);\n if (order != null) classes.push(`order${infix}-${order}`);\n if (offset != null) classes.push(`offset${infix}-${offset}`);\n });\n return [{\n ...props,\n className: classNames(className, ...spans, ...classes)\n }, {\n as,\n bsPrefix,\n spans\n }];\n}\nconst Col = /*#__PURE__*/React.forwardRef(\n// Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n(props, ref) => {\n const [{\n className,\n ...colProps\n }, {\n as: Component = 'div',\n bsPrefix,\n spans\n }] = useCol(props);\n return /*#__PURE__*/_jsx(Component, {\n ...colProps,\n ref: ref,\n className: classNames(className, !spans.length && bsPrefix)\n });\n});\nCol.displayName = 'Col';\nexport default Col;","map":{"version":3,"names":["classNames","React","useBootstrapPrefix","useBootstrapBreakpoints","useBootstrapMinBreakpoint","jsx","_jsx","useCol","as","bsPrefix","className","props","breakpoints","minBreakpoint","spans","classes","forEach","brkPoint","propValue","span","offset","order","infix","push","Col","forwardRef","ref","colProps","Component","length","displayName"],"sources":["C:/Cours/SAE/SAE-3.01/Scripted/Scripted/website/node_modules/react-bootstrap/esm/Col.js"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function useCol({\n as,\n bsPrefix,\n className,\n ...props\n}) {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'col');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const spans = [];\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let span;\n let offset;\n let order;\n\n if (typeof propValue === 'object' && propValue != null) {\n ({\n span,\n offset,\n order\n } = propValue);\n } else {\n span = propValue;\n }\n\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (span) spans.push(span === true ? `${bsPrefix}${infix}` : `${bsPrefix}${infix}-${span}`);\n if (order != null) classes.push(`order${infix}-${order}`);\n if (offset != null) classes.push(`offset${infix}-${offset}`);\n });\n return [{ ...props,\n className: classNames(className, ...spans, ...classes)\n }, {\n as,\n bsPrefix,\n spans\n }];\n}\nconst Col = /*#__PURE__*/React.forwardRef( // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n(props, ref) => {\n const [{\n className,\n ...colProps\n }, {\n as: Component = 'div',\n bsPrefix,\n spans\n }] = useCol(props);\n return /*#__PURE__*/_jsx(Component, { ...colProps,\n ref: ref,\n className: classNames(className, !spans.length && bsPrefix)\n });\n});\nCol.displayName = 'Col';\nexport default Col;"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,EAAEC,uBAAuB,EAAEC,yBAAyB,QAAQ,iBAAiB;AACxG,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,OAAO,SAASC,MAAM,OAKnB;EAAA,IALoB;IACrBC,EAA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