mada-design-system 0.5.8 → 0.5.9

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 (340) hide show
  1. package/index.cjs100.js +1 -1
  2. package/index.cjs103.js +1 -1
  3. package/index.cjs106.js +1 -1
  4. package/index.cjs107.js +1 -1
  5. package/index.cjs108.js +1 -1
  6. package/index.cjs109.js +1 -1
  7. package/index.cjs110.js +1 -1
  8. package/index.cjs111.js +1 -1
  9. package/index.cjs112.js +1 -1
  10. package/index.cjs114.js +1 -1
  11. package/index.cjs115.js +1 -1
  12. package/index.cjs116.js +1 -1
  13. package/index.cjs117.js +1 -1
  14. package/index.cjs118.js +1 -1
  15. package/index.cjs121.js +1 -1
  16. package/index.cjs122.js +1 -1
  17. package/index.cjs123.js +1 -1
  18. package/index.cjs124.js +1 -1
  19. package/index.cjs125.js +1 -1
  20. package/index.cjs126.js +1 -1
  21. package/index.cjs127.js +1 -1
  22. package/index.cjs128.js +1 -1
  23. package/index.cjs129.js +1 -1
  24. package/index.cjs130.js +1 -1
  25. package/index.cjs131.js +1 -1
  26. package/index.cjs133.js +1 -1
  27. package/index.cjs134.js +1 -1
  28. package/index.cjs135.js +1 -1
  29. package/index.cjs136.js +1 -1
  30. package/index.cjs137.js +1 -1
  31. package/index.cjs138.js +1 -1
  32. package/index.cjs139.js +1 -1
  33. package/index.cjs140.js +1 -1
  34. package/index.cjs141.js +1 -1
  35. package/index.cjs148.js +1 -1
  36. package/index.cjs149.js +1 -1
  37. package/index.cjs150.js +1 -1
  38. package/index.cjs151.js +1 -1
  39. package/index.cjs153.js +1 -1
  40. package/index.cjs154.js +1 -1
  41. package/index.cjs155.js +1 -1
  42. package/index.cjs156.js +1 -1
  43. package/index.cjs159.js +1 -1
  44. package/index.cjs160.js +1 -1
  45. package/index.cjs161.js +1 -1
  46. package/index.cjs162.js +1 -1
  47. package/index.cjs163.js +1 -1
  48. package/index.cjs164.js +1 -1
  49. package/index.cjs165.js +1 -1
  50. package/index.cjs166.js +1 -1
  51. package/index.cjs167.js +1 -1
  52. package/index.cjs168.js +1 -1
  53. package/index.cjs170.js +1 -1
  54. package/index.cjs171.js +1 -1
  55. package/index.cjs172.js +1 -1
  56. package/index.cjs173.js +1 -1
  57. package/index.cjs174.js +1 -1
  58. package/index.cjs175.js +1 -1
  59. package/index.cjs176.js +1 -1
  60. package/index.cjs177.js +1 -1
  61. package/index.cjs178.js +1 -1
  62. package/index.cjs179.js +1 -1
  63. package/index.cjs180.js +1 -1
  64. package/index.cjs181.js +1 -1
  65. package/index.cjs182.js +1 -1
  66. package/index.cjs183.js +1 -1
  67. package/index.cjs184.js +1 -1
  68. package/index.cjs185.js +1 -1
  69. package/index.cjs186.js +1 -1
  70. package/index.cjs187.js +1 -1
  71. package/index.cjs188.js +1 -1
  72. package/index.cjs189.js +1 -1
  73. package/index.cjs190.js +1 -1
  74. package/index.cjs191.js +1 -1
  75. package/index.cjs192.js +1 -4
  76. package/index.cjs193.js +1 -1
  77. package/index.cjs194.js +1 -1
  78. package/index.cjs195.js +4 -1
  79. package/index.cjs196.js +1 -1
  80. package/index.cjs198.js +1 -1
  81. package/index.cjs199.js +1 -1
  82. package/index.cjs200.js +1 -1
  83. package/index.cjs202.js +1 -1
  84. package/index.cjs213.js +1 -1
  85. package/index.cjs214.js +1 -1
  86. package/index.cjs216.js +1 -1
  87. package/index.cjs217.js +1 -1
  88. package/index.cjs220.js +1 -1
  89. package/index.cjs228.js +1 -1
  90. package/index.cjs229.js +1 -1
  91. package/index.cjs230.js +1 -1
  92. package/index.cjs235.js +1 -1
  93. package/index.cjs236.js +1 -1
  94. package/index.cjs237.js +1 -1
  95. package/index.cjs238.js +1 -1
  96. package/index.cjs239.js +1 -1
  97. package/index.cjs240.js +1 -1
  98. package/index.cjs241.js +1 -1
  99. package/index.cjs242.js +1 -1
  100. package/index.cjs243.js +1 -1
  101. package/index.cjs244.js +1 -1
  102. package/index.cjs252.js +1 -1
  103. package/index.cjs254.js +1 -1
  104. package/index.cjs255.js +1 -1
  105. package/index.cjs256.js +1 -1
  106. package/index.cjs257.js +1 -1
  107. package/index.cjs263.js +1 -1
  108. package/index.cjs264.js +1 -1
  109. package/index.cjs279.js +1 -1
  110. package/index.cjs28.js +1 -1
  111. package/index.cjs280.js +1 -1
  112. package/index.cjs281.js +1 -1
  113. package/index.cjs282.js +1 -1
  114. package/index.cjs284.js +1 -1
  115. package/index.cjs287.js +1 -1
  116. package/index.cjs288.js +1 -1
  117. package/index.cjs294.js +1 -1
  118. package/index.cjs296.js +1 -1
  119. package/index.cjs297.js +1 -1
  120. package/index.cjs301.js +1 -1
  121. package/index.cjs303.js +1 -1
  122. package/index.cjs304.js +1 -1
  123. package/index.cjs307.js +1 -1
  124. package/index.cjs308.js +1 -1
  125. package/index.cjs309.js +1 -1
  126. package/index.cjs310.js +1 -1
  127. package/index.cjs311.js +1 -1
  128. package/index.cjs312.js +1 -1
  129. package/index.cjs313.js +1 -1
  130. package/index.cjs314.js +1 -1
  131. package/index.cjs315.js +1 -1
  132. package/index.cjs316.js +1 -1
  133. package/index.cjs317.js +1 -1
  134. package/index.cjs318.js +1 -1
  135. package/index.cjs331.js +1 -1
  136. package/index.cjs348.js +1 -1
  137. package/index.cjs352.js +1 -1
  138. package/index.cjs373.js +1 -1
  139. package/index.cjs382.js +1 -1
  140. package/index.cjs383.js +1 -1
  141. package/index.cjs389.js +1 -1
  142. package/index.cjs390.js +1 -1
  143. package/index.cjs391.js +1 -1
  144. package/index.cjs392.js +1 -1
  145. package/index.cjs393.js +1 -1
  146. package/index.cjs394.js +1 -1
  147. package/index.cjs395.js +1 -1
  148. package/index.cjs399.js +1 -1
  149. package/index.cjs405.js +1 -1
  150. package/index.cjs408.js +1 -1
  151. package/index.cjs416.js +1 -1
  152. package/index.cjs417.js +1 -1
  153. package/index.cjs418.js +1 -1
  154. package/index.cjs419.js +1 -1
  155. package/index.cjs420.js +1 -1
  156. package/index.cjs421.js +1 -1
  157. package/index.cjs422.js +1 -1
  158. package/index.cjs423.js +1 -1
  159. package/index.cjs424.js +1 -1
  160. package/index.cjs425.js +1 -1
  161. package/index.cjs426.js +1 -1
  162. package/index.cjs427.js +1 -1
  163. package/index.cjs46.js +1 -1
  164. package/index.cjs81.js +1 -1
  165. package/index.cjs82.js +1 -1
  166. package/index.cjs85.js +1 -1
  167. package/index.cjs88.js +1 -1
  168. package/index.cjs9.js +1 -1
  169. package/index.cjs92.js +1 -1
  170. package/index.es.d.ts +8 -6
  171. package/index.es100.js +1 -1
  172. package/index.es103.js +1 -1
  173. package/index.es106.js +2 -2
  174. package/index.es107.js +1 -1
  175. package/index.es108.js +1 -1
  176. package/index.es109.js +1 -1
  177. package/index.es110.js +1 -1
  178. package/index.es111.js +1 -1
  179. package/index.es112.js +2 -2
  180. package/index.es114.js +1 -1
  181. package/index.es115.js +1 -1
  182. package/index.es116.js +1 -1
  183. package/index.es117.js +1 -1
  184. package/index.es118.js +1 -1
  185. package/index.es121.js +1 -1
  186. package/index.es122.js +2 -2
  187. package/index.es123.js +1 -1
  188. package/index.es124.js +1 -1
  189. package/index.es125.js +1 -1
  190. package/index.es126.js +1 -1
  191. package/index.es127.js +1 -1
  192. package/index.es128.js +1 -1
  193. package/index.es129.js +1 -1
  194. package/index.es130.js +1 -1
  195. package/index.es131.js +1 -1
  196. package/index.es133.js +1 -1
  197. package/index.es134.js +1 -1
  198. package/index.es135.js +1 -1
  199. package/index.es136.js +1 -1
  200. package/index.es137.js +1 -1
  201. package/index.es138.js +1 -1
  202. package/index.es139.js +1 -1
  203. package/index.es140.js +1 -1
  204. package/index.es141.js +1 -1
  205. package/index.es148.js +1 -1
  206. package/index.es149.js +1 -1
  207. package/index.es150.js +1 -1
  208. package/index.es151.js +1 -1
  209. package/index.es153.js +1 -1
  210. package/index.es154.js +1 -1
  211. package/index.es155.js +1 -1
  212. package/index.es156.js +1 -1
  213. package/index.es159.js +1 -1
  214. package/index.es160.js +1 -1
  215. package/index.es161.js +1 -1
  216. package/index.es162.js +1 -1
  217. package/index.es163.js +1 -1
  218. package/index.es164.js +2 -2
  219. package/index.es165.js +1 -1
  220. package/index.es166.js +2 -2
  221. package/index.es167.js +1 -1
  222. package/index.es168.js +1 -1
  223. package/index.es170.js +1 -1
  224. package/index.es171.js +1 -1
  225. package/index.es172.js +1 -1
  226. package/index.es173.js +1 -1
  227. package/index.es174.js +2310 -443
  228. package/index.es175.js +2114 -2300
  229. package/index.es176.js +11 -2152
  230. package/index.es177.js +139 -11
  231. package/index.es178.js +6 -139
  232. package/index.es179.js +471 -6
  233. package/index.es180.js +235 -3
  234. package/index.es181.js +52 -231
  235. package/index.es182.js +477 -51
  236. package/index.es183.js +3 -482
  237. package/index.es184.js +31 -18
  238. package/index.es185.js +12 -35
  239. package/index.es186.js +31 -1216
  240. package/index.es187.js +6 -14
  241. package/index.es188.js +18 -8
  242. package/index.es189.js +31 -46
  243. package/index.es190.js +1223 -5
  244. package/index.es191.js +14 -2
  245. package/index.es192.js +8 -2261
  246. package/index.es193.js +50 -31
  247. package/index.es194.js +2 -12
  248. package/index.es195.js +2260 -10
  249. package/index.es196.js +9 -37
  250. package/index.es198.js +1 -1
  251. package/index.es199.js +1 -1
  252. package/index.es200.js +1 -1
  253. package/index.es202.js +1 -1
  254. package/index.es213.js +1 -1
  255. package/index.es214.js +4 -4
  256. package/index.es216.js +1 -1
  257. package/index.es217.js +1 -1
  258. package/index.es220.js +1 -1
  259. package/index.es228.js +5 -5
  260. package/index.es229.js +6 -6
  261. package/index.es230.js +1 -1
  262. package/index.es235.js +12 -3
  263. package/index.es236.js +25 -2
  264. package/index.es237.js +10 -12
  265. package/index.es238.js +38 -24
  266. package/index.es239.js +1997 -8
  267. package/index.es240.js +6 -38
  268. package/index.es241.js +71 -1999
  269. package/index.es242.js +24 -6
  270. package/index.es243.js +3 -71
  271. package/index.es244.js +2 -25
  272. package/index.es252.js +1 -1
  273. package/index.es254.js +1 -1
  274. package/index.es255.js +1 -1
  275. package/index.es256.js +1 -1
  276. package/index.es257.js +1 -1
  277. package/index.es263.js +1 -1
  278. package/index.es264.js +1 -1
  279. package/index.es279.js +1 -1
  280. package/index.es28.js +1 -1
  281. package/index.es280.js +1 -1
  282. package/index.es281.js +1 -1
  283. package/index.es282.js +1 -1
  284. package/index.es284.js +1 -1
  285. package/index.es287.js +1 -1
  286. package/index.es288.js +1 -1
  287. package/index.es294.js +1 -1
  288. package/index.es296.js +1 -1
  289. package/index.es297.js +1 -1
  290. package/index.es301.js +1 -1
  291. package/index.es303.js +1 -1
  292. package/index.es304.js +1 -1
  293. package/index.es307.js +1 -1
  294. package/index.es308.js +15 -5
  295. package/index.es309.js +5 -8
  296. package/index.es310.js +8 -3
  297. package/index.es311.js +3 -3
  298. package/index.es312.js +2 -2
  299. package/index.es313.js +3 -6
  300. package/index.es314.js +6 -5
  301. package/index.es315.js +3 -2
  302. package/index.es316.js +4 -117
  303. package/index.es317.js +117 -4
  304. package/index.es318.js +4 -15
  305. package/index.es331.js +1 -1
  306. package/index.es348.js +1 -1
  307. package/index.es352.js +1 -1
  308. package/index.es373.js +1 -1
  309. package/index.es382.js +1 -1
  310. package/index.es383.js +1 -1
  311. package/index.es389.js +10 -8
  312. package/index.es390.js +3 -3
  313. package/index.es391.js +8 -45
  314. package/index.es392.js +3 -24
  315. package/index.es393.js +44 -9
  316. package/index.es394.js +24 -3
  317. package/index.es395.js +2 -2
  318. package/index.es399.js +3 -3
  319. package/index.es405.js +1 -1
  320. package/index.es408.js +1 -1
  321. package/index.es416.js +7 -248
  322. package/index.es417.js +6 -19
  323. package/index.es418.js +20 -51
  324. package/index.es419.js +51 -7
  325. package/index.es420.js +247 -41
  326. package/index.es421.js +41 -14
  327. package/index.es422.js +16 -10
  328. package/index.es423.js +10 -48
  329. package/index.es424.js +47 -25
  330. package/index.es425.js +24 -127
  331. package/index.es426.js +119 -102
  332. package/index.es427.js +112 -8
  333. package/index.es46.js +139 -137
  334. package/index.es81.js +1 -1
  335. package/index.es82.js +1 -1
  336. package/index.es85.js +2 -2
  337. package/index.es88.js +2 -2
  338. package/index.es9.js +1 -1
  339. package/index.es92.js +1 -1
  340. package/package.json +1 -1
package/index.es175.js CHANGED
@@ -1,2340 +1,2154 @@
1
- import { jwtDecode as Ee } from "./index.es189.js";
2
- var Te = {
3
- debug: () => {
4
- },
5
- info: () => {
6
- },
7
- warn: () => {
8
- },
9
- error: () => {
10
- }
11
- }, b, k, H = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.WARN = 2] = "WARN", e[e.INFO = 3] = "INFO", e[e.DEBUG = 4] = "DEBUG", e))(H || {});
12
- ((e) => {
13
- function t() {
14
- b = 3, k = Te;
15
- }
16
- e.reset = t;
17
- function s(r) {
18
- if (!(0 <= r && r <= 4))
19
- throw new Error("Invalid log level");
20
- b = r;
21
- }
22
- e.setLevel = s;
23
- function i(r) {
24
- k = r;
25
- }
26
- e.setLogger = i;
27
- })(H || (H = {}));
28
- var g = class v {
29
- constructor(t) {
30
- this._name = t;
31
- }
32
- /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
33
- debug(...t) {
34
- b >= 4 && k.debug(v._format(this._name, this._method), ...t);
35
- }
36
- info(...t) {
37
- b >= 3 && k.info(v._format(this._name, this._method), ...t);
38
- }
39
- warn(...t) {
40
- b >= 2 && k.warn(v._format(this._name, this._method), ...t);
41
- }
42
- error(...t) {
43
- b >= 1 && k.error(v._format(this._name, this._method), ...t);
44
- }
45
- /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
46
- throw(t) {
47
- throw this.error(t), t;
48
- }
49
- create(t) {
50
- const s = Object.create(this);
51
- return s._method = t, s.debug("begin"), s;
52
- }
53
- static createStatic(t, s) {
54
- const i = new v(`${t}.${s}`);
55
- return i.debug("begin"), i;
56
- }
57
- static _format(t, s) {
58
- const i = `[${t}]`;
59
- return s ? `${i} ${s}:` : i;
60
- }
61
- /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
62
- // helpers for static class methods
63
- static debug(t, ...s) {
64
- b >= 4 && k.debug(v._format(t), ...s);
65
- }
66
- static info(t, ...s) {
67
- b >= 3 && k.info(v._format(t), ...s);
68
- }
69
- static warn(t, ...s) {
70
- b >= 2 && k.warn(v._format(t), ...s);
71
- }
72
- static error(t, ...s) {
73
- b >= 1 && k.error(v._format(t), ...s);
74
- }
75
- /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
76
- };
77
- H.reset();
78
- var D = class {
79
- // IMPORTANT: doesn't validate the token
80
- static decode(e) {
81
- try {
82
- return Ee(e);
83
- } catch (t) {
84
- throw g.error("JwtUtils.decode", t), t;
85
- }
86
- }
87
- static async generateSignedJwt(e, t, s) {
88
- const i = f.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))), r = f.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))), o = `${i}.${r}`, n = await window.crypto.subtle.sign(
89
- {
90
- name: "ECDSA",
91
- hash: { name: "SHA-256" }
1
+ import { commonjsGlobal as h3, getDefaultExportFromCjs as o3 } from "./index.es187.js";
2
+ import { __module as L } from "./index.es194.js";
3
+ import { __require as f3 } from "./index.es195.js";
4
+ (function(C, l3) {
5
+ (function(h, D) {
6
+ C.exports = D(f3());
7
+ })(h3, function(h) {
8
+ if (h == null)
9
+ throw new Error("Cannot find moment");
10
+ var D = {
11
+ ummalquraData: [
12
+ 28607,
13
+ 28636,
14
+ 28665,
15
+ 28695,
16
+ 28724,
17
+ 28754,
18
+ 28783,
19
+ 28813,
20
+ 28843,
21
+ 28872,
22
+ 28901,
23
+ 28931,
24
+ 28960,
25
+ 28990,
26
+ 29019,
27
+ 29049,
28
+ 29078,
29
+ 29108,
30
+ 29137,
31
+ 29167,
32
+ 29196,
33
+ 29226,
34
+ 29255,
35
+ 29285,
36
+ 29315,
37
+ 29345,
38
+ 29375,
39
+ 29404,
40
+ 29434,
41
+ 29463,
42
+ 29492,
43
+ 29522,
44
+ 29551,
45
+ 29580,
46
+ 29610,
47
+ 29640,
48
+ 29669,
49
+ 29699,
50
+ 29729,
51
+ 29759,
52
+ 29788,
53
+ 29818,
54
+ 29847,
55
+ 29876,
56
+ 29906,
57
+ 29935,
58
+ 29964,
59
+ 29994,
60
+ 30023,
61
+ 30053,
62
+ 30082,
63
+ 30112,
64
+ 30141,
65
+ 30171,
66
+ 30200,
67
+ 30230,
68
+ 30259,
69
+ 30289,
70
+ 30318,
71
+ 30348,
72
+ 30378,
73
+ 30408,
74
+ 30437,
75
+ 30467,
76
+ 30496,
77
+ 30526,
78
+ 30555,
79
+ 30585,
80
+ 30614,
81
+ 30644,
82
+ 30673,
83
+ 30703,
84
+ 30732,
85
+ 30762,
86
+ 30791,
87
+ 30821,
88
+ 30850,
89
+ 30880,
90
+ 30909,
91
+ 30939,
92
+ 30968,
93
+ 30998,
94
+ 31027,
95
+ 31057,
96
+ 31086,
97
+ 31116,
98
+ 31145,
99
+ 31175,
100
+ 31204,
101
+ 31234,
102
+ 31263,
103
+ 31293,
104
+ 31322,
105
+ 31352,
106
+ 31381,
107
+ 31411,
108
+ 31441,
109
+ 31471,
110
+ 31500,
111
+ 31530,
112
+ 31559,
113
+ 31589,
114
+ 31618,
115
+ 31648,
116
+ 31676,
117
+ 31706,
118
+ 31736,
119
+ 31766,
120
+ 31795,
121
+ 31825,
122
+ 31854,
123
+ 31884,
124
+ 31913,
125
+ 31943,
126
+ 31972,
127
+ 32002,
128
+ 32031,
129
+ 32061,
130
+ 32090,
131
+ 32120,
132
+ 32150,
133
+ 32180,
134
+ 32209,
135
+ 32239,
136
+ 32268,
137
+ 32298,
138
+ 32327,
139
+ 32357,
140
+ 32386,
141
+ 32416,
142
+ 32445,
143
+ 32475,
144
+ 32504,
145
+ 32534,
146
+ 32563,
147
+ 32593,
148
+ 32622,
149
+ 32652,
150
+ 32681,
151
+ 32711,
152
+ 32740,
153
+ 32770,
154
+ 32799,
155
+ 32829,
156
+ 32858,
157
+ 32888,
158
+ 32917,
159
+ 32947,
160
+ 32976,
161
+ 33006,
162
+ 33035,
163
+ 33065,
164
+ 33094,
165
+ 33124,
166
+ 33153,
167
+ 33183,
168
+ 33213,
169
+ 33243,
170
+ 33272,
171
+ 33302,
172
+ 33331,
173
+ 33361,
174
+ 33390,
175
+ 33420,
176
+ 33450,
177
+ 33479,
178
+ 33509,
179
+ 33539,
180
+ 33568,
181
+ 33598,
182
+ 33627,
183
+ 33657,
184
+ 33686,
185
+ 33716,
186
+ 33745,
187
+ 33775,
188
+ 33804,
189
+ 33834,
190
+ 33863,
191
+ 33893,
192
+ 33922,
193
+ 33952,
194
+ 33981,
195
+ 34011,
196
+ 34040,
197
+ 34069,
198
+ 34099,
199
+ 34128,
200
+ 34158,
201
+ 34187,
202
+ 34217,
203
+ 34247,
204
+ 34277,
205
+ 34306,
206
+ 34336,
207
+ 34365,
208
+ 34395,
209
+ 34424,
210
+ 34454,
211
+ 34483,
212
+ 34512,
213
+ 34542,
214
+ 34571,
215
+ 34601,
216
+ 34631,
217
+ 34660,
218
+ 34690,
219
+ 34719,
220
+ 34749,
221
+ 34778,
222
+ 34808,
223
+ 34837,
224
+ 34867,
225
+ 34896,
226
+ 34926,
227
+ 34955,
228
+ 34985,
229
+ 35015,
230
+ 35044,
231
+ 35074,
232
+ 35103,
233
+ 35133,
234
+ 35162,
235
+ 35192,
236
+ 35222,
237
+ 35251,
238
+ 35280,
239
+ 35310,
240
+ 35340,
241
+ 35370,
242
+ 35399,
243
+ 35429,
244
+ 35458,
245
+ 35488,
246
+ 35517,
247
+ 35547,
248
+ 35576,
249
+ 35605,
250
+ 35635,
251
+ 35665,
252
+ 35694,
253
+ 35723,
254
+ 35753,
255
+ 35782,
256
+ 35811,
257
+ 35841,
258
+ 35871,
259
+ 35901,
260
+ 35930,
261
+ 35960,
262
+ 35989,
263
+ 36019,
264
+ 36048,
265
+ 36078,
266
+ 36107,
267
+ 36136,
268
+ 36166,
269
+ 36195,
270
+ 36225,
271
+ 36254,
272
+ 36284,
273
+ 36314,
274
+ 36343,
275
+ 36373,
276
+ 36403,
277
+ 36433,
278
+ 36462,
279
+ 36492,
280
+ 36521,
281
+ 36551,
282
+ 36580,
283
+ 36610,
284
+ 36639,
285
+ 36669,
286
+ 36698,
287
+ 36728,
288
+ 36757,
289
+ 36786,
290
+ 36816,
291
+ 36845,
292
+ 36875,
293
+ 36904,
294
+ 36934,
295
+ 36963,
296
+ 36993,
297
+ 37022,
298
+ 37052,
299
+ 37081,
300
+ 37111,
301
+ 37141,
302
+ 37170,
303
+ 37200,
304
+ 37229,
305
+ 37259,
306
+ 37288,
307
+ 37318,
308
+ 37347,
309
+ 37377,
310
+ 37406,
311
+ 37436,
312
+ 37465,
313
+ 37495,
314
+ 37524,
315
+ 37554,
316
+ 37584,
317
+ 37613,
318
+ 37643,
319
+ 37672,
320
+ 37701,
321
+ 37731,
322
+ 37760,
323
+ 37790,
324
+ 37819,
325
+ 37849,
326
+ 37878,
327
+ 37908,
328
+ 37938,
329
+ 37967,
330
+ 37997,
331
+ 38027,
332
+ 38056,
333
+ 38085,
334
+ 38115,
335
+ 38144,
336
+ 38174,
337
+ 38203,
338
+ 38233,
339
+ 38262,
340
+ 38292,
341
+ 38322,
342
+ 38351,
343
+ 38381,
344
+ 38410,
345
+ 38440,
346
+ 38469,
347
+ 38499,
348
+ 38528,
349
+ 38558,
350
+ 38587,
351
+ 38617,
352
+ 38646,
353
+ 38676,
354
+ 38705,
355
+ 38735,
356
+ 38764,
357
+ 38794,
358
+ 38823,
359
+ 38853,
360
+ 38882,
361
+ 38912,
362
+ 38941,
363
+ 38971,
364
+ 39001,
365
+ 39030,
366
+ 39059,
367
+ 39089,
368
+ 39118,
369
+ 39148,
370
+ 39178,
371
+ 39208,
372
+ 39237,
373
+ 39267,
374
+ 39297,
375
+ 39326,
376
+ 39355,
377
+ 39385,
378
+ 39414,
379
+ 39444,
380
+ 39473,
381
+ 39503,
382
+ 39532,
383
+ 39562,
384
+ 39592,
385
+ 39621,
386
+ 39650,
387
+ 39680,
388
+ 39709,
389
+ 39739,
390
+ 39768,
391
+ 39798,
392
+ 39827,
393
+ 39857,
394
+ 39886,
395
+ 39916,
396
+ 39946,
397
+ 39975,
398
+ 40005,
399
+ 40035,
400
+ 40064,
401
+ 40094,
402
+ 40123,
403
+ 40153,
404
+ 40182,
405
+ 40212,
406
+ 40241,
407
+ 40271,
408
+ 40300,
409
+ 40330,
410
+ 40359,
411
+ 40389,
412
+ 40418,
413
+ 40448,
414
+ 40477,
415
+ 40507,
416
+ 40536,
417
+ 40566,
418
+ 40595,
419
+ 40625,
420
+ 40655,
421
+ 40685,
422
+ 40714,
423
+ 40744,
424
+ 40773,
425
+ 40803,
426
+ 40832,
427
+ 40862,
428
+ 40892,
429
+ 40921,
430
+ 40951,
431
+ 40980,
432
+ 41009,
433
+ 41039,
434
+ 41068,
435
+ 41098,
436
+ 41127,
437
+ 41157,
438
+ 41186,
439
+ 41216,
440
+ 41245,
441
+ 41275,
442
+ 41304,
443
+ 41334,
444
+ 41364,
445
+ 41393,
446
+ 41422,
447
+ 41452,
448
+ 41481,
449
+ 41511,
450
+ 41540,
451
+ 41570,
452
+ 41599,
453
+ 41629,
454
+ 41658,
455
+ 41688,
456
+ 41718,
457
+ 41748,
458
+ 41777,
459
+ 41807,
460
+ 41836,
461
+ 41865,
462
+ 41894,
463
+ 41924,
464
+ 41953,
465
+ 41983,
466
+ 42012,
467
+ 42042,
468
+ 42072,
469
+ 42102,
470
+ 42131,
471
+ 42161,
472
+ 42190,
473
+ 42220,
474
+ 42249,
475
+ 42279,
476
+ 42308,
477
+ 42337,
478
+ 42367,
479
+ 42397,
480
+ 42426,
481
+ 42456,
482
+ 42485,
483
+ 42515,
484
+ 42545,
485
+ 42574,
486
+ 42604,
487
+ 42633,
488
+ 42662,
489
+ 42692,
490
+ 42721,
491
+ 42751,
492
+ 42780,
493
+ 42810,
494
+ 42839,
495
+ 42869,
496
+ 42899,
497
+ 42929,
498
+ 42958,
499
+ 42988,
500
+ 43017,
501
+ 43046,
502
+ 43076,
503
+ 43105,
504
+ 43135,
505
+ 43164,
506
+ 43194,
507
+ 43223,
508
+ 43253,
509
+ 43283,
510
+ 43312,
511
+ 43342,
512
+ 43371,
513
+ 43401,
514
+ 43430,
515
+ 43460,
516
+ 43489,
517
+ 43519,
518
+ 43548,
519
+ 43578,
520
+ 43607,
521
+ 43637,
522
+ 43666,
523
+ 43696,
524
+ 43726,
525
+ 43755,
526
+ 43785,
527
+ 43814,
528
+ 43844,
529
+ 43873,
530
+ 43903,
531
+ 43932,
532
+ 43962,
533
+ 43991,
534
+ 44021,
535
+ 44050,
536
+ 44080,
537
+ 44109,
538
+ 44139,
539
+ 44169,
540
+ 44198,
541
+ 44228,
542
+ 44258,
543
+ 44287,
544
+ 44317,
545
+ 44346,
546
+ 44375,
547
+ 44405,
548
+ 44434,
549
+ 44464,
550
+ 44493,
551
+ 44523,
552
+ 44553,
553
+ 44582,
554
+ 44612,
555
+ 44641,
556
+ 44671,
557
+ 44700,
558
+ 44730,
559
+ 44759,
560
+ 44788,
561
+ 44818,
562
+ 44847,
563
+ 44877,
564
+ 44906,
565
+ 44936,
566
+ 44966,
567
+ 44996,
568
+ 45025,
569
+ 45055,
570
+ 45084,
571
+ 45114,
572
+ 45143,
573
+ 45172,
574
+ 45202,
575
+ 45231,
576
+ 45261,
577
+ 45290,
578
+ 45320,
579
+ 45350,
580
+ 45380,
581
+ 45409,
582
+ 45439,
583
+ 45468,
584
+ 45498,
585
+ 45527,
586
+ 45556,
587
+ 45586,
588
+ 45615,
589
+ 45644,
590
+ 45674,
591
+ 45704,
592
+ 45733,
593
+ 45763,
594
+ 45793,
595
+ 45823,
596
+ 45852,
597
+ 45882,
598
+ 45911,
599
+ 45940,
600
+ 45970,
601
+ 45999,
602
+ 46028,
603
+ 46058,
604
+ 46088,
605
+ 46117,
606
+ 46147,
607
+ 46177,
608
+ 46206,
609
+ 46236,
610
+ 46265,
611
+ 46295,
612
+ 46324,
613
+ 46354,
614
+ 46383,
615
+ 46413,
616
+ 46442,
617
+ 46472,
618
+ 46501,
619
+ 46531,
620
+ 46560,
621
+ 46590,
622
+ 46620,
623
+ 46649,
624
+ 46679,
625
+ 46708,
626
+ 46738,
627
+ 46767,
628
+ 46797,
629
+ 46826,
630
+ 46856,
631
+ 46885,
632
+ 46915,
633
+ 46944,
634
+ 46974,
635
+ 47003,
636
+ 47033,
637
+ 47063,
638
+ 47092,
639
+ 47122,
640
+ 47151,
641
+ 47181,
642
+ 47210,
643
+ 47240,
644
+ 47269,
645
+ 47298,
646
+ 47328,
647
+ 47357,
648
+ 47387,
649
+ 47417,
650
+ 47446,
651
+ 47476,
652
+ 47506,
653
+ 47535,
654
+ 47565,
655
+ 47594,
656
+ 47624,
657
+ 47653,
658
+ 47682,
659
+ 47712,
660
+ 47741,
661
+ 47771,
662
+ 47800,
663
+ 47830,
664
+ 47860,
665
+ 47890,
666
+ 47919,
667
+ 47949,
668
+ 47978,
669
+ 48008,
670
+ 48037,
671
+ 48066,
672
+ 48096,
673
+ 48125,
674
+ 48155,
675
+ 48184,
676
+ 48214,
677
+ 48244,
678
+ 48273,
679
+ 48303,
680
+ 48333,
681
+ 48362,
682
+ 48392,
683
+ 48421,
684
+ 48450,
685
+ 48480,
686
+ 48509,
687
+ 48538,
688
+ 48568,
689
+ 48598,
690
+ 48627,
691
+ 48657,
692
+ 48687,
693
+ 48717,
694
+ 48746,
695
+ 48776,
696
+ 48805,
697
+ 48834,
698
+ 48864,
699
+ 48893,
700
+ 48922,
701
+ 48952,
702
+ 48982,
703
+ 49011,
704
+ 49041,
705
+ 49071,
706
+ 49100,
707
+ 49130,
708
+ 49160,
709
+ 49189,
710
+ 49218,
711
+ 49248,
712
+ 49277,
713
+ 49306,
714
+ 49336,
715
+ 49365,
716
+ 49395,
717
+ 49425,
718
+ 49455,
719
+ 49484,
720
+ 49514,
721
+ 49543,
722
+ 49573,
723
+ 49602,
724
+ 49632,
725
+ 49661,
726
+ 49690,
727
+ 49720,
728
+ 49749,
729
+ 49779,
730
+ 49809,
731
+ 49838,
732
+ 49868,
733
+ 49898,
734
+ 49927,
735
+ 49957,
736
+ 49986,
737
+ 50016,
738
+ 50045,
739
+ 50075,
740
+ 50104,
741
+ 50133,
742
+ 50163,
743
+ 50192,
744
+ 50222,
745
+ 50252,
746
+ 50281,
747
+ 50311,
748
+ 50340,
749
+ 50370,
750
+ 50400,
751
+ 50429,
752
+ 50459,
753
+ 50488,
754
+ 50518,
755
+ 50547,
756
+ 50576,
757
+ 50606,
758
+ 50635,
759
+ 50665,
760
+ 50694,
761
+ 50724,
762
+ 50754,
763
+ 50784,
764
+ 50813,
765
+ 50843,
766
+ 50872,
767
+ 50902,
768
+ 50931,
769
+ 50960,
770
+ 50990,
771
+ 51019,
772
+ 51049,
773
+ 51078,
774
+ 51108,
775
+ 51138,
776
+ 51167,
777
+ 51197,
778
+ 51227,
779
+ 51256,
780
+ 51286,
781
+ 51315,
782
+ 51345,
783
+ 51374,
784
+ 51403,
785
+ 51433,
786
+ 51462,
787
+ 51492,
788
+ 51522,
789
+ 51552,
790
+ 51582,
791
+ 51611,
792
+ 51641,
793
+ 51670,
794
+ 51699,
795
+ 51729,
796
+ 51758,
797
+ 51787,
798
+ 51816,
799
+ 51846,
800
+ 51876,
801
+ 51906,
802
+ 51936,
803
+ 51965,
804
+ 51995,
805
+ 52025,
806
+ 52054,
807
+ 52083,
808
+ 52113,
809
+ 52142,
810
+ 52171,
811
+ 52200,
812
+ 52230,
813
+ 52260,
814
+ 52290,
815
+ 52319,
816
+ 52349,
817
+ 52379,
818
+ 52408,
819
+ 52438,
820
+ 52467,
821
+ 52497,
822
+ 52526,
823
+ 52555,
824
+ 52585,
825
+ 52614,
826
+ 52644,
827
+ 52673,
828
+ 52703,
829
+ 52733,
830
+ 52762,
831
+ 52792,
832
+ 52822,
833
+ 52851,
834
+ 52881,
835
+ 52910,
836
+ 52939,
837
+ 52969,
838
+ 52998,
839
+ 53028,
840
+ 53057,
841
+ 53087,
842
+ 53116,
843
+ 53146,
844
+ 53176,
845
+ 53205,
846
+ 53235,
847
+ 53264,
848
+ 53294,
849
+ 53324,
850
+ 53353,
851
+ 53383,
852
+ 53412,
853
+ 53441,
854
+ 53471,
855
+ 53500,
856
+ 53530,
857
+ 53559,
858
+ 53589,
859
+ 53619,
860
+ 53648,
861
+ 53678,
862
+ 53708,
863
+ 53737,
864
+ 53767,
865
+ 53796,
866
+ 53825,
867
+ 53855,
868
+ 53884,
869
+ 53913,
870
+ 53943,
871
+ 53973,
872
+ 54003,
873
+ 54032,
874
+ 54062,
875
+ 54092,
876
+ 54121,
877
+ 54151,
878
+ 54180,
879
+ 54209,
880
+ 54239,
881
+ 54268,
882
+ 54297,
883
+ 54327,
884
+ 54357,
885
+ 54387,
886
+ 54416,
887
+ 54446,
888
+ 54476,
889
+ 54505,
890
+ 54535,
891
+ 54564,
892
+ 54593,
893
+ 54623,
894
+ 54652,
895
+ 54681,
896
+ 54711,
897
+ 54741,
898
+ 54770,
899
+ 54800,
900
+ 54830,
901
+ 54859,
902
+ 54889,
903
+ 54919,
904
+ 54948,
905
+ 54977,
906
+ 55007,
907
+ 55036,
908
+ 55066,
909
+ 55095,
910
+ 55125,
911
+ 55154,
912
+ 55184,
913
+ 55213,
914
+ 55243,
915
+ 55273,
916
+ 55302,
917
+ 55332,
918
+ 55361,
919
+ 55391,
920
+ 55420,
921
+ 55450,
922
+ 55479,
923
+ 55508,
924
+ 55538,
925
+ 55567,
926
+ 55597,
927
+ 55627,
928
+ 55657,
929
+ 55686,
930
+ 55716,
931
+ 55745,
932
+ 55775,
933
+ 55804,
934
+ 55834,
935
+ 55863,
936
+ 55892,
937
+ 55922,
938
+ 55951,
939
+ 55981,
940
+ 56011,
941
+ 56040,
942
+ 56070,
943
+ 56100,
944
+ 56129,
945
+ 56159,
946
+ 56188,
947
+ 56218,
948
+ 56247,
949
+ 56276,
950
+ 56306,
951
+ 56335,
952
+ 56365,
953
+ 56394,
954
+ 56424,
955
+ 56454,
956
+ 56483,
957
+ 56513,
958
+ 56543,
959
+ 56572,
960
+ 56601,
961
+ 56631,
962
+ 56660,
963
+ 56690,
964
+ 56719,
965
+ 56749,
966
+ 56778,
967
+ 56808,
968
+ 56837,
969
+ 56867,
970
+ 56897,
971
+ 56926,
972
+ 56956,
973
+ 56985,
974
+ 57015,
975
+ 57044,
976
+ 57074,
977
+ 57103,
978
+ 57133,
979
+ 57162,
980
+ 57192,
981
+ 57221,
982
+ 57251,
983
+ 57280,
984
+ 57310,
985
+ 57340,
986
+ 57369,
987
+ 57399,
988
+ 57429,
989
+ 57458,
990
+ 57487,
991
+ 57517,
992
+ 57546,
993
+ 57576,
994
+ 57605,
995
+ 57634,
996
+ 57664,
997
+ 57694,
998
+ 57723,
999
+ 57753,
1000
+ 57783,
1001
+ 57813,
1002
+ 57842,
1003
+ 57871,
1004
+ 57901,
1005
+ 57930,
1006
+ 57959,
1007
+ 57989,
1008
+ 58018,
1009
+ 58048,
1010
+ 58077,
1011
+ 58107,
1012
+ 58137,
1013
+ 58167,
1014
+ 58196,
1015
+ 58226,
1016
+ 58255,
1017
+ 58285,
1018
+ 58314,
1019
+ 58343,
1020
+ 58373,
1021
+ 58402,
1022
+ 58432,
1023
+ 58461,
1024
+ 58491,
1025
+ 58521,
1026
+ 58551,
1027
+ 58580,
1028
+ 58610,
1029
+ 58639,
1030
+ 58669,
1031
+ 58698,
1032
+ 58727,
1033
+ 58757,
1034
+ 58786,
1035
+ 58816,
1036
+ 58845,
1037
+ 58875,
1038
+ 58905,
1039
+ 58934,
1040
+ 58964,
1041
+ 58994,
1042
+ 59023,
1043
+ 59053,
1044
+ 59082,
1045
+ 59111,
1046
+ 59141,
1047
+ 59170,
1048
+ 59200,
1049
+ 59229,
1050
+ 59259,
1051
+ 59288,
1052
+ 59318,
1053
+ 59348,
1054
+ 59377,
1055
+ 59407,
1056
+ 59436,
1057
+ 59466,
1058
+ 59495,
1059
+ 59525,
1060
+ 59554,
1061
+ 59584,
1062
+ 59613,
1063
+ 59643,
1064
+ 59672,
1065
+ 59702,
1066
+ 59731,
1067
+ 59761,
1068
+ 59791,
1069
+ 59820,
1070
+ 59850,
1071
+ 59879,
1072
+ 59909,
1073
+ 59939,
1074
+ 59968,
1075
+ 59997,
1076
+ 60027,
1077
+ 60056,
1078
+ 60086,
1079
+ 60115,
1080
+ 60145,
1081
+ 60174,
1082
+ 60204,
1083
+ 60234,
1084
+ 60264,
1085
+ 60293,
1086
+ 60323,
1087
+ 60352,
1088
+ 60381,
1089
+ 60411,
1090
+ 60440,
1091
+ 60469,
1092
+ 60499,
1093
+ 60528,
1094
+ 60558,
1095
+ 60588,
1096
+ 60618,
1097
+ 60648,
1098
+ 60677,
1099
+ 60707,
1100
+ 60736,
1101
+ 60765,
1102
+ 60795,
1103
+ 60824,
1104
+ 60853,
1105
+ 60883,
1106
+ 60912,
1107
+ 60942,
1108
+ 60972,
1109
+ 61002,
1110
+ 61031,
1111
+ 61061,
1112
+ 61090,
1113
+ 61120,
1114
+ 61149,
1115
+ 61179,
1116
+ 61208,
1117
+ 61237,
1118
+ 61267,
1119
+ 61296,
1120
+ 61326,
1121
+ 61356,
1122
+ 61385,
1123
+ 61415,
1124
+ 61445,
1125
+ 61474,
1126
+ 61504,
1127
+ 61533,
1128
+ 61563,
1129
+ 61592,
1130
+ 61621,
1131
+ 61651,
1132
+ 61680,
1133
+ 61710,
1134
+ 61739,
1135
+ 61769,
1136
+ 61799,
1137
+ 61828,
1138
+ 61858,
1139
+ 61888,
1140
+ 61917,
1141
+ 61947,
1142
+ 61976,
1143
+ 62006,
1144
+ 62035,
1145
+ 62064,
1146
+ 62094,
1147
+ 62123,
1148
+ 62153,
1149
+ 62182,
1150
+ 62212,
1151
+ 62242,
1152
+ 62271,
1153
+ 62301,
1154
+ 62331,
1155
+ 62360,
1156
+ 62390,
1157
+ 62419,
1158
+ 62448,
1159
+ 62478,
1160
+ 62507,
1161
+ 62537,
1162
+ 62566,
1163
+ 62596,
1164
+ 62625,
1165
+ 62655,
1166
+ 62685,
1167
+ 62715,
1168
+ 62744,
1169
+ 62774,
1170
+ 62803,
1171
+ 62832,
1172
+ 62862,
1173
+ 62891,
1174
+ 62921,
1175
+ 62950,
1176
+ 62980,
1177
+ 63009,
1178
+ 63039,
1179
+ 63069,
1180
+ 63099,
1181
+ 63128,
1182
+ 63157,
1183
+ 63187,
1184
+ 63216,
1185
+ 63246,
1186
+ 63275,
1187
+ 63305,
1188
+ 63334,
1189
+ 63363,
1190
+ 63393,
1191
+ 63423,
1192
+ 63453,
1193
+ 63482,
1194
+ 63512,
1195
+ 63541,
1196
+ 63571,
1197
+ 63600,
1198
+ 63630,
1199
+ 63659,
1200
+ 63689,
1201
+ 63718,
1202
+ 63747,
1203
+ 63777,
1204
+ 63807,
1205
+ 63836,
1206
+ 63866,
1207
+ 63895,
1208
+ 63925,
1209
+ 63955,
1210
+ 63984,
1211
+ 64014,
1212
+ 64043,
1213
+ 64073,
1214
+ 64102,
1215
+ 64131,
1216
+ 64161,
1217
+ 64190,
1218
+ 64220,
1219
+ 64249,
1220
+ 64279,
1221
+ 64309,
1222
+ 64339,
1223
+ 64368,
1224
+ 64398,
1225
+ 64427,
1226
+ 64457,
1227
+ 64486,
1228
+ 64515,
1229
+ 64545,
1230
+ 64574,
1231
+ 64603,
1232
+ 64633,
1233
+ 64663,
1234
+ 64692,
1235
+ 64722,
1236
+ 64752,
1237
+ 64782,
1238
+ 64811,
1239
+ 64841,
1240
+ 64870,
1241
+ 64899,
1242
+ 64929,
1243
+ 64958,
1244
+ 64987,
1245
+ 65017,
1246
+ 65047,
1247
+ 65076,
1248
+ 65106,
1249
+ 65136,
1250
+ 65166,
1251
+ 65195,
1252
+ 65225,
1253
+ 65254,
1254
+ 65283,
1255
+ 65313,
1256
+ 65342,
1257
+ 65371,
1258
+ 65401,
1259
+ 65431,
1260
+ 65460,
1261
+ 65490,
1262
+ 65520,
1263
+ 65549,
1264
+ 65579,
1265
+ 65608,
1266
+ 65638,
1267
+ 65667,
1268
+ 65697,
1269
+ 65726,
1270
+ 65755,
1271
+ 65785,
1272
+ 65815,
1273
+ 65844,
1274
+ 65874,
1275
+ 65903,
1276
+ 65933,
1277
+ 65963,
1278
+ 65992,
1279
+ 66022,
1280
+ 66051,
1281
+ 66081,
1282
+ 66110,
1283
+ 66140,
1284
+ 66169,
1285
+ 66199,
1286
+ 66228,
1287
+ 66258,
1288
+ 66287,
1289
+ 66317,
1290
+ 66346,
1291
+ 66376,
1292
+ 66405,
1293
+ 66435,
1294
+ 66465,
1295
+ 66494,
1296
+ 66524,
1297
+ 66553,
1298
+ 66583,
1299
+ 66612,
1300
+ 66641,
1301
+ 66671,
1302
+ 66700,
1303
+ 66730,
1304
+ 66760,
1305
+ 66789,
1306
+ 66819,
1307
+ 66849,
1308
+ 66878,
1309
+ 66908,
1310
+ 66937,
1311
+ 66967,
1312
+ 66996,
1313
+ 67025,
1314
+ 67055,
1315
+ 67084,
1316
+ 67114,
1317
+ 67143,
1318
+ 67173,
1319
+ 67203,
1320
+ 67233,
1321
+ 67262,
1322
+ 67292,
1323
+ 67321,
1324
+ 67351,
1325
+ 67380,
1326
+ 67409,
1327
+ 67439,
1328
+ 67468,
1329
+ 67497,
1330
+ 67527,
1331
+ 67557,
1332
+ 67587,
1333
+ 67617,
1334
+ 67646,
1335
+ 67676,
1336
+ 67705,
1337
+ 67735,
1338
+ 67764,
1339
+ 67793,
1340
+ 67823,
1341
+ 67852,
1342
+ 67882,
1343
+ 67911,
1344
+ 67941,
1345
+ 67971,
1346
+ 68e3,
1347
+ 68030,
1348
+ 68060,
1349
+ 68089,
1350
+ 68119,
1351
+ 68148,
1352
+ 68177,
1353
+ 68207,
1354
+ 68236,
1355
+ 68266,
1356
+ 68295,
1357
+ 68325,
1358
+ 68354,
1359
+ 68384,
1360
+ 68414,
1361
+ 68443,
1362
+ 68473,
1363
+ 68502,
1364
+ 68532,
1365
+ 68561,
1366
+ 68591,
1367
+ 68620,
1368
+ 68650,
1369
+ 68679,
1370
+ 68708,
1371
+ 68738,
1372
+ 68768,
1373
+ 68797,
1374
+ 68827,
1375
+ 68857,
1376
+ 68886,
1377
+ 68916,
1378
+ 68946,
1379
+ 68975,
1380
+ 69004,
1381
+ 69034,
1382
+ 69063,
1383
+ 69092,
1384
+ 69122,
1385
+ 69152,
1386
+ 69181,
1387
+ 69211,
1388
+ 69240,
1389
+ 69270,
1390
+ 69300,
1391
+ 69330,
1392
+ 69359,
1393
+ 69388,
1394
+ 69418,
1395
+ 69447,
1396
+ 69476,
1397
+ 69506,
1398
+ 69535,
1399
+ 69565,
1400
+ 69595,
1401
+ 69624,
1402
+ 69654,
1403
+ 69684,
1404
+ 69713,
1405
+ 69743,
1406
+ 69772,
1407
+ 69802,
1408
+ 69831,
1409
+ 69861,
1410
+ 69890,
1411
+ 69919,
1412
+ 69949,
1413
+ 69978,
1414
+ 70008,
1415
+ 70038,
1416
+ 70067,
1417
+ 70097,
1418
+ 70126,
1419
+ 70156,
1420
+ 70186,
1421
+ 70215,
1422
+ 70245,
1423
+ 70274,
1424
+ 70303,
1425
+ 70333,
1426
+ 70362,
1427
+ 70392,
1428
+ 70421,
1429
+ 70451,
1430
+ 70481,
1431
+ 70510,
1432
+ 70540,
1433
+ 70570,
1434
+ 70599,
1435
+ 70629,
1436
+ 70658,
1437
+ 70687,
1438
+ 70717,
1439
+ 70746,
1440
+ 70776,
1441
+ 70805,
1442
+ 70835,
1443
+ 70864,
1444
+ 70894,
1445
+ 70924,
1446
+ 70954,
1447
+ 70983,
1448
+ 71013,
1449
+ 71042,
1450
+ 71071,
1451
+ 71101,
1452
+ 71130,
1453
+ 71159,
1454
+ 71189,
1455
+ 71218,
1456
+ 71248,
1457
+ 71278,
1458
+ 71308,
1459
+ 71337,
1460
+ 71367,
1461
+ 71397,
1462
+ 71426,
1463
+ 71455,
1464
+ 71485,
1465
+ 71514,
1466
+ 71543,
1467
+ 71573,
1468
+ 71602,
1469
+ 71632,
1470
+ 71662,
1471
+ 71691,
1472
+ 71721,
1473
+ 71751,
1474
+ 71781,
1475
+ 71810,
1476
+ 71839,
1477
+ 71869,
1478
+ 71898,
1479
+ 71927,
1480
+ 71957,
1481
+ 71986,
1482
+ 72016,
1483
+ 72046,
1484
+ 72075,
1485
+ 72105,
1486
+ 72135,
1487
+ 72164,
1488
+ 72194,
1489
+ 72223,
1490
+ 72253,
1491
+ 72282,
1492
+ 72311,
1493
+ 72341,
1494
+ 72370,
1495
+ 72400,
1496
+ 72429,
1497
+ 72459,
1498
+ 72489,
1499
+ 72518,
1500
+ 72548,
1501
+ 72577,
1502
+ 72607,
1503
+ 72637,
1504
+ 72666,
1505
+ 72695,
1506
+ 72725,
1507
+ 72754,
1508
+ 72784,
1509
+ 72813,
1510
+ 72843,
1511
+ 72872,
1512
+ 72902,
1513
+ 72931,
1514
+ 72961,
1515
+ 72991,
1516
+ 73020,
1517
+ 73050,
1518
+ 73080,
1519
+ 73109,
1520
+ 73139,
1521
+ 73168,
1522
+ 73197,
1523
+ 73227,
1524
+ 73256,
1525
+ 73286,
1526
+ 73315,
1527
+ 73345,
1528
+ 73375,
1529
+ 73404,
1530
+ 73434,
1531
+ 73464,
1532
+ 73493,
1533
+ 73523,
1534
+ 73552,
1535
+ 73581,
1536
+ 73611,
1537
+ 73640,
1538
+ 73669,
1539
+ 73699,
1540
+ 73729,
1541
+ 73758,
1542
+ 73788,
1543
+ 73818,
1544
+ 73848,
1545
+ 73877,
1546
+ 73907,
1547
+ 73936,
1548
+ 73965,
1549
+ 73995,
1550
+ 74024,
1551
+ 74053,
1552
+ 74083,
1553
+ 74113,
1554
+ 74142,
1555
+ 74172,
1556
+ 74202,
1557
+ 74231,
1558
+ 74261,
1559
+ 74291,
1560
+ 74320,
1561
+ 74349,
1562
+ 74379,
1563
+ 74408,
1564
+ 74437,
1565
+ 74467,
1566
+ 74497,
1567
+ 74526,
1568
+ 74556,
1569
+ 74586,
1570
+ 74615,
1571
+ 74645,
1572
+ 74675,
1573
+ 74704,
1574
+ 74733,
1575
+ 74763,
1576
+ 74792,
1577
+ 74822,
1578
+ 74851,
1579
+ 74881,
1580
+ 74910,
1581
+ 74940,
1582
+ 74969,
1583
+ 74999,
1584
+ 75029,
1585
+ 75058,
1586
+ 75088,
1587
+ 75117,
1588
+ 75147,
1589
+ 75176,
1590
+ 75206,
1591
+ 75235,
1592
+ 75264,
1593
+ 75294,
1594
+ 75323,
1595
+ 75353,
1596
+ 75383,
1597
+ 75412,
1598
+ 75442,
1599
+ 75472,
1600
+ 75501,
1601
+ 75531,
1602
+ 75560,
1603
+ 75590,
1604
+ 75619,
1605
+ 75648,
1606
+ 75678,
1607
+ 75707,
1608
+ 75737,
1609
+ 75766,
1610
+ 75796,
1611
+ 75826,
1612
+ 75856,
1613
+ 75885,
1614
+ 75915,
1615
+ 75944,
1616
+ 75974,
1617
+ 76003,
1618
+ 76032,
1619
+ 76062,
1620
+ 76091,
1621
+ 76121,
1622
+ 76150,
1623
+ 76180,
1624
+ 76210,
1625
+ 76239,
1626
+ 76269,
1627
+ 76299,
1628
+ 76328,
1629
+ 76358,
1630
+ 76387,
1631
+ 76416,
1632
+ 76446,
1633
+ 76475,
1634
+ 76505,
1635
+ 76534,
1636
+ 76564,
1637
+ 76593,
1638
+ 76623,
1639
+ 76653,
1640
+ 76682,
1641
+ 76712,
1642
+ 76741,
1643
+ 76771,
1644
+ 76801,
1645
+ 76830,
1646
+ 76859,
1647
+ 76889,
1648
+ 76918,
1649
+ 76948,
1650
+ 76977,
1651
+ 77007,
1652
+ 77036,
1653
+ 77066,
1654
+ 77096,
1655
+ 77125,
1656
+ 77155,
1657
+ 77185,
1658
+ 77214,
1659
+ 77243,
1660
+ 77273,
1661
+ 77302,
1662
+ 77332,
1663
+ 77361,
1664
+ 77390,
1665
+ 77420,
1666
+ 77450,
1667
+ 77479,
1668
+ 77509,
1669
+ 77539,
1670
+ 77569,
1671
+ 77598,
1672
+ 77627,
1673
+ 77657,
1674
+ 77686,
1675
+ 77715,
1676
+ 77745,
1677
+ 77774,
1678
+ 77804,
1679
+ 77833,
1680
+ 77863,
1681
+ 77893,
1682
+ 77923,
1683
+ 77952,
1684
+ 77982,
1685
+ 78011,
1686
+ 78041,
1687
+ 78070,
1688
+ 78099,
1689
+ 78129,
1690
+ 78158,
1691
+ 78188,
1692
+ 78217,
1693
+ 78247,
1694
+ 78277,
1695
+ 78307,
1696
+ 78336,
1697
+ 78366,
1698
+ 78395,
1699
+ 78425,
1700
+ 78454,
1701
+ 78483,
1702
+ 78513,
1703
+ 78542,
1704
+ 78572,
1705
+ 78601,
1706
+ 78631,
1707
+ 78661,
1708
+ 78690,
1709
+ 78720,
1710
+ 78750,
1711
+ 78779,
1712
+ 78808,
1713
+ 78838,
1714
+ 78867,
1715
+ 78897,
1716
+ 78926,
1717
+ 78956,
1718
+ 78985,
1719
+ 79015,
1720
+ 79044,
1721
+ 79074,
1722
+ 79104,
1723
+ 79133,
1724
+ 79163,
1725
+ 79192,
1726
+ 79222,
1727
+ 79251,
1728
+ 79281,
1729
+ 79310,
1730
+ 79340,
1731
+ 79369,
1732
+ 79399,
1733
+ 79428,
1734
+ 79458,
1735
+ 79487,
1736
+ 79517,
1737
+ 79546,
1738
+ 79576,
1739
+ 79606,
1740
+ 79635,
1741
+ 79665,
1742
+ 79695,
1743
+ 79724,
1744
+ 79753,
1745
+ 79783,
1746
+ 79812,
1747
+ 79841,
1748
+ 79871,
1749
+ 79900,
1750
+ 79930,
1751
+ 79960,
1752
+ 79990
1753
+ ]
1754
+ }, w = /(\[[^\[]*\])|(\\)?i(Mo|MM?M?M?|Do|DDDo|DD?D?D?|w[o|w]?|YYYYY|YYYY|YY|gg(ggg?)?)|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g, F = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, v = /\d\d?/, S = /\d{1,3}/, O = /\d{3}/, x = /\d{1,4}/, b = /[+\-]?\d{1,6}/, j = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.?)|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, G = /Z|[\+\-]\d\d:?\d\d/i, z = /T/i, E = /[\+\-]?\d+(\.\d{1,3})?/, J = {
1755
+ hd: "idate",
1756
+ hm: "imonth",
1757
+ hy: "iyear"
1758
+ }, T = {}, I = "DDD w M D".split(" "), P = "M D w".split(" "), l = {
1759
+ iM: function() {
1760
+ return this.iMonth() + 1;
92
1761
  },
93
- s,
94
- new TextEncoder().encode(o)
95
- ), c = f.encodeBase64Url(new Uint8Array(n));
96
- return `${o}.${c}`;
97
- }
98
- }, Re = "10000000-1000-4000-8000-100000000000", K = (e) => btoa([...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")), ie = class y {
99
- static _randomWord() {
100
- const t = new Uint32Array(1);
101
- return crypto.getRandomValues(t), t[0];
102
- }
103
- /**
104
- * Generates RFC4122 version 4 guid
105
- */
106
- static generateUUIDv4() {
107
- return Re.replace(
108
- /[018]/g,
109
- (s) => (+s ^ y._randomWord() & 15 >> +s / 4).toString(16)
110
- ).replace(/-/g, "");
111
- }
112
- /**
113
- * PKCE: Generate a code verifier
114
- */
115
- static generateCodeVerifier() {
116
- return y.generateUUIDv4() + y.generateUUIDv4() + y.generateUUIDv4();
117
- }
118
- /**
119
- * PKCE: Generate a code challenge
120
- */
121
- static async generateCodeChallenge(t) {
122
- if (!crypto.subtle)
123
- throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");
124
- try {
125
- const i = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", i);
126
- return K(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
127
- } catch (s) {
128
- throw g.error("CryptoUtils.generateCodeChallenge", s), s;
129
- }
130
- }
131
- /**
132
- * Generates a base64-encoded string for a basic auth header
133
- */
134
- static generateBasicAuth(t, s) {
135
- const r = new TextEncoder().encode([t, s].join(":"));
136
- return K(r);
137
- }
138
- /**
139
- * Generates a hash of a string using a given algorithm
140
- * @param alg
141
- * @param message
142
- */
143
- static async hash(t, s) {
144
- const i = new TextEncoder().encode(s), r = await crypto.subtle.digest(t, i);
145
- return new Uint8Array(r);
146
- }
147
- /**
148
- * Generates a rfc7638 compliant jwk thumbprint
149
- * @param jwk
150
- */
151
- static async customCalculateJwkThumbprint(t) {
152
- let s;
153
- switch (t.kty) {
154
- case "RSA":
155
- s = {
156
- e: t.e,
157
- kty: t.kty,
158
- n: t.n
159
- };
160
- break;
161
- case "EC":
162
- s = {
163
- crv: t.crv,
164
- kty: t.kty,
165
- x: t.x,
166
- y: t.y
167
- };
168
- break;
169
- case "OKP":
170
- s = {
171
- crv: t.crv,
172
- kty: t.kty,
173
- x: t.x
174
- };
175
- break;
176
- case "oct":
177
- s = {
178
- crv: t.k,
179
- kty: t.kty
180
- };
181
- break;
182
- default:
183
- throw new Error("Unknown jwk type");
184
- }
185
- const i = await y.hash("SHA-256", JSON.stringify(s));
186
- return y.encodeBase64Url(i);
187
- }
188
- static async generateDPoPProof({
189
- url: t,
190
- accessToken: s,
191
- httpMethod: i,
192
- keyPair: r,
193
- nonce: o
194
- }) {
195
- let n, c;
196
- const a = {
197
- jti: window.crypto.randomUUID(),
198
- htm: i ?? "GET",
199
- htu: t,
200
- iat: Math.floor(Date.now() / 1e3)
201
- };
202
- s && (n = await y.hash("SHA-256", s), c = y.encodeBase64Url(n), a.ath = c), o && (a.nonce = o);
203
- try {
204
- const l = await crypto.subtle.exportKey("jwk", r.publicKey), d = {
205
- alg: "ES256",
206
- typ: "dpop+jwt",
207
- jwk: {
208
- crv: l.crv,
209
- kty: l.kty,
210
- x: l.x,
211
- y: l.y
212
- }
1762
+ iMMM: function(e) {
1763
+ return this.localeData().iMonthsShort(this, e);
1764
+ },
1765
+ iMMMM: function(e) {
1766
+ return this.localeData().iMonths(this, e);
1767
+ },
1768
+ iD: function() {
1769
+ return this.iDate();
1770
+ },
1771
+ iDDD: function() {
1772
+ return this.iDayOfYear();
1773
+ },
1774
+ iw: function() {
1775
+ return this.iWeek();
1776
+ },
1777
+ iYY: function() {
1778
+ return d(this.iYear() % 100, 2);
1779
+ },
1780
+ iYYYY: function() {
1781
+ return d(this.iYear(), 4);
1782
+ },
1783
+ iYYYYY: function() {
1784
+ return d(this.iYear(), 5);
1785
+ },
1786
+ igg: function() {
1787
+ return d(this.iWeekYear() % 100, 2);
1788
+ },
1789
+ igggg: function() {
1790
+ return this.iWeekYear();
1791
+ },
1792
+ iggggg: function() {
1793
+ return d(this.iWeekYear(), 5);
1794
+ }
1795
+ }, M;
1796
+ function A(e, t) {
1797
+ return function(i) {
1798
+ return d(e.call(this, i), t);
213
1799
  };
214
- return await D.generateSignedJwt(d, a, r.privateKey);
215
- } catch (l) {
216
- throw l instanceof TypeError ? new Error(`Error exporting dpop public key: ${l.message}`) : l;
217
- }
218
- }
219
- static async generateDPoPJkt(t) {
220
- try {
221
- const s = await crypto.subtle.exportKey("jwk", t.publicKey);
222
- return await y.customCalculateJwkThumbprint(s);
223
- } catch (s) {
224
- throw s instanceof TypeError ? new Error(`Could not retrieve dpop keys from storage: ${s.message}`) : s;
225
1800
  }
226
- }
227
- static async generateDPoPKeys() {
228
- return await window.crypto.subtle.generateKey(
229
- {
230
- name: "ECDSA",
231
- namedCurve: "P-256"
232
- },
233
- !1,
234
- ["sign", "verify"]
235
- );
236
- }
237
- };
238
- ie.encodeBase64Url = (e) => K(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
239
- var f = ie, I = class {
240
- constructor(e) {
241
- this._name = e, this._callbacks = [], this._logger = new g(`Event('${this._name}')`);
242
- }
243
- addHandler(e) {
244
- return this._callbacks.push(e), () => this.removeHandler(e);
245
- }
246
- removeHandler(e) {
247
- const t = this._callbacks.lastIndexOf(e);
248
- t >= 0 && this._callbacks.splice(t, 1);
249
- }
250
- async raise(...e) {
251
- this._logger.debug("raise:", ...e);
252
- for (const t of this._callbacks)
253
- await t(...e);
254
- }
255
- }, Z = class {
256
- /**
257
- * Populates a map of window features with a placement centered in front of
258
- * the current window. If no explicit width is given, a default value is
259
- * binned into [800, 720, 600, 480, 360] based on the current window's width.
260
- */
261
- static center({ ...e }) {
262
- var t, s, i;
263
- return e.width == null && (e.width = (t = [800, 720, 600, 480].find((r) => r <= window.outerWidth / 1.618)) != null ? t : 360), (s = e.left) != null || (e.left = Math.max(0, Math.round(window.screenX + (window.outerWidth - e.width) / 2))), e.height != null && ((i = e.top) != null || (e.top = Math.max(0, Math.round(window.screenY + (window.outerHeight - e.height) / 2)))), e;
264
- }
265
- static serialize(e) {
266
- return Object.entries(e).filter(([, t]) => t != null).map(([t, s]) => `${t}=${typeof s != "boolean" ? s : s ? "yes" : "no"}`).join(",");
267
- }
268
- }, T = class j extends I {
269
- constructor() {
270
- super(...arguments), this._logger = new g(`Timer('${this._name}')`), this._timerHandle = null, this._expiration = 0, this._callback = () => {
271
- const t = this._expiration - j.getEpochTime();
272
- this._logger.debug("timer completes in", t), this._expiration <= j.getEpochTime() && (this.cancel(), super.raise());
273
- };
274
- }
275
- // get the time
276
- static getEpochTime() {
277
- return Math.floor(Date.now() / 1e3);
278
- }
279
- init(t) {
280
- const s = this._logger.create("init");
281
- t = Math.max(Math.floor(t), 1);
282
- const i = j.getEpochTime() + t;
283
- if (this.expiration === i && this._timerHandle) {
284
- s.debug("skipping since already initialized for expiration at", this.expiration);
285
- return;
1801
+ function Z(e, t) {
1802
+ return function(i) {
1803
+ return this.localeData().ordinal(e.call(this, i), t);
1804
+ };
286
1805
  }
287
- this.cancel(), s.debug("using duration", t), this._expiration = i;
288
- const r = Math.min(t, 5);
289
- this._timerHandle = setInterval(this._callback, r * 1e3);
290
- }
291
- get expiration() {
292
- return this._expiration;
293
- }
294
- cancel() {
295
- this._logger.create("cancel"), this._timerHandle && (clearInterval(this._timerHandle), this._timerHandle = null);
296
- }
297
- }, F = class {
298
- static readParams(e, t = "query") {
299
- if (!e)
300
- throw new TypeError("Invalid URL");
301
- const i = new URL(e, "http://127.0.0.1")[t === "fragment" ? "hash" : "search"];
302
- return new URLSearchParams(i.slice(1));
303
- }
304
- }, N = ";", q = class extends Error {
305
- constructor(e, t) {
306
- var s, i, r;
307
- if (super(e.error_description || e.error || ""), this.form = t, this.name = "ErrorResponse", !e.error)
308
- throw g.error("ErrorResponse", "No error passed"), new Error("No error passed");
309
- this.error = e.error, this.error_description = (s = e.error_description) != null ? s : null, this.error_uri = (i = e.error_uri) != null ? i : null, this.state = e.userState, this.session_state = (r = e.session_state) != null ? r : null, this.url_state = e.url_state;
310
- }
311
- }, G = class extends Error {
312
- constructor(e) {
313
- super(e), this.name = "ErrorTimeout";
314
- }
315
- }, Pe = class {
316
- constructor(e) {
317
- this._logger = new g("AccessTokenEvents"), this._expiringTimer = new T("Access token expiring"), this._expiredTimer = new T("Access token expired"), this._expiringNotificationTimeInSeconds = e.expiringNotificationTimeInSeconds;
318
- }
319
- async load(e) {
320
- const t = this._logger.create("load");
321
- if (e.access_token && e.expires_in !== void 0) {
322
- const s = e.expires_in;
323
- if (t.debug("access token present, remaining duration:", s), s > 0) {
324
- let r = s - this._expiringNotificationTimeInSeconds;
325
- r <= 0 && (r = 1), t.debug("registering expiring timer, raising in", r, "seconds"), this._expiringTimer.init(r);
326
- } else
327
- t.debug("canceling existing expiring timer because we're past expiration."), this._expiringTimer.cancel();
328
- const i = s + 1;
329
- t.debug("registering expired timer, raising in", i, "seconds"), this._expiredTimer.init(i);
330
- } else
331
- this._expiringTimer.cancel(), this._expiredTimer.cancel();
332
- }
333
- async unload() {
334
- this._logger.debug("unload: canceling existing access token timers"), this._expiringTimer.cancel(), this._expiredTimer.cancel();
335
- }
336
- /**
337
- * Add callback: Raised prior to the access token expiring.
338
- */
339
- addAccessTokenExpiring(e) {
340
- return this._expiringTimer.addHandler(e);
341
- }
342
- /**
343
- * Remove callback: Raised prior to the access token expiring.
344
- */
345
- removeAccessTokenExpiring(e) {
346
- this._expiringTimer.removeHandler(e);
347
- }
348
- /**
349
- * Add callback: Raised after the access token has expired.
350
- */
351
- addAccessTokenExpired(e) {
352
- return this._expiredTimer.addHandler(e);
353
- }
354
- /**
355
- * Remove callback: Raised after the access token has expired.
356
- */
357
- removeAccessTokenExpired(e) {
358
- this._expiredTimer.removeHandler(e);
359
- }
360
- }, Ie = class {
361
- constructor(e, t, s, i, r) {
362
- this._callback = e, this._client_id = t, this._intervalInSeconds = i, this._stopOnError = r, this._logger = new g("CheckSessionIFrame"), this._timer = null, this._session_state = null, this._message = (n) => {
363
- n.origin === this._frame_origin && n.source === this._frame.contentWindow && (n.data === "error" ? (this._logger.error("error message from check session op iframe"), this._stopOnError && this.stop()) : n.data === "changed" ? (this._logger.debug("changed message from check session op iframe"), this.stop(), this._callback()) : this._logger.debug(n.data + " message from check session op iframe"));
364
- };
365
- const o = new URL(s);
366
- this._frame_origin = o.origin, this._frame = window.document.createElement("iframe"), this._frame.style.visibility = "hidden", this._frame.style.position = "fixed", this._frame.style.left = "-1000px", this._frame.style.top = "0", this._frame.width = "0", this._frame.height = "0", this._frame.src = o.href;
367
- }
368
- load() {
369
- return new Promise((e) => {
370
- this._frame.onload = () => {
371
- e();
372
- }, window.document.body.appendChild(this._frame), window.addEventListener("message", this._message, !1);
373
- });
374
- }
375
- start(e) {
376
- if (this._session_state === e)
377
- return;
378
- this._logger.create("start"), this.stop(), this._session_state = e;
379
- const t = () => {
380
- !this._frame.contentWindow || !this._session_state || this._frame.contentWindow.postMessage(this._client_id + " " + this._session_state, this._frame_origin);
381
- };
382
- t(), this._timer = setInterval(t, this._intervalInSeconds * 1e3);
383
- }
384
- stop() {
385
- this._logger.create("stop"), this._session_state = null, this._timer && (clearInterval(this._timer), this._timer = null);
386
- }
387
- }, re = class {
388
- constructor() {
389
- this._logger = new g("InMemoryWebStorage"), this._data = {};
390
- }
391
- clear() {
392
- this._logger.create("clear"), this._data = {};
393
- }
394
- getItem(e) {
395
- return this._logger.create(`getItem('${e}')`), this._data[e];
396
- }
397
- setItem(e, t) {
398
- this._logger.create(`setItem('${e}')`), this._data[e] = t;
399
- }
400
- removeItem(e) {
401
- this._logger.create(`removeItem('${e}')`), delete this._data[e];
402
- }
403
- get length() {
404
- return Object.getOwnPropertyNames(this._data).length;
405
- }
406
- key(e) {
407
- return Object.getOwnPropertyNames(this._data)[e];
408
- }
409
- }, L = class extends Error {
410
- constructor(e, t) {
411
- super(t), this.name = "ErrorDPoPNonce", this.nonce = e;
412
- }
413
- }, Q = class {
414
- constructor(e = [], t = null, s = {}) {
415
- this._jwtHandler = t, this._extraHeaders = s, this._logger = new g("JsonService"), this._contentTypes = [], this._contentTypes.push(...e, "application/json"), t && this._contentTypes.push("application/jwt");
416
- }
417
- async fetchWithTimeout(e, t = {}) {
418
- const { timeoutInSeconds: s, ...i } = t;
419
- if (!s)
420
- return await fetch(e, i);
421
- const r = new AbortController(), o = setTimeout(() => r.abort(), s * 1e3);
422
- try {
423
- return await fetch(e, {
424
- ...t,
425
- signal: r.signal
426
- });
427
- } catch (n) {
428
- throw n instanceof DOMException && n.name === "AbortError" ? new G("Network timed out") : n;
429
- } finally {
430
- clearTimeout(o);
1806
+ for (; I.length; )
1807
+ M = I.pop(), l["i" + M + "o"] = Z(l["i" + M], M);
1808
+ for (; P.length; )
1809
+ M = P.pop(), l["i" + M + M] = A(l["i" + M], 2);
1810
+ l.iDDDD = A(l.iDDD, 3);
1811
+ function p(e, t) {
1812
+ var i;
1813
+ for (i in t)
1814
+ t.hasOwnProperty(i) && (e[i] = t[i]);
1815
+ return e;
431
1816
  }
432
- }
433
- async getJson(e, {
434
- token: t,
435
- credentials: s,
436
- timeoutInSeconds: i
437
- } = {}) {
438
- const r = this._logger.create("getJson"), o = {
439
- Accept: this._contentTypes.join(", ")
440
- };
441
- t && (r.debug("token passed, setting Authorization header"), o.Authorization = "Bearer " + t), this._appendExtraHeaders(o);
442
- let n;
443
- try {
444
- r.debug("url:", e), n = await this.fetchWithTimeout(e, { method: "GET", headers: o, timeoutInSeconds: i, credentials: s });
445
- } catch (l) {
446
- throw r.error("Network Error"), l;
1817
+ function d(e, t) {
1818
+ for (var i = e + ""; i.length < t; )
1819
+ i = "0" + i;
1820
+ return i;
447
1821
  }
448
- r.debug("HTTP response received, status", n.status);
449
- const c = n.headers.get("Content-Type");
450
- if (c && !this._contentTypes.find((l) => c.startsWith(l)) && r.throw(new Error(`Invalid response Content-Type: ${c ?? "undefined"}, from URL: ${e}`)), n.ok && this._jwtHandler && (c != null && c.startsWith("application/jwt")))
451
- return await this._jwtHandler(await n.text());
452
- let a;
453
- try {
454
- a = await n.json();
455
- } catch (l) {
456
- throw r.error("Error parsing JSON response", l), n.ok ? l : new Error(`${n.statusText} (${n.status})`);
1822
+ function V(e) {
1823
+ return Object.prototype.toString.call(e) === "[object Array]";
457
1824
  }
458
- if (!n.ok)
459
- throw r.error("Error from server:", a), a.error ? new q(a) : new Error(`${n.statusText} (${n.status}): ${JSON.stringify(a)}`);
460
- return a;
461
- }
462
- async postForm(e, {
463
- body: t,
464
- basicAuth: s,
465
- timeoutInSeconds: i,
466
- initCredentials: r,
467
- extraHeaders: o
468
- }) {
469
- const n = this._logger.create("postForm"), c = {
470
- Accept: this._contentTypes.join(", "),
471
- "Content-Type": "application/x-www-form-urlencoded",
472
- ...o
473
- };
474
- s !== void 0 && (c.Authorization = "Basic " + s), this._appendExtraHeaders(c);
475
- let a;
476
- try {
477
- n.debug("url:", e), a = await this.fetchWithTimeout(e, { method: "POST", headers: c, body: t, timeoutInSeconds: i, credentials: r });
478
- } catch (u) {
479
- throw n.error("Network error"), u;
1825
+ function y(e) {
1826
+ return e && (J[e] || e.toLowerCase().replace(/(.)s$/, "$1"));
480
1827
  }
481
- n.debug("HTTP response received, status", a.status);
482
- const l = a.headers.get("Content-Type");
483
- if (l && !this._contentTypes.find((u) => l.startsWith(u)))
484
- throw new Error(`Invalid response Content-Type: ${l ?? "undefined"}, from URL: ${e}`);
485
- const d = await a.text();
486
- let h = {};
487
- if (d)
488
- try {
489
- h = JSON.parse(d);
490
- } catch (u) {
491
- throw n.error("Error parsing JSON response", u), a.ok ? u : new Error(`${a.statusText} (${a.status})`);
492
- }
493
- if (!a.ok) {
494
- if (n.error("Error from server:", h), a.headers.has("dpop-nonce")) {
495
- const u = a.headers.get("dpop-nonce");
496
- throw new L(u, `${JSON.stringify(h)}`);
497
- }
498
- throw h.error ? new q(h, t) : new Error(`${a.statusText} (${a.status}): ${JSON.stringify(h)}`);
1828
+ function _(e, t, i, r) {
1829
+ var a = e._isUTC ? "UTC" : "";
1830
+ e._d["set" + a + "FullYear"](t), e._d["set" + a + "Month"](i), e._d["set" + a + "Date"](r);
499
1831
  }
500
- return h;
501
- }
502
- _appendExtraHeaders(e) {
503
- const t = this._logger.create("appendExtraHeaders"), s = Object.keys(this._extraHeaders), i = [
504
- "accept",
505
- "content-type"
506
- ], r = [
507
- "authorization"
508
- ];
509
- s.length !== 0 && s.forEach((o) => {
510
- if (i.includes(o.toLocaleLowerCase())) {
511
- t.warn("Protected header could not be set", o, i);
512
- return;
1832
+ function H(e) {
1833
+ function t() {
513
1834
  }
514
- if (r.includes(o.toLocaleLowerCase()) && Object.keys(e).includes(o)) {
515
- t.warn("Header could not be overridden", o, r);
516
- return;
517
- }
518
- const n = typeof this._extraHeaders[o] == "function" ? this._extraHeaders[o]() : this._extraHeaders[o];
519
- n && n !== "" && (e[o] = n);
520
- });
521
- }
522
- }, xe = class {
523
- constructor(e) {
524
- this._settings = e, this._logger = new g("MetadataService"), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._jsonService = new Q(
525
- ["application/jwk-set+json"],
526
- null,
527
- this._settings.extraHeaders
528
- ), this._settings.signingKeys && (this._logger.debug("using signingKeys from settings"), this._signingKeys = this._settings.signingKeys), this._settings.metadata && (this._logger.debug("using metadata from settings"), this._metadata = this._settings.metadata), this._settings.fetchRequestCredentials && (this._logger.debug("using fetchRequestCredentials from settings"), this._fetchRequestCredentials = this._settings.fetchRequestCredentials);
529
- }
530
- resetSigningKeys() {
531
- this._signingKeys = null;
532
- }
533
- async getMetadata() {
534
- const e = this._logger.create("getMetadata");
535
- if (this._metadata)
536
- return e.debug("using cached values"), this._metadata;
537
- if (!this._metadataUrl)
538
- throw e.throw(new Error("No authority or metadataUrl configured on settings")), null;
539
- e.debug("getting metadata from", this._metadataUrl);
540
- const t = await this._jsonService.getJson(this._metadataUrl, { credentials: this._fetchRequestCredentials, timeoutInSeconds: this._settings.requestTimeoutInSeconds });
541
- return e.debug("merging remote JSON with seed metadata"), this._metadata = Object.assign({}, t, this._settings.metadataSeed), this._metadata;
542
- }
543
- getIssuer() {
544
- return this._getMetadataProperty("issuer");
545
- }
546
- getAuthorizationEndpoint() {
547
- return this._getMetadataProperty("authorization_endpoint");
548
- }
549
- getUserInfoEndpoint() {
550
- return this._getMetadataProperty("userinfo_endpoint");
551
- }
552
- getTokenEndpoint(e = !0) {
553
- return this._getMetadataProperty("token_endpoint", e);
554
- }
555
- getCheckSessionIframe() {
556
- return this._getMetadataProperty("check_session_iframe", !0);
557
- }
558
- getEndSessionEndpoint() {
559
- return this._getMetadataProperty("end_session_endpoint", !0);
560
- }
561
- getRevocationEndpoint(e = !0) {
562
- return this._getMetadataProperty("revocation_endpoint", e);
563
- }
564
- getKeysEndpoint(e = !0) {
565
- return this._getMetadataProperty("jwks_uri", e);
566
- }
567
- async _getMetadataProperty(e, t = !1) {
568
- const s = this._logger.create(`_getMetadataProperty('${e}')`), i = await this.getMetadata();
569
- if (s.debug("resolved"), i[e] === void 0) {
570
- if (t === !0) {
571
- s.warn("Metadata does not contain optional property");
572
- return;
573
- }
574
- s.throw(new Error("Metadata does not contain property " + e));
1835
+ return t.prototype = e, new t();
575
1836
  }
576
- return i[e];
577
- }
578
- async getSigningKeys() {
579
- const e = this._logger.create("getSigningKeys");
580
- if (this._signingKeys)
581
- return e.debug("returning signingKeys from cache"), this._signingKeys;
582
- const t = await this.getKeysEndpoint(!1);
583
- e.debug("got jwks_uri", t);
584
- const s = await this._jsonService.getJson(t, { timeoutInSeconds: this._settings.requestTimeoutInSeconds });
585
- if (e.debug("got key set", s), !Array.isArray(s.keys))
586
- throw e.throw(new Error("Missing keys on keyset")), null;
587
- return this._signingKeys = s.keys, this._signingKeys;
588
- }
589
- }, ne = class {
590
- constructor({
591
- prefix: e = "oidc.",
592
- store: t = localStorage
593
- } = {}) {
594
- this._logger = new g("WebStorageStateStore"), this._store = t, this._prefix = e;
595
- }
596
- async set(e, t) {
597
- this._logger.create(`set('${e}')`), e = this._prefix + e, await this._store.setItem(e, t);
598
- }
599
- async get(e) {
600
- return this._logger.create(`get('${e}')`), e = this._prefix + e, await this._store.getItem(e);
601
- }
602
- async remove(e) {
603
- this._logger.create(`remove('${e}')`), e = this._prefix + e;
604
- const t = await this._store.getItem(e);
605
- return await this._store.removeItem(e), t;
606
- }
607
- async getAllKeys() {
608
- this._logger.create("getAllKeys");
609
- const e = await this._store.length, t = [];
610
- for (let s = 0; s < e; s++) {
611
- const i = await this._store.key(s);
612
- i && i.indexOf(this._prefix) === 0 && t.push(i.substr(this._prefix.length));
1837
+ function U(e) {
1838
+ return Object.getPrototypeOf ? Object.getPrototypeOf(e) : "".__proto__ ? e.__proto__ : e.constructor.prototype;
613
1839
  }
614
- return t;
615
- }
616
- }, Ce = "code", Ue = "openid", Ae = "client_secret_post", Oe = 60 * 15, z = class {
617
- constructor({
618
- // metadata related
619
- authority: e,
620
- metadataUrl: t,
621
- metadata: s,
622
- signingKeys: i,
623
- metadataSeed: r,
624
- // client related
625
- client_id: o,
626
- client_secret: n,
627
- response_type: c = Ce,
628
- scope: a = Ue,
629
- redirect_uri: l,
630
- post_logout_redirect_uri: d,
631
- client_authentication: h = Ae,
632
- // optional protocol
633
- prompt: u,
634
- display: p,
635
- max_age: x,
636
- ui_locales: C,
637
- acr_values: U,
638
- resource: A,
639
- response_mode: R,
640
- // behavior flags
641
- filterProtocolClaims: P = !0,
642
- loadUserInfo: O = !1,
643
- requestTimeoutInSeconds: m,
644
- staleStateAgeInSeconds: _ = Oe,
645
- mergeClaimsStrategy: E = { array: "replace" },
646
- disablePKCE: S = !1,
647
- // other behavior
648
- stateStore: w,
649
- revokeTokenAdditionalContentTypes: M,
650
- fetchRequestCredentials: X,
651
- refreshTokenAllowedScope: we,
652
- // extra
653
- extraQueryParams: me = {},
654
- extraTokenParams: Se = {},
655
- extraHeaders: ve = {},
656
- dpop: ye,
657
- omitScopeWhenRequesting: be = !1
658
- }) {
659
- var Y;
660
- if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = r, this.signingKeys = i, this.client_id = o, this.client_secret = n, this.response_type = c, this.scope = a, this.redirect_uri = l, this.post_logout_redirect_uri = d, this.client_authentication = h, this.prompt = u, this.display = p, this.max_age = x, this.ui_locales = C, this.acr_values = U, this.resource = A, this.response_mode = R, this.filterProtocolClaims = P ?? !0, this.loadUserInfo = !!O, this.staleStateAgeInSeconds = _, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = be, this.disablePKCE = !!S, this.revokeTokenAdditionalContentTypes = M, this.fetchRequestCredentials = X || "same-origin", this.requestTimeoutInSeconds = m, w)
661
- this.stateStore = w;
662
- else {
663
- const ke = typeof window < "u" ? window.localStorage : new re();
664
- this.stateStore = new ne({ store: ke });
665
- }
666
- if (this.refreshTokenAllowedScope = we, this.extraQueryParams = me, this.extraTokenParams = Se, this.extraHeaders = ve, this.dpop = ye, this.dpop && !((Y = this.dpop) != null && Y.store))
667
- throw new Error("A DPoPStore is required when dpop is enabled");
668
- }
669
- }, qe = class {
670
- constructor(e, t) {
671
- this._settings = e, this._metadataService = t, this._logger = new g("UserInfoService"), this._getClaimsFromJwt = async (s) => {
672
- const i = this._logger.create("_getClaimsFromJwt");
673
- try {
674
- const r = D.decode(s);
675
- return i.debug("JWT decoding successful"), r;
676
- } catch (r) {
677
- throw i.error("Error parsing JWT response"), r;
1840
+ p(U(h.localeData()), {
1841
+ _iMonths: [
1842
+ "Muharram",
1843
+ "Safar",
1844
+ "Rabi' al-Awwal",
1845
+ "Rabi' al-Thani",
1846
+ "Jumada al-Ula",
1847
+ "Jumada al-Alkhirah",
1848
+ "Rajab",
1849
+ "Sha’ban",
1850
+ "Ramadhan",
1851
+ "Shawwal",
1852
+ "Thul-Qi’dah",
1853
+ "Thul-Hijjah"
1854
+ ],
1855
+ iMonths: function(e) {
1856
+ return this._iMonths[e.iMonth()];
1857
+ },
1858
+ _iMonthsShort: [
1859
+ "Muh",
1860
+ "Saf",
1861
+ "Rab-I",
1862
+ "Rab-II",
1863
+ "Jum-I",
1864
+ "Jum-II",
1865
+ "Raj",
1866
+ "Sha",
1867
+ "Ram",
1868
+ "Shw",
1869
+ "Dhu-Q",
1870
+ "Dhu-H"
1871
+ ],
1872
+ iMonthsShort: function(e) {
1873
+ return this._iMonthsShort[e.iMonth()];
1874
+ },
1875
+ iMonthsParse: function(e) {
1876
+ var t, i, r;
1877
+ for (this._iMonthsParse || (this._iMonthsParse = []), t = 0; t < 12; t += 1)
1878
+ if (this._iMonthsParse[t] || (i = s([2e3, (2 + t) % 12, 25]), r = "^" + this.iMonths(i, "") + "$|^" + this.iMonthsShort(i, "") + "$", this._iMonthsParse[t] = new RegExp(r.replace(".", ""), "i")), this._iMonthsParse[t].test(e))
1879
+ return t;
678
1880
  }
679
- }, this._jsonService = new Q(
680
- void 0,
681
- this._getClaimsFromJwt,
682
- this._settings.extraHeaders
683
- );
684
- }
685
- async getClaims(e) {
686
- const t = this._logger.create("getClaims");
687
- e || this._logger.throw(new Error("No token passed"));
688
- const s = await this._metadataService.getUserInfoEndpoint();
689
- t.debug("got userinfo url", s);
690
- const i = await this._jsonService.getJson(s, {
691
- token: e,
692
- credentials: this._settings.fetchRequestCredentials,
693
- timeoutInSeconds: this._settings.requestTimeoutInSeconds
694
- });
695
- return t.debug("got claims", i), i;
696
- }
697
- }, oe = class {
698
- constructor(e, t) {
699
- this._settings = e, this._metadataService = t, this._logger = new g("TokenClient"), this._jsonService = new Q(
700
- this._settings.revokeTokenAdditionalContentTypes,
701
- null,
702
- this._settings.extraHeaders
703
- );
704
- }
705
- /**
706
- * Exchange code.
707
- *
708
- * @see https://www.rfc-editor.org/rfc/rfc6749#section-4.1.3
709
- */
710
- async exchangeCode({
711
- grant_type: e = "authorization_code",
712
- redirect_uri: t = this._settings.redirect_uri,
713
- client_id: s = this._settings.client_id,
714
- client_secret: i = this._settings.client_secret,
715
- extraHeaders: r,
716
- ...o
717
- }) {
718
- const n = this._logger.create("exchangeCode");
719
- s || n.throw(new Error("A client_id is required")), t || n.throw(new Error("A redirect_uri is required")), o.code || n.throw(new Error("A code is required"));
720
- const c = new URLSearchParams({ grant_type: e, redirect_uri: t });
721
- for (const [h, u] of Object.entries(o))
722
- u != null && c.set(h, u);
723
- let a;
724
- switch (this._settings.client_authentication) {
725
- case "client_secret_basic":
726
- if (i == null)
727
- throw n.throw(new Error("A client_secret is required")), null;
728
- a = f.generateBasicAuth(s, i);
729
- break;
730
- case "client_secret_post":
731
- c.append("client_id", s), i && c.append("client_secret", i);
732
- break;
733
- }
734
- const l = await this._metadataService.getTokenEndpoint(!1);
735
- n.debug("got token endpoint");
736
- const d = await this._jsonService.postForm(l, {
737
- body: c,
738
- basicAuth: a,
739
- timeoutInSeconds: this._settings.requestTimeoutInSeconds,
740
- initCredentials: this._settings.fetchRequestCredentials,
741
- extraHeaders: r
742
- });
743
- return n.debug("got response"), d;
744
- }
745
- /**
746
- * Exchange credentials.
747
- *
748
- * @see https://www.rfc-editor.org/rfc/rfc6749#section-4.3.2
749
- */
750
- async exchangeCredentials({
751
- grant_type: e = "password",
752
- client_id: t = this._settings.client_id,
753
- client_secret: s = this._settings.client_secret,
754
- scope: i = this._settings.scope,
755
- ...r
756
- }) {
757
- const o = this._logger.create("exchangeCredentials");
758
- t || o.throw(new Error("A client_id is required"));
759
- const n = new URLSearchParams({ grant_type: e });
760
- this._settings.omitScopeWhenRequesting || n.set("scope", i);
761
- for (const [d, h] of Object.entries(r))
762
- h != null && n.set(d, h);
763
- let c;
764
- switch (this._settings.client_authentication) {
765
- case "client_secret_basic":
766
- if (s == null)
767
- throw o.throw(new Error("A client_secret is required")), null;
768
- c = f.generateBasicAuth(t, s);
769
- break;
770
- case "client_secret_post":
771
- n.append("client_id", t), s && n.append("client_secret", s);
772
- break;
773
- }
774
- const a = await this._metadataService.getTokenEndpoint(!1);
775
- o.debug("got token endpoint");
776
- const l = await this._jsonService.postForm(a, { body: n, basicAuth: c, timeoutInSeconds: this._settings.requestTimeoutInSeconds, initCredentials: this._settings.fetchRequestCredentials });
777
- return o.debug("got response"), l;
778
- }
779
- /**
780
- * Exchange a refresh token.
781
- *
782
- * @see https://www.rfc-editor.org/rfc/rfc6749#section-6
783
- */
784
- async exchangeRefreshToken({
785
- grant_type: e = "refresh_token",
786
- client_id: t = this._settings.client_id,
787
- client_secret: s = this._settings.client_secret,
788
- timeoutInSeconds: i,
789
- extraHeaders: r,
790
- ...o
791
- }) {
792
- const n = this._logger.create("exchangeRefreshToken");
793
- t || n.throw(new Error("A client_id is required")), o.refresh_token || n.throw(new Error("A refresh_token is required"));
794
- const c = new URLSearchParams({ grant_type: e });
795
- for (const [h, u] of Object.entries(o))
796
- Array.isArray(u) ? u.forEach((p) => c.append(h, p)) : u != null && c.set(h, u);
797
- let a;
798
- switch (this._settings.client_authentication) {
799
- case "client_secret_basic":
800
- if (s == null)
801
- throw n.throw(new Error("A client_secret is required")), null;
802
- a = f.generateBasicAuth(t, s);
803
- break;
804
- case "client_secret_post":
805
- c.append("client_id", t), s && c.append("client_secret", s);
806
- break;
807
- }
808
- const l = await this._metadataService.getTokenEndpoint(!1);
809
- n.debug("got token endpoint");
810
- const d = await this._jsonService.postForm(l, { body: c, basicAuth: a, timeoutInSeconds: i, initCredentials: this._settings.fetchRequestCredentials, extraHeaders: r });
811
- return n.debug("got response"), d;
812
- }
813
- /**
814
- * Revoke an access or refresh token.
815
- *
816
- * @see https://datatracker.ietf.org/doc/html/rfc7009#section-2.1
817
- */
818
- async revoke(e) {
819
- var t;
820
- const s = this._logger.create("revoke");
821
- e.token || s.throw(new Error("A token is required"));
822
- const i = await this._metadataService.getRevocationEndpoint(!1);
823
- s.debug(`got revocation endpoint, revoking ${(t = e.token_type_hint) != null ? t : "default token type"}`);
824
- const r = new URLSearchParams();
825
- for (const [o, n] of Object.entries(e))
826
- n != null && r.set(o, n);
827
- r.set("client_id", this._settings.client_id), this._settings.client_secret && r.set("client_secret", this._settings.client_secret), await this._jsonService.postForm(i, { body: r, timeoutInSeconds: this._settings.requestTimeoutInSeconds }), s.debug("got response");
828
- }
829
- }, Ne = class {
830
- constructor(e, t, s) {
831
- this._settings = e, this._metadataService = t, this._claimsService = s, this._logger = new g("ResponseValidator"), this._userInfoService = new qe(this._settings, this._metadataService), this._tokenClient = new oe(this._settings, this._metadataService);
832
- }
833
- async validateSigninResponse(e, t, s) {
834
- const i = this._logger.create("validateSigninResponse");
835
- this._processSigninState(e, t), i.debug("state processed"), await this._processCode(e, t, s), i.debug("code processed"), e.isOpenId && this._validateIdTokenAttributes(e), i.debug("tokens validated"), await this._processClaims(e, t == null ? void 0 : t.skipUserInfo, e.isOpenId), i.debug("claims processed");
836
- }
837
- async validateCredentialsResponse(e, t) {
838
- const s = this._logger.create("validateCredentialsResponse");
839
- e.isOpenId && e.id_token && this._validateIdTokenAttributes(e), s.debug("tokens validated"), await this._processClaims(e, t, e.isOpenId), s.debug("claims processed");
840
- }
841
- async validateRefreshResponse(e, t) {
842
- var s, i;
843
- const r = this._logger.create("validateRefreshResponse");
844
- e.userState = t.data, (s = e.session_state) != null || (e.session_state = t.session_state), (i = e.scope) != null || (e.scope = t.scope), e.isOpenId && e.id_token && (this._validateIdTokenAttributes(e, t.id_token), r.debug("ID Token validated")), e.id_token || (e.id_token = t.id_token, e.profile = t.profile);
845
- const o = e.isOpenId && !!e.id_token;
846
- await this._processClaims(e, !1, o), r.debug("claims processed");
847
- }
848
- validateSignoutResponse(e, t) {
849
- const s = this._logger.create("validateSignoutResponse");
850
- if (t.id !== e.state && s.throw(new Error("State does not match")), s.debug("state validated"), e.userState = t.data, e.error)
851
- throw s.warn("Response was error", e.error), new q(e);
852
- }
853
- _processSigninState(e, t) {
854
- var s;
855
- const i = this._logger.create("_processSigninState");
856
- if (t.id !== e.state && i.throw(new Error("State does not match")), t.client_id || i.throw(new Error("No client_id on state")), t.authority || i.throw(new Error("No authority on state")), this._settings.authority !== t.authority && i.throw(new Error("authority mismatch on settings vs. signin state")), this._settings.client_id && this._settings.client_id !== t.client_id && i.throw(new Error("client_id mismatch on settings vs. signin state")), i.debug("state validated"), e.userState = t.data, e.url_state = t.url_state, (s = e.scope) != null || (e.scope = t.scope), e.error)
857
- throw i.warn("Response was error", e.error), new q(e);
858
- t.code_verifier && !e.code && i.throw(new Error("Expected code in response"));
859
- }
860
- async _processClaims(e, t = !1, s = !0) {
861
- const i = this._logger.create("_processClaims");
862
- if (e.profile = this._claimsService.filterProtocolClaims(e.profile), t || !this._settings.loadUserInfo || !e.access_token) {
863
- i.debug("not loading user info");
864
- return;
865
- }
866
- i.debug("loading user info");
867
- const r = await this._userInfoService.getClaims(e.access_token);
868
- i.debug("user info claims received from user info endpoint"), s && r.sub !== e.profile.sub && i.throw(new Error("subject from UserInfo response does not match subject in ID Token")), e.profile = this._claimsService.mergeClaims(e.profile, this._claimsService.filterProtocolClaims(r)), i.debug("user info claims received, updated profile:", e.profile);
869
- }
870
- async _processCode(e, t, s) {
871
- const i = this._logger.create("_processCode");
872
- if (e.code) {
873
- i.debug("Validating code");
874
- const r = await this._tokenClient.exchangeCode({
875
- client_id: t.client_id,
876
- client_secret: t.client_secret,
877
- code: e.code,
878
- redirect_uri: t.redirect_uri,
879
- code_verifier: t.code_verifier,
880
- extraHeaders: s,
881
- ...t.extraTokenParams
882
- });
883
- Object.assign(e, r);
884
- } else
885
- i.debug("No code to process");
886
- }
887
- _validateIdTokenAttributes(e, t) {
888
- var s;
889
- const i = this._logger.create("_validateIdTokenAttributes");
890
- i.debug("decoding ID Token JWT");
891
- const r = D.decode((s = e.id_token) != null ? s : "");
892
- if (r.sub || i.throw(new Error("ID Token is missing a subject claim")), t) {
893
- const o = D.decode(t);
894
- r.sub !== o.sub && i.throw(new Error("sub in id_token does not match current sub")), r.auth_time && r.auth_time !== o.auth_time && i.throw(new Error("auth_time in id_token does not match original auth_time")), r.azp && r.azp !== o.azp && i.throw(new Error("azp in id_token does not match original azp")), !r.azp && o.azp && i.throw(new Error("azp not in id_token, but present in original id_token"));
895
- }
896
- e.profile = r;
897
- }
898
- }, W = class B {
899
- constructor(t) {
900
- this.id = t.id || f.generateUUIDv4(), this.data = t.data, t.created && t.created > 0 ? this.created = t.created : this.created = T.getEpochTime(), this.request_type = t.request_type, this.url_state = t.url_state;
901
- }
902
- toStorageString() {
903
- return new g("State").create("toStorageString"), JSON.stringify({
904
- id: this.id,
905
- data: this.data,
906
- created: this.created,
907
- request_type: this.request_type,
908
- url_state: this.url_state
909
- });
910
- }
911
- static fromStorageString(t) {
912
- return g.createStatic("State", "fromStorageString"), Promise.resolve(new B(JSON.parse(t)));
913
- }
914
- static async clearStaleState(t, s) {
915
- const i = g.createStatic("State", "clearStaleState"), r = T.getEpochTime() - s, o = await t.getAllKeys();
916
- i.debug("got keys", o);
917
- for (let n = 0; n < o.length; n++) {
918
- const c = o[n], a = await t.get(c);
919
- let l = !1;
920
- if (a)
921
- try {
922
- const d = await B.fromStorageString(a);
923
- i.debug("got item from key:", c, d.created), d.created <= r && (l = !0);
924
- } catch (d) {
925
- i.error("Error parsing state for key:", c, d), l = !0;
926
- }
927
- else
928
- i.debug("no item in storage for key:", c), l = !0;
929
- l && (i.debug("removed item for key:", c), t.remove(c));
930
- }
931
- }
932
- }, ae = class V extends W {
933
- constructor(t) {
934
- super(t), this.code_verifier = t.code_verifier, this.code_challenge = t.code_challenge, this.authority = t.authority, this.client_id = t.client_id, this.redirect_uri = t.redirect_uri, this.scope = t.scope, this.client_secret = t.client_secret, this.extraTokenParams = t.extraTokenParams, this.response_mode = t.response_mode, this.skipUserInfo = t.skipUserInfo;
935
- }
936
- static async create(t) {
937
- const s = t.code_verifier === !0 ? f.generateCodeVerifier() : t.code_verifier || void 0, i = s ? await f.generateCodeChallenge(s) : void 0;
938
- return new V({
939
- ...t,
940
- code_verifier: s,
941
- code_challenge: i
942
- });
943
- }
944
- toStorageString() {
945
- return new g("SigninState").create("toStorageString"), JSON.stringify({
946
- id: this.id,
947
- data: this.data,
948
- created: this.created,
949
- request_type: this.request_type,
950
- url_state: this.url_state,
951
- code_verifier: this.code_verifier,
952
- authority: this.authority,
953
- client_id: this.client_id,
954
- redirect_uri: this.redirect_uri,
955
- scope: this.scope,
956
- client_secret: this.client_secret,
957
- extraTokenParams: this.extraTokenParams,
958
- response_mode: this.response_mode,
959
- skipUserInfo: this.skipUserInfo
960
1881
  });
961
- }
962
- static fromStorageString(t) {
963
- g.createStatic("SigninState", "fromStorageString");
964
- const s = JSON.parse(t);
965
- return V.create(s);
966
- }
967
- }, ce = class le {
968
- constructor(t) {
969
- this.url = t.url, this.state = t.state;
970
- }
971
- static async create({
972
- // mandatory
973
- url: t,
974
- authority: s,
975
- client_id: i,
976
- redirect_uri: r,
977
- response_type: o,
978
- scope: n,
979
- // optional
980
- state_data: c,
981
- response_mode: a,
982
- request_type: l,
983
- client_secret: d,
984
- nonce: h,
985
- url_state: u,
986
- resource: p,
987
- skipUserInfo: x,
988
- extraQueryParams: C,
989
- extraTokenParams: U,
990
- disablePKCE: A,
991
- dpopJkt: R,
992
- omitScopeWhenRequesting: P,
993
- ...O
994
- }) {
995
- if (!t)
996
- throw this._logger.error("create: No url passed"), new Error("url");
997
- if (!i)
998
- throw this._logger.error("create: No client_id passed"), new Error("client_id");
999
- if (!r)
1000
- throw this._logger.error("create: No redirect_uri passed"), new Error("redirect_uri");
1001
- if (!o)
1002
- throw this._logger.error("create: No response_type passed"), new Error("response_type");
1003
- if (!n)
1004
- throw this._logger.error("create: No scope passed"), new Error("scope");
1005
- if (!s)
1006
- throw this._logger.error("create: No authority passed"), new Error("authority");
1007
- const m = await ae.create({
1008
- data: c,
1009
- request_type: l,
1010
- url_state: u,
1011
- code_verifier: !A,
1012
- client_id: i,
1013
- authority: s,
1014
- redirect_uri: r,
1015
- response_mode: a,
1016
- client_secret: d,
1017
- scope: n,
1018
- extraTokenParams: U,
1019
- skipUserInfo: x
1020
- }), _ = new URL(t);
1021
- _.searchParams.append("client_id", i), _.searchParams.append("redirect_uri", r), _.searchParams.append("response_type", o), P || _.searchParams.append("scope", n), h && _.searchParams.append("nonce", h), R && _.searchParams.append("dpop_jkt", R);
1022
- let E = m.id;
1023
- u && (E = `${E}${N}${u}`), _.searchParams.append("state", E), m.code_challenge && (_.searchParams.append("code_challenge", m.code_challenge), _.searchParams.append("code_challenge_method", "S256")), p && (Array.isArray(p) ? p : [p]).forEach((w) => _.searchParams.append("resource", w));
1024
- for (const [S, w] of Object.entries({ response_mode: a, ...O, ...C }))
1025
- w != null && _.searchParams.append(S, w.toString());
1026
- return new le({
1027
- url: _.href,
1028
- state: m
1029
- });
1030
- }
1031
- };
1032
- ce._logger = new g("SigninRequest");
1033
- var Me = ce, je = "openid", $ = class {
1034
- constructor(e) {
1035
- if (this.access_token = "", this.token_type = "", this.profile = {}, this.state = e.get("state"), this.session_state = e.get("session_state"), this.state) {
1036
- const t = decodeURIComponent(this.state).split(N);
1037
- this.state = t[0], t.length > 1 && (this.url_state = t.slice(1).join(N));
1038
- }
1039
- this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri"), this.code = e.get("code");
1040
- }
1041
- get expires_in() {
1042
- if (this.expires_at !== void 0)
1043
- return this.expires_at - T.getEpochTime();
1044
- }
1045
- set expires_in(e) {
1046
- typeof e == "string" && (e = Number(e)), e !== void 0 && e >= 0 && (this.expires_at = Math.floor(e) + T.getEpochTime());
1047
- }
1048
- get isOpenId() {
1049
- var e;
1050
- return ((e = this.scope) == null ? void 0 : e.split(" ").includes(je)) || !!this.id_token;
1051
- }
1052
- }, He = class {
1053
- constructor({
1054
- url: e,
1055
- state_data: t,
1056
- id_token_hint: s,
1057
- post_logout_redirect_uri: i,
1058
- extraQueryParams: r,
1059
- request_type: o,
1060
- client_id: n,
1061
- url_state: c
1062
- }) {
1063
- if (this._logger = new g("SignoutRequest"), !e)
1064
- throw this._logger.error("ctor: No url passed"), new Error("url");
1065
- const a = new URL(e);
1066
- if (s && a.searchParams.append("id_token_hint", s), n && a.searchParams.append("client_id", n), i && (a.searchParams.append("post_logout_redirect_uri", i), t || c)) {
1067
- this.state = new W({ data: t, request_type: o, url_state: c });
1068
- let l = this.state.id;
1069
- c && (l = `${l}${N}${c}`), a.searchParams.append("state", l);
1882
+ var N = {
1883
+ iMonths: "محرم_صفر_ربيع الأول_ربيع الثاني_جمادى الأولى_جمادى الآخرة_رجب_شعبان_رمضان_شوال_ذو القعدة_ذو الحجة".split("_"),
1884
+ iMonthsShort: "محرم_صفر_ربيع ١_ربيع ٢_جمادى ١_جمادى ٢_رجب_شعبان_رمضان_شوال_ذو القعدة_ذو الحجة".split("_")
1885
+ };
1886
+ if (typeof h.updateLocale == "function")
1887
+ h.updateLocale("ar-sa", N);
1888
+ else {
1889
+ var $ = h.locale();
1890
+ h.defineLocale("ar-sa", N), h.locale($);
1070
1891
  }
1071
- for (const [l, d] of Object.entries({ ...r }))
1072
- d != null && a.searchParams.append(l, d.toString());
1073
- this.url = a.href;
1074
- }
1075
- }, De = class {
1076
- constructor(e) {
1077
- if (this.state = e.get("state"), this.state) {
1078
- const t = decodeURIComponent(this.state).split(N);
1079
- this.state = t[0], t.length > 1 && (this.url_state = t.slice(1).join(N));
1892
+ function B(e) {
1893
+ var t = e.match(w), i = t.length, r;
1894
+ for (r = 0; r < i; r += 1)
1895
+ l[t[r]] && (t[r] = l[t[r]]);
1896
+ return function(a) {
1897
+ var n = "";
1898
+ for (r = 0; r < i; r += 1)
1899
+ n += t[r] instanceof Function ? "[" + t[r].call(a, e) + "]" : t[r];
1900
+ return n;
1901
+ };
1080
1902
  }
1081
- this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri");
1082
- }
1083
- }, We = [
1084
- "nbf",
1085
- "jti",
1086
- "auth_time",
1087
- "nonce",
1088
- "acr",
1089
- "amr",
1090
- "azp",
1091
- "at_hash"
1092
- // https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken
1093
- ], $e = ["sub", "iss", "aud", "exp", "iat"], Je = class {
1094
- constructor(e) {
1095
- this._settings = e, this._logger = new g("ClaimsService");
1096
- }
1097
- filterProtocolClaims(e) {
1098
- const t = { ...e };
1099
- if (this._settings.filterProtocolClaims) {
1100
- let s;
1101
- Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = We;
1102
- for (const i of s)
1103
- $e.includes(i) || delete t[i];
1903
+ function W(e, t) {
1904
+ switch (e) {
1905
+ case "iDDDD":
1906
+ return O;
1907
+ case "iYYYY":
1908
+ return x;
1909
+ case "iYYYYY":
1910
+ return b;
1911
+ case "iDDD":
1912
+ return S;
1913
+ case "iMMM":
1914
+ case "iMMMM":
1915
+ return j;
1916
+ case "iMM":
1917
+ case "iDD":
1918
+ case "iYY":
1919
+ case "iM":
1920
+ case "iD":
1921
+ return v;
1922
+ case "DDDD":
1923
+ return O;
1924
+ case "YYYY":
1925
+ return x;
1926
+ case "YYYYY":
1927
+ return b;
1928
+ case "S":
1929
+ case "SS":
1930
+ case "SSS":
1931
+ case "DDD":
1932
+ return S;
1933
+ case "MMM":
1934
+ case "MMMM":
1935
+ case "dd":
1936
+ case "ddd":
1937
+ case "dddd":
1938
+ return j;
1939
+ case "a":
1940
+ case "A":
1941
+ return h.localeData(t._l)._meridiemParse;
1942
+ case "X":
1943
+ return E;
1944
+ case "Z":
1945
+ case "ZZ":
1946
+ return G;
1947
+ case "T":
1948
+ return z;
1949
+ case "MM":
1950
+ case "DD":
1951
+ case "YY":
1952
+ case "HH":
1953
+ case "hh":
1954
+ case "mm":
1955
+ case "ss":
1956
+ case "M":
1957
+ case "D":
1958
+ case "d":
1959
+ case "H":
1960
+ case "h":
1961
+ case "m":
1962
+ case "s":
1963
+ return v;
1964
+ default:
1965
+ return new RegExp(e.replace("\\", ""));
1966
+ }
1104
1967
  }
1105
- return t;
1106
- }
1107
- mergeClaims(e, t) {
1108
- const s = { ...e };
1109
- for (const [i, r] of Object.entries(t))
1110
- if (s[i] !== r)
1111
- if (Array.isArray(s[i]) || Array.isArray(r))
1112
- if (this._settings.mergeClaimsStrategy.array == "replace")
1113
- s[i] = r;
1114
- else {
1115
- const o = Array.isArray(s[i]) ? s[i] : [s[i]];
1116
- for (const n of Array.isArray(r) ? r : [r])
1117
- o.includes(n) || o.push(n);
1118
- s[i] = o;
1119
- }
1120
- else
1121
- typeof s[i] == "object" && typeof r == "object" ? s[i] = this.mergeClaims(s[i], r) : s[i] = r;
1122
- return s;
1123
- }
1124
- }, de = class {
1125
- constructor(e, t) {
1126
- this.keys = e, this.nonce = t;
1127
- }
1128
- }, Ke = class {
1129
- constructor(e, t) {
1130
- this._logger = new g("OidcClient"), this.settings = e instanceof z ? e : new z(e), this.metadataService = t ?? new xe(this.settings), this._claimsService = new Je(this.settings), this._validator = new Ne(this.settings, this.metadataService, this._claimsService), this._tokenClient = new oe(this.settings, this.metadataService);
1131
- }
1132
- async createSigninRequest({
1133
- state: e,
1134
- request: t,
1135
- request_uri: s,
1136
- request_type: i,
1137
- id_token_hint: r,
1138
- login_hint: o,
1139
- skipUserInfo: n,
1140
- nonce: c,
1141
- url_state: a,
1142
- response_type: l = this.settings.response_type,
1143
- scope: d = this.settings.scope,
1144
- redirect_uri: h = this.settings.redirect_uri,
1145
- prompt: u = this.settings.prompt,
1146
- display: p = this.settings.display,
1147
- max_age: x = this.settings.max_age,
1148
- ui_locales: C = this.settings.ui_locales,
1149
- acr_values: U = this.settings.acr_values,
1150
- resource: A = this.settings.resource,
1151
- response_mode: R = this.settings.response_mode,
1152
- extraQueryParams: P = this.settings.extraQueryParams,
1153
- extraTokenParams: O = this.settings.extraTokenParams,
1154
- dpopJkt: m,
1155
- omitScopeWhenRequesting: _ = this.settings.omitScopeWhenRequesting
1156
- }) {
1157
- const E = this._logger.create("createSigninRequest");
1158
- if (l !== "code")
1159
- throw new Error("Only the Authorization Code flow (with PKCE) is supported");
1160
- const S = await this.metadataService.getAuthorizationEndpoint();
1161
- E.debug("Received authorization endpoint", S);
1162
- const w = await Me.create({
1163
- url: S,
1164
- authority: this.settings.authority,
1165
- client_id: this.settings.client_id,
1166
- redirect_uri: h,
1167
- response_type: l,
1168
- scope: d,
1169
- state_data: e,
1170
- url_state: a,
1171
- prompt: u,
1172
- display: p,
1173
- max_age: x,
1174
- ui_locales: C,
1175
- id_token_hint: r,
1176
- login_hint: o,
1177
- acr_values: U,
1178
- dpopJkt: m,
1179
- resource: A,
1180
- request: t,
1181
- request_uri: s,
1182
- extraQueryParams: P,
1183
- extraTokenParams: O,
1184
- request_type: i,
1185
- response_mode: R,
1186
- client_secret: this.settings.client_secret,
1187
- skipUserInfo: n,
1188
- nonce: c,
1189
- disablePKCE: this.settings.disablePKCE,
1190
- omitScopeWhenRequesting: _
1191
- });
1192
- await this.clearStaleState();
1193
- const M = w.state;
1194
- return await this.settings.stateStore.set(M.id, M.toStorageString()), w;
1195
- }
1196
- async readSigninResponseState(e, t = !1) {
1197
- const s = this._logger.create("readSigninResponseState"), i = new $(F.readParams(e, this.settings.response_mode));
1198
- if (!i.state)
1199
- throw s.throw(new Error("No state in response")), null;
1200
- const r = await this.settings.stateStore[t ? "remove" : "get"](i.state);
1201
- if (!r)
1202
- throw s.throw(new Error("No matching state found in storage")), null;
1203
- return { state: await ae.fromStorageString(r), response: i };
1204
- }
1205
- async processSigninResponse(e, t, s = !0) {
1206
- const i = this._logger.create("processSigninResponse"), { state: r, response: o } = await this.readSigninResponseState(e, s);
1207
- if (i.debug("received state from storage; validating response"), this.settings.dpop && this.settings.dpop.store) {
1208
- const n = await this.getDpopProof(this.settings.dpop.store);
1209
- t = { ...t, DPoP: n };
1968
+ function Q(e, t, i) {
1969
+ var r, a = i._a;
1970
+ switch (e) {
1971
+ case "iM":
1972
+ case "iMM":
1973
+ a[1] = t == null ? 0 : ~~t - 1;
1974
+ break;
1975
+ case "iMMM":
1976
+ case "iMMMM":
1977
+ r = h.localeData(i._l).iMonthsParse(t), r != null ? a[1] = r : i._isValid = !1;
1978
+ break;
1979
+ case "iD":
1980
+ case "iDD":
1981
+ case "iDDD":
1982
+ case "iDDDD":
1983
+ t != null && (a[2] = ~~t);
1984
+ break;
1985
+ case "iYY":
1986
+ a[0] = ~~t + (~~t > 47 ? 1300 : 1400);
1987
+ break;
1988
+ case "iYYYY":
1989
+ case "iYYYYY":
1990
+ a[0] = ~~t;
1991
+ }
1992
+ t == null && (i._isValid = !1);
1210
1993
  }
1211
- try {
1212
- await this._validator.validateSigninResponse(o, r, t);
1213
- } catch (n) {
1214
- if (n instanceof L && this.settings.dpop) {
1215
- const c = await this.getDpopProof(this.settings.dpop.store, n.nonce);
1216
- t.DPoP = c, await this._validator.validateSigninResponse(o, r, t);
1217
- } else
1218
- throw n;
1994
+ function X(e) {
1995
+ var t, i, r = e._a[0], a = e._a[1], n = e._a[2];
1996
+ return r == null && a == null && n == null ? [0, 0, 1] : (r = r || 0, a = a || 0, n = n || 1, (n < 1 || n > s.iDaysInMonth(r, a)) && (e._isValid = !1), t = g(r, a, n), i = Y(t.gy, t.gm, t.gd), e._hDiff = 0, ~~i.hy !== r && (e._hDiff += 1), ~~i.hm !== a && (e._hDiff += 1), ~~i.hd !== n && (e._hDiff += 1), [t.gy, t.gm, t.gd]);
1219
1997
  }
1220
- return o;
1221
- }
1222
- async getDpopProof(e, t) {
1223
- let s, i;
1224
- return (await e.getAllKeys()).includes(this.settings.client_id) ? (i = await e.get(this.settings.client_id), i.nonce !== t && t && (i.nonce = t, await e.set(this.settings.client_id, i))) : (s = await f.generateDPoPKeys(), i = new de(s, t), await e.set(this.settings.client_id, i)), await f.generateDPoPProof({
1225
- url: await this.metadataService.getTokenEndpoint(!1),
1226
- httpMethod: "POST",
1227
- keyPair: i.keys,
1228
- nonce: i.nonce
1229
- });
1230
- }
1231
- async processResourceOwnerPasswordCredentials({
1232
- username: e,
1233
- password: t,
1234
- skipUserInfo: s = !1,
1235
- extraTokenParams: i = {}
1236
- }) {
1237
- const r = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...i }), o = new $(new URLSearchParams());
1238
- return Object.assign(o, r), await this._validator.validateCredentialsResponse(o, s), o;
1239
- }
1240
- async useRefreshToken({
1241
- state: e,
1242
- redirect_uri: t,
1243
- resource: s,
1244
- timeoutInSeconds: i,
1245
- extraHeaders: r,
1246
- extraTokenParams: o
1247
- }) {
1248
- var n;
1249
- const c = this._logger.create("useRefreshToken");
1250
- let a;
1251
- if (this.settings.refreshTokenAllowedScope === void 0)
1252
- a = e.scope;
1253
- else {
1254
- const h = this.settings.refreshTokenAllowedScope.split(" ");
1255
- a = (((n = e.scope) == null ? void 0 : n.split(" ")) || []).filter((p) => h.includes(p)).join(" ");
1998
+ function K(e) {
1999
+ var t = e._f.match(w), i = e._i, r = t.length, a, n, o;
2000
+ for (e._a = [], a = 0; a < r; a += 1)
2001
+ n = t[a], o = (W(n, e).exec(i) || [])[0], o && (i = i.slice(i.indexOf(o) + o.length)), l[n] && Q(n, o, e);
2002
+ return i && (e._il = i), X(e);
1256
2003
  }
1257
- if (this.settings.dpop && this.settings.dpop.store) {
1258
- const h = await this.getDpopProof(this.settings.dpop.store);
1259
- r = { ...r, DPoP: h };
2004
+ function e3(e, t) {
2005
+ var i = e._f.length, r, a, n, o, f, c;
2006
+ if (i === 0)
2007
+ return k(/* @__PURE__ */ new Date(NaN));
2008
+ for (r = 0; r < i; r += 1)
2009
+ a = e._f[r], f = 0, n = k(e._i, a, e._l, t), n.isValid() && (f += n._hDiff, n._il && (f += n._il.length), (c == null || f < c) && (c = f, o = n));
2010
+ return o;
1260
2011
  }
1261
- let l;
1262
- try {
1263
- l = await this._tokenClient.exchangeRefreshToken({
1264
- refresh_token: e.refresh_token,
1265
- // provide the (possible filtered) scope list
1266
- scope: a,
1267
- redirect_uri: t,
1268
- resource: s,
1269
- timeoutInSeconds: i,
1270
- extraHeaders: r,
1271
- ...o
1272
- });
1273
- } catch (h) {
1274
- if (h instanceof L && this.settings.dpop)
1275
- r.DPoP = await this.getDpopProof(this.settings.dpop.store, h.nonce), l = await this._tokenClient.exchangeRefreshToken({
1276
- refresh_token: e.refresh_token,
1277
- // provide the (possible filtered) scope list
1278
- scope: a,
1279
- redirect_uri: t,
1280
- resource: s,
1281
- timeoutInSeconds: i,
1282
- extraHeaders: r,
1283
- ...o
1284
- });
1285
- else
1286
- throw h;
2012
+ function t3(e) {
2013
+ var t = e._i, i = "", r = "", a = e._f.match(w), n = a.length, o, f, c;
2014
+ for (o = 0; o < n; o += 1)
2015
+ f = a[o], c = (W(f, e).exec(t) || [])[0], c && (t = t.slice(t.indexOf(c) + c.length)), l[f] instanceof Function || (r += f, c && (i += c));
2016
+ e._i = i, e._f = r;
1287
2017
  }
1288
- const d = new $(new URLSearchParams());
1289
- return Object.assign(d, l), c.debug("validating response", d), await this._validator.validateRefreshResponse(d, {
1290
- ...e,
1291
- // override the scope in the state handed over to the validator
1292
- // so it can set the granted scope to the requested scope in case none is included in the response
1293
- scope: a
1294
- }), d;
1295
- }
1296
- async createSignoutRequest({
1297
- state: e,
1298
- id_token_hint: t,
1299
- client_id: s,
1300
- request_type: i,
1301
- url_state: r,
1302
- post_logout_redirect_uri: o = this.settings.post_logout_redirect_uri,
1303
- extraQueryParams: n = this.settings.extraQueryParams
1304
- } = {}) {
1305
- const c = this._logger.create("createSignoutRequest"), a = await this.metadataService.getEndSessionEndpoint();
1306
- if (!a)
1307
- throw c.throw(new Error("No end session endpoint")), null;
1308
- c.debug("Received end session endpoint", a), !s && o && !t && (s = this.settings.client_id);
1309
- const l = new He({
1310
- url: a,
1311
- id_token_hint: t,
1312
- client_id: s,
1313
- post_logout_redirect_uri: o,
1314
- state_data: e,
1315
- extraQueryParams: n,
1316
- request_type: i,
1317
- url_state: r
1318
- });
1319
- await this.clearStaleState();
1320
- const d = l.state;
1321
- return d && (c.debug("Signout request has state to persist"), await this.settings.stateStore.set(d.id, d.toStorageString())), l;
1322
- }
1323
- async readSignoutResponseState(e, t = !1) {
1324
- const s = this._logger.create("readSignoutResponseState"), i = new De(F.readParams(e, this.settings.response_mode));
1325
- if (!i.state) {
1326
- if (s.debug("No state in response"), i.error)
1327
- throw s.warn("Response was error:", i.error), new q(i);
1328
- return { state: void 0, response: i };
2018
+ function R(e, t, i) {
2019
+ var r = i - t, a = i - e.day(), n;
2020
+ return a > r && (a -= 7), a < r - 7 && (a += 7), n = s(e).add(a, "d"), {
2021
+ week: Math.ceil(n.iDayOfYear() / 7),
2022
+ year: n.iYear()
2023
+ };
1329
2024
  }
1330
- const r = await this.settings.stateStore[t ? "remove" : "get"](i.state);
1331
- if (!r)
1332
- throw s.throw(new Error("No matching state found in storage")), null;
1333
- return { state: await W.fromStorageString(r), response: i };
1334
- }
1335
- async processSignoutResponse(e) {
1336
- const t = this._logger.create("processSignoutResponse"), { state: s, response: i } = await this.readSignoutResponseState(e, !0);
1337
- return s ? (t.debug("Received state from storage; validating response"), this._validator.validateSignoutResponse(i, s)) : t.debug("No state from storage; skipping response validation"), i;
1338
- }
1339
- clearStaleState() {
1340
- return this._logger.create("clearStaleState"), W.clearStaleState(this.settings.stateStore, this.settings.staleStateAgeInSeconds);
1341
- }
1342
- async revokeToken(e, t) {
1343
- return this._logger.create("revokeToken"), await this._tokenClient.revoke({
1344
- token: e,
1345
- token_type_hint: t
1346
- });
1347
- }
1348
- }, Fe = class {
1349
- constructor(e) {
1350
- this._userManager = e, this._logger = new g("SessionMonitor"), this._start = async (t) => {
1351
- const s = t.session_state;
1352
- if (!s)
1353
- return;
1354
- const i = this._logger.create("_start");
1355
- if (t.profile ? (this._sub = t.profile.sub, i.debug("session_state", s, ", sub", this._sub)) : (this._sub = void 0, i.debug("session_state", s, ", anonymous user")), this._checkSessionIFrame) {
1356
- this._checkSessionIFrame.start(s);
1357
- return;
1358
- }
1359
- try {
1360
- const r = await this._userManager.metadataService.getCheckSessionIframe();
1361
- if (r) {
1362
- i.debug("initializing check session iframe");
1363
- const o = this._userManager.settings.client_id, n = this._userManager.settings.checkSessionIntervalInSeconds, c = this._userManager.settings.stopCheckSessionOnError, a = new Ie(this._callback, o, r, n, c);
1364
- await a.load(), this._checkSessionIFrame = a, a.start(s);
1365
- } else
1366
- i.warn("no check session iframe found in the metadata");
1367
- } catch (r) {
1368
- i.error("Error from getCheckSessionIframe:", r instanceof Error ? r.message : r);
1369
- }
1370
- }, this._stop = () => {
1371
- const t = this._logger.create("_stop");
1372
- if (this._sub = void 0, this._checkSessionIFrame && this._checkSessionIFrame.stop(), this._userManager.settings.monitorAnonymousSession) {
1373
- const s = setInterval(async () => {
1374
- clearInterval(s);
1375
- try {
1376
- const i = await this._userManager.querySessionStatus();
1377
- if (i) {
1378
- const r = {
1379
- session_state: i.session_state,
1380
- profile: i.sub ? {
1381
- sub: i.sub
1382
- } : null
1383
- };
1384
- this._start(r);
1385
- }
1386
- } catch (i) {
1387
- t.error("error from querySessionStatus", i instanceof Error ? i.message : i);
1388
- }
1389
- }, 1e3);
1390
- }
1391
- }, this._callback = async () => {
1392
- const t = this._logger.create("_callback");
1393
- try {
1394
- const s = await this._userManager.querySessionStatus();
1395
- let i = !0;
1396
- s && this._checkSessionIFrame ? s.sub === this._sub ? (i = !1, this._checkSessionIFrame.start(s.session_state), t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state", s.session_state), await this._userManager.events._raiseUserSessionChanged()) : t.debug("different subject signed into OP", s.sub) : t.debug("subject no longer signed into OP"), i ? this._sub ? await this._userManager.events._raiseUserSignedOut() : await this._userManager.events._raiseUserSignedIn() : t.debug("no change in session detected, no event to raise");
1397
- } catch (s) {
1398
- this._sub && (t.debug("Error calling queryCurrentSigninSession; raising signed out event", s), await this._userManager.events._raiseUserSignedOut());
1399
- }
1400
- }, e || this._logger.throw(new Error("No user manager passed")), this._userManager.events.addUserLoaded(this._start), this._userManager.events.addUserUnloaded(this._stop), this._init().catch((t) => {
1401
- this._logger.error(t);
1402
- });
1403
- }
1404
- async _init() {
1405
- this._logger.create("_init");
1406
- const e = await this._userManager.getUser();
1407
- if (e)
1408
- this._start(e);
1409
- else if (this._userManager.settings.monitorAnonymousSession) {
1410
- const t = await this._userManager.querySessionStatus();
2025
+ function k(e, t, i, r) {
2026
+ var a = {
2027
+ _i: e,
2028
+ _f: t,
2029
+ _l: i
2030
+ }, n, o, f;
1411
2031
  if (t) {
1412
- const s = {
1413
- session_state: t.session_state,
1414
- profile: t.sub ? {
1415
- sub: t.sub
1416
- } : null
1417
- };
1418
- this._start(s);
2032
+ if (V(t))
2033
+ return e3(a, r);
2034
+ n = K(a), t3(a), t = "YYYY-MM-DD-" + a._f, e = d(n[0], 4) + "-" + d(n[1] + 1, 2) + "-" + d(n[2], 2) + "-" + a._i;
1419
2035
  }
2036
+ return r ? o = h.utc(e, t, i) : o = h(e, t, i), a._isValid === !1 && (o._isValid = !1), o._hDiff = a._hDiff || 0, f = H(s.fn), p(f, o), f;
1420
2037
  }
1421
- }
1422
- }, J = class he {
1423
- constructor(t) {
1424
- var s;
1425
- this.id_token = t.id_token, this.session_state = (s = t.session_state) != null ? s : null, this.access_token = t.access_token, this.refresh_token = t.refresh_token, this.token_type = t.token_type, this.scope = t.scope, this.profile = t.profile, this.expires_at = t.expires_at, this.state = t.userState, this.url_state = t.url_state;
1426
- }
1427
- /** Computed number of seconds the access token has remaining. */
1428
- get expires_in() {
1429
- if (this.expires_at !== void 0)
1430
- return this.expires_at - T.getEpochTime();
1431
- }
1432
- set expires_in(t) {
1433
- t !== void 0 && (this.expires_at = Math.floor(t) + T.getEpochTime());
1434
- }
1435
- /** Computed value indicating if the access token is expired. */
1436
- get expired() {
1437
- const t = this.expires_in;
1438
- if (t !== void 0)
1439
- return t <= 0;
1440
- }
1441
- /** Array representing the parsed values from the `scope`. */
1442
- get scopes() {
1443
- var t, s;
1444
- return (s = (t = this.scope) == null ? void 0 : t.split(" ")) != null ? s : [];
1445
- }
1446
- toStorageString() {
1447
- return new g("User").create("toStorageString"), JSON.stringify({
1448
- id_token: this.id_token,
1449
- session_state: this.session_state,
1450
- access_token: this.access_token,
1451
- refresh_token: this.refresh_token,
1452
- token_type: this.token_type,
1453
- scope: this.scope,
1454
- profile: this.profile,
1455
- expires_at: this.expires_at
1456
- });
1457
- }
1458
- static fromStorageString(t) {
1459
- return g.createStatic("User", "fromStorageString"), new he(JSON.parse(t));
1460
- }
1461
- }, ee = "oidc-client", ge = class {
1462
- constructor() {
1463
- this._abort = new I("Window navigation aborted"), this._disposeHandlers = /* @__PURE__ */ new Set(), this._window = null;
1464
- }
1465
- async navigate(e) {
1466
- const t = this._logger.create("navigate");
1467
- if (!this._window)
1468
- throw new Error("Attempted to navigate on a disposed window");
1469
- t.debug("setting URL in window"), this._window.location.replace(e.url);
1470
- const { url: s, keepOpen: i } = await new Promise((r, o) => {
1471
- const n = (c) => {
1472
- var a;
1473
- const l = c.data, d = (a = e.scriptOrigin) != null ? a : window.location.origin;
1474
- if (!(c.origin !== d || (l == null ? void 0 : l.source) !== ee)) {
1475
- try {
1476
- const h = F.readParams(l.url, e.response_mode).get("state");
1477
- if (h || t.warn("no state found in response url"), c.source !== this._window && h !== e.state)
1478
- return;
1479
- } catch {
1480
- this._dispose(), o(new Error("Invalid response from window"));
1481
- }
1482
- r(l);
1483
- }
1484
- };
1485
- window.addEventListener("message", n, !1), this._disposeHandlers.add(() => window.removeEventListener("message", n, !1)), this._disposeHandlers.add(this._abort.addHandler((c) => {
1486
- this._dispose(), o(c);
1487
- }));
1488
- });
1489
- return t.debug("got response from window"), this._dispose(), i || this.close(), { url: s };
1490
- }
1491
- _dispose() {
1492
- this._logger.create("_dispose");
1493
- for (const e of this._disposeHandlers)
1494
- e();
1495
- this._disposeHandlers.clear();
1496
- }
1497
- static _notifyParent(e, t, s = !1, i = window.location.origin) {
1498
- e.postMessage({
1499
- source: ee,
1500
- url: t,
1501
- keepOpen: s
1502
- }, i);
1503
- }
1504
- }, ue = {
1505
- location: !1,
1506
- toolbar: !1,
1507
- height: 640,
1508
- closePopupWindowAfterInSeconds: -1
1509
- }, _e = "_blank", Le = 60, ze = 2, pe = 10, Be = class extends z {
1510
- constructor(e) {
1511
- const {
1512
- popup_redirect_uri: t = e.redirect_uri,
1513
- popup_post_logout_redirect_uri: s = e.post_logout_redirect_uri,
1514
- popupWindowFeatures: i = ue,
1515
- popupWindowTarget: r = _e,
1516
- redirectMethod: o = "assign",
1517
- redirectTarget: n = "self",
1518
- iframeNotifyParentOrigin: c = e.iframeNotifyParentOrigin,
1519
- iframeScriptOrigin: a = e.iframeScriptOrigin,
1520
- requestTimeoutInSeconds: l,
1521
- silent_redirect_uri: d = e.redirect_uri,
1522
- silentRequestTimeoutInSeconds: h,
1523
- automaticSilentRenew: u = !0,
1524
- validateSubOnSilentRenew: p = !0,
1525
- includeIdTokenInSilentRenew: x = !1,
1526
- monitorSession: C = !1,
1527
- monitorAnonymousSession: U = !1,
1528
- checkSessionIntervalInSeconds: A = ze,
1529
- query_status_response_type: R = "code",
1530
- stopCheckSessionOnError: P = !0,
1531
- revokeTokenTypes: O = ["access_token", "refresh_token"],
1532
- revokeTokensOnSignout: m = !1,
1533
- includeIdTokenInSilentSignout: _ = !1,
1534
- accessTokenExpiringNotificationTimeInSeconds: E = Le,
1535
- userStore: S
1536
- } = e;
1537
- if (super(e), this.popup_redirect_uri = t, this.popup_post_logout_redirect_uri = s, this.popupWindowFeatures = i, this.popupWindowTarget = r, this.redirectMethod = o, this.redirectTarget = n, this.iframeNotifyParentOrigin = c, this.iframeScriptOrigin = a, this.silent_redirect_uri = d, this.silentRequestTimeoutInSeconds = h || l || pe, this.automaticSilentRenew = u, this.validateSubOnSilentRenew = p, this.includeIdTokenInSilentRenew = x, this.monitorSession = C, this.monitorAnonymousSession = U, this.checkSessionIntervalInSeconds = A, this.stopCheckSessionOnError = P, this.query_status_response_type = R, this.revokeTokenTypes = O, this.revokeTokensOnSignout = m, this.includeIdTokenInSilentSignout = _, this.accessTokenExpiringNotificationTimeInSeconds = E, S)
1538
- this.userStore = S;
1539
- else {
1540
- const w = typeof window < "u" ? window.sessionStorage : new re();
1541
- this.userStore = new ne({ store: w });
2038
+ function s(e, t, i) {
2039
+ return k(e, t, i, !1);
1542
2040
  }
1543
- }
1544
- }, te = class fe extends ge {
1545
- constructor({
1546
- silentRequestTimeoutInSeconds: t = pe
1547
- }) {
1548
- super(), this._logger = new g("IFrameWindow"), this._timeoutInSeconds = t, this._frame = fe.createHiddenIframe(), this._window = this._frame.contentWindow;
1549
- }
1550
- static createHiddenIframe() {
1551
- const t = window.document.createElement("iframe");
1552
- return t.style.visibility = "hidden", t.style.position = "fixed", t.style.left = "-1000px", t.style.top = "0", t.width = "0", t.height = "0", window.document.body.appendChild(t), t;
1553
- }
1554
- async navigate(t) {
1555
- this._logger.debug("navigate: Using timeout of:", this._timeoutInSeconds);
1556
- const s = setTimeout(() => void this._abort.raise(new G("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
1557
- return this._disposeHandlers.add(() => clearTimeout(s)), await super.navigate(t);
1558
- }
1559
- close() {
1560
- var t;
1561
- this._frame && (this._frame.parentNode && (this._frame.addEventListener("load", (s) => {
1562
- var i;
1563
- const r = s.target;
1564
- (i = r.parentNode) == null || i.removeChild(r), this._abort.raise(new Error("IFrame removed from DOM"));
1565
- }, !0), (t = this._frame.contentWindow) == null || t.location.replace("about:blank")), this._frame = null), this._window = null;
1566
- }
1567
- static notifyParent(t, s) {
1568
- return super._notifyParent(window.parent, t, !1, s);
1569
- }
1570
- }, Ve = class {
1571
- constructor(e) {
1572
- this._settings = e, this._logger = new g("IFrameNavigator");
1573
- }
1574
- async prepare({
1575
- silentRequestTimeoutInSeconds: e = this._settings.silentRequestTimeoutInSeconds
1576
- }) {
1577
- return new te({ silentRequestTimeoutInSeconds: e });
1578
- }
1579
- async callback(e) {
1580
- this._logger.create("callback"), te.notifyParent(e, this._settings.iframeNotifyParentOrigin);
1581
- }
1582
- }, Ge = 500, Qe = 1e3, se = class extends ge {
1583
- constructor({
1584
- popupWindowTarget: e = _e,
1585
- popupWindowFeatures: t = {},
1586
- popupSignal: s
1587
- }) {
1588
- super(), this._logger = new g("PopupWindow");
1589
- const i = Z.center({ ...ue, ...t });
1590
- this._window = window.open(void 0, e, Z.serialize(i)), s && s.addEventListener("abort", () => {
1591
- var r;
1592
- this._abort.raise(new Error((r = s.reason) != null ? r : "Popup aborted"));
1593
- }), t.closePopupWindowAfterInSeconds && t.closePopupWindowAfterInSeconds > 0 && setTimeout(() => {
1594
- if (!this._window || typeof this._window.closed != "boolean" || this._window.closed) {
1595
- this._abort.raise(new Error("Popup blocked by user"));
1596
- return;
1597
- }
1598
- this.close();
1599
- }, t.closePopupWindowAfterInSeconds * Qe);
1600
- }
1601
- async navigate(e) {
1602
- var t;
1603
- (t = this._window) == null || t.focus();
1604
- const s = setInterval(() => {
1605
- (!this._window || this._window.closed) && this._abort.raise(new Error("Popup closed by user"));
1606
- }, Ge);
1607
- return this._disposeHandlers.add(() => clearInterval(s)), await super.navigate(e);
1608
- }
1609
- close() {
1610
- this._window && (this._window.closed || (this._window.close(), this._abort.raise(new Error("Popup closed")))), this._window = null;
1611
- }
1612
- static notifyOpener(e, t) {
1613
- if (!window.opener)
1614
- throw new Error("No window.opener. Can't complete notification.");
1615
- return super._notifyParent(window.opener, e, t);
1616
- }
1617
- }, Xe = class {
1618
- constructor(e) {
1619
- this._settings = e, this._logger = new g("PopupNavigator");
1620
- }
1621
- async prepare({
1622
- popupWindowFeatures: e = this._settings.popupWindowFeatures,
1623
- popupWindowTarget: t = this._settings.popupWindowTarget,
1624
- popupSignal: s
1625
- }) {
1626
- return new se({ popupWindowFeatures: e, popupWindowTarget: t, popupSignal: s });
1627
- }
1628
- async callback(e, { keepOpen: t = !1 }) {
1629
- this._logger.create("callback"), se.notifyOpener(e, t);
1630
- }
1631
- }, Ye = class {
1632
- constructor(e) {
1633
- this._settings = e, this._logger = new g("RedirectNavigator");
1634
- }
1635
- async prepare({
1636
- redirectMethod: e = this._settings.redirectMethod,
1637
- redirectTarget: t = this._settings.redirectTarget
1638
- }) {
1639
- var s;
1640
- this._logger.create("prepare");
1641
- let i = window.self;
1642
- t === "top" && (i = (s = window.top) != null ? s : window.self);
1643
- const r = i.location[e].bind(i.location);
1644
- let o;
1645
- return {
1646
- navigate: async (n) => {
1647
- this._logger.create("navigate");
1648
- const c = new Promise((a, l) => {
1649
- o = l;
1650
- });
1651
- return r(n.url), await c;
1652
- },
1653
- close: () => {
1654
- this._logger.create("close"), o == null || o(new Error("Redirect aborted")), i.stop();
1655
- }
1656
- };
1657
- }
1658
- async callback() {
1659
- }
1660
- }, Ze = class extends Pe {
1661
- constructor(e) {
1662
- super({ expiringNotificationTimeInSeconds: e.accessTokenExpiringNotificationTimeInSeconds }), this._logger = new g("UserManagerEvents"), this._userLoaded = new I("User loaded"), this._userUnloaded = new I("User unloaded"), this._silentRenewError = new I("Silent renew error"), this._userSignedIn = new I("User signed in"), this._userSignedOut = new I("User signed out"), this._userSessionChanged = new I("User session changed");
1663
- }
1664
- async load(e, t = !0) {
1665
- await super.load(e), t && await this._userLoaded.raise(e);
1666
- }
1667
- async unload() {
1668
- await super.unload(), await this._userUnloaded.raise();
1669
- }
1670
- /**
1671
- * Add callback: Raised when a user session has been established (or re-established).
1672
- */
1673
- addUserLoaded(e) {
1674
- return this._userLoaded.addHandler(e);
1675
- }
1676
- /**
1677
- * Remove callback: Raised when a user session has been established (or re-established).
1678
- */
1679
- removeUserLoaded(e) {
1680
- return this._userLoaded.removeHandler(e);
1681
- }
1682
- /**
1683
- * Add callback: Raised when a user session has been terminated.
1684
- */
1685
- addUserUnloaded(e) {
1686
- return this._userUnloaded.addHandler(e);
1687
- }
1688
- /**
1689
- * Remove callback: Raised when a user session has been terminated.
1690
- */
1691
- removeUserUnloaded(e) {
1692
- return this._userUnloaded.removeHandler(e);
1693
- }
1694
- /**
1695
- * Add callback: Raised when the automatic silent renew has failed.
1696
- */
1697
- addSilentRenewError(e) {
1698
- return this._silentRenewError.addHandler(e);
1699
- }
1700
- /**
1701
- * Remove callback: Raised when the automatic silent renew has failed.
1702
- */
1703
- removeSilentRenewError(e) {
1704
- return this._silentRenewError.removeHandler(e);
1705
- }
1706
- /**
1707
- * @internal
1708
- */
1709
- async _raiseSilentRenewError(e) {
1710
- await this._silentRenewError.raise(e);
1711
- }
1712
- /**
1713
- * Add callback: Raised when the user is signed in (when `monitorSession` is set).
1714
- * @see {@link UserManagerSettings.monitorSession}
1715
- */
1716
- addUserSignedIn(e) {
1717
- return this._userSignedIn.addHandler(e);
1718
- }
1719
- /**
1720
- * Remove callback: Raised when the user is signed in (when `monitorSession` is set).
1721
- */
1722
- removeUserSignedIn(e) {
1723
- this._userSignedIn.removeHandler(e);
1724
- }
1725
- /**
1726
- * @internal
1727
- */
1728
- async _raiseUserSignedIn() {
1729
- await this._userSignedIn.raise();
1730
- }
1731
- /**
1732
- * Add callback: Raised when the user's sign-in status at the OP has changed (when `monitorSession` is set).
1733
- * @see {@link UserManagerSettings.monitorSession}
1734
- */
1735
- addUserSignedOut(e) {
1736
- return this._userSignedOut.addHandler(e);
1737
- }
1738
- /**
1739
- * Remove callback: Raised when the user's sign-in status at the OP has changed (when `monitorSession` is set).
1740
- */
1741
- removeUserSignedOut(e) {
1742
- this._userSignedOut.removeHandler(e);
1743
- }
1744
- /**
1745
- * @internal
1746
- */
1747
- async _raiseUserSignedOut() {
1748
- await this._userSignedOut.raise();
1749
- }
1750
- /**
1751
- * Add callback: Raised when the user session changed (when `monitorSession` is set).
1752
- * @see {@link UserManagerSettings.monitorSession}
1753
- */
1754
- addUserSessionChanged(e) {
1755
- return this._userSessionChanged.addHandler(e);
1756
- }
1757
- /**
1758
- * Remove callback: Raised when the user session changed (when `monitorSession` is set).
1759
- */
1760
- removeUserSessionChanged(e) {
1761
- this._userSessionChanged.removeHandler(e);
1762
- }
1763
- /**
1764
- * @internal
1765
- */
1766
- async _raiseUserSessionChanged() {
1767
- await this._userSessionChanged.raise();
1768
- }
1769
- }, et = class {
1770
- constructor(e) {
1771
- this._userManager = e, this._logger = new g("SilentRenewService"), this._isStarted = !1, this._retryTimer = new T("Retry Silent Renew"), this._tokenExpiring = async () => {
1772
- const t = this._logger.create("_tokenExpiring");
1773
- try {
1774
- await this._userManager.signinSilent(), t.debug("silent token renewal successful");
1775
- } catch (s) {
1776
- if (s instanceof G) {
1777
- t.warn("ErrorTimeout from signinSilent:", s, "retry in 5s"), this._retryTimer.init(5);
1778
- return;
1779
- }
1780
- t.error("Error from signinSilent:", s), await this._userManager.events._raiseSilentRenewError(s);
2041
+ p(s, h), s.fn = H(h.fn), s.utc = function(e, t, i) {
2042
+ return k(e, t, i, !0);
2043
+ }, s.fn.format = function(e) {
2044
+ var t, i, r = this;
2045
+ if (e) {
2046
+ for (t = 5, i = function(a) {
2047
+ return r.localeData().longDateFormat(a) || a;
2048
+ }; t > 0 && F.test(e); )
2049
+ t -= 1, e = e.replace(F, i);
2050
+ T[e] || (T[e] = B(e)), e = T[e](this);
1781
2051
  }
2052
+ return h.fn.format.call(this, e);
2053
+ }, s.fn.iYear = function(e) {
2054
+ var t, i, r;
2055
+ return typeof e == "number" ? (i = Y(this.year(), this.month(), this.date()), t = Math.min(i.hd, s.iDaysInMonth(e, i.hm)), r = g(e, i.hm, t), _(this, r.gy, r.gm, r.gd), (this.month() !== r.gm || this.date() !== r.gd || this.year() !== r.gy) && _(this, r.gy, r.gm, r.gd), h.updateOffset(this), this) : Y(this.year(), this.month(), this.date()).hy;
2056
+ }, s.fn.iMonth = function(e) {
2057
+ var t, i, r;
2058
+ if (e != null) {
2059
+ if (typeof e == "string")
2060
+ if (e = this.localeData().iMonthsParse(e), e >= 0)
2061
+ e -= 1;
2062
+ else
2063
+ return this;
2064
+ return i = Y(this.year(), this.month(), this.date()), t = Math.min(i.hd, s.iDaysInMonth(i.hy, e)), this.iYear(i.hy + u(e, 12)), e = m(e, 12), e < 0 && (e += 12, this.iYear(this.iYear() - 1)), r = g(this.iYear(), e, t), _(this, r.gy, r.gm, r.gd), (this.month() !== r.gm || this.date() !== r.gd || this.year() !== r.gy) && _(this, r.gy, r.gm, r.gd), h.updateOffset(this), this;
2065
+ } else
2066
+ return Y(this.year(), this.month(), this.date()).hm;
2067
+ }, s.fn.iDate = function(e) {
2068
+ var t, i;
2069
+ return typeof e == "number" ? (t = Y(this.year(), this.month(), this.date()), i = g(t.hy, t.hm, e), _(this, i.gy, i.gm, i.gd), (this.month() !== i.gm || this.date() !== i.gd || this.year() !== i.gy) && _(this, i.gy, i.gm, i.gd), h.updateOffset(this), this) : Y(this.year(), this.month(), this.date()).hd;
2070
+ }, s.fn.iDayOfYear = function(e) {
2071
+ var t = Math.round((s(this).startOf("day") - s(this).startOf("iYear")) / 864e5) + 1;
2072
+ return e == null ? t : this.add(e - t, "d");
2073
+ }, s.fn.iDaysInMonth = function() {
2074
+ return parseInt(s(this).endOf("iMonth").format("iDD"));
2075
+ }, s.fn.iWeek = function(e) {
2076
+ var t = R(this, this.localeData()._week.dow, this.localeData()._week.doy).week;
2077
+ return e == null ? t : this.add((e - t) * 7, "d");
2078
+ }, s.fn.iWeekYear = function(e) {
2079
+ var t = R(this, this.localeData()._week.dow, this.localeData()._week.doy).year;
2080
+ return e == null ? t : this.add(e - t, "y");
2081
+ }, s.fn.add = function(e, t) {
2082
+ var i;
2083
+ return t !== null && !isNaN(+t) && (i = e, e = t, t = i), t = y(t), t === "iyear" ? this.iYear(this.iYear() + e) : t === "imonth" ? this.iMonth(this.iMonth() + e) : t === "idate" ? this.iDate(this.iDate() + e) : h.fn.add.call(this, e, t), this;
2084
+ }, s.fn.subtract = function(e, t) {
2085
+ var i;
2086
+ return t !== null && !isNaN(+t) && (i = e, e = t, t = i), t = y(t), t === "iyear" ? this.iYear(this.iYear() - e) : t === "imonth" ? this.iMonth(this.iMonth() - e) : t === "idate" ? this.iDate(this.iDate() - e) : h.fn.subtract.call(this, e, t), this;
2087
+ }, s.fn.startOf = function(e) {
2088
+ return e = y(e), e === "iyear" || e === "imonth" ? (e === "iyear" && this.iMonth(0), this.iDate(1), this.hours(0), this.minutes(0), this.seconds(0), this.milliseconds(0), this) : h.fn.startOf.call(this, e);
2089
+ }, s.fn.endOf = function(e) {
2090
+ return e = y(e), e === void 0 || e === "milisecond" ? this : this.startOf(e).add(1, e === "isoweek" ? "week" : e).subtract(1, "milliseconds");
2091
+ }, s.fn.clone = function() {
2092
+ return s(this);
2093
+ }, s.fn.iYears = s.fn.iYear, s.fn.iMonths = s.fn.iMonth, s.fn.iDates = s.fn.iDate, s.fn.iWeeks = s.fn.iWeek, s.iDaysInMonth = function(e, t) {
2094
+ var i = q(e, t + 1), r = D.ummalquraData[i] - D.ummalquraData[i - 1];
2095
+ return r;
1782
2096
  };
1783
- }
1784
- async start() {
1785
- const e = this._logger.create("start");
1786
- if (!this._isStarted) {
1787
- this._isStarted = !0, this._userManager.events.addAccessTokenExpiring(this._tokenExpiring), this._retryTimer.addHandler(this._tokenExpiring);
1788
- try {
1789
- await this._userManager.getUser();
1790
- } catch (t) {
1791
- e.error("getUser error", t);
1792
- }
2097
+ function Y(e, t, i) {
2098
+ var r = r3(a3(e, t + 1, i));
2099
+ return r.hm -= 1, r;
1793
2100
  }
1794
- }
1795
- stop() {
1796
- this._isStarted && (this._retryTimer.cancel(), this._retryTimer.removeHandler(this._tokenExpiring), this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring), this._isStarted = !1);
1797
- }
1798
- }, tt = class {
1799
- constructor(e) {
1800
- this.refresh_token = e.refresh_token, this.id_token = e.id_token, this.session_state = e.session_state, this.scope = e.scope, this.profile = e.profile, this.data = e.state;
1801
- }
1802
- }, it = class {
1803
- constructor(e, t, s, i) {
1804
- this._logger = new g("UserManager"), this.settings = new Be(e), this._client = new Ke(e), this._redirectNavigator = t ?? new Ye(this.settings), this._popupNavigator = s ?? new Xe(this.settings), this._iframeNavigator = i ?? new Ve(this.settings), this._events = new Ze(this.settings), this._silentRenewService = new et(this), this.settings.automaticSilentRenew && this.startSilentRenew(), this._sessionMonitor = null, this.settings.monitorSession && (this._sessionMonitor = new Fe(this));
1805
- }
1806
- /**
1807
- * Get object used to register for events raised by the `UserManager`.
1808
- */
1809
- get events() {
1810
- return this._events;
1811
- }
1812
- /**
1813
- * Get object used to access the metadata configuration of the identity provider.
1814
- */
1815
- get metadataService() {
1816
- return this._client.metadataService;
1817
- }
1818
- /**
1819
- * Load the `User` object for the currently authenticated user.
1820
- *
1821
- * @param raiseEvent - If `true`, the `UserLoaded` event will be raised. Defaults to false.
1822
- * @returns A promise
1823
- */
1824
- async getUser(e = !1) {
1825
- const t = this._logger.create("getUser"), s = await this._loadUser();
1826
- return s ? (t.info("user loaded"), await this._events.load(s, e), s) : (t.info("user not found in storage"), null);
1827
- }
1828
- /**
1829
- * Remove from any storage the currently authenticated user.
1830
- *
1831
- * @returns A promise
1832
- */
1833
- async removeUser() {
1834
- const e = this._logger.create("removeUser");
1835
- await this.storeUser(null), e.info("user removed from storage"), await this._events.unload();
1836
- }
1837
- /**
1838
- * Trigger a redirect of the current window to the authorization endpoint.
1839
- *
1840
- * @returns A promise
1841
- *
1842
- * @throws `Error` In cases of wrong authentication.
1843
- */
1844
- async signinRedirect(e = {}) {
1845
- var t;
1846
- this._logger.create("signinRedirect");
1847
- const {
1848
- redirectMethod: s,
1849
- ...i
1850
- } = e;
1851
- let r;
1852
- (t = this.settings.dpop) != null && t.bind_authorization_code && (r = await this.generateDPoPJkt(this.settings.dpop));
1853
- const o = await this._redirectNavigator.prepare({ redirectMethod: s });
1854
- await this._signinStart({
1855
- request_type: "si:r",
1856
- dpopJkt: r,
1857
- ...i
1858
- }, o);
1859
- }
1860
- /**
1861
- * Process the response (callback) from the authorization endpoint.
1862
- * It is recommended to use {@link UserManager.signinCallback} instead.
1863
- *
1864
- * @returns A promise containing the authenticated `User`.
1865
- *
1866
- * @see {@link UserManager.signinCallback}
1867
- */
1868
- async signinRedirectCallback(e = window.location.href) {
1869
- const t = this._logger.create("signinRedirectCallback"), s = await this._signinEnd(e);
1870
- return s.profile && s.profile.sub ? t.info("success, signed in subject", s.profile.sub) : t.info("no subject"), s;
1871
- }
1872
- /**
1873
- * Trigger the signin with user/password.
1874
- *
1875
- * @returns A promise containing the authenticated `User`.
1876
- * @throws {@link ErrorResponse} In cases of wrong authentication.
1877
- */
1878
- async signinResourceOwnerCredentials({
1879
- username: e,
1880
- password: t,
1881
- skipUserInfo: s = !1
1882
- }) {
1883
- const i = this._logger.create("signinResourceOwnerCredential"), r = await this._client.processResourceOwnerPasswordCredentials({
1884
- username: e,
1885
- password: t,
1886
- skipUserInfo: s,
1887
- extraTokenParams: this.settings.extraTokenParams
1888
- });
1889
- i.debug("got signin response");
1890
- const o = await this._buildUser(r);
1891
- return o.profile && o.profile.sub ? i.info("success, signed in subject", o.profile.sub) : i.info("no subject"), o;
1892
- }
1893
- /**
1894
- * Trigger a request (via a popup window) to the authorization endpoint.
1895
- *
1896
- * @returns A promise containing the authenticated `User`.
1897
- * @throws `Error` In cases of wrong authentication.
1898
- */
1899
- async signinPopup(e = {}) {
1900
- var t;
1901
- const s = this._logger.create("signinPopup");
1902
- let i;
1903
- (t = this.settings.dpop) != null && t.bind_authorization_code && (i = await this.generateDPoPJkt(this.settings.dpop));
1904
- const {
1905
- popupWindowFeatures: r,
1906
- popupWindowTarget: o,
1907
- popupSignal: n,
1908
- ...c
1909
- } = e, a = this.settings.popup_redirect_uri;
1910
- a || s.throw(new Error("No popup_redirect_uri configured"));
1911
- const l = await this._popupNavigator.prepare({ popupWindowFeatures: r, popupWindowTarget: o, popupSignal: n }), d = await this._signin({
1912
- request_type: "si:p",
1913
- redirect_uri: a,
1914
- display: "popup",
1915
- dpopJkt: i,
1916
- ...c
1917
- }, l);
1918
- return d && (d.profile && d.profile.sub ? s.info("success, signed in subject", d.profile.sub) : s.info("no subject")), d;
1919
- }
1920
- /**
1921
- * Notify the opening window of response (callback) from the authorization endpoint.
1922
- * It is recommended to use {@link UserManager.signinCallback} instead.
1923
- *
1924
- * @returns A promise
1925
- *
1926
- * @see {@link UserManager.signinCallback}
1927
- */
1928
- async signinPopupCallback(e = window.location.href, t = !1) {
1929
- const s = this._logger.create("signinPopupCallback");
1930
- await this._popupNavigator.callback(e, { keepOpen: t }), s.info("success");
1931
- }
1932
- /**
1933
- * Trigger a silent request (via refresh token or an iframe) to the authorization endpoint.
1934
- *
1935
- * @returns A promise that contains the authenticated `User`.
1936
- */
1937
- async signinSilent(e = {}) {
1938
- var t, s;
1939
- const i = this._logger.create("signinSilent"), {
1940
- silentRequestTimeoutInSeconds: r,
1941
- ...o
1942
- } = e;
1943
- let n = await this._loadUser();
1944
- if (n != null && n.refresh_token) {
1945
- i.debug("using refresh token");
1946
- const h = new tt(n);
1947
- return await this._useRefreshToken({
1948
- state: h,
1949
- redirect_uri: o.redirect_uri,
1950
- resource: o.resource,
1951
- extraTokenParams: o.extraTokenParams,
1952
- timeoutInSeconds: r
1953
- });
2101
+ function g(e, t, i) {
2102
+ var r = n3(i3(e, t + 1, i));
2103
+ return r.gm -= 1, r;
1954
2104
  }
1955
- let c;
1956
- (t = this.settings.dpop) != null && t.bind_authorization_code && (c = await this.generateDPoPJkt(this.settings.dpop));
1957
- const a = this.settings.silent_redirect_uri;
1958
- a || i.throw(new Error("No silent_redirect_uri configured"));
1959
- let l;
1960
- n && this.settings.validateSubOnSilentRenew && (i.debug("subject prior to silent renew:", n.profile.sub), l = n.profile.sub);
1961
- const d = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: r });
1962
- return n = await this._signin({
1963
- request_type: "si:s",
1964
- redirect_uri: a,
1965
- prompt: "none",
1966
- id_token_hint: this.settings.includeIdTokenInSilentRenew ? n == null ? void 0 : n.id_token : void 0,
1967
- dpopJkt: c,
1968
- ...o
1969
- }, d, l), n && ((s = n.profile) != null && s.sub ? i.info("success, signed in subject", n.profile.sub) : i.info("no subject")), n;
1970
- }
1971
- async _useRefreshToken(e) {
1972
- const t = await this._client.useRefreshToken({
1973
- timeoutInSeconds: this.settings.silentRequestTimeoutInSeconds,
1974
- ...e
1975
- }), s = new J({ ...e.state, ...t });
1976
- return await this.storeUser(s), await this._events.load(s), s;
1977
- }
1978
- /**
1979
- *
1980
- * Notify the parent window of response (callback) from the authorization endpoint.
1981
- * It is recommended to use {@link UserManager.signinCallback} instead.
1982
- *
1983
- * @returns A promise
1984
- *
1985
- * @see {@link UserManager.signinCallback}
1986
- */
1987
- async signinSilentCallback(e = window.location.href) {
1988
- const t = this._logger.create("signinSilentCallback");
1989
- await this._iframeNavigator.callback(e), t.info("success");
1990
- }
1991
- /**
1992
- * Process any response (callback) from the authorization endpoint, by dispatching the request_type
1993
- * and executing one of the following functions:
1994
- * - {@link UserManager.signinRedirectCallback}
1995
- * - {@link UserManager.signinPopupCallback}
1996
- * - {@link UserManager.signinSilentCallback}
1997
- *
1998
- * @throws `Error` If request_type is unknown or signin cannot be processed.
1999
- */
2000
- async signinCallback(e = window.location.href) {
2001
- const { state: t } = await this._client.readSigninResponseState(e);
2002
- switch (t.request_type) {
2003
- case "si:r":
2004
- return await this.signinRedirectCallback(e);
2005
- case "si:p":
2006
- await this.signinPopupCallback(e);
2007
- break;
2008
- case "si:s":
2009
- await this.signinSilentCallback(e);
2010
- break;
2011
- default:
2012
- throw new Error("invalid response_type in state");
2105
+ return s.iConvert = {
2106
+ toHijri: Y,
2107
+ toGregorian: g
2108
+ }, s;
2109
+ function u(e, t) {
2110
+ return ~~(e / t);
2013
2111
  }
2014
- }
2015
- /**
2016
- * Process any response (callback) from the end session endpoint, by dispatching the request_type
2017
- * and executing one of the following functions:
2018
- * - {@link UserManager.signoutRedirectCallback}
2019
- * - {@link UserManager.signoutPopupCallback}
2020
- * - {@link UserManager.signoutSilentCallback}
2021
- *
2022
- * @throws `Error` If request_type is unknown or signout cannot be processed.
2023
- */
2024
- async signoutCallback(e = window.location.href, t = !1) {
2025
- const { state: s } = await this._client.readSignoutResponseState(e);
2026
- if (s)
2027
- switch (s.request_type) {
2028
- case "so:r":
2029
- return await this.signoutRedirectCallback(e);
2030
- case "so:p":
2031
- await this.signoutPopupCallback(e, t);
2032
- break;
2033
- case "so:s":
2034
- await this.signoutSilentCallback(e);
2035
- break;
2036
- default:
2037
- throw new Error("invalid response_type in state");
2038
- }
2039
- }
2040
- /**
2041
- * Query OP for user's current signin status.
2042
- *
2043
- * @returns A promise object with session_state and subject identifier.
2044
- */
2045
- async querySessionStatus(e = {}) {
2046
- const t = this._logger.create("querySessionStatus"), {
2047
- silentRequestTimeoutInSeconds: s,
2048
- ...i
2049
- } = e, r = this.settings.silent_redirect_uri;
2050
- r || t.throw(new Error("No silent_redirect_uri configured"));
2051
- const o = await this._loadUser(), n = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: s }), c = await this._signinStart({
2052
- request_type: "si:s",
2053
- // this acts like a signin silent
2054
- redirect_uri: r,
2055
- prompt: "none",
2056
- id_token_hint: this.settings.includeIdTokenInSilentRenew ? o == null ? void 0 : o.id_token : void 0,
2057
- response_type: this.settings.query_status_response_type,
2058
- scope: "openid",
2059
- skipUserInfo: !0,
2060
- ...i
2061
- }, n);
2062
- try {
2063
- const a = {}, l = await this._client.processSigninResponse(c.url, a);
2064
- return t.debug("got signin response"), l.session_state && l.profile.sub ? (t.info("success for subject", l.profile.sub), {
2065
- session_state: l.session_state,
2066
- sub: l.profile.sub
2067
- }) : (t.info("success, user not authenticated"), null);
2068
- } catch (a) {
2069
- if (this.settings.monitorAnonymousSession && a instanceof q)
2070
- switch (a.error) {
2071
- case "login_required":
2072
- case "consent_required":
2073
- case "interaction_required":
2074
- case "account_selection_required":
2075
- return t.info("success for anonymous user"), {
2076
- session_state: a.session_state
2077
- };
2078
- }
2079
- throw a;
2112
+ function m(e, t) {
2113
+ return e - ~~(e / t) * t;
2080
2114
  }
2081
- }
2082
- async _signin(e, t, s) {
2083
- const i = await this._signinStart(e, t);
2084
- return await this._signinEnd(i.url, s);
2085
- }
2086
- async _signinStart(e, t) {
2087
- const s = this._logger.create("_signinStart");
2088
- try {
2089
- const i = await this._client.createSigninRequest(e);
2090
- return s.debug("got signin request"), await t.navigate({
2091
- url: i.url,
2092
- state: i.state.id,
2093
- response_mode: i.state.response_mode,
2094
- scriptOrigin: this.settings.iframeScriptOrigin
2095
- });
2096
- } catch (i) {
2097
- throw s.debug("error after preparing navigator, closing navigator window"), t.close(), i;
2115
+ function i3(e, t, i) {
2116
+ var r = q(e, t), a = i + D.ummalquraData[r - 1] - 1, n = a + 24e5;
2117
+ return n;
2098
2118
  }
2099
- }
2100
- async _signinEnd(e, t) {
2101
- const s = this._logger.create("_signinEnd"), i = {}, r = await this._client.processSigninResponse(e, i);
2102
- return s.debug("got signin response"), await this._buildUser(r, t);
2103
- }
2104
- async _buildUser(e, t) {
2105
- const s = this._logger.create("_buildUser"), i = new J(e);
2106
- if (t) {
2107
- if (t !== i.profile.sub)
2108
- throw s.debug("current user does not match user returned from signin. sub from signin:", i.profile.sub), new q({ ...e, error: "login_required" });
2109
- s.debug("current user matches user returned from signin");
2119
+ function r3(e) {
2120
+ var t = e - 24e5, i = s3(t), r = i + 16260, a = Math.floor((r - 1) / 12), n = a + 1, o = r - 12 * a, f = t - D.ummalquraData[i - 1] + 1;
2121
+ return {
2122
+ hy: n,
2123
+ hm: o,
2124
+ hd: f
2125
+ };
2110
2126
  }
2111
- return await this.storeUser(i), s.debug("user stored"), await this._events.load(i), i;
2112
- }
2113
- /**
2114
- * Trigger a redirect of the current window to the end session endpoint.
2115
- *
2116
- * @returns A promise
2117
- */
2118
- async signoutRedirect(e = {}) {
2119
- const t = this._logger.create("signoutRedirect"), {
2120
- redirectMethod: s,
2121
- ...i
2122
- } = e, r = await this._redirectNavigator.prepare({ redirectMethod: s });
2123
- await this._signoutStart({
2124
- request_type: "so:r",
2125
- post_logout_redirect_uri: this.settings.post_logout_redirect_uri,
2126
- ...i
2127
- }, r), t.info("success");
2128
- }
2129
- /**
2130
- * Process response (callback) from the end session endpoint.
2131
- * It is recommended to use {@link UserManager.signoutCallback} instead.
2132
- *
2133
- * @returns A promise containing signout response
2134
- *
2135
- * @see {@link UserManager.signoutCallback}
2136
- */
2137
- async signoutRedirectCallback(e = window.location.href) {
2138
- const t = this._logger.create("signoutRedirectCallback"), s = await this._signoutEnd(e);
2139
- return t.info("success"), s;
2140
- }
2141
- /**
2142
- * Trigger a redirect of a popup window to the end session endpoint.
2143
- *
2144
- * @returns A promise
2145
- */
2146
- async signoutPopup(e = {}) {
2147
- const t = this._logger.create("signoutPopup"), {
2148
- popupWindowFeatures: s,
2149
- popupWindowTarget: i,
2150
- popupSignal: r,
2151
- ...o
2152
- } = e, n = this.settings.popup_post_logout_redirect_uri, c = await this._popupNavigator.prepare({ popupWindowFeatures: s, popupWindowTarget: i, popupSignal: r });
2153
- await this._signout({
2154
- request_type: "so:p",
2155
- post_logout_redirect_uri: n,
2156
- // we're putting a dummy entry in here because we
2157
- // need a unique id from the state for notification
2158
- // to the parent window, which is necessary if we
2159
- // plan to return back to the client after signout
2160
- // and so we can close the popup after signout
2161
- state: n == null ? void 0 : {},
2162
- ...o
2163
- }, c), t.info("success");
2164
- }
2165
- /**
2166
- * Process response (callback) from the end session endpoint from a popup window.
2167
- * It is recommended to use {@link UserManager.signoutCallback} instead.
2168
- *
2169
- * @returns A promise
2170
- *
2171
- * @see {@link UserManager.signoutCallback}
2172
- */
2173
- async signoutPopupCallback(e = window.location.href, t = !1) {
2174
- const s = this._logger.create("signoutPopupCallback");
2175
- await this._popupNavigator.callback(e, { keepOpen: t }), s.info("success");
2176
- }
2177
- async _signout(e, t) {
2178
- const s = await this._signoutStart(e, t);
2179
- return await this._signoutEnd(s.url);
2180
- }
2181
- async _signoutStart(e = {}, t) {
2182
- var s;
2183
- const i = this._logger.create("_signoutStart");
2184
- try {
2185
- const r = await this._loadUser();
2186
- i.debug("loaded current user from storage"), this.settings.revokeTokensOnSignout && await this._revokeInternal(r);
2187
- const o = e.id_token_hint || r && r.id_token;
2188
- o && (i.debug("setting id_token_hint in signout request"), e.id_token_hint = o), await this.removeUser(), i.debug("user removed, creating signout request");
2189
- const n = await this._client.createSignoutRequest(e);
2190
- return i.debug("got signout request"), await t.navigate({
2191
- url: n.url,
2192
- state: (s = n.state) == null ? void 0 : s.id,
2193
- scriptOrigin: this.settings.iframeScriptOrigin
2194
- });
2195
- } catch (r) {
2196
- throw i.debug("error after preparing navigator, closing navigator window"), t.close(), r;
2127
+ function a3(e, t, i) {
2128
+ var r = u((e + u(t - 8, 6) + 100100) * 1461, 4) + u(153 * m(t + 9, 12) + 2, 5) + i - 34840408;
2129
+ return r = r - u(u(e + 100100 + u(t - 8, 6), 100) * 3, 4) + 752, r;
2197
2130
  }
2198
- }
2199
- async _signoutEnd(e) {
2200
- const t = this._logger.create("_signoutEnd"), s = await this._client.processSignoutResponse(e);
2201
- return t.debug("got signout response"), s;
2202
- }
2203
- /**
2204
- * Trigger a silent request (via an iframe) to the end session endpoint.
2205
- *
2206
- * @returns A promise
2207
- */
2208
- async signoutSilent(e = {}) {
2209
- var t;
2210
- const s = this._logger.create("signoutSilent"), {
2211
- silentRequestTimeoutInSeconds: i,
2212
- ...r
2213
- } = e, o = this.settings.includeIdTokenInSilentSignout ? (t = await this._loadUser()) == null ? void 0 : t.id_token : void 0, n = this.settings.popup_post_logout_redirect_uri, c = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: i });
2214
- await this._signout({
2215
- request_type: "so:s",
2216
- post_logout_redirect_uri: n,
2217
- id_token_hint: o,
2218
- ...r
2219
- }, c), s.info("success");
2220
- }
2221
- /**
2222
- * Notify the parent window of response (callback) from the end session endpoint.
2223
- * It is recommended to use {@link UserManager.signoutCallback} instead.
2224
- *
2225
- * @returns A promise
2226
- *
2227
- * @see {@link UserManager.signoutCallback}
2228
- */
2229
- async signoutSilentCallback(e = window.location.href) {
2230
- const t = this._logger.create("signoutSilentCallback");
2231
- await this._iframeNavigator.callback(e), t.info("success");
2232
- }
2233
- async revokeTokens(e) {
2234
- const t = await this._loadUser();
2235
- await this._revokeInternal(t, e);
2236
- }
2237
- async _revokeInternal(e, t = this.settings.revokeTokenTypes) {
2238
- const s = this._logger.create("_revokeInternal");
2239
- if (!e)
2240
- return;
2241
- const i = t.filter((r) => typeof e[r] == "string");
2242
- if (!i.length) {
2243
- s.debug("no need to revoke due to no token(s)");
2244
- return;
2131
+ function n3(e) {
2132
+ var t, i, r, a, n;
2133
+ return t = 4 * e + 139361631, t = t + u(u(4 * e + 183187720, 146097) * 3, 4) * 4 - 3908, i = u(m(t, 1461), 4) * 5 + 308, r = u(m(i, 153), 5) + 1, a = m(u(i, 153), 12) + 1, n = u(t, 1461) - 100100 + u(8 - a, 6), {
2134
+ gy: n,
2135
+ gm: a,
2136
+ gd: r
2137
+ };
2245
2138
  }
2246
- for (const r of i)
2247
- await this._client.revokeToken(
2248
- e[r],
2249
- r
2250
- ), s.info(`${r} revoked successfully`), r !== "access_token" && (e[r] = null);
2251
- await this.storeUser(e), s.debug("user stored"), await this._events.load(e);
2252
- }
2253
- /**
2254
- * Enables silent renew for the `UserManager`.
2255
- */
2256
- startSilentRenew() {
2257
- this._logger.create("startSilentRenew"), this._silentRenewService.start();
2258
- }
2259
- /**
2260
- * Disables silent renew for the `UserManager`.
2261
- */
2262
- stopSilentRenew() {
2263
- this._silentRenewService.stop();
2264
- }
2265
- get _userStoreKey() {
2266
- return `user:${this.settings.authority}:${this.settings.client_id}`;
2267
- }
2268
- async _loadUser() {
2269
- const e = this._logger.create("_loadUser"), t = await this.settings.userStore.get(this._userStoreKey);
2270
- return t ? (e.debug("user storageString loaded"), J.fromStorageString(t)) : (e.debug("no user storageString"), null);
2271
- }
2272
- async storeUser(e) {
2273
- const t = this._logger.create("storeUser");
2274
- if (e) {
2275
- t.debug("storing user");
2276
- const s = e.toStorageString();
2277
- await this.settings.userStore.set(this._userStoreKey, s);
2278
- } else
2279
- this._logger.debug("removing user"), await this.settings.userStore.remove(this._userStoreKey), this.settings.dpop && await this.settings.dpop.store.remove(this.settings.client_id);
2280
- }
2281
- /**
2282
- * Removes stale state entries in storage for incomplete authorize requests.
2283
- */
2284
- async clearStaleState() {
2285
- await this._client.clearStaleState();
2286
- }
2287
- /**
2288
- * Dynamically generates a DPoP proof for a given user, URL and optional Http method.
2289
- * This method is useful when you need to make a request to a resource server
2290
- * with fetch or similar, and you need to include a DPoP proof in a DPoP header.
2291
- * @param url - The URL to generate the DPoP proof for
2292
- * @param user - The user to generate the DPoP proof for
2293
- * @param httpMethod - Optional, defaults to "GET"
2294
- * @param nonce - Optional nonce provided by the resource server
2295
- *
2296
- * @returns A promise containing the DPoP proof or undefined if DPoP is not enabled/no user is found.
2297
- */
2298
- async dpopProof(e, t, s, i) {
2299
- var r, o;
2300
- const n = await ((o = (r = this.settings.dpop) == null ? void 0 : r.store) == null ? void 0 : o.get(this.settings.client_id));
2301
- if (n)
2302
- return await f.generateDPoPProof({
2303
- url: e,
2304
- accessToken: t == null ? void 0 : t.access_token,
2305
- httpMethod: s,
2306
- keyPair: n.keys,
2307
- nonce: i
2308
- });
2309
- }
2310
- async generateDPoPJkt(e) {
2311
- let t = await e.store.get(this.settings.client_id);
2312
- if (!t) {
2313
- const s = await f.generateDPoPKeys();
2314
- t = new de(s), await e.store.set(this.settings.client_id, t);
2139
+ function q(e, t) {
2140
+ var i = e - 1, r = i * 12 + 1 + (t - 1), a = r - 16260;
2141
+ return a;
2315
2142
  }
2316
- return await f.generateDPoPJkt(t.keys);
2317
- }
2318
- };
2143
+ function s3(e) {
2144
+ for (var t = 0; t < D.ummalquraData.length; t = t + 1)
2145
+ if (D.ummalquraData[t] > e)
2146
+ return t;
2147
+ }
2148
+ });
2149
+ })(L);
2150
+ var u3 = L.exports;
2151
+ const M3 = /* @__PURE__ */ o3(u3);
2319
2152
  export {
2320
- Pe as AccessTokenEvents,
2321
- Ie as CheckSessionIFrame,
2322
- de as DPoPState,
2323
- q as ErrorResponse,
2324
- G as ErrorTimeout,
2325
- re as InMemoryWebStorage,
2326
- H as Log,
2327
- g as Logger,
2328
- xe as MetadataService,
2329
- Ke as OidcClient,
2330
- z as OidcClientSettingsStore,
2331
- Fe as SessionMonitor,
2332
- $ as SigninResponse,
2333
- ae as SigninState,
2334
- De as SignoutResponse,
2335
- W as State,
2336
- J as User,
2337
- it as UserManager,
2338
- Be as UserManagerSettingsStore,
2339
- ne as WebStorageStateStore
2153
+ M3 as default
2340
2154
  };