{"version":3,"sources":["../../../src/hooks/useSafeZoneArea/computeOutsideClipPath.ts"],"sourcesContent":["function drawRectangle(rect: { x: number; y: number; width: number; height: number }): string {\n  if (rect.width <= 0 || rect.height <= 0) {\n    return '';\n  }\n\n  let pathData = '';\n\n  // Creates a subpath moving in counterclockwise direction to create a hole\n\n  pathData += `M ${rect.x},${rect.y} `;\n  pathData += `V ${rect.y + rect.height} `; // Down to bottom-left\n  pathData += `H ${rect.x + rect.width} `; // Right to bottom-right\n  pathData += `V ${rect.y} `; // Up to top-right\n  pathData += `H ${rect.x} `; // Left to top-left (closing)\n  pathData += `Z `; // Close path\n\n  return pathData;\n}\n\n/**\n * Computes a clip path that covers the area outside a rectangle.\n *\n * @internal\n */\nexport function computeOutsideClipPath(\n  svgWidth: number,\n  svgHeight: number,\n  targetRect: { x: number; y: number; width: number; height: number },\n): string {\n  let pathData = `M 0,0 H ${svgWidth} V ${svgHeight} H 0 Z `;\n\n  // Draw the rectangle counterclockwise to create a hole in the main path.\n\n  pathData += drawRectangle(targetRect);\n\n  return pathData;\n}\n"],"names":["drawRectangle","rect","width","height","pathData","x","y","computeOutsideClipPath","svgWidth","svgHeight","targetRect"],"mappings":";;;;;;;;;;AAAA,SAASA,cAAcC,IAA6D;IAClF,IAAIA,KAAKC,KAAK,IAAI,KAAKD,KAAKE,MAAM,IAAI,GAAG;QACvC,OAAO;IACT;IAEA,IAAIC,WAAW;IAEf,0EAA0E;IAE1EA,YAAY,CAAC,EAAE,EAAEH,KAAKI,CAAC,CAAC,CAAC,EAAEJ,KAAKK,CAAC,CAAC,CAAC,CAAC;IACpCF,YAAY,CAAC,EAAE,EAAEH,KAAKK,CAAC,GAAGL,KAAKE,MAAM,CAAC,CAAC,CAAC,EAAE,sBAAsB;IAChEC,YAAY,CAAC,EAAE,EAAEH,KAAKI,CAAC,GAAGJ,KAAKC,KAAK,CAAC,CAAC,CAAC,EAAE,wBAAwB;IACjEE,YAAY,CAAC,EAAE,EAAEH,KAAKK,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB;IAC9CF,YAAY,CAAC,EAAE,EAAEH,KAAKI,CAAC,CAAC,CAAC,CAAC,EAAE,6BAA6B;IACzDD,YAAY,CAAC,EAAE,CAAC,EAAE,aAAa;IAE/B,OAAOA;AACT;AAOO,SAASG,uBACdC,QAAgB,EAChBC,SAAiB,EACjBC,UAAmE;IAEnE,IAAIN,WAAW,CAAC,QAAQ,EAAEI,SAAS,GAAG,EAAEC,UAAU,OAAO,CAAC;IAE1D,yEAAyE;IAEzEL,YAAYJ,cAAcU;IAE1B,OAAON;AACT"}