load("@rules_closure//closure:defs.bzl", "closure_js_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

closure_js_library(
    name = "safehtml",
    srcs = ["safehtml.js"],
    lenient = True,
    deps = [
        ":safescript",
        ":safestyle",
        ":safestylesheet",
        ":safeurl",
        ":trustedresourceurl",
        ":trustedtypes",
        "//third_party/closure/goog/array",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/dom:tagname",
        "//third_party/closure/goog/dom:tags",
        "//third_party/closure/goog/labs/useragent:browser",
        "//third_party/closure/goog/object",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:internal",
        "//third_party/closure/goog/string:typedstring",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "safehtmlformatter",
    srcs = ["safehtmlformatter.js"],
    lenient = True,
    deps = [
        ":safehtml",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/dom:tags",
        "//third_party/closure/goog/string",
    ],
)

closure_js_library(
    name = "safescript",
    srcs = ["safescript.js"],
    lenient = True,
    deps = [
        ":trustedtypes",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:typedstring",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "safestyle",
    srcs = ["safestyle.js"],
    lenient = True,
    deps = [
        ":safeurl",
        "//third_party/closure/goog/array",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:internal",
        "//third_party/closure/goog/string:typedstring",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "safestylesheet",
    srcs = ["safestylesheet.js"],
    lenient = True,
    deps = [
        ":safestyle",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/object",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:internal",
        "//third_party/closure/goog/string:typedstring",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "safeurl",
    srcs = ["safeurl.js"],
    lenient = True,
    deps = [
        ":trustedresourceurl",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/fs:url",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:internal",
        "//third_party/closure/goog/string:typedstring",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "trustedresourceurl",
    srcs = ["trustedresourceurl.js"],
    lenient = True,
    deps = [
        ":safescript",
        ":trustedtypes",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/fs:blob",
        "//third_party/closure/goog/fs:url",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:typedstring",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "trustedtypes",
    srcs = ["trustedtypes.js"],
    lenient = True,
    deps = [
        "//third_party/closure/goog/memoize",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "uncheckedconversions",
    srcs = ["uncheckedconversions.js"],
    lenient = True,
    deps = [
        ":safehtml",
        ":safescript",
        ":safestyle",
        ":safestylesheet",
        ":safeurl",
        ":trustedresourceurl",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:internal",
    ],
)
