@linktr.ee/arbor-mcp 0.1.0 → 0.1.1-rc.9d687ffd.5357
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.
- package/dist/index.js +479 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,485 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
2
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
4
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
10
|
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
|
|
28
|
+
// ../../node_modules/lz-string/libs/lz-string.js
|
|
29
|
+
var require_lz_string = __commonJS({
|
|
30
|
+
"../../node_modules/lz-string/libs/lz-string.js"(exports, module) {
|
|
31
|
+
var LZString = (function() {
|
|
32
|
+
var f = String.fromCharCode;
|
|
33
|
+
var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
34
|
+
var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$";
|
|
35
|
+
var baseReverseDic = {};
|
|
36
|
+
function getBaseValue(alphabet, character) {
|
|
37
|
+
if (!baseReverseDic[alphabet]) {
|
|
38
|
+
baseReverseDic[alphabet] = {};
|
|
39
|
+
for (var i = 0; i < alphabet.length; i++) {
|
|
40
|
+
baseReverseDic[alphabet][alphabet.charAt(i)] = i;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return baseReverseDic[alphabet][character];
|
|
44
|
+
}
|
|
45
|
+
var LZString2 = {
|
|
46
|
+
compressToBase64: function(input) {
|
|
47
|
+
if (input == null) return "";
|
|
48
|
+
var res = LZString2._compress(input, 6, function(a) {
|
|
49
|
+
return keyStrBase64.charAt(a);
|
|
50
|
+
});
|
|
51
|
+
switch (res.length % 4) {
|
|
52
|
+
// To produce valid Base64
|
|
53
|
+
default:
|
|
54
|
+
// When could this happen ?
|
|
55
|
+
case 0:
|
|
56
|
+
return res;
|
|
57
|
+
case 1:
|
|
58
|
+
return res + "===";
|
|
59
|
+
case 2:
|
|
60
|
+
return res + "==";
|
|
61
|
+
case 3:
|
|
62
|
+
return res + "=";
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
decompressFromBase64: function(input) {
|
|
66
|
+
if (input == null) return "";
|
|
67
|
+
if (input == "") return null;
|
|
68
|
+
return LZString2._decompress(input.length, 32, function(index) {
|
|
69
|
+
return getBaseValue(keyStrBase64, input.charAt(index));
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
compressToUTF16: function(input) {
|
|
73
|
+
if (input == null) return "";
|
|
74
|
+
return LZString2._compress(input, 15, function(a) {
|
|
75
|
+
return f(a + 32);
|
|
76
|
+
}) + " ";
|
|
77
|
+
},
|
|
78
|
+
decompressFromUTF16: function(compressed) {
|
|
79
|
+
if (compressed == null) return "";
|
|
80
|
+
if (compressed == "") return null;
|
|
81
|
+
return LZString2._decompress(compressed.length, 16384, function(index) {
|
|
82
|
+
return compressed.charCodeAt(index) - 32;
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
//compress into uint8array (UCS-2 big endian format)
|
|
86
|
+
compressToUint8Array: function(uncompressed) {
|
|
87
|
+
var compressed = LZString2.compress(uncompressed);
|
|
88
|
+
var buf = new Uint8Array(compressed.length * 2);
|
|
89
|
+
for (var i = 0, TotalLen = compressed.length; i < TotalLen; i++) {
|
|
90
|
+
var current_value = compressed.charCodeAt(i);
|
|
91
|
+
buf[i * 2] = current_value >>> 8;
|
|
92
|
+
buf[i * 2 + 1] = current_value % 256;
|
|
93
|
+
}
|
|
94
|
+
return buf;
|
|
95
|
+
},
|
|
96
|
+
//decompress from uint8array (UCS-2 big endian format)
|
|
97
|
+
decompressFromUint8Array: function(compressed) {
|
|
98
|
+
if (compressed === null || compressed === void 0) {
|
|
99
|
+
return LZString2.decompress(compressed);
|
|
100
|
+
} else {
|
|
101
|
+
var buf = new Array(compressed.length / 2);
|
|
102
|
+
for (var i = 0, TotalLen = buf.length; i < TotalLen; i++) {
|
|
103
|
+
buf[i] = compressed[i * 2] * 256 + compressed[i * 2 + 1];
|
|
104
|
+
}
|
|
105
|
+
var result = [];
|
|
106
|
+
buf.forEach(function(c) {
|
|
107
|
+
result.push(f(c));
|
|
108
|
+
});
|
|
109
|
+
return LZString2.decompress(result.join(""));
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
//compress into a string that is already URI encoded
|
|
113
|
+
compressToEncodedURIComponent: function(input) {
|
|
114
|
+
if (input == null) return "";
|
|
115
|
+
return LZString2._compress(input, 6, function(a) {
|
|
116
|
+
return keyStrUriSafe.charAt(a);
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
//decompress from an output of compressToEncodedURIComponent
|
|
120
|
+
decompressFromEncodedURIComponent: function(input) {
|
|
121
|
+
if (input == null) return "";
|
|
122
|
+
if (input == "") return null;
|
|
123
|
+
input = input.replace(/ /g, "+");
|
|
124
|
+
return LZString2._decompress(input.length, 32, function(index) {
|
|
125
|
+
return getBaseValue(keyStrUriSafe, input.charAt(index));
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
compress: function(uncompressed) {
|
|
129
|
+
return LZString2._compress(uncompressed, 16, function(a) {
|
|
130
|
+
return f(a);
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
_compress: function(uncompressed, bitsPerChar, getCharFromInt) {
|
|
134
|
+
if (uncompressed == null) return "";
|
|
135
|
+
var i, value, context_dictionary = {}, context_dictionaryToCreate = {}, context_c = "", context_wc = "", context_w = "", context_enlargeIn = 2, context_dictSize = 3, context_numBits = 2, context_data = [], context_data_val = 0, context_data_position = 0, ii;
|
|
136
|
+
for (ii = 0; ii < uncompressed.length; ii += 1) {
|
|
137
|
+
context_c = uncompressed.charAt(ii);
|
|
138
|
+
if (!Object.prototype.hasOwnProperty.call(context_dictionary, context_c)) {
|
|
139
|
+
context_dictionary[context_c] = context_dictSize++;
|
|
140
|
+
context_dictionaryToCreate[context_c] = true;
|
|
141
|
+
}
|
|
142
|
+
context_wc = context_w + context_c;
|
|
143
|
+
if (Object.prototype.hasOwnProperty.call(context_dictionary, context_wc)) {
|
|
144
|
+
context_w = context_wc;
|
|
145
|
+
} else {
|
|
146
|
+
if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {
|
|
147
|
+
if (context_w.charCodeAt(0) < 256) {
|
|
148
|
+
for (i = 0; i < context_numBits; i++) {
|
|
149
|
+
context_data_val = context_data_val << 1;
|
|
150
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
151
|
+
context_data_position = 0;
|
|
152
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
153
|
+
context_data_val = 0;
|
|
154
|
+
} else {
|
|
155
|
+
context_data_position++;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
value = context_w.charCodeAt(0);
|
|
159
|
+
for (i = 0; i < 8; i++) {
|
|
160
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
161
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
162
|
+
context_data_position = 0;
|
|
163
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
164
|
+
context_data_val = 0;
|
|
165
|
+
} else {
|
|
166
|
+
context_data_position++;
|
|
167
|
+
}
|
|
168
|
+
value = value >> 1;
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
value = 1;
|
|
172
|
+
for (i = 0; i < context_numBits; i++) {
|
|
173
|
+
context_data_val = context_data_val << 1 | value;
|
|
174
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
175
|
+
context_data_position = 0;
|
|
176
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
177
|
+
context_data_val = 0;
|
|
178
|
+
} else {
|
|
179
|
+
context_data_position++;
|
|
180
|
+
}
|
|
181
|
+
value = 0;
|
|
182
|
+
}
|
|
183
|
+
value = context_w.charCodeAt(0);
|
|
184
|
+
for (i = 0; i < 16; i++) {
|
|
185
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
186
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
187
|
+
context_data_position = 0;
|
|
188
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
189
|
+
context_data_val = 0;
|
|
190
|
+
} else {
|
|
191
|
+
context_data_position++;
|
|
192
|
+
}
|
|
193
|
+
value = value >> 1;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
context_enlargeIn--;
|
|
197
|
+
if (context_enlargeIn == 0) {
|
|
198
|
+
context_enlargeIn = Math.pow(2, context_numBits);
|
|
199
|
+
context_numBits++;
|
|
200
|
+
}
|
|
201
|
+
delete context_dictionaryToCreate[context_w];
|
|
202
|
+
} else {
|
|
203
|
+
value = context_dictionary[context_w];
|
|
204
|
+
for (i = 0; i < context_numBits; i++) {
|
|
205
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
206
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
207
|
+
context_data_position = 0;
|
|
208
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
209
|
+
context_data_val = 0;
|
|
210
|
+
} else {
|
|
211
|
+
context_data_position++;
|
|
212
|
+
}
|
|
213
|
+
value = value >> 1;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
context_enlargeIn--;
|
|
217
|
+
if (context_enlargeIn == 0) {
|
|
218
|
+
context_enlargeIn = Math.pow(2, context_numBits);
|
|
219
|
+
context_numBits++;
|
|
220
|
+
}
|
|
221
|
+
context_dictionary[context_wc] = context_dictSize++;
|
|
222
|
+
context_w = String(context_c);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (context_w !== "") {
|
|
226
|
+
if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {
|
|
227
|
+
if (context_w.charCodeAt(0) < 256) {
|
|
228
|
+
for (i = 0; i < context_numBits; i++) {
|
|
229
|
+
context_data_val = context_data_val << 1;
|
|
230
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
231
|
+
context_data_position = 0;
|
|
232
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
233
|
+
context_data_val = 0;
|
|
234
|
+
} else {
|
|
235
|
+
context_data_position++;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
value = context_w.charCodeAt(0);
|
|
239
|
+
for (i = 0; i < 8; i++) {
|
|
240
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
241
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
242
|
+
context_data_position = 0;
|
|
243
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
244
|
+
context_data_val = 0;
|
|
245
|
+
} else {
|
|
246
|
+
context_data_position++;
|
|
247
|
+
}
|
|
248
|
+
value = value >> 1;
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
value = 1;
|
|
252
|
+
for (i = 0; i < context_numBits; i++) {
|
|
253
|
+
context_data_val = context_data_val << 1 | value;
|
|
254
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
255
|
+
context_data_position = 0;
|
|
256
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
257
|
+
context_data_val = 0;
|
|
258
|
+
} else {
|
|
259
|
+
context_data_position++;
|
|
260
|
+
}
|
|
261
|
+
value = 0;
|
|
262
|
+
}
|
|
263
|
+
value = context_w.charCodeAt(0);
|
|
264
|
+
for (i = 0; i < 16; i++) {
|
|
265
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
266
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
267
|
+
context_data_position = 0;
|
|
268
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
269
|
+
context_data_val = 0;
|
|
270
|
+
} else {
|
|
271
|
+
context_data_position++;
|
|
272
|
+
}
|
|
273
|
+
value = value >> 1;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
context_enlargeIn--;
|
|
277
|
+
if (context_enlargeIn == 0) {
|
|
278
|
+
context_enlargeIn = Math.pow(2, context_numBits);
|
|
279
|
+
context_numBits++;
|
|
280
|
+
}
|
|
281
|
+
delete context_dictionaryToCreate[context_w];
|
|
282
|
+
} else {
|
|
283
|
+
value = context_dictionary[context_w];
|
|
284
|
+
for (i = 0; i < context_numBits; i++) {
|
|
285
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
286
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
287
|
+
context_data_position = 0;
|
|
288
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
289
|
+
context_data_val = 0;
|
|
290
|
+
} else {
|
|
291
|
+
context_data_position++;
|
|
292
|
+
}
|
|
293
|
+
value = value >> 1;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
context_enlargeIn--;
|
|
297
|
+
if (context_enlargeIn == 0) {
|
|
298
|
+
context_enlargeIn = Math.pow(2, context_numBits);
|
|
299
|
+
context_numBits++;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
value = 2;
|
|
303
|
+
for (i = 0; i < context_numBits; i++) {
|
|
304
|
+
context_data_val = context_data_val << 1 | value & 1;
|
|
305
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
306
|
+
context_data_position = 0;
|
|
307
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
308
|
+
context_data_val = 0;
|
|
309
|
+
} else {
|
|
310
|
+
context_data_position++;
|
|
311
|
+
}
|
|
312
|
+
value = value >> 1;
|
|
313
|
+
}
|
|
314
|
+
while (true) {
|
|
315
|
+
context_data_val = context_data_val << 1;
|
|
316
|
+
if (context_data_position == bitsPerChar - 1) {
|
|
317
|
+
context_data.push(getCharFromInt(context_data_val));
|
|
318
|
+
break;
|
|
319
|
+
} else context_data_position++;
|
|
320
|
+
}
|
|
321
|
+
return context_data.join("");
|
|
322
|
+
},
|
|
323
|
+
decompress: function(compressed) {
|
|
324
|
+
if (compressed == null) return "";
|
|
325
|
+
if (compressed == "") return null;
|
|
326
|
+
return LZString2._decompress(compressed.length, 32768, function(index) {
|
|
327
|
+
return compressed.charCodeAt(index);
|
|
328
|
+
});
|
|
329
|
+
},
|
|
330
|
+
_decompress: function(length, resetValue, getNextValue) {
|
|
331
|
+
var dictionary = [], next, enlargeIn = 4, dictSize = 4, numBits = 3, entry = "", result = [], i, w, bits, resb, maxpower, power, c, data = { val: getNextValue(0), position: resetValue, index: 1 };
|
|
332
|
+
for (i = 0; i < 3; i += 1) {
|
|
333
|
+
dictionary[i] = i;
|
|
334
|
+
}
|
|
335
|
+
bits = 0;
|
|
336
|
+
maxpower = Math.pow(2, 2);
|
|
337
|
+
power = 1;
|
|
338
|
+
while (power != maxpower) {
|
|
339
|
+
resb = data.val & data.position;
|
|
340
|
+
data.position >>= 1;
|
|
341
|
+
if (data.position == 0) {
|
|
342
|
+
data.position = resetValue;
|
|
343
|
+
data.val = getNextValue(data.index++);
|
|
344
|
+
}
|
|
345
|
+
bits |= (resb > 0 ? 1 : 0) * power;
|
|
346
|
+
power <<= 1;
|
|
347
|
+
}
|
|
348
|
+
switch (next = bits) {
|
|
349
|
+
case 0:
|
|
350
|
+
bits = 0;
|
|
351
|
+
maxpower = Math.pow(2, 8);
|
|
352
|
+
power = 1;
|
|
353
|
+
while (power != maxpower) {
|
|
354
|
+
resb = data.val & data.position;
|
|
355
|
+
data.position >>= 1;
|
|
356
|
+
if (data.position == 0) {
|
|
357
|
+
data.position = resetValue;
|
|
358
|
+
data.val = getNextValue(data.index++);
|
|
359
|
+
}
|
|
360
|
+
bits |= (resb > 0 ? 1 : 0) * power;
|
|
361
|
+
power <<= 1;
|
|
362
|
+
}
|
|
363
|
+
c = f(bits);
|
|
364
|
+
break;
|
|
365
|
+
case 1:
|
|
366
|
+
bits = 0;
|
|
367
|
+
maxpower = Math.pow(2, 16);
|
|
368
|
+
power = 1;
|
|
369
|
+
while (power != maxpower) {
|
|
370
|
+
resb = data.val & data.position;
|
|
371
|
+
data.position >>= 1;
|
|
372
|
+
if (data.position == 0) {
|
|
373
|
+
data.position = resetValue;
|
|
374
|
+
data.val = getNextValue(data.index++);
|
|
375
|
+
}
|
|
376
|
+
bits |= (resb > 0 ? 1 : 0) * power;
|
|
377
|
+
power <<= 1;
|
|
378
|
+
}
|
|
379
|
+
c = f(bits);
|
|
380
|
+
break;
|
|
381
|
+
case 2:
|
|
382
|
+
return "";
|
|
383
|
+
}
|
|
384
|
+
dictionary[3] = c;
|
|
385
|
+
w = c;
|
|
386
|
+
result.push(c);
|
|
387
|
+
while (true) {
|
|
388
|
+
if (data.index > length) {
|
|
389
|
+
return "";
|
|
390
|
+
}
|
|
391
|
+
bits = 0;
|
|
392
|
+
maxpower = Math.pow(2, numBits);
|
|
393
|
+
power = 1;
|
|
394
|
+
while (power != maxpower) {
|
|
395
|
+
resb = data.val & data.position;
|
|
396
|
+
data.position >>= 1;
|
|
397
|
+
if (data.position == 0) {
|
|
398
|
+
data.position = resetValue;
|
|
399
|
+
data.val = getNextValue(data.index++);
|
|
400
|
+
}
|
|
401
|
+
bits |= (resb > 0 ? 1 : 0) * power;
|
|
402
|
+
power <<= 1;
|
|
403
|
+
}
|
|
404
|
+
switch (c = bits) {
|
|
405
|
+
case 0:
|
|
406
|
+
bits = 0;
|
|
407
|
+
maxpower = Math.pow(2, 8);
|
|
408
|
+
power = 1;
|
|
409
|
+
while (power != maxpower) {
|
|
410
|
+
resb = data.val & data.position;
|
|
411
|
+
data.position >>= 1;
|
|
412
|
+
if (data.position == 0) {
|
|
413
|
+
data.position = resetValue;
|
|
414
|
+
data.val = getNextValue(data.index++);
|
|
415
|
+
}
|
|
416
|
+
bits |= (resb > 0 ? 1 : 0) * power;
|
|
417
|
+
power <<= 1;
|
|
418
|
+
}
|
|
419
|
+
dictionary[dictSize++] = f(bits);
|
|
420
|
+
c = dictSize - 1;
|
|
421
|
+
enlargeIn--;
|
|
422
|
+
break;
|
|
423
|
+
case 1:
|
|
424
|
+
bits = 0;
|
|
425
|
+
maxpower = Math.pow(2, 16);
|
|
426
|
+
power = 1;
|
|
427
|
+
while (power != maxpower) {
|
|
428
|
+
resb = data.val & data.position;
|
|
429
|
+
data.position >>= 1;
|
|
430
|
+
if (data.position == 0) {
|
|
431
|
+
data.position = resetValue;
|
|
432
|
+
data.val = getNextValue(data.index++);
|
|
433
|
+
}
|
|
434
|
+
bits |= (resb > 0 ? 1 : 0) * power;
|
|
435
|
+
power <<= 1;
|
|
436
|
+
}
|
|
437
|
+
dictionary[dictSize++] = f(bits);
|
|
438
|
+
c = dictSize - 1;
|
|
439
|
+
enlargeIn--;
|
|
440
|
+
break;
|
|
441
|
+
case 2:
|
|
442
|
+
return result.join("");
|
|
443
|
+
}
|
|
444
|
+
if (enlargeIn == 0) {
|
|
445
|
+
enlargeIn = Math.pow(2, numBits);
|
|
446
|
+
numBits++;
|
|
447
|
+
}
|
|
448
|
+
if (dictionary[c]) {
|
|
449
|
+
entry = dictionary[c];
|
|
450
|
+
} else {
|
|
451
|
+
if (c === dictSize) {
|
|
452
|
+
entry = w + w.charAt(0);
|
|
453
|
+
} else {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
result.push(entry);
|
|
458
|
+
dictionary[dictSize++] = w + entry.charAt(0);
|
|
459
|
+
enlargeIn--;
|
|
460
|
+
w = entry;
|
|
461
|
+
if (enlargeIn == 0) {
|
|
462
|
+
enlargeIn = Math.pow(2, numBits);
|
|
463
|
+
numBits++;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
return LZString2;
|
|
469
|
+
})();
|
|
470
|
+
if (typeof define === "function" && define.amd) {
|
|
471
|
+
define(function() {
|
|
472
|
+
return LZString;
|
|
473
|
+
});
|
|
474
|
+
} else if (typeof module !== "undefined" && module != null) {
|
|
475
|
+
module.exports = LZString;
|
|
476
|
+
} else if (typeof angular !== "undefined" && angular != null) {
|
|
477
|
+
angular.module("LZString", []).factory("LZString", function() {
|
|
478
|
+
return LZString;
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
});
|
|
6
483
|
|
|
7
484
|
// ../../apps/playroom/src/hash-code.js
|
|
8
485
|
var require_hash_code = __commonJS({
|
|
@@ -35,7 +512,7 @@ import {
|
|
|
35
512
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
36
513
|
|
|
37
514
|
// ../../apps/playroom/src/canonical-snippet-lookup.ts
|
|
38
|
-
|
|
515
|
+
var import_lz_string = __toESM(require_lz_string());
|
|
39
516
|
|
|
40
517
|
// ../../apps/playroom/src/compositions.ts
|
|
41
518
|
var compositions_default = [
|
|
@@ -897,7 +1374,7 @@ function findCanonicalEntryByGroup(group) {
|
|
|
897
1374
|
return null;
|
|
898
1375
|
}
|
|
899
1376
|
function buildPlayroomUrl(jsx) {
|
|
900
|
-
const compressed = compressToEncodedURIComponent(
|
|
1377
|
+
const compressed = (0, import_lz_string.compressToEncodedURIComponent)(
|
|
901
1378
|
JSON.stringify({ code: jsx })
|
|
902
1379
|
);
|
|
903
1380
|
return `${PLAYROOM_HOMEPAGE_URL}#?code=${compressed}`;
|