import { warningOnce as p } from "../../rc-util/es/warning.mjs";
const $ = function(a, t) {
  if (a && t) {
    var i = Array.isArray(t) ? t : t.split(","), f = a.name || "", n = a.type || "", s = n.replace(/\/.*$/, "");
    return i.some(function(u) {
      var r = u.trim();
      if (/^\*(\/\*)?$/.test(u))
        return !0;
      if (r.charAt(0) === ".") {
        var c = f.toLowerCase(), e = r.toLowerCase(), o = [e];
        return (e === ".jpg" || e === ".jpeg") && (o = [".jpg", ".jpeg"]), o.some(function(v) {
          return c.endsWith(v);
        });
      }
      return /\/\*$/.test(r) ? s === r.replace(/\/.*$/, "") : n === r ? !0 : /^\w+$/.test(r) ? (p(!1, "Upload takes an invalidate 'accept' type '".concat(r, "'.Skip for check.")), !0) : !1;
    });
  }
  return !0;
};
export {
  $ as default
};
