@sheetxl/studio-mui 0.4.20 → 0.4.21

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 (98) hide show
  1. package/browser/cjs/B1KlR2XYFpYbKjYS.cjs +20 -0
  2. package/browser/cjs/{DItuuqkIamMzp7Im.cjs → B1RMsexbz4bNlty_.cjs} +1 -1
  3. package/browser/cjs/B32faQpVaX1tkPuc.cjs +6 -0
  4. package/browser/cjs/B3XiHrRxW1LxML7F.cjs +6 -0
  5. package/browser/cjs/BGikYpeNpjwvXUdQ.cjs +18 -0
  6. package/browser/cjs/BY5l7DteiFtb2AKy.cjs +6 -0
  7. package/browser/cjs/Bb0Hd2RE7iVWVbm8.cjs +6 -0
  8. package/browser/cjs/C3EZkRIKfQURg9hX.cjs +6 -0
  9. package/browser/cjs/C7r573AdygYrVVEJ.cjs +7 -0
  10. package/browser/cjs/DEEknE8ARp0mc7fk.cjs +6 -0
  11. package/browser/cjs/DZwzUUHda3jr5jo4.cjs +6 -0
  12. package/browser/cjs/index.cjs +2 -2
  13. package/browser/cjs/veQZSq7ekc6G1FZT.cjs +42 -0
  14. package/browser/esm/B84RbTkXZiq6XIdH.mjs +49 -0
  15. package/browser/esm/{C5xUbwpUPDeNua-i.mjs → BLy-hRTZkVfaGrcr.mjs} +1 -1
  16. package/browser/esm/Bapmv0WdnDq3Jl_q.mjs +53 -0
  17. package/browser/esm/C0OuiugFYjsjbY8q.mjs +46 -0
  18. package/browser/esm/{5u-JEG1IfQBstjq0.mjs → CGVN-NJF8ZTm9apo.mjs} +11 -10
  19. package/browser/esm/CcLpUDzJOdfqQ8Kf.mjs +25 -0
  20. package/browser/esm/Csg-hJrzm9r4vJrm.mjs +2156 -0
  21. package/browser/esm/{C60ZnLCvtztDLuoT.mjs → DHf2N2UY78nZFge3.mjs} +100 -98
  22. package/browser/esm/Dlc8L0qha0mZFIkY.mjs +62 -0
  23. package/browser/esm/{BW3_mz5_8i9VLBYB.mjs → Dv-0R5pQwEnowzoO.mjs} +87 -85
  24. package/browser/esm/index.mjs +29 -29
  25. package/browser/esm/mVKwmIdSj4ua1Qce.mjs +4443 -0
  26. package/browser/esm/{CxXpPYi4eOFhBNt2.mjs → sHK4zKkWLGt2hVmW.mjs} +27 -26
  27. package/licenses/dependencies.txt +71 -342
  28. package/node/esm/{CrDbLKJh9omVo_TF.mjs → 49Eux5a_I5wZ-jfq.mjs} +29 -28
  29. package/node/esm/{Bn5TJPQAEMY-lGpF.mjs → B00pGeZ7sj6QOFgF.mjs} +4 -3
  30. package/node/esm/{D6A_o47zvz5ITIJK.mjs → BEtxwx_Ji4aFNg8V.mjs} +79 -78
  31. package/node/esm/{Ds5dinNcyNdC8ta6.mjs → BTcBIT144Lil18l-.mjs} +13 -11
  32. package/node/esm/{Bv12-Yyv0C86Iquy.mjs → Bw_f4uhXHpg1RA6Z.mjs} +7 -6
  33. package/node/esm/CGrG-gsnGd-Pn_T2.mjs +88 -0
  34. package/node/esm/CiUfb3MQCUC2McDP.mjs +46 -0
  35. package/node/esm/D1bjybdBQ28bumrW.mjs +63 -0
  36. package/node/esm/{CH6p2H0CMCoz4NgJ.mjs → Dcnd4LiYyGf2eaNl.mjs} +23 -22
  37. package/node/esm/{rlqvGCJlj4a2UcSM.mjs → DiLUM75s3D56Y6Fx.mjs} +11 -10
  38. package/node/esm/index.mjs +2381 -18514
  39. package/package.json +8 -8
  40. package/browser/cjs/-Z37a-mzY5SKXy--.cjs +0 -6
  41. package/browser/cjs/B384kb1_rsiCsdZG.cjs +0 -6
  42. package/browser/cjs/B8nWvy4zDv1CZsr_.cjs +0 -110
  43. package/browser/cjs/BBnMJiXp9lru0Rcq.cjs +0 -6
  44. package/browser/cjs/BFbHTu65n1oE-l0N.cjs +0 -6
  45. package/browser/cjs/BQMSHnQdWtqeakER.cjs +0 -6
  46. package/browser/cjs/BvjA0ybox6653eb5.cjs +0 -6
  47. package/browser/cjs/Cocgl4ghzWE9yVYS.cjs +0 -161
  48. package/browser/cjs/D21Q1NdM1zQ7uFlH.cjs +0 -6
  49. package/browser/cjs/D4LmaKqYiwjxp0Hs.cjs +0 -15
  50. package/browser/cjs/D6egUillMqBwTaEq.cjs +0 -6
  51. package/browser/cjs/D9lY6pd9tRxPeLKs.cjs +0 -18
  52. package/browser/cjs/DNqIYSqRYZkUpFxW.cjs +0 -7
  53. package/browser/cjs/DUImSlPsM-OipgBZ.cjs +0 -6
  54. package/browser/cjs/DUVLcBcwkTsuLb6q.cjs +0 -6
  55. package/browser/cjs/Db7IyKXFzo8IocDa.cjs +0 -145
  56. package/browser/cjs/DsHPj69dMFG09uD_.cjs +0 -16
  57. package/browser/cjs/DypblOPNMRx5Twgx.cjs +0 -12
  58. package/browser/cjs/QK7YNBstmN86K-xL.cjs +0 -6
  59. package/browser/cjs/VNWvn2kP6ZF0Snzw.cjs +0 -11
  60. package/browser/cjs/dc1YAArM3bSHvRcF.cjs +0 -7
  61. package/browser/cjs/mInXvB8P6r6q7pRY.cjs +0 -11
  62. package/browser/cjs/nop6N-Oi_LKy1Bpc.cjs +0 -42
  63. package/browser/cjs/s45oNHeIvJVeRjn5.cjs +0 -6
  64. package/browser/esm/1y10o01h14oGJtKG.mjs +0 -43
  65. package/browser/esm/BFpc8KBa-fb0nLSt.mjs +0 -46
  66. package/browser/esm/Bmjhrc6YMmfx_1Yi.mjs +0 -1703
  67. package/browser/esm/BnlJVFlQeWerd3KW.mjs +0 -3803
  68. package/browser/esm/BpuH_QvBidPOXgAR.mjs +0 -392
  69. package/browser/esm/CAiWSkkPRgUjk8CN.mjs +0 -424
  70. package/browser/esm/CW8taieVozHhyBOC.mjs +0 -1467
  71. package/browser/esm/CzyEerZmfWrW3i3U.mjs +0 -59
  72. package/browser/esm/D0FBHwm0Oz_wf0tR.mjs +0 -12
  73. package/browser/esm/DM9GPrZpbCcKOnyU.mjs +0 -1352
  74. package/browser/esm/DO1doKZhwYiL7vbF.mjs +0 -1672
  75. package/browser/esm/DS3anstzAV3EJBRw.mjs +0 -84
  76. package/browser/esm/DuEmdSQsXlkCWZIB.mjs +0 -1366
  77. package/browser/esm/FvK-pQsicRjtrKoS.mjs +0 -48
  78. package/browser/esm/KCTJzQeDChqf1yBO.mjs +0 -52
  79. package/browser/esm/P-3pIbidOtRCNsw3.mjs +0 -23
  80. package/browser/esm/W3EFMOPLR1aNXWvF.mjs +0 -2250
  81. package/browser/esm/Z_Sh-N3xHHWLCbEw.mjs +0 -23412
  82. package/browser/esm/mOmzoYDWAtgYndCA.mjs +0 -13391
  83. package/browser/esm/tnJECoiQzUzgUQZE.mjs +0 -44
  84. package/node/esm/54SjtcD6mOreKcCy.mjs +0 -1719
  85. package/node/esm/B2BlMiDOVpIp1FDQ.mjs +0 -1706
  86. package/node/esm/BNEvR1srnnwBgnrF.mjs +0 -1479
  87. package/node/esm/BZ20_F64yjZgn-_G.mjs +0 -1246
  88. package/node/esm/BfzRLuswtxg9uDsX.mjs +0 -78
  89. package/node/esm/C0ZBbkFa-24tJTnw.mjs +0 -60
  90. package/node/esm/CEVO60fX3MAPG0Hg.mjs +0 -1378
  91. package/node/esm/CdFmhVFplZFgBvTo.mjs +0 -44
  92. package/node/esm/Cx4mn0YEVkG-M1VL.mjs +0 -553
  93. package/node/esm/DDWek3aquTe_okr_.mjs +0 -392
  94. package/node/esm/DSLWcwr4qgHARs36.mjs +0 -13464
  95. package/node/esm/iXG86MN0JrtJkpqe.mjs +0 -44
  96. package/node/esm/m2teXjBzZLfLDFPx.mjs +0 -46
  97. package/node/esm/oykDy4erHC0NNHHq.mjs +0 -3776
  98. package/node/esm/sVOd1y3oNBREsKJ7.mjs +0 -86
@@ -1,1246 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- import e from "path";
8
- function t(e2, t2) {
9
- for (var r2 = 0; r2 < t2.length; r2++) {
10
- const n2 = t2[r2];
11
- if ("string" != typeof n2 && !Array.isArray(n2)) {
12
- for (const t3 in n2) if ("default" !== t3 && !(t3 in e2)) {
13
- const r3 = Object.getOwnPropertyDescriptor(n2, t3);
14
- r3 && Object.defineProperty(e2, t3, r3.get ? r3 : { enumerable: true, get: () => n2[t3] });
15
- }
16
- }
17
- }
18
- return Object.freeze(Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }));
19
- }
20
- var r, n = {}, o = {}, i = {}, a = {};
21
- var s, c = {};
22
- function u() {
23
- if (s) return c;
24
- s = 1;
25
- var e2 = c && c.__awaiter || function(e3, t3, r3, n2) {
26
- return new (r3 || (r3 = Promise))(function(o2, i2) {
27
- function a2(e4) {
28
- try {
29
- c2(n2.next(e4));
30
- } catch (e5) {
31
- i2(e5);
32
- }
33
- }
34
- function s2(e4) {
35
- try {
36
- c2(n2.throw(e4));
37
- } catch (e5) {
38
- i2(e5);
39
- }
40
- }
41
- function c2(e4) {
42
- var t4;
43
- e4.done ? o2(e4.value) : (t4 = e4.value, t4 instanceof r3 ? t4 : new r3(function(e5) {
44
- e5(t4);
45
- })).then(a2, s2);
46
- }
47
- c2((n2 = n2.apply(e3, t3 || [])).next());
48
- });
49
- }, t2 = c && c.__generator || function(e3, t3) {
50
- var r3, n2, o2, i2, a2 = { label: 0, sent: function() {
51
- if (1 & o2[0]) throw o2[1];
52
- return o2[1];
53
- }, trys: [], ops: [] };
54
- return i2 = { next: s2(0), throw: s2(1), return: s2(2) }, "function" == typeof Symbol && (i2[Symbol.iterator] = function() {
55
- return this;
56
- }), i2;
57
- function s2(i3) {
58
- return function(s3) {
59
- return function(i4) {
60
- if (r3) throw new TypeError("Generator is already executing.");
61
- for (; a2; ) try {
62
- if (r3 = 1, n2 && (o2 = 2 & i4[0] ? n2.return : i4[0] ? n2.throw || ((o2 = n2.return) && o2.call(n2), 0) : n2.next) && !(o2 = o2.call(n2, i4[1])).done) return o2;
63
- switch (n2 = 0, o2 && (i4 = [2 & i4[0], o2.value]), i4[0]) {
64
- case 0:
65
- case 1:
66
- o2 = i4;
67
- break;
68
- case 4:
69
- return a2.label++, { value: i4[1], done: false };
70
- case 5:
71
- a2.label++, n2 = i4[1], i4 = [0];
72
- continue;
73
- case 7:
74
- i4 = a2.ops.pop(), a2.trys.pop();
75
- continue;
76
- default:
77
- if (!(o2 = a2.trys, (o2 = o2.length > 0 && o2[o2.length - 1]) || 6 !== i4[0] && 2 !== i4[0])) {
78
- a2 = 0;
79
- continue;
80
- }
81
- if (3 === i4[0] && (!o2 || i4[1] > o2[0] && i4[1] < o2[3])) {
82
- a2.label = i4[1];
83
- break;
84
- }
85
- if (6 === i4[0] && a2.label < o2[1]) {
86
- a2.label = o2[1], o2 = i4;
87
- break;
88
- }
89
- if (o2 && a2.label < o2[2]) {
90
- a2.label = o2[2], a2.ops.push(i4);
91
- break;
92
- }
93
- o2[2] && a2.ops.pop(), a2.trys.pop();
94
- continue;
95
- }
96
- i4 = t3.call(e3, a2);
97
- } catch (e4) {
98
- i4 = [6, e4], n2 = 0;
99
- } finally {
100
- r3 = o2 = 0;
101
- }
102
- if (5 & i4[0]) throw i4[1];
103
- return { value: i4[0] ? i4[1] : void 0, done: true };
104
- }([i3, s3]);
105
- };
106
- }
107
- };
108
- Object.defineProperty(c, "__esModule", { value: true }), c.JsDelivrSourceResolver = void 0;
109
- var r2 = function() {
110
- function r3() {
111
- }
112
- return r3.prototype.resolvePackageJson = function(r4, n2, o2) {
113
- return e2(this, void 0, void 0, function() {
114
- return t2(this, function(e3) {
115
- switch (e3.label) {
116
- case 0:
117
- return [4, this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(r4).concat(n2 ? "@".concat(n2) : "").concat(o2 ? "/".concat(o2) : "", "/package.json"))];
118
- case 1:
119
- return [2, e3.sent()];
120
- }
121
- });
122
- });
123
- }, r3.prototype.resolveSourceFile = function(r4, n2, o2) {
124
- return e2(this, void 0, void 0, function() {
125
- return t2(this, function(e3) {
126
- switch (e3.label) {
127
- case 0:
128
- return [4, this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(r4).concat(n2 ? "@".concat(n2) : "", "/").concat(o2))];
129
- case 1:
130
- return [2, e3.sent()];
131
- }
132
- });
133
- });
134
- }, r3.prototype.resolveFile = function(r4) {
135
- return e2(this, void 0, void 0, function() {
136
- var e3;
137
- return t2(this, function(t3) {
138
- switch (t3.label) {
139
- case 0:
140
- return [4, fetch(r4, { method: "GET" })];
141
- case 1:
142
- return (e3 = t3.sent()).ok ? [4, e3.text()] : [3, 3];
143
- case 2:
144
- return [2, t3.sent()];
145
- case 3:
146
- if (404 === e3.status) return [2, ""];
147
- throw Error("Error other than 404 while fetching from Unpkg at ".concat(r4));
148
- case 4:
149
- return [2];
150
- }
151
- });
152
- });
153
- }, r3;
154
- }();
155
- return c.JsDelivrSourceResolver = r2, c;
156
- }
157
- var l, p = {}, h = {};
158
- var f, d = {};
159
- function v() {
160
- if (f) return d;
161
- f = 1;
162
- var t2 = d && d.__importDefault || function(e2) {
163
- return e2 && e2.__esModule ? e2 : { default: e2 };
164
- };
165
- Object.defineProperty(d, "__esModule", { value: true }), d.importResourcePathToString = void 0;
166
- var r2 = t2(e);
167
- return d.importResourcePathToString = function(e2) {
168
- var t3;
169
- switch (e2.kind) {
170
- case "package":
171
- return r2.default.join(e2.packageName, null !== (t3 = e2.importPath) && void 0 !== t3 ? t3 : "", "package.json");
172
- case "relative":
173
- return r2.default.join(e2.sourcePath, e2.importPath);
174
- case "relative-in-package":
175
- return r2.default.join(e2.packageName, e2.sourcePath, e2.importPath);
176
- }
177
- }, d;
178
- }
179
- var y, m = {};
180
- function g() {
181
- if (y) return m;
182
- y = 1, Object.defineProperty(m, "__esModule", { value: true }), m.invokeUpdate = void 0;
183
- return m.invokeUpdate = function(e2, t2) {
184
- var r2, n2 = "".concat(e2.type, ": ");
185
- switch (e2.type) {
186
- case "CodeChanged":
187
- case "ResolveNewImports":
188
- n2 += "";
189
- break;
190
- case "LookedUpTypeFile":
191
- n2 += '"'.concat(e2.path, '" was ').concat(e2.success ? "sucessfully" : "not sucessfully", " looked up");
192
- break;
193
- case "AttemptedLookUpFile":
194
- n2 += '"'.concat(e2.path, '" was ').concat(e2.success ? "sucessfully" : "not sucessfully", " attempted to looked up");
195
- break;
196
- case "LookedUpPackage":
197
- n2 += 'package.json for package "'.concat(e2.package, '" was ').concat(e2.success ? "sucessfully" : "not sucessfully", " looked up").concat(e2.definitelyTyped ? " (found in definitely typed repo)" : "");
198
- break;
199
- case "LoadedFromCache":
200
- n2 += '"'.concat(e2.importPath, '" was loaded from cache');
201
- break;
202
- case "StoredToCache":
203
- n2 += '"'.concat(e2.importPath, '" was stored to cache');
204
- }
205
- n2.endsWith(": ") && (n2 = n2.slice(void 0, -2)), null === (r2 = t2.onUpdate) || void 0 === r2 || r2.call(t2, e2, n2);
206
- }, m;
207
- }
208
- var b, k, w, _, P = {};
209
- function O() {
210
- if (b) return P;
211
- b = 1, Object.defineProperty(P, "__esModule", { value: true }), P.RecursionDepth = void 0;
212
- var e2 = function() {
213
- function e3(e4, t2, r2) {
214
- void 0 === t2 && (t2 = 0), void 0 === r2 && (r2 = 0), this.options = e4, this.fileRecursionDepth = t2, this.packageRecursionDepth = r2;
215
- }
216
- return e3.prototype.nextPackage = function() {
217
- return new e3(this.options, this.fileRecursionDepth, this.packageRecursionDepth + 1);
218
- }, e3.prototype.nextFile = function() {
219
- return new e3(this.options, this.fileRecursionDepth + 1, this.packageRecursionDepth);
220
- }, e3.prototype.same = function() {
221
- return new e3(this.options, this.fileRecursionDepth, this.packageRecursionDepth);
222
- }, e3.prototype.shouldStop = function() {
223
- return this.options.fileRecursionDepth > 0 && this.fileRecursionDepth >= this.options.fileRecursionDepth || this.options.packageRecursionDepth > 0 && this.packageRecursionDepth >= this.options.packageRecursionDepth;
224
- }, e3;
225
- }();
226
- return P.RecursionDepth = e2, P;
227
- }
228
- function R() {
229
- if (k) return p;
230
- k = 1;
231
- var t2 = p && p.__assign || function() {
232
- return t2 = Object.assign || function(e2) {
233
- for (var t3, r3 = 1, n3 = arguments.length; r3 < n3; r3++) for (var o3 in t3 = arguments[r3]) Object.prototype.hasOwnProperty.call(t3, o3) && (e2[o3] = t3[o3]);
234
- return e2;
235
- }, t2.apply(this, arguments);
236
- }, r2 = p && p.__createBinding || (Object.create ? function(e2, t3, r3, n3) {
237
- void 0 === n3 && (n3 = r3);
238
- var o3 = Object.getOwnPropertyDescriptor(t3, r3);
239
- o3 && !("get" in o3 ? !t3.__esModule : o3.writable || o3.configurable) || (o3 = { enumerable: true, get: function() {
240
- return t3[r3];
241
- } }), Object.defineProperty(e2, n3, o3);
242
- } : function(e2, t3, r3, n3) {
243
- void 0 === n3 && (n3 = r3), e2[n3] = t3[r3];
244
- }), n2 = p && p.__setModuleDefault || (Object.create ? function(e2, t3) {
245
- Object.defineProperty(e2, "default", { enumerable: true, value: t3 });
246
- } : function(e2, t3) {
247
- e2.default = t3;
248
- }), o2 = p && p.__importStar || function(e2) {
249
- if (e2 && e2.__esModule) return e2;
250
- var t3 = {};
251
- if (null != e2) for (var o3 in e2) "default" !== o3 && Object.prototype.hasOwnProperty.call(e2, o3) && r2(t3, e2, o3);
252
- return n2(t3, e2), t3;
253
- }, i2 = p && p.__awaiter || function(e2, t3, r3, n3) {
254
- return new (r3 || (r3 = Promise))(function(o3, i3) {
255
- function a3(e3) {
256
- try {
257
- c3(n3.next(e3));
258
- } catch (e4) {
259
- i3(e4);
260
- }
261
- }
262
- function s3(e3) {
263
- try {
264
- c3(n3.throw(e3));
265
- } catch (e4) {
266
- i3(e4);
267
- }
268
- }
269
- function c3(e3) {
270
- var t4;
271
- e3.done ? o3(e3.value) : (t4 = e3.value, t4 instanceof r3 ? t4 : new r3(function(e4) {
272
- e4(t4);
273
- })).then(a3, s3);
274
- }
275
- c3((n3 = n3.apply(e2, t3 || [])).next());
276
- });
277
- }, a2 = p && p.__generator || function(e2, t3) {
278
- var r3, n3, o3, i3, a3 = { label: 0, sent: function() {
279
- if (1 & o3[0]) throw o3[1];
280
- return o3[1];
281
- }, trys: [], ops: [] };
282
- return i3 = { next: s3(0), throw: s3(1), return: s3(2) }, "function" == typeof Symbol && (i3[Symbol.iterator] = function() {
283
- return this;
284
- }), i3;
285
- function s3(i4) {
286
- return function(s4) {
287
- return function(i5) {
288
- if (r3) throw new TypeError("Generator is already executing.");
289
- for (; a3; ) try {
290
- if (r3 = 1, n3 && (o3 = 2 & i5[0] ? n3.return : i5[0] ? n3.throw || ((o3 = n3.return) && o3.call(n3), 0) : n3.next) && !(o3 = o3.call(n3, i5[1])).done) return o3;
291
- switch (n3 = 0, o3 && (i5 = [2 & i5[0], o3.value]), i5[0]) {
292
- case 0:
293
- case 1:
294
- o3 = i5;
295
- break;
296
- case 4:
297
- return a3.label++, { value: i5[1], done: false };
298
- case 5:
299
- a3.label++, n3 = i5[1], i5 = [0];
300
- continue;
301
- case 7:
302
- i5 = a3.ops.pop(), a3.trys.pop();
303
- continue;
304
- default:
305
- if (!(o3 = a3.trys, (o3 = o3.length > 0 && o3[o3.length - 1]) || 6 !== i5[0] && 2 !== i5[0])) {
306
- a3 = 0;
307
- continue;
308
- }
309
- if (3 === i5[0] && (!o3 || i5[1] > o3[0] && i5[1] < o3[3])) {
310
- a3.label = i5[1];
311
- break;
312
- }
313
- if (6 === i5[0] && a3.label < o3[1]) {
314
- a3.label = o3[1], o3 = i5;
315
- break;
316
- }
317
- if (o3 && a3.label < o3[2]) {
318
- a3.label = o3[2], a3.ops.push(i5);
319
- break;
320
- }
321
- o3[2] && a3.ops.pop(), a3.trys.pop();
322
- continue;
323
- }
324
- i5 = t3.call(e2, a3);
325
- } catch (e3) {
326
- i5 = [6, e3], n3 = 0;
327
- } finally {
328
- r3 = o3 = 0;
329
- }
330
- if (5 & i5[0]) throw i5[1];
331
- return { value: i5[0] ? i5[1] : void 0, done: true };
332
- }([i4, s4]);
333
- };
334
- }
335
- }, s2 = p && p.__values || function(e2) {
336
- var t3 = "function" == typeof Symbol && Symbol.iterator, r3 = t3 && e2[t3], n3 = 0;
337
- if (r3) return r3.call(e2);
338
- if (e2 && "number" == typeof e2.length) return { next: function() {
339
- return e2 && n3 >= e2.length && (e2 = void 0), { value: e2 && e2[n3++], done: !e2 };
340
- } };
341
- throw new TypeError(t3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
342
- }, c2 = p && p.__read || function(e2, t3) {
343
- var r3 = "function" == typeof Symbol && e2[Symbol.iterator];
344
- if (!r3) return e2;
345
- var n3, o3, i3 = r3.call(e2), a3 = [];
346
- try {
347
- for (; (void 0 === t3 || t3-- > 0) && !(n3 = i3.next()).done; ) a3.push(n3.value);
348
- } catch (e3) {
349
- o3 = { error: e3 };
350
- } finally {
351
- try {
352
- n3 && !n3.done && (r3 = i3.return) && r3.call(i3);
353
- } finally {
354
- if (o3) throw o3.error;
355
- }
356
- }
357
- return a3;
358
- };
359
- Object.defineProperty(p, "__esModule", { value: true }), p.ImportResolver = void 0;
360
- var u2 = function() {
361
- if (l) return h;
362
- l = 1;
363
- var t3 = h && h.__createBinding || (Object.create ? function(e2, t4, r4, n4) {
364
- void 0 === n4 && (n4 = r4);
365
- var o4 = Object.getOwnPropertyDescriptor(t4, r4);
366
- o4 && !("get" in o4 ? !t4.__esModule : o4.writable || o4.configurable) || (o4 = { enumerable: true, get: function() {
367
- return t4[r4];
368
- } }), Object.defineProperty(e2, n4, o4);
369
- } : function(e2, t4, r4, n4) {
370
- void 0 === n4 && (n4 = r4), e2[n4] = t4[r4];
371
- }), r3 = h && h.__setModuleDefault || (Object.create ? function(e2, t4) {
372
- Object.defineProperty(e2, "default", { enumerable: true, value: t4 });
373
- } : function(e2, t4) {
374
- e2.default = t4;
375
- }), n3 = h && h.__importStar || function(e2) {
376
- if (e2 && e2.__esModule) return e2;
377
- var n4 = {};
378
- if (null != e2) for (var o4 in e2) "default" !== o4 && Object.prototype.hasOwnProperty.call(e2, o4) && t3(n4, e2, o4);
379
- return r3(n4, e2), n4;
380
- }, o3 = h && h.__read || function(e2, t4) {
381
- var r4 = "function" == typeof Symbol && e2[Symbol.iterator];
382
- if (!r4) return e2;
383
- var n4, o4, i4 = r4.call(e2), a4 = [];
384
- try {
385
- for (; (void 0 === t4 || t4-- > 0) && !(n4 = i4.next()).done; ) a4.push(n4.value);
386
- } catch (e3) {
387
- o4 = { error: e3 };
388
- } finally {
389
- try {
390
- n4 && !n4.done && (r4 = i4.return) && r4.call(i4);
391
- } finally {
392
- if (o4) throw o4.error;
393
- }
394
- }
395
- return a4;
396
- }, i3 = h && h.__spreadArray || function(e2, t4, r4) {
397
- if (r4 || 2 === arguments.length) for (var n4, o4 = 0, i4 = t4.length; o4 < i4; o4++) !n4 && o4 in t4 || (n4 || (n4 = Array.prototype.slice.call(t4, 0, o4)), n4[o4] = t4[o4]);
398
- return e2.concat(n4 || Array.prototype.slice.call(t4));
399
- };
400
- Object.defineProperty(h, "__esModule", { value: true }), h.DependencyParser = void 0;
401
- var a3 = n3(e), s3 = function() {
402
- function e2() {
403
- this.REGEX_CLEAN = /[\n|\r]/g, this.REGEX_DETECT_IMPORT = /(?:(?:(?:import)|(?:export))(?:.)*?from\s+["']([^"']+)["'])|(?:((?:require|import))(?:\s+)?\(["']([^"']+)["']\))|(?:\/+\s+<reference\s+path=["']([^"']+)["']\s+\/>)/g, this.REGEX_NODE_MODULE = /^node:([\w\W\/]+)$/;
404
- }
405
- return e2.prototype.parseDependencies = function(e3, t4) {
406
- var r4 = this;
407
- return i3([], o3(e3.matchAll(this.REGEX_DETECT_IMPORT)), false).map(function(e4) {
408
- var t5, r5;
409
- return null !== (r5 = null !== (t5 = e4[1]) && void 0 !== t5 ? t5 : e4[2]) && void 0 !== r5 ? r5 : e4[3];
410
- }).filter(function(e4) {
411
- return !!e4;
412
- }).map(function(e4) {
413
- return r4.resolvePath(e4, t4);
414
- });
415
- }, e2.prototype.resolvePath = function(e3, t4) {
416
- var r4 = e3.match(this.REGEX_NODE_MODULE);
417
- if (r4) return { kind: "relative-in-package", packageName: "@types/node", importPath: "".concat(r4[1], ".d.ts"), sourcePath: "" };
418
- if ("string" == typeof t4) {
419
- if (e3.startsWith(".")) return { kind: "relative", importPath: e3, sourcePath: t4 };
420
- if (e3.startsWith("@")) {
421
- var n4 = e3.split("/");
422
- return { kind: "package", packageName: "".concat(n4[0], "/").concat(n4[1]), importPath: n4.slice(2).join("/") };
423
- }
424
- return { kind: "package", packageName: (n4 = e3.split("/"))[0], importPath: n4.slice(1).join("/") };
425
- }
426
- switch (t4.kind) {
427
- case "package":
428
- throw Error("TODO?");
429
- case "relative":
430
- throw Error("TODO2?");
431
- case "relative-in-package":
432
- return e3.startsWith(".") ? { kind: "relative-in-package", packageName: t4.packageName, sourcePath: a3.join(t4.sourcePath, t4.importPath), importPath: e3 } : e3.startsWith("@") ? (n4 = e3.split("/"), { kind: "package", packageName: "".concat(n4[0], "/").concat(n4[1]), importPath: n4.slice(2).join("/") }) : { kind: "package", packageName: (n4 = e3.split("/"))[0], importPath: n4.slice(1).join("/") };
433
- }
434
- }, e2;
435
- }();
436
- return h.DependencyParser = s3, h;
437
- }(), f2 = v(), d2 = o2(e), y2 = g(), m2 = O(), b2 = function() {
438
- function e2(e3) {
439
- var t3, r3;
440
- if (this.options = e3, this.loadedFiles = [], this.dependencyParser = new u2.DependencyParser(), this.cache = e3.sourceCache, this.sourceResolver = e3.sourceResolver, this.newImportsResolved = false, this.monaco = e3.monaco, e3.preloadPackages && e3.versions) {
441
- this.versions = e3.versions;
442
- try {
443
- for (var n3 = s2(Object.entries(e3.versions)), o3 = n3.next(); !o3.done; o3 = n3.next()) {
444
- var i3 = c2(o3.value, 2), a3 = i3[0];
445
- i3[1];
446
- this.resolveImport({ kind: "package", packageName: a3, importPath: "" }, new m2.RecursionDepth(this.options)).catch(function(e4) {
447
- console.error(e4);
448
- });
449
- }
450
- } catch (e4) {
451
- t3 = { error: e4 };
452
- } finally {
453
- try {
454
- o3 && !o3.done && (r3 = n3.return) && r3.call(n3);
455
- } finally {
456
- if (t3) throw t3.error;
457
- }
458
- }
459
- }
460
- }
461
- return e2.prototype.wereNewImportsResolved = function() {
462
- return this.newImportsResolved;
463
- }, e2.prototype.resetNewImportsResolved = function() {
464
- this.newImportsResolved = false;
465
- }, e2.prototype.resolveImportsInFile = function(e3, t3, r3) {
466
- var n3, o3, c3;
467
- return i2(this, void 0, void 0, function() {
468
- var i3, u3, l2, p2, h2, f3, d3, v2;
469
- return a2(this, function(a3) {
470
- switch (a3.label) {
471
- case 0:
472
- if (r3.shouldStop()) return [2];
473
- i3 = this.dependencyParser.parseDependencies(e3, t3), a3.label = 1;
474
- case 1:
475
- a3.trys.push([1, 8, 9, 10]), u3 = s2(i3), l2 = u3.next(), a3.label = 2;
476
- case 2:
477
- if (l2.done) return [3, 7];
478
- p2 = l2.value, a3.label = 3;
479
- case 3:
480
- return a3.trys.push([3, 5, , 6]), [4, this.resolveImport(p2, r3)];
481
- case 4:
482
- return a3.sent(), [3, 6];
483
- case 5:
484
- return h2 = a3.sent(), this.options.onError ? null === (o3 = (n3 = this.options).onError) || void 0 === o3 || o3.call(n3, null !== (c3 = h2.message) && void 0 !== c3 ? c3 : h2) : console.error(h2), [3, 6];
485
- case 6:
486
- return l2 = u3.next(), [3, 2];
487
- case 7:
488
- return [3, 10];
489
- case 8:
490
- return f3 = a3.sent(), d3 = { error: f3 }, [3, 10];
491
- case 9:
492
- try {
493
- l2 && !l2.done && (v2 = u3.return) && v2.call(u3);
494
- } finally {
495
- if (d3) throw d3.error;
496
- }
497
- return [7];
498
- case 10:
499
- return [2];
500
- }
501
- });
502
- });
503
- }, e2.prototype.resolveImport = function(e3, t3) {
504
- return i2(this, void 0, void 0, function() {
505
- var r3, n3;
506
- return a2(this, function(o3) {
507
- switch (o3.label) {
508
- case 0:
509
- if (r3 = this.hashImportResourcePath(e3), this.loadedFiles.includes(r3)) return [2];
510
- switch (this.loadedFiles.push(r3), e3.kind) {
511
- case "package":
512
- return [3, 1];
513
- case "relative":
514
- return [3, 5];
515
- case "relative-in-package":
516
- return [3, 6];
517
- }
518
- return [3, 8];
519
- case 1:
520
- return [4, this.resolveImportFromPackageRoot(e3)];
521
- case 2:
522
- return (n3 = o3.sent()) ? [4, this.resolveImportInPackage(n3, t3.nextPackage().nextFile())] : [3, 4];
523
- case 3:
524
- case 7:
525
- return [2, o3.sent()];
526
- case 4:
527
- return [3, 8];
528
- case 5:
529
- throw Error("Not implemented yet");
530
- case 6:
531
- return [4, this.resolveImportInPackage(e3, t3.nextFile())];
532
- case 8:
533
- return [2];
534
- }
535
- });
536
- });
537
- }, e2.prototype.resolveImportInPackage = function(e3, t3) {
538
- return i2(this, void 0, void 0, function() {
539
- var r3, n3, o3;
540
- return a2(this, function(i3) {
541
- switch (i3.label) {
542
- case 0:
543
- return [4, this.loadSourceFileContents(e3)];
544
- case 1:
545
- return (r3 = i3.sent()) ? (n3 = r3.source, o3 = r3.at, this.createModel(n3, this.monaco.Uri.parse(this.options.fileRootPath + d2.join("node_modules/".concat(e3.packageName), o3))), [4, this.resolveImportsInFile(n3, { kind: "relative-in-package", packageName: e3.packageName, sourcePath: d2.dirname(o3), importPath: "" }, t3)]) : [3, 3];
546
- case 2:
547
- i3.sent(), i3.label = 3;
548
- case 3:
549
- return [2];
550
- }
551
- });
552
- });
553
- }, e2.prototype.resolveImportFromPackageRoot = function(e3) {
554
- var t3, r3, n3, o3, s3, c3, u3, l2, p2;
555
- return i2(this, void 0, void 0, function() {
556
- var i3, h2, f3, v2, m3, g2, b3, k2, w2;
557
- return a2(this, function(a3) {
558
- switch (a3.label) {
559
- case 0:
560
- return i3 = { type: "LookedUpPackage", package: e3.packageName, definitelyTyped: false, success: false }, !this.options.onlySpecifiedPackages || (null === (t3 = this.versions) || void 0 === t3 ? void 0 : t3[e3.packageName]) || (null === (r3 = this.versions) || void 0 === r3 ? void 0 : r3["@types/" + e3.packageName]) ? (h2 = null !== (o3 = null === (n3 = e3.importPath) || void 0 === n3 ? void 0 : n3.length) && void 0 !== o3 && o3, f3 = h2 ? "/".concat(e3.importPath) : "", [4, this.resolvePackageJson(e3.packageName, null === (s3 = this.versions) || void 0 === s3 ? void 0 : s3[e3.packageName], h2 ? e3.importPath : void 0)]) : ((0, y2.invokeUpdate)(i3, this.options), [2]);
561
- case 1:
562
- return (v2 = a3.sent()) || !h2 ? [3, 3] : [4, this.resolvePackageJson(e3.packageName, null === (c3 = this.versions) || void 0 === c3 ? void 0 : c3[e3.packageName])];
563
- case 2:
564
- v2 = a3.sent(), f3 = "", a3.label = 3;
565
- case 3:
566
- return v2 ? (m3 = JSON.parse(v2)).typings || m3.types ? (w2 = m3.typings || m3.types, this.createModel(v2, this.monaco.Uri.parse("".concat(this.options.fileRootPath, "node_modules/").concat(e3.packageName).concat(f3, "/package.json"))), (0, y2.invokeUpdate)({ type: "LookedUpPackage", package: e3.packageName, definitelyTyped: false, success: true }, this.options), this.setVersion(e3.packageName, m3.version), [2, { kind: "relative-in-package", packageName: e3.packageName, sourcePath: "", importPath: d2.join(null !== (u3 = e3.importPath) && void 0 !== u3 ? u3 : "", w2.startsWith("./") ? w2.slice(2) : w2) }]) : [3, 4] : [3, 7];
567
- case 4:
568
- return g2 = "@types/".concat(e3.packageName.startsWith("@") ? e3.packageName.slice(1).replace(/\//, "__") : e3.packageName), [4, this.resolvePackageJson(g2, null === (l2 = this.versions) || void 0 === l2 ? void 0 : l2[g2])];
569
- case 5:
570
- if (b3 = a3.sent()) {
571
- if ((k2 = JSON.parse(b3)).typings || k2.types) return w2 = k2.typings || k2.types, this.createModel(b3, this.monaco.Uri.parse("".concat(this.options.fileRootPath, "node_modules/").concat(g2, "/package.json"))), (0, y2.invokeUpdate)({ type: "LookedUpPackage", package: g2, definitelyTyped: true, success: true }, this.options), this.setVersion(g2, k2.version), [2, { kind: "relative-in-package", packageName: g2, sourcePath: "", importPath: d2.join(null !== (p2 = e3.importPath) && void 0 !== p2 ? p2 : "", w2.startsWith("./") ? w2.slice(2) : w2) }];
572
- (0, y2.invokeUpdate)(i3, this.options);
573
- } else (0, y2.invokeUpdate)(i3, this.options);
574
- a3.label = 6;
575
- case 6:
576
- return [3, 8];
577
- case 7:
578
- (0, y2.invokeUpdate)(i3, this.options), a3.label = 8;
579
- case 8:
580
- return [2];
581
- }
582
- });
583
- });
584
- }, e2.prototype.loadSourceFileContents = function(e3) {
585
- return i2(this, void 0, void 0, function() {
586
- var t3, r3, n3, o3, i3, c3, u3, l2, p2, h2, f3, v2, m3, g2, b3, k2;
587
- return a2(this, function(a3) {
588
- switch (a3.label) {
589
- case 0:
590
- return t3 = d2.join(e3.packageName, e3.sourcePath, e3.importPath), r3 = { type: "LookedUpTypeFile", path: t3, definitelyTyped: false, success: false }, n3 = e3.packageName, o3 = this.getVersion(e3.packageName), (i3 = [".d.ts", "/index.d.ts", ".ts", ".tsx", "/index.ts", "/index.tsx"]).map(function(t4) {
591
- return e3.importPath.endsWith(t4);
592
- }).reduce(function(e4, t4) {
593
- return e4 || t4;
594
- }, false) ? [4, this.resolveSourceFile(n3, o3, d2.join(e3.sourcePath, e3.importPath))] : [3, 2];
595
- case 1:
596
- return (g2 = a3.sent()) ? [2, { source: g2, at: d2.join(e3.sourcePath, e3.importPath) }] : [3, 9];
597
- case 2:
598
- a3.trys.push([2, 7, 8, 9]), c3 = s2(i3), u3 = c3.next(), a3.label = 3;
599
- case 3:
600
- return u3.done ? [3, 6] : (l2 = u3.value, p2 = d2.join(e3.sourcePath, e3.importPath), m3 = (".d.ts" === l2 && p2.endsWith(".js") ? p2.slice(0, -3) : p2) + l2, [4, this.resolveSourceFile(n3, o3, m3)]);
601
- case 4:
602
- if (g2 = a3.sent(), (0, y2.invokeUpdate)({ type: "AttemptedLookUpFile", path: d2.join(n3, m3), success: !!g2 }, this.options), g2) return (0, y2.invokeUpdate)({ type: "LookedUpTypeFile", path: d2.join(n3, m3), success: true }, this.options), [2, { source: g2, at: m3 }];
603
- a3.label = 5;
604
- case 5:
605
- return u3 = c3.next(), [3, 3];
606
- case 6:
607
- return [3, 9];
608
- case 7:
609
- return h2 = a3.sent(), b3 = { error: h2 }, [3, 9];
610
- case 8:
611
- try {
612
- u3 && !u3.done && (k2 = c3.return) && k2.call(c3);
613
- } finally {
614
- if (b3) throw b3.error;
615
- }
616
- return [7];
617
- case 9:
618
- return [4, this.resolvePackageJson(n3, o3, d2.join(e3.sourcePath, e3.importPath))];
619
- case 10:
620
- return (f3 = a3.sent()) && (v2 = JSON.parse(f3).types) ? (m3 = d2.join(e3.sourcePath, e3.importPath, v2), [4, this.resolveSourceFile(n3, o3, m3)]) : [3, 12];
621
- case 11:
622
- if (g2 = a3.sent()) return (0, y2.invokeUpdate)({ type: "LookedUpTypeFile", path: d2.join(n3, m3), success: true }, this.options), [2, { source: g2, at: m3 }];
623
- a3.label = 12;
624
- case 12:
625
- return (0, y2.invokeUpdate)(r3, this.options), [2, null];
626
- }
627
- });
628
- });
629
- }, e2.prototype.getVersion = function(e3) {
630
- var t3;
631
- return null === (t3 = this.versions) || void 0 === t3 ? void 0 : t3[e3];
632
- }, e2.prototype.setVersions = function(e3) {
633
- var t3, r3;
634
- this.versions = e3, null === (r3 = (t3 = this.options).onUpdateVersions) || void 0 === r3 || r3.call(t3, e3);
635
- }, e2.prototype.setVersion = function(e3, r3) {
636
- var n3;
637
- this.setVersions(t2(t2({}, this.versions), ((n3 = {})[e3] = r3, n3)));
638
- }, e2.prototype.createModel = function(e3, t3) {
639
- t3 = t3.with({ path: t3.path.replace("@types/", "") }), this.monaco.editor.getModel(t3) || (this.monaco.editor.createModel(e3, "typescript", t3), this.newImportsResolved = true);
640
- }, e2.prototype.hashImportResourcePath = function(e3) {
641
- return (0, f2.importResourcePathToString)(e3);
642
- }, e2.prototype.resolvePackageJson = function(e3, t3, r3) {
643
- return i2(this, void 0, void 0, function() {
644
- var n3, o3, i3, s3;
645
- return a2(this, function(a3) {
646
- switch (a3.label) {
647
- case 0:
648
- return n3 = d2.join(e3 + (t3 ? "@".concat(t3) : ""), null != r3 ? r3 : "", "package.json"), o3 = false, i3 = void 0, this.cache.isFileAvailable ? [4, this.cache.isFileAvailable(n3)] : [3, 2];
649
- case 1:
650
- return o3 = a3.sent(), [3, 4];
651
- case 2:
652
- return [4, this.cache.getFile(n3)];
653
- case 3:
654
- i3 = a3.sent(), o3 = void 0 !== i3, a3.label = 4;
655
- case 4:
656
- return o3 ? null == i3 ? [3, 5] : (s3 = i3, [3, 7]) : [3, 8];
657
- case 5:
658
- return [4, this.cache.getFile(n3)];
659
- case 6:
660
- s3 = a3.sent(), a3.label = 7;
661
- case 7:
662
- return [2, s3];
663
- case 8:
664
- return [4, this.sourceResolver.resolvePackageJson(e3, t3, r3)];
665
- case 9:
666
- return (i3 = a3.sent()) && this.cache.storeFile(n3, i3), [2, i3];
667
- }
668
- });
669
- });
670
- }, e2.prototype.resolveSourceFile = function(e3, t3, r3) {
671
- return i2(this, void 0, void 0, function() {
672
- var n3, o3, i3, s3;
673
- return a2(this, function(a3) {
674
- switch (a3.label) {
675
- case 0:
676
- return n3 = d2.join(e3 + (t3 ? "@".concat(t3) : ""), r3), o3 = false, i3 = void 0, this.cache.isFileAvailable ? [4, this.cache.isFileAvailable(n3)] : [3, 2];
677
- case 1:
678
- return o3 = a3.sent(), [3, 4];
679
- case 2:
680
- return [4, this.cache.getFile(n3)];
681
- case 3:
682
- i3 = a3.sent(), o3 = void 0 !== i3, a3.label = 4;
683
- case 4:
684
- return o3 ? ((0, y2.invokeUpdate)({ type: "LoadedFromCache", importPath: n3 }, this.options), null == i3 ? [3, 5] : (s3 = i3, [3, 7])) : [3, 8];
685
- case 5:
686
- return [4, this.cache.getFile(n3)];
687
- case 6:
688
- s3 = a3.sent(), a3.label = 7;
689
- case 7:
690
- return [2, s3];
691
- case 8:
692
- return [4, this.sourceResolver.resolveSourceFile(e3, t3, r3)];
693
- case 9:
694
- return (i3 = a3.sent()) && ((0, y2.invokeUpdate)({ type: "StoredToCache", importPath: n3 }, this.options), this.cache.storeFile(n3, i3)), [2, i3];
695
- }
696
- });
697
- });
698
- }, e2;
699
- }();
700
- return p.ImportResolver = b2, p;
701
- }
702
- function j() {
703
- if (w) return i;
704
- w = 1;
705
- var t2 = i && i.__assign || function() {
706
- return t2 = Object.assign || function(e2) {
707
- for (var t3, r2 = 1, n3 = arguments.length; r2 < n3; r2++) for (var o3 in t3 = arguments[r2]) Object.prototype.hasOwnProperty.call(t3, o3) && (e2[o3] = t3[o3]);
708
- return e2;
709
- }, t2.apply(this, arguments);
710
- }, n2 = i && i.__createBinding || (Object.create ? function(e2, t3, r2, n3) {
711
- void 0 === n3 && (n3 = r2);
712
- var o3 = Object.getOwnPropertyDescriptor(t3, r2);
713
- o3 && !("get" in o3 ? !t3.__esModule : o3.writable || o3.configurable) || (o3 = { enumerable: true, get: function() {
714
- return t3[r2];
715
- } }), Object.defineProperty(e2, n3, o3);
716
- } : function(e2, t3, r2, n3) {
717
- void 0 === n3 && (n3 = r2), e2[n3] = t3[r2];
718
- }), o2 = i && i.__setModuleDefault || (Object.create ? function(e2, t3) {
719
- Object.defineProperty(e2, "default", { enumerable: true, value: t3 });
720
- } : function(e2, t3) {
721
- e2.default = t3;
722
- }), s2 = i && i.__importStar || function(e2) {
723
- if (e2 && e2.__esModule) return e2;
724
- var t3 = {};
725
- if (null != e2) for (var r2 in e2) "default" !== r2 && Object.prototype.hasOwnProperty.call(e2, r2) && n2(t3, e2, r2);
726
- return o2(t3, e2), t3;
727
- }, c2 = i && i.__awaiter || function(e2, t3, r2, n3) {
728
- return new (r2 || (r2 = Promise))(function(o3, i2) {
729
- function a2(e3) {
730
- try {
731
- c3(n3.next(e3));
732
- } catch (e4) {
733
- i2(e4);
734
- }
735
- }
736
- function s3(e3) {
737
- try {
738
- c3(n3.throw(e3));
739
- } catch (e4) {
740
- i2(e4);
741
- }
742
- }
743
- function c3(e3) {
744
- var t4;
745
- e3.done ? o3(e3.value) : (t4 = e3.value, t4 instanceof r2 ? t4 : new r2(function(e4) {
746
- e4(t4);
747
- })).then(a2, s3);
748
- }
749
- c3((n3 = n3.apply(e2, t3 || [])).next());
750
- });
751
- }, l2 = i && i.__generator || function(e2, t3) {
752
- var r2, n3, o3, i2, a2 = { label: 0, sent: function() {
753
- if (1 & o3[0]) throw o3[1];
754
- return o3[1];
755
- }, trys: [], ops: [] };
756
- return i2 = { next: s3(0), throw: s3(1), return: s3(2) }, "function" == typeof Symbol && (i2[Symbol.iterator] = function() {
757
- return this;
758
- }), i2;
759
- function s3(i3) {
760
- return function(s4) {
761
- return function(i4) {
762
- if (r2) throw new TypeError("Generator is already executing.");
763
- for (; a2; ) try {
764
- if (r2 = 1, n3 && (o3 = 2 & i4[0] ? n3.return : i4[0] ? n3.throw || ((o3 = n3.return) && o3.call(n3), 0) : n3.next) && !(o3 = o3.call(n3, i4[1])).done) return o3;
765
- switch (n3 = 0, o3 && (i4 = [2 & i4[0], o3.value]), i4[0]) {
766
- case 0:
767
- case 1:
768
- o3 = i4;
769
- break;
770
- case 4:
771
- return a2.label++, { value: i4[1], done: false };
772
- case 5:
773
- a2.label++, n3 = i4[1], i4 = [0];
774
- continue;
775
- case 7:
776
- i4 = a2.ops.pop(), a2.trys.pop();
777
- continue;
778
- default:
779
- if (!(o3 = a2.trys, (o3 = o3.length > 0 && o3[o3.length - 1]) || 6 !== i4[0] && 2 !== i4[0])) {
780
- a2 = 0;
781
- continue;
782
- }
783
- if (3 === i4[0] && (!o3 || i4[1] > o3[0] && i4[1] < o3[3])) {
784
- a2.label = i4[1];
785
- break;
786
- }
787
- if (6 === i4[0] && a2.label < o3[1]) {
788
- a2.label = o3[1], o3 = i4;
789
- break;
790
- }
791
- if (o3 && a2.label < o3[2]) {
792
- a2.label = o3[2], a2.ops.push(i4);
793
- break;
794
- }
795
- o3[2] && a2.ops.pop(), a2.trys.pop();
796
- continue;
797
- }
798
- i4 = t3.call(e2, a2);
799
- } catch (e3) {
800
- i4 = [6, e3], n3 = 0;
801
- } finally {
802
- r2 = o3 = 0;
803
- }
804
- if (5 & i4[0]) throw i4[1];
805
- return { value: i4[0] ? i4[1] : void 0, done: true };
806
- }([i3, s4]);
807
- };
808
- }
809
- }, p2 = i && i.__values || function(e2) {
810
- var t3 = "function" == typeof Symbol && Symbol.iterator, r2 = t3 && e2[t3], n3 = 0;
811
- if (r2) return r2.call(e2);
812
- if (e2 && "number" == typeof e2.length) return { next: function() {
813
- return e2 && n3 >= e2.length && (e2 = void 0), { value: e2 && e2[n3++], done: !e2 };
814
- } };
815
- throw new TypeError(t3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
816
- };
817
- Object.defineProperty(i, "__esModule", { value: true }), i.AutoTypingsCore = void 0;
818
- var h2 = function() {
819
- if (r) return a;
820
- r = 1, Object.defineProperty(a, "__esModule", { value: true }), a.DummySourceCache = void 0;
821
- var e2 = function() {
822
- function e3() {
823
- }
824
- return e3.prototype.getFile = function(e4) {
825
- return Promise.resolve(void 0);
826
- }, e3.prototype.isFileAvailable = function(e4) {
827
- return Promise.resolve(false);
828
- }, e3.prototype.storeFile = function(e4, t3) {
829
- return Promise.resolve(void 0);
830
- }, e3.prototype.clear = function() {
831
- return Promise.resolve(void 0);
832
- }, e3;
833
- }();
834
- return a.DummySourceCache = e2, a;
835
- }(), f2 = u(), d2 = R(), v2 = s2(e), y2 = g(), m2 = O(), b2 = function() {
836
- function e2(e3, r2) {
837
- var n3 = this;
838
- this.editor = e3, this.options = r2, this.disposables = [], this.importResolver = new d2.ImportResolver(r2);
839
- var o3 = e3.onDidChangeModelContent(function(e4) {
840
- n3.debouncedResolveContents();
841
- });
842
- this.disposables.push(o3), this.resolveContents(), r2.dontAdaptEditorOptions || r2.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(t2(t2({}, r2.monaco.languages.typescript.typescriptDefaults.getCompilerOptions()), { moduleResolution: r2.monaco.languages.typescript.ModuleResolutionKind.NodeJs, allowSyntheticDefaultImports: true, rootDir: r2.fileRootPath }));
843
- }
844
- return e2.create = function(r2, n3) {
845
- var o3, i2;
846
- return c2(this, void 0, void 0, function() {
847
- var a2;
848
- return l2(this, function(s3) {
849
- if ((null == n3 ? void 0 : n3.shareCache) && n3.sourceCache && !e2.sharedCache && (e2.sharedCache = n3.sourceCache), !(a2 = null == n3 ? void 0 : n3.monaco)) throw new Error("monacoInstance not found, you can specify the monaco instance via options.monaco");
850
- return [2, new e2(r2, t2(t2({ fileRootPath: "inmemory://model/", onlySpecifiedPackages: false, preloadPackages: false, shareCache: false, dontAdaptEditorOptions: false, dontRefreshModelValueAfterResolvement: false, sourceCache: null !== (o3 = e2.sharedCache) && void 0 !== o3 ? o3 : new h2.DummySourceCache(), sourceResolver: null !== (i2 = null == n3 ? void 0 : n3.sourceResolver) && void 0 !== i2 ? i2 : new f2.JsDelivrSourceResolver(), debounceDuration: 4e3, fileRecursionDepth: 10, packageRecursionDepth: 3 }, n3), { monaco: a2 }))];
851
- });
852
- });
853
- }, e2.prototype.dispose = function() {
854
- var e3, t3;
855
- try {
856
- for (var r2 = p2(this.disposables), n3 = r2.next(); !n3.done; n3 = r2.next()) {
857
- n3.value.dispose();
858
- }
859
- } catch (t4) {
860
- e3 = { error: t4 };
861
- } finally {
862
- try {
863
- n3 && !n3.done && (t3 = r2.return) && t3.call(r2);
864
- } finally {
865
- if (e3) throw e3.error;
866
- }
867
- }
868
- }, e2.prototype.setVersions = function(e3) {
869
- this.importResolver.setVersions(e3), this.options.versions = e3;
870
- }, e2.prototype.clearCache = function() {
871
- return c2(this, void 0, void 0, function() {
872
- return l2(this, function(e3) {
873
- switch (e3.label) {
874
- case 0:
875
- return [4, this.options.sourceCache.clear()];
876
- case 1:
877
- return e3.sent(), [2];
878
- }
879
- });
880
- });
881
- }, e2.prototype.debouncedResolveContents = function() {
882
- var e3 = this;
883
- this.isResolving || ((0, y2.invokeUpdate)({ type: "CodeChanged" }, this.options), this.options.debounceDuration <= 0 ? this.resolveContents() : (void 0 !== this.debounceTimer && clearTimeout(this.debounceTimer), this.debounceTimer = setTimeout(function() {
884
- return c2(e3, void 0, void 0, function() {
885
- return l2(this, function(e4) {
886
- switch (e4.label) {
887
- case 0:
888
- return [4, this.resolveContents()];
889
- case 1:
890
- return e4.sent(), this.debounceTimer = void 0, [2];
891
- }
892
- });
893
- });
894
- }, this.options.debounceDuration)));
895
- }, e2.prototype.resolveContents = function() {
896
- var e3;
897
- return c2(this, void 0, void 0, function() {
898
- var t3, r2, n3, o3;
899
- return l2(this, function(i2) {
900
- switch (i2.label) {
901
- case 0:
902
- if (this.isResolving = true, (0, y2.invokeUpdate)({ type: "ResolveNewImports" }, this.options), !(t3 = this.editor.getModel())) throw Error("No model");
903
- r2 = t3.getLinesContent(), i2.label = 1;
904
- case 1:
905
- return i2.trys.push([1, 3, , 4]), [4, this.importResolver.resolveImportsInFile(r2.join("\n"), v2.dirname(t3.uri.toString()), new m2.RecursionDepth(this.options))];
906
- case 2:
907
- return i2.sent(), [3, 4];
908
- case 3:
909
- if (n3 = i2.sent(), !this.options.onError) throw n3;
910
- return this.options.onError(null !== (e3 = n3.message) && void 0 !== e3 ? e3 : n3), [3, 4];
911
- case 4:
912
- return this.importResolver.wereNewImportsResolved() && (this.options.dontRefreshModelValueAfterResolvement || (o3 = this.editor.getPosition(), t3.setValue(t3.getValue()), o3 && this.editor.setPosition(o3)), this.importResolver.resetNewImportsResolved()), this.isResolving = false, [2];
913
- }
914
- });
915
- });
916
- }, e2;
917
- }();
918
- return i.AutoTypingsCore = b2, i;
919
- }
920
- var S, x = {};
921
- function D() {
922
- if (S) return x;
923
- S = 1;
924
- var e2 = x && x.__awaiter || function(e3, t3, r3, n3) {
925
- return new (r3 || (r3 = Promise))(function(o2, i2) {
926
- function a2(e4) {
927
- try {
928
- c2(n3.next(e4));
929
- } catch (e5) {
930
- i2(e5);
931
- }
932
- }
933
- function s2(e4) {
934
- try {
935
- c2(n3.throw(e4));
936
- } catch (e5) {
937
- i2(e5);
938
- }
939
- }
940
- function c2(e4) {
941
- var t4;
942
- e4.done ? o2(e4.value) : (t4 = e4.value, t4 instanceof r3 ? t4 : new r3(function(e5) {
943
- e5(t4);
944
- })).then(a2, s2);
945
- }
946
- c2((n3 = n3.apply(e3, t3 || [])).next());
947
- });
948
- }, t2 = x && x.__generator || function(e3, t3) {
949
- var r3, n3, o2, i2, a2 = { label: 0, sent: function() {
950
- if (1 & o2[0]) throw o2[1];
951
- return o2[1];
952
- }, trys: [], ops: [] };
953
- return i2 = { next: s2(0), throw: s2(1), return: s2(2) }, "function" == typeof Symbol && (i2[Symbol.iterator] = function() {
954
- return this;
955
- }), i2;
956
- function s2(i3) {
957
- return function(s3) {
958
- return function(i4) {
959
- if (r3) throw new TypeError("Generator is already executing.");
960
- for (; a2; ) try {
961
- if (r3 = 1, n3 && (o2 = 2 & i4[0] ? n3.return : i4[0] ? n3.throw || ((o2 = n3.return) && o2.call(n3), 0) : n3.next) && !(o2 = o2.call(n3, i4[1])).done) return o2;
962
- switch (n3 = 0, o2 && (i4 = [2 & i4[0], o2.value]), i4[0]) {
963
- case 0:
964
- case 1:
965
- o2 = i4;
966
- break;
967
- case 4:
968
- return a2.label++, { value: i4[1], done: false };
969
- case 5:
970
- a2.label++, n3 = i4[1], i4 = [0];
971
- continue;
972
- case 7:
973
- i4 = a2.ops.pop(), a2.trys.pop();
974
- continue;
975
- default:
976
- if (!(o2 = a2.trys, (o2 = o2.length > 0 && o2[o2.length - 1]) || 6 !== i4[0] && 2 !== i4[0])) {
977
- a2 = 0;
978
- continue;
979
- }
980
- if (3 === i4[0] && (!o2 || i4[1] > o2[0] && i4[1] < o2[3])) {
981
- a2.label = i4[1];
982
- break;
983
- }
984
- if (6 === i4[0] && a2.label < o2[1]) {
985
- a2.label = o2[1], o2 = i4;
986
- break;
987
- }
988
- if (o2 && a2.label < o2[2]) {
989
- a2.label = o2[2], a2.ops.push(i4);
990
- break;
991
- }
992
- o2[2] && a2.ops.pop(), a2.trys.pop();
993
- continue;
994
- }
995
- i4 = t3.call(e3, a2);
996
- } catch (e4) {
997
- i4 = [6, e4], n3 = 0;
998
- } finally {
999
- r3 = o2 = 0;
1000
- }
1001
- if (5 & i4[0]) throw i4[1];
1002
- return { value: i4[0] ? i4[1] : void 0, done: true };
1003
- }([i3, s3]);
1004
- };
1005
- }
1006
- }, r2 = x && x.__values || function(e3) {
1007
- var t3 = "function" == typeof Symbol && Symbol.iterator, r3 = t3 && e3[t3], n3 = 0;
1008
- if (r3) return r3.call(e3);
1009
- if (e3 && "number" == typeof e3.length) return { next: function() {
1010
- return e3 && n3 >= e3.length && (e3 = void 0), { value: e3 && e3[n3++], done: !e3 };
1011
- } };
1012
- throw new TypeError(t3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
1013
- };
1014
- Object.defineProperty(x, "__esModule", { value: true }), x.LocalStorageCache = void 0;
1015
- var n2 = function() {
1016
- function n3() {
1017
- this.localCache = {};
1018
- }
1019
- return n3.prototype.getFile = function(r3) {
1020
- var o2;
1021
- return e2(this, void 0, void 0, function() {
1022
- return t2(this, function(e3) {
1023
- try {
1024
- return [2, null !== (o2 = localStorage.getItem(n3.LOCALSTORAGE_PREFIX + r3)) && void 0 !== o2 ? o2 : void 0];
1025
- } catch (e4) {
1026
- return [2, this.localCache[r3]];
1027
- }
1028
- return [2];
1029
- });
1030
- });
1031
- }, n3.prototype.storeFile = function(r3, o2) {
1032
- return e2(this, void 0, void 0, function() {
1033
- return t2(this, function(e3) {
1034
- this.localCache[r3] = o2;
1035
- try {
1036
- localStorage.setItem(n3.LOCALSTORAGE_PREFIX + r3, o2);
1037
- } catch (e4) {
1038
- }
1039
- return [2];
1040
- });
1041
- });
1042
- }, n3.prototype.clear = function() {
1043
- return e2(this, void 0, void 0, function() {
1044
- var e3, o2, i2, a2, s2, c2, u2;
1045
- return t2(this, function(t3) {
1046
- for (this.localCache = {}, e3 = [], o2 = 0; o2 < localStorage.length; o2++) (null == (s2 = localStorage.key(o2)) ? void 0 : s2.startsWith(n3.LOCALSTORAGE_PREFIX)) && e3.push(s2);
1047
- try {
1048
- for (i2 = r2(e3), a2 = i2.next(); !a2.done; a2 = i2.next()) s2 = a2.value, localStorage.removeItem(s2);
1049
- } catch (e4) {
1050
- c2 = { error: e4 };
1051
- } finally {
1052
- try {
1053
- a2 && !a2.done && (u2 = i2.return) && u2.call(i2);
1054
- } finally {
1055
- if (c2) throw c2.error;
1056
- }
1057
- }
1058
- return [2];
1059
- });
1060
- });
1061
- }, n3.LOCALSTORAGE_PREFIX = "__autotyper_cache_", n3;
1062
- }();
1063
- return x.LocalStorageCache = n2, x;
1064
- }
1065
- var E, F = {};
1066
- var C, T = {};
1067
- var N, I = {};
1068
- var M, U = {};
1069
- var A, L, G, J, V = {};
1070
- function W() {
1071
- if (A) return V;
1072
- A = 1;
1073
- var e2 = V && V.__awaiter || function(e3, t3, r3, n2) {
1074
- return new (r3 || (r3 = Promise))(function(o2, i2) {
1075
- function a2(e4) {
1076
- try {
1077
- c2(n2.next(e4));
1078
- } catch (e5) {
1079
- i2(e5);
1080
- }
1081
- }
1082
- function s2(e4) {
1083
- try {
1084
- c2(n2.throw(e4));
1085
- } catch (e5) {
1086
- i2(e5);
1087
- }
1088
- }
1089
- function c2(e4) {
1090
- var t4;
1091
- e4.done ? o2(e4.value) : (t4 = e4.value, t4 instanceof r3 ? t4 : new r3(function(e5) {
1092
- e5(t4);
1093
- })).then(a2, s2);
1094
- }
1095
- c2((n2 = n2.apply(e3, t3 || [])).next());
1096
- });
1097
- }, t2 = V && V.__generator || function(e3, t3) {
1098
- var r3, n2, o2, i2, a2 = { label: 0, sent: function() {
1099
- if (1 & o2[0]) throw o2[1];
1100
- return o2[1];
1101
- }, trys: [], ops: [] };
1102
- return i2 = { next: s2(0), throw: s2(1), return: s2(2) }, "function" == typeof Symbol && (i2[Symbol.iterator] = function() {
1103
- return this;
1104
- }), i2;
1105
- function s2(i3) {
1106
- return function(s3) {
1107
- return function(i4) {
1108
- if (r3) throw new TypeError("Generator is already executing.");
1109
- for (; a2; ) try {
1110
- if (r3 = 1, n2 && (o2 = 2 & i4[0] ? n2.return : i4[0] ? n2.throw || ((o2 = n2.return) && o2.call(n2), 0) : n2.next) && !(o2 = o2.call(n2, i4[1])).done) return o2;
1111
- switch (n2 = 0, o2 && (i4 = [2 & i4[0], o2.value]), i4[0]) {
1112
- case 0:
1113
- case 1:
1114
- o2 = i4;
1115
- break;
1116
- case 4:
1117
- return a2.label++, { value: i4[1], done: false };
1118
- case 5:
1119
- a2.label++, n2 = i4[1], i4 = [0];
1120
- continue;
1121
- case 7:
1122
- i4 = a2.ops.pop(), a2.trys.pop();
1123
- continue;
1124
- default:
1125
- if (!(o2 = a2.trys, (o2 = o2.length > 0 && o2[o2.length - 1]) || 6 !== i4[0] && 2 !== i4[0])) {
1126
- a2 = 0;
1127
- continue;
1128
- }
1129
- if (3 === i4[0] && (!o2 || i4[1] > o2[0] && i4[1] < o2[3])) {
1130
- a2.label = i4[1];
1131
- break;
1132
- }
1133
- if (6 === i4[0] && a2.label < o2[1]) {
1134
- a2.label = o2[1], o2 = i4;
1135
- break;
1136
- }
1137
- if (o2 && a2.label < o2[2]) {
1138
- a2.label = o2[2], a2.ops.push(i4);
1139
- break;
1140
- }
1141
- o2[2] && a2.ops.pop(), a2.trys.pop();
1142
- continue;
1143
- }
1144
- i4 = t3.call(e3, a2);
1145
- } catch (e4) {
1146
- i4 = [6, e4], n2 = 0;
1147
- } finally {
1148
- r3 = o2 = 0;
1149
- }
1150
- if (5 & i4[0]) throw i4[1];
1151
- return { value: i4[0] ? i4[1] : void 0, done: true };
1152
- }([i3, s3]);
1153
- };
1154
- }
1155
- };
1156
- Object.defineProperty(V, "__esModule", { value: true }), V.UnpkgSourceResolver = void 0;
1157
- var r2 = function() {
1158
- function r3() {
1159
- }
1160
- return r3.prototype.resolvePackageJson = function(r4, n2, o2) {
1161
- return e2(this, void 0, void 0, function() {
1162
- return t2(this, function(e3) {
1163
- switch (e3.label) {
1164
- case 0:
1165
- return [4, this.resolveFile("https://unpkg.com/".concat(r4).concat(n2 ? "@".concat(n2) : "").concat(o2 ? "/".concat(o2) : "", "/package.json"))];
1166
- case 1:
1167
- return [2, e3.sent()];
1168
- }
1169
- });
1170
- });
1171
- }, r3.prototype.resolveSourceFile = function(r4, n2, o2) {
1172
- return e2(this, void 0, void 0, function() {
1173
- return t2(this, function(e3) {
1174
- switch (e3.label) {
1175
- case 0:
1176
- return [4, this.resolveFile("https://unpkg.com/".concat(r4).concat(n2 ? "@".concat(n2) : "", "/").concat(o2))];
1177
- case 1:
1178
- return [2, e3.sent()];
1179
- }
1180
- });
1181
- });
1182
- }, r3.prototype.resolveFile = function(r4) {
1183
- return e2(this, void 0, void 0, function() {
1184
- var e3;
1185
- return t2(this, function(t3) {
1186
- switch (t3.label) {
1187
- case 0:
1188
- return [4, fetch(r4, { method: "GET" })];
1189
- case 1:
1190
- return (e3 = t3.sent()).ok ? [4, e3.text()] : [3, 3];
1191
- case 2:
1192
- return [2, t3.sent()];
1193
- case 3:
1194
- if (404 === e3.status) return [2, ""];
1195
- throw Error("Error other than 404 while fetching from Unpkg at ".concat(r4));
1196
- case 4:
1197
- return [2];
1198
- }
1199
- });
1200
- });
1201
- }, r3;
1202
- }();
1203
- return V.UnpkgSourceResolver = r2, V;
1204
- }
1205
- function X() {
1206
- return L || (L = 1, e2 = n, t2 = n && n.__createBinding || (Object.create ? function(e3, t3, r3, n2) {
1207
- void 0 === n2 && (n2 = r3);
1208
- var o2 = Object.getOwnPropertyDescriptor(t3, r3);
1209
- o2 && !("get" in o2 ? !t3.__esModule : o2.writable || o2.configurable) || (o2 = { enumerable: true, get: function() {
1210
- return t3[r3];
1211
- } }), Object.defineProperty(e3, n2, o2);
1212
- } : function(e3, t3, r3, n2) {
1213
- void 0 === n2 && (n2 = r3), e3[n2] = t3[r3];
1214
- }), r2 = n && n.__exportStar || function(e3, r3) {
1215
- for (var n2 in e3) "default" === n2 || Object.prototype.hasOwnProperty.call(r3, n2) || t2(r3, e3, n2);
1216
- }, Object.defineProperty(e2, "__esModule", { value: true }), r2(function() {
1217
- if (_) return o;
1218
- _ = 1;
1219
- var e3, t3 = o && o.__extends || (e3 = function(t4, r4) {
1220
- return e3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e4, t5) {
1221
- e4.__proto__ = t5;
1222
- } || function(e4, t5) {
1223
- for (var r5 in t5) Object.prototype.hasOwnProperty.call(t5, r5) && (e4[r5] = t5[r5]);
1224
- }, e3(t4, r4);
1225
- }, function(t4, r4) {
1226
- if ("function" != typeof r4 && null !== r4) throw new TypeError("Class extends value " + String(r4) + " is not a constructor or null");
1227
- function n2() {
1228
- this.constructor = t4;
1229
- }
1230
- e3(t4, r4), t4.prototype = null === r4 ? Object.create(r4) : (n2.prototype = r4.prototype, new n2());
1231
- });
1232
- Object.defineProperty(o, "__esModule", { value: true }), o.AutoTypings = void 0;
1233
- var r3 = function(e4) {
1234
- function r4(t4, r5) {
1235
- return e4.call(this, t4, r5) || this;
1236
- }
1237
- return t3(r4, e4), r4;
1238
- }(j().AutoTypingsCore);
1239
- return o.AutoTypings = r3, o;
1240
- }(), e2), r2(v(), e2), r2(D(), e2), r2((E || (E = 1, Object.defineProperty(F, "__esModule", { value: true })), F), e2), r2((C || (C = 1, Object.defineProperty(T, "__esModule", { value: true })), T), e2), r2((N || (N = 1, Object.defineProperty(I, "__esModule", { value: true })), I), e2), r2((M || (M = 1, Object.defineProperty(U, "__esModule", { value: true })), U), e2), r2(W(), e2), r2(u(), e2)), n;
1241
- var e2, t2, r2;
1242
- }
1243
- const B = t({ __proto__: null }, [J ? G : (J = 1, G = X())]);
1244
- export {
1245
- B as c
1246
- };