import { openBlock as pt, createElementBlock as vt, unref as wt } from "vue";
import { computedAsync as mt } from "./composables-5f691338.js";
var rt = {}, nt;
Object.defineProperty(rt, "__esModule", { value: !0 });
var Et = [0, 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706], it = function(e) {
  if (!e)
    throw new Error('"version" cannot be null or undefined');
  if (e < 1 || e > 40)
    throw new Error('"version" should be in range from 1 to 40');
  return 4 * e + 17;
}, Z = function(e) {
  return Et[e];
}, $ = function(e) {
  for (var t = 0; e !== 0; )
    t++, e >>>= 1;
  return t;
}, yt = function(e) {
  if (typeof e != "function")
    throw new Error('"toSJISFunc" is not a valid function.');
  nt = e;
}, at = function() {
  return nt !== void 0;
}, At = function(e) {
  return nt(e);
};
function U(e, t) {
  return e(t = { exports: {} }, t.exports), t.exports;
}
var A = U(function(e, t) {
  t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 }, t.isValid = function(r) {
    return r && r.bit !== void 0 && r.bit >= 0 && r.bit < 4;
  }, t.from = function(r, i) {
    if (t.isValid(r))
      return r;
    try {
      return function(o) {
        if (typeof o != "string")
          throw new Error("Param is not a string");
        switch (o.toLowerCase()) {
          case "l":
          case "low":
            return t.L;
          case "m":
          case "medium":
            return t.M;
          case "q":
          case "quartile":
            return t.Q;
          case "h":
          case "high":
            return t.H;
          default:
            throw new Error("Unknown EC Level: " + o);
        }
      }(r);
    } catch {
      return i;
    }
  };
});
A.L, A.M, A.Q, A.H, A.isValid;
function lt() {
  this.buffer = [], this.length = 0;
}
lt.prototype = { get: function(e) {
  var t = Math.floor(e / 8);
  return (this.buffer[t] >>> 7 - e % 8 & 1) == 1;
}, put: function(e, t) {
  for (var r = 0; r < t; r++)
    this.putBit((e >>> t - r - 1 & 1) == 1);
}, getLengthInBits: function() {
  return this.length;
}, putBit: function(e) {
  var t = Math.floor(this.length / 8);
  this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
} };
var Bt = lt;
function Y(e) {
  if (!e || e < 1)
    throw new Error("BitMatrix size must be defined and greater than 0");
  this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
}
Y.prototype.set = function(e, t, r, i) {
  var o = e * this.size + t;
  this.data[o] = r, i && (this.reservedBit[o] = !0);
}, Y.prototype.get = function(e, t) {
  return this.data[e * this.size + t];
}, Y.prototype.xor = function(e, t, r) {
  this.data[e * this.size + t] ^= r;
}, Y.prototype.isReserved = function(e, t) {
  return this.reservedBit[e * this.size + t];
};
var Nt = Y, G = U(function(e, t) {
  var r = it;
  t.getRowColCoords = function(i) {
    if (i === 1)
      return [];
    for (var o = Math.floor(i / 7) + 2, a = r(i), h = a === 145 ? 26 : 2 * Math.ceil((a - 13) / (2 * o - 2)), n = [a - 7], s = 1; s < o - 1; s++)
      n[s] = n[s - 1] - h;
    return n.push(6), n.reverse();
  }, t.getPositions = function(i) {
    for (var o = [], a = t.getRowColCoords(i), h = a.length, n = 0; n < h; n++)
      for (var s = 0; s < h; s++)
        n === 0 && s === 0 || n === 0 && s === h - 1 || n === h - 1 && s === 0 || o.push([a[n], a[s]]);
    return o;
  };
}), Mt = (G.getRowColCoords, G.getPositions, it), Pt = function(e) {
  var t = Mt(e);
  return [[0, 0], [t - 7, 0], [0, t - 7]];
}, M = U(function(e, t) {
  t.Patterns = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 };
  var r = 3, i = 3, o = 40, a = 10;
  function h(n, s, u) {
    switch (n) {
      case t.Patterns.PATTERN000:
        return (s + u) % 2 == 0;
      case t.Patterns.PATTERN001:
        return s % 2 == 0;
      case t.Patterns.PATTERN010:
        return u % 3 == 0;
      case t.Patterns.PATTERN011:
        return (s + u) % 3 == 0;
      case t.Patterns.PATTERN100:
        return (Math.floor(s / 2) + Math.floor(u / 3)) % 2 == 0;
      case t.Patterns.PATTERN101:
        return s * u % 2 + s * u % 3 == 0;
      case t.Patterns.PATTERN110:
        return (s * u % 2 + s * u % 3) % 2 == 0;
      case t.Patterns.PATTERN111:
        return (s * u % 3 + (s + u) % 2) % 2 == 0;
      default:
        throw new Error("bad maskPattern:" + n);
    }
  }
  t.isValid = function(n) {
    return n != null && n !== "" && !isNaN(n) && n >= 0 && n <= 7;
  }, t.from = function(n) {
    return t.isValid(n) ? parseInt(n, 10) : void 0;
  }, t.getPenaltyN1 = function(n) {
    for (var s = n.size, u = 0, f = 0, c = 0, l = null, g = null, p = 0; p < s; p++) {
      f = c = 0, l = g = null;
      for (var w = 0; w < s; w++) {
        var v = n.get(p, w);
        v === l ? f++ : (f >= 5 && (u += r + (f - 5)), l = v, f = 1), (v = n.get(w, p)) === g ? c++ : (c >= 5 && (u += r + (c - 5)), g = v, c = 1);
      }
      f >= 5 && (u += r + (f - 5)), c >= 5 && (u += r + (c - 5));
    }
    return u;
  }, t.getPenaltyN2 = function(n) {
    for (var s = n.size, u = 0, f = 0; f < s - 1; f++)
      for (var c = 0; c < s - 1; c++) {
        var l = n.get(f, c) + n.get(f, c + 1) + n.get(f + 1, c) + n.get(f + 1, c + 1);
        l !== 4 && l !== 0 || u++;
      }
    return u * i;
  }, t.getPenaltyN3 = function(n) {
    for (var s = n.size, u = 0, f = 0, c = 0, l = 0; l < s; l++) {
      f = c = 0;
      for (var g = 0; g < s; g++)
        f = f << 1 & 2047 | n.get(l, g), g >= 10 && (f === 1488 || f === 93) && u++, c = c << 1 & 2047 | n.get(g, l), g >= 10 && (c === 1488 || c === 93) && u++;
    }
    return u * o;
  }, t.getPenaltyN4 = function(n) {
    for (var s = 0, u = n.data.length, f = 0; f < u; f++)
      s += n.data[f];
    return Math.abs(Math.ceil(100 * s / u / 5) - 10) * a;
  }, t.applyMask = function(n, s) {
    for (var u = s.size, f = 0; f < u; f++)
      for (var c = 0; c < u; c++)
        s.isReserved(c, f) || s.xor(c, f, h(n, c, f));
  }, t.getBestMask = function(n, s) {
    for (var u = Object.keys(t.Patterns).length, f = 0, c = 1 / 0, l = 0; l < u; l++) {
      s(l), t.applyMask(l, n);
      var g = t.getPenaltyN1(n) + t.getPenaltyN2(n) + t.getPenaltyN3(n) + t.getPenaltyN4(n);
      t.applyMask(l, n), g < c && (c = g, f = l);
    }
    return f;
  };
}), K = (M.Patterns, M.isValid, M.getPenaltyN1, M.getPenaltyN2, M.getPenaltyN3, M.getPenaltyN4, M.applyMask, M.getBestMask, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 4, 1, 2, 4, 4, 2, 4, 4, 4, 2, 4, 6, 5, 2, 4, 6, 6, 2, 5, 8, 8, 4, 5, 8, 8, 4, 5, 8, 11, 4, 8, 10, 11, 4, 9, 12, 16, 4, 9, 16, 16, 6, 10, 12, 18, 6, 10, 17, 16, 6, 11, 16, 19, 6, 13, 18, 21, 7, 14, 21, 25, 8, 16, 20, 25, 8, 17, 23, 25, 9, 17, 23, 34, 9, 18, 25, 30, 10, 20, 27, 32, 12, 21, 29, 35, 12, 23, 34, 37, 12, 25, 34, 40, 13, 26, 35, 42, 14, 28, 38, 45, 15, 29, 40, 48, 16, 31, 43, 51, 17, 33, 45, 54, 18, 35, 48, 57, 19, 37, 51, 60, 19, 38, 53, 63, 20, 40, 56, 66, 21, 43, 59, 70, 22, 45, 62, 74, 24, 47, 65, 77, 25, 49, 68, 81]), D = [7, 10, 13, 17, 10, 16, 22, 28, 15, 26, 36, 44, 20, 36, 52, 64, 26, 48, 72, 88, 36, 64, 96, 112, 40, 72, 108, 130, 48, 88, 132, 156, 60, 110, 160, 192, 72, 130, 192, 224, 80, 150, 224, 264, 96, 176, 260, 308, 104, 198, 288, 352, 120, 216, 320, 384, 132, 240, 360, 432, 144, 280, 408, 480, 168, 308, 448, 532, 180, 338, 504, 588, 196, 364, 546, 650, 224, 416, 600, 700, 224, 442, 644, 750, 252, 476, 690, 816, 270, 504, 750, 900, 300, 560, 810, 960, 312, 588, 870, 1050, 336, 644, 952, 1110, 360, 700, 1020, 1200, 390, 728, 1050, 1260, 420, 784, 1140, 1350, 450, 812, 1200, 1440, 480, 868, 1290, 1530, 510, 924, 1350, 1620, 540, 980, 1440, 1710, 570, 1036, 1530, 1800, 570, 1064, 1590, 1890, 600, 1120, 1680, 1980, 630, 1204, 1770, 2100, 660, 1260, 1860, 2220, 720, 1316, 1950, 2310, 750, 1372, 2040, 2430], It = function(e, t) {
  switch (t) {
    case A.L:
      return K[4 * (e - 1) + 0];
    case A.M:
      return K[4 * (e - 1) + 1];
    case A.Q:
      return K[4 * (e - 1) + 2];
    case A.H:
      return K[4 * (e - 1) + 3];
    default:
      return;
  }
}, W = function(e, t) {
  switch (t) {
    case A.L:
      return D[4 * (e - 1) + 0];
    case A.M:
      return D[4 * (e - 1) + 1];
    case A.Q:
      return D[4 * (e - 1) + 2];
    case A.H:
      return D[4 * (e - 1) + 3];
    default:
      return;
  }
}, H = new Uint8Array(512), tt = new Uint8Array(256);
(function() {
  for (var e = 1, t = 0; t < 255; t++)
    H[t] = e, tt[e] = t, 256 & (e <<= 1) && (e ^= 285);
  for (t = 255; t < 512; t++)
    H[t] = H[t - 255];
})();
var Ct = function(e) {
  return H[e];
}, st = function(e, t) {
  return e === 0 || t === 0 ? 0 : H[tt[e] + tt[t]];
}, J = U(function(e, t) {
  t.mul = function(r, i) {
    for (var o = new Uint8Array(r.length + i.length - 1), a = 0; a < r.length; a++)
      for (var h = 0; h < i.length; h++)
        o[a + h] ^= st(r[a], i[h]);
    return o;
  }, t.mod = function(r, i) {
    for (var o = new Uint8Array(r); o.length - i.length >= 0; ) {
      for (var a = o[0], h = 0; h < i.length; h++)
        o[h] ^= st(i[h], a);
      for (var n = 0; n < o.length && o[n] === 0; )
        n++;
      o = o.slice(n);
    }
    return o;
  }, t.generateECPolynomial = function(r) {
    for (var i = new Uint8Array([1]), o = 0; o < r; o++)
      i = t.mul(i, new Uint8Array([1, Ct(o)]));
    return i;
  };
});
J.mul, J.mod, J.generateECPolynomial;
function et(e) {
  this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
}
et.prototype.initialize = function(e) {
  this.degree = e, this.genPoly = J.generateECPolynomial(this.degree);
}, et.prototype.encode = function(e) {
  if (!this.genPoly)
    throw new Error("Encoder not initialized");
  var t = new Uint8Array(e.length + this.degree);
  t.set(e);
  var r = J.mod(t, this.genPoly), i = this.degree - r.length;
  if (i > 0) {
    var o = new Uint8Array(this.degree);
    return o.set(r, i), o;
  }
  return r;
};
var Rt = et, Q = function(e) {
  return !isNaN(e) && e >= 1 && e <= 40;
}, V = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+", Tt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + (V = V.replace(/u/g, "\\u")) + `)(?:.|[\r
]))+`, Lt = new RegExp(V, "g"), bt = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), Ut = new RegExp(Tt, "g"), xt = new RegExp("[0-9]+", "g"), _t = new RegExp("[A-Z $%*+\\-./:]+", "g"), kt = new RegExp("^" + V + "$"), zt = new RegExp("^[0-9]+$"), St = new RegExp("^[A-Z0-9 $%*+\\-./:]+$"), b = { KANJI: Lt, BYTE_KANJI: bt, BYTE: Ut, NUMERIC: xt, ALPHANUMERIC: _t, testKanji: function(e) {
  return kt.test(e);
}, testNumeric: function(e) {
  return zt.test(e);
}, testAlphanumeric: function(e) {
  return St.test(e);
} }, d = U(function(e, t) {
  t.NUMERIC = { id: "Numeric", bit: 1, ccBits: [10, 12, 14] }, t.ALPHANUMERIC = { id: "Alphanumeric", bit: 2, ccBits: [9, 11, 13] }, t.BYTE = { id: "Byte", bit: 4, ccBits: [8, 16, 16] }, t.KANJI = { id: "Kanji", bit: 8, ccBits: [8, 10, 12] }, t.MIXED = { bit: -1 }, t.getCharCountIndicator = function(r, i) {
    if (!r.ccBits)
      throw new Error("Invalid mode: " + r);
    if (!Q(i))
      throw new Error("Invalid version: " + i);
    return i >= 1 && i < 10 ? r.ccBits[0] : i < 27 ? r.ccBits[1] : r.ccBits[2];
  }, t.getBestModeForData = function(r) {
    return b.testNumeric(r) ? t.NUMERIC : b.testAlphanumeric(r) ? t.ALPHANUMERIC : b.testKanji(r) ? t.KANJI : t.BYTE;
  }, t.toString = function(r) {
    if (r && r.id)
      return r.id;
    throw new Error("Invalid mode");
  }, t.isValid = function(r) {
    return r && r.bit && r.ccBits;
  }, t.from = function(r, i) {
    if (t.isValid(r))
      return r;
    try {
      return function(o) {
        if (typeof o != "string")
          throw new Error("Param is not a string");
        switch (o.toLowerCase()) {
          case "numeric":
            return t.NUMERIC;
          case "alphanumeric":
            return t.ALPHANUMERIC;
          case "kanji":
            return t.KANJI;
          case "byte":
            return t.BYTE;
          default:
            throw new Error("Unknown mode: " + o);
        }
      }(r);
    } catch {
      return i;
    }
  };
}), $t = (d.NUMERIC, d.ALPHANUMERIC, d.BYTE, d.KANJI, d.MIXED, d.getCharCountIndicator, d.getBestModeForData, d.isValid, {}.toString), dt = Array.isArray || function(e) {
  return $t.call(e) == "[object Array]";
}, x = U(function(e, t) {
  var r = $(7973);
  function i(a, h) {
    return d.getCharCountIndicator(a, h) + 4;
  }
  function o(a, h) {
    var n = 0;
    return a.forEach(function(s) {
      var u = i(s.mode, h);
      n += u + s.getBitsLength();
    }), n;
  }
  t.from = function(a, h) {
    return Q(a) ? parseInt(a, 10) : h;
  }, t.getCapacity = function(a, h, n) {
    if (!Q(a))
      throw new Error("Invalid QR Code version");
    n === void 0 && (n = d.BYTE);
    var s = 8 * (Z(a) - W(a, h));
    if (n === d.MIXED)
      return s;
    var u = s - i(n, a);
    switch (n) {
      case d.NUMERIC:
        return Math.floor(u / 10 * 3);
      case d.ALPHANUMERIC:
        return Math.floor(u / 11 * 2);
      case d.KANJI:
        return Math.floor(u / 13);
      case d.BYTE:
      default:
        return Math.floor(u / 8);
    }
  }, t.getBestVersionForData = function(a, h) {
    var n, s = A.from(h, A.M);
    if (dt(a)) {
      if (a.length > 1)
        return function(u, f) {
          for (var c = 1; c <= 40; c++)
            if (o(u, c) <= t.getCapacity(c, f, d.MIXED))
              return c;
        }(a, s);
      if (a.length === 0)
        return 1;
      n = a[0];
    } else
      n = a;
    return function(u, f, c) {
      for (var l = 1; l <= 40; l++)
        if (f <= t.getCapacity(l, c, u))
          return l;
    }(n.mode, n.getLength(), s);
  }, t.getEncodedBits = function(a) {
    if (!Q(a) || a < 7)
      throw new Error("Invalid QR Code version");
    for (var h = a << 12; $(h) - r >= 0; )
      h ^= 7973 << $(h) - r;
    return a << 12 | h;
  };
}), ut = (x.getCapacity, x.getBestVersionForData, x.getEncodedBits, $(1335)), Ft = function(e, t) {
  for (var r = e.bit << 3 | t, i = r << 10; $(i) - ut >= 0; )
    i ^= 1335 << $(i) - ut;
  return 21522 ^ (r << 10 | i);
};
function _(e) {
  this.mode = d.NUMERIC, this.data = e.toString();
}
_.getBitsLength = function(e) {
  return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
}, _.prototype.getLength = function() {
  return this.data.length;
}, _.prototype.getBitsLength = function() {
  return _.getBitsLength(this.data.length);
}, _.prototype.write = function(e) {
  var t, r, i;
  for (t = 0; t + 3 <= this.data.length; t += 3)
    r = this.data.substr(t, 3), i = parseInt(r, 10), e.put(i, 10);
  var o = this.data.length - t;
  o > 0 && (r = this.data.substr(t), i = parseInt(r, 10), e.put(i, 3 * o + 1));
};
var ft = _, O = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"];
function k(e) {
  this.mode = d.ALPHANUMERIC, this.data = e;
}
k.getBitsLength = function(e) {
  return 11 * Math.floor(e / 2) + e % 2 * 6;
}, k.prototype.getLength = function() {
  return this.data.length;
}, k.prototype.getBitsLength = function() {
  return k.getBitsLength(this.data.length);
}, k.prototype.write = function(e) {
  var t;
  for (t = 0; t + 2 <= this.data.length; t += 2) {
    var r = 45 * O.indexOf(this.data[t]);
    r += O.indexOf(this.data[t + 1]), e.put(r, 11);
  }
  this.data.length % 2 && e.put(O.indexOf(this.data[t]), 6);
};
var ct = k;
function z(e) {
  this.mode = d.BYTE, this.data = new Uint8Array(function(t) {
    for (var r = [], i = t.length, o = 0; o < i; o++) {
      var a = t.charCodeAt(o);
      if (a >= 55296 && a <= 56319 && i > o + 1) {
        var h = t.charCodeAt(o + 1);
        h >= 56320 && h <= 57343 && (a = 1024 * (a - 55296) + h - 56320 + 65536, o += 1);
      }
      a < 128 ? r.push(a) : a < 2048 ? (r.push(a >> 6 | 192), r.push(63 & a | 128)) : a < 55296 || a >= 57344 && a < 65536 ? (r.push(a >> 12 | 224), r.push(a >> 6 & 63 | 128), r.push(63 & a | 128)) : a >= 65536 && a <= 1114111 ? (r.push(a >> 18 | 240), r.push(a >> 12 & 63 | 128), r.push(a >> 6 & 63 | 128), r.push(63 & a | 128)) : r.push(239, 191, 189);
    }
    return new Uint8Array(r).buffer;
  }(e));
}
z.getBitsLength = function(e) {
  return 8 * e;
}, z.prototype.getLength = function() {
  return this.data.length;
}, z.prototype.getBitsLength = function() {
  return z.getBitsLength(this.data.length);
}, z.prototype.write = function(e) {
  for (var t = 0, r = this.data.length; t < r; t++)
    e.put(this.data[t], 8);
};
var ht = z;
function S(e) {
  this.mode = d.KANJI, this.data = e;
}
S.getBitsLength = function(e) {
  return 13 * e;
}, S.prototype.getLength = function() {
  return this.data.length;
}, S.prototype.getBitsLength = function() {
  return S.getBitsLength(this.data.length);
}, S.prototype.write = function(e) {
  var t;
  for (t = 0; t < this.data.length; t++) {
    var r = At(this.data[t]);
    if (r >= 33088 && r <= 40956)
      r -= 33088;
    else {
      if (!(r >= 57408 && r <= 60351))
        throw new Error("Invalid SJIS character: " + this.data[t] + `
Make sure your charset is UTF-8`);
      r -= 49472;
    }
    r = 192 * (r >>> 8 & 255) + (255 & r), e.put(r, 13);
  }
};
var gt = S, Yt = U(function(e) {
  var t = { single_source_shortest_paths: function(r, i, o) {
    var a = {}, h = {};
    h[i] = 0;
    var n, s, u, f, c, l, g, p = t.PriorityQueue.make();
    for (p.push(i, 0); !p.empty(); )
      for (u in s = (n = p.pop()).value, f = n.cost, c = r[s] || {})
        c.hasOwnProperty(u) && (l = f + c[u], g = h[u], (h[u] === void 0 || g > l) && (h[u] = l, p.push(u, l), a[u] = s));
    if (o !== void 0 && h[o] === void 0) {
      var w = ["Could not find a path from ", i, " to ", o, "."].join("");
      throw new Error(w);
    }
    return a;
  }, extract_shortest_path_from_predecessor_list: function(r, i) {
    for (var o = [], a = i; a; )
      o.push(a), r[a], a = r[a];
    return o.reverse(), o;
  }, find_path: function(r, i, o) {
    var a = t.single_source_shortest_paths(r, i, o);
    return t.extract_shortest_path_from_predecessor_list(a, o);
  }, PriorityQueue: { make: function(r) {
    var i, o = t.PriorityQueue, a = {};
    for (i in r = r || {}, o)
      o.hasOwnProperty(i) && (a[i] = o[i]);
    return a.queue = [], a.sorter = r.sorter || o.default_sorter, a;
  }, default_sorter: function(r, i) {
    return r.cost - i.cost;
  }, push: function(r, i) {
    var o = { value: r, cost: i };
    this.queue.push(o), this.queue.sort(this.sorter);
  }, pop: function() {
    return this.queue.shift();
  }, empty: function() {
    return this.queue.length === 0;
  } } };
  e.exports = t;
}), F = U(function(e, t) {
  function r(n) {
    return unescape(encodeURIComponent(n)).length;
  }
  function i(n, s, u) {
    for (var f, c = []; (f = n.exec(u)) !== null; )
      c.push({ data: f[0], index: f.index, mode: s, length: f[0].length });
    return c;
  }
  function o(n) {
    var s, u, f = i(b.NUMERIC, d.NUMERIC, n), c = i(b.ALPHANUMERIC, d.ALPHANUMERIC, n);
    return at() ? (s = i(b.BYTE, d.BYTE, n), u = i(b.KANJI, d.KANJI, n)) : (s = i(b.BYTE_KANJI, d.BYTE, n), u = []), f.concat(c, s, u).sort(function(l, g) {
      return l.index - g.index;
    }).map(function(l) {
      return { data: l.data, mode: l.mode, length: l.length };
    });
  }
  function a(n, s) {
    switch (s) {
      case d.NUMERIC:
        return ft.getBitsLength(n);
      case d.ALPHANUMERIC:
        return ct.getBitsLength(n);
      case d.KANJI:
        return gt.getBitsLength(n);
      case d.BYTE:
        return ht.getBitsLength(n);
    }
  }
  function h(n, s) {
    var u, f = d.getBestModeForData(n);
    if ((u = d.from(s, f)) !== d.BYTE && u.bit < f.bit)
      throw new Error('"' + n + '" cannot be encoded with mode ' + d.toString(u) + `.
 Suggested mode is: ` + d.toString(f));
    switch (u !== d.KANJI || at() || (u = d.BYTE), u) {
      case d.NUMERIC:
        return new ft(n);
      case d.ALPHANUMERIC:
        return new ct(n);
      case d.KANJI:
        return new gt(n);
      case d.BYTE:
        return new ht(n);
    }
  }
  t.fromArray = function(n) {
    return n.reduce(function(s, u) {
      return typeof u == "string" ? s.push(h(u, null)) : u.data && s.push(h(u.data, u.mode)), s;
    }, []);
  }, t.fromString = function(n, s) {
    for (var u = function(g, p) {
      for (var w = {}, v = { start: {} }, E = ["start"], m = 0; m < g.length; m++) {
        for (var y = g[m], P = [], I = 0; I < y.length; I++) {
          var N = y[I], C = "" + m + I;
          P.push(C), w[C] = { node: N, lastCount: 0 }, v[C] = {};
          for (var R = 0; R < E.length; R++) {
            var B = E[R];
            w[B] && w[B].node.mode === N.mode ? (v[B][C] = a(w[B].lastCount + N.length, N.mode) - a(w[B].lastCount, N.mode), w[B].lastCount += N.length) : (w[B] && (w[B].lastCount = N.length), v[B][C] = a(N.length, N.mode) + 4 + d.getCharCountIndicator(N.mode, p));
          }
        }
        E = P;
      }
      for (R = 0; R < E.length; R++)
        v[E[R]].end = 0;
      return { map: v, table: w };
    }(function(g) {
      for (var p = [], w = 0; w < g.length; w++) {
        var v = g[w];
        switch (v.mode) {
          case d.NUMERIC:
            p.push([v, { data: v.data, mode: d.ALPHANUMERIC, length: v.length }, { data: v.data, mode: d.BYTE, length: v.length }]);
            break;
          case d.ALPHANUMERIC:
            p.push([v, { data: v.data, mode: d.BYTE, length: v.length }]);
            break;
          case d.KANJI:
            p.push([v, { data: v.data, mode: d.BYTE, length: r(v.data) }]);
            break;
          case d.BYTE:
            p.push([{ data: v.data, mode: d.BYTE, length: r(v.data) }]);
        }
      }
      return p;
    }(o(n)), s), f = Yt.find_path(u.map, "start", "end"), c = [], l = 1; l < f.length - 1; l++)
      c.push(u.table[f[l]].node);
    return t.fromArray(function(g) {
      return g.reduce(function(p, w) {
        var v = p.length - 1 >= 0 ? p[p.length - 1] : null;
        return v && v.mode === w.mode ? (p[p.length - 1].data += w.data, p) : (p.push(w), p);
      }, []);
    }(c));
  }, t.rawSplit = function(n) {
    return t.fromArray(o(n));
  };
});
F.fromArray, F.fromString, F.rawSplit;
function X(e, t, r) {
  var i, o, a = e.size, h = Ft(t, r);
  for (i = 0; i < 15; i++)
    o = (h >> i & 1) == 1, i < 6 ? e.set(i, 8, o, !0) : i < 8 ? e.set(i + 1, 8, o, !0) : e.set(a - 15 + i, 8, o, !0), i < 8 ? e.set(8, a - i - 1, o, !0) : i < 9 ? e.set(8, 15 - i - 1 + 1, o, !0) : e.set(8, 15 - i - 1, o, !0);
  e.set(a - 8, 8, 1, !0);
}
function Ht(e, t, r) {
  var i = new Bt();
  r.forEach(function(n) {
    i.put(n.mode.bit, 4), i.put(n.getLength(), d.getCharCountIndicator(n.mode, e)), n.write(i);
  });
  var o = 8 * (Z(e) - W(e, t));
  for (i.getLengthInBits() + 4 <= o && i.put(0, 4); i.getLengthInBits() % 8 != 0; )
    i.putBit(0);
  for (var a = (o - i.getLengthInBits()) / 8, h = 0; h < a; h++)
    i.put(h % 2 ? 17 : 236, 8);
  return function(n, s, u) {
    for (var f = Z(s), c = W(s, u), l = f - c, g = It(s, u), p = g - f % g, w = Math.floor(f / g), v = Math.floor(l / g), E = v + 1, m = w - v, y = new Rt(m), P = 0, I = new Array(g), N = new Array(g), C = 0, R = new Uint8Array(n.buffer), B = 0; B < g; B++) {
      var q = B < p ? v : E;
      I[B] = R.slice(P, P + q), N[B] = y.encode(I[B]), P += q, C = Math.max(C, q);
    }
    var T, L, j = new Uint8Array(f), ot = 0;
    for (T = 0; T < C; T++)
      for (L = 0; L < g; L++)
        T < I[L].length && (j[ot++] = I[L][T]);
    for (T = 0; T < m; T++)
      for (L = 0; L < g; L++)
        j[ot++] = N[L][T];
    return j;
  }(i, e, t);
}
function Jt(e, t, r, i) {
  var o;
  if (dt(e))
    o = F.fromArray(e);
  else {
    if (typeof e != "string")
      throw new Error("Invalid data");
    var a = t;
    if (!a) {
      var h = F.rawSplit(e);
      a = x.getBestVersionForData(h, r);
    }
    o = F.fromString(e, a || 40);
  }
  var n = x.getBestVersionForData(o, r);
  if (!n)
    throw new Error("The amount of data is too big to be stored in a QR Code");
  if (t) {
    if (t < n)
      throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: ` + n + `.
`);
  } else
    t = n;
  var s = Ht(t, r, o), u = it(t), f = new Nt(u);
  return function(c, l) {
    for (var g = c.size, p = Pt(l), w = 0; w < p.length; w++)
      for (var v = p[w][0], E = p[w][1], m = -1; m <= 7; m++)
        if (!(v + m <= -1 || g <= v + m))
          for (var y = -1; y <= 7; y++)
            E + y <= -1 || g <= E + y || (m >= 0 && m <= 6 && (y === 0 || y === 6) || y >= 0 && y <= 6 && (m === 0 || m === 6) || m >= 2 && m <= 4 && y >= 2 && y <= 4 ? c.set(v + m, E + y, !0, !0) : c.set(v + m, E + y, !1, !0));
  }(f, t), function(c) {
    for (var l = c.size, g = 8; g < l - 8; g++) {
      var p = g % 2 == 0;
      c.set(g, 6, p, !0), c.set(6, g, p, !0);
    }
  }(f), function(c, l) {
    for (var g = G.getPositions(l), p = 0; p < g.length; p++)
      for (var w = g[p][0], v = g[p][1], E = -2; E <= 2; E++)
        for (var m = -2; m <= 2; m++)
          E === -2 || E === 2 || m === -2 || m === 2 || E === 0 && m === 0 ? c.set(w + E, v + m, !0, !0) : c.set(w + E, v + m, !1, !0);
  }(f, t), X(f, r, 0), t >= 7 && function(c, l) {
    for (var g, p, w, v = c.size, E = x.getEncodedBits(l), m = 0; m < 18; m++)
      g = Math.floor(m / 3), p = m % 3 + v - 8 - 3, w = (E >> m & 1) == 1, c.set(g, p, w, !0), c.set(p, g, w, !0);
  }(f, t), function(c, l) {
    for (var g = c.size, p = -1, w = g - 1, v = 7, E = 0, m = g - 1; m > 0; m -= 2)
      for (m === 6 && m--; ; ) {
        for (var y = 0; y < 2; y++)
          if (!c.isReserved(w, m - y)) {
            var P = !1;
            E < l.length && (P = (l[E] >>> v & 1) == 1), c.set(w, m - y, P), --v === -1 && (E++, v = 7);
          }
        if ((w += p) < 0 || g <= w) {
          w -= p, p = -p;
          break;
        }
      }
  }(f, s), isNaN(i) && (i = M.getBestMask(f, X.bind(null, f, r))), M.applyMask(i, f), X(f, r, i), { modules: f, version: t, errorCorrectionLevel: r, maskPattern: i, segments: o };
}
rt.create = function(e, t) {
  if (e === void 0 || e === "")
    throw new Error("No input text");
  var r, i, o = A.M;
  return t !== void 0 && (o = A.from(t.errorCorrectionLevel, A.M), r = x.from(t.version), i = M.from(t.maskPattern), t.toSJISFunc && yt(t.toSJISFunc)), Jt(e, r, o, i);
};
const Kt = rt;
function Dt(e, t, r) {
  let i = "", o = 0, a = !1, h = 0;
  for (let n = 0; n < e.length; n++) {
    const s = Math.floor(n % t), u = Math.floor(n / t);
    if (s === 0 && (a = !0), !e[n]) {
      o++;
      continue;
    }
    h++, n > 0 && s > 0 && e[n - 1] || (i += a ? `M${r + s},${r + 0.5 + u}` : `m${o},0`, o = 0, a = !1), s + 1 < t && e[n + 1] || (i += `h${h}`, h = 0);
  }
  return i;
}
var Qt = function(t, r = {}) {
  const { size: i, data: o } = Kt.create(t).modules, a = r.margin || 0, h = i + a * 2, n = `viewBox="0 0 ${h} ${h}"`, s = r.size ? ` width="${r.size}" height="${r.size}"` : "", u = r.backgroundColor === "transparent" ? "" : `<path fill="${r.backgroundColor || "white"}" d="M0,0h${h}v${h}H0z"/>`, f = `<path stroke="${r.color || "black"}" d="${Dt(o, i, a)}"/>`;
  return `<svg xmlns="http://www.w3.org/2000/svg" ${n}${s} shape-rendering="crispEdges">${u}${f}</svg>`;
};
const Vt = ["innerHTML"], Ot = {
  __name: "QrShow",
  props: {
    data: { type: String, default: "" },
    size: { type: Number, default: 400 },
    margin: { type: Number, default: 1 }
  },
  setup(e) {
    const t = e, r = mt(async () => {
      if (t.data)
        return Qt(t.data, {
          size: t.size,
          margin: t.margin
        });
    });
    return (i, o) => (pt(), vt("div", {
      class: "min-w-16 flex flex-col items-center",
      innerHTML: wt(r)
    }, null, 8, Vt));
  }
};
export {
  Ot as default
};
//# sourceMappingURL=QrShow-6eee7035.js.map
