import{n,a as i}from"./string.ae0d3257.js";import"./outputWidgets.74ac2ec4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="9a9bfb63-0fb7-480c-818b-9b855a7f435b",e._sentryDebugIdIdentifier="sentry-dbid-9a9bfb63-0fb7-480c-818b-9b855a7f435b")}catch{}})();const s=["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];function o(e){return e.replace(/\.py$/,"").trim().length===0?{valid:!1,reason:"File name cannot be empty"}:e.length>255?{valid:!1,reason:"File name cannot be longer than 255 characters"}:e.includes("/")?{valid:!1,reason:"File name cannot contain slashes"}:e.endsWith(".py")?{valid:!0}:{valid:!1,reason:"File name must end with .py"}}function c(e){if(!o(e).valid)throw new Error("Invalid filename");const a=e.slice(0,-3);return n(a,!0,!0)+".py"}function b(e){return n(e,!0,!0)+".py"}function l(e){return e.trim().length===0?{valid:!1,reason:"Variable name cannot be empty"}:/^[a-zA-Z_]/.test(e)?s.includes(e)?{valid:!1,reason:"Variable name cannot be a Python keyword"}:{valid:!0}:{valid:!1,reason:"Variable name must start with a letter or underscore"}}function m(e){if(!l(e).valid)throw new Error("Invalid variable name");return n(e,!1,!0,!1)}function d(e){return e.trim().length===0?{valid:!1,reason:"Path cannot be empty"}:{valid:!0}}function y(e){if(!d(e).valid)throw new Error("Invalid path");return e.split("/").filter(Boolean).map(r=>i(r)).join("/")}export{c as a,b,l as c,m as d,d as e,y as n,o as v};
//# sourceMappingURL=validations.b55cc691.js.map
