{"ast":null,"code":"import _objectSpread from \"C:/Users/user/Desktop/02portreact/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport _objectWithoutProperties from \"C:/Users/user/Desktop/02portreact/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";\nvar _excluded = [\"ratio\", \"style\"];\nimport $8D4cD$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport { forwardRef as $8D4cD$forwardRef, createElement as $8D4cD$createElement } from \"react\";\nimport { Primitive as $8D4cD$Primitive } from \"@radix-ui/react-primitive\";\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\nvar $c1b5f66aac50e106$var$NAME = 'AspectRatio';\nvar $c1b5f66aac50e106$export$e840e8869344ca38 = /*#__PURE__*/$8D4cD$forwardRef(function (props, forwardedRef) {\n  var _props$ratio = props.ratio,\n    ratio = _props$ratio === void 0 ? 1 : _props$ratio,\n    style = props.style,\n    aspectRatioProps = _objectWithoutProperties(props, _excluded);\n  return /*#__PURE__*/$8D4cD$createElement(\"div\", {\n    style: {\n      // ensures inner element is contained\n      position: 'relative',\n      // ensures padding bottom trick maths works\n      width: '100%',\n      paddingBottom: \"\".concat(100 / ratio, \"%\")\n    },\n    \"data-radix-aspect-ratio-wrapper\": \"\"\n  }, /*#__PURE__*/$8D4cD$createElement($8D4cD$Primitive.div, $8D4cD$babelruntimehelpersesmextends({}, aspectRatioProps, {\n    ref: forwardedRef,\n    style: _objectSpread(_objectSpread({}, style), {}, {\n      // ensures children expand in ratio\n      position: 'absolute',\n      top: 0,\n      right: 0,\n      bottom: 0,\n      left: 0\n    })\n  })));\n});\n/*#__PURE__*/\nObject.assign($c1b5f66aac50e106$export$e840e8869344ca38, {\n  displayName: $c1b5f66aac50e106$var$NAME\n});\n/* -----------------------------------------------------------------------------------------------*/\nvar $c1b5f66aac50e106$export$be92b6f5f03c0fe9 = $c1b5f66aac50e106$export$e840e8869344ca38;\nexport { $c1b5f66aac50e106$export$e840e8869344ca38 as AspectRatio, $c1b5f66aac50e106$export$be92b6f5f03c0fe9 as Root };","map":{"version":3,"names":["$c1b5f66aac50e106$var$NAME","$c1b5f66aac50e106$export$e840e8869344ca38","$8D4cD$forwardRef","props","forwardedRef","_props$ratio","ratio","style","aspectRatioProps","_objectWithoutProperties","_excluded","$8D4cD$createElement","position","width","paddingBottom","concat","$8D4cD$Primitive","div","$8D4cD$babelruntimehelpersesmextends","ref","_objectSpread","top","right","bottom","left","Object","assign","displayName","$c1b5f66aac50e106$export$be92b6f5f03c0fe9"],"sources":["C:\\Users\\user\\Desktop\\02portreact\\node_modules\\@radix-ui\\react-aspect-ratio\\dist\\packages\\react\\aspect-ratio\\src\\index.ts","C:\\Users\\user\\Desktop\\02portreact\\node_modules\\@radix-ui\\react-aspect-ratio\\dist\\packages\\react\\aspect-ratio\\src\\AspectRatio.tsx"],"sourcesContent":["export {\n  AspectRatio,\n  //\n  Root,\n} from './AspectRatio';\nexport type { AspectRatioProps } from './AspectRatio';\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface AspectRatioProps extends PrimitiveDivProps {\n  ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef<AspectRatioElement, AspectRatioProps>(\n  (props, forwardedRef) => {\n    const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n    return (\n      <div\n        style={{\n          // ensures inner element is contained\n          position: 'relative',\n          // ensures padding bottom trick maths works\n          width: '100%',\n          paddingBottom: `${100 / ratio}%`,\n        }}\n        data-radix-aspect-ratio-wrapper=\"\"\n      >\n        <Primitive.div\n          {...aspectRatioProps}\n          ref={forwardedRef}\n          style={{\n            ...style,\n            // ensures children expand in ratio\n            position: 'absolute',\n            top: 0,\n            right: 0,\n            bottom: 0,\n            left: 0,\n          }}\n        />\n      </div>\n    );\n  }\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n  AspectRatio,\n  //\n  Root,\n};\nexport type { AspectRatioProps };\n"],"mappings":";;;;;;;ACKA;;;AAIA,IAAMA,0BAAI,GAAG,aAAb;AAQA,IAAMC,yCAAW,gBAAGC,iBAAA,CAClB,UAACC,KAAD,EAAQC,YAAR,EAAyB;EACvB,IAAAC,YAAA,GAAsDF,KAAtD,CAAMG,KAAA;IAAEA,KAAK,GAAAD,YAAA,cAAG,CAAV,GAAAA,YAAA;IAAiBE,KAAjB,GAAgDJ,KAAtD,C;IAAiCK,gBAAH,GAAAC,wBAAA,CAAwBN,KAAtD,EAAAO,SAAA;EACA,oBACEC,oBADF;IAEIJ,KAAK,EAAE;MACL;MACAK,QAAQ,EAAE,UAFL;MAGL;MACAC,KAAK,EAAE,MAJF;MAKLC,aAAa,KAAAC,MAAA,CAAK,MAAMT,KAAM;KANlC;IAQE,mCAAgC;GARlC,eAUEK,oBAAA,CAACK,gBAAD,CAAWC,GAAX,EAAAC,oCAAA,KACMV,gBADN,EAVF;IAYIW,GAAG,EAAEf,YAFP;IAGEG,KAAK,EAAAa,aAAA,CAAAA,aAAA,KACAb,KADE;MAEL;MACAK,QAAQ,EAAE,UAHL;MAILS,GAAG,EAAE,CAJA;MAKLC,KAAK,EAAE,CALF;MAMLC,MAAM,EAAE,CANH;MAOLC,IAAI,EAAE;IAAN;GAVJ,EAVF,CADF;CAHgB,CAApB;AAgCA;AAAAC,MAAA,CAAAC,MAAA,CAAAzB,yCAAA;EAAA0B,WAAA,EAAA3B;CAAA;AAEA;AAEA,IAAM4B,yCAAI,GAAG3B,yCAAb"},"metadata":{},"sourceType":"module","externalDependencies":[]}