-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjscl-web.js
563 lines (563 loc) · 25.9 KB
/
jscl-web.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
(function(jscl){
'use strict';
(function(values, internals){
var l1=internals.make_lisp_string('loading repl-web/repl.lisp!');
console.log(internals.xstring(l1));
var l2=internals.intern('%WRITE-STRING');
var l3=internals.intern('T','COMMON-LISP');
var l4=internals.intern('*ROOT*');
var l5=internals.make_lisp_string('jqconsole');
var l6=internals.intern('NIL','COMMON-LISP');
var l7=internals.make_lisp_string('jqconsole-output');
var l8=internals.make_lisp_string('jqconsole');
var l9=internals.make_lisp_string('Write');
var l10=internals.make_lisp_string('jqconsole-output');
var l11=internals.make_lisp_string('');
var l12=internals.make_lisp_string('jqconsole');
var l13=internals.make_lisp_string('Write');
var l14=internals.make_lisp_string('console');
var l15=internals.make_lisp_string('log');
l2.fvalue=(function(){var FUNC=(function JSCL_USER_WRITESTRING(values,v1,v2){internals.checkArgsAtLeast(arguments.length-1,1);
internals.checkArgsAtMost(arguments.length-1,2);
switch(arguments.length-1){case 1:v2=l3.value;
;
default:break;
}var v3=this;
return (function(){return internals.js_to_lisp((function(){var TMP=internals.symbolValue(l4)[internals.xstring(l5)];
return TMP===undefined?l6.value:TMP;
})())!==l6.value?v2!==l6.value?internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l8)][internals.xstring(l9)](internals.lisp_to_js(v1),internals.lisp_to_js(l7))):internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l12)][internals.xstring(l13)](internals.lisp_to_js(v1),internals.lisp_to_js(l10),internals.lisp_to_js(l11))):internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l14)][internals.xstring(l15)](internals.lisp_to_js(v1)));
})();
});
FUNC.fname='%WRITE-STRING';
return FUNC;
})();
l2;
var l16=internals.intern('LOAD-HISTORY');
var l17=internals.make_lisp_string('jqhist');
var l18=internals.make_lisp_string('localStorage');
var l19=internals.make_lisp_string('getItem');
var l20=internals.make_lisp_string('JSON');
var l21=internals.make_lisp_string('parse');
var l22=internals.make_lisp_string('jqconsole');
var l23=internals.make_lisp_string('SetHistory');
l16.fvalue=(function(){var FUNC=(function JSCL_USER_LOADHISTORY(values){internals.checkArgsAtMost(arguments.length-1,0);
var v5=this;
return (function(){return (function(v7){return (v7===null?l3.value:l6.value)!==l6.value?l6.value:internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l22)][internals.xstring(l23)](internals.lisp_to_js(internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l20)][internals.xstring(l21)](internals.lisp_to_js(v7))))));
})(internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l18)][internals.xstring(l19)](internals.lisp_to_js(l17))));
})();
});
FUNC.fname='LOAD-HISTORY';
return FUNC;
})();
l16;
var l24=internals.intern('SAVE-HISTORY');
var l25=internals.make_lisp_string('jqhist');
var l26=internals.make_lisp_string('jqconsole');
var l27=internals.make_lisp_string('GetHistory');
var l28=internals.make_lisp_string('JSON');
var l29=internals.make_lisp_string('stringify');
var l30=internals.make_lisp_string('localStorage');
var l31=internals.make_lisp_string('setItem');
l24.fvalue=(function(){var FUNC=(function JSCL_USER_SAVEHISTORY(values){internals.checkArgsAtMost(arguments.length-1,0);
var v8=this;
return (function(){return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l30)][internals.xstring(l31)](internals.lisp_to_js(l25),internals.lisp_to_js(internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l28)][internals.xstring(l29)](internals.lisp_to_js(internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l26)][internals.xstring(l27)]())))))));
})();
});
FUNC.fname='SAVE-HISTORY';
return FUNC;
})();
l24;
var l32=internals.intern('%SEXPR-COMPLETE');
var l33=internals.intern('LENGTH','COMMON-LISP');
var l34=internals.intern('CHAR','COMMON-LISP');
var l35=internals.intern('EQL','COMMON-LISP');
l32.fvalue=(function(){var FUNC=(function JSCL_USER_SEXPRCOMPLETE(values,v10){internals.checkArgs(arguments.length-1,1);
var v11=this;
return (function(){return (function(v13,v14,v15,v16,v17){(function(){return (function(){while ((function(){var x1=v13;
if (typeof x1!='number') throw 'Not a number!';
var x2=v16;
if (typeof x2!='number') throw 'Not a number!';
return x1<x2?l3.value:l6.value;
})()!==l6.value){if (v15!==l6.value) (function(v19){return l35.fvalue(internals.pv,v19,'\n')!==l6.value?(l6.value,v15=l6.value):l6.value;
})(l34.fvalue(internals.pv,v10,v13));
else if (v14!==l6.value) (function(v20){return l35.fvalue(internals.pv,v20,'\\')!==l6.value?(l6.value,(function(){var v22=1;
var v23=(function(){var x1=v13;
if (typeof x1!='number') throw 'Not a number!';
var x2=v22;
if (typeof x2!='number') throw 'Not a number!';
return x1+x2;
})();
return v13=v23;
})()):l35.fvalue(internals.pv,v20,'"')!==l6.value?(l6.value,v14=l6.value,(function(){var v25=1;
var v26=(function(){var x1=v17;
if (typeof x1!='number') throw 'Not a number!';
var x2=v25;
if (typeof x2!='number') throw 'Not a number!';
return x1-x2;
})();
return v17=v26;
})()):l6.value;
})(l34.fvalue(internals.pv,v10,v13));
else (function(v27){return l35.fvalue(internals.pv,v27,';')!==l6.value?(l6.value,v15=l3.value):l35.fvalue(internals.pv,v27,'\\')!==l6.value?(l6.value,(function(){var v29=1;
var v30=(function(){var x1=v13;
if (typeof x1!='number') throw 'Not a number!';
var x2=v29;
if (typeof x2!='number') throw 'Not a number!';
return x1+x2;
})();
return v13=v30;
})()):l35.fvalue(internals.pv,v27,'(')!==l6.value?(l6.value,v15!==l6.value?l6.value:(function(){var v32=1;
var v33=(function(){var x1=v17;
if (typeof x1!='number') throw 'Not a number!';
var x2=v32;
if (typeof x2!='number') throw 'Not a number!';
return x1+x2;
})();
return v17=v33;
})()):l35.fvalue(internals.pv,v27,')')!==l6.value?(l6.value,v15!==l6.value?l6.value:(function(){var v35=1;
var v36=(function(){var x1=v17;
if (typeof x1!='number') throw 'Not a number!';
var x2=v35;
if (typeof x2!='number') throw 'Not a number!';
return x1-x2;
})();
return v17=v36;
})()):l35.fvalue(internals.pv,v27,'"')!==l6.value?(l6.value,(function(){var v38=1;
var v39=(function(){var x1=v17;
if (typeof x1!='number') throw 'Not a number!';
var x2=v38;
if (typeof x2!='number') throw 'Not a number!';
return x1+x2;
})();
return v17=v39;
})(),v14=l3.value):l6.value;
})(l34.fvalue(internals.pv,v10,v13));
(function(){var v41=1;
var v42=(function(){var x1=v13;
if (typeof x1!='number') throw 'Not a number!';
var x2=v41;
if (typeof x2!='number') throw 'Not a number!';
return x1+x2;
})();
return v13=v42;
})();
}return l6.value;
})();
})();
return (function(){var x1=v17;
if (typeof x1!='number') throw 'Not a number!';
return x1<=0?l3.value:l6.value;
})()!==l6.value?l6.value:0;
})(0,l6.value,l6.value,l33.fvalue(internals.pv,v10),0);
})();
});
FUNC.fname='%SEXPR-COMPLETE';
return FUNC;
})();
l32;
var l36=internals.intern('%MAP-JS-OBJECT');
var l37=internals.intern('LIST','COMMON-LISP');
var l38=internals.make_lisp_string('Object');
var l39=internals.make_lisp_string('keys');
var l40=internals.intern('VECTOR-TO-LIST');
var l41=internals.intern('MAPCAR','COMMON-LISP');
l36.fvalue=(function(){var FUNC=(function JSCL_USER_MAPJSOBJECT(values,v43){internals.checkArgs(arguments.length-1,1);
var v44=this;
return (function(){return l41.fvalue(values,(function JSCL_USER_NIL(values,v46){internals.checkArgs(arguments.length-1,1);
var v47=this;
return l37.fvalue(values,v46,internals.js_to_lisp((function(){var TMP=v43[internals.xstring(v46)];
return TMP===undefined?l6.value:TMP;
})()));
}),l41.fvalue(internals.pv,(function JSCL_USER_NIL(values,v48){internals.checkArgs(arguments.length-1,1);
var v49=this;
return internals.js_to_lisp(v48);
}),l40.fvalue(internals.pv,internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l38)][internals.xstring(l39)](internals.lisp_to_js(v43))))));
})();
});
FUNC.fname='%MAP-JS-OBJECT';
return FUNC;
})();
l36;
var l42=internals.intern('%CONSOLE-TERPRI');
var l43=internals.intern('STRING','COMMON-LISP');
var l44=internals.make_lisp_string('jqconsole-error');
var l45=internals.make_lisp_string('jqconsole');
var l46=internals.make_lisp_string('Write');
l42.fvalue=(function(){var FUNC=(function JSCL_USER_CONSOLETERPRI(values){internals.checkArgsAtMost(arguments.length-1,0);
var v50=this;
return (function(){return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l45)][internals.xstring(l46)](internals.lisp_to_js(l43.fvalue(internals.pv,'\n')),internals.lisp_to_js(l44)));
})();
});
FUNC.fname='%CONSOLE-TERPRI';
return FUNC;
})();
l42;
var l47=internals.intern('ERRMSG-PREFIX');
var l48=internals.make_lisp_string('ERROR: ');
var l49=internals.make_lisp_string('jqconsole-error');
var l50=internals.make_lisp_string('jqconsole');
var l51=internals.make_lisp_string('Write');
l47.fvalue=(function(){var FUNC=(function JSCL_USER_ERRMSGPREFIX(values){internals.checkArgsAtMost(arguments.length-1,0);
var v52=this;
return (function(){return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l50)][internals.xstring(l51)](internals.lisp_to_js(l48),internals.lisp_to_js(l49)));
})();
});
FUNC.fname='ERRMSG-PREFIX';
return FUNC;
})();
l47;
var l52=internals.intern('+ERR-CSS+');
var l53=internals.make_lisp_string('jqconsole-error');
l52.value=l53;
l52;
var l54=internals.intern('DISPLAY-CONDITION');
var l55=internals.intern('LAMBDA-LIST','KEYWORD');
l55.value=l55;
var l56=internals.intern('C');
var l57=internals.intern('&OPTIONAL','COMMON-LISP');
var l58=internals.intern('STYLE');
var l59=internals.intern('NEWLINE');
var l60=internals.QIList(l56,l57,l58,l59,l6);
var l61=internals.intern('!ENSURE-GENERIC-FUNCTION');
l61.fvalue(internals.pv,l54,l55.value,l60);
var l62=internals.intern('FIND-GENERIC-FUNCTION');
var l63=internals.intern('IGNORE','COMMON-LISP');
var l64=internals.QIList(l56,l57,l58,l63,l6);
var l65=internals.QIList(l56,l57,internals.QIList(l58,l52,l6),l63,l6);
var l66=internals.intern('QUALIFIERS','KEYWORD');
l66.value=l66;
var l67=internals.intern('SPECIALIZERS','KEYWORD');
l67.value=l67;
var l68=internals.intern('!FIND-CLASS');
var l69=internals.intern('BODY','KEYWORD');
l69.value=l69;
var l70=internals.intern('BLOCK','COMMON-LISP');
var l71=internals.intern('OGET');
var l72=internals.intern('FORMAT','COMMON-LISP');
var l73=internals.intern('CLASS-NAME','COMMON-LISP');
var l74=internals.intern('CLASS-OF','COMMON-LISP');
var l75=internals.QIList(l70,l54,internals.QIList(l47,l6),internals.QIList(internals.QIList(l71,l4,internals.make_lisp_string('jqconsole'),internals.make_lisp_string('Write'),l6),internals.QIList(l72,l6,internals.make_lisp_string('Unhandled error condition ~a~%'),internals.QIList(l73,internals.QIList(l74,l56,l6),l6),l6),l58,l6),l6);
var l76=internals.intern('CMF','KEYWORD');
l76.value=l76;
var l77=internals.intern('NULL','COMMON-LISP');
var l78=internals.make_lisp_string('No next method for the generic function ~S.');
var l79=internals.intern('ERROR','COMMON-LISP');
var l80=internals.intern('NOT','COMMON-LISP');
var l81=internals.intern('&ALLOW-OTHER-KEYS','KEYWORD');
l81.value=l81;
var l82=internals.make_lisp_string('Unhandled error condition ~a~%');
var l83=internals.make_lisp_string('jqconsole');
var l84=internals.make_lisp_string('Write');
var l85=internals.intern('ENSURE-METHOD');
(function(v54){if (v54!==l6.value) l6.value;
else v54=l61.fvalue(internals.pv,l54,l55.value,l64);
return l85.fvalue(internals.pv,v54,l55.value,l65,l66.value,l6.value,l67.value,l37.fvalue(internals.pv,l68.fvalue(internals.pv,l3)),l69.value,l75,l76.value,(function JSCL_USER_NIL(values,v55,v56){internals.checkArgs(arguments.length-1,2);
var v57=this;
return (function(v64,v65){return (function(){var F=(function JSCL_USER_NIL(values,v66,v67,v68){internals.checkArgsAtLeast(arguments.length-1,1);
switch(arguments.length-1){case 1:v67=internals.symbolValue(l52);
;
case 2:v68=l6.value;
;
default:break;
}var v69;
var I;
for (I=3;I<arguments.length-1;I+=2)if (arguments[I+1]===l81.value) {v69=arguments[I+1+1];
break;
}if (I==arguments.length-1) v69=l6.value;
var START=3;
if ((arguments.length-1-START)%2==1) throw 'Odd number of keyword arguments.';
for (I=START;I<arguments.length-1;I+=2)if (arguments[I+1]!==l81.value) throw 'Unknown keyword argument '+arguments[I+1]['name'];
var v70=this;
return (function(){l47.fvalue(internals.pv);
return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l83)][internals.xstring(l84)](internals.lisp_to_js(l72.fvalue(internals.pv,l6.value,l82,l73.fvalue(internals.pv,l74.fvalue(internals.pv,v66)))),internals.lisp_to_js(v67)));
})();
});
var ARGS=[values];
var TAIL=v55;
while (TAIL!=l6.value){ARGS.push(TAIL.car);
TAIL=TAIL.cdr;
}return (typeof F==='function'?F:F.fvalue).apply(this,ARGS);
})();
})((function JSCL_USER_NIL(values){var v58=l6.value;
var I;
for (I=arguments.length-1-1;I>=0;I--)v58=new internals.Cons(arguments[I+1],v58);
var v59=this;
return (function(){return l77.fvalue(internals.pv,v56)!==l6.value?l79.fvalue(values,l78,l54):(function(){var F=v56;
return (typeof F==='function'?F:F.fvalue)(values,(function(v61){return v61!==l6.value?v61:v55;
})(v58));
})();
})();
}),(function JSCL_USER_NIL(values){internals.checkArgsAtMost(arguments.length-1,0);
var v62=this;
return (function(){return l80.fvalue(values,l77.fvalue(internals.pv,v56));
})();
}));
}));
})(l62.fvalue(internals.pv,l54,l6.value));
var l86=internals.QIList(l56,l57,l58,l63,l6);
var l87=internals.QIList(l56,l57,internals.QIList(l58,l52,l6),l63,l6);
var l88=internals.intern('TYPE-ERROR','COMMON-LISP');
var l89=internals.intern('TYPE-ERROR-DATUM','COMMON-LISP');
var l90=internals.intern('TYPE-ERROR-EXPECTED-TYPE','COMMON-LISP');
var l91=internals.QIList(l70,l54,internals.QIList(l47,l6),internals.QIList(internals.QIList(l71,l4,internals.make_lisp_string('jqconsole'),internals.make_lisp_string('Write'),l6),internals.QIList(l72,l6,internals.make_lisp_string('Type error.~% ~a does not designate a ~a~%'),internals.QIList(l89,l56,l6),internals.QIList(l90,l56,l6),l6),l58,l6),l6);
var l92=internals.make_lisp_string('Type error.~% ~a does not designate a ~a~%');
var l93=internals.make_lisp_string('jqconsole');
var l94=internals.make_lisp_string('Write');
(function(v72){if (v72!==l6.value) l6.value;
else v72=l61.fvalue(internals.pv,l54,l55.value,l86);
return l85.fvalue(internals.pv,v72,l55.value,l87,l66.value,l6.value,l67.value,l37.fvalue(internals.pv,l68.fvalue(internals.pv,l88)),l69.value,l91,l76.value,(function JSCL_USER_NIL(values,v73,v74){internals.checkArgs(arguments.length-1,2);
var v75=this;
return (function(v82,v83){return (function(){var F=(function JSCL_USER_NIL(values,v84,v85,v86){internals.checkArgsAtLeast(arguments.length-1,1);
switch(arguments.length-1){case 1:v85=internals.symbolValue(l52);
;
case 2:v86=l6.value;
;
default:break;
}var v87;
var I;
for (I=3;I<arguments.length-1;I+=2)if (arguments[I+1]===l81.value) {v87=arguments[I+1+1];
break;
}if (I==arguments.length-1) v87=l6.value;
var START=3;
if ((arguments.length-1-START)%2==1) throw 'Odd number of keyword arguments.';
for (I=START;I<arguments.length-1;I+=2)if (arguments[I+1]!==l81.value) throw 'Unknown keyword argument '+arguments[I+1]['name'];
var v88=this;
return (function(){l47.fvalue(internals.pv);
return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l93)][internals.xstring(l94)](internals.lisp_to_js(l72.fvalue(internals.pv,l6.value,l92,l89.fvalue(internals.pv,v84),l90.fvalue(internals.pv,v84))),internals.lisp_to_js(v85)));
})();
});
var ARGS=[values];
var TAIL=v73;
while (TAIL!=l6.value){ARGS.push(TAIL.car);
TAIL=TAIL.cdr;
}return (typeof F==='function'?F:F.fvalue).apply(this,ARGS);
})();
})((function JSCL_USER_NIL(values){var v76=l6.value;
var I;
for (I=arguments.length-1-1;I>=0;I--)v76=new internals.Cons(arguments[I+1],v76);
var v77=this;
return (function(){return l77.fvalue(internals.pv,v74)!==l6.value?l79.fvalue(values,l78,l54):(function(){var F=v74;
return (typeof F==='function'?F:F.fvalue)(values,(function(v79){return v79!==l6.value?v79:v73;
})(v76));
})();
})();
}),(function JSCL_USER_NIL(values){internals.checkArgsAtMost(arguments.length-1,0);
var v80=this;
return (function(){return l80.fvalue(values,l77.fvalue(internals.pv,v74));
})();
}));
}));
})(l62.fvalue(internals.pv,l54,l6.value));
var l95=internals.intern('NL');
var l96=internals.QIList(l56,l57,l58,l95,l6);
var l97=internals.QIList(l56,l57,internals.QIList(l58,l52,l6),internals.QIList(l95,l3,l6),l6);
var l98=internals.intern('SIMPLE-ERROR','COMMON-LISP');
var l99=internals.intern('APPLY','COMMON-LISP');
var l100=internals.intern('FUNCTION','COMMON-LISP');
var l101=internals.intern('SIMPLE-CONDITION-FORMAT-CONTROL','COMMON-LISP');
var l102=internals.intern('SIMPLE-CONDITION-FORMAT-ARGUMENTS','COMMON-LISP');
var l103=internals.intern('WHEN','COMMON-LISP');
var l104=internals.QIList(l70,l54,internals.QIList(l47,l6),internals.QIList(internals.QIList(l71,l4,internals.make_lisp_string('jqconsole'),internals.make_lisp_string('Write'),l6),internals.QIList(l99,internals.QIList(l100,l72,l6),l6,internals.QIList(l101,l56,l6),internals.QIList(l102,l56,l6),l6),l58,l6),internals.QIList(l103,l95,internals.QIList(l42,l6),l6),l6);
var l105=internals.make_lisp_string('jqconsole');
var l106=internals.make_lisp_string('Write');
(function(v90){if (v90!==l6.value) l6.value;
else v90=l61.fvalue(internals.pv,l54,l55.value,l96);
return l85.fvalue(internals.pv,v90,l55.value,l97,l66.value,l6.value,l67.value,l37.fvalue(internals.pv,l68.fvalue(internals.pv,l98)),l69.value,l104,l76.value,(function JSCL_USER_NIL(values,v91,v92){internals.checkArgs(arguments.length-1,2);
var v93=this;
return (function(v100,v101){return (function(){var F=(function JSCL_USER_NIL(values,v102,v103,v104){internals.checkArgsAtLeast(arguments.length-1,1);
switch(arguments.length-1){case 1:v103=internals.symbolValue(l52);
;
case 2:v104=l3.value;
;
default:break;
}var v105;
var I;
for (I=3;I<arguments.length-1;I+=2)if (arguments[I+1]===l81.value) {v105=arguments[I+1+1];
break;
}if (I==arguments.length-1) v105=l6.value;
var START=3;
if ((arguments.length-1-START)%2==1) throw 'Odd number of keyword arguments.';
for (I=START;I<arguments.length-1;I+=2)if (arguments[I+1]!==l81.value) throw 'Unknown keyword argument '+arguments[I+1]['name'];
var v106=this;
return (function(){l47.fvalue(internals.pv);
internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l105)][internals.xstring(l106)](internals.lisp_to_js((function(){var F=internals.symbolFunction(l72);
var ARGS=[internals.pv,l6.value,l101.fvalue(internals.pv,v102)];
var TAIL=l102.fvalue(internals.pv,v102);
while (TAIL!=l6.value){ARGS.push(TAIL.car);
TAIL=TAIL.cdr;
}return (typeof F==='function'?F:F.fvalue).apply(this,ARGS);
})()),internals.lisp_to_js(v103)));
return v104!==l6.value?l42.fvalue(values):l6.value;
})();
});
var ARGS=[values];
var TAIL=v91;
while (TAIL!=l6.value){ARGS.push(TAIL.car);
TAIL=TAIL.cdr;
}return (typeof F==='function'?F:F.fvalue).apply(this,ARGS);
})();
})((function JSCL_USER_NIL(values){var v94=l6.value;
var I;
for (I=arguments.length-1-1;I>=0;I--)v94=new internals.Cons(arguments[I+1],v94);
var v95=this;
return (function(){return l77.fvalue(internals.pv,v92)!==l6.value?l79.fvalue(values,l78,l54):(function(){var F=v92;
return (typeof F==='function'?F:F.fvalue)(values,(function(v97){return v97!==l6.value?v97:v91;
})(v94));
})();
})();
}),(function JSCL_USER_NIL(values){internals.checkArgsAtMost(arguments.length-1,0);
var v98=this;
return (function(){return l80.fvalue(values,l77.fvalue(internals.pv,v92));
})();
}));
}));
})(l62.fvalue(internals.pv,l54,l6.value));
var l107=internals.intern('TOPLEVEL');
var l108=internals.make_lisp_string('(');
var l109=internals.make_lisp_string(')');
var l110=internals.make_lisp_string('parents');
var l111=internals.make_lisp_string('jqconsole');
var l112=internals.make_lisp_string('RegisterMatching');
var l113=internals.make_lisp_string('~a> ');
var l114=internals.intern('*PACKAGE*','COMMON-LISP');
var l115=internals.intern('PACKAGE-NAME','COMMON-LISP');
var l116=internals.make_lisp_string('jqconsole-prompt');
var l117=internals.make_lisp_string('jqconsole');
var l118=internals.make_lisp_string('Write');
var l119=internals.make_lisp_string('console');
var l120=internals.make_lisp_string('log');
var l121=internals.make_lisp_string('message');
var l122=internals.make_lisp_string('ERROR[!]: ~a~%');
var l123=internals.make_lisp_string('jqconsole-error');
var l124=internals.make_lisp_string('jqconsole');
var l125=internals.make_lisp_string('Write');
var l126=internals.intern('*HANDLER-BINDINGS*');
var l127=internals.make_lisp_string('message');
var l128=internals.intern('%%ERROR');
var l129=internals.intern('READ-FROM-STRING','COMMON-LISP');
var l130=internals.intern('EVAL-INTERACTIVE');
var l131=internals.make_lisp_string('~S~%');
var l132=internals.make_lisp_string('jqconsole-return');
var l133=internals.make_lisp_string('jqconsole');
var l134=internals.make_lisp_string('Write');
var l135=internals.make_lisp_string('jqconsole');
var l136=internals.make_lisp_string('Prompt');
l107.fvalue=(function(){var FUNC=(function JSCL_USER_TOPLEVEL(values){internals.checkArgsAtMost(arguments.length-1,0);
var v108=this;
return (function(){internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l111)][internals.xstring(l112)](internals.lisp_to_js(l108),internals.lisp_to_js(l109),internals.lisp_to_js(l110)));
(function(v110){return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l117)][internals.xstring(l118)](internals.lisp_to_js(v110),internals.lisp_to_js(l116)));
})(l72.fvalue(internals.pv,l6.value,l113,l115.fvalue(internals.pv,internals.symbolValue(l114))));
return (function(v137){return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l135)][internals.xstring(l136)](internals.lisp_to_js(l3.value),internals.lisp_to_js(v137),internals.lisp_to_js(internals.symbolFunction(l32))));
})((function JSCL_USER_NIL(values,v111){internals.checkArgs(arguments.length-1,1);
var v112=this;
return (function(){(function(){try{return (function(){try{var v118=[];
return (function(v119){return (function(){var v120=1;
var v121=[];
TBLOOP:while (true){try{switch(v120){case 1:(function(v122){return internals.bindSpecialBindings([l126],[v122],(function(){(function(){var v124=new internals.Cons(l79,(function JSCL_USER_NIL(values,v125){internals.checkArgs(arguments.length-1,1);
var v126=this;
v119=v125;
return (function(){throw new internals.TagNLX(v121,2);
})();
}));
var v127=new internals.Cons(v124,internals.symbolValue(l126));
return l126.value=v127;
})();
return (function(){try{return (function(){throw new internals.BlockNLX(v118,(function(){var x1=l33.fvalue(internals.pv,v111);
if (typeof x1!='number') throw 'Not a number!';
return x1>0?l3.value:l6.value;
})()!==l6.value?(function(){var v131=l129.fvalue(internals.pv,v111);
var v132=(function(){var FUNC=internals.symbolFunction(l37);
var ARGS=[internals.pv];
return (function(){var values=internals.mv;
var VS;
VS=l130.fvalue(values,v131);
if (typeof VS==='object'&&VS&&'multiple-value' in VS) ARGS=ARGS.concat(VS);
else ARGS.push(VS);
return FUNC.apply(null,ARGS);
})();
})();
return (function(){return (function(v134,v135){(function(){while (v134!==l6.value){v135=internals.car(v134);
internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l133)][internals.xstring(l134)](internals.lisp_to_js(l72.fvalue(internals.pv,l6.value,l131,v135)),internals.lisp_to_js(l132)));
l6.value;
v134=internals.cdr(v134);
}return l6.value;
})();
return l6.value;
})(v132,l6.value);
})();
})():l6.value,'G462');
})();
}catch (v128){v128=internals.js_to_lisp(v128);
return (internals.isNLX(v128)?l3.value:l6.value)!==l6.value?(function(){throw v128;
})():l128.fvalue(internals.pv,(function(v129){return v129!==l6.value?v129:v128;
})(internals.js_to_lisp((function(){var TMP=v128[internals.xstring(l127)];
return TMP===undefined?l6.value:TMP;
})())));
}})();
}));
})(internals.symbolValue(l126));
case 2:(function(){throw new internals.BlockNLX(v118,(function(v136){return l54.fvalue(internals.pv,v136);
})(v119),'G462');
})();
default:break TBLOOP;
}}catch (JUMP){if (JUMP instanceof internals.TagNLX&&JUMP.id==v121) v120=JUMP.label;
else throw JUMP;
}}return l6.value;
})();
})(l6.value);
}catch (CF){if (CF instanceof internals.BlockNLX&&CF.id==v118) return CF.values;
else throw CF;
}})();
}catch (v114){v114=internals.js_to_lisp(v114);
internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l119)][internals.xstring(l120)](internals.lisp_to_js(v114)));
return (function(v117){return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l124)][internals.xstring(l125)](internals.lisp_to_js(l72.fvalue(internals.pv,l6.value,l122,v117)),internals.lisp_to_js(l123)));
})((function(v115){return v115!==l6.value?v115:(function(v116){return v116!==l6.value?v116:v114;
})(l36.fvalue(internals.pv,v114));
})(internals.js_to_lisp((function(){var TMP=v114[internals.xstring(l121)];
return TMP===undefined?l6.value:TMP;
})())));
}})();
l24.fvalue(internals.pv);
return l107.fvalue(values);
})();
}));
})();
});
FUNC.fname='TOPLEVEL';
return FUNC;
})();
l107;
var l137=internals.intern('WEB-INIT');
var l138=internals.intern('*STANDARD-OUTPUT*','COMMON-LISP');
var l139=internals.intern('WRITE-FN','KEYWORD');
l139.value=l139;
var l140=internals.intern('MAKE-STREAM');
var l141=internals.intern('HTML','KEYWORD');
l141.value=l141;
var l142=internals.intern('WELCOME-MESSAGE');
var l143=internals.make_lisp_string('load');
var l144=internals.make_lisp_string('window');
var l145=internals.make_lisp_string('addEventListener');
l137.fvalue=(function(){var FUNC=(function JSCL_USER_WEBINIT(values){internals.checkArgsAtMost(arguments.length-1,0);
var v138=this;
return (function(){l16.fvalue(internals.pv);
l138.value=l140.fvalue(internals.pv,l139.value,(function JSCL_USER_NIL(values,v140){internals.checkArgs(arguments.length-1,1);
var v141=this;
return l2.fvalue(values,v140);
}));
l142.fvalue(internals.pv,l141.value,l3.value);
return internals.js_to_lisp(internals.symbolValue(l4)[internals.xstring(l144)][internals.xstring(l145)](internals.lisp_to_js(l143),internals.lisp_to_js((function JSCL_USER_NIL(values){var v144=l6.value;
var I;
for (I=arguments.length-1-1;I>=0;I--)v144=new internals.Cons(arguments[I+1],v144);
var v145=this;
return l107.fvalue(values);
}))));
})();
});
FUNC.fname='WEB-INIT';
return FUNC;
})();
l137;
l137.fvalue(internals.pv);
})(jscl.internals.pv, jscl.internals);
})( typeof require !== 'undefined'? require('./jscl'): window.jscl )