import p from "./index-classCallCheck.js";
import c from "./index-createClass.js";
import s from "./index-assertThisInitialized.js";
import f from "./index-inherits.js";
import l from "./index-createSuper.js";
import n from "./index-defineProperty.js";
import { Parser as h } from "./index-Parser4.js";
import { numericPatterns as v } from "./index-constants4.js";
import { parseNDigits as P, parseNumericPattern as T } from "./index-utils12.js";
var w = /* @__PURE__ */ (function(u) {
  f(a, u);
  var i = l(a);
  function a() {
    var o;
    p(this, a);
    for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
      e[t] = arguments[t];
    return o = i.call.apply(i, [this].concat(e)), n(s(o), "priority", 70), n(s(o), "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]), o;
  }
  return c(a, [{
    key: "parse",
    value: function(r, e, t) {
      switch (e) {
        case "k":
          return T(v.hour24h, r);
        case "ko":
          return t.ordinalNumber(r, {
            unit: "hour"
          });
        default:
          return P(e.length, r);
      }
    }
  }, {
    key: "validate",
    value: function(r, e) {
      return e >= 1 && e <= 24;
    }
  }, {
    key: "set",
    value: function(r, e, t) {
      var m = t <= 24 ? t % 24 : t;
      return r.setUTCHours(m, 0, 0, 0), r;
    }
  }]), a;
})(h);
export {
  w as Hour1To24Parser
};
