{"ast":null,"code":"import { percent, mixNumber } from 'motion-dom';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\") return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis) originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };","map":{"version":3,"names":["percent","mixNumber","scalePoint","removePointDelta","point","translate","scale","originPoint","boxScale","undefined","removeAxisDelta","axis","origin","originAxis","sourceAxis","test","parseFloat","relativeProgress","min","max","removeAxisTransforms","transforms","key","scaleKey","originKey","xKeys","yKeys","removeBoxTransforms","box","originBox","sourceBox","x","y"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs"],"sourcesContent":["import { percent, mixNumber } from 'motion-dom';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,SAAS,QAAQ,YAAY;AAC/C,SAASC,UAAU,QAAQ,mBAAmB;;AAE9C;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,KAAK,EAAEC,SAAS,EAAEC,KAAK,EAAEC,WAAW,EAAEC,QAAQ,EAAE;EACtEJ,KAAK,IAAIC,SAAS;EAClBD,KAAK,GAAGF,UAAU,CAACE,KAAK,EAAE,CAAC,GAAGE,KAAK,EAAEC,WAAW,CAAC;EACjD,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IACxBL,KAAK,GAAGF,UAAU,CAACE,KAAK,EAAE,CAAC,GAAGI,QAAQ,EAAED,WAAW,CAAC;EACxD;EACA,OAAOH,KAAK;AAChB;AACA;AACA;AACA;AACA,SAASM,eAAeA,CAACC,IAAI,EAAEN,SAAS,GAAG,CAAC,EAAEC,KAAK,GAAG,CAAC,EAAEM,MAAM,GAAG,GAAG,EAAEJ,QAAQ,EAAEK,UAAU,GAAGF,IAAI,EAAEG,UAAU,GAAGH,IAAI,EAAE;EACnH,IAAIX,OAAO,CAACe,IAAI,CAACV,SAAS,CAAC,EAAE;IACzBA,SAAS,GAAGW,UAAU,CAACX,SAAS,CAAC;IACjC,MAAMY,gBAAgB,GAAGhB,SAAS,CAACa,UAAU,CAACI,GAAG,EAAEJ,UAA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