{"version":3,"sources":["../../../../src/client/lib/javascript-url.ts"],"sourcesContent":["// Adapted from React's sanitizeURL function found here: https://github.com/facebook/react/blob/b565373afd0cc1988497e1107106e851e8cfb261/packages/react-dom-bindings/src/shared/sanitizeURL.js\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\nconst isJavaScriptProtocol =\n  // eslint-disable-next-line no-control-regex\n  /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i\n\nexport function isJavaScriptURLString(url: string): boolean {\n  return isJavaScriptProtocol.test('' + (url as unknown as string))\n}\n"],"names":["isJavaScriptProtocol","isJavaScriptURLString","url","test"],"mappings":"AAAA,8LAA8L;AAE9L,oEAAoE;AACpE,6EAA6E;AAC7E,2CAA2C;AAC3C,wCAAwC;AACxC,sDAAsD;AACtD,kEAAkE;AAClE,wCAAwC;AACxC,qDAAqD;AAErD,MAAMA,uBACJ,4CAA4C;AAC5C;AAEF,OAAO,SAASC,sBAAsBC,GAAW;IAC/C,OAAOF,qBAAqBG,IAAI,CAAC,KAAMD;AACzC","ignoreList":[0]}