@everymatrix/player-account-controller 1.91.0 → 1.91.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/components/{GeneralLogout-CZx06fEj.cjs → GeneralLogout-DwUKWQEM.cjs} +1 -1
  2. package/components/{GeneralLogout-CfTLK2Bc.js → GeneralLogout-RtZ56Nn3.js} +1 -1
  3. package/components/{GeneralLogout-hD19E-Zw.js → GeneralLogout-WQPZo1XA.js} +1 -1
  4. package/components/{PlayerAccountBettingHistory-CktRMlqd.cjs → PlayerAccountBettingHistory-B73xqRDd.cjs} +1 -1
  5. package/components/{PlayerAccountBettingHistory-CA7auAML.js → PlayerAccountBettingHistory-CmbPT188.js} +1 -1
  6. package/components/{PlayerAccountBettingHistory-DqxCb3Vd.js → PlayerAccountBettingHistory-CvFZhJr5.js} +1 -1
  7. package/components/{PlayerAccountBiometrics-_e_GPij0.cjs → PlayerAccountBiometrics-8QlKdliQ.cjs} +1 -1
  8. package/components/{PlayerAccountBiometrics-BkD_4qfK.js → PlayerAccountBiometrics-DPDH3rze.js} +2 -2
  9. package/components/{PlayerAccountBiometrics-SFhwP7hC.js → PlayerAccountBiometrics-NfD7xlui.js} +2 -2
  10. package/components/{PlayerAccountBiometricsAction-BNbtq7KV.js → PlayerAccountBiometricsAction-Cerl0hxM.js} +1 -1
  11. package/components/{PlayerAccountBiometricsAction-1lBtdXlm.js → PlayerAccountBiometricsAction-DfVIWqGO.js} +1 -1
  12. package/components/{PlayerAccountBiometricsAction-y4GZTxcT.cjs → PlayerAccountBiometricsAction-oyPYqpGN.cjs} +1 -1
  13. package/components/{PlayerAccountClosure-BicB6rYD.js → PlayerAccountClosure-CaVbfY7o.js} +1 -1
  14. package/components/{PlayerAccountClosure-BVmcfM4z.js → PlayerAccountClosure-DNkokDK1.js} +1 -1
  15. package/components/{PlayerAccountClosure-D7HxqU1N.cjs → PlayerAccountClosure-wcTZTC1v.cjs} +1 -1
  16. package/components/PlayerAccountController-DErgObNK.cjs +21 -0
  17. package/components/{PlayerAccountController-B1uYSIz3.js → PlayerAccountController-DG3KbTWa.js} +115 -111
  18. package/components/{PlayerAccountController-RTgAeQIt.js → PlayerAccountController-DyqNYFxa.js} +49 -45
  19. package/components/{PlayerAccountGamingLimits-9nxBFWJ_.js → PlayerAccountGamingLimits-C92dYqb3.js} +2 -2
  20. package/components/{PlayerAccountGamingLimits-8cX20yx0.js → PlayerAccountGamingLimits-Dr2DFwJy.js} +2 -2
  21. package/components/{PlayerAccountGamingLimits-Dx5_vi1Q.cjs → PlayerAccountGamingLimits-Ur_9kp2o.cjs} +1 -1
  22. package/components/{PlayerAccountGamingLimitsConfirmationModal-BF_ch2qb.cjs → PlayerAccountGamingLimitsConfirmationModal-BdKrgcP9.cjs} +1 -1
  23. package/components/{PlayerAccountGamingLimitsConfirmationModal-Y-C4A1I2.js → PlayerAccountGamingLimitsConfirmationModal-DzSs9Wlh.js} +15 -15
  24. package/components/{PlayerAccountGamingLimitsConfirmationModal-CJgc8OTg.js → PlayerAccountGamingLimitsConfirmationModal-JoLpq5Qd.js} +12 -12
  25. package/components/{PlayerAccountGamingLimitsGroupEdit-CEM4at0P.js → PlayerAccountGamingLimitsGroupEdit-C61nqLfa.js} +5 -5
  26. package/components/{PlayerAccountGamingLimitsGroupEdit-DejiPaBu.js → PlayerAccountGamingLimitsGroupEdit-CGPf2GzC.js} +5 -5
  27. package/components/{PlayerAccountGamingLimitsGroupEdit-D-yNkbWZ.cjs → PlayerAccountGamingLimitsGroupEdit-CQylV_LW.cjs} +1 -1
  28. package/components/{PlayerAccountGamingLimitsHistory2-BiTbzLOf.js → PlayerAccountGamingLimitsHistory2-BntJofdm.js} +1 -1
  29. package/components/{PlayerAccountGamingLimitsHistory2-320drqSz.js → PlayerAccountGamingLimitsHistory2-CEqiSFnd.js} +1 -1
  30. package/components/{PlayerAccountGamingLimitsHistory2-CJzOaUU_.cjs → PlayerAccountGamingLimitsHistory2-DJ-Cjyp1.cjs} +1 -1
  31. package/components/{PlayerAccountGamingLimitsInfoCard-DFDthU1l.js → PlayerAccountGamingLimitsInfoCard-Bzww1-RJ.js} +4 -4
  32. package/components/{PlayerAccountGamingLimitsInfoCard-oZ_FtdRr.cjs → PlayerAccountGamingLimitsInfoCard-CZcelMtY.cjs} +1 -1
  33. package/components/{PlayerAccountGamingLimitsInfoCard-DDu6HRZw.js → PlayerAccountGamingLimitsInfoCard-DnWRF2MA.js} +4 -4
  34. package/components/{PlayerAccountGamingLimitsPage2Gm16-DROry-l8.js → PlayerAccountGamingLimitsPage2Gm16-B-RLJAxy.js} +2 -2
  35. package/components/{PlayerAccountGamingLimitsPage2Gm16-CPTiY5Gi.js → PlayerAccountGamingLimitsPage2Gm16-BIphnM6Y.js} +2 -2
  36. package/components/{PlayerAccountGamingLimitsPage2Gm16-Cax6QJLC.cjs → PlayerAccountGamingLimitsPage2Gm16-CNA7QruD.cjs} +2 -2
  37. package/components/{PlayerAccountGamingLimitsPopup-Bkweu2PX.js → PlayerAccountGamingLimitsPopup-BdBRIFfU.js} +1 -1
  38. package/components/{PlayerAccountGamingLimitsPopup-D89lxHJp.js → PlayerAccountGamingLimitsPopup-CSLlyssM.js} +1 -1
  39. package/components/{PlayerAccountGamingLimitsPopup-D8YDDkab.cjs → PlayerAccountGamingLimitsPopup-o3iv0A6x.cjs} +1 -1
  40. package/components/{PlayerAccountGamingLimitsWrapper2-BT8njqvW.js → PlayerAccountGamingLimitsWrapper2-05u-l372.js} +3 -3
  41. package/components/{PlayerAccountGamingLimitsWrapper2-BGsrIa9G.cjs → PlayerAccountGamingLimitsWrapper2-DcQHUkFT.cjs} +1 -1
  42. package/components/{PlayerAccountGamingLimitsWrapper2-kXLXzvuq.js → PlayerAccountGamingLimitsWrapper2-DwZwd-hy.js} +3 -3
  43. package/components/{PlayerAccountGeneralConfirmationModal-DD6-ZM6O.cjs → PlayerAccountGeneralConfirmationModal-BbGVvtLY.cjs} +1 -1
  44. package/components/{PlayerAccountGeneralConfirmationModal-D_pYKyRi.js → PlayerAccountGeneralConfirmationModal-CjKLQaHH.js} +22 -22
  45. package/components/{PlayerAccountGeneralConfirmationModal-CUnk1KbD.js → PlayerAccountGeneralConfirmationModal-Cst4rd-S.js} +20 -20
  46. package/components/{PlayerAccountMenu-B3wxhtKr.cjs → PlayerAccountMenu-C3slbiux.cjs} +1 -1
  47. package/components/{PlayerAccountMenu-DK810GKe.js → PlayerAccountMenu-CdjH1gEW.js} +2 -2
  48. package/components/{PlayerAccountMenu-C2qI1Gjj.js → PlayerAccountMenu-Cr_HRHLF.js} +2 -2
  49. package/components/{PlayerAccountModal-CgbTqk4Z.js → PlayerAccountModal-BRWjYAGu.js} +36 -36
  50. package/components/{PlayerAccountModal-LSGvdqwB.js → PlayerAccountModal-C6p2KI7k.js} +39 -39
  51. package/components/{PlayerAccountModal-BqZx6Q1_.cjs → PlayerAccountModal-u6LegtfR.cjs} +1 -1
  52. package/components/{PlayerAccountNotifications-BQ9xn1VL.js → PlayerAccountNotifications-C2A1_LCL.js} +1 -1
  53. package/components/{PlayerAccountNotifications-CNdLGJFQ.cjs → PlayerAccountNotifications-QFoWBKny.cjs} +1 -1
  54. package/components/{PlayerAccountNotifications-u-d--KIi.js → PlayerAccountNotifications-tWE-aFjO.js} +1 -1
  55. package/components/{PlayerAccountProductRestriction-DzSoX2xT.js → PlayerAccountProductRestriction-B0Ri7MHw.js} +3 -3
  56. package/components/{PlayerAccountProductRestriction-hNSYwwQJ.js → PlayerAccountProductRestriction-DkDbBfka.js} +3 -3
  57. package/components/{PlayerAccountProductRestriction-DBZ66u9m.cjs → PlayerAccountProductRestriction-HHHbDtlq.cjs} +1 -1
  58. package/components/{PlayerAccountReviewFrequency-B1ken94Z.js → PlayerAccountReviewFrequency-CV609scj.js} +1 -1
  59. package/components/{PlayerAccountReviewFrequency-BhTI5ygr.cjs → PlayerAccountReviewFrequency-D9TTXGcO.cjs} +1 -1
  60. package/components/{PlayerAccountReviewFrequency-BwxBa9uB.js → PlayerAccountReviewFrequency-DpI_eJta.js} +1 -1
  61. package/components/{PlayerAccountSelfExclusion-BcTJOKLt.js → PlayerAccountSelfExclusion-B0jQ5C6c.js} +2 -2
  62. package/components/{PlayerAccountSelfExclusion-BEiUYvo8.cjs → PlayerAccountSelfExclusion-B9-rTgYV.cjs} +1 -1
  63. package/components/{PlayerAccountSelfExclusion-BgretRDx.js → PlayerAccountSelfExclusion-DoGu-Fe9.js} +2 -2
  64. package/components/{PlayerAccountTimeout-BQNMtPRB.cjs → PlayerAccountTimeout-Bi1R5_Rb.cjs} +9 -9
  65. package/components/{PlayerAccountTimeout-Dc8BBO2V.js → PlayerAccountTimeout-CJccgvCT.js} +137 -137
  66. package/components/{PlayerAccountTimeout-vy__wvIh.js → PlayerAccountTimeout-ojIglJPR.js} +137 -137
  67. package/components/{PlayerAccountTransactionsHistory-dOFdBYm7.js → PlayerAccountTransactionsHistory-Coa29LAd.js} +925 -877
  68. package/components/PlayerAccountTransactionsHistory-DUwj5lNk.cjs +4 -0
  69. package/components/{PlayerAccountTransactionsHistory-Co83Xe7f.js → PlayerAccountTransactionsHistory-DjwLYkfj.js} +1003 -955
  70. package/components/PlayerActiveBonuses-B65W7Wz0.js +1253 -0
  71. package/components/PlayerActiveBonuses-BBeMkdSY.cjs +4 -0
  72. package/components/PlayerActiveBonuses-Bx0uoqz4.js +1254 -0
  73. package/components/{PlayerBonusCard-CC3I7Uun.js → PlayerBonusCard-CbkfDKjT.js} +2 -2
  74. package/components/{PlayerBonusCard-BPNrGywL.js → PlayerBonusCard-CqeLHQ0G.js} +2 -2
  75. package/components/{PlayerBonusCard-ju9yDt9H.cjs → PlayerBonusCard-TMDOHvnL.cjs} +1 -1
  76. package/components/{PlayerBonusHistory-B6tJiRPL.js → PlayerBonusHistory-7zvs9Ym9.js} +852 -831
  77. package/components/{PlayerBonusHistory-BEcvSevy.js → PlayerBonusHistory-DwI1OKTw.js} +853 -832
  78. package/components/{PlayerBonusHistory-DBQ6rFhB.cjs → PlayerBonusHistory-Mjrhaj6a.cjs} +130 -130
  79. package/components/{PlayerChangePassword-TqYGnJRR.cjs → PlayerChangePassword-BmC4EyoL.cjs} +1 -1
  80. package/components/{PlayerChangePassword-oyX7WtIB.js → PlayerChangePassword-BqjLItv0.js} +1 -1
  81. package/components/{PlayerChangePassword-1DgloKUI.js → PlayerChangePassword-CfFZhaXQ.js} +1 -1
  82. package/components/{PlayerDeposit-Ae3zKmKx.js → PlayerDeposit-Ba0qJRp2.js} +1 -1
  83. package/components/{PlayerDeposit-B6wgBKOs.js → PlayerDeposit-DP8bCOdN.js} +1 -1
  84. package/components/{PlayerDeposit-C5Q6t3-y.cjs → PlayerDeposit-o49phTHz.cjs} +1 -1
  85. package/components/{PlayerGamingHistory-C_lmfCru.js → PlayerGamingHistory-BgapmKYI.js} +41 -41
  86. package/components/{PlayerGamingHistory-B0n_kQiV.js → PlayerGamingHistory-DV6Slzt_.js} +42 -42
  87. package/components/{PlayerGamingHistory-DuE6DQ-m.cjs → PlayerGamingHistory-DvW-LsKl.cjs} +1 -1
  88. package/components/{PlayerPendingWithdrawals-BYWg7-_P.js → PlayerPendingWithdrawals-BZ62DYZ9.js} +1 -1
  89. package/components/{PlayerPendingWithdrawals-BqXkv2-Y.js → PlayerPendingWithdrawals-CedsWvDL.js} +1 -1
  90. package/components/{PlayerPendingWithdrawals-D0CqKeVG.cjs → PlayerPendingWithdrawals-HEjFhSrJ.cjs} +1 -1
  91. package/components/{PlayerProfileInfo-iRKwx8zy.js → PlayerProfileInfo-BDF3Bqtt.js} +1647 -1338
  92. package/components/{PlayerProfileInfo-DTNpqqu6.js → PlayerProfileInfo-DPDI61Mv.js} +1647 -1329
  93. package/components/PlayerProfileInfo-DXVRL3lh.cjs +4 -0
  94. package/components/{PlayerRealityCheck-DpLxecMn.js → PlayerRealityCheck-CLVunEKT.js} +22 -22
  95. package/components/{PlayerRealityCheck-q7yC_T2b.cjs → PlayerRealityCheck-CMZtzPkR.cjs} +1 -1
  96. package/components/{PlayerRealityCheck-BVugi2xm.js → PlayerRealityCheck-DgPTeJe_.js} +21 -21
  97. package/components/{PlayerTransactionHistory-DnU7U9r2.cjs → PlayerTransactionHistory-BEqLK737.cjs} +1 -1
  98. package/components/{PlayerTransactionHistory-DNgb0l0d.js → PlayerTransactionHistory-CHhOIZhh.js} +1 -1
  99. package/components/{PlayerTransactionHistory-BFLvQwa2.js → PlayerTransactionHistory-S0lzcu95.js} +1 -1
  100. package/components/{PlayerWithdrawal-DNO0w4Mf.js → PlayerWithdrawal-BqAC-Oq4.js} +1 -1
  101. package/components/{PlayerWithdrawal-BYEfF5HL.js → PlayerWithdrawal-C46pCXyV.js} +1 -1
  102. package/components/{PlayerWithdrawal-q2z7ub8O.cjs → PlayerWithdrawal-DKCRQ9pT.cjs} +1 -1
  103. package/components/QrSessionGenerator--jEOQTub.cjs +8 -0
  104. package/components/QrSessionGenerator-BkFSg0GV.js +1773 -0
  105. package/components/QrSessionGenerator-DgIh_dAl.js +1790 -0
  106. package/es2015/player-account-controller.cjs +1 -1
  107. package/es2015/player-account-controller.js +1 -1
  108. package/esnext/player-account-controller.js +1 -1
  109. package/package.json +1 -1
  110. package/stencil/{checkbox-group-input_16-DFnfVjZQ.js → checkbox-group-input_16-BClc1QAF.js} +2376 -2306
  111. package/stencil/{checkbox-group-input_16-BOlBVPuK.cjs → checkbox-group-input_16-BzGXxdU9.cjs} +249 -249
  112. package/stencil/{checkbox-group-input_16-CqrjL3Bm.js → checkbox-group-input_16-_13Kv9Zi.js} +2374 -2304
  113. package/stencil/{index-c666b6e6-CUrOCQZ4.cjs → index-7469517b-8Vfz7n3C.cjs} +1 -1
  114. package/stencil/{index-c666b6e6-D2XV3pxn.js → index-7469517b-Bmgiy_n-.js} +31 -31
  115. package/stencil/{index-c666b6e6-CKyPRY9v.js → index-7469517b-ulg1Qmdy.js} +32 -32
  116. package/stencil/{index-9c0f6c58-DEdG7mVW.js → index-9c0f6c58-CK57ve5P.js} +1 -1
  117. package/stencil/{index-9c0f6c58-Bd8abek0.cjs → index-9c0f6c58-DnbhPPTI.cjs} +1 -1
  118. package/stencil/{index-9c0f6c58-LdtWdXWH.js → index-9c0f6c58-P8h0R10S.js} +1 -1
  119. package/stencil/{pam-change-password-20667ec7-DxeS48v8.js → pam-change-password-259289fa-7sJvUi0P.js} +119 -76
  120. package/stencil/{pam-change-password-20667ec7-gdoPQSVy.cjs → pam-change-password-259289fa-CR3dv02q.cjs} +36 -2
  121. package/stencil/{pam-change-password-20667ec7-CdjcMbLl.js → pam-change-password-259289fa-DvjX931m.js} +119 -76
  122. package/stencil/pam-change-password-BiAsiO8l.js +25 -0
  123. package/stencil/pam-change-password-Dil_uhA4.js +7 -0
  124. package/stencil/pam-change-password-DnCN0UHR.cjs +1 -0
  125. package/stencil/{player-kyc-verification-BVyIvjQs.js → player-kyc-verification-C2xE1hLK.js} +126 -96
  126. package/stencil/player-kyc-verification-Cb647IzH.cjs +181 -0
  127. package/stencil/{player-kyc-verification-DaKmgzNJ.js → player-kyc-verification-mnYQMtSn.js} +135 -105
  128. package/components/PlayerAccountController-Cfjy33Ek.cjs +0 -21
  129. package/components/PlayerAccountTransactionsHistory-DmXGYQDM.cjs +0 -4
  130. package/components/PlayerActiveBonuses-CWQdnuVo.js +0 -1215
  131. package/components/PlayerActiveBonuses-Dp5ZJgik.cjs +0 -4
  132. package/components/PlayerActiveBonuses-v2Qt6nA5.js +0 -1214
  133. package/components/PlayerProfileInfo-C-J7FN_C.cjs +0 -4
  134. package/stencil/pam-change-password-B3-5i5W3.js +0 -25
  135. package/stencil/pam-change-password-Btjglzia.js +0 -7
  136. package/stencil/pam-change-password-DlEAZlEY.cjs +0 -1
  137. package/stencil/player-kyc-verification-Bq0WwkeW.cjs +0 -181
@@ -0,0 +1,1790 @@
1
+ var Et = (e, t, n) => new Promise((o, r) => {
2
+ var i = (a) => {
3
+ try {
4
+ l(n.next(a));
5
+ } catch (u) {
6
+ r(u);
7
+ }
8
+ }, s = (a) => {
9
+ try {
10
+ l(n.throw(a));
11
+ } catch (u) {
12
+ r(u);
13
+ }
14
+ }, l = (a) => a.done ? o(a.value) : Promise.resolve(a.value).then(i, s);
15
+ l((n = n.apply(e, t)).next());
16
+ });
17
+ import { a as Jt, $ as jt, S as Gt, i as Yt, s as qt, f as z, b as Wt, n as lt, d as Z, t as ut, c as x, m as _, w as Xt, e as U, u as ct, p as Bt, r as L, g as Zt, o as xt, I as $t, j as te, y as bt, z as ee, A as ne, B as re, C as oe, D as ie } from "./PlayerAccountController-DyqNYFxa.js";
18
+ function St(e, t) {
19
+ Jt(e, t);
20
+ }
21
+ function se(e) {
22
+ jt.set(e);
23
+ }
24
+ const At = {
25
+ en: {
26
+ titleQRSessionGenerator: "Scan the QR Code to access your account on retail devices.",
27
+ generateQRButton: "Generate QR",
28
+ unauthorized: "Authentication failed.",
29
+ failedToFetch: "Cannot generate QR, Please try again.",
30
+ unexpectedError: "Unexpected error occurred. Please try again later."
31
+ },
32
+ fr: {
33
+ titleQRSessionGenerator: "Scannez le code QR pour accéder à votre compte sur les appareils en magasin.",
34
+ generateQRButton: "Générer des QR",
35
+ unauthorized: "L'authentification a échoué.",
36
+ failedToFetch: "Impossible de générer le code QR, veuillez réessayer.",
37
+ unexpectedError: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard."
38
+ }
39
+ };
40
+ var j = {}, ae = function() {
41
+ return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
42
+ }, Rt = {}, N = {};
43
+ let mt;
44
+ const le = [
45
+ 0,
46
+ // Not used
47
+ 26,
48
+ 44,
49
+ 70,
50
+ 100,
51
+ 134,
52
+ 172,
53
+ 196,
54
+ 242,
55
+ 292,
56
+ 346,
57
+ 404,
58
+ 466,
59
+ 532,
60
+ 581,
61
+ 655,
62
+ 733,
63
+ 815,
64
+ 901,
65
+ 991,
66
+ 1085,
67
+ 1156,
68
+ 1258,
69
+ 1364,
70
+ 1474,
71
+ 1588,
72
+ 1706,
73
+ 1828,
74
+ 1921,
75
+ 2051,
76
+ 2185,
77
+ 2323,
78
+ 2465,
79
+ 2611,
80
+ 2761,
81
+ 2876,
82
+ 3034,
83
+ 3196,
84
+ 3362,
85
+ 3532,
86
+ 3706
87
+ ];
88
+ N.getSymbolSize = function(t) {
89
+ if (!t)
90
+ throw new Error('"version" cannot be null or undefined');
91
+ if (t < 1 || t > 40)
92
+ throw new Error('"version" should be in range from 1 to 40');
93
+ return t * 4 + 17;
94
+ };
95
+ N.getSymbolTotalCodewords = function(t) {
96
+ return le[t];
97
+ };
98
+ N.getBCHDigit = function(e) {
99
+ let t = 0;
100
+ for (; e !== 0; )
101
+ t++, e >>>= 1;
102
+ return t;
103
+ };
104
+ N.setToSJISFunction = function(t) {
105
+ if (typeof t != "function")
106
+ throw new Error('"toSJISFunc" is not a valid function.');
107
+ mt = t;
108
+ };
109
+ N.isKanjiModeEnabled = function() {
110
+ return typeof mt != "undefined";
111
+ };
112
+ N.toSJIS = function(t) {
113
+ return mt(t);
114
+ };
115
+ var $ = {};
116
+ (function(e) {
117
+ e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
118
+ function t(n) {
119
+ if (typeof n != "string")
120
+ throw new Error("Param is not a string");
121
+ switch (n.toLowerCase()) {
122
+ case "l":
123
+ case "low":
124
+ return e.L;
125
+ case "m":
126
+ case "medium":
127
+ return e.M;
128
+ case "q":
129
+ case "quartile":
130
+ return e.Q;
131
+ case "h":
132
+ case "high":
133
+ return e.H;
134
+ default:
135
+ throw new Error("Unknown EC Level: " + n);
136
+ }
137
+ }
138
+ e.isValid = function(o) {
139
+ return o && typeof o.bit != "undefined" && o.bit >= 0 && o.bit < 4;
140
+ }, e.from = function(o, r) {
141
+ if (e.isValid(o))
142
+ return o;
143
+ try {
144
+ return t(o);
145
+ } catch (i) {
146
+ return r;
147
+ }
148
+ };
149
+ })($);
150
+ function Mt() {
151
+ this.buffer = [], this.length = 0;
152
+ }
153
+ Mt.prototype = {
154
+ get: function(e) {
155
+ const t = Math.floor(e / 8);
156
+ return (this.buffer[t] >>> 7 - e % 8 & 1) === 1;
157
+ },
158
+ put: function(e, t) {
159
+ for (let n = 0; n < t; n++)
160
+ this.putBit((e >>> t - n - 1 & 1) === 1);
161
+ },
162
+ getLengthInBits: function() {
163
+ return this.length;
164
+ },
165
+ putBit: function(e) {
166
+ const t = Math.floor(this.length / 8);
167
+ this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
168
+ }
169
+ };
170
+ var ue = Mt;
171
+ function G(e) {
172
+ if (!e || e < 1)
173
+ throw new Error("BitMatrix size must be defined and greater than 0");
174
+ this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
175
+ }
176
+ G.prototype.set = function(e, t, n, o) {
177
+ const r = e * this.size + t;
178
+ this.data[r] = n, o && (this.reservedBit[r] = !0);
179
+ };
180
+ G.prototype.get = function(e, t) {
181
+ return this.data[e * this.size + t];
182
+ };
183
+ G.prototype.xor = function(e, t, n) {
184
+ this.data[e * this.size + t] ^= n;
185
+ };
186
+ G.prototype.isReserved = function(e, t) {
187
+ return this.reservedBit[e * this.size + t];
188
+ };
189
+ var ce = G, Pt = {};
190
+ (function(e) {
191
+ const t = N.getSymbolSize;
192
+ e.getRowColCoords = function(o) {
193
+ if (o === 1)
194
+ return [];
195
+ const r = Math.floor(o / 7) + 2, i = t(o), s = i === 145 ? 26 : Math.ceil((i - 13) / (2 * r - 2)) * 2, l = [i - 7];
196
+ for (let a = 1; a < r - 1; a++)
197
+ l[a] = l[a - 1] - s;
198
+ return l.push(6), l.reverse();
199
+ }, e.getPositions = function(o) {
200
+ const r = [], i = e.getRowColCoords(o), s = i.length;
201
+ for (let l = 0; l < s; l++)
202
+ for (let a = 0; a < s; a++)
203
+ l === 0 && a === 0 || // top-left
204
+ l === 0 && a === s - 1 || // bottom-left
205
+ l === s - 1 && a === 0 || r.push([i[l], i[a]]);
206
+ return r;
207
+ };
208
+ })(Pt);
209
+ var _t = {};
210
+ const fe = N.getSymbolSize, It = 7;
211
+ _t.getPositions = function(t) {
212
+ const n = fe(t);
213
+ return [
214
+ // top-left
215
+ [0, 0],
216
+ // top-right
217
+ [n - It, 0],
218
+ // bottom-left
219
+ [0, n - It]
220
+ ];
221
+ };
222
+ var Lt = {};
223
+ (function(e) {
224
+ e.Patterns = {
225
+ PATTERN000: 0,
226
+ PATTERN001: 1,
227
+ PATTERN010: 2,
228
+ PATTERN011: 3,
229
+ PATTERN100: 4,
230
+ PATTERN101: 5,
231
+ PATTERN110: 6,
232
+ PATTERN111: 7
233
+ };
234
+ const t = {
235
+ N1: 3,
236
+ N2: 3,
237
+ N3: 40,
238
+ N4: 10
239
+ };
240
+ e.isValid = function(r) {
241
+ return r != null && r !== "" && !isNaN(r) && r >= 0 && r <= 7;
242
+ }, e.from = function(r) {
243
+ return e.isValid(r) ? parseInt(r, 10) : void 0;
244
+ }, e.getPenaltyN1 = function(r) {
245
+ const i = r.size;
246
+ let s = 0, l = 0, a = 0, u = null, c = null;
247
+ for (let B = 0; B < i; B++) {
248
+ l = a = 0, u = c = null;
249
+ for (let d = 0; d < i; d++) {
250
+ let g = r.get(B, d);
251
+ g === u ? l++ : (l >= 5 && (s += t.N1 + (l - 5)), u = g, l = 1), g = r.get(d, B), g === c ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), c = g, a = 1);
252
+ }
253
+ l >= 5 && (s += t.N1 + (l - 5)), a >= 5 && (s += t.N1 + (a - 5));
254
+ }
255
+ return s;
256
+ }, e.getPenaltyN2 = function(r) {
257
+ const i = r.size;
258
+ let s = 0;
259
+ for (let l = 0; l < i - 1; l++)
260
+ for (let a = 0; a < i - 1; a++) {
261
+ const u = r.get(l, a) + r.get(l, a + 1) + r.get(l + 1, a) + r.get(l + 1, a + 1);
262
+ (u === 4 || u === 0) && s++;
263
+ }
264
+ return s * t.N2;
265
+ }, e.getPenaltyN3 = function(r) {
266
+ const i = r.size;
267
+ let s = 0, l = 0, a = 0;
268
+ for (let u = 0; u < i; u++) {
269
+ l = a = 0;
270
+ for (let c = 0; c < i; c++)
271
+ l = l << 1 & 2047 | r.get(u, c), c >= 10 && (l === 1488 || l === 93) && s++, a = a << 1 & 2047 | r.get(c, u), c >= 10 && (a === 1488 || a === 93) && s++;
272
+ }
273
+ return s * t.N3;
274
+ }, e.getPenaltyN4 = function(r) {
275
+ let i = 0;
276
+ const s = r.data.length;
277
+ for (let a = 0; a < s; a++)
278
+ i += r.data[a];
279
+ return Math.abs(Math.ceil(i * 100 / s / 5) - 10) * t.N4;
280
+ };
281
+ function n(o, r, i) {
282
+ switch (o) {
283
+ case e.Patterns.PATTERN000:
284
+ return (r + i) % 2 === 0;
285
+ case e.Patterns.PATTERN001:
286
+ return r % 2 === 0;
287
+ case e.Patterns.PATTERN010:
288
+ return i % 3 === 0;
289
+ case e.Patterns.PATTERN011:
290
+ return (r + i) % 3 === 0;
291
+ case e.Patterns.PATTERN100:
292
+ return (Math.floor(r / 2) + Math.floor(i / 3)) % 2 === 0;
293
+ case e.Patterns.PATTERN101:
294
+ return r * i % 2 + r * i % 3 === 0;
295
+ case e.Patterns.PATTERN110:
296
+ return (r * i % 2 + r * i % 3) % 2 === 0;
297
+ case e.Patterns.PATTERN111:
298
+ return (r * i % 3 + (r + i) % 2) % 2 === 0;
299
+ default:
300
+ throw new Error("bad maskPattern:" + o);
301
+ }
302
+ }
303
+ e.applyMask = function(r, i) {
304
+ const s = i.size;
305
+ for (let l = 0; l < s; l++)
306
+ for (let a = 0; a < s; a++)
307
+ i.isReserved(a, l) || i.xor(a, l, n(r, a, l));
308
+ }, e.getBestMask = function(r, i) {
309
+ const s = Object.keys(e.Patterns).length;
310
+ let l = 0, a = 1 / 0;
311
+ for (let u = 0; u < s; u++) {
312
+ i(u), e.applyMask(u, r);
313
+ const c = e.getPenaltyN1(r) + e.getPenaltyN2(r) + e.getPenaltyN3(r) + e.getPenaltyN4(r);
314
+ e.applyMask(u, r), c < a && (a = c, l = u);
315
+ }
316
+ return l;
317
+ };
318
+ })(Lt);
319
+ var tt = {};
320
+ const D = $, Y = [
321
+ // L M Q H
322
+ 1,
323
+ 1,
324
+ 1,
325
+ 1,
326
+ 1,
327
+ 1,
328
+ 1,
329
+ 1,
330
+ 1,
331
+ 1,
332
+ 2,
333
+ 2,
334
+ 1,
335
+ 2,
336
+ 2,
337
+ 4,
338
+ 1,
339
+ 2,
340
+ 4,
341
+ 4,
342
+ 2,
343
+ 4,
344
+ 4,
345
+ 4,
346
+ 2,
347
+ 4,
348
+ 6,
349
+ 5,
350
+ 2,
351
+ 4,
352
+ 6,
353
+ 6,
354
+ 2,
355
+ 5,
356
+ 8,
357
+ 8,
358
+ 4,
359
+ 5,
360
+ 8,
361
+ 8,
362
+ 4,
363
+ 5,
364
+ 8,
365
+ 11,
366
+ 4,
367
+ 8,
368
+ 10,
369
+ 11,
370
+ 4,
371
+ 9,
372
+ 12,
373
+ 16,
374
+ 4,
375
+ 9,
376
+ 16,
377
+ 16,
378
+ 6,
379
+ 10,
380
+ 12,
381
+ 18,
382
+ 6,
383
+ 10,
384
+ 17,
385
+ 16,
386
+ 6,
387
+ 11,
388
+ 16,
389
+ 19,
390
+ 6,
391
+ 13,
392
+ 18,
393
+ 21,
394
+ 7,
395
+ 14,
396
+ 21,
397
+ 25,
398
+ 8,
399
+ 16,
400
+ 20,
401
+ 25,
402
+ 8,
403
+ 17,
404
+ 23,
405
+ 25,
406
+ 9,
407
+ 17,
408
+ 23,
409
+ 34,
410
+ 9,
411
+ 18,
412
+ 25,
413
+ 30,
414
+ 10,
415
+ 20,
416
+ 27,
417
+ 32,
418
+ 12,
419
+ 21,
420
+ 29,
421
+ 35,
422
+ 12,
423
+ 23,
424
+ 34,
425
+ 37,
426
+ 12,
427
+ 25,
428
+ 34,
429
+ 40,
430
+ 13,
431
+ 26,
432
+ 35,
433
+ 42,
434
+ 14,
435
+ 28,
436
+ 38,
437
+ 45,
438
+ 15,
439
+ 29,
440
+ 40,
441
+ 48,
442
+ 16,
443
+ 31,
444
+ 43,
445
+ 51,
446
+ 17,
447
+ 33,
448
+ 45,
449
+ 54,
450
+ 18,
451
+ 35,
452
+ 48,
453
+ 57,
454
+ 19,
455
+ 37,
456
+ 51,
457
+ 60,
458
+ 19,
459
+ 38,
460
+ 53,
461
+ 63,
462
+ 20,
463
+ 40,
464
+ 56,
465
+ 66,
466
+ 21,
467
+ 43,
468
+ 59,
469
+ 70,
470
+ 22,
471
+ 45,
472
+ 62,
473
+ 74,
474
+ 24,
475
+ 47,
476
+ 65,
477
+ 77,
478
+ 25,
479
+ 49,
480
+ 68,
481
+ 81
482
+ ], q = [
483
+ // L M Q H
484
+ 7,
485
+ 10,
486
+ 13,
487
+ 17,
488
+ 10,
489
+ 16,
490
+ 22,
491
+ 28,
492
+ 15,
493
+ 26,
494
+ 36,
495
+ 44,
496
+ 20,
497
+ 36,
498
+ 52,
499
+ 64,
500
+ 26,
501
+ 48,
502
+ 72,
503
+ 88,
504
+ 36,
505
+ 64,
506
+ 96,
507
+ 112,
508
+ 40,
509
+ 72,
510
+ 108,
511
+ 130,
512
+ 48,
513
+ 88,
514
+ 132,
515
+ 156,
516
+ 60,
517
+ 110,
518
+ 160,
519
+ 192,
520
+ 72,
521
+ 130,
522
+ 192,
523
+ 224,
524
+ 80,
525
+ 150,
526
+ 224,
527
+ 264,
528
+ 96,
529
+ 176,
530
+ 260,
531
+ 308,
532
+ 104,
533
+ 198,
534
+ 288,
535
+ 352,
536
+ 120,
537
+ 216,
538
+ 320,
539
+ 384,
540
+ 132,
541
+ 240,
542
+ 360,
543
+ 432,
544
+ 144,
545
+ 280,
546
+ 408,
547
+ 480,
548
+ 168,
549
+ 308,
550
+ 448,
551
+ 532,
552
+ 180,
553
+ 338,
554
+ 504,
555
+ 588,
556
+ 196,
557
+ 364,
558
+ 546,
559
+ 650,
560
+ 224,
561
+ 416,
562
+ 600,
563
+ 700,
564
+ 224,
565
+ 442,
566
+ 644,
567
+ 750,
568
+ 252,
569
+ 476,
570
+ 690,
571
+ 816,
572
+ 270,
573
+ 504,
574
+ 750,
575
+ 900,
576
+ 300,
577
+ 560,
578
+ 810,
579
+ 960,
580
+ 312,
581
+ 588,
582
+ 870,
583
+ 1050,
584
+ 336,
585
+ 644,
586
+ 952,
587
+ 1110,
588
+ 360,
589
+ 700,
590
+ 1020,
591
+ 1200,
592
+ 390,
593
+ 728,
594
+ 1050,
595
+ 1260,
596
+ 420,
597
+ 784,
598
+ 1140,
599
+ 1350,
600
+ 450,
601
+ 812,
602
+ 1200,
603
+ 1440,
604
+ 480,
605
+ 868,
606
+ 1290,
607
+ 1530,
608
+ 510,
609
+ 924,
610
+ 1350,
611
+ 1620,
612
+ 540,
613
+ 980,
614
+ 1440,
615
+ 1710,
616
+ 570,
617
+ 1036,
618
+ 1530,
619
+ 1800,
620
+ 570,
621
+ 1064,
622
+ 1590,
623
+ 1890,
624
+ 600,
625
+ 1120,
626
+ 1680,
627
+ 1980,
628
+ 630,
629
+ 1204,
630
+ 1770,
631
+ 2100,
632
+ 660,
633
+ 1260,
634
+ 1860,
635
+ 2220,
636
+ 720,
637
+ 1316,
638
+ 1950,
639
+ 2310,
640
+ 750,
641
+ 1372,
642
+ 2040,
643
+ 2430
644
+ ];
645
+ tt.getBlocksCount = function(t, n) {
646
+ switch (n) {
647
+ case D.L:
648
+ return Y[(t - 1) * 4 + 0];
649
+ case D.M:
650
+ return Y[(t - 1) * 4 + 1];
651
+ case D.Q:
652
+ return Y[(t - 1) * 4 + 2];
653
+ case D.H:
654
+ return Y[(t - 1) * 4 + 3];
655
+ default:
656
+ return;
657
+ }
658
+ };
659
+ tt.getTotalCodewordsCount = function(t, n) {
660
+ switch (n) {
661
+ case D.L:
662
+ return q[(t - 1) * 4 + 0];
663
+ case D.M:
664
+ return q[(t - 1) * 4 + 1];
665
+ case D.Q:
666
+ return q[(t - 1) * 4 + 2];
667
+ case D.H:
668
+ return q[(t - 1) * 4 + 3];
669
+ default:
670
+ return;
671
+ }
672
+ };
673
+ var Ut = {}, et = {};
674
+ const Q = new Uint8Array(512), W = new Uint8Array(256);
675
+ (function() {
676
+ let t = 1;
677
+ for (let n = 0; n < 255; n++)
678
+ Q[n] = t, W[t] = n, t <<= 1, t & 256 && (t ^= 285);
679
+ for (let n = 255; n < 512; n++)
680
+ Q[n] = Q[n - 255];
681
+ })();
682
+ et.log = function(t) {
683
+ if (t < 1)
684
+ throw new Error("log(" + t + ")");
685
+ return W[t];
686
+ };
687
+ et.exp = function(t) {
688
+ return Q[t];
689
+ };
690
+ et.mul = function(t, n) {
691
+ return t === 0 || n === 0 ? 0 : Q[W[t] + W[n]];
692
+ };
693
+ (function(e) {
694
+ const t = et;
695
+ e.mul = function(o, r) {
696
+ const i = new Uint8Array(o.length + r.length - 1);
697
+ for (let s = 0; s < o.length; s++)
698
+ for (let l = 0; l < r.length; l++)
699
+ i[s + l] ^= t.mul(o[s], r[l]);
700
+ return i;
701
+ }, e.mod = function(o, r) {
702
+ let i = new Uint8Array(o);
703
+ for (; i.length - r.length >= 0; ) {
704
+ const s = i[0];
705
+ for (let a = 0; a < r.length; a++)
706
+ i[a] ^= t.mul(r[a], s);
707
+ let l = 0;
708
+ for (; l < i.length && i[l] === 0; )
709
+ l++;
710
+ i = i.slice(l);
711
+ }
712
+ return i;
713
+ }, e.generateECPolynomial = function(o) {
714
+ let r = new Uint8Array([1]);
715
+ for (let i = 0; i < o; i++)
716
+ r = e.mul(r, new Uint8Array([1, t.exp(i)]));
717
+ return r;
718
+ };
719
+ })(Ut);
720
+ const Dt = Ut;
721
+ function wt(e) {
722
+ this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
723
+ }
724
+ wt.prototype.initialize = function(t) {
725
+ this.degree = t, this.genPoly = Dt.generateECPolynomial(this.degree);
726
+ };
727
+ wt.prototype.encode = function(t) {
728
+ if (!this.genPoly)
729
+ throw new Error("Encoder not initialized");
730
+ const n = new Uint8Array(t.length + this.degree);
731
+ n.set(t);
732
+ const o = Dt.mod(n, this.genPoly), r = this.degree - o.length;
733
+ if (r > 0) {
734
+ const i = new Uint8Array(this.degree);
735
+ return i.set(o, r), i;
736
+ }
737
+ return o;
738
+ };
739
+ var de = wt, kt = {}, k = {}, yt = {};
740
+ yt.isValid = function(t) {
741
+ return !isNaN(t) && t >= 1 && t <= 40;
742
+ };
743
+ var P = {};
744
+ const Ft = "[0-9]+", ge = "[A-Z $%*+\\-./:]+";
745
+ let J = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
746
+ J = J.replace(/u/g, "\\u");
747
+ const he = "(?:(?![A-Z0-9 $%*+\\-./:]|" + J + `)(?:.|[\r
748
+ ]))+`;
749
+ P.KANJI = new RegExp(J, "g");
750
+ P.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
751
+ P.BYTE = new RegExp(he, "g");
752
+ P.NUMERIC = new RegExp(Ft, "g");
753
+ P.ALPHANUMERIC = new RegExp(ge, "g");
754
+ const me = new RegExp("^" + J + "$"), we = new RegExp("^" + Ft + "$"), ye = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
755
+ P.testKanji = function(t) {
756
+ return me.test(t);
757
+ };
758
+ P.testNumeric = function(t) {
759
+ return we.test(t);
760
+ };
761
+ P.testAlphanumeric = function(t) {
762
+ return ye.test(t);
763
+ };
764
+ (function(e) {
765
+ const t = yt, n = P;
766
+ e.NUMERIC = {
767
+ id: "Numeric",
768
+ bit: 1,
769
+ ccBits: [10, 12, 14]
770
+ }, e.ALPHANUMERIC = {
771
+ id: "Alphanumeric",
772
+ bit: 2,
773
+ ccBits: [9, 11, 13]
774
+ }, e.BYTE = {
775
+ id: "Byte",
776
+ bit: 4,
777
+ ccBits: [8, 16, 16]
778
+ }, e.KANJI = {
779
+ id: "Kanji",
780
+ bit: 8,
781
+ ccBits: [8, 10, 12]
782
+ }, e.MIXED = {
783
+ bit: -1
784
+ }, e.getCharCountIndicator = function(i, s) {
785
+ if (!i.ccBits)
786
+ throw new Error("Invalid mode: " + i);
787
+ if (!t.isValid(s))
788
+ throw new Error("Invalid version: " + s);
789
+ return s >= 1 && s < 10 ? i.ccBits[0] : s < 27 ? i.ccBits[1] : i.ccBits[2];
790
+ }, e.getBestModeForData = function(i) {
791
+ return n.testNumeric(i) ? e.NUMERIC : n.testAlphanumeric(i) ? e.ALPHANUMERIC : n.testKanji(i) ? e.KANJI : e.BYTE;
792
+ }, e.toString = function(i) {
793
+ if (i && i.id)
794
+ return i.id;
795
+ throw new Error("Invalid mode");
796
+ }, e.isValid = function(i) {
797
+ return i && i.bit && i.ccBits;
798
+ };
799
+ function o(r) {
800
+ if (typeof r != "string")
801
+ throw new Error("Param is not a string");
802
+ switch (r.toLowerCase()) {
803
+ case "numeric":
804
+ return e.NUMERIC;
805
+ case "alphanumeric":
806
+ return e.ALPHANUMERIC;
807
+ case "kanji":
808
+ return e.KANJI;
809
+ case "byte":
810
+ return e.BYTE;
811
+ default:
812
+ throw new Error("Unknown mode: " + r);
813
+ }
814
+ }
815
+ e.from = function(i, s) {
816
+ if (e.isValid(i))
817
+ return i;
818
+ try {
819
+ return o(i);
820
+ } catch (l) {
821
+ return s;
822
+ }
823
+ };
824
+ })(k);
825
+ (function(e) {
826
+ const t = N, n = tt, o = $, r = k, i = yt, s = 7973, l = t.getBCHDigit(s);
827
+ function a(d, g, m) {
828
+ for (let w = 1; w <= 40; w++)
829
+ if (g <= e.getCapacity(w, m, d))
830
+ return w;
831
+ }
832
+ function u(d, g) {
833
+ return r.getCharCountIndicator(d, g) + 4;
834
+ }
835
+ function c(d, g) {
836
+ let m = 0;
837
+ return d.forEach(function(w) {
838
+ const p = u(w.mode, g);
839
+ m += p + w.getBitsLength();
840
+ }), m;
841
+ }
842
+ function B(d, g) {
843
+ for (let m = 1; m <= 40; m++)
844
+ if (c(d, m) <= e.getCapacity(m, g, r.MIXED))
845
+ return m;
846
+ }
847
+ e.from = function(g, m) {
848
+ return i.isValid(g) ? parseInt(g, 10) : m;
849
+ }, e.getCapacity = function(g, m, w) {
850
+ if (!i.isValid(g))
851
+ throw new Error("Invalid QR Code version");
852
+ typeof w == "undefined" && (w = r.BYTE);
853
+ const p = t.getSymbolTotalCodewords(g), f = n.getTotalCodewordsCount(g, m), h = (p - f) * 8;
854
+ if (w === r.MIXED)
855
+ return h;
856
+ const C = h - u(w, g);
857
+ switch (w) {
858
+ case r.NUMERIC:
859
+ return Math.floor(C / 10 * 3);
860
+ case r.ALPHANUMERIC:
861
+ return Math.floor(C / 11 * 2);
862
+ case r.KANJI:
863
+ return Math.floor(C / 13);
864
+ case r.BYTE:
865
+ default:
866
+ return Math.floor(C / 8);
867
+ }
868
+ }, e.getBestVersionForData = function(g, m) {
869
+ let w;
870
+ const p = o.from(m, o.M);
871
+ if (Array.isArray(g)) {
872
+ if (g.length > 1)
873
+ return B(g, p);
874
+ if (g.length === 0)
875
+ return 1;
876
+ w = g[0];
877
+ } else
878
+ w = g;
879
+ return a(w.mode, w.getLength(), p);
880
+ }, e.getEncodedBits = function(g) {
881
+ if (!i.isValid(g) || g < 7)
882
+ throw new Error("Invalid QR Code version");
883
+ let m = g << 12;
884
+ for (; t.getBCHDigit(m) - l >= 0; )
885
+ m ^= s << t.getBCHDigit(m) - l;
886
+ return g << 12 | m;
887
+ };
888
+ })(kt);
889
+ var zt = {};
890
+ const ft = N, vt = 1335, Ce = 21522, Tt = ft.getBCHDigit(vt);
891
+ zt.getEncodedBits = function(t, n) {
892
+ const o = t.bit << 3 | n;
893
+ let r = o << 10;
894
+ for (; ft.getBCHDigit(r) - Tt >= 0; )
895
+ r ^= vt << ft.getBCHDigit(r) - Tt;
896
+ return (o << 10 | r) ^ Ce;
897
+ };
898
+ var Vt = {};
899
+ const pe = k;
900
+ function v(e) {
901
+ this.mode = pe.NUMERIC, this.data = e.toString();
902
+ }
903
+ v.getBitsLength = function(t) {
904
+ return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
905
+ };
906
+ v.prototype.getLength = function() {
907
+ return this.data.length;
908
+ };
909
+ v.prototype.getBitsLength = function() {
910
+ return v.getBitsLength(this.data.length);
911
+ };
912
+ v.prototype.write = function(t) {
913
+ let n, o, r;
914
+ for (n = 0; n + 3 <= this.data.length; n += 3)
915
+ o = this.data.substr(n, 3), r = parseInt(o, 10), t.put(r, 10);
916
+ const i = this.data.length - n;
917
+ i > 0 && (o = this.data.substr(n), r = parseInt(o, 10), t.put(r, i * 3 + 1));
918
+ };
919
+ var Ee = v;
920
+ const Be = k, rt = [
921
+ "0",
922
+ "1",
923
+ "2",
924
+ "3",
925
+ "4",
926
+ "5",
927
+ "6",
928
+ "7",
929
+ "8",
930
+ "9",
931
+ "A",
932
+ "B",
933
+ "C",
934
+ "D",
935
+ "E",
936
+ "F",
937
+ "G",
938
+ "H",
939
+ "I",
940
+ "J",
941
+ "K",
942
+ "L",
943
+ "M",
944
+ "N",
945
+ "O",
946
+ "P",
947
+ "Q",
948
+ "R",
949
+ "S",
950
+ "T",
951
+ "U",
952
+ "V",
953
+ "W",
954
+ "X",
955
+ "Y",
956
+ "Z",
957
+ " ",
958
+ "$",
959
+ "%",
960
+ "*",
961
+ "+",
962
+ "-",
963
+ ".",
964
+ "/",
965
+ ":"
966
+ ];
967
+ function V(e) {
968
+ this.mode = Be.ALPHANUMERIC, this.data = e;
969
+ }
970
+ V.getBitsLength = function(t) {
971
+ return 11 * Math.floor(t / 2) + 6 * (t % 2);
972
+ };
973
+ V.prototype.getLength = function() {
974
+ return this.data.length;
975
+ };
976
+ V.prototype.getBitsLength = function() {
977
+ return V.getBitsLength(this.data.length);
978
+ };
979
+ V.prototype.write = function(t) {
980
+ let n;
981
+ for (n = 0; n + 2 <= this.data.length; n += 2) {
982
+ let o = rt.indexOf(this.data[n]) * 45;
983
+ o += rt.indexOf(this.data[n + 1]), t.put(o, 11);
984
+ }
985
+ this.data.length % 2 && t.put(rt.indexOf(this.data[n]), 6);
986
+ };
987
+ var be = V;
988
+ const Se = k;
989
+ function H(e) {
990
+ this.mode = Se.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
991
+ }
992
+ H.getBitsLength = function(t) {
993
+ return t * 8;
994
+ };
995
+ H.prototype.getLength = function() {
996
+ return this.data.length;
997
+ };
998
+ H.prototype.getBitsLength = function() {
999
+ return H.getBitsLength(this.data.length);
1000
+ };
1001
+ H.prototype.write = function(e) {
1002
+ for (let t = 0, n = this.data.length; t < n; t++)
1003
+ e.put(this.data[t], 8);
1004
+ };
1005
+ var Ae = H;
1006
+ const Ie = k, Te = N;
1007
+ function O(e) {
1008
+ this.mode = Ie.KANJI, this.data = e;
1009
+ }
1010
+ O.getBitsLength = function(t) {
1011
+ return t * 13;
1012
+ };
1013
+ O.prototype.getLength = function() {
1014
+ return this.data.length;
1015
+ };
1016
+ O.prototype.getBitsLength = function() {
1017
+ return O.getBitsLength(this.data.length);
1018
+ };
1019
+ O.prototype.write = function(e) {
1020
+ let t;
1021
+ for (t = 0; t < this.data.length; t++) {
1022
+ let n = Te.toSJIS(this.data[t]);
1023
+ if (n >= 33088 && n <= 40956)
1024
+ n -= 33088;
1025
+ else if (n >= 57408 && n <= 60351)
1026
+ n -= 49472;
1027
+ else
1028
+ throw new Error(
1029
+ "Invalid SJIS character: " + this.data[t] + `
1030
+ Make sure your charset is UTF-8`
1031
+ );
1032
+ n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
1033
+ }
1034
+ };
1035
+ var Ne = O, Ht = { exports: {} };
1036
+ (function(e) {
1037
+ var t = {
1038
+ single_source_shortest_paths: function(n, o, r) {
1039
+ var i = {}, s = {};
1040
+ s[o] = 0;
1041
+ var l = t.PriorityQueue.make();
1042
+ l.push(o, 0);
1043
+ for (var a, u, c, B, d, g, m, w, p; !l.empty(); ) {
1044
+ a = l.pop(), u = a.value, B = a.cost, d = n[u] || {};
1045
+ for (c in d)
1046
+ d.hasOwnProperty(c) && (g = d[c], m = B + g, w = s[c], p = typeof s[c] == "undefined", (p || w > m) && (s[c] = m, l.push(c, m), i[c] = u));
1047
+ }
1048
+ if (typeof r != "undefined" && typeof s[r] == "undefined") {
1049
+ var f = ["Could not find a path from ", o, " to ", r, "."].join("");
1050
+ throw new Error(f);
1051
+ }
1052
+ return i;
1053
+ },
1054
+ extract_shortest_path_from_predecessor_list: function(n, o) {
1055
+ for (var r = [], i = o; i; )
1056
+ r.push(i), n[i], i = n[i];
1057
+ return r.reverse(), r;
1058
+ },
1059
+ find_path: function(n, o, r) {
1060
+ var i = t.single_source_shortest_paths(n, o, r);
1061
+ return t.extract_shortest_path_from_predecessor_list(
1062
+ i,
1063
+ r
1064
+ );
1065
+ },
1066
+ /**
1067
+ * A very naive priority queue implementation.
1068
+ */
1069
+ PriorityQueue: {
1070
+ make: function(n) {
1071
+ var o = t.PriorityQueue, r = {}, i;
1072
+ n = n || {};
1073
+ for (i in o)
1074
+ o.hasOwnProperty(i) && (r[i] = o[i]);
1075
+ return r.queue = [], r.sorter = n.sorter || o.default_sorter, r;
1076
+ },
1077
+ default_sorter: function(n, o) {
1078
+ return n.cost - o.cost;
1079
+ },
1080
+ /**
1081
+ * Add a new item to the queue and ensure the highest priority element
1082
+ * is at the front of the queue.
1083
+ */
1084
+ push: function(n, o) {
1085
+ var r = { value: n, cost: o };
1086
+ this.queue.push(r), this.queue.sort(this.sorter);
1087
+ },
1088
+ /**
1089
+ * Return the highest priority element in the queue.
1090
+ */
1091
+ pop: function() {
1092
+ return this.queue.shift();
1093
+ },
1094
+ empty: function() {
1095
+ return this.queue.length === 0;
1096
+ }
1097
+ }
1098
+ };
1099
+ e.exports = t;
1100
+ })(Ht);
1101
+ var Re = Ht.exports;
1102
+ (function(e) {
1103
+ const t = k, n = Ee, o = be, r = Ae, i = Ne, s = P, l = N, a = Re;
1104
+ function u(f) {
1105
+ return unescape(encodeURIComponent(f)).length;
1106
+ }
1107
+ function c(f, h, C) {
1108
+ const y = [];
1109
+ let b;
1110
+ for (; (b = f.exec(C)) !== null; )
1111
+ y.push({
1112
+ data: b[0],
1113
+ index: b.index,
1114
+ mode: h,
1115
+ length: b[0].length
1116
+ });
1117
+ return y;
1118
+ }
1119
+ function B(f) {
1120
+ const h = c(s.NUMERIC, t.NUMERIC, f), C = c(s.ALPHANUMERIC, t.ALPHANUMERIC, f);
1121
+ let y, b;
1122
+ return l.isKanjiModeEnabled() ? (y = c(s.BYTE, t.BYTE, f), b = c(s.KANJI, t.KANJI, f)) : (y = c(s.BYTE_KANJI, t.BYTE, f), b = []), h.concat(C, y, b).sort(function(A, T) {
1123
+ return A.index - T.index;
1124
+ }).map(function(A) {
1125
+ return {
1126
+ data: A.data,
1127
+ mode: A.mode,
1128
+ length: A.length
1129
+ };
1130
+ });
1131
+ }
1132
+ function d(f, h) {
1133
+ switch (h) {
1134
+ case t.NUMERIC:
1135
+ return n.getBitsLength(f);
1136
+ case t.ALPHANUMERIC:
1137
+ return o.getBitsLength(f);
1138
+ case t.KANJI:
1139
+ return i.getBitsLength(f);
1140
+ case t.BYTE:
1141
+ return r.getBitsLength(f);
1142
+ }
1143
+ }
1144
+ function g(f) {
1145
+ return f.reduce(function(h, C) {
1146
+ const y = h.length - 1 >= 0 ? h[h.length - 1] : null;
1147
+ return y && y.mode === C.mode ? (h[h.length - 1].data += C.data, h) : (h.push(C), h);
1148
+ }, []);
1149
+ }
1150
+ function m(f) {
1151
+ const h = [];
1152
+ for (let C = 0; C < f.length; C++) {
1153
+ const y = f[C];
1154
+ switch (y.mode) {
1155
+ case t.NUMERIC:
1156
+ h.push([
1157
+ y,
1158
+ { data: y.data, mode: t.ALPHANUMERIC, length: y.length },
1159
+ { data: y.data, mode: t.BYTE, length: y.length }
1160
+ ]);
1161
+ break;
1162
+ case t.ALPHANUMERIC:
1163
+ h.push([
1164
+ y,
1165
+ { data: y.data, mode: t.BYTE, length: y.length }
1166
+ ]);
1167
+ break;
1168
+ case t.KANJI:
1169
+ h.push([
1170
+ y,
1171
+ { data: y.data, mode: t.BYTE, length: u(y.data) }
1172
+ ]);
1173
+ break;
1174
+ case t.BYTE:
1175
+ h.push([
1176
+ { data: y.data, mode: t.BYTE, length: u(y.data) }
1177
+ ]);
1178
+ }
1179
+ }
1180
+ return h;
1181
+ }
1182
+ function w(f, h) {
1183
+ const C = {}, y = { start: {} };
1184
+ let b = ["start"];
1185
+ for (let S = 0; S < f.length; S++) {
1186
+ const A = f[S], T = [];
1187
+ for (let E = 0; E < A.length; E++) {
1188
+ const I = A[E], M = "" + S + E;
1189
+ T.push(M), C[M] = { node: I, lastCount: 0 }, y[M] = {};
1190
+ for (let F = 0; F < b.length; F++) {
1191
+ const R = b[F];
1192
+ C[R] && C[R].node.mode === I.mode ? (y[R][M] = d(C[R].lastCount + I.length, I.mode) - d(C[R].lastCount, I.mode), C[R].lastCount += I.length) : (C[R] && (C[R].lastCount = I.length), y[R][M] = d(I.length, I.mode) + 4 + t.getCharCountIndicator(I.mode, h));
1193
+ }
1194
+ }
1195
+ b = T;
1196
+ }
1197
+ for (let S = 0; S < b.length; S++)
1198
+ y[b[S]].end = 0;
1199
+ return { map: y, table: C };
1200
+ }
1201
+ function p(f, h) {
1202
+ let C;
1203
+ const y = t.getBestModeForData(f);
1204
+ if (C = t.from(h, y), C !== t.BYTE && C.bit < y.bit)
1205
+ throw new Error('"' + f + '" cannot be encoded with mode ' + t.toString(C) + `.
1206
+ Suggested mode is: ` + t.toString(y));
1207
+ switch (C === t.KANJI && !l.isKanjiModeEnabled() && (C = t.BYTE), C) {
1208
+ case t.NUMERIC:
1209
+ return new n(f);
1210
+ case t.ALPHANUMERIC:
1211
+ return new o(f);
1212
+ case t.KANJI:
1213
+ return new i(f);
1214
+ case t.BYTE:
1215
+ return new r(f);
1216
+ }
1217
+ }
1218
+ e.fromArray = function(h) {
1219
+ return h.reduce(function(C, y) {
1220
+ return typeof y == "string" ? C.push(p(y, null)) : y.data && C.push(p(y.data, y.mode)), C;
1221
+ }, []);
1222
+ }, e.fromString = function(h, C) {
1223
+ const y = B(h, l.isKanjiModeEnabled()), b = m(y), S = w(b, C), A = a.find_path(S.map, "start", "end"), T = [];
1224
+ for (let E = 1; E < A.length - 1; E++)
1225
+ T.push(S.table[A[E]].node);
1226
+ return e.fromArray(g(T));
1227
+ }, e.rawSplit = function(h) {
1228
+ return e.fromArray(
1229
+ B(h, l.isKanjiModeEnabled())
1230
+ );
1231
+ };
1232
+ })(Vt);
1233
+ const nt = N, ot = $, Me = ue, Pe = ce, _e = Pt, Le = _t, dt = Lt, gt = tt, Ue = de, X = kt, De = zt, ke = k, it = Vt;
1234
+ function Fe(e, t) {
1235
+ const n = e.size, o = Le.getPositions(t);
1236
+ for (let r = 0; r < o.length; r++) {
1237
+ const i = o[r][0], s = o[r][1];
1238
+ for (let l = -1; l <= 7; l++)
1239
+ if (!(i + l <= -1 || n <= i + l))
1240
+ for (let a = -1; a <= 7; a++)
1241
+ s + a <= -1 || n <= s + a || (l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && a >= 2 && a <= 4 ? e.set(i + l, s + a, !0, !0) : e.set(i + l, s + a, !1, !0));
1242
+ }
1243
+ }
1244
+ function ze(e) {
1245
+ const t = e.size;
1246
+ for (let n = 8; n < t - 8; n++) {
1247
+ const o = n % 2 === 0;
1248
+ e.set(n, 6, o, !0), e.set(6, n, o, !0);
1249
+ }
1250
+ }
1251
+ function ve(e, t) {
1252
+ const n = _e.getPositions(t);
1253
+ for (let o = 0; o < n.length; o++) {
1254
+ const r = n[o][0], i = n[o][1];
1255
+ for (let s = -2; s <= 2; s++)
1256
+ for (let l = -2; l <= 2; l++)
1257
+ s === -2 || s === 2 || l === -2 || l === 2 || s === 0 && l === 0 ? e.set(r + s, i + l, !0, !0) : e.set(r + s, i + l, !1, !0);
1258
+ }
1259
+ }
1260
+ function Ve(e, t) {
1261
+ const n = e.size, o = X.getEncodedBits(t);
1262
+ let r, i, s;
1263
+ for (let l = 0; l < 18; l++)
1264
+ r = Math.floor(l / 3), i = l % 3 + n - 8 - 3, s = (o >> l & 1) === 1, e.set(r, i, s, !0), e.set(i, r, s, !0);
1265
+ }
1266
+ function st(e, t, n) {
1267
+ const o = e.size, r = De.getEncodedBits(t, n);
1268
+ let i, s;
1269
+ for (i = 0; i < 15; i++)
1270
+ s = (r >> i & 1) === 1, i < 6 ? e.set(i, 8, s, !0) : i < 8 ? e.set(i + 1, 8, s, !0) : e.set(o - 15 + i, 8, s, !0), i < 8 ? e.set(8, o - i - 1, s, !0) : i < 9 ? e.set(8, 15 - i - 1 + 1, s, !0) : e.set(8, 15 - i - 1, s, !0);
1271
+ e.set(o - 8, 8, 1, !0);
1272
+ }
1273
+ function He(e, t) {
1274
+ const n = e.size;
1275
+ let o = -1, r = n - 1, i = 7, s = 0;
1276
+ for (let l = n - 1; l > 0; l -= 2)
1277
+ for (l === 6 && l--; ; ) {
1278
+ for (let a = 0; a < 2; a++)
1279
+ if (!e.isReserved(r, l - a)) {
1280
+ let u = !1;
1281
+ s < t.length && (u = (t[s] >>> i & 1) === 1), e.set(r, l - a, u), i--, i === -1 && (s++, i = 7);
1282
+ }
1283
+ if (r += o, r < 0 || n <= r) {
1284
+ r -= o, o = -o;
1285
+ break;
1286
+ }
1287
+ }
1288
+ }
1289
+ function Oe(e, t, n) {
1290
+ const o = new Me();
1291
+ n.forEach(function(a) {
1292
+ o.put(a.mode.bit, 4), o.put(a.getLength(), ke.getCharCountIndicator(a.mode, e)), a.write(o);
1293
+ });
1294
+ const r = nt.getSymbolTotalCodewords(e), i = gt.getTotalCodewordsCount(e, t), s = (r - i) * 8;
1295
+ for (o.getLengthInBits() + 4 <= s && o.put(0, 4); o.getLengthInBits() % 8 !== 0; )
1296
+ o.putBit(0);
1297
+ const l = (s - o.getLengthInBits()) / 8;
1298
+ for (let a = 0; a < l; a++)
1299
+ o.put(a % 2 ? 17 : 236, 8);
1300
+ return Ke(o, e, t);
1301
+ }
1302
+ function Ke(e, t, n) {
1303
+ const o = nt.getSymbolTotalCodewords(t), r = gt.getTotalCodewordsCount(t, n), i = o - r, s = gt.getBlocksCount(t, n), l = o % s, a = s - l, u = Math.floor(o / s), c = Math.floor(i / s), B = c + 1, d = u - c, g = new Ue(d);
1304
+ let m = 0;
1305
+ const w = new Array(s), p = new Array(s);
1306
+ let f = 0;
1307
+ const h = new Uint8Array(e.buffer);
1308
+ for (let A = 0; A < s; A++) {
1309
+ const T = A < a ? c : B;
1310
+ w[A] = h.slice(m, m + T), p[A] = g.encode(w[A]), m += T, f = Math.max(f, T);
1311
+ }
1312
+ const C = new Uint8Array(o);
1313
+ let y = 0, b, S;
1314
+ for (b = 0; b < f; b++)
1315
+ for (S = 0; S < s; S++)
1316
+ b < w[S].length && (C[y++] = w[S][b]);
1317
+ for (b = 0; b < d; b++)
1318
+ for (S = 0; S < s; S++)
1319
+ C[y++] = p[S][b];
1320
+ return C;
1321
+ }
1322
+ function Qe(e, t, n, o) {
1323
+ let r;
1324
+ if (Array.isArray(e))
1325
+ r = it.fromArray(e);
1326
+ else if (typeof e == "string") {
1327
+ let u = t;
1328
+ if (!u) {
1329
+ const c = it.rawSplit(e);
1330
+ u = X.getBestVersionForData(c, n);
1331
+ }
1332
+ r = it.fromString(e, u || 40);
1333
+ } else
1334
+ throw new Error("Invalid data");
1335
+ const i = X.getBestVersionForData(r, n);
1336
+ if (!i)
1337
+ throw new Error("The amount of data is too big to be stored in a QR Code");
1338
+ if (!t)
1339
+ t = i;
1340
+ else if (t < i)
1341
+ throw new Error(
1342
+ `
1343
+ The chosen QR Code version cannot contain this amount of data.
1344
+ Minimum version required to store current data is: ` + i + `.
1345
+ `
1346
+ );
1347
+ const s = Oe(t, n, r), l = nt.getSymbolSize(t), a = new Pe(l);
1348
+ return Fe(a, t), ze(a), ve(a, t), st(a, n, 0), t >= 7 && Ve(a, t), He(a, s), isNaN(o) && (o = dt.getBestMask(
1349
+ a,
1350
+ st.bind(null, a, n)
1351
+ )), dt.applyMask(o, a), st(a, n, o), {
1352
+ modules: a,
1353
+ version: t,
1354
+ errorCorrectionLevel: n,
1355
+ maskPattern: o,
1356
+ segments: r
1357
+ };
1358
+ }
1359
+ Rt.create = function(t, n) {
1360
+ if (typeof t == "undefined" || t === "")
1361
+ throw new Error("No input text");
1362
+ let o = ot.M, r, i;
1363
+ return typeof n != "undefined" && (o = ot.from(n.errorCorrectionLevel, ot.M), r = X.from(n.version), i = dt.from(n.maskPattern), n.toSJISFunc && nt.setToSJISFunction(n.toSJISFunc)), Qe(t, r, o, i);
1364
+ };
1365
+ var Ot = {}, Ct = {};
1366
+ (function(e) {
1367
+ function t(n) {
1368
+ if (typeof n == "number" && (n = n.toString()), typeof n != "string")
1369
+ throw new Error("Color should be defined as hex string");
1370
+ let o = n.slice().replace("#", "").split("");
1371
+ if (o.length < 3 || o.length === 5 || o.length > 8)
1372
+ throw new Error("Invalid hex color: " + n);
1373
+ (o.length === 3 || o.length === 4) && (o = Array.prototype.concat.apply([], o.map(function(i) {
1374
+ return [i, i];
1375
+ }))), o.length === 6 && o.push("F", "F");
1376
+ const r = parseInt(o.join(""), 16);
1377
+ return {
1378
+ r: r >> 24 & 255,
1379
+ g: r >> 16 & 255,
1380
+ b: r >> 8 & 255,
1381
+ a: r & 255,
1382
+ hex: "#" + o.slice(0, 6).join("")
1383
+ };
1384
+ }
1385
+ e.getOptions = function(o) {
1386
+ o || (o = {}), o.color || (o.color = {});
1387
+ const r = typeof o.margin == "undefined" || o.margin === null || o.margin < 0 ? 4 : o.margin, i = o.width && o.width >= 21 ? o.width : void 0, s = o.scale || 4;
1388
+ return {
1389
+ width: i,
1390
+ scale: i ? 4 : s,
1391
+ margin: r,
1392
+ color: {
1393
+ dark: t(o.color.dark || "#000000ff"),
1394
+ light: t(o.color.light || "#ffffffff")
1395
+ },
1396
+ type: o.type,
1397
+ rendererOpts: o.rendererOpts || {}
1398
+ };
1399
+ }, e.getScale = function(o, r) {
1400
+ return r.width && r.width >= o + r.margin * 2 ? r.width / (o + r.margin * 2) : r.scale;
1401
+ }, e.getImageWidth = function(o, r) {
1402
+ const i = e.getScale(o, r);
1403
+ return Math.floor((o + r.margin * 2) * i);
1404
+ }, e.qrToImageData = function(o, r, i) {
1405
+ const s = r.modules.size, l = r.modules.data, a = e.getScale(s, i), u = Math.floor((s + i.margin * 2) * a), c = i.margin * a, B = [i.color.light, i.color.dark];
1406
+ for (let d = 0; d < u; d++)
1407
+ for (let g = 0; g < u; g++) {
1408
+ let m = (d * u + g) * 4, w = i.color.light;
1409
+ if (d >= c && g >= c && d < u - c && g < u - c) {
1410
+ const p = Math.floor((d - c) / a), f = Math.floor((g - c) / a);
1411
+ w = B[l[p * s + f] ? 1 : 0];
1412
+ }
1413
+ o[m++] = w.r, o[m++] = w.g, o[m++] = w.b, o[m] = w.a;
1414
+ }
1415
+ };
1416
+ })(Ct);
1417
+ (function(e) {
1418
+ const t = Ct;
1419
+ function n(r, i, s) {
1420
+ r.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = s, i.width = s, i.style.height = s + "px", i.style.width = s + "px";
1421
+ }
1422
+ function o() {
1423
+ try {
1424
+ return document.createElement("canvas");
1425
+ } catch (r) {
1426
+ throw new Error("You need to specify a canvas element");
1427
+ }
1428
+ }
1429
+ e.render = function(i, s, l) {
1430
+ let a = l, u = s;
1431
+ typeof a == "undefined" && (!s || !s.getContext) && (a = s, s = void 0), s || (u = o()), a = t.getOptions(a);
1432
+ const c = t.getImageWidth(i.modules.size, a), B = u.getContext("2d"), d = B.createImageData(c, c);
1433
+ return t.qrToImageData(d.data, i, a), n(B, u, c), B.putImageData(d, 0, 0), u;
1434
+ }, e.renderToDataURL = function(i, s, l) {
1435
+ let a = l;
1436
+ typeof a == "undefined" && (!s || !s.getContext) && (a = s, s = void 0), a || (a = {});
1437
+ const u = e.render(i, s, a), c = a.type || "image/png", B = a.rendererOpts || {};
1438
+ return u.toDataURL(c, B.quality);
1439
+ };
1440
+ })(Ot);
1441
+ var Kt = {};
1442
+ const Je = Ct;
1443
+ function Nt(e, t) {
1444
+ const n = e.a / 255, o = t + '="' + e.hex + '"';
1445
+ return n < 1 ? o + " " + t + '-opacity="' + n.toFixed(2).slice(1) + '"' : o;
1446
+ }
1447
+ function at(e, t, n) {
1448
+ let o = e + t;
1449
+ return typeof n != "undefined" && (o += " " + n), o;
1450
+ }
1451
+ function je(e, t, n) {
1452
+ let o = "", r = 0, i = !1, s = 0;
1453
+ for (let l = 0; l < e.length; l++) {
1454
+ const a = Math.floor(l % t), u = Math.floor(l / t);
1455
+ !a && !i && (i = !0), e[l] ? (s++, l > 0 && a > 0 && e[l - 1] || (o += i ? at("M", a + n, 0.5 + u + n) : at("m", r, 0), r = 0, i = !1), a + 1 < t && e[l + 1] || (o += at("h", s), s = 0)) : r++;
1456
+ }
1457
+ return o;
1458
+ }
1459
+ Kt.render = function(t, n, o) {
1460
+ const r = Je.getOptions(n), i = t.modules.size, s = t.modules.data, l = i + r.margin * 2, a = r.color.light.a ? "<path " + Nt(r.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", u = "<path " + Nt(r.color.dark, "stroke") + ' d="' + je(s, i, r.margin) + '"/>', c = 'viewBox="0 0 ' + l + " " + l + '"', d = '<svg xmlns="http://www.w3.org/2000/svg" ' + (r.width ? 'width="' + r.width + '" height="' + r.width + '" ' : "") + c + ' shape-rendering="crispEdges">' + a + u + `</svg>
1461
+ `;
1462
+ return typeof o == "function" && o(null, d), d;
1463
+ };
1464
+ const Ge = ae, ht = Rt, Qt = Ot, Ye = Kt;
1465
+ function pt(e, t, n, o, r) {
1466
+ const i = [].slice.call(arguments, 1), s = i.length, l = typeof i[s - 1] == "function";
1467
+ if (!l && !Ge())
1468
+ throw new Error("Callback required as last argument");
1469
+ if (l) {
1470
+ if (s < 2)
1471
+ throw new Error("Too few arguments provided");
1472
+ s === 2 ? (r = n, n = t, t = o = void 0) : s === 3 && (t.getContext && typeof r == "undefined" ? (r = o, o = void 0) : (r = o, o = n, n = t, t = void 0));
1473
+ } else {
1474
+ if (s < 1)
1475
+ throw new Error("Too few arguments provided");
1476
+ return s === 1 ? (n = t, t = o = void 0) : s === 2 && !t.getContext && (o = n, n = t, t = void 0), new Promise(function(a, u) {
1477
+ try {
1478
+ const c = ht.create(n, o);
1479
+ a(e(c, t, o));
1480
+ } catch (c) {
1481
+ u(c);
1482
+ }
1483
+ });
1484
+ }
1485
+ try {
1486
+ const a = ht.create(n, o);
1487
+ r(null, e(a, t, o));
1488
+ } catch (a) {
1489
+ r(a);
1490
+ }
1491
+ }
1492
+ j.create = ht.create;
1493
+ j.toCanvas = pt.bind(null, Qt.render);
1494
+ j.toDataURL = pt.bind(null, Qt.renderToDataURL);
1495
+ j.toString = pt.bind(null, function(e, t, n) {
1496
+ return Ye.render(e, n);
1497
+ });
1498
+ function qe(e) {
1499
+ Wt(e, "svelte-ty0b2n", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.LoadingSpinner{display:block;width:80px;height:80px;margin:0 auto 0 0}.LoadingSpinner:after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));border-color:var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent;animation:LoadingSpinner 1.2s linear infinite}@keyframes LoadingSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}');
1500
+ }
1501
+ function We(e) {
1502
+ let t, n, o;
1503
+ return {
1504
+ c() {
1505
+ t = U("div"), n = U("img"), L(n, "class", "qr-image"), bt(n.src, o = /*qrImageUrl*/
1506
+ e[3]) || L(n, "src", o), L(n, "alt", "qr-session-login"), L(t, "class", "qr-section");
1507
+ },
1508
+ m(r, i) {
1509
+ x(r, t, i), _(t, n);
1510
+ },
1511
+ p(r, i) {
1512
+ i & /*qrImageUrl*/
1513
+ 8 && !bt(n.src, o = /*qrImageUrl*/
1514
+ r[3]) && L(n, "src", o);
1515
+ },
1516
+ d(r) {
1517
+ r && Z(t);
1518
+ }
1519
+ };
1520
+ }
1521
+ function Xe(e) {
1522
+ let t;
1523
+ return {
1524
+ c() {
1525
+ t = U("div"), L(t, "class", "LoadingSpinner");
1526
+ },
1527
+ m(n, o) {
1528
+ x(n, t, o);
1529
+ },
1530
+ p: lt,
1531
+ d(n) {
1532
+ n && Z(t);
1533
+ }
1534
+ };
1535
+ }
1536
+ function Ze(e) {
1537
+ let t, n = (
1538
+ /*$_*/
1539
+ e[5](
1540
+ /*errorCode*/
1541
+ e[4]
1542
+ ) + ""
1543
+ ), o;
1544
+ return {
1545
+ c() {
1546
+ t = U("p"), o = ct(n), L(t, "class", "generate-qr-error-message");
1547
+ },
1548
+ m(r, i) {
1549
+ x(r, t, i), _(t, o);
1550
+ },
1551
+ p(r, i) {
1552
+ i & /*$_, errorCode*/
1553
+ 48 && n !== (n = /*$_*/
1554
+ r[5](
1555
+ /*errorCode*/
1556
+ r[4]
1557
+ ) + "") && ut(o, n);
1558
+ },
1559
+ d(r) {
1560
+ r && Z(t);
1561
+ }
1562
+ };
1563
+ }
1564
+ function xe(e) {
1565
+ let t, n, o, r = (
1566
+ /*$_*/
1567
+ e[5]("titleQRSessionGenerator") + ""
1568
+ ), i, s, l, a = (
1569
+ /*remaining*/
1570
+ (e[1] > 0 ? `${/*remaining*/
1571
+ e[1]}s` : (
1572
+ /*$_*/
1573
+ e[5]("generateQRButton")
1574
+ )) + ""
1575
+ ), u, c, B, d, g;
1576
+ function m(f, h) {
1577
+ if (
1578
+ /*errorCode*/
1579
+ f[4]
1580
+ )
1581
+ return Ze;
1582
+ if (
1583
+ /*isGenerating*/
1584
+ f[2]
1585
+ )
1586
+ return Xe;
1587
+ if (
1588
+ /*qrImageUrl*/
1589
+ f[3]
1590
+ )
1591
+ return We;
1592
+ }
1593
+ let w = m(e), p = w && w(e);
1594
+ return {
1595
+ c() {
1596
+ t = U("div"), n = U("div"), o = U("p"), i = ct(r), s = Bt(), l = U("button"), u = ct(a), B = Bt(), p && p.c(), L(l, "class", "generate-qr-btn"), l.disabled = c = /*isGenerating*/
1597
+ e[2] || /*remaining*/
1598
+ e[1] > 0, L(n, "class", "qr-session-generator");
1599
+ },
1600
+ m(f, h) {
1601
+ x(f, t, h), _(t, n), _(n, o), _(o, i), _(n, s), _(n, l), _(l, u), _(n, B), p && p.m(n, null), e[14](t), d || (g = Xt(
1602
+ l,
1603
+ "click",
1604
+ /*onGenerateQRClick*/
1605
+ e[6]
1606
+ ), d = !0);
1607
+ },
1608
+ p(f, [h]) {
1609
+ h & /*$_*/
1610
+ 32 && r !== (r = /*$_*/
1611
+ f[5]("titleQRSessionGenerator") + "") && ut(i, r), h & /*remaining, $_*/
1612
+ 34 && a !== (a = /*remaining*/
1613
+ (f[1] > 0 ? `${/*remaining*/
1614
+ f[1]}s` : (
1615
+ /*$_*/
1616
+ f[5]("generateQRButton")
1617
+ )) + "") && ut(u, a), h & /*isGenerating, remaining*/
1618
+ 6 && c !== (c = /*isGenerating*/
1619
+ f[2] || /*remaining*/
1620
+ f[1] > 0) && (l.disabled = c), w === (w = m(f)) && p ? p.p(f, h) : (p && p.d(1), p = w && w(f), p && (p.c(), p.m(n, null)));
1621
+ },
1622
+ i: lt,
1623
+ o: lt,
1624
+ d(f) {
1625
+ f && Z(t), p && p.d(), e[14](null), d = !1, g();
1626
+ }
1627
+ };
1628
+ }
1629
+ const $e = 60;
1630
+ function tn(e, t, n) {
1631
+ let o;
1632
+ Zt(e, ie, (E) => n(5, o = E));
1633
+ let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: l = "en" } = t, { endpoint: a = "" } = t, { sessionid: u } = t, { translationurl: c } = t;
1634
+ const B = {
1635
+ "gm.norway.unauthorized": "unauthorizedError"
1636
+ };
1637
+ let d, g, m = 0, w = !1, p = null, f = null, h = null;
1638
+ xt(() => () => {
1639
+ });
1640
+ const C = () => {
1641
+ fetch(c).then((I) => I.json()).then((I) => {
1642
+ Object.keys(I).forEach((M) => {
1643
+ St(M, I[M]);
1644
+ });
1645
+ }).catch((I) => {
1646
+ console.error(I);
1647
+ });
1648
+ };
1649
+ Object.keys(At).forEach((E) => {
1650
+ St(E, At[E]);
1651
+ });
1652
+ const y = () => {
1653
+ se(l);
1654
+ }, b = () => Et(this, null, function* () {
1655
+ var R;
1656
+ if (w || m > 0)
1657
+ return;
1658
+ n(2, w = !0), n(4, h = null), n(3, f = null), n(1, m = $e), S();
1659
+ const E = new URL(`${a}/api/pam/v1/qr/authenticate`), I = new Headers();
1660
+ I.append("X-SessionID", u);
1661
+ const M = { method: "POST", headers: I };
1662
+ n(4, h = null);
1663
+ const F = yield fetch(E.href, M);
1664
+ try {
1665
+ if (F.ok) {
1666
+ const K = yield F.json();
1667
+ n(3, f = yield j.toDataURL(JSON.stringify(K)));
1668
+ } else {
1669
+ const K = yield F.json();
1670
+ n(4, h = (R = B[K.Code]) != null ? R : "unexpectedError"), A();
1671
+ }
1672
+ } catch (K) {
1673
+ console.error(K), n(4, h = "failedToFetch"), A();
1674
+ } finally {
1675
+ n(2, w = !1);
1676
+ }
1677
+ });
1678
+ function S() {
1679
+ p !== null && clearInterval(p), p = setInterval(
1680
+ () => {
1681
+ m > 1 ? n(1, m -= 1) : (n(1, m = 0), n(2, w = !1), n(3, f = null), A());
1682
+ },
1683
+ 1e3
1684
+ );
1685
+ }
1686
+ function A() {
1687
+ p !== null && (clearInterval(p), p = null), n(1, m = 0);
1688
+ }
1689
+ $t(() => {
1690
+ p !== null && clearInterval(p);
1691
+ });
1692
+ function T(E) {
1693
+ te[E ? "unshift" : "push"](() => {
1694
+ d = E, n(0, d);
1695
+ });
1696
+ }
1697
+ return e.$$set = (E) => {
1698
+ "clientstyling" in E && n(7, r = E.clientstyling), "clientstylingurl" in E && n(8, i = E.clientstylingurl), "mbsource" in E && n(9, s = E.mbsource), "lang" in E && n(10, l = E.lang), "endpoint" in E && n(11, a = E.endpoint), "sessionid" in E && n(12, u = E.sessionid), "translationurl" in E && n(13, c = E.translationurl);
1699
+ }, e.$$.update = () => {
1700
+ e.$$.dirty & /*clientstyling, customStylingContainer*/
1701
+ 129 && r && d && ee(d, r), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
1702
+ 257 && i && d && ne(d, i), e.$$.dirty & /*mbsource, customStylingContainer*/
1703
+ 513 && s && d && re(d, `${s}.Style`, g), e.$$.dirty & /*lang*/
1704
+ 1024 && l && y(), e.$$.dirty & /*translationurl*/
1705
+ 8192 && c && C();
1706
+ }, [
1707
+ d,
1708
+ m,
1709
+ w,
1710
+ f,
1711
+ h,
1712
+ o,
1713
+ b,
1714
+ r,
1715
+ i,
1716
+ s,
1717
+ l,
1718
+ a,
1719
+ u,
1720
+ c,
1721
+ T
1722
+ ];
1723
+ }
1724
+ class en extends Gt {
1725
+ constructor(t) {
1726
+ super(), Yt(
1727
+ this,
1728
+ t,
1729
+ tn,
1730
+ xe,
1731
+ qt,
1732
+ {
1733
+ clientstyling: 7,
1734
+ clientstylingurl: 8,
1735
+ mbsource: 9,
1736
+ lang: 10,
1737
+ endpoint: 11,
1738
+ sessionid: 12,
1739
+ translationurl: 13
1740
+ },
1741
+ qe
1742
+ );
1743
+ }
1744
+ get clientstyling() {
1745
+ return this.$$.ctx[7];
1746
+ }
1747
+ set clientstyling(t) {
1748
+ this.$$set({ clientstyling: t }), z();
1749
+ }
1750
+ get clientstylingurl() {
1751
+ return this.$$.ctx[8];
1752
+ }
1753
+ set clientstylingurl(t) {
1754
+ this.$$set({ clientstylingurl: t }), z();
1755
+ }
1756
+ get mbsource() {
1757
+ return this.$$.ctx[9];
1758
+ }
1759
+ set mbsource(t) {
1760
+ this.$$set({ mbsource: t }), z();
1761
+ }
1762
+ get lang() {
1763
+ return this.$$.ctx[10];
1764
+ }
1765
+ set lang(t) {
1766
+ this.$$set({ lang: t }), z();
1767
+ }
1768
+ get endpoint() {
1769
+ return this.$$.ctx[11];
1770
+ }
1771
+ set endpoint(t) {
1772
+ this.$$set({ endpoint: t }), z();
1773
+ }
1774
+ get sessionid() {
1775
+ return this.$$.ctx[12];
1776
+ }
1777
+ set sessionid(t) {
1778
+ this.$$set({ sessionid: t }), z();
1779
+ }
1780
+ get translationurl() {
1781
+ return this.$$.ctx[13];
1782
+ }
1783
+ set translationurl(t) {
1784
+ this.$$set({ translationurl: t }), z();
1785
+ }
1786
+ }
1787
+ oe(en, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, sessionid: {}, translationurl: {} }, [], [], !0);
1788
+ export {
1789
+ en as default
1790
+ };