import {
  a as r,
  c as i
} from "./chunk-IO47FP3U.js";

// ../node_modules/refractor/lang/csp.js
var u = i((c, s) => {
  s.exports = t;
  t.displayName = "csp";
  t.aliases = [];
  function t(o) {
    (function(a) {
      function e(n) {
        return RegExp(
          /([ \t])/.source + "(?:" + n + ")" + /(?=[\s;]|$)/.source,
          "i"
        );
      }
      r(e, "value"), a.languages.csp = {
        directive: {
          pattern: /(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
          lookbehind: !0,
          alias: "property"
        },
        scheme: {
          pattern: e(/[a-z][a-z0-9.+-]*:/.source),
          lookbehind: !0
        },
        none: {
          pattern: e(/'none'/.source),
          lookbehind: !0,
          alias: "keyword"
        },
        nonce: {
          pattern: e(/'nonce-[-+/\w=]+'/.source),
          lookbehind: !0,
          alias: "number"
        },
        hash: {
          pattern: e(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
          lookbehind: !0,
          alias: "number"
        },
        host: {
          pattern: e(
            /[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source + "|" + /\*[^\s;,']*/.source + "|" + /[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
          ),
          lookbehind: !0,
          alias: "url",
          inside: {
            important: /\*/
          }
        },
        keyword: [
          {
            pattern: e(/'unsafe-[a-z-]+'/.source),
            lookbehind: !0,
            alias: "unsafe"
          },
          {
            pattern: e(/'[a-z-]+'/.source),
            lookbehind: !0,
            alias: "safe"
          }
        ],
        punctuation: /;/
      };
    })(o);
  }
  r(t, "csp");
});

export {
  u as a
};
