{"ast":null,"code":"import $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 * -----------------------------------------------------------------------------------------------*/\nconst $c1b5f66aac50e106$var$NAME = 'AspectRatio';\nconst $c1b5f66aac50e106$export$e840e8869344ca38 = /*#__PURE__*/$8D4cD$forwardRef((props, forwardedRef) => {\n  const {\n    ratio = 1,\n    style: style,\n    ...aspectRatioProps\n  } = props;\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: `${100 / ratio}%`\n    },\n    \"data-radix-aspect-ratio-wrapper\": \"\"\n  }, /*#__PURE__*/$8D4cD$createElement($8D4cD$Primitive.div, $8D4cD$babelruntimehelpersesmextends({}, 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});\n/*#__PURE__*/\nObject.assign($c1b5f66aac50e106$export$e840e8869344ca38, {\n  displayName: $c1b5f66aac50e106$var$NAME\n});\n/* -----------------------------------------------------------------------------------------------*/\nconst $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","ratio","style","aspectRatioProps","$8D4cD$createElement","position","width","paddingBottom","$8D4cD$Primitive","div","$8D4cD$babelruntimehelpersesmextends","ref","top","right","bottom","left","Object","assign","displayName","$c1b5f66aac50e106$export$be92b6f5f03c0fe9"],"sources":["C:\\Users\\user\\Desktop\\000newport\\node_modules\\@radix-ui\\react-aspect-ratio\\dist\\packages\\react\\aspect-ratio\\src\\index.ts","C:\\Users\\user\\Desktop\\000newport\\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,MAAMA,0BAAI,GAAG,aAAb;AAQA,MAAMC,yCAAW,gBAAGC,iBAAA,CAClB,CAACC,KAAD,EAAQC,YAAR,KAAyB;EACvB,MAAM;IAAEC,KAAK,GAAG,CAAV;WAAiBC,KAAjB;IAAwB,GAAGC;EAAH,CAAxB,GAAgDJ,KAAtD;EACA,oBACEK,oBADF;IAEIF,KAAK,EAAE;MACL;MACAG,QAAQ,EAAE,UAFL;MAGL;MACAC,KAAK,EAAE,MAJF;MAKLC,aAAa,EAAG,GAAE,MAAMN,KAAxB;KANJ;IAQE,mCAAgC;GARlC,eAUEG,oBAAA,CAACI,gBAAD,CAAWC,GAAX,EAAAC,oCAAA,KACMP,gBADN,EAVF;IAYIQ,GAAG,EAAEX,YAFP;IAGEE,KAAK,EAAE;MACL,GAAGA,KADE;MAEL;MACAG,QAAQ,EAAE,UAHL;MAILO,GAAG,EAAE,CAJA;MAKLC,KAAK,EAAE,CALF;MAMLC,MAAM,EAAE,CANH;MAOLC,IAAI,EAAE;;GAVV,EAVF,CADF;CAHgB,CAApB;AAgCA;AAAAC,MAAA,CAAAC,MAAA,CAAApB,yCAAA;EAAAqB,WAAA,EAAAtB;CAAA;AAEA;AAEA,MAAMuB,yCAAI,GAAGtB,yCAAb"},"metadata":{},"sourceType":"module","externalDependencies":[]}