View | Details | Raw Unified | Return to bug 13799
Collapse All | Expand All

(-)a/Koha/REST/V1.pm (-1 / +1 lines)
Lines 18-24 sub startup { Link Here
18
18
19
    $self->plugin(Swagger2 => {
19
    $self->plugin(Swagger2 => {
20
        route => $route,
20
        route => $route,
21
        url => $self->home->rel_file("Koha/REST/V1.swagger"),
21
        url => $self->home->rel_file("api/v1/swagger.json"),
22
    });
22
    });
23
}
23
}
24
24
(-)a/api/v1/doc/css/reset.css (+125 lines)
Line 0 Link Here
1
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
2
html,
3
body,
4
div,
5
span,
6
applet,
7
object,
8
iframe,
9
h1,
10
h2,
11
h3,
12
h4,
13
h5,
14
h6,
15
p,
16
blockquote,
17
pre,
18
a,
19
abbr,
20
acronym,
21
address,
22
big,
23
cite,
24
code,
25
del,
26
dfn,
27
em,
28
img,
29
ins,
30
kbd,
31
q,
32
s,
33
samp,
34
small,
35
strike,
36
strong,
37
sub,
38
sup,
39
tt,
40
var,
41
b,
42
u,
43
i,
44
center,
45
dl,
46
dt,
47
dd,
48
ol,
49
ul,
50
li,
51
fieldset,
52
form,
53
label,
54
legend,
55
table,
56
caption,
57
tbody,
58
tfoot,
59
thead,
60
tr,
61
th,
62
td,
63
article,
64
aside,
65
canvas,
66
details,
67
embed,
68
figure,
69
figcaption,
70
footer,
71
header,
72
hgroup,
73
menu,
74
nav,
75
output,
76
ruby,
77
section,
78
summary,
79
time,
80
mark,
81
audio,
82
video {
83
  margin: 0;
84
  padding: 0;
85
  border: 0;
86
  font-size: 100%;
87
  font: inherit;
88
  vertical-align: baseline;
89
}
90
/* HTML5 display-role reset for older browsers */
91
article,
92
aside,
93
details,
94
figcaption,
95
figure,
96
footer,
97
header,
98
hgroup,
99
menu,
100
nav,
101
section {
102
  display: block;
103
}
104
body {
105
  line-height: 1;
106
}
107
ol,
108
ul {
109
  list-style: none;
110
}
111
blockquote,
112
q {
113
  quotes: none;
114
}
115
blockquote:before,
116
blockquote:after,
117
q:before,
118
q:after {
119
  content: '';
120
  content: none;
121
}
122
table {
123
  border-collapse: collapse;
124
  border-spacing: 0;
125
}
(-)a/api/v1/doc/css/screen.css (+1256 lines)
Line 0 Link Here
1
/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
2
.swagger-section pre code {
3
  display: block;
4
  padding: 0.5em;
5
  background: #F0F0F0;
6
}
7
.swagger-section pre code,
8
.swagger-section pre .subst,
9
.swagger-section pre .tag .title,
10
.swagger-section pre .lisp .title,
11
.swagger-section pre .clojure .built_in,
12
.swagger-section pre .nginx .title {
13
  color: black;
14
}
15
.swagger-section pre .string,
16
.swagger-section pre .title,
17
.swagger-section pre .constant,
18
.swagger-section pre .parent,
19
.swagger-section pre .tag .value,
20
.swagger-section pre .rules .value,
21
.swagger-section pre .rules .value .number,
22
.swagger-section pre .preprocessor,
23
.swagger-section pre .ruby .symbol,
24
.swagger-section pre .ruby .symbol .string,
25
.swagger-section pre .aggregate,
26
.swagger-section pre .template_tag,
27
.swagger-section pre .django .variable,
28
.swagger-section pre .smalltalk .class,
29
.swagger-section pre .addition,
30
.swagger-section pre .flow,
31
.swagger-section pre .stream,
32
.swagger-section pre .bash .variable,
33
.swagger-section pre .apache .tag,
34
.swagger-section pre .apache .cbracket,
35
.swagger-section pre .tex .command,
36
.swagger-section pre .tex .special,
37
.swagger-section pre .erlang_repl .function_or_atom,
38
.swagger-section pre .markdown .header {
39
  color: #800;
40
}
41
.swagger-section pre .comment,
42
.swagger-section pre .annotation,
43
.swagger-section pre .template_comment,
44
.swagger-section pre .diff .header,
45
.swagger-section pre .chunk,
46
.swagger-section pre .markdown .blockquote {
47
  color: #888;
48
}
49
.swagger-section pre .number,
50
.swagger-section pre .date,
51
.swagger-section pre .regexp,
52
.swagger-section pre .literal,
53
.swagger-section pre .smalltalk .symbol,
54
.swagger-section pre .smalltalk .char,
55
.swagger-section pre .go .constant,
56
.swagger-section pre .change,
57
.swagger-section pre .markdown .bullet,
58
.swagger-section pre .markdown .link_url {
59
  color: #080;
60
}
61
.swagger-section pre .label,
62
.swagger-section pre .javadoc,
63
.swagger-section pre .ruby .string,
64
.swagger-section pre .decorator,
65
.swagger-section pre .filter .argument,
66
.swagger-section pre .localvars,
67
.swagger-section pre .array,
68
.swagger-section pre .attr_selector,
69
.swagger-section pre .important,
70
.swagger-section pre .pseudo,
71
.swagger-section pre .pi,
72
.swagger-section pre .doctype,
73
.swagger-section pre .deletion,
74
.swagger-section pre .envvar,
75
.swagger-section pre .shebang,
76
.swagger-section pre .apache .sqbracket,
77
.swagger-section pre .nginx .built_in,
78
.swagger-section pre .tex .formula,
79
.swagger-section pre .erlang_repl .reserved,
80
.swagger-section pre .prompt,
81
.swagger-section pre .markdown .link_label,
82
.swagger-section pre .vhdl .attribute,
83
.swagger-section pre .clojure .attribute,
84
.swagger-section pre .coffeescript .property {
85
  color: #8888ff;
86
}
87
.swagger-section pre .keyword,
88
.swagger-section pre .id,
89
.swagger-section pre .phpdoc,
90
.swagger-section pre .title,
91
.swagger-section pre .built_in,
92
.swagger-section pre .aggregate,
93
.swagger-section pre .css .tag,
94
.swagger-section pre .javadoctag,
95
.swagger-section pre .phpdoc,
96
.swagger-section pre .yardoctag,
97
.swagger-section pre .smalltalk .class,
98
.swagger-section pre .winutils,
99
.swagger-section pre .bash .variable,
100
.swagger-section pre .apache .tag,
101
.swagger-section pre .go .typename,
102
.swagger-section pre .tex .command,
103
.swagger-section pre .markdown .strong,
104
.swagger-section pre .request,
105
.swagger-section pre .status {
106
  font-weight: bold;
107
}
108
.swagger-section pre .markdown .emphasis {
109
  font-style: italic;
110
}
111
.swagger-section pre .nginx .built_in {
112
  font-weight: normal;
113
}
114
.swagger-section pre .coffeescript .javascript,
115
.swagger-section pre .javascript .xml,
116
.swagger-section pre .tex .formula,
117
.swagger-section pre .xml .javascript,
118
.swagger-section pre .xml .vbscript,
119
.swagger-section pre .xml .css,
120
.swagger-section pre .xml .cdata {
121
  opacity: 0.5;
122
}
123
.swagger-section .swagger-ui-wrap {
124
  line-height: 1;
125
  font-family: "Droid Sans", sans-serif;
126
  max-width: 960px;
127
  margin-left: auto;
128
  margin-right: auto;
129
}
130
.swagger-section .swagger-ui-wrap b,
131
.swagger-section .swagger-ui-wrap strong {
132
  font-family: "Droid Sans", sans-serif;
133
  font-weight: bold;
134
}
135
.swagger-section .swagger-ui-wrap q,
136
.swagger-section .swagger-ui-wrap blockquote {
137
  quotes: none;
138
}
139
.swagger-section .swagger-ui-wrap p {
140
  line-height: 1.4em;
141
  padding: 0 0 10px;
142
  color: #333333;
143
}
144
.swagger-section .swagger-ui-wrap q:before,
145
.swagger-section .swagger-ui-wrap q:after,
146
.swagger-section .swagger-ui-wrap blockquote:before,
147
.swagger-section .swagger-ui-wrap blockquote:after {
148
  content: none;
149
}
150
.swagger-section .swagger-ui-wrap .heading_with_menu h1,
151
.swagger-section .swagger-ui-wrap .heading_with_menu h2,
152
.swagger-section .swagger-ui-wrap .heading_with_menu h3,
153
.swagger-section .swagger-ui-wrap .heading_with_menu h4,
154
.swagger-section .swagger-ui-wrap .heading_with_menu h5,
155
.swagger-section .swagger-ui-wrap .heading_with_menu h6 {
156
  display: block;
157
  clear: none;
158
  float: left;
159
  -moz-box-sizing: border-box;
160
  -webkit-box-sizing: border-box;
161
  -ms-box-sizing: border-box;
162
  box-sizing: border-box;
163
  width: 60%;
164
}
165
.swagger-section .swagger-ui-wrap table {
166
  border-collapse: collapse;
167
  border-spacing: 0;
168
}
169
.swagger-section .swagger-ui-wrap table thead tr th {
170
  padding: 5px;
171
  font-size: 0.9em;
172
  color: #666666;
173
  border-bottom: 1px solid #999999;
174
}
175
.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
176
  border-bottom: none;
177
}
178
.swagger-section .swagger-ui-wrap table tbody tr.offset {
179
  background-color: #f0f0f0;
180
}
181
.swagger-section .swagger-ui-wrap table tbody tr td {
182
  padding: 6px;
183
  font-size: 0.9em;
184
  border-bottom: 1px solid #cccccc;
185
  vertical-align: top;
186
  line-height: 1.3em;
187
}
188
.swagger-section .swagger-ui-wrap ol {
189
  margin: 0px 0 10px;
190
  padding: 0 0 0 18px;
191
  list-style-type: decimal;
192
}
193
.swagger-section .swagger-ui-wrap ol li {
194
  padding: 5px 0px;
195
  font-size: 0.9em;
196
  color: #333333;
197
}
198
.swagger-section .swagger-ui-wrap ol,
199
.swagger-section .swagger-ui-wrap ul {
200
  list-style: none;
201
}
202
.swagger-section .swagger-ui-wrap h1 a,
203
.swagger-section .swagger-ui-wrap h2 a,
204
.swagger-section .swagger-ui-wrap h3 a,
205
.swagger-section .swagger-ui-wrap h4 a,
206
.swagger-section .swagger-ui-wrap h5 a,
207
.swagger-section .swagger-ui-wrap h6 a {
208
  text-decoration: none;
209
}
210
.swagger-section .swagger-ui-wrap h1 a:hover,
211
.swagger-section .swagger-ui-wrap h2 a:hover,
212
.swagger-section .swagger-ui-wrap h3 a:hover,
213
.swagger-section .swagger-ui-wrap h4 a:hover,
214
.swagger-section .swagger-ui-wrap h5 a:hover,
215
.swagger-section .swagger-ui-wrap h6 a:hover {
216
  text-decoration: underline;
217
}
218
.swagger-section .swagger-ui-wrap h1 span.divider,
219
.swagger-section .swagger-ui-wrap h2 span.divider,
220
.swagger-section .swagger-ui-wrap h3 span.divider,
221
.swagger-section .swagger-ui-wrap h4 span.divider,
222
.swagger-section .swagger-ui-wrap h5 span.divider,
223
.swagger-section .swagger-ui-wrap h6 span.divider {
224
  color: #aaaaaa;
225
}
226
.swagger-section .swagger-ui-wrap a {
227
  color: #547f00;
228
}
229
.swagger-section .swagger-ui-wrap a img {
230
  border: none;
231
}
232
.swagger-section .swagger-ui-wrap article,
233
.swagger-section .swagger-ui-wrap aside,
234
.swagger-section .swagger-ui-wrap details,
235
.swagger-section .swagger-ui-wrap figcaption,
236
.swagger-section .swagger-ui-wrap figure,
237
.swagger-section .swagger-ui-wrap footer,
238
.swagger-section .swagger-ui-wrap header,
239
.swagger-section .swagger-ui-wrap hgroup,
240
.swagger-section .swagger-ui-wrap menu,
241
.swagger-section .swagger-ui-wrap nav,
242
.swagger-section .swagger-ui-wrap section,
243
.swagger-section .swagger-ui-wrap summary {
244
  display: block;
245
}
246
.swagger-section .swagger-ui-wrap pre {
247
  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
248
  background-color: #fcf6db;
249
  border: 1px solid #e5e0c6;
250
  padding: 10px;
251
}
252
.swagger-section .swagger-ui-wrap pre code {
253
  line-height: 1.6em;
254
  background: none;
255
}
256
.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
257
  clear: both;
258
  display: block;
259
  color: #0F6AB4;
260
  font-size: 1.1em;
261
  margin: 0;
262
  padding: 15px 0 5px;
263
}
264
.swagger-section .swagger-ui-wrap .content pre {
265
  font-size: 12px;
266
  margin-top: 5px;
267
  padding: 5px;
268
}
269
.swagger-section .swagger-ui-wrap .icon-btn {
270
  cursor: pointer;
271
}
272
.swagger-section .swagger-ui-wrap .info_title {
273
  padding-bottom: 10px;
274
  font-weight: bold;
275
  font-size: 25px;
276
}
277
.swagger-section .swagger-ui-wrap p.big,
278
.swagger-section .swagger-ui-wrap div.big p {
279
  font-size: 1em;
280
  margin-bottom: 10px;
281
}
282
.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,
283
.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,
284
.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,
285
.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {
286
  width: 500px !important;
287
}
288
.swagger-section .swagger-ui-wrap .info_license {
289
  padding-bottom: 5px;
290
}
291
.swagger-section .swagger-ui-wrap .info_tos {
292
  padding-bottom: 5px;
293
}
294
.swagger-section .swagger-ui-wrap .message-fail {
295
  color: #cc0000;
296
}
297
.swagger-section .swagger-ui-wrap .info_url {
298
  padding-bottom: 5px;
299
}
300
.swagger-section .swagger-ui-wrap .info_email {
301
  padding-bottom: 5px;
302
}
303
.swagger-section .swagger-ui-wrap .info_name {
304
  padding-bottom: 5px;
305
}
306
.swagger-section .swagger-ui-wrap .info_description {
307
  padding-bottom: 10px;
308
  font-size: 15px;
309
}
310
.swagger-section .swagger-ui-wrap .markdown ol li,
311
.swagger-section .swagger-ui-wrap .markdown ul li {
312
  padding: 3px 0px;
313
  line-height: 1.4em;
314
  color: #333333;
315
}
316
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
317
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
318
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
319
  display: block;
320
  padding: 4px;
321
  width: auto;
322
  clear: both;
323
}
324
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
325
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
326
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
327
  font-size: 1.3em;
328
}
329
.swagger-section .swagger-ui-wrap table.fullwidth {
330
  width: 100%;
331
}
332
.swagger-section .swagger-ui-wrap .model-signature {
333
  font-family: "Droid Sans", sans-serif;
334
  font-size: 1em;
335
  line-height: 1.5em;
336
}
337
.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
338
  text-decoration: none;
339
  color: #AAA;
340
}
341
.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
342
  text-decoration: underline;
343
  color: black;
344
}
345
.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
346
  color: black;
347
  text-decoration: none;
348
}
349
.swagger-section .swagger-ui-wrap .model-signature .propType {
350
  color: #5555aa;
351
}
352
.swagger-section .swagger-ui-wrap .model-signature pre:hover {
353
  background-color: #ffffdd;
354
}
355
.swagger-section .swagger-ui-wrap .model-signature pre {
356
  font-size: .85em;
357
  line-height: 1.2em;
358
  overflow: auto;
359
  max-height: 200px;
360
  cursor: pointer;
361
}
362
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
363
  display: block;
364
  margin: 0;
365
  padding: 0;
366
}
367
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
368
  padding-right: 0;
369
  border-right: none;
370
}
371
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
372
  float: left;
373
  margin: 0 5px 5px 0;
374
  padding: 2px 5px 2px 0;
375
  border-right: 1px solid #ddd;
376
}
377
.swagger-section .swagger-ui-wrap .model-signature .propOpt {
378
  color: #555;
379
}
380
.swagger-section .swagger-ui-wrap .model-signature .snippet small {
381
  font-size: 0.75em;
382
}
383
.swagger-section .swagger-ui-wrap .model-signature .propOptKey {
384
  font-style: italic;
385
}
386
.swagger-section .swagger-ui-wrap .model-signature .description .strong {
387
  font-weight: bold;
388
  color: #000;
389
  font-size: .9em;
390
}
391
.swagger-section .swagger-ui-wrap .model-signature .description div {
392
  font-size: 0.9em;
393
  line-height: 1.5em;
394
  margin-left: 1em;
395
}
396
.swagger-section .swagger-ui-wrap .model-signature .description .stronger {
397
  font-weight: bold;
398
  color: #000;
399
}
400
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
401
  border-spacing: 0;
402
  position: absolute;
403
  background-color: #ffffff;
404
  border: 1px solid #bbbbbb;
405
  display: none;
406
  font-size: 11px;
407
  max-width: 400px;
408
  line-height: 30px;
409
  color: black;
410
  padding: 5px;
411
  margin-left: 10px;
412
}
413
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
414
  text-align: center;
415
  background-color: #eeeeee;
416
  border: 1px solid #bbbbbb;
417
  font-size: 11px;
418
  color: #666666;
419
  font-weight: bold;
420
  padding: 5px;
421
  line-height: 15px;
422
}
423
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
424
  font-weight: bold;
425
}
426
.swagger-section .swagger-ui-wrap .model-signature .propName {
427
  font-weight: bold;
428
}
429
.swagger-section .swagger-ui-wrap .model-signature .signature-container {
430
  clear: both;
431
}
432
.swagger-section .swagger-ui-wrap .body-textarea {
433
  width: 300px;
434
  height: 100px;
435
  border: 1px solid #aaa;
436
}
437
.swagger-section .swagger-ui-wrap .markdown p code,
438
.swagger-section .swagger-ui-wrap .markdown li code {
439
  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
440
  background-color: #f0f0f0;
441
  color: black;
442
  padding: 1px 3px;
443
}
444
.swagger-section .swagger-ui-wrap .required {
445
  font-weight: bold;
446
}
447
.swagger-section .swagger-ui-wrap input.parameter {
448
  width: 300px;
449
  border: 1px solid #aaa;
450
}
451
.swagger-section .swagger-ui-wrap h1 {
452
  color: black;
453
  font-size: 1.5em;
454
  line-height: 1.3em;
455
  padding: 10px 0 10px 0;
456
  font-family: "Droid Sans", sans-serif;
457
  font-weight: bold;
458
}
459
.swagger-section .swagger-ui-wrap .heading_with_menu {
460
  float: none;
461
  clear: both;
462
  overflow: hidden;
463
  display: block;
464
}
465
.swagger-section .swagger-ui-wrap .heading_with_menu ul {
466
  display: block;
467
  clear: none;
468
  float: right;
469
  -moz-box-sizing: border-box;
470
  -webkit-box-sizing: border-box;
471
  -ms-box-sizing: border-box;
472
  box-sizing: border-box;
473
  margin-top: 10px;
474
}
475
.swagger-section .swagger-ui-wrap h2 {
476
  color: black;
477
  font-size: 1.3em;
478
  padding: 10px 0 10px 0;
479
}
480
.swagger-section .swagger-ui-wrap h2 a {
481
  color: black;
482
}
483
.swagger-section .swagger-ui-wrap h2 span.sub {
484
  font-size: 0.7em;
485
  color: #999999;
486
  font-style: italic;
487
}
488
.swagger-section .swagger-ui-wrap h2 span.sub a {
489
  color: #777777;
490
}
491
.swagger-section .swagger-ui-wrap span.weak {
492
  color: #666666;
493
}
494
.swagger-section .swagger-ui-wrap .message-success {
495
  color: #89BF04;
496
}
497
.swagger-section .swagger-ui-wrap caption,
498
.swagger-section .swagger-ui-wrap th,
499
.swagger-section .swagger-ui-wrap td {
500
  text-align: left;
501
  font-weight: normal;
502
  vertical-align: middle;
503
}
504
.swagger-section .swagger-ui-wrap .code {
505
  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
506
}
507
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
508
  font-family: "Droid Sans", sans-serif;
509
  height: 250px;
510
  padding: 4px;
511
  display: block;
512
  clear: both;
513
}
514
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
515
  display: block;
516
  clear: both;
517
}
518
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
519
  float: none;
520
  clear: both;
521
  overflow: hidden;
522
  display: block;
523
}
524
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
525
  display: block;
526
  float: left;
527
  clear: none;
528
  margin: 0;
529
  padding: 0;
530
}
531
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
532
  display: block;
533
  float: left;
534
  clear: none;
535
  margin: 0 5px 0 0;
536
}
537
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
538
  color: black;
539
}
540
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
541
  display: block;
542
  clear: both;
543
  width: auto;
544
  padding: 0 0 3px;
545
  color: #666666;
546
}
547
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
548
  padding-left: 3px;
549
  color: #888888;
550
}
551
.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
552
  margin-left: 0;
553
  font-style: italic;
554
  font-size: 0.9em;
555
  margin: 0;
556
}
557
.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
558
  margin: 0;
559
  padding: 0;
560
}
561
.swagger-section .swagger-ui-wrap span.blank,
562
.swagger-section .swagger-ui-wrap span.empty {
563
  color: #888888;
564
  font-style: italic;
565
}
566
.swagger-section .swagger-ui-wrap .markdown h3 {
567
  color: #547f00;
568
}
569
.swagger-section .swagger-ui-wrap .markdown h4 {
570
  color: #666666;
571
}
572
.swagger-section .swagger-ui-wrap .markdown pre {
573
  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
574
  background-color: #fcf6db;
575
  border: 1px solid #e5e0c6;
576
  padding: 10px;
577
  margin: 0 0 10px 0;
578
}
579
.swagger-section .swagger-ui-wrap .markdown pre code {
580
  line-height: 1.6em;
581
}
582
.swagger-section .swagger-ui-wrap div.gist {
583
  margin: 20px 0 25px 0 !important;
584
}
585
.swagger-section .swagger-ui-wrap ul#resources {
586
  font-family: "Droid Sans", sans-serif;
587
  font-size: 0.9em;
588
}
589
.swagger-section .swagger-ui-wrap ul#resources li.resource {
590
  border-bottom: 1px solid #dddddd;
591
}
592
.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
593
.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
594
  color: black;
595
}
596
.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
597
.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
598
  color: #555555;
599
}
600
.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
601
  border-bottom: none;
602
}
603
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
604
  border: 1px solid transparent;
605
  float: none;
606
  clear: both;
607
  overflow: hidden;
608
  display: block;
609
}
610
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
611
  overflow: hidden;
612
  padding: 0;
613
  display: block;
614
  clear: none;
615
  float: right;
616
  margin: 14px 10px 0 0;
617
}
618
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
619
  float: left;
620
  clear: none;
621
  margin: 0;
622
  padding: 2px 10px;
623
  border-right: 1px solid #dddddd;
624
  color: #666666;
625
  font-size: 0.9em;
626
}
627
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
628
  color: #aaaaaa;
629
  text-decoration: none;
630
}
631
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
632
  text-decoration: underline;
633
  color: black;
634
}
635
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
636
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
637
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
638
  text-decoration: underline;
639
}
640
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
641
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
642
  padding-left: 0;
643
}
644
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
645
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
646
  padding-right: 0;
647
  border-right: none;
648
}
649
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
650
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
651
  padding-left: 0;
652
}
653
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
654
  color: #999999;
655
  padding-left: 0;
656
  display: block;
657
  clear: none;
658
  float: left;
659
  font-family: "Droid Sans", sans-serif;
660
  font-weight: bold;
661
}
662
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
663
  color: #999999;
664
}
665
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
666
  color: black;
667
}
668
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
669
  float: none;
670
  clear: both;
671
  overflow: hidden;
672
  display: block;
673
  margin: 0 0 10px;
674
  padding: 0;
675
}
676
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
677
  float: none;
678
  clear: both;
679
  overflow: hidden;
680
  display: block;
681
  margin: 0;
682
  padding: 0;
683
}
684
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
685
  display: block;
686
  clear: none;
687
  float: left;
688
  width: auto;
689
  margin: 0;
690
  padding: 0;
691
  line-height: 1.1em;
692
  color: black;
693
}
694
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
695
  padding-left: 10px;
696
}
697
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
698
  color: black;
699
  text-decoration: none;
700
}
701
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
702
  text-decoration: underline;
703
}
704
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
705
  text-transform: uppercase;
706
  text-decoration: none;
707
  color: white;
708
  display: inline-block;
709
  width: 50px;
710
  font-size: 0.7em;
711
  text-align: center;
712
  padding: 7px 0 4px;
713
  -moz-border-radius: 2px;
714
  -webkit-border-radius: 2px;
715
  -o-border-radius: 2px;
716
  -ms-border-radius: 2px;
717
  -khtml-border-radius: 2px;
718
  border-radius: 2px;
719
}
720
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
721
  margin: 0;
722
  padding: 0;
723
}
724
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
725
  overflow: hidden;
726
  padding: 0;
727
  display: block;
728
  clear: none;
729
  float: right;
730
  margin: 6px 10px 0 0;
731
}
732
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
733
  float: left;
734
  clear: none;
735
  margin: 0;
736
  padding: 2px 10px;
737
  font-size: 0.9em;
738
}
739
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
740
  text-decoration: none;
741
}
742
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
743
  color: black;
744
}
745
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
746
  border-top: none;
747
  padding: 10px;
748
  -moz-border-radius-bottomleft: 6px;
749
  -webkit-border-bottom-left-radius: 6px;
750
  -o-border-bottom-left-radius: 6px;
751
  -ms-border-bottom-left-radius: 6px;
752
  -khtml-border-bottom-left-radius: 6px;
753
  border-bottom-left-radius: 6px;
754
  -moz-border-radius-bottomright: 6px;
755
  -webkit-border-bottom-right-radius: 6px;
756
  -o-border-bottom-right-radius: 6px;
757
  -ms-border-bottom-right-radius: 6px;
758
  -khtml-border-bottom-right-radius: 6px;
759
  border-bottom-right-radius: 6px;
760
  margin: 0 0 20px;
761
}
762
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
763
  font-size: 1.1em;
764
  margin: 0;
765
  padding: 15px 0 5px;
766
}
767
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
768
  float: none;
769
  clear: both;
770
  overflow: hidden;
771
  display: block;
772
}
773
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
774
  padding: 4px 0 0 10px;
775
  display: inline-block;
776
  font-size: 0.9em;
777
}
778
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
779
  display: block;
780
  clear: none;
781
  float: left;
782
  padding: 6px 8px;
783
}
784
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {
785
  background-image: url('../images/throbber.gif');
786
  width: 128px;
787
  height: 16px;
788
  display: block;
789
  clear: none;
790
  float: right;
791
}
792
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
793
  outline: 2px solid black;
794
  outline-color: #cc0000;
795
}
796
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
797
  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
798
  padding: 10px;
799
  font-size: 0.9em;
800
  max-height: 400px;
801
  overflow-y: auto;
802
}
803
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
804
  background-color: #f9f2e9;
805
  border: 1px solid #f0e0ca;
806
}
807
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
808
  background-color: #c5862b;
809
}
810
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
811
  border-right: 1px solid #dddddd;
812
  border-right-color: #f0e0ca;
813
  color: #c5862b;
814
}
815
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
816
  color: #c5862b;
817
}
818
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
819
  background-color: #faf5ee;
820
  border: 1px solid #f0e0ca;
821
}
822
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
823
  color: #c5862b;
824
}
825
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
826
  color: #dcb67f;
827
}
828
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
829
  background-color: #fcffcd;
830
  border: 1px solid black;
831
  border-color: #ffd20f;
832
}
833
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
834
  text-transform: uppercase;
835
  background-color: #ffd20f;
836
}
837
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
838
  border-right: 1px solid #dddddd;
839
  border-right-color: #ffd20f;
840
  color: #ffd20f;
841
}
842
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
843
  color: #ffd20f;
844
}
845
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
846
  background-color: #fcffcd;
847
  border: 1px solid black;
848
  border-color: #ffd20f;
849
}
850
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
851
  color: #ffd20f;
852
}
853
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
854
  color: #6fc992;
855
}
856
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
857
  background-color: #f5e8e8;
858
  border: 1px solid #e8c6c7;
859
}
860
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
861
  text-transform: uppercase;
862
  background-color: #a41e22;
863
}
864
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
865
  border-right: 1px solid #dddddd;
866
  border-right-color: #e8c6c7;
867
  color: #a41e22;
868
}
869
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
870
  color: #a41e22;
871
}
872
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
873
  background-color: #f7eded;
874
  border: 1px solid #e8c6c7;
875
}
876
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
877
  color: #a41e22;
878
}
879
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
880
  color: #c8787a;
881
}
882
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
883
  background-color: #e7f6ec;
884
  border: 1px solid #c3e8d1;
885
}
886
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
887
  background-color: #10a54a;
888
}
889
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
890
  border-right: 1px solid #dddddd;
891
  border-right-color: #c3e8d1;
892
  color: #10a54a;
893
}
894
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
895
  color: #10a54a;
896
}
897
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
898
  background-color: #ebf7f0;
899
  border: 1px solid #c3e8d1;
900
}
901
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
902
  color: #10a54a;
903
}
904
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
905
  color: #6fc992;
906
}
907
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
908
  background-color: #FCE9E3;
909
  border: 1px solid #F5D5C3;
910
}
911
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
912
  background-color: #D38042;
913
}
914
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
915
  border-right: 1px solid #dddddd;
916
  border-right-color: #f0cecb;
917
  color: #D38042;
918
}
919
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
920
  color: #D38042;
921
}
922
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
923
  background-color: #faf0ef;
924
  border: 1px solid #f0cecb;
925
}
926
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
927
  color: #D38042;
928
}
929
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
930
  color: #dcb67f;
931
}
932
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
933
  background-color: #e7f0f7;
934
  border: 1px solid #c3d9ec;
935
}
936
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
937
  background-color: #0f6ab4;
938
}
939
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
940
  border-right: 1px solid #dddddd;
941
  border-right-color: #c3d9ec;
942
  color: #0f6ab4;
943
}
944
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
945
  color: #0f6ab4;
946
}
947
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
948
  background-color: #ebf3f9;
949
  border: 1px solid #c3d9ec;
950
}
951
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
952
  color: #0f6ab4;
953
}
954
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
955
  color: #6fa5d2;
956
}
957
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
958
  background-color: #e7f0f7;
959
  border: 1px solid #c3d9ec;
960
}
961
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
962
  background-color: #0f6ab4;
963
}
964
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
965
  border-right: 1px solid #dddddd;
966
  border-right-color: #c3d9ec;
967
  color: #0f6ab4;
968
}
969
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
970
  color: #0f6ab4;
971
}
972
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
973
  background-color: #ebf3f9;
974
  border: 1px solid #c3d9ec;
975
}
976
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
977
  color: #0f6ab4;
978
}
979
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
980
  color: #6fa5d2;
981
}
982
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
983
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
984
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
985
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
986
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
987
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
988
  border-top: none;
989
}
990
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
991
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
992
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
993
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
994
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
995
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
996
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
997
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
998
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
999
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
1000
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
1001
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
1002
  padding-right: 0;
1003
  border-right: none;
1004
}
1005
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
1006
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
1007
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
1008
  text-decoration: underline;
1009
}
1010
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
1011
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
1012
  padding-left: 0;
1013
}
1014
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
1015
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
1016
  padding-left: 0;
1017
}
1018
.swagger-section .swagger-ui-wrap p#colophon {
1019
  margin: 0 15px 40px 15px;
1020
  padding: 10px 0;
1021
  font-size: 0.8em;
1022
  border-top: 1px solid #dddddd;
1023
  font-family: "Droid Sans", sans-serif;
1024
  color: #999999;
1025
  font-style: italic;
1026
}
1027
.swagger-section .swagger-ui-wrap p#colophon a {
1028
  text-decoration: none;
1029
  color: #547f00;
1030
}
1031
.swagger-section .swagger-ui-wrap h3 {
1032
  color: black;
1033
  font-size: 1.1em;
1034
  padding: 10px 0 10px 0;
1035
}
1036
.swagger-section .swagger-ui-wrap .markdown ol,
1037
.swagger-section .swagger-ui-wrap .markdown ul {
1038
  font-family: "Droid Sans", sans-serif;
1039
  margin: 5px 0 10px;
1040
  padding: 0 0 0 18px;
1041
  list-style-type: disc;
1042
}
1043
.swagger-section .swagger-ui-wrap form.form_box {
1044
  background-color: #ebf3f9;
1045
  border: 1px solid #c3d9ec;
1046
  padding: 10px;
1047
}
1048
.swagger-section .swagger-ui-wrap form.form_box label {
1049
  color: #0f6ab4 !important;
1050
}
1051
.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
1052
  display: block;
1053
  padding: 10px;
1054
}
1055
.swagger-section .swagger-ui-wrap form.form_box p.weak {
1056
  font-size: 0.8em;
1057
}
1058
.swagger-section .swagger-ui-wrap form.form_box p {
1059
  font-size: 0.9em;
1060
  padding: 0 0 15px;
1061
  color: #7e7b6d;
1062
}
1063
.swagger-section .swagger-ui-wrap form.form_box p a {
1064
  color: #646257;
1065
}
1066
.swagger-section .swagger-ui-wrap form.form_box p strong {
1067
  color: black;
1068
}
1069
.swagger-section .title {
1070
  font-style: bold;
1071
}
1072
.swagger-section .secondary_form {
1073
  display: none;
1074
}
1075
.swagger-section .main_image {
1076
  display: block;
1077
  margin-left: auto;
1078
  margin-right: auto;
1079
}
1080
.swagger-section .oauth_body {
1081
  margin-left: 100px;
1082
  margin-right: 100px;
1083
}
1084
.swagger-section .oauth_submit {
1085
  text-align: center;
1086
}
1087
.swagger-section .api-popup-dialog {
1088
  z-index: 10000;
1089
  position: absolute;
1090
  width: 500px;
1091
  background: #FFF;
1092
  padding: 20px;
1093
  border: 1px solid #ccc;
1094
  border-radius: 5px;
1095
  display: none;
1096
  font-size: 13px;
1097
  color: #777;
1098
}
1099
.swagger-section .api-popup-dialog .api-popup-title {
1100
  font-size: 24px;
1101
  padding: 10px 0;
1102
}
1103
.swagger-section .api-popup-dialog .api-popup-title {
1104
  font-size: 24px;
1105
  padding: 10px 0;
1106
}
1107
.swagger-section .api-popup-dialog p.error-msg {
1108
  padding-left: 5px;
1109
  padding-bottom: 5px;
1110
}
1111
.swagger-section .api-popup-dialog button.api-popup-authbtn {
1112
  height: 30px;
1113
}
1114
.swagger-section .api-popup-dialog button.api-popup-cancel {
1115
  height: 30px;
1116
}
1117
.swagger-section .api-popup-scopes {
1118
  padding: 10px 20px;
1119
}
1120
.swagger-section .api-popup-scopes li {
1121
  padding: 5px 0;
1122
  line-height: 20px;
1123
}
1124
.swagger-section .api-popup-scopes .api-scope-desc {
1125
  padding-left: 20px;
1126
  font-style: italic;
1127
}
1128
.swagger-section .api-popup-scopes li input {
1129
  position: relative;
1130
  top: 2px;
1131
}
1132
.swagger-section .api-popup-actions {
1133
  padding-top: 10px;
1134
}
1135
.swagger-section .access {
1136
  float: right;
1137
}
1138
.swagger-section .auth {
1139
  float: right;
1140
}
1141
.swagger-section #api_information_panel {
1142
  position: absolute;
1143
  background: #FFF;
1144
  border: 1px solid #ccc;
1145
  border-radius: 5px;
1146
  display: none;
1147
  font-size: 13px;
1148
  max-width: 300px;
1149
  line-height: 30px;
1150
  color: black;
1151
  padding: 5px;
1152
}
1153
.swagger-section #api_information_panel p .api-msg-enabled {
1154
  color: green;
1155
}
1156
.swagger-section #api_information_panel p .api-msg-disabled {
1157
  color: red;
1158
}
1159
.swagger-section .api-ic {
1160
  height: 18px;
1161
  vertical-align: middle;
1162
  display: inline-block;
1163
  background: url(../images/explorer_icons.png) no-repeat;
1164
}
1165
.swagger-section .ic-info {
1166
  background-position: 0 0;
1167
  width: 18px;
1168
  margin-top: -7px;
1169
  margin-left: 4px;
1170
}
1171
.swagger-section .ic-warning {
1172
  background-position: -60px 0;
1173
  width: 18px;
1174
  margin-top: -7px;
1175
  margin-left: 4px;
1176
}
1177
.swagger-section .ic-error {
1178
  background-position: -30px 0;
1179
  width: 18px;
1180
  margin-top: -7px;
1181
  margin-left: 4px;
1182
}
1183
.swagger-section .ic-off {
1184
  background-position: -90px 0;
1185
  width: 58px;
1186
  margin-top: -4px;
1187
  cursor: pointer;
1188
}
1189
.swagger-section .ic-on {
1190
  background-position: -160px 0;
1191
  width: 58px;
1192
  margin-top: -4px;
1193
  cursor: pointer;
1194
}
1195
.swagger-section #header {
1196
  background-color: #89bf04;
1197
  padding: 14px;
1198
}
1199
.swagger-section #header a#logo {
1200
  font-size: 1.5em;
1201
  font-weight: bold;
1202
  text-decoration: none;
1203
  background: transparent url(../images/logo_small.png) no-repeat left center;
1204
  padding: 20px 0 20px 40px;
1205
  color: white;
1206
}
1207
.swagger-section #header form#api_selector {
1208
  display: block;
1209
  clear: none;
1210
  float: right;
1211
}
1212
.swagger-section #header form#api_selector .input {
1213
  display: block;
1214
  clear: none;
1215
  float: left;
1216
  margin: 0 10px 0 0;
1217
}
1218
.swagger-section #header form#api_selector .input input#input_apiKey {
1219
  width: 200px;
1220
}
1221
.swagger-section #header form#api_selector .input input#input_baseUrl {
1222
  width: 400px;
1223
}
1224
.swagger-section #header form#api_selector .input a#explore {
1225
  display: block;
1226
  text-decoration: none;
1227
  font-weight: bold;
1228
  padding: 6px 8px;
1229
  font-size: 0.9em;
1230
  color: white;
1231
  background-color: #547f00;
1232
  -moz-border-radius: 4px;
1233
  -webkit-border-radius: 4px;
1234
  -o-border-radius: 4px;
1235
  -ms-border-radius: 4px;
1236
  -khtml-border-radius: 4px;
1237
  border-radius: 4px;
1238
}
1239
.swagger-section #header form#api_selector .input a#explore:hover {
1240
  background-color: #547f00;
1241
}
1242
.swagger-section #header form#api_selector .input input {
1243
  font-size: 0.9em;
1244
  padding: 3px;
1245
  margin: 0;
1246
}
1247
.swagger-section #content_message {
1248
  margin: 10px 15px;
1249
  font-style: italic;
1250
  color: #999999;
1251
}
1252
.swagger-section #message-bar {
1253
  min-height: 30px;
1254
  text-align: center;
1255
  padding-top: 10px;
1256
}
(-)a/api/v1/doc/css/typography.css (+26 lines)
Line 0 Link Here
1
/* droid-sans-regular - latin */
2
@font-face {
3
  font-family: 'Droid Sans';
4
  font-style: normal;
5
  font-weight: 400;
6
  src: url('../fonts/droid-sans-v6-latin-regular.eot'); /* IE9 Compat Modes */
7
  src: local('Droid Sans'), local('DroidSans'),
8
       url('../fonts/droid-sans-v6-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
9
       url('../fonts/droid-sans-v6-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
10
       url('../fonts/droid-sans-v6-latin-regular.woff') format('woff'), /* Modern Browsers */
11
       url('../fonts/droid-sans-v6-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
12
       url('../fonts/droid-sans-v6-latin-regular.svg#DroidSans') format('svg'); /* Legacy iOS */
13
}
14
/* droid-sans-700 - latin */
15
@font-face {
16
  font-family: 'Droid Sans';
17
  font-style: normal;
18
  font-weight: 700;
19
  src: url('../fonts/droid-sans-v6-latin-700.eot'); /* IE9 Compat Modes */
20
  src: local('Droid Sans Bold'), local('DroidSans-Bold'),
21
       url('../fonts/droid-sans-v6-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
22
       url('../fonts/droid-sans-v6-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
23
       url('../fonts/droid-sans-v6-latin-700.woff') format('woff'), /* Modern Browsers */
24
       url('../fonts/droid-sans-v6-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
25
       url('../fonts/droid-sans-v6-latin-700.svg#DroidSans') format('svg'); /* Legacy iOS */
26
}
(-)a/api/v1/doc/fonts/droid-sans-v6-latin-700.svg (+411 lines)
Line 0 Link Here
1
<?xml version="1.0" standalone="no"?>
2
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
<svg xmlns="http://www.w3.org/2000/svg">
4
<defs >
5
<font id="DroidSans" horiz-adv-x="1123" ><font-face
6
    font-family="Droid Sans"
7
    units-per-em="2048"
8
    panose-1="2 11 8 6 3 8 4 2 2 4"
9
    ascent="1907"
10
    descent="-492"
11
    alphabetic="0" />
12
<glyph unicode=" " glyph-name="space" horiz-adv-x="532" />
13
<glyph unicode="!" glyph-name="exclam" horiz-adv-x="586" d="M416 485H172L121 1462H467L416 485ZM117 143Q117 190 130 222T168 275T224 304T293 313Q328 313 359 304T415 275T453 223T467 143Q467 98 453 66T415 13T360 -17T293 -27Q256 -27 224 -18T168 13T131
14
66T117 143Z" />
15
<glyph unicode="&quot;" glyph-name="quotedbl" horiz-adv-x="967" d="M412 1462L371 934H174L133 1462H412ZM834 1462L793 934H596L555 1462H834Z" />
16
<glyph unicode="#" glyph-name="numbersign" horiz-adv-x="1323" d="M999 844L952 612H1210V406H913L836 0H616L694 406H500L424 0H209L283 406H45V612H322L369 844H117V1053H406L483 1460H702L625 1053H823L901 1460H1116L1038 1053H1278V844H999ZM539 612H735L782
17
844H586L539 612Z" />
18
<glyph unicode="$" glyph-name="dollar" horiz-adv-x="1128" d="M1061 457Q1061 382 1035 318T956 206T825 127T645 86V-119H508V82Q442 84 386 90T281 107T188 133T100 168V432Q142 411 191 392T294 358T401 331T508 317V635Q500 638 491 642Q483 645 475 648T461
19
653Q370 688 302 726T189 811T121 915T98 1044Q98 1119 126 1180T208 1287T337 1361T508 1399V1556H645V1405Q732 1400 823 1380T1014 1317L913 1083Q848 1109 778 1129T645 1155V862L684 848Q779 813 850 776T968 693T1038 590T1061 457ZM760 451Q760 475 754
20
493T733 526T698 553T645 580V328Q704 337 732 367T760 451ZM399 1051Q399 1004 425 973T508 920V1153Q454 1147 427 1123T399 1051Z" />
21
<glyph unicode="%" glyph-name="percent" horiz-adv-x="1804" d="M315 1024Q315 897 337 835T410 772Q459 772 482 834T506 1024Q506 1274 410 1274Q360 1274 338 1213T315 1024ZM758 1026Q758 918 738 832T674 687T565 597T408 565Q323 565 259 596T151 687T85
22
832T63 1026Q63 1134 83 1219T145 1362T253 1452T408 1483Q494 1483 559 1452T669 1363T735 1219T758 1026ZM1425 1462L614 0H375L1186 1462H1425ZM1298 440Q1298 313 1320 251T1393 188Q1442 188 1465 250T1489 440Q1489 690 1393 690Q1343 690 1321 629T1298
23
440ZM1741 442Q1741 334 1721 249T1657 104T1548 14T1391 -18Q1306 -18 1242 13T1135 104T1069 248T1047 442Q1047 550 1067 635T1129 778T1236 868T1391 899Q1477 899 1542 868T1652 779T1718 635T1741 442Z" />
24
<glyph unicode="&amp;" glyph-name="ampersand" horiz-adv-x="1479" d="M1475 0H1098L1001 100Q921 45 825 13T612 -20Q492 -20 395 10T228 94T120 225T82 395Q82 472 100 532T153 642T235 731T344 807Q306 853 280 895T237 979T214 1062T207 1149Q207 1227 237
25
1288T322 1393T452 1460T618 1483Q704 1483 776 1462T901 1401T984 1301T1014 1165Q1014 1096 992 1039T931 932T842 842T731 766L991 498Q1026 564 1052 637T1098 784H1415Q1400 727 1380 664T1332 538T1270 411T1192 291L1475 0ZM403 424Q403 380 419 345T463
26
286T530 249T614 236Q674 236 725 251T819 295L510 625Q459 583 431 535T403 424ZM731 1124Q731 1155 721 1176T695 1212T658 1232T616 1239Q594 1239 572 1233T531 1214T501 1178T489 1122Q489 1070 512 1024T575 932Q652 976 691 1020T731 1124Z" />
27
<glyph unicode="&apos;" glyph-name="quotesingle" horiz-adv-x="545" d="M412 1462L371 934H174L133 1462H412Z" />
28
<glyph unicode="(" glyph-name="parenleft" horiz-adv-x="694" d="M82 561Q82 686 100 807T155 1043T248 1263T383 1462H633Q492 1269 420 1038T348 563Q348 444 366 326T420 95T509 -124T631 -324H383Q305 -234 249 -131T155 84T100 317T82 561Z" />
29
<glyph unicode=")" glyph-name="parenright" horiz-adv-x="694" d="M612 561Q612 437 594 317T539 85T446 -131T311 -324H63Q132 -230 185 -124T274 95T328 326T346 563Q346 807 274 1038T61 1462H311Q389 1369 445 1264T539 1044T594 808T612 561Z" />
30
<glyph unicode="*" glyph-name="asterisk" horiz-adv-x="1116" d="M688 1556L647 1188L1020 1292L1053 1040L713 1016L936 719L709 598L553 911L416 600L180 719L401 1016L63 1042L102 1292L467 1188L426 1556H688Z" />
31
<glyph unicode="+" glyph-name="plus" horiz-adv-x="1128" d="M455 612H88V831H455V1200H674V831H1040V612H674V248H455V612Z" />
32
<glyph unicode="," glyph-name="comma" horiz-adv-x="594" d="M459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444L459 215Z" />
33
<glyph unicode="-" glyph-name="hyphen" horiz-adv-x="659" d="M61 424V674H598V424H61Z" />
34
<glyph unicode="." glyph-name="period" horiz-adv-x="584" d="M117 143Q117 190 130 222T168 275T224 304T293 313Q328 313 359 304T415 275T453 223T467 143Q467 98 453 66T415 13T360 -17T293 -27Q256 -27 224 -18T168 13T131 66T117 143Z" />
35
<glyph unicode="/" glyph-name="slash" horiz-adv-x="846" d="M836 1462L291 0H14L559 1462H836Z" />
36
<glyph unicode="0" glyph-name="zero" horiz-adv-x="1128" d="M1065 731Q1065 554 1038 415T950 179T794 31T563 -20Q436 -20 342 31T186 179T94 415T63 731Q63 908 90 1048T178 1285T333 1433T563 1485Q689 1485 783 1434T940 1286T1034 1049T1065 731ZM371 731Q371
37
481 414 355T563 229Q667 229 712 354T758 731Q758 982 713 1108T563 1235Q510 1235 474 1203T414 1108T381 951T371 731Z" />
38
<glyph unicode="1" glyph-name="one" horiz-adv-x="1128" d="M817 0H508V846Q508 872 508 908T510 984T513 1064T516 1137Q511 1131 499 1119T472 1093T441 1063T410 1036L242 901L92 1087L563 1462H817V0Z" />
39
<glyph unicode="2" glyph-name="two" horiz-adv-x="1128" d="M1063 0H82V215L426 586Q491 656 544 715T635 830T694 944T715 1069Q715 1143 671 1184T551 1225Q472 1225 399 1186T246 1075L78 1274Q123 1315 172 1352T280 1419T410 1465T569 1483Q674 1483 757
40
1454T900 1372T990 1242T1022 1071Q1022 985 992 907T910 753T790 603T643 451L467 274V260H1063V0Z" />
41
<glyph unicode="3" glyph-name="three" horiz-adv-x="1128" d="M1006 1135Q1006 1059 982 999T915 893T815 817T690 770V764Q867 742 958 657T1049 426Q1049 330 1015 249T909 107T729 14T473 -20Q355 -20 251 -1T57 59V322Q102 298 152 280T252 250T350 231T442
42
225Q528 225 585 241T676 286T724 355T739 444Q739 489 721 525T661 587T552 627T387 641H283V858H385Q477 858 538 874T635 919T687 986T702 1067Q702 1145 654 1189T500 1233Q452 1233 411 1224T334 1200T269 1168T215 1133L59 1339Q101 1370 150 1396T258 1441T383
43
1472T526 1483Q634 1483 722 1460T874 1392T971 1283T1006 1135Z" />
44
<glyph unicode="4" glyph-name="four" horiz-adv-x="1128" d="M1085 303H909V0H608V303H4V518L625 1462H909V543H1085V303ZM608 543V791Q608 804 608 828T610 884T612 948T615 1011T618 1063T621 1096H612Q594 1054 572 1007T520 913L276 543H608Z" />
45
<glyph unicode="5" glyph-name="five" horiz-adv-x="1128" d="M598 934Q692 934 773 905T914 820T1008 681T1042 489Q1042 370 1005 276T896 116T718 15T473 -20Q418 -20 364 -15T261 -1T167 24T86 59V326Q121 306 167 289T262 259T362 239T457 231Q591 231 661
46
286T731 463Q731 571 663 627T451 684Q425 684 396 681T338 673T283 663T238 651L115 717L170 1462H942V1200H438L414 913Q446 920 488 927T598 934Z" />
47
<glyph unicode="6" glyph-name="six" horiz-adv-x="1128" d="M76 621Q76 726 87 830T128 1029T208 1207T336 1349T522 1444T776 1479Q797 1479 822 1478T872 1476T922 1471T965 1464V1217Q927 1226 885 1231T799 1237Q664 1237 577 1204T439 1110T367 966T340
48
780H352Q372 816 400 847T467 901T552 937T659 950Q754 950 830 919T958 829T1039 684T1067 487Q1067 368 1034 274T938 115T788 15T590 -20Q482 -20 388 18T225 136T116 335T76 621ZM584 227Q625 227 658 242T716 289T754 369T768 483Q768 590 724 651T588 713Q542
49
713 504 695T439 648T398 583T383 510Q383 459 395 409T433 318T496 252T584 227Z" />
50
<glyph unicode="7" glyph-name="seven" horiz-adv-x="1128" d="M207 0L727 1200H55V1460H1063V1266L530 0H207Z" />
51
<glyph unicode="8" glyph-name="eight" horiz-adv-x="1128" d="M565 1481Q656 1481 737 1459T879 1393T976 1283T1012 1128Q1012 1062 992 1009T937 912T854 834T750 772Q808 741 863 703T962 618T1031 511T1057 379Q1057 288 1021 214T920 88T765 8T565 -20Q447
52
-20 355 7T200 84T105 207T72 371Q72 446 94 506T154 614T243 699T352 764Q303 795 260 831T186 912T136 1011T117 1130Q117 1217 153 1282T252 1392T395 1459T565 1481ZM358 389Q358 349 371 316T409 258T473 221T561 207Q666 207 718 256T770 387Q770 429 753
53
462T708 524T645 577T575 623L553 637Q509 615 473 590T412 534T372 467T358 389ZM563 1255Q530 1255 502 1245T453 1216T420 1169T408 1106Q408 1064 420 1034T454 980T504 938T565 901Q596 917 624 936T673 979T708 1035T721 1106Q721 1141 709 1169T676 1216T626
54
1245T563 1255Z" />
55
<glyph unicode="9" glyph-name="nine" horiz-adv-x="1128" d="M1055 838Q1055 733 1044 629T1003 429T923 252T795 109T609 15T354 -20Q333 -20 308 -19T258 -17T208 -13T166 -6V242Q203 232 245 227T332 221Q467 221 554 254T692 348T764 493T791 678H778Q758
56
642 730 611T664 557T578 521T471 508Q376 508 300 539T172 629T91 774T63 971Q63 1090 96 1184T192 1343T342 1444T541 1479Q649 1479 743 1441T906 1323T1015 1123T1055 838ZM547 1231Q506 1231 472 1216T414 1170T376 1090T362 975Q362 869 407 807T543 745Q589
57
745 627 763T692 810T733 875T748 948Q748 999 736 1049T698 1140T635 1206T547 1231Z" />
58
<glyph unicode=":" glyph-name="colon" horiz-adv-x="584" d="M117 143Q117 190 130 222T168 275T224 304T293 313Q328 313 359 304T415 275T453 223T467 143Q467 98 453 66T415 13T360 -17T293 -27Q256 -27 224 -18T168 13T131 66T117 143ZM117 969Q117 1016
59
130 1048T168 1101T224 1130T293 1139Q328 1139 359 1130T415 1101T453 1049T467 969Q467 924 453 892T415 839T360 809T293 799Q256 799 224 808T168 838T131 891T117 969Z" />
60
<glyph unicode=";" glyph-name="semicolon" horiz-adv-x="594" d="M444 238L459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444ZM117 969Q117 1016 130 1048T168 1101T224 1130T293 1139Q328 1139 359 1130T415
61
1101T453 1049T467 969Q467 924 453 892T415 839T360 809T293 799Q256 799 224 808T168 838T131 891T117 969Z" />
62
<glyph unicode="&lt;" glyph-name="less" horiz-adv-x="1128" d="M1040 203L88 641V784L1040 1280V1040L397 723L1040 442V203Z" />
63
<glyph unicode="=" glyph-name="equal" horiz-adv-x="1128" d="M88 807V1024H1040V807H88ZM88 418V637H1040V418H88Z" />
64
<glyph unicode="&gt;" glyph-name="greater" horiz-adv-x="1128" d="M88 442L731 723L88 1040V1280L1040 784V641L88 203V442Z" />
65
<glyph unicode="?" glyph-name="question" horiz-adv-x="940" d="M264 485V559Q264 610 274 651T306 730T362 803T444 877Q486 910 515 936T562 987T588 1041T596 1106Q596 1163 558 1200T440 1237Q371 1237 292 1208T127 1137L25 1358Q68 1383 118 1405T223 1445T334
66
1473T444 1483Q546 1483 628 1459T767 1387T854 1273T885 1120Q885 1057 871 1008T830 916T761 834T664 750Q622 717 596 693T554 646T534 601T528 545V485H264ZM231 143Q231 190 244 222T282 275T338 304T408 313Q443 313 474 304T530 275T568 223T582 143Q582
67
98 568 66T530 13T475 -17T408 -27Q371 -27 339 -18T282 13T245 66T231 143Z" />
68
<glyph unicode="@" glyph-name="at" horiz-adv-x="1774" d="M1673 752Q1673 657 1651 564T1582 398T1467 279T1303 233Q1265 233 1232 242T1170 269T1122 310T1090 362H1075Q1056 337 1031 314T975 272T907 244T825 233Q742 233 678 261T569 342T502 468T479 631Q479
69
734 510 820T599 968T740 1065T926 1100Q971 1100 1019 1095T1111 1082T1195 1064T1262 1044L1241 625Q1239 603 1239 582T1239 555Q1239 513 1245 486T1262 444T1286 422T1315 416Q1350 416 1376 443T1419 516T1445 623T1454 754Q1454 882 1416 982T1311 1151T1150
70
1256T948 1292Q795 1292 679 1241T484 1099T365 882T324 608Q324 470 359 364T463 185T633 75T866 37Q922 37 981 44T1098 63T1213 92T1321 129V-63Q1227 -105 1113 -129T868 -154Q687 -154 545 -103T304 46T154 283T102 602Q102 726 129 839T207 1050T331 1227T499
71
1363T706 1450T948 1481Q1106 1481 1239 1431T1468 1286T1619 1056T1673 752ZM711 627Q711 515 749 466T850 416Q892 416 922 435T972 490T1002 575T1016 686L1028 907Q1008 912 981 915T926 918Q867 918 826 893T760 827T723 734T711 627Z" />
72
<glyph unicode="A" glyph-name="A" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489 608H846Z" />
73
<glyph unicode="B" glyph-name="B" horiz-adv-x="1315" d="M184 1462H612Q750 1462 854 1443T1028 1380T1133 1266T1169 1092Q1169 1030 1154 976T1110 881T1040 813T944 776V766Q999 754 1046 732T1129 670T1185 570T1206 424Q1206 324 1171 246T1071 113T912
74
29T700 0H184V1462ZM494 883H655Q713 883 752 893T815 925T849 977T860 1051Q860 1135 808 1171T641 1208H494V883ZM494 637V256H676Q737 256 778 270T845 310T882 373T893 455Q893 496 882 529T845 587T775 624T668 637H494Z" />
75
<glyph unicode="C" glyph-name="C" horiz-adv-x="1305" d="M805 1225Q716 1225 648 1191T533 1092T462 935T438 727Q438 610 459 519T525 366T639 271T805 238Q894 238 983 258T1178 315V55Q1130 35 1083 21T987 -2T887 -15T776 -20Q607 -20 483 34T278 186T158
76
422T119 729Q119 895 164 1033T296 1272T511 1427T805 1483Q914 1483 1023 1456T1233 1380L1133 1128Q1051 1167 968 1196T805 1225Z" />
77
<glyph unicode="D" glyph-name="D" horiz-adv-x="1434" d="M1315 745Q1315 560 1265 421T1119 188T885 47T569 0H184V1462H612Q773 1462 902 1416T1124 1280T1265 1055T1315 745ZM1001 737Q1001 859 977 947T906 1094T792 1180T637 1208H494V256H608Q804 256 902
78
376T1001 737Z" />
79
<glyph unicode="E" glyph-name="E" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0Z" />
80
<glyph unicode="F" glyph-name="F" horiz-adv-x="1124" d="M489 0H184V1462H1022V1208H489V831H985V578H489V0Z" />
81
<glyph unicode="G" glyph-name="G" horiz-adv-x="1483" d="M739 821H1319V63Q1261 44 1202 29T1080 3T947 -14T799 -20Q635 -20 509 28T296 172T164 408T119 733Q119 905 169 1044T316 1280T556 1430T883 1483Q1000 1483 1112 1458T1317 1393L1214 1145Q1146 1179
82
1061 1202T881 1225Q779 1225 698 1190T558 1089T469 932T438 727Q438 619 459 530T527 375T645 274T819 238Q885 238 930 244T1016 258V563H739V821Z" />
83
<glyph unicode="H" glyph-name="H" horiz-adv-x="1485" d="M1300 0H991V631H494V0H184V1462H494V889H991V1462H1300V0Z" />
84
<glyph unicode="I" glyph-name="I" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0Z" />
85
<glyph unicode="J" glyph-name="J" horiz-adv-x="678" d="M-2 -430Q-67 -430 -116 -424T-199 -408V-150Q-162 -158 -122 -164T-33 -170Q13 -170 52 -160T121 -126T167 -60T184 43V1462H494V53Q494 -73 458 -164T356 -314T199 -402T-2 -430Z" />
86
<glyph unicode="K" glyph-name="K" horiz-adv-x="1298" d="M1298 0H946L610 608L494 522V0H184V1462H494V758L616 965L950 1462H1294L827 803L1298 0Z" />
87
<glyph unicode="L" glyph-name="L" horiz-adv-x="1096" d="M184 0V1462H494V256H1026V0H184Z" />
88
<glyph unicode="M" glyph-name="M" horiz-adv-x="1870" d="M772 0L451 1147H442Q448 1055 452 969Q454 932 455 893T458 816T460 743T461 680V0H184V1462H606L922 344H928L1264 1462H1686V0H1397V692Q1397 718 1397 751T1399 821T1401 896T1404 970Q1408 1054
89
1411 1145H1403L1057 0H772Z" />
90
<glyph unicode="N" glyph-name="N" horiz-adv-x="1604" d="M1419 0H1026L451 1106H442Q448 1029 452 953Q456 888 458 817T461 688V0H184V1462H575L1149 367H1155Q1152 443 1148 517Q1147 549 1146 582T1143 649T1142 714T1141 770V1462H1419V0Z" />
91
<glyph unicode="O" glyph-name="O" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430 733ZM438
92
733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733Z" />
93
<glyph unicode="P" glyph-name="P" horiz-adv-x="1225" d="M494 774H555Q686 774 752 826T819 995Q819 1104 760 1156T573 1208H494V774ZM1133 1006Q1133 910 1104 822T1009 667T834 560T565 520H494V0H184V1462H590Q731 1462 833 1431T1002 1341T1101 1198T1133 1006Z" />
94
<glyph unicode="Q" glyph-name="Q" horiz-adv-x="1548" d="M1430 733Q1430 614 1411 510T1352 319T1253 166T1112 55L1473 -348H1075L807 -18Q800 -18 794 -19Q789 -20 784 -20T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483
95
1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430 733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733Z"
96
/>
97
<glyph unicode="R" glyph-name="R" horiz-adv-x="1290" d="M494 813H578Q707 813 763 864T819 1016Q819 1120 759 1164T573 1208H494V813ZM494 561V0H184V1462H584Q865 1462 999 1354T1133 1024Q1133 949 1113 888T1060 780T983 697T891 637Q1002 459 1090 319Q1128
98
259 1163 202T1227 100T1273 28L1290 0H946L629 561H494Z" />
99
<glyph unicode="S" glyph-name="S" horiz-adv-x="1073" d="M985 406Q985 308 952 230T854 96T696 10T481 -20Q375 -20 277 2T94 68V356Q142 333 191 312T290 273T391 246T492 236Q543 236 579 247T638 279T671 328T682 391Q682 432 665 463T616 522T540 576T440
100
631Q394 655 337 689T230 773T145 895T111 1067Q111 1165 143 1242T236 1373T381 1455T573 1483Q626 1483 676 1476T776 1456T876 1424T979 1380L879 1139Q834 1160 795 1176T719 1203T647 1219T575 1225Q497 1225 456 1184T414 1073Q414 1036 426 1008T466 954T537
101
903T643 844Q718 804 781 763T889 671T960 556T985 406Z" />
102
<glyph unicode="T" glyph-name="T" horiz-adv-x="1124" d="M717 0H408V1204H41V1462H1083V1204H717V0Z" />
103
<glyph unicode="U" glyph-name="U" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292Z" />
104
<glyph unicode="V" glyph-name="V" horiz-adv-x="1249" d="M936 1462H1249L793 0H455L0 1462H313L561 582Q566 565 574 525T592 437T611 341T625 260Q630 293 639 341T658 436T677 524T692 582L936 1462Z" />
105
<glyph unicode="W" glyph-name="W" horiz-adv-x="1898" d="M1546 0H1194L1014 721Q1010 736 1005 763T992 824T978 895T965 967T955 1031T948 1079Q946 1061 942 1032T931 968T919 896T906 825T893 763T883 719L705 0H352L0 1462H305L471 664Q474 648 479 618T492
106
549T506 469T521 387T534 313T543 256Q546 278 551 312T563 384T576 464T590 540T601 603T610 643L813 1462H1085L1288 643Q1291 631 1296 604T1308 541T1322 464T1335 385T1347 312T1356 256Q1359 278 1364 312T1377 387T1391 469T1406 549T1418 617T1427 664L1593
107
1462H1898L1546 0Z" />
108
<glyph unicode="X" glyph-name="X" horiz-adv-x="1284" d="M1284 0H930L631 553L332 0H0L444 754L31 1462H373L647 936L915 1462H1249L831 737L1284 0Z" />
109
<glyph unicode="Y" glyph-name="Y" horiz-adv-x="1196" d="M598 860L862 1462H1196L752 569V0H444V559L0 1462H336L598 860Z" />
110
<glyph unicode="Z" glyph-name="Z" horiz-adv-x="1104" d="M1055 0H49V201L668 1206H68V1462H1036V1262L418 256H1055V0Z" />
111
<glyph unicode="[" glyph-name="bracketleft" horiz-adv-x="678" d="M627 -324H143V1462H627V1251H403V-113H627V-324Z" />
112
<glyph unicode="\" glyph-name="backslash" horiz-adv-x="846" d="M289 1462L834 0H557L12 1462H289Z" />
113
<glyph unicode="]" glyph-name="bracketright" horiz-adv-x="678" d="M51 -113H274V1251H51V1462H535V-324H51V-113Z" />
114
<glyph unicode="^" glyph-name="asciicircum" horiz-adv-x="1090" d="M8 520L446 1470H590L1085 520H846L524 1163Q455 1002 384 839T244 520H8Z" />
115
<glyph unicode="_" glyph-name="underscore" horiz-adv-x="842" d="M846 -324H-4V-184H846V-324Z" />
116
<glyph unicode="`" glyph-name="grave" horiz-adv-x="1182" d="M645 1241Q611 1269 564 1310T470 1396T386 1480T332 1548V1569H674Q690 1535 711 1495T756 1414T803 1335T848 1268V1241H645Z" />
117
<glyph unicode="a" glyph-name="a" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190 1040Q274
118
1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518Z" />
119
<glyph unicode="b" glyph-name="b" horiz-adv-x="1245" d="M756 1139Q842 1139 913 1102T1035 992T1114 811T1143 561Q1143 417 1115 309T1034 127T909 17T748 -20Q692 -20 649 -8T571 24T512 69T465 123H444L393 0H160V1556H465V1194Q465 1161 463 1123T459 1051Q456
120
1012 453 973H465Q486 1008 513 1038T575 1090T656 1126T756 1139ZM653 895Q602 895 567 877T509 821T477 728T465 596V563Q465 482 474 419T506 314T564 249T655 227Q746 227 788 313T831 565Q831 730 789 812T653 895Z" />
121
<glyph unicode="c" glyph-name="c" horiz-adv-x="1022" d="M625 -20Q505 -20 409 13T244 115T139 293T102 553Q102 720 139 832T245 1013T410 1110T625 1139Q711 1139 796 1118T956 1059L868 827Q802 856 741 874T625 893Q514 893 464 809T414 555Q414 387 464
122
307T621 227Q708 227 779 249T924 307V53Q887 35 852 21T782 -2T708 -15T625 -20Z" />
123
<glyph unicode="d" glyph-name="d" horiz-adv-x="1245" d="M489 -20Q403 -20 332 17T210 126T131 307T102 557Q102 701 130 809T211 991T337 1102T498 1139Q552 1139 597 1127T678 1092T742 1040T793 975H803Q797 1014 792 1054Q787 1088 784 1126T780 1198V1556H1085V0H852L793
124
145H780Q759 111 732 81T670 28T590 -7T489 -20ZM600 223Q654 223 692 241T753 297T788 391T801 522V555Q801 636 791 699T758 804T696 869T598 891Q502 891 457 805T412 553Q412 388 457 306T600 223Z" />
125
<glyph unicode="e" glyph-name="e" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139 810 1106T962
126
1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20Z" />
127
<glyph unicode="f" glyph-name="f" horiz-adv-x="793" d="M741 889H514V0H209V889H41V1036L209 1118V1200Q209 1307 235 1377T309 1490T425 1549T578 1567Q670 1567 733 1553T840 1520L768 1296Q737 1307 703 1316T623 1325Q563 1325 539 1287T514 1188V1118H741V889Z" />
128
<glyph unicode="g" glyph-name="g" horiz-adv-x="1130" d="M1085 1116V950L922 899Q942 865 950 829T958 750Q958 665 931 595T851 474T718 397T532 369Q509 369 482 371T442 377Q422 360 411 342T399 297Q399 276 412 264T446 244T495 234T553 231H727Q808 231
129
872 213T980 156T1049 60T1073 -80Q1073 -175 1035 -251T922 -381T734 -463T475 -492Q361 -492 276 -471T134 -409T49 -311T20 -182Q20 -121 41 -76T97 1T176 53T268 84Q247 93 227 109T190 146T163 192T152 246Q152 278 161 304T189 352T234 395T295 436Q207 474
130
156 558T104 756Q104 846 132 917T214 1037T348 1113T532 1139Q552 1139 577 1137T626 1131T672 1123T705 1116H1085ZM285 -158Q285 -183 295 -206T330 -248T393 -276T489 -287Q645 -287 724 -243T803 -125Q803 -62 754 -41T602 -20H461Q434 -20 403 -26T346 -49T303
131
-91T285 -158ZM395 752Q395 661 429 611T532 561Q604 561 636 611T668 752Q668 842 637 895T532 948Q395 948 395 752Z" />
132
<glyph unicode="h" glyph-name="h" horiz-adv-x="1284" d="M1130 0H825V653Q825 774 788 834T672 895Q613 895 573 871T509 800T475 684T465 526V0H160V1556H465V1239Q465 1197 463 1151T458 1065Q454 1019 451 975H467Q516 1062 592 1100T764 1139Q847 1139 914
133
1116T1030 1042T1104 915T1130 729V0Z" />
134
<glyph unicode="i" glyph-name="i" horiz-adv-x="625" d="M147 1407Q147 1450 160 1478T195 1524T248 1549T313 1556Q347 1556 377 1549T429 1525T465 1479T479 1407Q479 1365 466 1336T430 1290T377 1265T313 1257Q279 1257 249 1264T196 1289T160 1336T147 1407ZM465
135
0H160V1118H465V0Z" />
136
<glyph unicode="j" glyph-name="j" horiz-adv-x="625" d="M102 -492Q54 -492 3 -485T-82 -467V-227Q-51 -237 -24 -241T37 -246Q62 -246 84 -239T123 -212T150 -160T160 -76V1118H465V-121Q465 -198 446 -265T383 -383T270 -463T102 -492ZM147 1407Q147 1450 160
137
1478T195 1524T248 1549T313 1556Q347 1556 377 1549T429 1525T465 1479T479 1407Q479 1365 466 1336T430 1290T377 1265T313 1257Q279 1257 249 1264T196 1289T160 1336T147 1407Z" />
138
<glyph unicode="k" glyph-name="k" horiz-adv-x="1208" d="M453 608L565 778L838 1118H1182L778 633L1208 0H856L584 430L465 348V0H160V1556H465V862L449 608H453Z" />
139
<glyph unicode="l" glyph-name="l" horiz-adv-x="625" d="M465 0H160V1556H465V0Z" />
140
<glyph unicode="m" glyph-name="m" horiz-adv-x="1929" d="M1120 0H815V653Q815 774 779 834T666 895Q608 895 570 871T508 800T475 684T465 526V0H160V1118H393L434 975H451Q475 1018 508 1049T582 1100T667 1129T758 1139Q873 1139 953 1100T1077 975H1102Q1126
141
1018 1160 1049T1235 1100T1321 1129T1413 1139Q1593 1139 1684 1042T1776 729V0H1470V653Q1470 774 1434 834T1321 895Q1212 895 1166 809T1120 561V0Z" />
142
<glyph unicode="n" glyph-name="n" horiz-adv-x="1284" d="M1130 0H825V653Q825 774 789 834T672 895Q612 895 572 871T509 800T475 684T465 526V0H160V1118H393L434 975H451Q475 1018 509 1049T585 1100T672 1129T766 1139Q848 1139 915 1116T1030 1042T1104
143
915T1130 729V0Z" />
144
<glyph unicode="o" glyph-name="o" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246 131T140 313T102
145
561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561Z" />
146
<glyph unicode="p" glyph-name="p" horiz-adv-x="1245" d="M748 -20Q693 -20 650 -8T572 24T512 69T465 123H449Q453 88 457 57Q460 31 462 4T465 -39V-492H160V1118H408L451 973H465Q486 1007 513 1037T575 1089T656 1125T756 1139Q843 1139 914 1102T1036 992T1115
147
811T1143 561Q1143 418 1114 310T1033 128T908 17T748 -20ZM653 895Q602 895 567 877T509 821T477 728T465 596V563Q465 482 474 419T506 314T564 249T655 227Q746 227 788 313T831 565Q831 730 789 812T653 895Z" />
148
<glyph unicode="q" glyph-name="q" horiz-adv-x="1245" d="M602 219Q657 219 694 237T755 293T789 386T801 518V555Q801 636 792 699T759 804T697 869T600 891Q504 891 459 805T414 553Q414 385 459 302T602 219ZM489 -20Q402 -20 331 17T209 126T130 307T102
149
557Q102 700 130 808T211 990T337 1101T498 1139Q554 1139 599 1127T680 1092T745 1040T795 975H803L827 1118H1085V-492H780V-23Q780 -4 782 24T787 80Q790 112 793 145H780Q760 111 733 81T671 28T590 -7T489 -20Z" />
150
<glyph unicode="r" glyph-name="r" horiz-adv-x="889" d="M743 1139Q755 1139 769 1139T797 1137T822 1134T840 1130V844Q832 846 818 848T789 851T758 853T733 854Q674 854 625 839T540 791T485 703T465 569V0H160V1118H391L436 950H451Q475 993 503 1028T565
151
1087T643 1125T743 1139Z" />
152
<glyph unicode="s" glyph-name="s" horiz-adv-x="985" d="M905 332Q905 244 873 178T782 68T639 2T451 -20Q396 -20 349 -17T260 -5T179 15T100 45V297Q142 276 188 259T281 230T370 210T451 203Q492 203 521 210T568 231T595 263T604 303Q604 324 598 340T568
153
375T501 417T381 475Q308 508 255 540T167 613T115 704T98 827Q98 905 128 963T213 1061T345 1119T518 1139Q618 1139 708 1116T893 1047L801 831Q725 867 656 890T518 913Q456 913 429 891T401 831Q401 811 408 796T436 764T495 728T594 680Q665 649 722 619T820
154
549T883 458T905 332Z" />
155
<glyph unicode="t" glyph-name="t" horiz-adv-x="848" d="M614 223Q659 223 699 233T782 258V31Q739 9 676 -5T537 -20Q464 -20 401 -3T292 56T220 170T193 350V889H47V1018L215 1120L303 1356H498V1118H770V889H498V350Q498 285 530 254T614 223Z" />
156
<glyph unicode="u" glyph-name="u" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891Z" />
157
<glyph unicode="v" glyph-name="v" horiz-adv-x="1104" d="M395 0L0 1118H319L504 481Q521 424 533 363T549 252H555Q558 305 570 364T600 481L784 1118H1104L709 0H395Z" />
158
<glyph unicode="w" glyph-name="w" horiz-adv-x="1651" d="M1014 0L928 391Q924 408 918 439T903 510T887 594T869 683Q849 786 825 905H819Q796 786 777 682Q769 638 761 593T744 509T730 437T719 387L629 0H301L0 1118H303L416 623Q425 584 434 530T452 420T468
159
315T479 236H485Q486 255 489 285T498 351T508 422T519 491T529 547T537 582L659 1118H995L1112 582Q1117 560 1125 514T1141 416T1156 314T1163 236H1169Q1172 261 1179 310T1196 415T1215 528T1235 623L1352 1118H1651L1346 0H1014Z" />
160
<glyph unicode="x" glyph-name="x" horiz-adv-x="1122" d="M389 571L29 1118H375L561 782L750 1118H1096L731 571L1112 0H766L561 362L356 0H10L389 571Z" />
161
<glyph unicode="y" glyph-name="y" horiz-adv-x="1104" d="M0 1118H334L514 489Q530 437 537 378T547 272H553Q555 295 558 323T567 380T578 437T592 489L768 1118H1104L662 -143Q600 -320 493 -406T225 -492Q173 -492 135 -487T70 -475V-233Q91 -238 123 -242T190
162
-246Q238 -246 272 -233T330 -197T372 -140T403 -66L422 -10L0 1118Z" />
163
<glyph unicode="z" glyph-name="z" horiz-adv-x="936" d="M877 0H55V180L512 885H86V1118H858V920L416 233H877V0Z" />
164
<glyph unicode="{" glyph-name="braceleft" horiz-adv-x="745" d="M287 367T222 408T31 449V688Q93 688 141 697T223 728T272 784T287 866V1184Q287 1258 306 1310T374 1396T509 1446T725 1462V1237Q685 1236 653 1230T598 1209T563 1166T551 1096V797Q545 610
165
317 575V563Q432 546 493 491T551 342V43Q551 0 563 -27T597 -69T652 -91T725 -98V-324Q594 -324 509 -308T375 -259T306 -172T287 -45V270Q287 367 222 408Z" />
166
<glyph unicode="|" glyph-name="bar" horiz-adv-x="1128" d="M455 1550H674V-465H455V1550Z" />
167
<glyph unicode="}" glyph-name="braceright" horiz-adv-x="745" d="M469 -45Q469 -119 450 -172T382 -258T247 -308T31 -324V-98Q71 -97 103 -91T157 -70T192 -27T205 43V342Q202 436 263 491T438 563V575Q211 610 205 797V1096Q205 1139 193 1166T158 1208T103
168
1230T31 1237V1462Q162 1462 247 1446T381 1397T450 1311T469 1184V866Q468 818 484 784T533 729T614 698T725 688V449Q600 449 535 408T469 270V-45Z" />
169
<glyph unicode="~" glyph-name="asciitilde" horiz-adv-x="1128" d="M528 616Q491 632 463 643T411 660T366 669T322 672Q293 672 262 663T201 637T143 598T88 551V782Q139 836 202 863T344 891Q374 891 399 889T453 879T517 860T600 827Q638 811 666 801T719
170
784T764 775T807 772Q836 772 867 781T928 807T986 845T1040 893V662Q939 553 784 553Q754 553 729 555T675 564T611 583T528 616Z" />
171
<glyph unicode="&#xa0;" glyph-name="nbspace" horiz-adv-x="532" />
172
<glyph unicode="&#xa1;" glyph-name="exclamdown" horiz-adv-x="586" d="M168 606H412L463 -369H117L168 606ZM467 948Q467 901 454 869T416 816T360 787T291 778Q256 778 225 787T169 816T131 868T117 948Q117 993 131 1025T169 1078T224 1108T291 1118Q328 1118
173
360 1109T416 1079T453 1026T467 948Z" />
174
<glyph unicode="&#xa2;" glyph-name="cent" horiz-adv-x="1128" d="M543 -20V186Q451 199 377 236T251 340T171 506T143 743Q143 884 171 985T251 1155T378 1260T543 1311V1483H721V1319Q759 1318 797 1313T870 1299T937 1281T993 1260L907 1034Q886 1044 860
175
1053T805 1070T750 1082T698 1087Q632 1087 586 1067T511 1006T468 901T455 750Q455 579 512 500T698 420Q774 420 844 438T965 481V242Q914 213 852 198T721 180V-20H543Z" />
176
<glyph unicode="&#xa3;" glyph-name="sterling" horiz-adv-x="1128" d="M680 1483Q790 1483 879 1459T1049 1401L956 1171Q885 1200 827 1217T705 1235Q638 1235 601 1197T563 1063V870H897V651H563V508Q563 453 550 413T514 343T466 294T412 260H1090V0H82V248Q124
177
266 157 287T214 337T250 407T262 506V651H84V870H262V1065Q262 1178 293 1257T380 1387T512 1460T680 1483Z" />
178
<glyph unicode="&#xa4;" glyph-name="currency" horiz-adv-x="1128" d="M168 723Q168 777 182 826T221 920L92 1047L240 1194L367 1067Q410 1092 461 1106T563 1120Q617 1120 665 1107T760 1065L887 1194L1036 1051L907 922Q932 880 946 829T961 723Q961 667 947
179
618T907 524L1032 399L887 254L760 379Q716 356 667 342T563 328Q507 328 458 340T365 379L240 256L94 401L221 526Q168 617 168 723ZM375 723Q375 684 390 650T430 590T490 550T563 535Q603 535 638 549T699 589T741 649T756 723Q756 763 741 797T700 857T638
180
898T563 913Q524 913 490 898T431 858T390 798T375 723Z" />
181
<glyph unicode="&#xa5;" glyph-name="yen" horiz-adv-x="1128" d="M565 860L809 1462H1122L760 715H954V537H709V399H954V221H709V0H422V221H174V399H422V537H174V715H365L8 1462H324L565 860Z" />
182
<glyph unicode="&#xa6;" glyph-name="brokenbar" horiz-adv-x="1128" d="M455 1550H674V735H455V1550ZM455 350H674V-465H455V350Z" />
183
<glyph unicode="&#xa7;" glyph-name="section" horiz-adv-x="995" d="M121 805Q121 849 131 886T160 955T203 1012T254 1055Q191 1095 156 1154T121 1288Q121 1353 150 1406T232 1498T360 1556T526 1577Q628 1577 716 1554T889 1493L807 1303Q739 1335 669 1360T520
184
1386Q439 1386 402 1363T365 1292Q365 1267 377 1246T415 1206T481 1167T578 1124Q649 1096 707 1062T807 987T872 895T895 782Q895 682 861 621T770 522Q832 482 863 430T895 303Q895 229 864 170T776 68T638 3T455 -20Q345 -20 261 0T106 59V266Q145 246 190
185
229T281 198T371 176T455 168Q511 168 548 177T607 202T639 239T649 285Q649 310 642 329T612 368T549 408T442 457Q366 489 306 521T205 593T143 685T121 805ZM344 827Q344 764 400 716T575 616L590 610Q605 621 619 635T644 668T661 708T668 756Q668 788 658
186
815T621 867T550 917T434 967Q416 960 400 947T372 915T352 875T344 827Z" />
187
<glyph unicode="&#xa8;" glyph-name="dieresis" horiz-adv-x="1182" d="M248 1405Q248 1440 259 1465T288 1507T332 1532T387 1540Q416 1540 441 1532T486 1508T516 1466T528 1405Q528 1371 517 1346T486 1305T442 1280T387 1272Q358 1272 333 1280T289 1304T259
188
1346T248 1405ZM651 1405Q651 1440 662 1465T692 1507T737 1532T793 1540Q821 1540 846 1532T891 1508T922 1466T934 1405Q934 1371 923 1346T892 1305T847 1280T793 1272Q733 1272 692 1305T651 1405Z" />
189
<glyph unicode="&#xa9;" glyph-name="copyright" horiz-adv-x="1704" d="M895 1010Q798 1010 745 936T692 731Q692 596 740 524T895 451Q952 451 1018 466T1141 510V319Q1084 292 1025 277T889 262Q782 262 702 296T569 392T488 540T461 733Q461 836 487 921T565
190
1068T697 1164T881 1198Q964 1198 1041 1176T1186 1120L1112 952Q999 1010 895 1010ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231 1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384
191
200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320 199T203 351T127 531T100 731ZM242 731Q242 604 290 493T420 300T614 169T852 121Q979 121 1090 169T1283 299T1414 493T1462 731Q1462 858 1414 969T1284 1162T1090 1293T852 1341Q725 1341 614 1293T421
192
1163T290 969T242 731Z" />
193
<glyph unicode="&#xaa;" glyph-name="ordfeminine" horiz-adv-x="743" d="M520 764L489 874Q449 816 393 784T268 752Q218 752 178 765T108 806T63 876T47 975Q47 1035 68 1076T130 1144T230 1184T365 1202L455 1206Q455 1269 426 1296T342 1323Q302 1323 253
194
1306T152 1262L86 1397Q148 1429 222 1454T387 1479Q455 1479 505 1460T589 1405T638 1319T655 1206V764H520ZM373 1081Q335 1078 312 1068T275 1044T257 1012T252 977Q252 939 271 921T317 903Q349 903 374 914T418 944T445 991T455 1051V1087L373 1081Z" />
195
<glyph unicode="&#xab;" glyph-name="guillemotleft" horiz-adv-x="1198" d="M82 573L391 1028L610 909L393 561L610 213L391 94L82 547V573ZM588 573L897 1028L1116 909L899 561L1116 213L897 94L588 547V573Z" />
196
<glyph unicode="&#xac;" glyph-name="logicalnot" horiz-adv-x="1128" d="M1040 248H821V612H88V831H1040V248Z" />
197
<glyph unicode="&#xad;" glyph-name="uni00AD" horiz-adv-x="659" d="M61 424V674H598V424H61Z" />
198
<glyph unicode="&#xae;" glyph-name="registered" horiz-adv-x="1704" d="M1157 905Q1157 811 1119 756T1014 672L1251 272H997L819 610H772V272H543V1188H807Q989 1188 1073 1118T1157 905ZM772 778H803Q869 778 897 806T926 901Q926 936 919 959T896 995T857
199
1014T801 1020H772V778ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231 1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384 200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320
200
199T203 351T127 531T100 731ZM242 731Q242 604 290 493T420 300T614 169T852 121Q979 121 1090 169T1283 299T1414 493T1462 731Q1462 858 1414 969T1284 1162T1090 1293T852 1341Q725 1341 614 1293T421 1163T290 969T242 731Z" />
201
<glyph unicode="&#xaf;" glyph-name="overscore" horiz-adv-x="1024" d="M1030 1556H-6V1757H1030V1556Z" />
202
<glyph unicode="&#xb0;" glyph-name="degree" horiz-adv-x="877" d="M92 1137Q92 1208 119 1271T193 1381T303 1455T438 1483Q510 1483 573 1456T683 1381T757 1271T784 1137Q784 1065 757 1002T684 893T574 820T438 793Q366 793 303 819T193 892T119 1002T92
203
1137ZM283 1137Q283 1106 295 1078T328 1029T377 996T438 983Q470 983 498 995T548 1029T581 1078T594 1137Q594 1169 582 1197T548 1247T499 1281T438 1294Q406 1294 378 1282T328 1248T295 1198T283 1137Z" />
204
<glyph unicode="&#xb1;" glyph-name="plusminus" horiz-adv-x="1128" d="M455 674H88V893H455V1262H674V893H1040V674H674V309H455V674ZM88 0V219H1040V0H88Z" />
205
<glyph unicode="&#xb2;" glyph-name="twosuperior" horiz-adv-x="776" d="M702 586H55V754L279 973Q325 1018 355 1051T404 1111T430 1161T438 1212Q438 1250 414 1270T350 1290Q310 1290 267 1270T170 1202L47 1354Q112 1411 193 1447T383 1483Q449 1483 503
206
1467T596 1419T656 1341T678 1233Q678 1187 666 1147T626 1065T557 980T455 881L350 786H702V586Z" />
207
<glyph unicode="&#xb3;" glyph-name="threesuperior" horiz-adv-x="776" d="M666 1249Q666 1180 626 1130T496 1051V1038Q547 1028 584 1007T645 959T682 898T694 829Q694 708 606 639T332 569Q256 569 190 586T59 639V829Q125 789 191 764T330 739Q404 739 438
208
766T473 846Q473 867 465 886T438 919T387 943T307 952H195V1112H287Q339 1112 371 1121T421 1145T445 1180T451 1221Q451 1259 426 1284T350 1309Q303 1309 261 1290T162 1231L61 1372Q123 1419 198 1450T377 1481Q439 1481 492 1465T583 1418T644 1345T666 1249Z"
209
/>
210
<glyph unicode="&#xb4;" glyph-name="acute" horiz-adv-x="1182" d="M332 1241V1268Q353 1297 377 1335T424 1413T469 1494T506 1569H848V1548Q837 1530 816 1506T768 1453T710 1396T648 1338T587 1285T535 1241H332Z" />
211
<glyph unicode="&#xb5;" glyph-name="mu" horiz-adv-x="1290" d="M465 465Q465 344 502 284T621 223Q679 223 718 247T781 318T815 434T825 592V1118H1130V0H897L854 150H842Q807 65 755 23T627 -20Q573 -20 528 3T455 70Q457 28 460 -15Q462 -52 463 -94T465
212
-172V-492H160V1118H465V465Z" />
213
<glyph unicode="&#xb6;" glyph-name="paragraph" horiz-adv-x="1341" d="M1167 -260H1006V1356H840V-260H678V559Q617 541 532 541Q437 541 360 566T228 651T143 806T113 1042Q113 1189 145 1287T237 1446T380 1531T563 1556H1167V-260Z" />
214
<glyph unicode="&#xb7;" glyph-name="middot" horiz-adv-x="584" d="M117 723Q117 770 130 802T168 855T224 884T293 893Q328 893 359 884T415 855T453 803T467 723Q467 678 453 646T415 593T360 563T293 553Q256 553 224 562T168 592T131 645T117 723Z" />
215
<glyph unicode="&#xb8;" glyph-name="cedilla" horiz-adv-x="420" d="M418 -250Q418 -307 403 -352T351 -428T256 -475T109 -492Q64 -492 28 -486T-37 -471V-303Q-22 -307 -4 -310T34 -317T72 -322T106 -324Q135 -324 156 -311T178 -262Q178 -225 141 -197T12
216
-154L90 0H283L256 -61Q287 -71 316 -88T367 -128T404 -182T418 -250Z" />
217
<glyph unicode="&#xb9;" glyph-name="onesuperior" horiz-adv-x="776" d="M584 586H346V1032Q346 1052 346 1082T348 1144T351 1201T354 1239Q348 1231 339 1221T319 1199T298 1178T279 1161L201 1100L92 1227L393 1462H584V586Z" />
218
<glyph unicode="&#xba;" glyph-name="ordmasculine" horiz-adv-x="754" d="M696 1116Q696 1029 674 962T609 848T508 777T375 752Q306 752 248 776T147 847T81 961T57 1116Q57 1203 79 1270T143 1384T244 1455T379 1479Q447 1479 504 1455T605 1385T672 1271T696
219
1116ZM260 1116Q260 1016 287 966T377 915Q437 915 464 965T492 1116Q492 1216 465 1265T377 1315Q315 1315 288 1266T260 1116Z" />
220
<glyph unicode="&#xbb;" glyph-name="guillemotright" horiz-adv-x="1198" d="M1118 547L809 94L590 213L807 561L590 909L809 1028L1118 573V547ZM612 547L303 94L84 213L301 561L84 909L303 1028L612 573V547Z" />
221
<glyph unicode="&#xbc;" glyph-name="onequarter" horiz-adv-x="1804" d="M1370 1462L559 0H320L1131 1462H1370ZM794 586H556V1032Q556 1052 556 1082T558 1144T561 1201T564 1239Q558 1231 549 1221T529 1199T508 1178T489 1161L411 1100L302 1227L603 1462H794V586ZM1682
222
152H1557V1H1319V152H936V306L1321 883H1557V320H1682V152ZM1319 320V484Q1319 526 1320 572T1325 668Q1320 655 1311 634T1290 590T1268 546T1248 511L1121 320H1319Z" />
223
<glyph unicode="&#xbd;" glyph-name="onehalf" horiz-adv-x="1804" d="M1370 1462L559 0H320L1131 1462H1370ZM794 586H556V1032Q556 1052 556 1082T558 1144T561 1201T564 1239Q558 1231 549 1221T529 1199T508 1178T489 1161L411 1100L302 1227L603 1462H794V586ZM1716
224
1H1069V169L1293 388Q1339 433 1369 466T1418 526T1444 576T1452 627Q1452 665 1428 685T1364 705Q1324 705 1281 685T1184 617L1061 769Q1126 826 1207 862T1397 898Q1463 898 1517 882T1610 834T1670 756T1692 648Q1692 602 1680 562T1640 480T1571 395T1469
225
296L1364 201H1716V1Z" />
226
<glyph unicode="&#xbe;" glyph-name="threequarters" horiz-adv-x="1804" d="M1441 1462L630 0H391L1202 1462H1441ZM1712 152H1587V1H1349V152H966V306L1351 883H1587V320H1712V152ZM1349 320V484Q1349 526 1350 572T1355 668Q1350 655 1341 634T1320 590T1298
227
546T1278 511L1151 320H1349ZM697 1249Q697 1180 657 1130T527 1051V1038Q578 1028 615 1007T676 959T713 898T725 829Q725 708 637 639T363 569Q287 569 221 586T90 639V829Q156 789 222 764T361 739Q435 739 469 766T504 846Q504 867 496 886T469 919T418 943T338
228
952H226V1112H318Q370 1112 402 1121T452 1145T476 1180T482 1221Q482 1259 457 1284T381 1309Q334 1309 292 1290T193 1231L92 1372Q154 1419 229 1450T408 1481Q470 1481 523 1465T614 1418T675 1345T697 1249Z" />
229
<glyph unicode="&#xbf;" glyph-name="questiondown" horiz-adv-x="940" d="M686 606V532Q686 481 676 440T644 361T588 288T506 215Q464 182 435 156T388 105T362 51T354 -14Q354 -71 393 -108T510 -145Q579 -145 659 -116T823 -45L926 -266Q883 -292 832 -314T727
230
-354T616 -381T506 -391Q404 -391 323 -367T184 -296T97 -182T66 -29Q66 34 79 83T121 175T190 258T287 342Q328 375 354 399T396 446T416 492T422 547V606H686ZM719 948Q719 901 706 869T668 816T612 787T543 778Q508 778 477 787T421 816T383 868T369 948Q369
231
993 383 1025T421 1078T476 1108T543 1118Q580 1118 612 1109T668 1079T705 1026T719 948Z" />
232
<glyph unicode="&#xc0;" glyph-name="Agrave" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
233
608H846ZM632 1579Q598 1607 551 1648T457 1734T373 1818T319 1886V1907H661Q677 1873 698 1833T743 1752T790 1673T835 1606V1579H632Z" />
234
<glyph unicode="&#xc1;" glyph-name="Aacute" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
235
608H846ZM494 1579V1606Q515 1635 539 1673T586 1751T631 1832T668 1907H1010V1886Q999 1868 978 1844T930 1791T872 1734T810 1676T749 1623T697 1579H494Z" />
236
<glyph unicode="&#xc2;" glyph-name="Acircumflex" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582
237
928L489 608H846ZM879 1579Q828 1613 773 1656T666 1755Q612 1699 560 1656T457 1579H254V1606Q280 1635 311 1673T375 1751T438 1832T490 1907H846Q867 1873 897 1833T959 1752T1024 1673T1082 1606V1579H879Z" />
238
<glyph unicode="&#xc3;" glyph-name="Atilde" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
239
608H846ZM504 1684Q473 1684 455 1658T424 1577H275Q281 1657 301 1715T353 1811T430 1867T527 1886Q568 1886 607 1870T684 1835T760 1799T834 1782Q865 1782 883 1808T914 1888H1063Q1057 1809 1037 1751T983 1655T907 1598T811 1579Q771 1579 731 1595T653 1631T578
240
1667T504 1684Z" />
241
<glyph unicode="&#xc4;" glyph-name="Adieresis" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
242
608H846ZM324 1743Q324 1778 335 1803T364 1845T408 1870T463 1878Q492 1878 517 1870T562 1846T592 1804T604 1743Q604 1709 593 1684T562 1643T518 1618T463 1610Q434 1610 409 1618T365 1642T335 1684T324 1743ZM727 1743Q727 1778 738 1803T768 1845T813 1870T869
243
1878Q897 1878 922 1870T967 1846T998 1804T1010 1743Q1010 1709 999 1684T968 1643T923 1618T869 1610Q809 1610 768 1643T727 1743Z" />
244
<glyph unicode="&#xc5;" glyph-name="Aring" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
245
608H846ZM918 1567Q918 1511 899 1467T845 1391T764 1344T664 1327Q609 1327 563 1343T485 1390T434 1465T416 1565Q416 1620 434 1664T484 1738T563 1785T664 1802Q717 1802 763 1786T843 1739T898 1665T918 1567ZM760 1565Q760 1610 733 1635T664 1661Q622 1661
246
595 1636T568 1565Q568 1520 592 1494T664 1468Q706 1468 733 1494T760 1565Z" />
247
<glyph unicode="&#xc6;" glyph-name="AE" horiz-adv-x="1888" d="M1767 0H926V348H465L315 0H0L655 1462H1767V1208H1235V887H1731V633H1235V256H1767V0ZM578 608H926V1198H829L578 608Z" />
248
<glyph unicode="&#xc7;" glyph-name="Ccedilla" horiz-adv-x="1305" d="M805 1225Q716 1225 648 1191T533 1092T462 935T438 727Q438 610 459 519T525 366T639 271T805 238Q894 238 983 258T1178 315V55Q1130 35 1083 21T987 -2T887 -15T776 -20Q607 -20 483 34T278
249
186T158 422T119 729Q119 895 164 1033T296 1272T511 1427T805 1483Q914 1483 1023 1456T1233 1380L1133 1128Q1051 1167 968 1196T805 1225ZM926 -250Q926 -307 911 -352T859 -428T764 -475T617 -492Q572 -492 536 -486T471 -471V-303Q486 -307 504 -310T542 -317T580
250
-322T614 -324Q643 -324 664 -311T686 -262Q686 -225 649 -197T520 -154L598 0H791L764 -61Q795 -71 824 -88T875 -128T912 -182T926 -250Z" />
251
<glyph unicode="&#xc8;" glyph-name="Egrave" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM572 1579Q538 1607 491 1648T397 1734T313 1818T259 1886V1907H601Q617 1873 638 1833T683 1752T730 1673T775 1606V1579H572Z" />
252
<glyph unicode="&#xc9;" glyph-name="Eacute" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM424 1579V1606Q445 1635 469 1673T516 1751T561 1832T598 1907H940V1886Q929 1868 908 1844T860 1791T802 1734T740 1676T679
253
1623T627 1579H424Z" />
254
<glyph unicode="&#xca;" glyph-name="Ecircumflex" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM832 1579Q781 1613 726 1656T619 1755Q565 1699 513 1656T410 1579H207V1606Q233 1635 264 1673T328 1751T391 1832T443
255
1907H799Q820 1873 850 1833T912 1752T977 1673T1035 1606V1579H832Z" />
256
<glyph unicode="&#xcb;" glyph-name="Edieresis" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM273 1743Q273 1778 284 1803T313 1845T357 1870T412 1878Q441 1878 466 1870T511 1846T541 1804T553 1743Q553 1709 542 1684T511
257
1643T467 1618T412 1610Q383 1610 358 1618T314 1642T284 1684T273 1743ZM676 1743Q676 1778 687 1803T717 1845T762 1870T818 1878Q846 1878 871 1870T916 1846T947 1804T959 1743Q959 1709 948 1684T917 1643T872 1618T818 1610Q758 1610 717 1643T676 1743Z"
258
/>
259
<glyph unicode="&#xcc;" glyph-name="Igrave" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM355 1579Q321 1607 274 1648T180 1734T96 1818T42 1886V1907H384Q400 1873 421 1833T466 1752T513 1673T558 1606V1579H355Z"
260
/>
261
<glyph unicode="&#xcd;" glyph-name="Iacute" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM237 1579V1606Q258 1635 282 1673T329 1751T374 1832T411 1907H753V1886Q742 1868 721 1844T673 1791T615 1734T553
262
1676T492 1623T440 1579H237Z" />
263
<glyph unicode="&#xce;" glyph-name="Icircumflex" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM609 1579Q558 1613 503 1656T396 1755Q342 1699 290 1656T187 1579H-16V1606Q10 1635 41 1673T105 1751T168
264
1832T220 1907H576Q597 1873 627 1833T689 1752T754 1673T812 1606V1579H609Z" />
265
<glyph unicode="&#xcf;" glyph-name="Idieresis" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM54 1743Q54 1778 65 1803T94 1845T138 1870T193 1878Q222 1878 247 1870T292 1846T322 1804T334 1743Q334 1709
266
323 1684T292 1643T248 1618T193 1610Q164 1610 139 1618T95 1642T65 1684T54 1743ZM457 1743Q457 1778 468 1803T498 1845T543 1870T599 1878Q627 1878 652 1870T697 1846T728 1804T740 1743Q740 1709 729 1684T698 1643T653 1618T599 1610Q539 1610 498 1643T457
267
1743Z" />
268
<glyph unicode="&#xd0;" glyph-name="Eth" horiz-adv-x="1434" d="M47 850H184V1462H612Q773 1462 902 1416T1124 1280T1265 1055T1315 745Q1315 560 1265 421T1119 188T885 47T569 0H184V596H47V850ZM1001 737Q1001 859 977 947T906 1094T792 1180T637 1208H494V850H731V596H494V256H608Q804
269
256 902 376T1001 737Z" />
270
<glyph unicode="&#xd1;" glyph-name="Ntilde" horiz-adv-x="1604" d="M1419 0H1026L451 1106H442Q448 1029 452 953Q456 888 458 817T461 688V0H184V1462H575L1149 367H1155Q1152 443 1148 517Q1147 549 1146 582T1143 649T1142 714T1141 770V1462H1419V0ZM623
271
1684Q592 1684 574 1658T543 1577H394Q400 1657 420 1715T472 1811T549 1867T646 1886Q687 1886 726 1870T803 1835T879 1799T953 1782Q984 1782 1002 1808T1033 1888H1182Q1176 1809 1156 1751T1102 1655T1026 1598T930 1579Q890 1579 850 1595T772 1631T697 1667T623
272
1684Z" />
273
<glyph unicode="&#xd2;" glyph-name="Ograve" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
274
733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM729 1579Q695 1607 648 1648T554 1734T470 1818T416 1886V1907H758Q774
275
1873 795 1833T840 1752T887 1673T932 1606V1579H729Z" />
276
<glyph unicode="&#xd3;" glyph-name="Oacute" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
277
733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM590 1579V1606Q611 1635 635 1673T682 1751T727 1832T764 1907H1106V1886Q1095
278
1868 1074 1844T1026 1791T968 1734T906 1676T845 1623T793 1579H590Z" />
279
<glyph unicode="&#xd4;" glyph-name="Ocircumflex" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390
280
1043T1430 733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM975 1579Q924 1613 869 1656T762 1755Q708 1699
281
656 1656T553 1579H350V1606Q376 1635 407 1673T471 1751T534 1832T586 1907H942Q963 1873 993 1833T1055 1752T1120 1673T1178 1606V1579H975Z" />
282
<glyph unicode="&#xd5;" glyph-name="Otilde" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
283
733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM612 1684Q581 1684 563 1658T532 1577H383Q389 1657 409 1715T461
284
1811T538 1867T635 1886Q676 1886 715 1870T792 1835T868 1799T942 1782Q973 1782 991 1808T1022 1888H1171Q1165 1809 1145 1751T1091 1655T1015 1598T919 1579Q879 1579 839 1595T761 1631T686 1667T612 1684Z" />
285
<glyph unicode="&#xd6;" glyph-name="Odieresis" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
286
733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM428 1743Q428 1778 439 1803T468 1845T512 1870T567 1878Q596
287
1878 621 1870T666 1846T696 1804T708 1743Q708 1709 697 1684T666 1643T622 1618T567 1610Q538 1610 513 1618T469 1642T439 1684T428 1743ZM831 1743Q831 1778 842 1803T872 1845T917 1870T973 1878Q1001 1878 1026 1870T1071 1846T1102 1804T1114 1743Q1114
288
1709 1103 1684T1072 1643T1027 1618T973 1610Q913 1610 872 1643T831 1743Z" />
289
<glyph unicode="&#xd7;" glyph-name="multiply" horiz-adv-x="1128" d="M408 723L109 1024L260 1178L561 879L866 1178L1020 1028L715 723L1016 420L866 268L561 569L260 270L111 422L408 723Z" />
290
<glyph unicode="&#xd8;" glyph-name="Oslash" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q595 -20 467 41L395 -76L227 18L309 152Q212 252 166 400T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q867 1485 944 1469T1087
291
1421L1157 1532L1323 1436L1243 1307Q1337 1208 1383 1063T1430 733ZM438 733Q438 553 485 438L942 1184Q873 1227 776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM1110 733Q1110 904 1067 1020L612 279Q646 260 686 250T774 240Q863 240 926 274T1030
292
371T1090 526T1110 733Z" />
293
<glyph unicode="&#xd9;" glyph-name="Ugrave" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM706
294
1579Q672 1607 625 1648T531 1734T447 1818T393 1886V1907H735Q751 1873 772 1833T817 1752T864 1673T909 1606V1579H706Z" />
295
<glyph unicode="&#xda;" glyph-name="Uacute" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM570
296
1579V1606Q591 1635 615 1673T662 1751T707 1832T744 1907H1086V1886Q1075 1868 1054 1844T1006 1791T948 1734T886 1676T825 1623T773 1579H570Z" />
297
<glyph unicode="&#xdb;" glyph-name="Ucircumflex" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM942
298
1579Q891 1613 836 1656T729 1755Q675 1699 623 1656T520 1579H317V1606Q343 1635 374 1673T438 1751T501 1832T553 1907H909Q930 1873 960 1833T1022 1752T1087 1673T1145 1606V1579H942Z" />
299
<glyph unicode="&#xdc;" glyph-name="Udieresis" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM393
300
1743Q393 1778 404 1803T433 1845T477 1870T532 1878Q561 1878 586 1870T631 1846T661 1804T673 1743Q673 1709 662 1684T631 1643T587 1618T532 1610Q503 1610 478 1618T434 1642T404 1684T393 1743ZM796 1743Q796 1778 807 1803T837 1845T882 1870T938 1878Q966
301
1878 991 1870T1036 1846T1067 1804T1079 1743Q1079 1709 1068 1684T1037 1643T992 1618T938 1610Q878 1610 837 1643T796 1743Z" />
302
<glyph unicode="&#xdd;" glyph-name="Yacute" horiz-adv-x="1196" d="M598 860L862 1462H1196L752 569V0H444V559L0 1462H336L598 860ZM422 1579V1606Q443 1635 467 1673T514 1751T559 1832T596 1907H938V1886Q927 1868 906 1844T858 1791T800 1734T738 1676T677
303
1623T625 1579H422Z" />
304
<glyph unicode="&#xde;" glyph-name="Thorn" horiz-adv-x="1225" d="M1133 770Q1133 676 1108 590T1024 438T870 333T633 293H494V0H184V1462H494V1233H655Q779 1233 869 1200T1017 1107T1104 961T1133 770ZM494 543H578Q699 543 759 595T819 770Q819 878 766
305
929T598 981H494V543Z" />
306
<glyph unicode="&#xdf;" glyph-name="germandbls" horiz-adv-x="1395" d="M1188 1241Q1188 1177 1167 1129T1114 1042T1045 975T976 922T923 877T901 834Q901 814 913 797T952 760T1020 715T1118 651Q1167 620 1205 588T1269 517T1309 432T1323 326Q1323 154 1206
307
67T862 -20Q764 -20 692 -6T559 43V285Q583 269 617 254T690 226T768 207T842 199Q922 199 966 229T1010 322Q1010 349 1003 370T976 412T918 457T821 516Q758 552 716 584T647 647T609 713T598 788Q598 841 618 880T670 950T737 1007T805 1059T856 1117T877 1188Q877
308
1251 827 1290T680 1329Q572 1329 519 1281T465 1128V0H160V1139Q160 1248 197 1328T302 1462T467 1541T680 1567Q795 1567 889 1546T1049 1483T1152 1380T1188 1241Z" />
309
<glyph unicode="&#xe0;" glyph-name="agrave" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
310
1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM808 1241Q774 1269 727 1310T633 1396T549 1480T495 1548V1569H837Q853
311
1535 874 1495T919 1414T966 1335T1011 1268V1241H808Z" />
312
<glyph unicode="&#xe1;" glyph-name="aacute" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
313
1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM441 1241V1268Q462 1297 486 1335T533 1413T578 1494T615
314
1569H957V1548Q946 1530 925 1506T877 1453T819 1396T757 1338T696 1285T644 1241H441Z" />
315
<glyph unicode="&#xe2;" glyph-name="acircumflex" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289
316
838L190 1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM801 1496Q750 1530 695 1573T588 1672Q534 1616
317
482 1573T379 1496H176V1523Q202 1552 233 1590T297 1668T360 1749T412 1824H768Q789 1790 819 1750T881 1669T946 1590T1004 1523V1496H801Z" />
318
<glyph unicode="&#xe3;" glyph-name="atilde" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
319
1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM681 1346Q650 1346 632 1320T601 1239H452Q458 1319 478
320
1377T530 1473T607 1529T704 1548Q745 1548 784 1532T861 1497T937 1461T1011 1444Q1042 1444 1060 1470T1091 1550H1240Q1234 1471 1214 1413T1160 1317T1084 1260T988 1241Q948 1241 908 1257T830 1293T755 1329T681 1346Z" />
321
<glyph unicode="&#xe4;" glyph-name="adieresis" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289
322
838L190 1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM254 1405Q254 1440 265 1465T294 1507T338 1532T393
323
1540Q422 1540 447 1532T492 1508T522 1466T534 1405Q534 1371 523 1346T492 1305T448 1280T393 1272Q364 1272 339 1280T295 1304T265 1346T254 1405ZM657 1405Q657 1440 668 1465T698 1507T743 1532T799 1540Q827 1540 852 1532T897 1508T928 1466T940 1405Q940
324
1371 929 1346T898 1305T853 1280T799 1272Q739 1272 698 1305T657 1405Z" />
325
<glyph unicode="&#xe5;" glyph-name="aring" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
326
1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM842 1479Q842 1423 823 1379T769 1303T688 1256T588 1239Q533
327
1239 487 1255T409 1302T358 1377T340 1477Q340 1532 358 1576T408 1650T487 1697T588 1714Q641 1714 687 1698T767 1651T822 1577T842 1479ZM684 1477Q684 1522 657 1547T588 1573Q546 1573 519 1548T492 1477Q492 1432 516 1406T588 1380Q630 1380 657 1406T684
328
1477Z" />
329
<glyph unicode="&#xe6;" glyph-name="ae" horiz-adv-x="1806" d="M1268 -20Q1137 -20 1030 30T854 186Q811 132 769 94T678 30T568 -8T424 -20Q356 -20 295 1T187 66T113 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427
330
894T289 838L190 1040Q274 1087 376 1114T590 1141Q804 1141 913 1010Q1039 1139 1227 1139Q1338 1139 1427 1106T1579 1007T1674 848T1708 631V483H1026Q1028 419 1046 368T1098 281T1179 226T1288 207Q1382 207 1469 228T1645 295V59Q1605 38 1565 24T1479 -1T1382
331
-15T1268 -20ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM1229 922Q1147 922 1094 865T1032 686H1421Q1420 737 1408 780T1373 854T1313 904T1229 922Z" />
332
<glyph unicode="&#xe7;" glyph-name="ccedilla" horiz-adv-x="1022" d="M625 -20Q505 -20 409 13T244 115T139 293T102 553Q102 720 139 832T245 1013T410 1110T625 1139Q711 1139 796 1118T956 1059L868 827Q802 856 741 874T625 893Q514 893 464 809T414 555Q414
333
387 464 307T621 227Q708 227 779 249T924 307V53Q887 35 852 21T782 -2T708 -15T625 -20ZM778 -250Q778 -307 763 -352T711 -428T616 -475T469 -492Q424 -492 388 -486T323 -471V-303Q338 -307 356 -310T394 -317T432 -322T466 -324Q495 -324 516 -311T538 -262Q538
334
-225 501 -197T372 -154L450 0H643L616 -61Q647 -71 676 -88T727 -128T764 -182T778 -250Z" />
335
<glyph unicode="&#xe8;" glyph-name="egrave" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139
336
810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM834 1241Q800 1269 753 1310T659 1396T575 1480T521 1548V1569H863Q879 1535 900
337
1495T945 1414T992 1335T1037 1268V1241H834Z" />
338
<glyph unicode="&#xe9;" glyph-name="eacute" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139
339
810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM447 1241V1268Q468 1297 492 1335T539 1413T584 1494T621 1569H963V1548Q952 1530
340
931 1506T883 1453T825 1396T763 1338T702 1285T650 1241H447Z" />
341
<glyph unicode="&#xea;" glyph-name="ecircumflex" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721
342
1139 810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM819 1241Q768 1275 713 1318T606 1417Q552 1361 500 1318T397 1241H194V1268Q220
343
1297 251 1335T315 1413T378 1494T430 1569H786Q807 1535 837 1495T899 1414T964 1335T1022 1268V1241H819Z" />
344
<glyph unicode="&#xeb;" glyph-name="edieresis" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139
345
810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM266 1405Q266 1440 277 1465T306 1507T350 1532T405 1540Q434 1540 459 1532T504
346
1508T534 1466T546 1405Q546 1371 535 1346T504 1305T460 1280T405 1272Q376 1272 351 1280T307 1304T277 1346T266 1405ZM669 1405Q669 1440 680 1465T710 1507T755 1532T811 1540Q839 1540 864 1532T909 1508T940 1466T952 1405Q952 1371 941 1346T910 1305T865
347
1280T811 1272Q751 1272 710 1305T669 1405Z" />
348
<glyph unicode="&#xec;" glyph-name="igrave" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM269 1241Q235 1269 188 1310T94 1396T10 1480T-44 1548V1569H298Q314 1535 335 1495T380 1414T427 1335T472 1268V1241H269Z" />
349
<glyph unicode="&#xed;" glyph-name="iacute" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM145 1241V1268Q166 1297 190 1335T237 1413T282 1494T319 1569H661V1548Q650 1530 629 1506T581 1453T523 1396T461 1338T400 1285T348 1241H145Z" />
350
<glyph unicode="&#xee;" glyph-name="icircumflex" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM521 1241Q470 1275 415 1318T308 1417Q254 1361 202 1318T99 1241H-104V1268Q-78 1297 -47 1335T17 1413T80 1494T132 1569H488Q509 1535 539 1495T601 1414T666
351
1335T724 1268V1241H521Z" />
352
<glyph unicode="&#xef;" glyph-name="idieresis" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM-32 1405Q-32 1440 -21 1465T8 1507T52 1532T107 1540Q136 1540 161 1532T206 1508T236 1466T248 1405Q248 1371 237 1346T206 1305T162 1280T107 1272Q78 1272 53
353
1280T9 1304T-21 1346T-32 1405ZM371 1405Q371 1440 382 1465T412 1507T457 1532T513 1540Q541 1540 566 1532T611 1508T642 1466T654 1405Q654 1371 643 1346T612 1305T567 1280T513 1272Q453 1272 412 1305T371 1405Z" />
354
<glyph unicode="&#xf0;" glyph-name="eth" horiz-adv-x="1182" d="M457 1309Q423 1330 384 1354T303 1401L399 1571Q472 1537 536 1503T657 1430L883 1569L983 1415L809 1309Q881 1240 935 1162T1024 993T1078 798T1096 573Q1096 431 1060 321T957 135T795 20T582
355
-20Q471 -20 378 14T218 113T112 272T74 489Q74 611 106 705T197 863T337 961T516 995Q612 995 680 964T780 883L801 885Q773 973 723 1050T606 1184L375 1040L274 1196L457 1309ZM784 532Q784 579 773 622T737 698T675 750T586 770Q478 770 432 700T385 487Q385
356
424 396 372T432 283T495 226T586 205Q692 205 738 286T784 532Z" />
357
<glyph unicode="&#xf1;" glyph-name="ntilde" horiz-adv-x="1284" d="M1130 0H825V653Q825 774 789 834T672 895Q612 895 572 871T509 800T475 684T465 526V0H160V1118H393L434 975H451Q475 1018 509 1049T585 1100T672 1129T766 1139Q848 1139 915 1116T1030
358
1042T1104 915T1130 729V0ZM477 1346Q446 1346 428 1320T397 1239H248Q254 1319 274 1377T326 1473T403 1529T500 1548Q541 1548 580 1532T657 1497T733 1461T807 1444Q838 1444 856 1470T887 1550H1036Q1030 1471 1010 1413T956 1317T880 1260T784 1241Q744 1241
359
704 1257T626 1293T551 1329T477 1346Z" />
360
<glyph unicode="&#xf2;" glyph-name="ograve" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
361
131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM841 1241Q807 1269 760 1310T666 1396T582 1480T528 1548V1569H870Q886 1535 907 1495T952 1414T999 1335T1044 1268V1241H841Z" />
362
<glyph unicode="&#xf3;" glyph-name="oacute" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
363
131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM434 1241V1268Q455 1297 479 1335T526 1413T571 1494T608 1569H950V1548Q939 1530 918 1506T870 1453T812 1396T750 1338T689 1285T637 1241H434Z"
364
/>
365
<glyph unicode="&#xf4;" glyph-name="ocircumflex" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
366
131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM821 1241Q770 1275 715 1318T608 1417Q554 1361 502 1318T399 1241H196V1268Q222 1297 253 1335T317 1413T380 1494T432 1569H788Q809 1535 839
367
1495T901 1414T966 1335T1024 1268V1241H821Z" />
368
<glyph unicode="&#xf5;" glyph-name="otilde" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
369
131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM444 1346Q413 1346 395 1320T364 1239H215Q221 1319 241 1377T293 1473T370 1529T467 1548Q508 1548 547 1532T624 1497T700 1461T774 1444Q805
370
1444 823 1470T854 1550H1003Q997 1471 977 1413T923 1317T847 1260T751 1241Q711 1241 671 1257T593 1293T518 1329T444 1346Z" />
371
<glyph unicode="&#xf6;" glyph-name="odieresis" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
372
131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM266 1405Q266 1440 277 1465T306 1507T350 1532T405 1540Q434 1540 459 1532T504 1508T534 1466T546 1405Q546 1371 535 1346T504 1305T460 1280T405
373
1272Q376 1272 351 1280T307 1304T277 1346T266 1405ZM669 1405Q669 1440 680 1465T710 1507T755 1532T811 1540Q839 1540 864 1532T909 1508T940 1466T952 1405Q952 1371 941 1346T910 1305T865 1280T811 1272Q751 1272 710 1305T669 1405Z" />
374
<glyph unicode="&#xf7;" glyph-name="divide" horiz-adv-x="1128" d="M88 612V831H1040V612H88ZM424 373Q424 415 435 444T465 490T509 516T563 524Q591 524 616 516T660 491T690 444T702 373Q702 333 691 304T660 257T616 230T563 221Q535 221 510 229T465 256T435
375
304T424 373ZM424 1071Q424 1113 435 1142T465 1189T509 1215T563 1223Q591 1223 616 1215T660 1189T690 1142T702 1071Q702 1031 691 1003T660 956T616 929T563 920Q535 920 510 928T465 955T435 1002T424 1071Z" />
376
<glyph unicode="&#xf8;" glyph-name="oslash" horiz-adv-x="1227" d="M1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q553 -20 501 -10T401 18L344 -76L182 14L250 125Q181 199 142 308T102 561Q102 700 137 808T239 989T401 1101T616 1139Q678 1139 735
377
1126T844 1090L893 1169L1053 1073L991 975Q1054 903 1089 799T1124 561ZM414 561Q414 475 426 410L709 868Q669 893 612 893Q507 893 461 811T414 561ZM813 561Q813 625 807 674L539 240Q556 232 574 229T614 225Q719 225 766 310T813 561Z" />
378
<glyph unicode="&#xf9;" glyph-name="ugrave" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM839
379
1241Q805 1269 758 1310T664 1396T580 1480T526 1548V1569H868Q884 1535 905 1495T950 1414T997 1335T1042 1268V1241H839Z" />
380
<glyph unicode="&#xfa;" glyph-name="uacute" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM461
381
1241V1268Q482 1297 506 1335T553 1413T598 1494T635 1569H977V1548Q966 1530 945 1506T897 1453T839 1396T777 1338T716 1285T664 1241H461Z" />
382
<glyph unicode="&#xfb;" glyph-name="ucircumflex" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM842
383
1241Q791 1275 736 1318T629 1417Q575 1361 523 1318T420 1241H217V1268Q243 1297 274 1335T338 1413T401 1494T453 1569H809Q830 1535 860 1495T922 1414T987 1335T1045 1268V1241H842Z" />
384
<glyph unicode="&#xfc;" glyph-name="udieresis" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM295
385
1405Q295 1440 306 1465T335 1507T379 1532T434 1540Q463 1540 488 1532T533 1508T563 1466T575 1405Q575 1371 564 1346T533 1305T489 1280T434 1272Q405 1272 380 1280T336 1304T306 1346T295 1405ZM698 1405Q698 1440 709 1465T739 1507T784 1532T840 1540Q868
386
1540 893 1532T938 1508T969 1466T981 1405Q981 1371 970 1346T939 1305T894 1280T840 1272Q780 1272 739 1305T698 1405Z" />
387
<glyph unicode="&#xfd;" glyph-name="yacute" horiz-adv-x="1104" d="M0 1118H334L514 489Q530 437 537 378T547 272H553Q555 295 558 323T567 380T578 437T592 489L768 1118H1104L662 -143Q600 -320 493 -406T225 -492Q173 -492 135 -487T70 -475V-233Q91 -238
388
123 -242T190 -246Q238 -246 272 -233T330 -197T372 -140T403 -66L422 -10L0 1118ZM393 1241V1268Q414 1297 438 1335T485 1413T530 1494T567 1569H909V1548Q898 1530 877 1506T829 1453T771 1396T709 1338T648 1285T596 1241H393Z" />
389
<glyph unicode="&#xfe;" glyph-name="thorn" horiz-adv-x="1245" d="M465 973Q485 1008 512 1038T576 1090T656 1126T756 1139Q842 1139 913 1102T1035 992T1114 811T1143 561Q1143 418 1115 310T1036 128T914 17T756 -20Q701 -20 656 -10T576 20T513 64T465 117H451Q454
390
85 458 55Q461 29 463 3T465 -39V-492H160V1556H465V1165Q465 1141 463 1108T458 1045Q454 1010 451 973H465ZM653 895Q602 895 567 877T509 821T477 728T465 596V563Q465 482 474 419T506 314T564 249T655 227Q746 227 788 313T831 565Q831 730 789 812T653 895Z"
391
/>
392
<glyph unicode="&#xff;" glyph-name="ydieresis" horiz-adv-x="1104" d="M0 1118H334L514 489Q530 437 537 378T547 272H553Q555 295 558 323T567 380T578 437T592 489L768 1118H1104L662 -143Q600 -320 493 -406T225 -492Q173 -492 135 -487T70 -475V-233Q91
393
-238 123 -242T190 -246Q238 -246 272 -233T330 -197T372 -140T403 -66L422 -10L0 1118ZM466 1405Q466 1440 477 1465T506 1507T550 1532T605 1540Q634 1540 659 1532T704 1508T734 1466T746 1405Q746 1371 735 1346T704 1305T660 1280T605 1272Q576 1272 551 1280T507
394
1304T477 1346T466 1405ZM869 1405Q869 1440 880 1465T910 1507T955 1532T1011 1540Q1039 1540 1064 1532T1109 1508T1140 1466T1152 1405Q1152 1371 1141 1346T1110 1305T1065 1280T1011 1272Q951 1272 910 1305T869 1405Z" />
395
<glyph unicode="&#x2013;" glyph-name="endash" horiz-adv-x="1024" d="M82 436V666H942V436H82Z" />
396
<glyph unicode="&#x2014;" glyph-name="emdash" horiz-adv-x="2048" d="M82 436V666H1966V436H82Z" />
397
<glyph unicode="&#x2018;" glyph-name="quoteleft" horiz-adv-x="440" d="M37 961L23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H418Q403 1401 389 1335T361 1204T336 1076T317 961H37Z" />
398
<glyph unicode="&#x2019;" glyph-name="quoteright" horiz-adv-x="440" d="M403 1462L418 1440Q404 1385 385 1325T342 1202T293 1078T242 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H403Z" />
399
<glyph unicode="&#x201a;" glyph-name="quotesinglbase" horiz-adv-x="594" d="M459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444L459 215Z" />
400
<glyph unicode="&#x201c;" glyph-name="quotedblleft" horiz-adv-x="907" d="M489 983Q503 1037 523 1098T566 1221T615 1344T666 1462H885Q870 1401 856 1335T828 1204T803 1076T784 961H504L489 983ZM23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H418Q403
401
1401 389 1335T361 1204T336 1076T317 961H37L23 983Z" />
402
<glyph unicode="&#x201d;" glyph-name="quotedblright" horiz-adv-x="907" d="M418 1440Q404 1385 385 1325T342 1202T293 1078T242 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H403L418 1440ZM885 1440Q871 1385 852 1325T809 1202T760 1078T709 961H489Q504
403
1021 518 1087T546 1219T571 1347T590 1462H870L885 1440Z" />
404
<glyph unicode="&#x201e;" glyph-name="quotedblbase" horiz-adv-x="1061" d="M459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444L459 215ZM926 215Q912 161 893 100T850 -23T801 -146T750 -264H530Q545 -203
405
559 -137T587 -6T612 122T631 238H911L926 215Z" />
406
<glyph unicode="&#x2022;" glyph-name="bullet" horiz-adv-x="770" d="M98 748Q98 834 120 894T180 992T271 1047T385 1065Q444 1065 496 1048T588 992T649 894T672 748Q672 663 650 603T588 505T497 448T385 430Q324 430 272 448T181 504T120 603T98 748Z" />
407
<glyph unicode="&#x2039;" glyph-name="guilsinglleft" horiz-adv-x="692" d="M82 573L391 1028L610 909L393 561L610 213L391 94L82 547V573Z" />
408
<glyph unicode="&#x203a;" glyph-name="guilsinglright" horiz-adv-x="692" d="M610 547L301 94L82 213L299 561L82 909L301 1028L610 573V547Z" />
409
</font>
410
</defs>
411
</svg>
(-)a/api/v1/doc/fonts/droid-sans-v6-latin-regular.svg (+403 lines)
Line 0 Link Here
1
<?xml version="1.0" standalone="no"?>
2
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
<svg xmlns="http://www.w3.org/2000/svg">
4
<defs >
5
<font id="DroidSans" horiz-adv-x="1062" ><font-face
6
    font-family="Droid Sans"
7
    units-per-em="2048"
8
    panose-1="2 11 6 6 3 8 4 2 2 4"
9
    ascent="1907"
10
    descent="-492"
11
    alphabetic="0" />
12
<glyph unicode=" " glyph-name="space" horiz-adv-x="532" />
13
<glyph unicode="!" glyph-name="exclam" horiz-adv-x="551" d="M336 414H215L164 1462H387L336 414ZM147 111Q147 149 157 175T184 218T224 242T274 250Q300 250 323 243T364 219T391 176T401 111Q401 74 391 48T364 4T324 -21T274 -29Q247 -29 224 -21T184 4T157
14
47T147 111Z" />
15
<glyph unicode="&quot;" glyph-name="quotedbl" horiz-adv-x="823" d="M330 1462L289 934H174L133 1462H330ZM690 1462L649 934H535L494 1462H690Z" />
16
<glyph unicode="#" glyph-name="numbersign" horiz-adv-x="1323" d="M983 893L920 565H1200V428H893L811 0H664L748 428H457L375 0H231L309 428H51V565H336L401 893H127V1030H426L508 1462H655L573 1030H866L950 1462H1094L1010 1030H1272V893H983ZM483 565H774L838
17
893H547L483 565Z" />
18
<glyph unicode="$" glyph-name="dollar" horiz-adv-x="1128" d="M985 446Q985 376 960 319T889 220T776 151T625 111V-119H487V102Q437 102 386 106T287 120T197 142T123 172V344Q156 328 199 312T291 282T389 261T487 252V686Q398 716 333 749T224 824T160 922T139
19
1051Q139 1118 163 1173T233 1270T343 1338T487 1374V1554H625V1378Q725 1373 809 1352T961 1300L895 1155Q839 1180 769 1200T625 1227V805Q713 774 780 741T893 667T962 572T985 446ZM809 446Q809 479 799 506T768 556T711 598T625 635V262Q718 276 763 325T809
20
446ZM315 1049Q315 1013 323 985T352 933T405 890T487 854V1223Q398 1207 357 1163T315 1049Z" />
21
<glyph unicode="%" glyph-name="percent" horiz-adv-x="1690" d="M250 1026Q250 861 285 779T401 696Q557 696 557 1026Q557 1354 401 1354Q321 1354 286 1273T250 1026ZM705 1026Q705 918 687 832T632 687T538 597T401 565Q328 565 272 596T178 687T121 832T102
22
1026Q102 1134 119 1219T173 1362T266 1452T401 1483Q476 1483 532 1452T627 1363T685 1219T705 1026ZM1133 440Q1133 275 1168 193T1284 111Q1440 111 1440 440Q1440 768 1284 768Q1204 768 1169 687T1133 440ZM1587 440Q1587 332 1570 247T1515 102T1421 12T1284
23
-20Q1210 -20 1154 11T1061 102T1004 246T985 440Q985 548 1002 633T1056 776T1149 866T1284 897Q1359 897 1415 866T1510 777T1567 633T1587 440ZM1331 1462L520 0H362L1174 1462H1331Z" />
24
<glyph unicode="&amp;" glyph-name="ampersand" horiz-adv-x="1438" d="M422 1165Q422 1131 430 1099T454 1034T497 968T559 897Q618 932 661 963T732 1026T774 1093T788 1169Q788 1205 776 1235T740 1288T683 1322T608 1335Q522 1335 472 1291T422 1165ZM557
25
141Q615 141 664 152T755 184T833 231T901 289L514 696Q462 663 422 632T355 564T313 486T299 387Q299 333 316 288T367 210T448 159T557 141ZM109 381Q109 459 129 520T187 631T281 724T408 809Q377 845 347 883T295 965T258 1058T244 1165Q244 1240 269 1299T341
26
1400T457 1463T614 1485Q697 1485 762 1464T873 1401T943 1300T967 1165Q967 1101 942 1047T875 946T779 860T664 784L1016 412Q1043 441 1064 471T1103 535T1133 608T1157 694H1341Q1326 628 1306 573T1259 468T1200 377T1128 293L1405 0H1180L1012 172Q963 127
27
915 92T813 32T697 -6T557 -20Q452 -20 369 6T228 84T140 210T109 381Z" />
28
<glyph unicode="&apos;" glyph-name="quotesingle" horiz-adv-x="463" d="M330 1462L289 934H174L133 1462H330Z" />
29
<glyph unicode="(" glyph-name="parenleft" horiz-adv-x="616" d="M82 561Q82 686 100 807T155 1043T248 1263T383 1462H555Q415 1269 343 1038T270 563Q270 444 288 326T342 95T431 -124T553 -324H383Q305 -234 249 -131T155 84T100 317T82 561Z" />
30
<glyph unicode=")" glyph-name="parenright" horiz-adv-x="616" d="M535 561Q535 437 517 317T462 85T368 -131T233 -324H63Q132 -230 185 -124T274 95T328 326T346 563Q346 807 274 1038T61 1462H233Q311 1369 367 1264T461 1044T517 808T535 561Z" />
31
<glyph unicode="*" glyph-name="asterisk" horiz-adv-x="1128" d="M664 1556L621 1163L1018 1274L1044 1081L666 1053L911 727L733 631L557 989L399 631L215 727L457 1053L82 1081L111 1274L502 1163L459 1556H664Z" />
32
<glyph unicode="+" glyph-name="plus" horiz-adv-x="1128" d="M489 647H102V797H489V1186H639V797H1026V647H639V262H489V647Z" />
33
<glyph unicode="," glyph-name="comma" horiz-adv-x="512" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362Z" />
34
<glyph unicode="-" glyph-name="hyphen" horiz-adv-x="659" d="M82 465V633H578V465H82Z" />
35
<glyph unicode="." glyph-name="period" horiz-adv-x="549" d="M147 111Q147 149 157 175T184 218T224 242T274 250Q300 250 323 243T364 219T391 176T401 111Q401 74 391 48T364 4T324 -21T274 -29Q247 -29 224 -21T184 4T157 47T147 111Z" />
36
<glyph unicode="/" glyph-name="slash" horiz-adv-x="764" d="M743 1462L199 0H20L565 1462H743Z" />
37
<glyph unicode="0" glyph-name="zero" horiz-adv-x="1128" d="M1032 733Q1032 556 1007 416T925 179T779 31T563 -20Q445 -20 358 31T213 179T127 416T98 733Q98 910 123 1050T204 1286T348 1434T563 1485Q682 1485 770 1435T916 1288T1003 1051T1032 733ZM283
38
733Q283 583 298 471T346 285T432 173T563 135Q640 135 694 172T782 283T832 469T848 733Q848 883 833 995T783 1181T694 1292T563 1329Q486 1329 433 1292T346 1181T298 995T283 733Z" />
39
<glyph unicode="1" glyph-name="one" horiz-adv-x="1128" d="M711 0H535V913Q535 956 535 1005T537 1102T540 1195T543 1274Q526 1256 513 1243T487 1218T458 1193T422 1161L274 1040L178 1163L561 1462H711V0Z" />
40
<glyph unicode="2" glyph-name="two" horiz-adv-x="1128" d="M1008 0H96V156L446 537Q521 618 580 685T680 816T744 944T766 1085Q766 1144 749 1189T701 1265T626 1313T530 1329Q435 1329 359 1291T213 1192L111 1311Q151 1347 197 1378T296 1433T408 1469T532
41
1483Q628 1483 705 1456T837 1379T920 1256T950 1092Q950 1007 924 930T851 779T740 629T600 473L319 174V166H1008V0Z" />
42
<glyph unicode="3" glyph-name="three" horiz-adv-x="1128" d="M961 1120Q961 1047 938 987T874 883T774 811T645 770V764Q822 742 914 652T1006 416Q1006 320 974 240T875 102T708 12T469 -20Q360 -20 264 -3T82 59V229Q169 183 270 158T465 133Q557 133 624
43
153T734 210T798 301T819 422Q819 490 793 538T717 618T598 665T438 680H305V831H438Q519 831 582 851T687 908T752 996T774 1108Q774 1160 756 1201T705 1270T626 1314T524 1329Q417 1329 336 1296T180 1208L88 1333Q126 1364 172 1391T274 1438T391 1471T524
44
1483Q632 1483 713 1456T850 1381T933 1266T961 1120Z" />
45
<glyph unicode="4" glyph-name="four" horiz-adv-x="1128" d="M1087 328H874V0H698V328H23V487L686 1470H874V494H1087V328ZM698 494V850Q698 906 699 967T703 1087T707 1197T711 1282H702Q695 1262 685 1238T662 1189T636 1141T612 1102L201 494H698Z" />
46
<glyph unicode="5" glyph-name="five" horiz-adv-x="1128" d="M545 897Q644 897 729 870T878 788T978 654T1014 469Q1014 355 980 264T879 110T714 14T487 -20Q436 -20 387 -15T292 -1T205 24T131 59V231Q164 208 208 190T302 160T400 142T492 135Q571 135 633
47
153T738 211T804 309T827 449Q827 592 739 667T483 743Q456 743 425 741T362 734T302 726T252 717L162 774L217 1462H907V1296H375L336 877Q368 883 420 890T545 897Z" />
48
<glyph unicode="6" glyph-name="six" horiz-adv-x="1128" d="M113 625Q113 730 123 834T160 1033T233 1211T350 1353T520 1448T752 1483Q771 1483 794 1482T840 1479T885 1473T924 1464V1309Q889 1321 845 1327T758 1333Q668 1333 600 1312T481 1251T398 1158T343
49
1039T312 899T299 745H311Q331 781 359 812T426 866T511 902T618 915Q713 915 790 886T921 799T1004 660T1034 471Q1034 357 1003 266T914 112T774 14T590 -20Q490 -20 403 19T251 138T150 339T113 625ZM588 133Q648 133 697 153T783 215T838 320T858 471Q858 541
50
842 596T792 691T710 751T594 772Q527 772 472 749T377 688T317 602T295 506Q295 439 313 373T368 253T460 167T588 133Z" />
51
<glyph unicode="7" glyph-name="seven" horiz-adv-x="1128" d="M281 0L844 1296H90V1462H1030V1317L475 0H281Z" />
52
<glyph unicode="8" glyph-name="eight" horiz-adv-x="1128" d="M565 1485Q649 1485 723 1463T854 1397T944 1287T977 1133Q977 1066 957 1012T902 915T819 837T715 774Q773 743 828 705T927 620T997 513T1024 381Q1024 289 991 215T897 88T752 8T565 -20Q455 -20
53
370 7T226 84T137 208T106 373Q106 448 128 508T189 616T279 701T389 766Q340 797 297 833T223 915T173 1014T154 1135Q154 1222 187 1287T278 1397T409 1463T565 1485ZM285 371Q285 318 301 274T351 198T437 149T561 131Q631 131 684 148T774 198T828 277T846
54
379Q846 431 827 473T771 551T683 619T569 682L539 696Q413 636 349 559T285 371ZM563 1333Q457 1333 395 1280T332 1126Q332 1069 349 1028T398 955T472 898T567 848Q615 870 657 896T731 955T781 1030T799 1126Q799 1227 736 1280T563 1333Z" />
55
<glyph unicode="9" glyph-name="nine" horiz-adv-x="1128" d="M1028 838Q1028 733 1018 629T981 429T908 252T791 109T621 15T389 -20Q370 -20 347 -19T301 -16T256 -10T217 -2V154Q252 141 296 135T383 129Q518 129 605 176T743 303T815 491T842 717H829Q809
56
681 781 650T715 596T629 560T522 547Q427 547 350 576T219 663T136 802T106 991Q106 1105 137 1196T226 1351T366 1449T551 1483Q652 1483 739 1444T890 1325T991 1124T1028 838ZM553 1329Q493 1329 444 1309T358 1247T303 1142T283 991Q283 921 299 866T349 771T431
57
711T547 690Q615 690 670 713T764 774T824 860T846 956Q846 1023 828 1089T773 1209T681 1296T553 1329Z" />
58
<glyph unicode=":" glyph-name="colon" horiz-adv-x="549" d="M147 111Q147 149 157 175T184 218T224 242T274 250Q300 250 323 243T364 219T391 176T401 111Q401 74 391 48T364 4T324 -21T274 -29Q247 -29 224 -21T184 4T157 47T147 111ZM147 987Q147 1026 157
59
1052T184 1095T224 1119T274 1126Q300 1126 323 1119T364 1096T391 1053T401 987Q401 950 391 924T364 881T324 856T274 848Q247 848 224 856T184 881T157 924T147 987Z" />
60
<glyph unicode=";" glyph-name="semicolon" horiz-adv-x="549" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362ZM147 987Q147 1026 157 1052T184 1095T224 1119T274 1126Q300 1126 323 1119T364
61
1096T391 1053T401 987Q401 950 391 924T364 881T324 856T274 848Q247 848 224 856T184 881T157 924T147 987Z" />
62
<glyph unicode="&lt;" glyph-name="less" horiz-adv-x="1128" d="M1026 238L102 662V764L1026 1245V1085L291 721L1026 399V238Z" />
63
<glyph unicode="=" glyph-name="equal" horiz-adv-x="1128" d="M102 852V1001H1026V852H102ZM102 442V592H1026V442H102Z" />
64
<glyph unicode="&gt;" glyph-name="greater" horiz-adv-x="1128" d="M102 399L838 721L102 1085V1245L1026 764V662L102 238V399Z" />
65
<glyph unicode="?" glyph-name="question" horiz-adv-x="872" d="M281 414V451Q281 508 288 554T315 640T368 718T451 799Q499 840 533 873T588 941T620 1015T631 1108Q631 1156 616 1195T573 1263T502 1307T403 1323Q320 1323 245 1297T100 1237L37 1382Q118
66
1424 212 1453T403 1483Q496 1483 570 1458T697 1384T777 1267T805 1110Q805 1043 792 991T751 893T684 806T590 717Q538 672 505 639T453 574T427 509T420 432V414H281ZM233 111Q233 149 243 175T270 218T310 242T360 250Q386 250 409 243T450 219T477 176T487
67
111Q487 74 477 48T450 4T410 -21T360 -29Q333 -29 310 -21T270 4T243 47T233 111Z" />
68
<glyph unicode="@" glyph-name="at" horiz-adv-x="1774" d="M1665 731Q1665 669 1656 607T1628 488T1581 383T1514 298T1428 242T1321 221Q1276 221 1240 236T1177 276T1135 333T1112 401H1108Q1090 364 1063 331T1001 274T921 235T823 221Q746 221 687 249T586
69
327T524 449T502 606Q502 707 531 791T616 936T751 1031T928 1065Q973 1065 1018 1061T1104 1050T1179 1035T1237 1018L1214 602Q1213 580 1213 567T1212 545T1212 533T1212 526Q1212 473 1222 439T1250 385T1288 358T1333 350Q1379 350 1414 380T1472 463T1508
70
585T1520 733Q1520 875 1477 985T1358 1172T1178 1287T950 1327Q781 1327 652 1272T436 1117T303 881T258 582Q258 431 297 314T413 117T603 -4T864 -45Q925 -45 984 -38T1099 -19T1205 8T1298 41V-100Q1212 -138 1104 -160T866 -182Q687 -182 547 -131T309 17T160
71
255T109 575Q109 763 168 925T336 1207T601 1394T950 1462Q1106 1462 1237 1412T1463 1267T1612 1037T1665 731ZM662 602Q662 469 712 410T848 350Q903 350 942 372T1006 436T1044 535T1061 662L1075 915Q1047 923 1009 929T928 936Q854 936 804 907T722 831T676
72
724T662 602Z" />
73
<glyph unicode="A" glyph-name="A" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836Z" />
74
<glyph unicode="B" glyph-name="B" horiz-adv-x="1272" d="M199 1462H598Q726 1462 823 1443T986 1380T1085 1266T1118 1092Q1118 1030 1099 976T1042 881T951 813T827 776V766Q896 754 956 732T1062 670T1133 570T1159 424Q1159 324 1127 246T1033 113T883 29T684
75
0H199V1462ZM385 842H629Q713 842 770 857T862 901T912 975T928 1079Q928 1199 851 1251T608 1303H385V842ZM385 686V158H651Q739 158 798 178T894 234T947 320T963 432Q963 488 947 535T893 615T793 667T639 686H385Z" />
76
<glyph unicode="C" glyph-name="C" horiz-adv-x="1235" d="M793 1319Q686 1319 599 1279T451 1162T356 977T322 731Q322 590 351 481T440 296T587 182T793 143Q882 143 962 160T1120 201V39Q1081 24 1042 13T961 -6T870 -16T762 -20Q598 -20 478 34T280 187T163
77
425T125 733Q125 899 168 1037T296 1274T506 1428T793 1483Q901 1483 999 1461T1176 1397L1098 1241Q1035 1273 961 1296T793 1319Z" />
78
<glyph unicode="D" glyph-name="D" horiz-adv-x="1401" d="M1276 745Q1276 560 1228 421T1089 188T866 47T565 0H199V1462H606Q759 1462 883 1416T1094 1280T1228 1055T1276 745ZM1079 739Q1079 885 1046 991T950 1167T795 1269T586 1303H385V160H547Q811 160
79
945 306T1079 739Z" />
80
<glyph unicode="E" glyph-name="E" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0Z" />
81
<glyph unicode="F" glyph-name="F" horiz-adv-x="1006" d="M385 0H199V1462H958V1298H385V782H920V618H385V0Z" />
82
<glyph unicode="G" glyph-name="G" horiz-adv-x="1413" d="M782 772H1266V55Q1211 37 1155 23T1040 0T916 -15T776 -20Q619 -20 498 32T294 182T168 419T125 733Q125 905 172 1044T311 1280T535 1430T840 1483Q951 1483 1053 1461T1243 1397L1171 1235Q1135 1252
83
1094 1267T1008 1293T918 1312T825 1319Q703 1319 609 1279T452 1162T355 977T322 731Q322 601 349 493T437 307T592 186T821 143Q865 143 901 145T969 152T1027 161T1081 172V608H782V772Z" />
84
<glyph unicode="H" glyph-name="H" horiz-adv-x="1436" d="M1237 0H1051V682H385V0H199V1462H385V846H1051V1462H1237V0Z" />
85
<glyph unicode="I" glyph-name="I" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0Z" />
86
<glyph unicode="J" glyph-name="J" horiz-adv-x="555" d="M-29 -389Q-80 -389 -118 -383T-184 -365V-205Q-150 -214 -111 -219T-27 -225Q10 -225 47 -216T115 -181T165 -112T184 0V1462H371V20Q371 -85 342 -162T260 -289T134 -364T-29 -389Z" />
87
<glyph unicode="K" glyph-name="K" horiz-adv-x="1186" d="M1186 0H975L524 698L385 584V0H199V1462H385V731L506 899L958 1462H1167L647 825L1186 0Z" />
88
<glyph unicode="L" glyph-name="L" horiz-adv-x="1006" d="M199 0V1462H385V166H958V0H199Z" />
89
<glyph unicode="M" glyph-name="M" horiz-adv-x="1782" d="M803 0L360 1280H352Q358 1206 362 1133Q366 1070 368 1001T371 874V0H199V1462H475L887 270H893L1307 1462H1583V0H1397V887Q1397 939 1399 1006T1404 1134Q1408 1205 1411 1278H1403L956 0H803Z" />
90
<glyph unicode="N" glyph-name="N" horiz-adv-x="1493" d="M1294 0H1079L360 1210H352Q358 1133 362 1057Q366 992 368 921T371 793V0H199V1462H412L1128 258H1135Q1132 334 1128 408Q1127 440 1126 473T1123 540T1121 605T1120 662V1462H1294V0Z" />
91
<glyph unicode="O" glyph-name="O" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393 733ZM322
92
733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733Z" />
93
<glyph unicode="P" glyph-name="P" horiz-adv-x="1180" d="M1075 1034Q1075 943 1048 859T957 711T791 608T535 569H385V0H199V1462H561Q695 1462 792 1434T952 1351T1045 1216T1075 1034ZM385 727H514Q607 727 676 743T791 794T860 886T883 1024Q883 1166 801
94
1234T545 1303H385V727Z" />
95
<glyph unicode="Q" glyph-name="Q" horiz-adv-x="1518" d="M1393 733Q1393 602 1369 489T1297 286T1178 129T1014 25Q1057 -69 1125 -140T1284 -272L1163 -414Q1060 -341 974 -242T836 -16Q819 -18 799 -19T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125
96
905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393 733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428
97
1165T348 980T322 733Z" />
98
<glyph unicode="R" glyph-name="R" horiz-adv-x="1208" d="M385 604V0H199V1462H555Q821 1462 948 1359T1075 1047Q1075 960 1051 895T986 784T893 706T786 655L1184 0H965L614 604H385ZM385 762H549Q639 762 702 779T805 831T864 917T883 1038Q883 1110 863 1160T801
99
1242T696 1288T545 1303H385V762Z" />
100
<glyph unicode="S" glyph-name="S" horiz-adv-x="1063" d="M969 391Q969 294 935 218T836 88T680 8T473 -20Q362 -20 266 -3T104 49V227Q138 211 181 196T273 168T372 149T473 141Q633 141 709 201T786 373Q786 427 772 467T721 540T623 605T469 674Q380 709 315
101
750T207 844T144 962T123 1112Q123 1200 155 1269T245 1385T383 1458T561 1483Q680 1483 775 1461T944 1403L877 1247Q812 1276 730 1297T559 1319Q437 1319 370 1263T303 1110Q303 1053 318 1012T368 937T460 874T602 811Q693 775 761 737T876 651T945 540T969
102
391Z" />
103
<glyph unicode="T" glyph-name="T" horiz-adv-x="1063" d="M625 0H438V1298H20V1462H1042V1298H625V0Z" />
104
<glyph unicode="U" glyph-name="U" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245Z" />
105
<glyph unicode="V" glyph-name="V" horiz-adv-x="1163" d="M965 1462H1163L674 0H487L0 1462H197L492 535Q521 444 542 360T580 201Q595 275 618 359T672 541L965 1462Z" />
106
<glyph unicode="W" glyph-name="W" horiz-adv-x="1810" d="M809 1462H1006L1235 606Q1250 550 1264 494T1291 386T1313 286T1329 201Q1333 239 1339 284T1353 378T1370 479T1391 580L1591 1462H1790L1423 0H1235L981 938Q967 989 954 1043T930 1144Q918 1199 907
107
1251Q896 1200 885 1145Q875 1098 863 1042T836 932L594 0H406L20 1462H217L440 573Q452 527 462 478T480 379T496 285T508 201Q513 238 520 287T538 390T559 499T584 604L809 1462Z" />
108
<glyph unicode="X" glyph-name="X" horiz-adv-x="1120" d="M1120 0H909L555 635L188 0H0L453 764L31 1462H229L561 903L895 1462H1085L664 770L1120 0Z" />
109
<glyph unicode="Y" glyph-name="Y" horiz-adv-x="1079" d="M539 723L879 1462H1079L633 569V0H446V559L0 1462H203L539 723Z" />
110
<glyph unicode="Z" glyph-name="Z" horiz-adv-x="1104" d="M1022 0H82V145L793 1296H102V1462H1001V1317L291 166H1022V0Z" />
111
<glyph unicode="[" glyph-name="bracketleft" horiz-adv-x="621" d="M569 -324H164V1462H569V1313H346V-174H569V-324Z" />
112
<glyph unicode="\" glyph-name="backslash" horiz-adv-x="764" d="M201 1462L745 0H567L23 1462H201Z" />
113
<glyph unicode="]" glyph-name="bracketright" horiz-adv-x="621" d="M51 -174H274V1313H51V1462H457V-324H51V-174Z" />
114
<glyph unicode="^" glyph-name="asciicircum" horiz-adv-x="1090" d="M41 549L500 1473H602L1049 549H888L551 1284L202 549H41Z" />
115
<glyph unicode="_" glyph-name="underscore" horiz-adv-x="842" d="M846 -324H-4V-184H846V-324Z" />
116
<glyph unicode="`" glyph-name="grave" horiz-adv-x="1182" d="M786 1241H666Q631 1269 590 1310T511 1396T441 1480T393 1548V1569H612Q628 1535 649 1495T694 1414T741 1335T786 1268V1241Z" />
117
<glyph unicode="a" glyph-name="a" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967 374 943T236
118
885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127Z" />
119
<glyph unicode="b" glyph-name="b" horiz-adv-x="1200" d="M670 1118Q764 1118 841 1082T972 975T1057 797T1087 551Q1087 410 1057 304T973 125T841 17T670 -20Q611 -20 563 -7T477 27T409 78T356 139H344L307 0H174V1556H356V1180Q356 1145 355 1106T352 1032Q350
120
992 348 954H356Q379 989 408 1019T475 1071T562 1105T670 1118ZM635 967Q555 967 502 942T416 864T370 734T356 551Q356 450 369 372T415 240T502 159T637 131Q772 131 835 240T899 553Q899 761 836 864T635 967Z" />
121
<glyph unicode="c" glyph-name="c" horiz-adv-x="948" d="M594 -20Q493 -20 405 11T252 111T150 286T113 543Q113 700 151 809T255 987T411 1087T602 1118Q680 1118 754 1101T879 1059L825 905Q802 915 774 924T716 941T657 953T602 958Q445 958 373 858T301 545Q301
122
334 373 237T594 139Q675 139 740 157T860 201V39Q806 10 745 -5T594 -20Z" />
123
<glyph unicode="d" glyph-name="d" horiz-adv-x="1200" d="M852 147H844Q822 113 793 83T725 29T638 -7T530 -20Q437 -20 360 16T228 123T143 301T113 547Q113 688 143 794T228 973T360 1081T530 1118Q589 1118 637 1105T723 1070T792 1019T844 958H856Q853 992
124
850 1023Q848 1049 846 1076T844 1120V1556H1026V0H879L852 147ZM565 131Q641 131 693 154T778 224T826 341T844 506V547Q844 648 831 726T785 858T698 939T563 967Q428 967 365 858T301 545Q301 336 364 234T565 131Z" />
125
<glyph unicode="e" glyph-name="e" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139 704 144T788 158T867
126
182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967Z" />
127
<glyph unicode="f" glyph-name="f" horiz-adv-x="674" d="M651 961H406V0H223V961H29V1036L223 1104V1200Q223 1307 245 1377T310 1490T415 1549T555 1567Q614 1567 663 1556T752 1530L705 1389Q674 1400 638 1408T561 1417Q521 1417 492 1408T444 1374T416 1309T406
128
1202V1098H651V961Z" />
129
<glyph unicode="g" glyph-name="g" horiz-adv-x="1061" d="M1020 1098V985L823 958Q851 923 870 869T889 745Q889 669 866 605T795 493T677 420T514 393Q492 393 470 393T434 397Q417 387 401 375T371 346T349 310T340 266Q340 239 352 223T384 197T433 185T492
130
182H668Q761 182 825 159T929 95T988 1T1006 -115Q1006 -203 974 -273T874 -391T705 -466T463 -492Q356 -492 276 -471T143 -410T64 -314T37 -186Q37 -126 56 -81T109 -2T185 52T276 84Q234 103 207 144T180 238Q180 299 212 343T313 430Q270 448 235 479T175 551T137
131
640T123 739Q123 828 148 898T222 1017T344 1092T514 1118Q551 1118 590 1113T657 1098H1020ZM209 -180Q209 -217 222 -249T264 -304T342 -340T463 -354Q649 -354 741 -297T834 -131Q834 -85 822 -56T783 -11T710 12T600 18H424Q389 18 351 10T282 -20T230 -80T209
132
-180ZM301 745Q301 630 355 574T508 518Q608 518 659 573T711 748Q711 871 659 929T506 987Q407 987 354 927T301 745Z" />
133
<glyph unicode="h" glyph-name="h" horiz-adv-x="1206" d="M860 0V707Q860 837 808 902T643 967Q562 967 507 941T419 864T371 739T356 569V0H174V1556H356V1094L348 950H358Q383 993 417 1024T493 1077T580 1108T674 1118Q857 1118 949 1023T1042 717V0H860Z" />
134
<glyph unicode="i" glyph-name="i" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM160 1395Q160 1455 190 1482T266 1509Q288 1509 307 1503T341 1482T364 1447T373 1395Q373 1337 342 1309T266 1280Q221 1280 191 1308T160 1395Z" />
135
<glyph unicode="j" glyph-name="j" horiz-adv-x="530" d="M66 -492Q18 -492 -13 -485T-68 -467V-319Q-42 -329 -15 -334T47 -340Q74 -340 97 -333T137 -306T164 -254T174 -170V1098H356V-158Q356 -235 339 -296T286 -401T196 -468T66 -492ZM160 1395Q160 1455
136
190 1482T266 1509Q288 1509 307 1503T341 1482T364 1447T373 1395Q373 1337 342 1309T266 1280Q221 1280 191 1308T160 1395Z" />
137
<glyph unicode="k" glyph-name="k" horiz-adv-x="1016" d="M342 567L477 737L770 1098H981L580 623L1008 0H799L463 504L354 422V0H174V1556H354V842L338 567H342Z" />
138
<glyph unicode="l" glyph-name="l" horiz-adv-x="530" d="M356 0H174V1556H356V0Z" />
139
<glyph unicode="m" glyph-name="m" horiz-adv-x="1835" d="M1489 0V707Q1489 837 1439 902T1284 967Q1211 967 1160 944T1077 875T1029 762T1014 606V0H831V707Q831 837 782 902T627 967Q550 967 498 941T415 864T370 739T356 569V0H174V1098H322L348 950H358Q382
140
993 415 1024T487 1077T571 1108T662 1118Q782 1118 861 1074T979 936H987Q1013 983 1049 1017T1129 1073T1221 1107T1319 1118Q1494 1118 1582 1023T1671 717V0H1489Z" />
141
<glyph unicode="n" glyph-name="n" horiz-adv-x="1206" d="M860 0V707Q860 837 808 902T643 967Q562 967 507 941T419 864T371 739T356 569V0H174V1098H322L348 950H358Q383 993 417 1024T493 1077T580 1108T674 1118Q857 1118 949 1023T1042 717V0H860Z" />
142
<glyph unicode="o" glyph-name="o" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301 551Q301
143
342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551Z" />
144
<glyph unicode="p" glyph-name="p" horiz-adv-x="1200" d="M670 -20Q611 -20 563 -7T477 27T409 78T356 139H344Q347 105 350 74Q352 48 354 21T356 -23V-492H174V1098H322L348 950H356Q379 985 408 1015T475 1068T562 1104T670 1118Q764 1118 841 1082T972 975T1057
145
797T1087 551Q1087 410 1057 304T973 125T841 17T670 -20ZM635 967Q559 967 507 944T422 874T374 757T356 592V551Q356 450 369 372T415 240T502 159T637 131Q772 131 835 240T899 553Q899 761 836 864T635 967Z" />
146
<glyph unicode="q" glyph-name="q" horiz-adv-x="1200" d="M565 131Q641 131 693 154T778 224T826 341T844 506V547Q844 648 831 726T785 858T698 939T563 967Q428 967 365 858T301 545Q301 336 364 234T565 131ZM530 -20Q437 -20 360 16T228 123T143 301T113
147
547Q113 688 143 794T228 973T360 1081T530 1118Q589 1118 637 1105T723 1069T791 1016T844 950H852L879 1098H1026V-492H844V-23Q844 -4 846 25T850 81Q853 113 856 147H844Q822 113 793 83T725 29T638 -7T530 -20Z" />
148
<glyph unicode="r" glyph-name="r" horiz-adv-x="817" d="M649 1118Q678 1118 714 1116T776 1108L752 940Q724 945 695 948T639 952Q576 952 524 927T435 854T377 740T356 592V0H174V1098H322L344 897H352Q377 940 405 980T469 1050T549 1099T649 1118Z" />
149
<glyph unicode="s" glyph-name="s" horiz-adv-x="924" d="M831 301Q831 221 802 161T719 61T587 0T414 -20Q305 -20 227 -3T90 49V215Q121 199 159 184T239 156T325 137T414 129Q479 129 524 140T598 171T640 221T653 287Q653 318 643 343T607 392T534 442T416
150
498Q344 529 287 559T189 626T128 711T106 827Q106 897 133 951T211 1043T331 1099T487 1118Q584 1118 664 1097T817 1042L754 895Q689 924 621 945T481 967Q379 967 330 934T281 838Q281 803 292 777T332 728T407 682T524 629Q596 599 652 569T749 502T810 416T831
151
301Z" />
152
<glyph unicode="t" glyph-name="t" horiz-adv-x="694" d="M506 129Q524 129 546 131T590 136T628 143T655 150V12Q642 6 622 0T578 -10T528 -17T477 -20Q415 -20 362 -4T271 51T210 156T188 324V961H33V1042L188 1120L266 1350H371V1098H647V961H371V324Q371 227
153
402 178T506 129Z" />
154
<glyph unicode="u" glyph-name="u" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885Z" />
155
<glyph unicode="v" glyph-name="v" horiz-adv-x="981" d="M375 0L0 1098H188L387 487Q398 454 413 402T443 296T470 194T487 121H494Q499 146 511 194T538 296T568 402T594 487L793 1098H981L606 0H375Z" />
156
<glyph unicode="w" glyph-name="w" horiz-adv-x="1528" d="M1008 0L840 616Q836 634 830 656T818 704T806 755T793 806Q779 864 764 926H758Q744 863 731 805Q720 755 708 702T684 612L512 0H301L20 1098H211L342 514Q352 469 362 417T381 313T397 216T408 141H414Q419
157
167 427 210T446 302T468 398T489 479L668 1098H864L1036 479Q1045 445 1056 399T1079 306T1099 214T1112 141H1118Q1121 167 1127 210T1143 306T1162 412T1184 514L1321 1098H1507L1223 0H1008Z" />
158
<glyph unicode="x" glyph-name="x" horiz-adv-x="1024" d="M408 563L55 1098H262L512 688L762 1098H969L614 563L987 0H780L512 436L242 0H35L408 563Z" />
159
<glyph unicode="y" glyph-name="y" horiz-adv-x="1001" d="M10 1098H199L414 485Q428 445 442 401T469 313T491 228T504 152H510Q515 177 526 220T550 311T578 407T604 487L803 1098H991L557 -143Q529 -224 497 -288T421 -398T320 -467T182 -492Q130 -492 92 -487T27
160
-475V-330Q48 -335 80 -338T147 -342Q195 -342 230 -331T291 -297T335 -243T369 -170L426 -10L10 1098Z" />
161
<glyph unicode="z" glyph-name="z" horiz-adv-x="903" d="M821 0H82V125L618 961H115V1098H803V952L279 137H821V0Z" />
162
<glyph unicode="{" glyph-name="braceleft" horiz-adv-x="725" d="M500 -16Q500 -64 512 -94T546 -142T601 -166T674 -174V-324Q597 -323 532 -307T419 -255T344 -164T317 -31V303Q317 406 252 449T61 492V647Q186 647 251 690T317 836V1169Q317 1247 344 1302T418
163
1392T531 1444T674 1462V1313Q634 1312 602 1306T547 1282T512 1234T500 1155V823Q500 718 441 657T266 575V563Q381 543 440 482T500 315V-16Z" />
164
<glyph unicode="|" glyph-name="bar" horiz-adv-x="1128" d="M489 1556H639V-492H489V1556Z" />
165
<glyph unicode="}" glyph-name="braceright" horiz-adv-x="725" d="M225 315Q225 421 284 482T459 563V575Q344 595 285 656T225 823V1155Q225 1203 213 1233T179 1281T124 1305T51 1313V1462Q128 1461 193 1445T306 1393T381 1302T408 1169V836Q408 784 424 748T473
166
690T554 657T664 647V492Q539 492 474 449T408 303V-31Q408 -109 381 -164T307 -254T194 -306T51 -324V-174Q91 -173 123 -167T178 -143T213 -95T225 -16V315Z" />
167
<glyph unicode="~" glyph-name="asciitilde" horiz-adv-x="1128" d="M530 651Q493 667 466 678T416 695T373 704T330 707Q302 707 272 698T213 672T155 633T102 586V748Q202 856 350 856Q379 856 404 854T456 845T517 826T598 793Q635 777 662 766T713 749T757
168
740T799 737Q827 737 857 746T916 772T974 811T1026 858V696Q927 588 778 588Q749 588 724 590T672 599T611 618T530 651Z" />
169
<glyph unicode="&#xa0;" glyph-name="nbspace" horiz-adv-x="532" />
170
<glyph unicode="&#xa1;" glyph-name="exclamdown" horiz-adv-x="551" d="M213 676H334L385 -373H162L213 676ZM401 979Q401 941 392 915T365 872T324 848T274 840Q248 840 225 847T185 871T157 914T147 979Q147 1016 157 1042T184 1085T225 1110T274 1118Q301
171
1118 324 1110T364 1085T391 1042T401 979Z" />
172
<glyph unicode="&#xa2;" glyph-name="cent" horiz-adv-x="1128" d="M886 212T831 197T700 180V-20H563V186Q476 199 407 236T289 340T214 506T188 743Q188 884 214 985T289 1155T407 1260T563 1311V1483H700V1319Q772 1316 840 1300T954 1260L901 1106Q878 1116
173
850 1125T792 1142T733 1154T678 1159Q521 1159 449 1058T377 745Q377 535 449 438T670 340Q751 340 816 358T936 401V240Q886 212 831 197Z" />
174
<glyph unicode="&#xa3;" glyph-name="sterling" horiz-adv-x="1128" d="M666 1481Q772 1481 859 1459T1012 1401L946 1257Q890 1286 820 1307T674 1329Q626 1329 585 1316T514 1273T468 1196T451 1083V788H827V651H451V440Q451 378 440 334T409 257T364 204T311
175
166H1059V0H68V154Q112 165 148 185T211 240T253 322T268 438V651H70V788H268V1112Q268 1199 297 1267T379 1383T505 1456T666 1481Z" />
176
<glyph unicode="&#xa4;" glyph-name="currency" horiz-adv-x="1128" d="M186 723Q186 782 203 835T252 936L123 1065L221 1163L348 1034Q395 1066 449 1084T563 1102Q623 1102 676 1084T776 1034L905 1163L1004 1067L874 938Q905 892 923 838T942 723Q942 663
177
925 608T874 508L1001 381L905 285L776 412Q730 381 677 364T563 346Q503 346 448 364T348 414L221 287L125 383L252 510Q221 555 204 609T186 723ZM324 723Q324 673 342 630T393 554T469 502T563 483Q614 483 658 502T736 553T788 629T807 723Q807 774 788 818T736
178
896T659 948T563 967Q513 967 470 948T394 896T343 819T324 723Z" />
179
<glyph unicode="&#xa5;" glyph-name="yen" horiz-adv-x="1128" d="M563 723L909 1462H1100L715 694H954V557H653V399H954V262H653V0H475V262H174V399H475V557H174V694H408L29 1462H221L563 723Z" />
180
<glyph unicode="&#xa6;" glyph-name="brokenbar" horiz-adv-x="1128" d="M489 1556H639V776H489V1556ZM489 289H639V-492H489V289Z" />
181
<glyph unicode="&#xa7;" glyph-name="section" horiz-adv-x="995" d="M137 809Q137 860 150 901T185 975T237 1029T297 1067Q222 1105 180 1162T137 1303Q137 1364 164 1413T242 1496T362 1548T518 1567Q615 1567 693 1547T844 1495L788 1356Q723 1384 653 1403T512
182
1423Q413 1423 362 1394T311 1307Q311 1280 323 1257T363 1212T439 1167T557 1114Q629 1086 685 1054T781 982T841 895T862 784Q862 732 850 690T818 613T771 555T717 514Q786 476 824 422T862 289Q862 218 833 163T749 69T618 10T444 -10Q336 -10 258 6T121 55V213Q152
183
198 190 183T270 157T356 138T444 131Q513 131 559 143T633 174T672 219T684 272Q684 301 676 323T642 368T569 415T446 471Q373 502 316 533T218 603T158 692T137 809ZM291 831Q291 794 305 763T350 702T432 646T555 588L590 573Q610 586 630 604T667 645T694
184
696T705 758Q705 796 692 828T647 889T560 947T424 1006Q399 998 376 983T333 945T303 893T291 831Z" />
185
<glyph unicode="&#xa8;" glyph-name="dieresis" horiz-adv-x="1182" d="M307 1395Q307 1449 335 1473T403 1497Q442 1497 471 1473T500 1395Q500 1342 471 1317T403 1292Q363 1292 335 1317T307 1395ZM682 1395Q682 1449 710 1473T778 1497Q797 1497 814 1491T845
186
1473T866 1441T874 1395Q874 1342 845 1317T778 1292Q738 1292 710 1317T682 1395Z" />
187
<glyph unicode="&#xa9;" glyph-name="copyright" horiz-adv-x="1704" d="M891 1053Q830 1053 783 1031T704 968T656 866T639 731Q639 653 653 593T698 492T776 430T891 408Q914 408 941 411T996 421T1053 435T1106 453V322Q1082 311 1058 302T1007 286T950 276T885
188
272Q783 272 707 305T581 399T505 545T479 733Q479 834 506 917T585 1061T714 1154T891 1188Q954 1188 1020 1172T1145 1126L1083 999Q1031 1025 983 1039T891 1053ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231
189
1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384 200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320 199T203 351T127 531T100 731ZM209 731Q209 598 259 481T397 277T602 139T852 88Q985 88 1102 138T1306 276T1444 481T1495
190
731Q1495 864 1445 981T1307 1185T1102 1323T852 1374Q719 1374 602 1324T398 1186T260 981T209 731Z" />
191
<glyph unicode="&#xaa;" glyph-name="ordfeminine" horiz-adv-x="678" d="M487 797L459 879Q441 857 422 840T379 810T327 791T264 784Q221 784 185 797T123 835T83 899T68 989Q68 1091 138 1145T352 1204L451 1208V1239Q451 1311 421 1339T334 1368Q286 1368
192
241 1354T154 1317L106 1417Q157 1443 215 1461T334 1479Q459 1479 518 1426T578 1251V797H487ZM377 1110Q326 1107 292 1098T238 1074T208 1038T199 987Q199 936 224 914T291 891Q325 891 354 901T404 934T438 988T451 1065V1114L377 1110Z" />
193
<glyph unicode="&#xab;" glyph-name="guillemotleft" horiz-adv-x="997" d="M82 553L391 967L508 889L270 541L508 193L391 115L82 526V553ZM489 553L799 967L915 889L678 541L915 193L799 115L489 526V553Z" />
194
<glyph unicode="&#xac;" glyph-name="logicalnot" horiz-adv-x="1128" d="M1026 797V262H877V647H102V797H1026Z" />
195
<glyph unicode="&#xad;" glyph-name="uni00AD" horiz-adv-x="659" d="M82 465V633H578V465H82Z" />
196
<glyph unicode="&#xae;" glyph-name="registered" horiz-adv-x="1704" d="M743 768H815Q906 768 945 804T985 909Q985 983 944 1012T813 1042H743V768ZM1145 913Q1145 865 1132 828T1096 762T1045 713T985 680Q1052 570 1105 483Q1128 446 1149 411T1186 347T1213
197
302L1223 285H1044L838 637H743V285H586V1178H819Q987 1178 1066 1113T1145 913ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231 1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384
198
200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320 199T203 351T127 531T100 731ZM209 731Q209 598 259 481T397 277T602 139T852 88Q985 88 1102 138T1306 276T1444 481T1495 731Q1495 864 1445 981T1307 1185T1102 1323T852 1374Q719 1374 602 1324T398 1186T260
199
981T209 731Z" />
200
<glyph unicode="&#xaf;" glyph-name="overscore" horiz-adv-x="1024" d="M1030 1556H-6V1696H1030V1556Z" />
201
<glyph unicode="&#xb0;" glyph-name="degree" horiz-adv-x="877" d="M123 1167Q123 1232 148 1289T215 1390T315 1458T438 1483Q503 1483 560 1458T661 1390T729 1290T754 1167Q754 1102 729 1045T661 946T561 879T438 854Q373 854 316 878T216 945T148 1045T123
202
1167ZM246 1167Q246 1128 261 1094T302 1033T363 992T438 977Q478 977 513 992T574 1033T616 1093T631 1167Q631 1207 616 1242T575 1304T513 1346T438 1362Q398 1362 363 1347T302 1305T261 1243T246 1167Z" />
203
<glyph unicode="&#xb1;" glyph-name="plusminus" horiz-adv-x="1128" d="M489 647H102V797H489V1186H639V797H1026V647H639V262H489V647ZM102 0V150H1026V0H102Z" />
204
<glyph unicode="&#xb2;" glyph-name="twosuperior" horiz-adv-x="678" d="M621 586H49V698L258 926Q315 988 351 1030T407 1106T434 1169T442 1233Q442 1298 409 1330T322 1362Q271 1362 225 1337T133 1274L55 1368Q109 1416 175 1448T324 1481Q384 1481 432 1465T515
205
1417T567 1340T586 1237Q586 1187 572 1144T530 1059T464 971T373 870L225 713H621V586Z" />
206
<glyph unicode="&#xb3;" glyph-name="threesuperior" horiz-adv-x="678" d="M590 1255Q590 1177 550 1124T440 1047Q528 1024 572 971T616 840Q616 780 596 730T535 645T430 589T281 569Q211 569 150 581T31 625V758Q94 724 160 705T279 686Q377 686 421 727T465
207
842Q465 916 412 949T262 983H164V1096H262Q354 1096 396 1135T438 1239Q438 1271 428 1294T401 1333T360 1355T309 1362Q250 1362 202 1342T102 1284L33 1380Q62 1403 92 1421T157 1453T229 1473T311 1481Q380 1481 432 1464T520 1417T572 1346T590 1255Z" />
208
<glyph unicode="&#xb4;" glyph-name="acute" horiz-adv-x="1182" d="M393 1268Q415 1297 438 1335T485 1413T530 1494T567 1569H786V1548Q770 1521 739 1481T669 1396T590 1311T514 1241H393V1268Z" />
209
<glyph unicode="&#xb5;" glyph-name="mu" horiz-adv-x="1217" d="M356 391Q356 261 409 196T573 131Q655 131 710 157T798 233T846 358T860 528V1098H1042V0H895L868 147H858Q810 64 738 22T563 -20Q491 -20 438 3T350 68Q351 30 353 -10Q355 -45 355 -87T356
210
-172V-492H174V1098H356V391Z" />
211
<glyph unicode="&#xb6;" glyph-name="paragraph" horiz-adv-x="1341" d="M1126 -260H1006V1397H799V-260H678V559Q617 541 532 541Q437 541 360 566T228 651T143 806T113 1042Q113 1189 145 1287T237 1446T380 1531T563 1556H1126V-260Z" />
212
<glyph unicode="&#xb7;" glyph-name="middot" horiz-adv-x="549" d="M147 723Q147 761 157 787T184 830T224 854T274 862Q300 862 323 855T364 831T391 788T401 723Q401 686 391 660T364 617T324 592T274 584Q247 584 224 592T184 617T157 660T147 723Z" />
213
<glyph unicode="&#xb8;" glyph-name="cedilla" horiz-adv-x="420" d="M408 -287Q408 -384 338 -438T117 -492Q95 -492 73 -489T35 -483V-375Q50 -378 74 -379T115 -381Q186 -381 226 -360T266 -289Q266 -265 253 -248T217 -217T163 -195T94 -176L184 0H305L248
214
-115Q282 -123 311 -136T361 -169T395 -219T408 -287Z" />
215
<glyph unicode="&#xb9;" glyph-name="onesuperior" horiz-adv-x="678" d="M307 1462H442V586H297V1102Q297 1127 297 1157T299 1217T302 1275T305 1325Q291 1308 272 1288T231 1251L137 1178L63 1274L307 1462Z" />
216
<glyph unicode="&#xba;" glyph-name="ordmasculine" horiz-adv-x="717" d="M651 1133Q651 1050 631 985T572 876T479 808T356 784Q293 784 240 807T148 875T88 985T66 1133Q66 1216 86 1280T145 1389T237 1456T360 1479Q422 1479 475 1456T568 1389T629 1281T651
217
1133ZM197 1133Q197 1014 234 954T358 893Q443 893 480 953T518 1133Q518 1253 481 1310T358 1368Q272 1368 235 1311T197 1133Z" />
218
<glyph unicode="&#xbb;" glyph-name="guillemotright" horiz-adv-x="997" d="M918 526L608 115L492 193L729 541L492 889L608 967L918 553V526ZM510 526L201 115L84 193L322 541L84 889L201 967L510 553V526Z" />
219
<glyph unicode="&#xbc;" glyph-name="onequarter" horiz-adv-x="1509" d="M307 1462H442V586H297V1102Q297 1127 297 1157T299 1217T302 1275T305 1325Q291 1308 272 1288T231 1251L137 1178L63 1274L307 1462ZM1202 1462L391 0H234L1045 1462H1202ZM1419 193H1294V1H1151V193H776V304L1153
220
883H1294V320H1419V193ZM1151 320V515Q1151 557 1152 606T1157 705Q1152 694 1142 676T1121 636T1098 595T1077 560L922 320H1151Z" />
221
<glyph unicode="&#xbd;" glyph-name="onehalf" horiz-adv-x="1509" d="M544 1462H679V586H534V1102Q534 1127 534 1157T536 1217T539 1275T542 1325Q528 1308 509 1288T468 1251L374 1178L300 1274L544 1462ZM1181 1462L370 0H213L1024 1462H1181ZM1440 1H868V113L1077
222
341Q1134 403 1170 445T1226 521T1253 584T1261 648Q1261 713 1228 745T1141 777Q1090 777 1044 752T952 689L874 783Q928 831 994 863T1143 896Q1203 896 1251 880T1334 832T1386 755T1405 652Q1405 602 1391 559T1349 474T1283 386T1192 285L1044 128H1440V1Z"
223
/>
224
<glyph unicode="&#xbe;" glyph-name="threequarters" horiz-adv-x="1509" d="M590 1255Q590 1177 550 1124T440 1047Q528 1024 572 971T616 840Q616 780 596 730T535 645T430 589T281 569Q211 569 150 581T31 625V758Q94 724 160 705T279 686Q377 686 421 727T465
225
842Q465 916 412 949T262 983H164V1096H262Q354 1096 396 1135T438 1239Q438 1271 428 1294T401 1333T360 1355T309 1362Q250 1362 202 1342T102 1284L33 1380Q62 1403 92 1421T157 1453T229 1473T311 1481Q380 1481 432 1464T520 1417T572 1346T590 1255ZM1296
226
1462L485 0H328L1139 1462H1296ZM1486 193H1361V1H1218V193H843V304L1220 883H1361V320H1486V193ZM1218 320V515Q1218 557 1219 606T1224 705Q1219 694 1209 676T1188 636T1165 595T1144 560L989 320H1218Z" />
227
<glyph unicode="&#xbf;" glyph-name="questiondown" horiz-adv-x="872" d="M592 676V639Q592 581 584 536T557 450T505 371T422 291Q374 250 340 217T285 149T253 75T242 -18Q242 -66 257 -105T300 -173T371 -217T469 -233Q553 -233 628 -208T772 -147L836 -293Q754
228
-335 660 -364T469 -393Q376 -393 302 -368T176 -294T96 -177T68 -20Q68 48 81 100T121 197T188 284T283 373Q335 418 368 451T420 516T446 580T453 657V676H592ZM639 979Q639 941 630 915T603 872T562 848T512 840Q486 840 463 847T423 871T395 914T385 979Q385
229
1016 395 1042T422 1085T463 1110T512 1118Q539 1118 562 1110T602 1085T629 1042T639 979Z" />
230
<glyph unicode="&#xc0;" glyph-name="Agrave" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM719
231
1579H599Q564 1607 523 1648T444 1734T374 1818T326 1886V1907H545Q561 1873 582 1833T627 1752T674 1673T719 1606V1579Z" />
232
<glyph unicode="&#xc1;" glyph-name="Aacute" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM534
233
1606Q556 1635 579 1673T626 1751T671 1832T708 1907H927V1886Q911 1859 880 1819T810 1734T731 1649T655 1579H534V1606Z" />
234
<glyph unicode="&#xc2;" glyph-name="Acircumflex" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM953
235
1579H832Q781 1613 727 1661T621 1765Q567 1710 514 1662T410 1579H289V1606Q315 1635 349 1673T416 1751T479 1832T525 1907H717Q733 1873 762 1833T825 1752T893 1673T953 1606V1579Z" />
236
<glyph unicode="&#xc3;" glyph-name="Atilde" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM772
237
1581Q732 1581 693 1598T615 1637T542 1676T475 1694Q430 1694 406 1668T368 1579H264Q269 1639 285 1688T328 1771T392 1824T475 1843Q517 1843 557 1826T636 1787T708 1749T772 1731Q817 1731 840 1757T878 1845H983Q978 1785 962 1737T919 1654T855 1600T772
238
1581Z" />
239
<glyph unicode="&#xc4;" glyph-name="Adieresis" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM340
240
1733Q340 1787 368 1811T436 1835Q475 1835 504 1811T533 1733Q533 1680 504 1655T436 1630Q396 1630 368 1655T340 1733ZM715 1733Q715 1787 743 1811T811 1835Q830 1835 847 1829T878 1811T899 1779T907 1733Q907 1680 878 1655T811 1630Q771 1630 743 1655T715
241
1733Z" />
242
<glyph unicode="&#xc5;" glyph-name="Aring" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM848
243
1583Q848 1532 831 1492T783 1423T710 1381T619 1366Q569 1366 528 1380T458 1423T412 1490T396 1581Q396 1632 412 1671T457 1739T528 1781T619 1796Q667 1796 709 1782T782 1740T830 1673T848 1583ZM731 1581Q731 1634 700 1664T619 1694Q569 1694 538 1664T506
244
1581Q506 1528 534 1498T619 1468Q668 1468 699 1498T731 1581Z" />
245
<glyph unicode="&#xc6;" glyph-name="AE" horiz-adv-x="1745" d="M1622 0H862V453H387L184 0H-2L653 1462H1622V1298H1049V846H1583V684H1049V164H1622V0ZM459 618H862V1298H754L459 618Z" />
246
<glyph unicode="&#xc7;" glyph-name="Ccedilla" horiz-adv-x="1235" d="M793 1319Q686 1319 599 1279T451 1162T356 977T322 731Q322 590 351 481T440 296T587 182T793 143Q882 143 962 160T1120 201V39Q1081 24 1042 13T961 -6T870 -16T762 -20Q598 -20 478 34T280
247
187T163 425T125 733Q125 899 168 1037T296 1274T506 1428T793 1483Q901 1483 999 1461T1176 1397L1098 1241Q1035 1273 961 1296T793 1319ZM916 -287Q916 -384 846 -438T625 -492Q603 -492 581 -489T543 -483V-375Q558 -378 582 -379T623 -381Q694 -381 734 -360T774
248
-289Q774 -265 761 -248T725 -217T671 -195T602 -176L692 0H813L756 -115Q790 -123 819 -136T869 -169T903 -219T916 -287Z" />
249
<glyph unicode="&#xc8;" glyph-name="Egrave" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM713 1579H593Q558 1607 517 1648T438 1734T368 1818T320 1886V1907H539Q555 1873 576 1833T621 1752T668 1673T713 1606V1579Z" />
250
<glyph unicode="&#xc9;" glyph-name="Eacute" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM456 1606Q478 1635 501 1673T548 1751T593 1832T630 1907H849V1886Q833 1859 802 1819T732 1734T653 1649T577 1579H456V1606Z" />
251
<glyph unicode="&#xca;" glyph-name="Ecircumflex" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM907 1579H786Q735 1613 681 1661T575 1765Q521 1710 468 1662T364 1579H243V1606Q269 1635 303 1673T370 1751T433 1832T479
252
1907H671Q687 1873 716 1833T779 1752T847 1673T907 1606V1579Z" />
253
<glyph unicode="&#xcb;" glyph-name="Edieresis" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM296 1733Q296 1787 324 1811T392 1835Q431 1835 460 1811T489 1733Q489 1680 460 1655T392 1630Q352 1630 324 1655T296 1733ZM671
254
1733Q671 1787 699 1811T767 1835Q786 1835 803 1829T834 1811T855 1779T863 1733Q863 1680 834 1655T767 1630Q727 1630 699 1655T671 1733Z" />
255
<glyph unicode="&#xcc;" glyph-name="Igrave" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM455 1579H335Q300 1607 259 1648T180 1734T110 1818T62 1886V1907H281Q297 1873 318 1833T363 1752T410 1673T455
256
1606V1579Z" />
257
<glyph unicode="&#xcd;" glyph-name="Iacute" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM257 1606Q279 1635 302 1673T349 1751T394 1832T431 1907H650V1886Q634 1859 603 1819T533 1734T454 1649T378
258
1579H257V1606Z" />
259
<glyph unicode="&#xce;" glyph-name="Icircumflex" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM681 1579H560Q509 1613 455 1661T349 1765Q295 1710 242 1662T138 1579H17V1606Q43 1635 77 1673T144 1751T207
260
1832T253 1907H445Q461 1873 490 1833T553 1752T621 1673T681 1606V1579Z" />
261
<glyph unicode="&#xcf;" glyph-name="Idieresis" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM64 1733Q64 1787 92 1811T160 1835Q199 1835 228 1811T257 1733Q257 1680 228 1655T160 1630Q120 1630 92 1655T64
262
1733ZM439 1733Q439 1787 467 1811T535 1835Q554 1835 571 1829T602 1811T623 1779T631 1733Q631 1680 602 1655T535 1630Q495 1630 467 1655T439 1733Z" />
263
<glyph unicode="&#xd0;" glyph-name="Eth" horiz-adv-x="1401" d="M47 805H199V1462H606Q759 1462 883 1416T1094 1280T1228 1055T1276 745Q1276 560 1228 421T1089 188T866 47T565 0H199V643H47V805ZM1079 739Q1079 885 1046 991T950 1167T795 1269T586 1303H385V805H721V643H385V160H547Q811
264
160 945 306T1079 739Z" />
265
<glyph unicode="&#xd1;" glyph-name="Ntilde" horiz-adv-x="1493" d="M1294 0H1079L360 1210H352Q358 1133 362 1057Q366 992 368 921T371 793V0H199V1462H412L1128 258H1135Q1132 334 1128 408Q1127 440 1126 473T1123 540T1121 605T1120 662V1462H1294V0ZM905
266
1581Q865 1581 826 1598T748 1637T675 1676T608 1694Q563 1694 539 1668T501 1579H397Q402 1639 418 1688T461 1771T525 1824T608 1843Q650 1843 690 1826T769 1787T841 1749T905 1731Q950 1731 973 1757T1011 1845H1116Q1111 1785 1095 1737T1052 1654T988 1600T905
267
1581Z" />
268
<glyph unicode="&#xd2;" glyph-name="Ograve" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
269
733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM870 1579H750Q715 1607 674 1648T595 1734T525 1818T477 1886V1907H696Q712
270
1873 733 1833T778 1752T825 1673T870 1606V1579Z" />
271
<glyph unicode="&#xd3;" glyph-name="Oacute" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
272
733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM651 1606Q673 1635 696 1673T743 1751T788 1832T825 1907H1044V1886Q1028
273
1859 997 1819T927 1734T848 1649T772 1579H651V1606Z" />
274
<glyph unicode="&#xd4;" glyph-name="Ocircumflex" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352
275
1043T1393 733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM1096 1579H975Q924 1613 870 1661T764 1765Q710
276
1710 657 1662T553 1579H432V1606Q458 1635 492 1673T559 1751T622 1832T668 1907H860Q876 1873 905 1833T968 1752T1036 1673T1096 1606V1579Z" />
277
<glyph unicode="&#xd5;" glyph-name="Otilde" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
278
733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM891 1581Q851 1581 812 1598T734 1637T661 1676T594 1694Q549
279
1694 525 1668T487 1579H383Q388 1639 404 1688T447 1771T511 1824T594 1843Q636 1843 676 1826T755 1787T827 1749T891 1731Q936 1731 959 1757T997 1845H1102Q1097 1785 1081 1737T1038 1654T974 1600T891 1581Z" />
280
<glyph unicode="&#xd6;" glyph-name="Odieresis" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
281
733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM477 1733Q477 1787 505 1811T573 1835Q612 1835 641 1811T670
282
1733Q670 1680 641 1655T573 1630Q533 1630 505 1655T477 1733ZM852 1733Q852 1787 880 1811T948 1835Q967 1835 984 1829T1015 1811T1036 1779T1044 1733Q1044 1680 1015 1655T948 1630Q908 1630 880 1655T852 1733Z" />
283
<glyph unicode="&#xd7;" glyph-name="multiply" horiz-adv-x="1128" d="M459 723L141 1042L246 1147L563 829L885 1147L989 1044L668 723L987 403L885 301L563 618L246 303L143 406L459 723Z" />
284
<glyph unicode="&#xd8;" glyph-name="Oslash" horiz-adv-x="1520" d="M1300 1454L1208 1305Q1299 1206 1346 1061T1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q571 -20 438 51L360 -76L223 2L313 147Q216 247 171 396T125 735Q125 905 163 1043T280
285
1280T479 1431T762 1485Q856 1485 936 1464T1083 1405L1163 1532L1300 1454ZM322 733Q322 602 345 498T416 315L995 1260Q947 1289 890 1305T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM1196 733Q1196 990 1108 1141L530 201Q577 173 634 158T760 143Q874
286
143 956 183T1092 300T1171 486T1196 733Z" />
287
<glyph unicode="&#xd9;" glyph-name="Ugrave" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245ZM847
288
1579H727Q692 1607 651 1648T572 1734T502 1818T454 1886V1907H673Q689 1873 710 1833T755 1752T802 1673T847 1606V1579Z" />
289
<glyph unicode="&#xda;" glyph-name="Uacute" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245ZM590
290
1606Q612 1635 635 1673T682 1751T727 1832T764 1907H983V1886Q967 1859 936 1819T866 1734T787 1649T711 1579H590V1606Z" />
291
<glyph unicode="&#xdb;" glyph-name="Ucircumflex" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059
292
512V1464H1245ZM1043 1579H922Q871 1613 817 1661T711 1765Q657 1710 604 1662T500 1579H379V1606Q405 1635 439 1673T506 1751T569 1832T615 1907H807Q823 1873 852 1833T915 1752T983 1673T1043 1606V1579Z" />
293
<glyph unicode="&#xdc;" glyph-name="Udieresis" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245ZM432
294
1733Q432 1787 460 1811T528 1835Q567 1835 596 1811T625 1733Q625 1680 596 1655T528 1630Q488 1630 460 1655T432 1733ZM807 1733Q807 1787 835 1811T903 1835Q922 1835 939 1829T970 1811T991 1779T999 1733Q999 1680 970 1655T903 1630Q863 1630 835 1655T807
295
1733Z" />
296
<glyph unicode="&#xdd;" glyph-name="Yacute" horiz-adv-x="1079" d="M539 723L879 1462H1079L633 569V0H446V559L0 1462H203L539 723ZM442 1606Q464 1635 487 1673T534 1751T579 1832T616 1907H835V1886Q819 1859 788 1819T718 1734T639 1649T563 1579H442V1606Z" />
297
<glyph unicode="&#xde;" glyph-name="Thorn" horiz-adv-x="1180" d="M1075 782Q1075 691 1048 607T957 459T791 356T535 317H385V0H199V1462H385V1210H561Q695 1210 792 1182T952 1099T1045 964T1075 782ZM385 475H514Q607 475 676 491T791 542T860 634T883 772Q883
298
915 801 983T545 1051H385V475Z" />
299
<glyph unicode="&#xdf;" glyph-name="germandbls" horiz-adv-x="1233" d="M1010 1260Q1010 1203 989 1159T936 1078T867 1011T798 954T745 899T723 842Q723 821 730 805T756 769T811 725T903 662Q959 625 1003 589T1077 512T1124 423T1141 313Q1141 226 1113 163T1035
300
60T914 0T758 -20Q661 -20 592 -3T469 49V215Q495 199 527 184T596 156T670 137T745 129Q801 129 841 141T908 176T946 231T958 303Q958 339 950 368T920 426T862 483T770 547Q707 587 665 621T596 688T558 757T547 834Q547 888 567 927T619 998T686 1057T753 1113T804
301
1175T825 1253Q825 1295 809 1326T762 1377T691 1407T598 1417Q549 1417 505 1408T428 1374T376 1309T356 1202V0H174V1200Q174 1304 205 1374T293 1487T428 1548T598 1567Q690 1567 766 1548T896 1491T980 1395T1010 1260Z" />
302
<glyph unicode="&#xe0;" glyph-name="agrave" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
303
374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM934 1241H814Q779
304
1269 738 1310T659 1396T589 1480T541 1548V1569H760Q776 1535 797 1495T842 1414T889 1335T934 1268V1241Z" />
305
<glyph unicode="&#xe1;" glyph-name="aacute" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
306
374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM446 1268Q468 1297
307
491 1335T538 1413T583 1494T620 1569H839V1548Q823 1521 792 1481T722 1396T643 1311T567 1241H446V1268Z" />
308
<glyph unicode="&#xe2;" glyph-name="acircumflex" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445
309
967 374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM1148 1241H1027Q976
310
1275 922 1323T816 1427Q762 1372 709 1324T605 1241H484V1268Q510 1297 544 1335T611 1413T674 1494T720 1569H912Q928 1535 957 1495T1020 1414T1088 1335T1148 1268V1241Z" />
311
<glyph unicode="&#xe3;" glyph-name="atilde" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
312
374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM955 1243Q915 1243
313
876 1260T798 1299T725 1338T658 1356Q613 1356 589 1330T551 1241H447Q452 1301 468 1350T511 1433T575 1486T658 1505Q700 1505 740 1488T819 1449T891 1411T955 1393Q1000 1393 1023 1419T1061 1507H1166Q1161 1447 1145 1399T1102 1316T1038 1262T955 1243Z"
314
/>
315
<glyph unicode="&#xe4;" glyph-name="adieresis" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445
316
967 374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM529 1395Q529
317
1449 557 1473T625 1497Q664 1497 693 1473T722 1395Q722 1342 693 1317T625 1292Q585 1292 557 1317T529 1395ZM904 1395Q904 1449 932 1473T1000 1497Q1019 1497 1036 1491T1067 1473T1088 1441T1096 1395Q1096 1342 1067 1317T1000 1292Q960 1292 932 1317T904
318
1395Z" />
319
<glyph unicode="&#xe5;" glyph-name="aring" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
320
374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM1039 1458Q1039
321
1407 1022 1367T974 1298T901 1256T810 1241Q760 1241 719 1255T649 1298T603 1365T587 1456Q587 1507 603 1546T648 1614T719 1656T810 1671Q858 1671 900 1657T973 1615T1021 1548T1039 1458ZM922 1456Q922 1509 891 1539T810 1569Q760 1569 729 1539T697 1456Q697
322
1403 725 1373T810 1343Q859 1343 890 1373T922 1456Z" />
323
<glyph unicode="&#xe6;" glyph-name="ae" horiz-adv-x="1706" d="M94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967 374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q659 1118 742 1076T868 940Q919 1025 1002
324
1071T1188 1118Q1285 1118 1362 1083T1493 983T1575 828T1604 627V514H932Q937 321 1010 230T1231 139Q1280 139 1322 144T1404 158T1480 182T1554 215V53Q1515 34 1478 20T1401 -3T1319 -16T1227 -20Q1089 -20 988 37T825 209Q791 155 753 113T668 41T562 -4T430
325
-20Q359 -20 298 -1T191 59T120 161T94 307ZM283 305Q283 213 331 170T459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305ZM1184 967Q1074 967 1011 889T936 662H1407Q1407 730 1394 786T1354 883T1284 945T1184
326
967Z" />
327
<glyph unicode="&#xe7;" glyph-name="ccedilla" horiz-adv-x="948" d="M594 -20Q493 -20 405 11T252 111T150 286T113 543Q113 700 151 809T255 987T411 1087T602 1118Q680 1118 754 1101T879 1059L825 905Q802 915 774 924T716 941T657 953T602 958Q445 958 373
328
858T301 545Q301 334 373 237T594 139Q675 139 740 157T860 201V39Q806 10 745 -5T594 -20ZM730 -287Q730 -384 660 -438T439 -492Q417 -492 395 -489T357 -483V-375Q372 -378 396 -379T437 -381Q508 -381 548 -360T588 -289Q588 -265 575 -248T539 -217T485 -195T416
329
-176L506 0H627L570 -115Q604 -123 633 -136T683 -169T717 -219T730 -287Z" />
330
<glyph unicode="&#xe8;" glyph-name="egrave" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139 704
331
144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM934 1241H814Q779 1269 738 1310T659 1396T589 1480T541 1548V1569H760Q776 1535 797 1495T842 1414T889
332
1335T934 1268V1241Z" />
333
<glyph unicode="&#xe9;" glyph-name="eacute" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139 704
334
144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM475 1268Q497 1297 520 1335T567 1413T612 1494T649 1569H868V1548Q852 1521 821 1481T751 1396T672 1311T596
335
1241H475V1268Z" />
336
<glyph unicode="&#xea;" glyph-name="ecircumflex" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139
337
704 144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM1144 1241H1023Q972 1275 918 1323T812 1427Q758 1372 705 1324T601 1241H480V1268Q506 1297 540
338
1335T607 1413T670 1494T716 1569H908Q924 1535 953 1495T1016 1414T1084 1335T1144 1268V1241Z" />
339
<glyph unicode="&#xeb;" glyph-name="edieresis" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139
340
704 144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM525 1395Q525 1449 553 1473T621 1497Q660 1497 689 1473T718 1395Q718 1342 689 1317T621 1292Q581
341
1292 553 1317T525 1395ZM900 1395Q900 1449 928 1473T996 1497Q1015 1497 1032 1491T1063 1473T1084 1441T1092 1395Q1092 1342 1063 1317T996 1292Q956 1292 928 1317T900 1395Z" />
342
<glyph unicode="&#xec;" glyph-name="igrave" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM359 1241H239Q204 1269 163 1310T84 1396T14 1480T-34 1548V1569H185Q201 1535 222 1495T267 1414T314 1335T359 1268V1241Z" />
343
<glyph unicode="&#xed;" glyph-name="iacute" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM185 1268Q207 1297 230 1335T277 1413T322 1494T359 1569H578V1548Q562 1521 531 1481T461 1396T382 1311T306 1241H185V1268Z" />
344
<glyph unicode="&#xee;" glyph-name="icircumflex" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM597 1241H476Q425 1275 371 1323T265 1427Q211 1372 158 1324T54 1241H-67V1268Q-41 1297 -7 1335T60 1413T123 1494T169 1569H361Q377 1535 406 1495T469 1414T537
345
1335T597 1268V1241Z" />
346
<glyph unicode="&#xef;" glyph-name="idieresis" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM-18 1395Q-18 1449 10 1473T78 1497Q117 1497 146 1473T175 1395Q175 1342 146 1317T78 1292Q38 1292 10 1317T-18 1395ZM357 1395Q357 1449 385 1473T453 1497Q472
347
1497 489 1491T520 1473T541 1441T549 1395Q549 1342 520 1317T453 1292Q413 1292 385 1317T357 1395Z" />
348
<glyph unicode="&#xf0;" glyph-name="eth" horiz-adv-x="1182" d="M1069 573Q1069 431 1036 321T940 135T788 20T588 -20Q484 -20 397 13T246 109T147 265T111 477Q111 596 142 688T233 843T376 938T565 971Q667 971 744 942T864 852L872 856Q841 974 781 1070T631
349
1247L375 1094L301 1208L518 1339Q478 1367 436 1394T346 1448L416 1571Q481 1539 542 1503T662 1423L889 1561L963 1448L768 1331Q835 1266 890 1188T985 1017T1047 813T1069 573ZM881 526Q881 582 864 635T812 730T722 796T592 821Q515 821 461 798T371 731T320
350
622T303 471Q303 395 319 333T371 225T461 156T592 131Q746 131 813 230T881 526Z" />
351
<glyph unicode="&#xf1;" glyph-name="ntilde" horiz-adv-x="1206" d="M860 0V707Q860 837 808 902T643 967Q562 967 507 941T419 864T371 739T356 569V0H174V1098H322L348 950H358Q383 993 417 1024T493 1077T580 1108T674 1118Q857 1118 949 1023T1042 717V0H860ZM1015
352
1243Q975 1243 936 1260T858 1299T785 1338T718 1356Q673 1356 649 1330T611 1241H507Q512 1301 528 1350T571 1433T635 1486T718 1505Q760 1505 800 1488T879 1449T951 1411T1015 1393Q1060 1393 1083 1419T1121 1507H1226Q1221 1447 1205 1399T1162 1316T1098
353
1262T1015 1243Z" />
354
<glyph unicode="&#xf2;" glyph-name="ograve" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301
355
551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM1002 1241H882Q847 1269 806 1310T727 1396T657 1480T609 1548V1569H828Q844 1535 865 1495T910 1414T957 1335T1002 1268V1241Z" />
356
<glyph unicode="&#xf3;" glyph-name="oacute" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301
357
551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM473 1268Q495 1297 518 1335T565 1413T610 1494T647 1569H866V1548Q850 1521 819 1481T749 1396T670 1311T594 1241H473V1268Z" />
358
<glyph unicode="&#xf4;" glyph-name="ocircumflex" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069
359
551ZM301 551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM1173 1241H1052Q1001 1275 947 1323T841 1427Q787 1372 734 1324T630 1241H509V1268Q535 1297 569 1335T636 1413T699 1494T745 1569H937Q953
360
1535 982 1495T1045 1414T1113 1335T1173 1268V1241Z" />
361
<glyph unicode="&#xf5;" glyph-name="otilde" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301
362
551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM992 1243Q952 1243 913 1260T835 1299T762 1338T695 1356Q650 1356 626 1330T588 1241H484Q489 1301 505 1350T548 1433T612 1486T695 1505Q737 1505 777
363
1488T856 1449T928 1411T992 1393Q1037 1393 1060 1419T1098 1507H1203Q1198 1447 1182 1399T1139 1316T1075 1262T992 1243Z" />
364
<glyph unicode="&#xf6;" glyph-name="odieresis" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069
365
551ZM301 551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM556 1395Q556 1449 584 1473T652 1497Q691 1497 720 1473T749 1395Q749 1342 720 1317T652 1292Q612 1292 584 1317T556 1395ZM931 1395Q931
366
1449 959 1473T1027 1497Q1046 1497 1063 1491T1094 1473T1115 1441T1123 1395Q1123 1342 1094 1317T1027 1292Q987 1292 959 1317T931 1395Z" />
367
<glyph unicode="&#xf7;" glyph-name="divide" horiz-adv-x="1128" d="M102 647V797H1026V647H102ZM449 373Q449 408 458 431T482 470T518 491T563 498Q586 498 607 492T644 470T669 432T678 373Q678 340 669 317T644 278T607 255T563 248Q539 248 519 255T483
368
277T458 316T449 373ZM449 1071Q449 1106 458 1129T482 1168T518 1189T563 1196Q586 1196 607 1190T644 1168T669 1130T678 1071Q678 1038 669 1015T644 976T607 953T563 946Q539 946 519 953T483 975T458 1014T449 1071Z" />
369
<glyph unicode="&#xf8;" glyph-name="oslash" horiz-adv-x="1182" d="M1071 551Q1071 414 1038 308T942 129T790 18T590 -20Q465 -20 367 33L299 -76L168 -2L248 129Q185 201 150 307T115 551Q115 687 148 792T244 970T395 1080T596 1118Q659 1118 715 1104T821
370
1061L889 1169L1020 1096L940 967Q1002 894 1036 790T1071 551ZM303 551Q303 467 312 402T344 285L741 932Q712 949 675 958T592 967Q438 967 371 864T303 551ZM883 551Q883 710 844 809L446 164Q477 147 513 139T594 131Q748 131 815 236T883 551Z" />
371
<glyph unicode="&#xf9;" glyph-name="ugrave" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM949
372
1241H829Q794 1269 753 1310T674 1396T604 1480T556 1548V1569H775Q791 1535 812 1495T857 1414T904 1335T949 1268V1241Z" />
373
<glyph unicode="&#xfa;" glyph-name="uacute" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM489
374
1268Q511 1297 534 1335T581 1413T626 1494T663 1569H882V1548Q866 1521 835 1481T765 1396T686 1311T610 1241H489V1268Z" />
375
<glyph unicode="&#xfb;" glyph-name="ucircumflex" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM930
376
1241H809Q758 1275 704 1323T598 1427Q544 1372 491 1324T387 1241H266V1268Q292 1297 326 1335T393 1413T456 1494T502 1569H694Q710 1535 739 1495T802 1414T870 1335T930 1268V1241Z" />
377
<glyph unicode="&#xfc;" glyph-name="udieresis" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM309
378
1395Q309 1449 337 1473T405 1497Q444 1497 473 1473T502 1395Q502 1342 473 1317T405 1292Q365 1292 337 1317T309 1395ZM684 1395Q684 1449 712 1473T780 1497Q799 1497 816 1491T847 1473T868 1441T876 1395Q876 1342 847 1317T780 1292Q740 1292 712 1317T684
379
1395Z" />
380
<glyph unicode="&#xfd;" glyph-name="yacute" horiz-adv-x="1001" d="M10 1098H199L414 485Q428 445 442 401T469 313T491 228T504 152H510Q515 177 526 220T550 311T578 407T604 487L803 1098H991L557 -143Q529 -224 497 -288T421 -398T320 -467T182 -492Q130
381
-492 92 -487T27 -475V-330Q48 -335 80 -338T147 -342Q195 -342 230 -331T291 -297T335 -243T369 -170L426 -10L10 1098ZM407 1268Q429 1297 452 1335T499 1413T544 1494T581 1569H800V1548Q784 1521 753 1481T683 1396T604 1311T528 1241H407V1268Z" />
382
<glyph unicode="&#xfe;" glyph-name="thorn" horiz-adv-x="1200" d="M356 950Q379 985 408 1015T475 1068T562 1104T670 1118Q764 1118 841 1082T972 975T1057 797T1087 551Q1087 410 1057 304T973 125T841 17T670 -20Q611 -20 563 -7T477 27T409 78T356 139H344Q347
383
105 350 74Q352 48 354 21T356 -23V-492H174V1556H356V1098L348 950H356ZM635 967Q559 967 507 944T422 874T374 757T356 592V551Q356 450 369 372T415 240T502 159T637 131Q772 131 835 240T899 553Q899 761 836 864T635 967Z" />
384
<glyph unicode="&#xff;" glyph-name="ydieresis" horiz-adv-x="1001" d="M10 1098H199L414 485Q428 445 442 401T469 313T491 228T504 152H510Q515 177 526 220T550 311T578 407T604 487L803 1098H991L557 -143Q529 -224 497 -288T421 -398T320 -467T182 -492Q130
385
-492 92 -487T27 -475V-330Q48 -335 80 -338T147 -342Q195 -342 230 -331T291 -297T335 -243T369 -170L426 -10L10 1098ZM484 1395Q484 1449 512 1473T580 1497Q619 1497 648 1473T677 1395Q677 1342 648 1317T580 1292Q540 1292 512 1317T484 1395ZM859 1395Q859
386
1449 887 1473T955 1497Q974 1497 991 1491T1022 1473T1043 1441T1051 1395Q1051 1342 1022 1317T955 1292Q915 1292 887 1317T859 1395Z" />
387
<glyph unicode="&#x2013;" glyph-name="endash" horiz-adv-x="1024" d="M82 465V633H942V465H82Z" />
388
<glyph unicode="&#x2014;" glyph-name="emdash" horiz-adv-x="2048" d="M82 465V633H1966V465H82Z" />
389
<glyph unicode="&#x2018;" glyph-name="quoteleft" horiz-adv-x="358" d="M37 961L23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H336Q321 1401 307 1335T279 1204T255 1076T236 961H37Z" />
390
<glyph unicode="&#x2019;" glyph-name="quoteright" horiz-adv-x="358" d="M322 1462L336 1440Q322 1385 303 1325T260 1202T211 1078T160 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H322Z" />
391
<glyph unicode="&#x201a;" glyph-name="quotesinglbase" horiz-adv-x="512" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362Z" />
392
<glyph unicode="&#x201c;" glyph-name="quotedblleft" horiz-adv-x="743" d="M422 961L408 983Q422 1037 441 1098T484 1221T533 1344T584 1462H721Q706 1401 692 1335T664 1204T640 1076T621 961H422ZM37 961L23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H336Q321
393
1401 307 1335T279 1204T255 1076T236 961H37Z" />
394
<glyph unicode="&#x201d;" glyph-name="quotedblright" horiz-adv-x="743" d="M322 1462L336 1440Q322 1385 303 1325T260 1202T211 1078T160 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H322ZM707 1462L721 1440Q707 1385 688 1325T645 1202T596 1078T545
395
961H408Q422 1021 436 1087T464 1219T489 1347T508 1462H707Z" />
396
<glyph unicode="&#x201e;" glyph-name="quotedblbase" horiz-adv-x="897" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362ZM748 238L762 215Q748 161 729 100T686 -23T637 -146T586 -264H449Q463
397
-203 477 -137T505 -6T530 122T549 238H748Z" />
398
<glyph unicode="&#x2022;" glyph-name="bullet" horiz-adv-x="770" d="M150 748Q150 819 168 869T217 950T292 996T385 1010Q434 1010 477 996T552 951T602 869T621 748Q621 678 603 628T552 547T477 500T385 485Q335 485 292 500T218 546T168 628T150 748Z" />
399
<glyph unicode="&#x2039;" glyph-name="guilsinglleft" horiz-adv-x="590" d="M82 553L391 967L508 889L270 541L508 193L391 115L82 526V553Z" />
400
<glyph unicode="&#x203a;" glyph-name="guilsinglright" horiz-adv-x="590" d="M508 526L199 115L82 193L319 541L82 889L199 967L508 553V526Z" />
401
</font>
402
</defs>
403
</svg>
(-)a/api/v1/doc/index.html (+98 lines)
Line 0 Link Here
1
<!DOCTYPE html>
2
<html>
3
<head>
4
  <title>Swagger UI</title>
5
  <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
6
  <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
7
  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
8
  <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
9
  <link href='css/screen.css' media='print' rel='stylesheet' type='text/css'/>
10
  <script type="text/javascript" src="lib/shred.bundle.js"></script>
11
  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
12
  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
13
  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
14
  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
15
  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
16
  <script src='lib/underscore-min.js' type='text/javascript'></script>
17
  <script src='lib/backbone-min.js' type='text/javascript'></script>
18
  <script src='lib/swagger-client.js' type='text/javascript'></script>
19
  <script src='swagger-ui.js' type='text/javascript'></script>
20
  <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
21
  <script src='lib/marked.js' type='text/javascript'></script>
22
23
  <!-- enabling this will enable oauth2 implicit scope support -->
24
  <script src='lib/swagger-oauth.js' type='text/javascript'></script>
25
  <script type="text/javascript">
26
    $(function () {
27
      var url = window.location.search.match(/url=([^&]+)/);
28
      if (url && url.length > 1) {
29
        url = decodeURIComponent(url[1]);
30
      } else {
31
        url = "/v1/swagger.json";
32
      }
33
      window.swaggerUi = new SwaggerUi({
34
        url: url,
35
        dom_id: "swagger-ui-container",
36
        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
37
        onComplete: function(swaggerApi, swaggerUi){
38
          if(typeof initOAuth == "function") {
39
            /*
40
            initOAuth({
41
              clientId: "your-client-id",
42
              realm: "your-realms",
43
              appName: "your-app-name"
44
            });
45
            */
46
          }
47
          $('pre code').each(function(i, e) {
48
            hljs.highlightBlock(e)
49
          });
50
        },
51
        onFailure: function(data) {
52
          log("Unable to Load SwaggerUI");
53
        },
54
        docExpansion: "none",
55
        sorter : "alpha"
56
      });
57
58
      function addApiKeyAuthorization() {
59
        var key = $('#input_apiKey')[0].value;
60
        log("key: " + key);
61
        if(key && key.trim() != "") {
62
            log("added key " + key);
63
            window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
64
        }
65
      }
66
67
      $('#input_apiKey').change(function() {
68
        addApiKeyAuthorization();
69
      });
70
71
      // if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
72
      /*
73
        var apiKey = "myApiKeyXXXX123456789";
74
        $('#input_apiKey').val(apiKey);
75
        addApiKeyAuthorization();
76
      */
77
78
      window.swaggerUi.load();
79
  });
80
  </script>
81
</head>
82
83
<body class="swagger-section">
84
<div id='header'>
85
  <div class="swagger-ui-wrap">
86
    <a id="logo" href="http://swagger.io">swagger</a>
87
    <form id='api_selector'>
88
      <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
89
      <div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
90
      <div class='input'><a id="explore" href="#">Explore</a></div>
91
    </form>
92
  </div>
93
</div>
94
95
<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
96
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
97
</body>
98
</html>
(-)a/api/v1/doc/lib/backbone-min.js (+15 lines)
Line 0 Link Here
1
// Backbone.js 1.1.2
2
3
(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r(e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().replace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}};return e});
4
5
// From http://stackoverflow.com/a/19431552
6
// Compatibility override - Backbone 1.1 got rid of the 'options' binding
7
// automatically to views in the constructor - we need to keep that.
8
Backbone.View = (function(View) {
9
   return View.extend({
10
        constructor: function(options) {
11
            this.options = options || {};
12
            View.apply(this, arguments);
13
        }
14
    });
15
})(Backbone.View);
(-)a/api/v1/doc/lib/handlebars-2.0.0.js (+28 lines)
Line 0 Link Here
1
/*!
2
3
 handlebars v2.0.0
4
5
Copyright (C) 2011-2014 by Yehuda Katz
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy
8
of this software and associated documentation files (the "Software"), to deal
9
in the Software without restriction, including without limitation the rights
10
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
copies of the Software, and to permit persons to whom the Software is
12
furnished to do so, subject to the following conditions:
13
14
The above copyright notice and this permission notice shall be included in
15
all copies or substantial portions of the Software.
16
17
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
THE SOFTWARE.
24
25
@license
26
*/
27
!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a){return a instanceof h?a.toString():null==a?"":a?(a=""+a,k.test(a)?a.replace(j,b):a):a+""}function e(a){return a||0===a?n(a)&&0===a.length?!0:!1:!0}function f(a,b){return(a?a+".":"")+b}var g={},h=a,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.call(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f<c.length;f++)this[c[f]]=e[c[f]];d&&(this.lineNumber=d,this.column=b.firstColumn)}var b,c=["description","fileName","lineNumber","message","name","number","stack"];return a.prototype=new Error,b=a}(),d=function(a,b){"use strict";function c(a,b){this.helpers=a||{},this.partials=b||{},d(this)}function d(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new g("Missing helper: '"+arguments[arguments.length-1].name+"'")}),a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse,e=c.fn;if(b===!0)return e(this);if(b===!1||null==b)return d(this);if(k(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&&c.ids){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&b.ids&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&&b.ids){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=j;var k=f.isArray,l=f.isFunction,m=f.toString,n="[object Object]";e.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:o,log:p,registerHelper:function(a,b){if(m.call(a)===n){if(b)throw new g("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){m.call(a)===n?f.extend(this.partials,a):this.partials[a]=b},unregisterPartial:function(a){delete this.partials[a]}};var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};e.logger=o;var p=o.log;e.log=p;var q=function(a){var b=f.extend({},a);return b._parent=a,b};return e.createFrame=q,e}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");if(!a||!a.main)throw new l("Unknown template object: "+typeof a);b.VM.checkRevision(a.compiler);var c=function(c,d,e,f,g,h,i,j,m){g&&(f=k.extend({},f,g));var n=b.VM.invokePartial.call(this,c,e,f,h,i,j,m);if(null==n&&b.compile){var o={helpers:h,partials:i,data:j,depths:m};i[e]=b.compile(c,{data:void 0!==j,compat:a.compat},b),n=i[e](f,o)}if(null!=n){if(d){for(var p=n.split("\n"),q=0,r=p.length;r>q&&(p[q]||q+1!==r);q++)p[q]=d+p[q];n=p.join("\n")}return n}throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")},d={lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:k.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);return b||c?d=f(this,a,e,b,c):d||(d=this.programs[a]=f(this,a,e)),d},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=k.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler},e=function(b,c){c=c||{};var f=c.data;e._setup(c),!c.partial&&a.useData&&(f=i(b,f));var g;return a.useDepths&&(g=c.depths?[b].concat(c.depths):[b]),a.main.call(d,b,d.helpers,d.partials,f,g)};return e.isTop=!0,e._setup=function(c){c.partial?(d.helpers=c.helpers,d.partials=c.partials):(d.helpers=d.merge(c.helpers,b.helpers),a.usePartial&&(d.partials=d.merge(c.partials,b.partials)))},e._child=function(b,c,e){if(a.useDepths&&!e)throw new l("must pass parent depths");return f(d,b,a[b],c,e)},e}function f(a,b,c,d,e){var f=function(b,f){return f=f||{},c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};return f.program=b,f.depth=e?e.length:0,f}function g(a,b,c,d,e,f,g){var h={partial:!0,helpers:d,partials:e,data:f,depths:g};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,h):void 0}function h(){return""}function i(a,b){return b&&"root"in b||(b=b?o(b):{},b.root=a),b}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES,o=c.createFrame;return j.checkRevision=d,j.template=e,j.program=f,j.invokePartial=g,j.noop=h,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.escapeExpression=j.escapeExpression,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,m["default"]=m,f=m}(d,a,c,b,e),g=function(a){"use strict";function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d){b.call(this,d),this.type="program",this.statements=a,this.strip=c},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1);this.isHelper=!(!f.length&&!c),this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,c,d,e,f){b.call(this,f),this.type="partial",this.partialName=a,this.context=c,this.hash=d,this.strip=e,this.strip.inlineStandalone=!0},BlockNode:function(a,c,d,e,f){b.call(this,f),this.type="block",this.mustache=a,this.program=c,this.inverse=d,this.strip=e,d&&!c&&(this.isInverse=!0)},RawBlockNode:function(a,c,f,g){if(b.call(this,g),a.sexpr.id.original!==f)throw new d(a.sexpr.id.original+" doesn't match "+f,this);c=new e.ContentNode(c,g),this.type="block",this.mustache=a,this.program=new e.ProgramNode([c],{},g)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.original=this.string=a},HashNode:function(a,c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h="",i=0,j=a.length;j>i;i++){var k=a[i].part;if(e+=(a[i].separator||"")+k,".."===k||"."===k||"this"===k){if(f.length>0)throw new d("Invalid path: "+e,this);".."===k?(g++,h+="../"):this.isScoped=!0}else f.push(k)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.idName=h+this.string,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a,this.stringModeValue=a.stringModeValue,this.idName="@"+a.stringModeValue},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},NumberNode:function(a,c){b.call(this,c),this.type="NUMBER",this.original=this.number=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a,this.strip={inlineStandalone:!0}}};return c=e}(c),h=function(){"use strict";var a,b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return d.prepareProgram(f[g-1].statements,!0),f[g-1];case 2:this.$=new d.ProgramNode(d.prepareProgram(f[g]),{},this._$);break;case 3:this.$=f[g];break;case 4:this.$=f[g];break;case 5:this.$=f[g];break;case 6:this.$=f[g];break;case 7:this.$=new d.ContentNode(f[g],this._$);break;case 8:this.$=new d.CommentNode(f[g],this._$);break;case 9:this.$=new d.RawBlockNode(f[g-2],f[g-1],f[g],this._$);break;case 10:this.$=new d.MustacheNode(f[g-1],null,"","",this._$);break;case 11:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!1,this._$);break;case 12:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!0,this._$);break;case 13:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 14:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 15:this.$={strip:d.stripFlags(f[g-1],f[g-1]),program:f[g]};break;case 16:this.$={path:f[g-1],strip:d.stripFlags(f[g-2],f[g])};break;case 17:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 18:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 19:this.$=new d.PartialNode(f[g-3],f[g-2],f[g-1],d.stripFlags(f[g-4],f[g]),this._$);break;case 20:this.$=new d.PartialNode(f[g-2],void 0,f[g-1],d.stripFlags(f[g-3],f[g]),this._$);break;case 21:this.$=new d.SexprNode([f[g-2]].concat(f[g-1]),f[g],this._$);break;case 22:this.$=new d.SexprNode([f[g]],null,this._$);break;case 23:this.$=f[g];break;case 24:this.$=new d.StringNode(f[g],this._$);break;case 25:this.$=new d.NumberNode(f[g],this._$);break;case 26:this.$=new d.BooleanNode(f[g],this._$);break;case 27:this.$=f[g];break;case 28:f[g-1].isHelper=!0,this.$=f[g-1];break;case 29:this.$=new d.HashNode(f[g],this._$);break;case 30:this.$=[f[g-2],f[g]];break;case 31:this.$=new d.PartialNameNode(f[g],this._$);break;case 32:this.$=new d.PartialNameNode(new d.StringNode(f[g],this._$),this._$);break;case 33:this.$=new d.PartialNameNode(new d.NumberNode(f[g],this._$));break;case 34:this.$=new d.DataNode(f[g],this._$);break;case 35:this.$=new d.IdNode(f[g],this._$);break;case 36:f[g-2].push({part:f[g],separator:f[g-1]}),this.$=f[g-2];break;case 37:this.$=[{part:f[g]}];break;case 38:this.$=[];break;case 39:f[g-1].push(f[g]);break;case 48:this.$=[];break;case 49:f[g-1].push(f[g]);break;case 52:this.$=[f[g]];break;case 53:f[g-1].push(f[g])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return b.yytext=b.yytext.substr(5,b.yyleng-9),this.popState(),15;case 4:return 12;case 5:return e(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return e(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return b.yytext=e(1,2).replace(/\\"/g,'"'),42;case 30:return b.yytext=e(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return b.yytext=e(1,2),50;case 37:return"INVALID";case 38:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[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],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();return a=b}(),i=function(a){"use strict";function b(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(b.length-3)}}function c(a,b,c,d,i,k){if(a.sexpr.id.original!==d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,a);var l=c&&c.program,m={left:a.strip.left,right:d.strip.right,openStandalone:f(b.statements),closeStandalone:e((l||b).statements)};if(a.strip.right&&g(b.statements,null,!0),l){var n=c.strip;n.left&&h(b.statements,null,!0),n.right&&g(l.statements,null,!0),d.strip.left&&h(l.statements,null,!0),e(b.statements)&&f(l.statements)&&(h(b.statements),g(l.statements))}else d.strip.left&&h(b.statements,null,!0);return i?new this.BlockNode(a,l,b,m,k):new this.BlockNode(a,b,l,m,k)}function d(a,b){for(var c=0,d=a.length;d>c;c++){var i=a[c],j=i.strip;if(j){var k=e(a,c,b,"partial"===i.type),l=f(a,c,b),m=j.openStandalone&&k,n=j.closeStandalone&&l,o=j.inlineStandalone&&k&&l;j.right&&g(a,c,!0),j.left&&h(a,c,!0),o&&(g(a,c),h(a,c)&&"partial"===i.type&&(i.indent=/([ \t]+$)/.exec(a[c-1].original)?RegExp.$1:"")),m&&(g((i.program||i.inverse).statements),h(a,c)),n&&(g(a,c),h((i.inverse||i.program).statements))}}return a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"content"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"content"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"content"===d.type&&(c||!d.rightStripped)){var e=d.string;d.string=d.string.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.string!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"content"===d.type&&(c||!d.leftStripped)){var e=d.string;return d.string=d.string.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.string!==e,d.leftStripped}}var i={},j=a;return i.stripFlags=b,i.prepareBlock=c,i.prepareProgram=d,i}(c),j=function(a,b,c,d){"use strict";function e(a){return a.constructor===h.ProgramNode?a:(g.yy=k,g.parse(a))}var f={},g=a,h=b,i=c,j=d.extend;f.parser=g;var k={};return j(k,i,h),f.parse=e,f}(h,g,i,b),k=function(a,b){"use strict";function c(){}function d(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function e(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var e,f=function(a,b){return e||(e=d()),e.call(this,a,b)};return f._setup=function(a){return e||(e=d()),e._setup(a)},f._child=function(a,b,c){return e||(e=d()),e._child(a,b,c)},f}function f(a,b){if(a===b)return!0;if(i(a)&&i(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!f(a[c],b[c]))return!1;return!0}}var g={},h=a,i=b.isArray,j=[].slice;return g.Compiler=c,c.prototype={compiler:c,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;b>c;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!f(d.args,e.args))return!1}for(b=this.children.length,c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){return this[a.type](a)},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++;
28
this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",e.id.original)):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;for(this.opcode("pushHash"),b=0,c=d.length;c>b;b++)this.pushParam(d[b][1]);for(;b--;)this.opcode("assignToHash",d[b][0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.hash?this.accept(a.hash):this.opcode("push","undefined"),a.context?this.accept(a.context):(this.opcode("getContext",0),this.opcode("pushContext")),this.opcode("invokePartial",b.name,a.indent||""),this.opcode("append")},content:function(a){a.string&&this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.ID(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new h("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.falsy=!0,this.ID(e),this.opcode("invokeHelper",d.length,e.original,e.isSimple)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts,a.falsy,a.isScoped):this.opcode("pushContext")},DATA:function(a){this.options.data=!0,this.opcode("lookupData",a.id.depth,a.id.parts)},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:j.call(arguments,1)})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){this.stringParams?(a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",a.stringModeValue,a.type),"sexpr"===a.type&&this.sexpr(a)):(this.trackIds&&this.opcode("pushId",a.type,a.idName||a.stringModeValue),this.accept(a))},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},g.precompile=d,g.compile=e,g}(c,b),l=function(a,b){"use strict";function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=b;d.prototype={nameLookup:function(a,b){return d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},depthedLookup:function(a){return this.aliases.lookup="this.lookup",'lookup(depths, "'+a+'")'},compilerInfo:function(){var a=f,b=g[a];return[a,b]},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.depths.list.length||this.options.compat;var e,f,g,i=a.opcodes;for(f=0,g=i.length;g>f;f++)e=i[f],this[e.opcode].apply(this,e.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h("Compile completed with content left on stack");var j=this.createFunctionContext(d);if(this.isChild)return j;var k={compiler:this.compilerInfo(),main:j},l=this.context.programs;for(f=0,g=l.length;g>f;f++)l[f]&&(k[f]=l[f]);return this.environment.usePartial&&(k.usePartial=!0),this.options.data&&(k.useData=!0),this.useDepths&&(k.useDepths=!0),this.options.compat&&(k.compat=!0),d||(k.compiler=JSON.stringify(k.compiler),k=this.objectLiteral(k)),k},preamble:function(){this.lastContext=0,this.source=[]},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));for(var d in this.aliases)this.aliases.hasOwnProperty(d)&&(b+=", "+d+"="+this.aliases[d]);var e=["depth0","helpers","partials","data"];this.useDepths&&e.push("depths");var f=this.mergeSource(b);return a?(e.push(f),Function.apply(this,e)):"function("+e.join(",")+") {\n  "+f+"}"},mergeSource:function(a){for(var b,c,d="",e=!this.forceBuffer,f=0,g=this.source.length;g>f;f++){var h=this.source[f];h.appendToBuffer?b=b?b+"\n    + "+h.content:h.content:(b&&(d?d+="buffer += "+b+";\n  ":(c=!0,d=b+";\n  "),b=void 0),d+=h+"\n  ",this.environment.isSimple||(e=!1))}return e?(b||!d)&&(d+="return "+(b||'""')+";\n"):(a+=", buffer = "+(c?"":this.initializeBuffer()),d+=b?"return buffer + "+b+";\n":"return buffer;\n"),a&&(d="var "+a.substring(2)+(c?"":";\n  ")+d),d},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=[this.contextName(0)];this.setupParams(a,0,b);var c=this.popStack();b.splice(1,0,c),this.push("blockHelperMissing.call("+b.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=[this.contextName(0)];this.setupParams("",0,a,!0),this.flushInline();var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.pendingContent=a},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if ("+a+" != null) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c){var d=0,e=a.length;for(c||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[d++]));e>d;d++)this.replaceStack(function(c){var e=this.nameLookup(c,a[d],"context");return b?" && "+e:" != null ? "+e+" : "+c})},lookupData:function(a,b){a?this.pushStackLiteral("this.data(data, "+a+")"):this.pushStackLiteral("data");for(var c=b.length,d=0;c>d;d++)this.replaceStack(function(a){return" && "+this.nameLookup(a,b[d],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda",this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push("{"+a.ids.join(",")+"}"),this.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n    "+a.values.join(",\n    ")+"\n  }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";var d=this.popStack(),e=this.setupHelper(a,b),f=(c?e.name+" || ":"")+d+" || helperMissing";this.push("(("+f+").call("+e.callParams+"))")},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"',this.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper");this.push("((helper = (helper = "+e+" || "+c+") != null ? helper : helperMissing"+(d.paramsInit?"),("+d.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+d.callParams+") : helper))")},invokePartial:function(a,b){var c=[this.nameLookup("partials",a,"partial"),"'"+b+"'","'"+a+"'",this.popStack(),this.popStack(),"helpers","partials"];this.options.data?c.push("data"):this.options.compat&&c.push("undefined"),this.options.compat&&c.push("depths"),this.push("this.invokePartial("+c.join(", ")+")")},assignToHash:function(a){var b,c,d,e=this.popStack();this.trackIds&&(d=this.popStack()),this.stringParams&&(c=this.popStack(),b=this.popStack());var f=this.hash;b&&f.contexts.push("'"+a+"': "+b),c&&f.types.push("'"+a+"': "+c),d&&f.ids.push("'"+a+"': "+d),f.values.push("'"+a+"': ("+e+")")},pushId:function(a,b){"ID"===a||"DATA"===a?this.pushString(b):"sexpr"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context,!this.precompile),this.context.environments[h]=c,this.useDepths=this.useDepths||d.useDepths):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=(b.depths.list,this.useDepths),d=[b.index,"data"];return c&&d.push("depths"),"this.program("+d.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){{var b,d,e,f="";this.isInline()}if(!this.isInline())throw new h("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof c)f=b=g.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+g+")",b=this.topStack()}var j=a.call(this,b);e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof c?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(this.quotedString(c)+":"+a[c]);return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:[this.contextName(0)].concat(d).join(", ")}},setupOptions:function(a,b,c){var d,e,f,g={},h=[],i=[],j=[];g.name=this.quotedString(a),g.hash=this.popStack(),this.trackIds&&(g.hashIds=this.popStack()),this.stringParams&&(g.hashTypes=this.popStack(),g.hashContexts=this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(f="this.noop"),e||(e="this.noop"),g.fn=f,g.inverse=e);for(var k=b;k--;)d=this.popStack(),c[k]=d,this.trackIds&&(j[k]=this.popStack()),this.stringParams&&(i[k]=this.popStack(),h[k]=this.popStack());return this.trackIds&&(g.ids="["+j.join(",")+"]"),this.stringParams&&(g.types="["+i.join(",")+"]",g.contexts="["+h.join(",")+"]"),this.options.data&&(g.data="data"),g},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));return d?(this.useRegister("options"),c.push("options"),"options="+e):(c.push(e),"")}};for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),j=d.RESERVED_WORDS={},k=0,l=i.length;l>k;k++)j[i[k]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},e=d}(d,c),m=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,g["default"]=g,f=g}(f,g,j,k,l);return m});
(-)a/api/v1/doc/lib/highlight.7.3.pack.js (+1 lines)
Line 0 Link Here
1
var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
(-)a/api/v1/doc/lib/jquery-1.8.0.min.js (+2 lines)
Line 0 Link Here
1
/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
2
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
(-)a/api/v1/doc/lib/jquery.ba-bbq.min.js (+18 lines)
Line 0 Link Here
1
/*
2
 * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
3
 * http://benalman.com/projects/jquery-bbq-plugin/
4
 *
5
 * Copyright (c) 2010 "Cowboy" Ben Alman
6
 * Dual licensed under the MIT and GPL licenses.
7
 * http://benalman.com/about/license/
8
 */
9
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
10
/*
11
 * jQuery hashchange event - v1.2 - 2/11/2010
12
 * http://benalman.com/projects/jquery-hashchange-plugin/
13
 *
14
 * Copyright (c) 2010 "Cowboy" Ben Alman
15
 * Dual licensed under the MIT and GPL licenses.
16
 * http://benalman.com/about/license/
17
 */
18
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
(-)a/api/v1/doc/lib/jquery.slideto.min.js (+1 lines)
Line 0 Link Here
1
(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);
(-)a/api/v1/doc/lib/jquery.wiggle.min.js (+8 lines)
Line 0 Link Here
1
/*
2
jQuery Wiggle
3
Author: WonderGroup, Jordan Thomas
4
URL: http://labs.wondergroup.com/demos/mini-ui/index.html
5
License: MIT (http://en.wikipedia.org/wiki/MIT_License)
6
*/
7
jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}
8
if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};
(-)a/api/v1/doc/lib/marked.js (+1272 lines)
Line 0 Link Here
1
/**
2
 * marked - a markdown parser
3
 * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
4
 * https://github.com/chjj/marked
5
 */
6
7
;(function() {
8
9
/**
10
 * Block-Level Grammar
11
 */
12
13
var block = {
14
  newline: /^\n+/,
15
  code: /^( {4}[^\n]+\n*)+/,
16
  fences: noop,
17
  hr: /^( *[-*_]){3,} *(?:\n+|$)/,
18
  heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
19
  nptable: noop,
20
  lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
21
  blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
22
  list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
23
  html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
24
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
25
  table: noop,
26
  paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,
27
  text: /^[^\n]+/
28
};
29
30
block.bullet = /(?:[*+-]|\d+\.)/;
31
block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
32
block.item = replace(block.item, 'gm')
33
  (/bull/g, block.bullet)
34
  ();
35
36
block.list = replace(block.list)
37
  (/bull/g, block.bullet)
38
  ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')
39
  ('def', '\\n+(?=' + block.def.source + ')')
40
  ();
41
42
block.blockquote = replace(block.blockquote)
43
  ('def', block.def)
44
  ();
45
46
block._tag = '(?!(?:'
47
  + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
48
  + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
49
  + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';
50
51
block.html = replace(block.html)
52
  ('comment', /<!--[\s\S]*?-->/)
53
  ('closed', /<(tag)[\s\S]+?<\/\1>/)
54
  ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)
55
  (/tag/g, block._tag)
56
  ();
57
58
block.paragraph = replace(block.paragraph)
59
  ('hr', block.hr)
60
  ('heading', block.heading)
61
  ('lheading', block.lheading)
62
  ('blockquote', block.blockquote)
63
  ('tag', '<' + block._tag)
64
  ('def', block.def)
65
  ();
66
67
/**
68
 * Normal Block Grammar
69
 */
70
71
block.normal = merge({}, block);
72
73
/**
74
 * GFM Block Grammar
75
 */
76
77
block.gfm = merge({}, block.normal, {
78
  fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,
79
  paragraph: /^/
80
});
81
82
block.gfm.paragraph = replace(block.paragraph)
83
  ('(?!', '(?!'
84
    + block.gfm.fences.source.replace('\\1', '\\2') + '|'
85
    + block.list.source.replace('\\1', '\\3') + '|')
86
  ();
87
88
/**
89
 * GFM + Tables Block Grammar
90
 */
91
92
block.tables = merge({}, block.gfm, {
93
  nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,
94
  table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/
95
});
96
97
/**
98
 * Block Lexer
99
 */
100
101
function Lexer(options) {
102
  this.tokens = [];
103
  this.tokens.links = {};
104
  this.options = options || marked.defaults;
105
  this.rules = block.normal;
106
107
  if (this.options.gfm) {
108
    if (this.options.tables) {
109
      this.rules = block.tables;
110
    } else {
111
      this.rules = block.gfm;
112
    }
113
  }
114
}
115
116
/**
117
 * Expose Block Rules
118
 */
119
120
Lexer.rules = block;
121
122
/**
123
 * Static Lex Method
124
 */
125
126
Lexer.lex = function(src, options) {
127
  var lexer = new Lexer(options);
128
  return lexer.lex(src);
129
};
130
131
/**
132
 * Preprocessing
133
 */
134
135
Lexer.prototype.lex = function(src) {
136
  src = src
137
    .replace(/\r\n|\r/g, '\n')
138
    .replace(/\t/g, '    ')
139
    .replace(/\u00a0/g, ' ')
140
    .replace(/\u2424/g, '\n');
141
142
  return this.token(src, true);
143
};
144
145
/**
146
 * Lexing
147
 */
148
149
Lexer.prototype.token = function(src, top, bq) {
150
  var src = src.replace(/^ +$/gm, '')
151
    , next
152
    , loose
153
    , cap
154
    , bull
155
    , b
156
    , item
157
    , space
158
    , i
159
    , l;
160
161
  while (src) {
162
    // newline
163
    if (cap = this.rules.newline.exec(src)) {
164
      src = src.substring(cap[0].length);
165
      if (cap[0].length > 1) {
166
        this.tokens.push({
167
          type: 'space'
168
        });
169
      }
170
    }
171
172
    // code
173
    if (cap = this.rules.code.exec(src)) {
174
      src = src.substring(cap[0].length);
175
      cap = cap[0].replace(/^ {4}/gm, '');
176
      this.tokens.push({
177
        type: 'code',
178
        text: !this.options.pedantic
179
          ? cap.replace(/\n+$/, '')
180
          : cap
181
      });
182
      continue;
183
    }
184
185
    // fences (gfm)
186
    if (cap = this.rules.fences.exec(src)) {
187
      src = src.substring(cap[0].length);
188
      this.tokens.push({
189
        type: 'code',
190
        lang: cap[2],
191
        text: cap[3]
192
      });
193
      continue;
194
    }
195
196
    // heading
197
    if (cap = this.rules.heading.exec(src)) {
198
      src = src.substring(cap[0].length);
199
      this.tokens.push({
200
        type: 'heading',
201
        depth: cap[1].length,
202
        text: cap[2]
203
      });
204
      continue;
205
    }
206
207
    // table no leading pipe (gfm)
208
    if (top && (cap = this.rules.nptable.exec(src))) {
209
      src = src.substring(cap[0].length);
210
211
      item = {
212
        type: 'table',
213
        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
214
        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
215
        cells: cap[3].replace(/\n$/, '').split('\n')
216
      };
217
218
      for (i = 0; i < item.align.length; i++) {
219
        if (/^ *-+: *$/.test(item.align[i])) {
220
          item.align[i] = 'right';
221
        } else if (/^ *:-+: *$/.test(item.align[i])) {
222
          item.align[i] = 'center';
223
        } else if (/^ *:-+ *$/.test(item.align[i])) {
224
          item.align[i] = 'left';
225
        } else {
226
          item.align[i] = null;
227
        }
228
      }
229
230
      for (i = 0; i < item.cells.length; i++) {
231
        item.cells[i] = item.cells[i].split(/ *\| */);
232
      }
233
234
      this.tokens.push(item);
235
236
      continue;
237
    }
238
239
    // lheading
240
    if (cap = this.rules.lheading.exec(src)) {
241
      src = src.substring(cap[0].length);
242
      this.tokens.push({
243
        type: 'heading',
244
        depth: cap[2] === '=' ? 1 : 2,
245
        text: cap[1]
246
      });
247
      continue;
248
    }
249
250
    // hr
251
    if (cap = this.rules.hr.exec(src)) {
252
      src = src.substring(cap[0].length);
253
      this.tokens.push({
254
        type: 'hr'
255
      });
256
      continue;
257
    }
258
259
    // blockquote
260
    if (cap = this.rules.blockquote.exec(src)) {
261
      src = src.substring(cap[0].length);
262
263
      this.tokens.push({
264
        type: 'blockquote_start'
265
      });
266
267
      cap = cap[0].replace(/^ *> ?/gm, '');
268
269
      // Pass `top` to keep the current
270
      // "toplevel" state. This is exactly
271
      // how markdown.pl works.
272
      this.token(cap, top, true);
273
274
      this.tokens.push({
275
        type: 'blockquote_end'
276
      });
277
278
      continue;
279
    }
280
281
    // list
282
    if (cap = this.rules.list.exec(src)) {
283
      src = src.substring(cap[0].length);
284
      bull = cap[2];
285
286
      this.tokens.push({
287
        type: 'list_start',
288
        ordered: bull.length > 1
289
      });
290
291
      // Get each top-level item.
292
      cap = cap[0].match(this.rules.item);
293
294
      next = false;
295
      l = cap.length;
296
      i = 0;
297
298
      for (; i < l; i++) {
299
        item = cap[i];
300
301
        // Remove the list item's bullet
302
        // so it is seen as the next token.
303
        space = item.length;
304
        item = item.replace(/^ *([*+-]|\d+\.) +/, '');
305
306
        // Outdent whatever the
307
        // list item contains. Hacky.
308
        if (~item.indexOf('\n ')) {
309
          space -= item.length;
310
          item = !this.options.pedantic
311
            ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
312
            : item.replace(/^ {1,4}/gm, '');
313
        }
314
315
        // Determine whether the next list item belongs here.
316
        // Backpedal if it does not belong in this list.
317
        if (this.options.smartLists && i !== l - 1) {
318
          b = block.bullet.exec(cap[i + 1])[0];
319
          if (bull !== b && !(bull.length > 1 && b.length > 1)) {
320
            src = cap.slice(i + 1).join('\n') + src;
321
            i = l - 1;
322
          }
323
        }
324
325
        // Determine whether item is loose or not.
326
        // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
327
        // for discount behavior.
328
        loose = next || /\n\n(?!\s*$)/.test(item);
329
        if (i !== l - 1) {
330
          next = item.charAt(item.length - 1) === '\n';
331
          if (!loose) loose = next;
332
        }
333
334
        this.tokens.push({
335
          type: loose
336
            ? 'loose_item_start'
337
            : 'list_item_start'
338
        });
339
340
        // Recurse.
341
        this.token(item, false, bq);
342
343
        this.tokens.push({
344
          type: 'list_item_end'
345
        });
346
      }
347
348
      this.tokens.push({
349
        type: 'list_end'
350
      });
351
352
      continue;
353
    }
354
355
    // html
356
    if (cap = this.rules.html.exec(src)) {
357
      src = src.substring(cap[0].length);
358
      this.tokens.push({
359
        type: this.options.sanitize
360
          ? 'paragraph'
361
          : 'html',
362
        pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',
363
        text: cap[0]
364
      });
365
      continue;
366
    }
367
368
    // def
369
    if ((!bq && top) && (cap = this.rules.def.exec(src))) {
370
      src = src.substring(cap[0].length);
371
      this.tokens.links[cap[1].toLowerCase()] = {
372
        href: cap[2],
373
        title: cap[3]
374
      };
375
      continue;
376
    }
377
378
    // table (gfm)
379
    if (top && (cap = this.rules.table.exec(src))) {
380
      src = src.substring(cap[0].length);
381
382
      item = {
383
        type: 'table',
384
        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
385
        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
386
        cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
387
      };
388
389
      for (i = 0; i < item.align.length; i++) {
390
        if (/^ *-+: *$/.test(item.align[i])) {
391
          item.align[i] = 'right';
392
        } else if (/^ *:-+: *$/.test(item.align[i])) {
393
          item.align[i] = 'center';
394
        } else if (/^ *:-+ *$/.test(item.align[i])) {
395
          item.align[i] = 'left';
396
        } else {
397
          item.align[i] = null;
398
        }
399
      }
400
401
      for (i = 0; i < item.cells.length; i++) {
402
        item.cells[i] = item.cells[i]
403
          .replace(/^ *\| *| *\| *$/g, '')
404
          .split(/ *\| */);
405
      }
406
407
      this.tokens.push(item);
408
409
      continue;
410
    }
411
412
    // top-level paragraph
413
    if (top && (cap = this.rules.paragraph.exec(src))) {
414
      src = src.substring(cap[0].length);
415
      this.tokens.push({
416
        type: 'paragraph',
417
        text: cap[1].charAt(cap[1].length - 1) === '\n'
418
          ? cap[1].slice(0, -1)
419
          : cap[1]
420
      });
421
      continue;
422
    }
423
424
    // text
425
    if (cap = this.rules.text.exec(src)) {
426
      // Top-level should never reach here.
427
      src = src.substring(cap[0].length);
428
      this.tokens.push({
429
        type: 'text',
430
        text: cap[0]
431
      });
432
      continue;
433
    }
434
435
    if (src) {
436
      throw new
437
        Error('Infinite loop on byte: ' + src.charCodeAt(0));
438
    }
439
  }
440
441
  return this.tokens;
442
};
443
444
/**
445
 * Inline-Level Grammar
446
 */
447
448
var inline = {
449
  escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,
450
  autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,
451
  url: noop,
452
  tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
453
  link: /^!?\[(inside)\]\(href\)/,
454
  reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,
455
  nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,
456
  strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,
457
  em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
458
  code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,
459
  br: /^ {2,}\n(?!\s*$)/,
460
  del: noop,
461
  text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/
462
};
463
464
inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;
465
inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;
466
467
inline.link = replace(inline.link)
468
  ('inside', inline._inside)
469
  ('href', inline._href)
470
  ();
471
472
inline.reflink = replace(inline.reflink)
473
  ('inside', inline._inside)
474
  ();
475
476
/**
477
 * Normal Inline Grammar
478
 */
479
480
inline.normal = merge({}, inline);
481
482
/**
483
 * Pedantic Inline Grammar
484
 */
485
486
inline.pedantic = merge({}, inline.normal, {
487
  strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
488
  em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/
489
});
490
491
/**
492
 * GFM Inline Grammar
493
 */
494
495
inline.gfm = merge({}, inline.normal, {
496
  escape: replace(inline.escape)('])', '~|])')(),
497
  url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,
498
  del: /^~~(?=\S)([\s\S]*?\S)~~/,
499
  text: replace(inline.text)
500
    (']|', '~]|')
501
    ('|', '|https?://|')
502
    ()
503
});
504
505
/**
506
 * GFM + Line Breaks Inline Grammar
507
 */
508
509
inline.breaks = merge({}, inline.gfm, {
510
  br: replace(inline.br)('{2,}', '*')(),
511
  text: replace(inline.gfm.text)('{2,}', '*')()
512
});
513
514
/**
515
 * Inline Lexer & Compiler
516
 */
517
518
function InlineLexer(links, options) {
519
  this.options = options || marked.defaults;
520
  this.links = links;
521
  this.rules = inline.normal;
522
  this.renderer = this.options.renderer || new Renderer;
523
  this.renderer.options = this.options;
524
525
  if (!this.links) {
526
    throw new
527
      Error('Tokens array requires a `links` property.');
528
  }
529
530
  if (this.options.gfm) {
531
    if (this.options.breaks) {
532
      this.rules = inline.breaks;
533
    } else {
534
      this.rules = inline.gfm;
535
    }
536
  } else if (this.options.pedantic) {
537
    this.rules = inline.pedantic;
538
  }
539
}
540
541
/**
542
 * Expose Inline Rules
543
 */
544
545
InlineLexer.rules = inline;
546
547
/**
548
 * Static Lexing/Compiling Method
549
 */
550
551
InlineLexer.output = function(src, links, options) {
552
  var inline = new InlineLexer(links, options);
553
  return inline.output(src);
554
};
555
556
/**
557
 * Lexing/Compiling
558
 */
559
560
InlineLexer.prototype.output = function(src) {
561
  var out = ''
562
    , link
563
    , text
564
    , href
565
    , cap;
566
567
  while (src) {
568
    // escape
569
    if (cap = this.rules.escape.exec(src)) {
570
      src = src.substring(cap[0].length);
571
      out += cap[1];
572
      continue;
573
    }
574
575
    // autolink
576
    if (cap = this.rules.autolink.exec(src)) {
577
      src = src.substring(cap[0].length);
578
      if (cap[2] === '@') {
579
        text = cap[1].charAt(6) === ':'
580
          ? this.mangle(cap[1].substring(7))
581
          : this.mangle(cap[1]);
582
        href = this.mangle('mailto:') + text;
583
      } else {
584
        text = escape(cap[1]);
585
        href = text;
586
      }
587
      out += this.renderer.link(href, null, text);
588
      continue;
589
    }
590
591
    // url (gfm)
592
    if (!this.inLink && (cap = this.rules.url.exec(src))) {
593
      src = src.substring(cap[0].length);
594
      text = escape(cap[1]);
595
      href = text;
596
      out += this.renderer.link(href, null, text);
597
      continue;
598
    }
599
600
    // tag
601
    if (cap = this.rules.tag.exec(src)) {
602
      if (!this.inLink && /^<a /i.test(cap[0])) {
603
        this.inLink = true;
604
      } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
605
        this.inLink = false;
606
      }
607
      src = src.substring(cap[0].length);
608
      out += this.options.sanitize
609
        ? escape(cap[0])
610
        : cap[0];
611
      continue;
612
    }
613
614
    // link
615
    if (cap = this.rules.link.exec(src)) {
616
      src = src.substring(cap[0].length);
617
      this.inLink = true;
618
      out += this.outputLink(cap, {
619
        href: cap[2],
620
        title: cap[3]
621
      });
622
      this.inLink = false;
623
      continue;
624
    }
625
626
    // reflink, nolink
627
    if ((cap = this.rules.reflink.exec(src))
628
        || (cap = this.rules.nolink.exec(src))) {
629
      src = src.substring(cap[0].length);
630
      link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
631
      link = this.links[link.toLowerCase()];
632
      if (!link || !link.href) {
633
        out += cap[0].charAt(0);
634
        src = cap[0].substring(1) + src;
635
        continue;
636
      }
637
      this.inLink = true;
638
      out += this.outputLink(cap, link);
639
      this.inLink = false;
640
      continue;
641
    }
642
643
    // strong
644
    if (cap = this.rules.strong.exec(src)) {
645
      src = src.substring(cap[0].length);
646
      out += this.renderer.strong(this.output(cap[2] || cap[1]));
647
      continue;
648
    }
649
650
    // em
651
    if (cap = this.rules.em.exec(src)) {
652
      src = src.substring(cap[0].length);
653
      out += this.renderer.em(this.output(cap[2] || cap[1]));
654
      continue;
655
    }
656
657
    // code
658
    if (cap = this.rules.code.exec(src)) {
659
      src = src.substring(cap[0].length);
660
      out += this.renderer.codespan(escape(cap[2], true));
661
      continue;
662
    }
663
664
    // br
665
    if (cap = this.rules.br.exec(src)) {
666
      src = src.substring(cap[0].length);
667
      out += this.renderer.br();
668
      continue;
669
    }
670
671
    // del (gfm)
672
    if (cap = this.rules.del.exec(src)) {
673
      src = src.substring(cap[0].length);
674
      out += this.renderer.del(this.output(cap[1]));
675
      continue;
676
    }
677
678
    // text
679
    if (cap = this.rules.text.exec(src)) {
680
      src = src.substring(cap[0].length);
681
      out += escape(this.smartypants(cap[0]));
682
      continue;
683
    }
684
685
    if (src) {
686
      throw new
687
        Error('Infinite loop on byte: ' + src.charCodeAt(0));
688
    }
689
  }
690
691
  return out;
692
};
693
694
/**
695
 * Compile Link
696
 */
697
698
InlineLexer.prototype.outputLink = function(cap, link) {
699
  var href = escape(link.href)
700
    , title = link.title ? escape(link.title) : null;
701
702
  return cap[0].charAt(0) !== '!'
703
    ? this.renderer.link(href, title, this.output(cap[1]))
704
    : this.renderer.image(href, title, escape(cap[1]));
705
};
706
707
/**
708
 * Smartypants Transformations
709
 */
710
711
InlineLexer.prototype.smartypants = function(text) {
712
  if (!this.options.smartypants) return text;
713
  return text
714
    // em-dashes
715
    .replace(/--/g, '\u2014')
716
    // opening singles
717
    .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
718
    // closing singles & apostrophes
719
    .replace(/'/g, '\u2019')
720
    // opening doubles
721
    .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
722
    // closing doubles
723
    .replace(/"/g, '\u201d')
724
    // ellipses
725
    .replace(/\.{3}/g, '\u2026');
726
};
727
728
/**
729
 * Mangle Links
730
 */
731
732
InlineLexer.prototype.mangle = function(text) {
733
  var out = ''
734
    , l = text.length
735
    , i = 0
736
    , ch;
737
738
  for (; i < l; i++) {
739
    ch = text.charCodeAt(i);
740
    if (Math.random() > 0.5) {
741
      ch = 'x' + ch.toString(16);
742
    }
743
    out += '&#' + ch + ';';
744
  }
745
746
  return out;
747
};
748
749
/**
750
 * Renderer
751
 */
752
753
function Renderer(options) {
754
  this.options = options || {};
755
}
756
757
Renderer.prototype.code = function(code, lang, escaped) {
758
  if (this.options.highlight) {
759
    var out = this.options.highlight(code, lang);
760
    if (out != null && out !== code) {
761
      escaped = true;
762
      code = out;
763
    }
764
  }
765
766
  if (!lang) {
767
    return '<pre><code>'
768
      + (escaped ? code : escape(code, true))
769
      + '\n</code></pre>';
770
  }
771
772
  return '<pre><code class="'
773
    + this.options.langPrefix
774
    + escape(lang, true)
775
    + '">'
776
    + (escaped ? code : escape(code, true))
777
    + '\n</code></pre>\n';
778
};
779
780
Renderer.prototype.blockquote = function(quote) {
781
  return '<blockquote>\n' + quote + '</blockquote>\n';
782
};
783
784
Renderer.prototype.html = function(html) {
785
  return html;
786
};
787
788
Renderer.prototype.heading = function(text, level, raw) {
789
  return '<h'
790
    + level
791
    + ' id="'
792
    + this.options.headerPrefix
793
    + raw.toLowerCase().replace(/[^\w]+/g, '-')
794
    + '">'
795
    + text
796
    + '</h'
797
    + level
798
    + '>\n';
799
};
800
801
Renderer.prototype.hr = function() {
802
  return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
803
};
804
805
Renderer.prototype.list = function(body, ordered) {
806
  var type = ordered ? 'ol' : 'ul';
807
  return '<' + type + '>\n' + body + '</' + type + '>\n';
808
};
809
810
Renderer.prototype.listitem = function(text) {
811
  return '<li>' + text + '</li>\n';
812
};
813
814
Renderer.prototype.paragraph = function(text) {
815
  return '<p>' + text + '</p>\n';
816
};
817
818
Renderer.prototype.table = function(header, body) {
819
  return '<table>\n'
820
    + '<thead>\n'
821
    + header
822
    + '</thead>\n'
823
    + '<tbody>\n'
824
    + body
825
    + '</tbody>\n'
826
    + '</table>\n';
827
};
828
829
Renderer.prototype.tablerow = function(content) {
830
  return '<tr>\n' + content + '</tr>\n';
831
};
832
833
Renderer.prototype.tablecell = function(content, flags) {
834
  var type = flags.header ? 'th' : 'td';
835
  var tag = flags.align
836
    ? '<' + type + ' style="text-align:' + flags.align + '">'
837
    : '<' + type + '>';
838
  return tag + content + '</' + type + '>\n';
839
};
840
841
// span level renderer
842
Renderer.prototype.strong = function(text) {
843
  return '<strong>' + text + '</strong>';
844
};
845
846
Renderer.prototype.em = function(text) {
847
  return '<em>' + text + '</em>';
848
};
849
850
Renderer.prototype.codespan = function(text) {
851
  return '<code>' + text + '</code>';
852
};
853
854
Renderer.prototype.br = function() {
855
  return this.options.xhtml ? '<br/>' : '<br>';
856
};
857
858
Renderer.prototype.del = function(text) {
859
  return '<del>' + text + '</del>';
860
};
861
862
Renderer.prototype.link = function(href, title, text) {
863
  if (this.options.sanitize) {
864
    try {
865
      var prot = decodeURIComponent(unescape(href))
866
        .replace(/[^\w:]/g, '')
867
        .toLowerCase();
868
    } catch (e) {
869
      return '';
870
    }
871
    if (prot.indexOf('javascript:') === 0) {
872
      return '';
873
    }
874
  }
875
  var out = '<a href="' + href + '"';
876
  if (title) {
877
    out += ' title="' + title + '"';
878
  }
879
  out += '>' + text + '</a>';
880
  return out;
881
};
882
883
Renderer.prototype.image = function(href, title, text) {
884
  var out = '<img src="' + href + '" alt="' + text + '"';
885
  if (title) {
886
    out += ' title="' + title + '"';
887
  }
888
  out += this.options.xhtml ? '/>' : '>';
889
  return out;
890
};
891
892
/**
893
 * Parsing & Compiling
894
 */
895
896
function Parser(options) {
897
  this.tokens = [];
898
  this.token = null;
899
  this.options = options || marked.defaults;
900
  this.options.renderer = this.options.renderer || new Renderer;
901
  this.renderer = this.options.renderer;
902
  this.renderer.options = this.options;
903
}
904
905
/**
906
 * Static Parse Method
907
 */
908
909
Parser.parse = function(src, options, renderer) {
910
  var parser = new Parser(options, renderer);
911
  return parser.parse(src);
912
};
913
914
/**
915
 * Parse Loop
916
 */
917
918
Parser.prototype.parse = function(src) {
919
  this.inline = new InlineLexer(src.links, this.options, this.renderer);
920
  this.tokens = src.reverse();
921
922
  var out = '';
923
  while (this.next()) {
924
    out += this.tok();
925
  }
926
927
  return out;
928
};
929
930
/**
931
 * Next Token
932
 */
933
934
Parser.prototype.next = function() {
935
  return this.token = this.tokens.pop();
936
};
937
938
/**
939
 * Preview Next Token
940
 */
941
942
Parser.prototype.peek = function() {
943
  return this.tokens[this.tokens.length - 1] || 0;
944
};
945
946
/**
947
 * Parse Text Tokens
948
 */
949
950
Parser.prototype.parseText = function() {
951
  var body = this.token.text;
952
953
  while (this.peek().type === 'text') {
954
    body += '\n' + this.next().text;
955
  }
956
957
  return this.inline.output(body);
958
};
959
960
/**
961
 * Parse Current Token
962
 */
963
964
Parser.prototype.tok = function() {
965
  switch (this.token.type) {
966
    case 'space': {
967
      return '';
968
    }
969
    case 'hr': {
970
      return this.renderer.hr();
971
    }
972
    case 'heading': {
973
      return this.renderer.heading(
974
        this.inline.output(this.token.text),
975
        this.token.depth,
976
        this.token.text);
977
    }
978
    case 'code': {
979
      return this.renderer.code(this.token.text,
980
        this.token.lang,
981
        this.token.escaped);
982
    }
983
    case 'table': {
984
      var header = ''
985
        , body = ''
986
        , i
987
        , row
988
        , cell
989
        , flags
990
        , j;
991
992
      // header
993
      cell = '';
994
      for (i = 0; i < this.token.header.length; i++) {
995
        flags = { header: true, align: this.token.align[i] };
996
        cell += this.renderer.tablecell(
997
          this.inline.output(this.token.header[i]),
998
          { header: true, align: this.token.align[i] }
999
        );
1000
      }
1001
      header += this.renderer.tablerow(cell);
1002
1003
      for (i = 0; i < this.token.cells.length; i++) {
1004
        row = this.token.cells[i];
1005
1006
        cell = '';
1007
        for (j = 0; j < row.length; j++) {
1008
          cell += this.renderer.tablecell(
1009
            this.inline.output(row[j]),
1010
            { header: false, align: this.token.align[j] }
1011
          );
1012
        }
1013
1014
        body += this.renderer.tablerow(cell);
1015
      }
1016
      return this.renderer.table(header, body);
1017
    }
1018
    case 'blockquote_start': {
1019
      var body = '';
1020
1021
      while (this.next().type !== 'blockquote_end') {
1022
        body += this.tok();
1023
      }
1024
1025
      return this.renderer.blockquote(body);
1026
    }
1027
    case 'list_start': {
1028
      var body = ''
1029
        , ordered = this.token.ordered;
1030
1031
      while (this.next().type !== 'list_end') {
1032
        body += this.tok();
1033
      }
1034
1035
      return this.renderer.list(body, ordered);
1036
    }
1037
    case 'list_item_start': {
1038
      var body = '';
1039
1040
      while (this.next().type !== 'list_item_end') {
1041
        body += this.token.type === 'text'
1042
          ? this.parseText()
1043
          : this.tok();
1044
      }
1045
1046
      return this.renderer.listitem(body);
1047
    }
1048
    case 'loose_item_start': {
1049
      var body = '';
1050
1051
      while (this.next().type !== 'list_item_end') {
1052
        body += this.tok();
1053
      }
1054
1055
      return this.renderer.listitem(body);
1056
    }
1057
    case 'html': {
1058
      var html = !this.token.pre && !this.options.pedantic
1059
        ? this.inline.output(this.token.text)
1060
        : this.token.text;
1061
      return this.renderer.html(html);
1062
    }
1063
    case 'paragraph': {
1064
      return this.renderer.paragraph(this.inline.output(this.token.text));
1065
    }
1066
    case 'text': {
1067
      return this.renderer.paragraph(this.parseText());
1068
    }
1069
  }
1070
};
1071
1072
/**
1073
 * Helpers
1074
 */
1075
1076
function escape(html, encode) {
1077
  return html
1078
    .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
1079
    .replace(/</g, '&lt;')
1080
    .replace(/>/g, '&gt;')
1081
    .replace(/"/g, '&quot;')
1082
    .replace(/'/g, '&#39;');
1083
}
1084
1085
function unescape(html) {
1086
  return html.replace(/&([#\w]+);/g, function(_, n) {
1087
    n = n.toLowerCase();
1088
    if (n === 'colon') return ':';
1089
    if (n.charAt(0) === '#') {
1090
      return n.charAt(1) === 'x'
1091
        ? String.fromCharCode(parseInt(n.substring(2), 16))
1092
        : String.fromCharCode(+n.substring(1));
1093
    }
1094
    return '';
1095
  });
1096
}
1097
1098
function replace(regex, opt) {
1099
  regex = regex.source;
1100
  opt = opt || '';
1101
  return function self(name, val) {
1102
    if (!name) return new RegExp(regex, opt);
1103
    val = val.source || val;
1104
    val = val.replace(/(^|[^\[])\^/g, '$1');
1105
    regex = regex.replace(name, val);
1106
    return self;
1107
  };
1108
}
1109
1110
function noop() {}
1111
noop.exec = noop;
1112
1113
function merge(obj) {
1114
  var i = 1
1115
    , target
1116
    , key;
1117
1118
  for (; i < arguments.length; i++) {
1119
    target = arguments[i];
1120
    for (key in target) {
1121
      if (Object.prototype.hasOwnProperty.call(target, key)) {
1122
        obj[key] = target[key];
1123
      }
1124
    }
1125
  }
1126
1127
  return obj;
1128
}
1129
1130
1131
/**
1132
 * Marked
1133
 */
1134
1135
function marked(src, opt, callback) {
1136
  if (callback || typeof opt === 'function') {
1137
    if (!callback) {
1138
      callback = opt;
1139
      opt = null;
1140
    }
1141
1142
    opt = merge({}, marked.defaults, opt || {});
1143
1144
    var highlight = opt.highlight
1145
      , tokens
1146
      , pending
1147
      , i = 0;
1148
1149
    try {
1150
      tokens = Lexer.lex(src, opt)
1151
    } catch (e) {
1152
      return callback(e);
1153
    }
1154
1155
    pending = tokens.length;
1156
1157
    var done = function(err) {
1158
      if (err) {
1159
        opt.highlight = highlight;
1160
        return callback(err);
1161
      }
1162
1163
      var out;
1164
1165
      try {
1166
        out = Parser.parse(tokens, opt);
1167
      } catch (e) {
1168
        err = e;
1169
      }
1170
1171
      opt.highlight = highlight;
1172
1173
      return err
1174
        ? callback(err)
1175
        : callback(null, out);
1176
    };
1177
1178
    if (!highlight || highlight.length < 3) {
1179
      return done();
1180
    }
1181
1182
    delete opt.highlight;
1183
1184
    if (!pending) return done();
1185
1186
    for (; i < tokens.length; i++) {
1187
      (function(token) {
1188
        if (token.type !== 'code') {
1189
          return --pending || done();
1190
        }
1191
        return highlight(token.text, token.lang, function(err, code) {
1192
          if (err) return done(err);
1193
          if (code == null || code === token.text) {
1194
            return --pending || done();
1195
          }
1196
          token.text = code;
1197
          token.escaped = true;
1198
          --pending || done();
1199
        });
1200
      })(tokens[i]);
1201
    }
1202
1203
    return;
1204
  }
1205
  try {
1206
    if (opt) opt = merge({}, marked.defaults, opt);
1207
    return Parser.parse(Lexer.lex(src, opt), opt);
1208
  } catch (e) {
1209
    e.message += '\nPlease report this to https://github.com/chjj/marked.';
1210
    if ((opt || marked.defaults).silent) {
1211
      return '<p>An error occured:</p><pre>'
1212
        + escape(e.message + '', true)
1213
        + '</pre>';
1214
    }
1215
    throw e;
1216
  }
1217
}
1218
1219
/**
1220
 * Options
1221
 */
1222
1223
marked.options =
1224
marked.setOptions = function(opt) {
1225
  merge(marked.defaults, opt);
1226
  return marked;
1227
};
1228
1229
marked.defaults = {
1230
  gfm: true,
1231
  tables: true,
1232
  breaks: false,
1233
  pedantic: false,
1234
  sanitize: false,
1235
  smartLists: false,
1236
  silent: false,
1237
  highlight: null,
1238
  langPrefix: 'lang-',
1239
  smartypants: false,
1240
  headerPrefix: '',
1241
  renderer: new Renderer,
1242
  xhtml: false
1243
};
1244
1245
/**
1246
 * Expose
1247
 */
1248
1249
marked.Parser = Parser;
1250
marked.parser = Parser.parse;
1251
1252
marked.Renderer = Renderer;
1253
1254
marked.Lexer = Lexer;
1255
marked.lexer = Lexer.lex;
1256
1257
marked.InlineLexer = InlineLexer;
1258
marked.inlineLexer = InlineLexer.output;
1259
1260
marked.parse = marked;
1261
1262
if (typeof module !== 'undefined' && typeof exports === 'object') {
1263
  module.exports = marked;
1264
} else if (typeof define === 'function' && define.amd) {
1265
  define(function() { return marked; });
1266
} else {
1267
  this.marked = marked;
1268
}
1269
1270
}).call(function() {
1271
  return this || (typeof window !== 'undefined' ? window : global);
1272
}());
(-)a/api/v1/doc/lib/shred.bundle.js (+2765 lines)
Line 0 Link Here
1
var require = function (file, cwd) {
2
    var resolved = require.resolve(file, cwd || '/');
3
    var mod = require.modules[resolved];
4
    if (!mod) throw new Error(
5
        'Failed to resolve module ' + file + ', tried ' + resolved
6
    );
7
    var res = mod._cached ? mod._cached : mod();
8
    return res;
9
}
10
11
require.paths = [];
12
require.modules = {};
13
require.extensions = [".js",".coffee"];
14
15
require._core = {
16
    'assert': true,
17
    'events': true,
18
    'fs': true,
19
    'path': true,
20
    'vm': true
21
};
22
23
require.resolve = (function () {
24
    return function (x, cwd) {
25
        if (!cwd) cwd = '/';
26
27
        if (require._core[x]) return x;
28
        var path = require.modules.path();
29
        var y = cwd || '.';
30
31
        if (x.match(/^(?:\.\.?\/|\/)/)) {
32
            var m = loadAsFileSync(path.resolve(y, x))
33
                || loadAsDirectorySync(path.resolve(y, x));
34
            if (m) return m;
35
        }
36
37
        var n = loadNodeModulesSync(x, y);
38
        if (n) return n;
39
40
        throw new Error("Cannot find module '" + x + "'");
41
42
        function loadAsFileSync (x) {
43
            if (require.modules[x]) {
44
                return x;
45
            }
46
47
            for (var i = 0; i < require.extensions.length; i++) {
48
                var ext = require.extensions[i];
49
                if (require.modules[x + ext]) return x + ext;
50
            }
51
        }
52
53
        function loadAsDirectorySync (x) {
54
            x = x.replace(/\/+$/, '');
55
            var pkgfile = x + '/package.json';
56
            if (require.modules[pkgfile]) {
57
                var pkg = require.modules[pkgfile]();
58
                var b = pkg.browserify;
59
                if (typeof b === 'object' && b.main) {
60
                    var m = loadAsFileSync(path.resolve(x, b.main));
61
                    if (m) return m;
62
                }
63
                else if (typeof b === 'string') {
64
                    var m = loadAsFileSync(path.resolve(x, b));
65
                    if (m) return m;
66
                }
67
                else if (pkg.main) {
68
                    var m = loadAsFileSync(path.resolve(x, pkg.main));
69
                    if (m) return m;
70
                }
71
            }
72
73
            return loadAsFileSync(x + '/index');
74
        }
75
76
        function loadNodeModulesSync (x, start) {
77
            var dirs = nodeModulesPathsSync(start);
78
            for (var i = 0; i < dirs.length; i++) {
79
                var dir = dirs[i];
80
                var m = loadAsFileSync(dir + '/' + x);
81
                if (m) return m;
82
                var n = loadAsDirectorySync(dir + '/' + x);
83
                if (n) return n;
84
            }
85
86
            var m = loadAsFileSync(x);
87
            if (m) return m;
88
        }
89
90
        function nodeModulesPathsSync (start) {
91
            var parts;
92
            if (start === '/') parts = [ '' ];
93
            else parts = path.normalize(start).split('/');
94
95
            var dirs = [];
96
            for (var i = parts.length - 1; i >= 0; i--) {
97
                if (parts[i] === 'node_modules') continue;
98
                var dir = parts.slice(0, i + 1).join('/') + '/node_modules';
99
                dirs.push(dir);
100
            }
101
102
            return dirs;
103
        }
104
    };
105
})();
106
107
require.alias = function (from, to) {
108
    var path = require.modules.path();
109
    var res = null;
110
    try {
111
        res = require.resolve(from + '/package.json', '/');
112
    }
113
    catch (err) {
114
        res = require.resolve(from, '/');
115
    }
116
    var basedir = path.dirname(res);
117
118
    var keys = (Object.keys || function (obj) {
119
        var res = [];
120
        for (var key in obj) res.push(key)
121
        return res;
122
    })(require.modules);
123
124
    for (var i = 0; i < keys.length; i++) {
125
        var key = keys[i];
126
        if (key.slice(0, basedir.length + 1) === basedir + '/') {
127
            var f = key.slice(basedir.length);
128
            require.modules[to + f] = require.modules[basedir + f];
129
        }
130
        else if (key === basedir) {
131
            require.modules[to] = require.modules[basedir];
132
        }
133
    }
134
};
135
136
require.define = function (filename, fn) {
137
    var dirname = require._core[filename]
138
        ? ''
139
        : require.modules.path().dirname(filename)
140
    ;
141
142
    var require_ = function (file) {
143
        return require(file, dirname)
144
    };
145
    require_.resolve = function (name) {
146
        return require.resolve(name, dirname);
147
    };
148
    require_.modules = require.modules;
149
    require_.define = require.define;
150
    var module_ = { exports : {} };
151
152
    require.modules[filename] = function () {
153
        require.modules[filename]._cached = module_.exports;
154
        fn.call(
155
            module_.exports,
156
            require_,
157
            module_,
158
            module_.exports,
159
            dirname,
160
            filename
161
        );
162
        require.modules[filename]._cached = module_.exports;
163
        return module_.exports;
164
    };
165
};
166
167
if (typeof process === 'undefined') process = {};
168
169
if (!process.nextTick) process.nextTick = (function () {
170
    var queue = [];
171
    var canPost = typeof window !== 'undefined'
172
        && window.postMessage && window.addEventListener
173
    ;
174
175
    if (canPost) {
176
        window.addEventListener('message', function (ev) {
177
            if (ev.source === window && ev.data === 'browserify-tick') {
178
                ev.stopPropagation();
179
                if (queue.length > 0) {
180
                    var fn = queue.shift();
181
                    fn();
182
                }
183
            }
184
        }, true);
185
    }
186
187
    return function (fn) {
188
        if (canPost) {
189
            queue.push(fn);
190
            window.postMessage('browserify-tick', '*');
191
        }
192
        else setTimeout(fn, 0);
193
    };
194
})();
195
196
if (!process.title) process.title = 'browser';
197
198
if (!process.binding) process.binding = function (name) {
199
    if (name === 'evals') return require('vm')
200
    else throw new Error('No such module')
201
};
202
203
if (!process.cwd) process.cwd = function () { return '.' };
204
205
require.define("path", function (require, module, exports, __dirname, __filename) {
206
    function filter (xs, fn) {
207
    var res = [];
208
    for (var i = 0; i < xs.length; i++) {
209
        if (fn(xs[i], i, xs)) res.push(xs[i]);
210
    }
211
    return res;
212
}
213
214
// resolves . and .. elements in a path array with directory names there
215
// must be no slashes, empty elements, or device names (c:\) in the array
216
// (so also no leading and trailing slashes - it does not distinguish
217
// relative and absolute paths)
218
function normalizeArray(parts, allowAboveRoot) {
219
  // if the path tries to go above the root, `up` ends up > 0
220
  var up = 0;
221
  for (var i = parts.length; i >= 0; i--) {
222
    var last = parts[i];
223
    if (last == '.') {
224
      parts.splice(i, 1);
225
    } else if (last === '..') {
226
      parts.splice(i, 1);
227
      up++;
228
    } else if (up) {
229
      parts.splice(i, 1);
230
      up--;
231
    }
232
  }
233
234
  // if the path is allowed to go above the root, restore leading ..s
235
  if (allowAboveRoot) {
236
    for (; up--; up) {
237
      parts.unshift('..');
238
    }
239
  }
240
241
  return parts;
242
}
243
244
// Regex to split a filename into [*, dir, basename, ext]
245
// posix version
246
var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;
247
248
// path.resolve([from ...], to)
249
// posix version
250
exports.resolve = function() {
251
var resolvedPath = '',
252
    resolvedAbsolute = false;
253
254
for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) {
255
  var path = (i >= 0)
256
      ? arguments[i]
257
      : process.cwd();
258
259
  // Skip empty and invalid entries
260
  if (typeof path !== 'string' || !path) {
261
    continue;
262
  }
263
264
  resolvedPath = path + '/' + resolvedPath;
265
  resolvedAbsolute = path.charAt(0) === '/';
266
}
267
268
// At this point the path should be resolved to a full absolute path, but
269
// handle relative paths to be safe (might happen when process.cwd() fails)
270
271
// Normalize the path
272
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
273
    return !!p;
274
  }), !resolvedAbsolute).join('/');
275
276
  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
277
};
278
279
// path.normalize(path)
280
// posix version
281
exports.normalize = function(path) {
282
var isAbsolute = path.charAt(0) === '/',
283
    trailingSlash = path.slice(-1) === '/';
284
285
// Normalize the path
286
path = normalizeArray(filter(path.split('/'), function(p) {
287
    return !!p;
288
  }), !isAbsolute).join('/');
289
290
  if (!path && !isAbsolute) {
291
    path = '.';
292
  }
293
  if (path && trailingSlash) {
294
    path += '/';
295
  }
296
297
  return (isAbsolute ? '/' : '') + path;
298
};
299
300
301
// posix version
302
exports.join = function() {
303
  var paths = Array.prototype.slice.call(arguments, 0);
304
  return exports.normalize(filter(paths, function(p, index) {
305
    return p && typeof p === 'string';
306
  }).join('/'));
307
};
308
309
310
exports.dirname = function(path) {
311
  var dir = splitPathRe.exec(path)[1] || '';
312
  var isWindows = false;
313
  if (!dir) {
314
    // No dirname
315
    return '.';
316
  } else if (dir.length === 1 ||
317
      (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) {
318
    // It is just a slash or a drive letter with a slash
319
    return dir;
320
  } else {
321
    // It is a full dirname, strip trailing slash
322
    return dir.substring(0, dir.length - 1);
323
  }
324
};
325
326
327
exports.basename = function(path, ext) {
328
  var f = splitPathRe.exec(path)[2] || '';
329
  // TODO: make this comparison case-insensitive on windows?
330
  if (ext && f.substr(-1 * ext.length) === ext) {
331
    f = f.substr(0, f.length - ext.length);
332
  }
333
  return f;
334
};
335
336
337
exports.extname = function(path) {
338
  return splitPathRe.exec(path)[3] || '';
339
};
340
341
});
342
343
require.define("/shred.js", function (require, module, exports, __dirname, __filename) {
344
    // Shred is an HTTP client library intended to simplify the use of Node's
345
// built-in HTTP library. In particular, we wanted to make it easier to interact
346
// with HTTP-based APIs.
347
//
348
// See the [examples](./examples.html) for more details.
349
350
// Ax is a nice logging library we wrote. You can use any logger, providing it
351
// has `info`, `warn`, `debug`, and `error` methods that take a string.
352
var Ax = require("ax")
353
  , CookieJarLib = require( "cookiejar" )
354
  , CookieJar = CookieJarLib.CookieJar
355
;
356
357
// Shred takes some options, including a logger and request defaults.
358
359
var Shred = function(options) {
360
  options = (options||{});
361
  this.agent = options.agent;
362
  this.defaults = options.defaults||{};
363
  this.log = options.logger||(new Ax({ level: "info" }));
364
  this._sharedCookieJar = new CookieJar();
365
  this.logCurl = options.logCurl || false;
366
};
367
368
// Most of the real work is done in the request and reponse classes.
369
370
Shred.Request = require("./shred/request");
371
Shred.Response = require("./shred/response");
372
373
// The `request` method kicks off a new request, instantiating a new `Request`
374
// object and passing along whatever default options we were given.
375
376
Shred.prototype = {
377
  request: function(options) {
378
    options.logger = this.log;
379
    options.logCurl = options.logCurl || this.logCurl;
380
    options.cookieJar = ( 'cookieJar' in options ) ? options.cookieJar : this._sharedCookieJar; // let them set cookieJar = null
381
    options.agent = options.agent || this.agent;
382
    // fill in default options
383
    for (var key in this.defaults) {
384
      if (this.defaults.hasOwnProperty(key) && !options[key]) {
385
        options[key] = this.defaults[key]
386
      }
387
    }
388
    return new Shred.Request(options);
389
  }
390
};
391
392
// Define a bunch of convenience methods so that you don't have to include
393
// a `method` property in your request options.
394
395
"get put post delete".split(" ").forEach(function(method) {
396
  Shred.prototype[method] = function(options) {
397
    options.method = method;
398
    return this.request(options);
399
  };
400
});
401
402
403
module.exports = Shred;
404
405
});
406
407
require.define("/node_modules/ax/package.json", function (require, module, exports, __dirname, __filename) {
408
    module.exports = {"main":"./lib/ax.js"}
409
});
410
411
require.define("/node_modules/ax/lib/ax.js", function (require, module, exports, __dirname, __filename) {
412
    var inspect = require("util").inspect
413
  , fs = require("fs")
414
;
415
416
417
// this is a quick-and-dirty logger. there are other nicer loggers out there
418
// but the ones i found were also somewhat involved. this one has a Ruby
419
// logger type interface
420
//
421
// we can easily replace this, provide the info, debug, etc. methods are the
422
// same. or, we can change Haiku to use a more standard node.js interface
423
424
var format = function(level,message) {
425
  var debug = (level=="debug"||level=="error");
426
  if (!message) { return message.toString(); }
427
  if (typeof(message) == "object") {
428
    if (message instanceof Error && debug) {
429
      return message.stack;
430
    } else {
431
      return inspect(message);
432
    }
433
  } else {
434
    return message.toString();
435
  }
436
};
437
438
var noOp = function(message) { return this; }
439
var makeLogger = function(level,fn) {
440
  return function(message) {
441
    this.stream.write(this.format(level, message)+"\n");
442
    return this;
443
  }
444
};
445
446
var Logger = function(options) {
447
  var logger = this;
448
  var options = options||{};
449
450
  // Default options
451
  options.level = options.level || "info";
452
  options.timestamp = options.timestamp || true;
453
  options.prefix = options.prefix || "";
454
  logger.options = options;
455
456
  // Allows a prefix to be added to the message.
457
  //
458
  //    var logger = new Ax({ module: 'Haiku' })
459
  //    logger.warn('this is going to be awesome!');
460
  //    //=> Haiku: this is going to be awesome!
461
  //
462
  if (logger.options.module){
463
    logger.options.prefix = logger.options.module;
464
  }
465
466
  // Write to stderr or a file
467
  if (logger.options.file){
468
    logger.stream = fs.createWriteStream(logger.options.file, {"flags": "a"});
469
  } else {
470
      if(process.title === "node")
471
    logger.stream = process.stderr;
472
      else if(process.title === "browser")
473
    logger.stream = function () {
474
      // Work around weird console context issue: http://code.google.com/p/chromium/issues/detail?id=48662
475
      return console[logger.options.level].apply(console, arguments);
476
    };
477
  }
478
479
  switch(logger.options.level){
480
    case 'debug':
481
      ['debug', 'info', 'warn'].forEach(function (level) {
482
        logger[level] = Logger.writer(level);
483
      });
484
    case 'info':
485
      ['info', 'warn'].forEach(function (level) {
486
        logger[level] = Logger.writer(level);
487
      });
488
    case 'warn':
489
      logger.warn = Logger.writer('warn');
490
  }
491
}
492
493
// Used to define logger methods
494
Logger.writer = function(level){
495
  return function(message){
496
    var logger = this;
497
498
    if(process.title === "node")
499
  logger.stream.write(logger.format(level, message) + '\n');
500
    else if(process.title === "browser")
501
  logger.stream(logger.format(level, message) + '\n');
502
503
  };
504
}
505
506
507
Logger.prototype = {
508
  info: function(){},
509
  debug: function(){},
510
  warn: function(){},
511
  error: Logger.writer('error'),
512
  format: function(level, message){
513
    if (! message) return '';
514
515
    var logger = this
516
      , prefix = logger.options.prefix
517
      , timestamp = logger.options.timestamp ? " " + (new Date().toISOString()) : ""
518
    ;
519
520
    return (prefix + timestamp + ": " + message);
521
  }
522
};
523
524
module.exports = Logger;
525
526
});
527
528
require.define("util", function (require, module, exports, __dirname, __filename) {
529
    // todo
530
531
});
532
533
require.define("fs", function (require, module, exports, __dirname, __filename) {
534
    // nothing to see here... no file methods for the browser
535
536
});
537
538
require.define("/node_modules/cookiejar/package.json", function (require, module, exports, __dirname, __filename) {
539
    module.exports = {"main":"cookiejar.js"}
540
});
541
542
require.define("/node_modules/cookiejar/cookiejar.js", function (require, module, exports, __dirname, __filename) {
543
    exports.CookieAccessInfo=CookieAccessInfo=function CookieAccessInfo(domain,path,secure,script) {
544
    if(this instanceof CookieAccessInfo) {
545
      this.domain=domain||undefined;
546
      this.path=path||"/";
547
      this.secure=!!secure;
548
      this.script=!!script;
549
      return this;
550
    }
551
    else {
552
        return new CookieAccessInfo(domain,path,secure,script)
553
    }
554
}
555
556
exports.Cookie=Cookie=function Cookie(cookiestr) {
557
  if(cookiestr instanceof Cookie) {
558
    return cookiestr;
559
  }
560
    else {
561
        if(this instanceof Cookie) {
562
          this.name = null;
563
          this.value = null;
564
          this.expiration_date = Infinity;
565
          this.path = "/";
566
          this.domain = null;
567
          this.secure = false; //how to define?
568
          this.noscript = false; //httponly
569
          if(cookiestr) {
570
            this.parse(cookiestr)
571
          }
572
          return this;
573
        }
574
        return new Cookie(cookiestr)
575
    }
576
}
577
578
Cookie.prototype.toString = function toString() {
579
  var str=[this.name+"="+this.value];
580
  if(this.expiration_date !== Infinity) {
581
    str.push("expires="+(new Date(this.expiration_date)).toGMTString());
582
  }
583
  if(this.domain) {
584
    str.push("domain="+this.domain);
585
  }
586
  if(this.path) {
587
    str.push("path="+this.path);
588
  }
589
  if(this.secure) {
590
    str.push("secure");
591
  }
592
  if(this.noscript) {
593
    str.push("httponly");
594
  }
595
  return str.join("; ");
596
}
597
598
Cookie.prototype.toValueString = function toValueString() {
599
  return this.name+"="+this.value;
600
}
601
602
var cookie_str_splitter=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g
603
Cookie.prototype.parse = function parse(str) {
604
  if(this instanceof Cookie) {
605
      var parts=str.split(";")
606
      , pair=parts[0].match(/([^=]+)=((?:.|\n)*)/)
607
      , key=pair[1]
608
      , value=pair[2];
609
      this.name = key;
610
      this.value = value;
611
612
      for(var i=1;i<parts.length;i++) {
613
        pair=parts[i].match(/([^=]+)(?:=((?:.|\n)*))?/)
614
        , key=pair[1].trim().toLowerCase()
615
        , value=pair[2];
616
        switch(key) {
617
          case "httponly":
618
            this.noscript = true;
619
          break;
620
          case "expires":
621
            this.expiration_date = value
622
              ? Number(Date.parse(value))
623
              : Infinity;
624
          break;
625
          case "path":
626
            this.path = value
627
              ? value.trim()
628
              : "";
629
          break;
630
          case "domain":
631
            this.domain = value
632
              ? value.trim()
633
              : "";
634
          break;
635
          case "secure":
636
            this.secure = true;
637
          break
638
        }
639
      }
640
641
      return this;
642
  }
643
    return new Cookie().parse(str)
644
}
645
646
Cookie.prototype.matches = function matches(access_info) {
647
  if(this.noscript && access_info.script
648
  || this.secure && !access_info.secure
649
  || !this.collidesWith(access_info)) {
650
    return false
651
  }
652
  return true;
653
}
654
655
Cookie.prototype.collidesWith = function collidesWith(access_info) {
656
  if((this.path && !access_info.path) || (this.domain && !access_info.domain)) {
657
    return false
658
  }
659
  if(this.path && access_info.path.indexOf(this.path) !== 0) {
660
    return false;
661
  }
662
  if (this.domain===access_info.domain) {
663
    return true;
664
  }
665
  else if(this.domain && this.domain.charAt(0)===".")
666
  {
667
    var wildcard=access_info.domain.indexOf(this.domain.slice(1))
668
    if(wildcard===-1 || wildcard!==access_info.domain.length-this.domain.length+1) {
669
      return false;
670
    }
671
  }
672
  else if(this.domain){
673
    return false
674
  }
675
  return true;
676
}
677
678
exports.CookieJar=CookieJar=function CookieJar() {
679
  if(this instanceof CookieJar) {
680
      var cookies = {} //name: [Cookie]
681
682
      this.setCookie = function setCookie(cookie) {
683
        cookie = Cookie(cookie);
684
        //Delete the cookie if the set is past the current time
685
        var remove = cookie.expiration_date <= Date.now();
686
        if(cookie.name in cookies) {
687
          var cookies_list = cookies[cookie.name];
688
          for(var i=0;i<cookies_list.length;i++) {
689
            var collidable_cookie = cookies_list[i];
690
            if(collidable_cookie.collidesWith(cookie)) {
691
              if(remove) {
692
                cookies_list.splice(i,1);
693
                if(cookies_list.length===0) {
694
                  delete cookies[cookie.name]
695
                }
696
                return false;
697
              }
698
              else {
699
                return cookies_list[i]=cookie;
700
              }
701
            }
702
          }
703
          if(remove) {
704
            return false;
705
          }
706
          cookies_list.push(cookie);
707
          return cookie;
708
        }
709
        else if(remove){
710
          return false;
711
        }
712
        else {
713
          return cookies[cookie.name]=[cookie];
714
        }
715
      }
716
      //returns a cookie
717
      this.getCookie = function getCookie(cookie_name,access_info) {
718
        var cookies_list = cookies[cookie_name];
719
        for(var i=0;i<cookies_list.length;i++) {
720
          var cookie = cookies_list[i];
721
          if(cookie.expiration_date <= Date.now()) {
722
            if(cookies_list.length===0) {
723
              delete cookies[cookie.name]
724
            }
725
            continue;
726
          }
727
          if(cookie.matches(access_info)) {
728
            return cookie;
729
          }
730
        }
731
      }
732
      //returns a list of cookies
733
      this.getCookies = function getCookies(access_info) {
734
        var matches=[];
735
        for(var cookie_name in cookies) {
736
          var cookie=this.getCookie(cookie_name,access_info);
737
          if (cookie) {
738
            matches.push(cookie);
739
          }
740
        }
741
        matches.toString=function toString(){return matches.join(":");}
742
            matches.toValueString=function() {return matches.map(function(c){return c.toValueString();}).join(';');}
743
        return matches;
744
      }
745
746
      return this;
747
  }
748
    return new CookieJar()
749
}
750
751
752
//returns list of cookies that were set correctly
753
CookieJar.prototype.setCookies = function setCookies(cookies) {
754
  cookies=Array.isArray(cookies)
755
    ?cookies
756
    :cookies.split(cookie_str_splitter);
757
  var successful=[]
758
  for(var i=0;i<cookies.length;i++) {
759
    var cookie = Cookie(cookies[i]);
760
    if(this.setCookie(cookie)) {
761
      successful.push(cookie);
762
    }
763
  }
764
  return successful;
765
}
766
767
});
768
769
require.define("/shred/request.js", function (require, module, exports, __dirname, __filename) {
770
    // The request object encapsulates a request, creating a Node.js HTTP request and
771
// then handling the response.
772
773
var HTTP = require("http")
774
  , HTTPS = require("https")
775
  , parseUri = require("./parseUri")
776
  , Emitter = require('events').EventEmitter
777
  , sprintf = require("sprintf").sprintf
778
  , Response = require("./response")
779
  , HeaderMixins = require("./mixins/headers")
780
  , Content = require("./content")
781
;
782
783
var STATUS_CODES = HTTP.STATUS_CODES || {
784
    100 : 'Continue',
785
    101 : 'Switching Protocols',
786
    102 : 'Processing', // RFC 2518, obsoleted by RFC 4918
787
    200 : 'OK',
788
    201 : 'Created',
789
    202 : 'Accepted',
790
    203 : 'Non-Authoritative Information',
791
    204 : 'No Content',
792
    205 : 'Reset Content',
793
    206 : 'Partial Content',
794
    207 : 'Multi-Status', // RFC 4918
795
    300 : 'Multiple Choices',
796
    301 : 'Moved Permanently',
797
    302 : 'Moved Temporarily',
798
    303 : 'See Other',
799
    304 : 'Not Modified',
800
    305 : 'Use Proxy',
801
    307 : 'Temporary Redirect',
802
    400 : 'Bad Request',
803
    401 : 'Unauthorized',
804
    402 : 'Payment Required',
805
    403 : 'Forbidden',
806
    404 : 'Not Found',
807
    405 : 'Method Not Allowed',
808
    406 : 'Not Acceptable',
809
    407 : 'Proxy Authentication Required',
810
    408 : 'Request Time-out',
811
    409 : 'Conflict',
812
    410 : 'Gone',
813
    411 : 'Length Required',
814
    412 : 'Precondition Failed',
815
    413 : 'Request Entity Too Large',
816
    414 : 'Request-URI Too Large',
817
    415 : 'Unsupported Media Type',
818
    416 : 'Requested Range Not Satisfiable',
819
    417 : 'Expectation Failed',
820
    418 : 'I\'m a teapot', // RFC 2324
821
    422 : 'Unprocessable Entity', // RFC 4918
822
    423 : 'Locked', // RFC 4918
823
    424 : 'Failed Dependency', // RFC 4918
824
    425 : 'Unordered Collection', // RFC 4918
825
    426 : 'Upgrade Required', // RFC 2817
826
    500 : 'Internal Server Error',
827
    501 : 'Not Implemented',
828
    502 : 'Bad Gateway',
829
    503 : 'Service Unavailable',
830
    504 : 'Gateway Time-out',
831
    505 : 'HTTP Version not supported',
832
    506 : 'Variant Also Negotiates', // RFC 2295
833
    507 : 'Insufficient Storage', // RFC 4918
834
    509 : 'Bandwidth Limit Exceeded',
835
    510 : 'Not Extended' // RFC 2774
836
};
837
838
// The Shred object itself constructs the `Request` object. You should rarely
839
// need to do this directly.
840
841
var Request = function(options) {
842
  this.log = options.logger;
843
  this.cookieJar = options.cookieJar;
844
  this.encoding = options.encoding;
845
  this.logCurl = options.logCurl;
846
  processOptions(this,options||{});
847
  createRequest(this);
848
};
849
850
// A `Request` has a number of properties, many of which help with details like
851
// URL parsing or defaulting the port for the request.
852
853
Object.defineProperties(Request.prototype, {
854
855
// - **url**. You can set the `url` property with a valid URL string and all the
856
//   URL-related properties (host, port, etc.) will be automatically set on the
857
//   request object.
858
859
  url: {
860
    get: function() {
861
      if (!this.scheme) { return null; }
862
      return sprintf("%s://%s:%s%s",
863
          this.scheme, this.host, this.port,
864
          (this.proxy ? "/" : this.path) +
865
          (this.query ? ("?" + this.query) : ""));
866
    },
867
    set: function(_url) {
868
      _url = parseUri(_url);
869
      this.scheme = _url.protocol;
870
      this.host = _url.host;
871
      this.port = _url.port;
872
      this.path = _url.path;
873
      this.query = _url.query;
874
      return this;
875
    },
876
    enumerable: true
877
  },
878
879
// - **headers**. Returns a hash representing the request headers. You can't set
880
//   this directly, only get it. You can add or modify headers by using the
881
//   `setHeader` or `setHeaders` method. This ensures that the headers are
882
//   normalized - that is, you don't accidentally send `Content-Type` and
883
//   `content-type` headers. Keep in mind that if you modify the returned hash,
884
//   it will *not* modify the request headers.
885
886
  headers: {
887
    get: function() {
888
      return this.getHeaders();
889
    },
890
    enumerable: true
891
  },
892
893
// - **port**. Unless you set the `port` explicitly or include it in the URL, it
894
//   will default based on the scheme.
895
896
  port: {
897
    get: function() {
898
      if (!this._port) {
899
        switch(this.scheme) {
900
          case "https": return this._port = 443;
901
          case "http":
902
          default: return this._port = 80;
903
        }
904
      }
905
      return this._port;
906
    },
907
    set: function(value) { this._port = value; return this; },
908
    enumerable: true
909
  },
910
911
// - **method**. The request method - `get`, `put`, `post`, etc. that will be
912
//   used to make the request. Defaults to `get`.
913
914
  method: {
915
    get: function() {
916
      return this._method = (this._method||"GET");
917
    },
918
    set: function(value) {
919
      this._method = value; return this;
920
    },
921
    enumerable: true
922
  },
923
924
// - **query**. Can be set either with a query string or a hash (object). Get
925
//   will always return a properly escaped query string or null if there is no
926
//   query component for the request.
927
928
  query: {
929
    get: function() {return this._query;},
930
    set: function(value) {
931
      var stringify = function (hash) {
932
        var query = "";
933
        for (var key in hash) {
934
          query += encodeURIComponent(key) + '=' + encodeURIComponent(hash[key]) + '&';
935
        }
936
        // Remove the last '&'
937
        query = query.slice(0, -1);
938
        return query;
939
      }
940
941
      if (value) {
942
        if (typeof value === 'object') {
943
          value = stringify(value);
944
        }
945
        this._query = value;
946
      } else {
947
        this._query = "";
948
      }
949
      return this;
950
    },
951
    enumerable: true
952
  },
953
954
// - **parameters**. This will return the query parameters in the form of a hash
955
//   (object).
956
957
  parameters: {
958
    get: function() { return QueryString.parse(this._query||""); },
959
    enumerable: true
960
  },
961
962
// - **content**. (Aliased as `body`.) Set this to add a content entity to the
963
//   request. Attempts to use the `content-type` header to determine what to do
964
//   with the content value. Get this to get back a [`Content`
965
//   object](./content.html).
966
967
  body: {
968
    get: function() { return this._body; },
969
    set: function(value) {
970
      this._body = new Content({
971
        data: value,
972
        type: this.getHeader("Content-Type")
973
      });
974
      this.setHeader("Content-Type",this.content.type);
975
      this.setHeader("Content-Length",this.content.length);
976
      return this;
977
    },
978
    enumerable: true
979
  },
980
981
// - **timeout**. Used to determine how long to wait for a response. Does not
982
//   distinguish between connect timeouts versus request timeouts. Set either in
983
//   milliseconds or with an object with temporal attributes (hours, minutes,
984
//   seconds) and convert it into milliseconds. Get will always return
985
//   milliseconds.
986
987
  timeout: {
988
    get: function() { return this._timeout; }, // in milliseconds
989
    set: function(timeout) {
990
      var request = this
991
        , milliseconds = 0;
992
      ;
993
      if (!timeout) return this;
994
      if (typeof timeout==="number") { milliseconds = timeout; }
995
      else {
996
        milliseconds = (timeout.milliseconds||0) +
997
          (1000 * ((timeout.seconds||0) +
998
              (60 * ((timeout.minutes||0) +
999
                (60 * (timeout.hours||0))))));
1000
      }
1001
      this._timeout = milliseconds;
1002
      return this;
1003
    },
1004
    enumerable: true
1005
  }
1006
});
1007
1008
// Alias `body` property to `content`. Since the [content object](./content.html)
1009
// has a `body` attribute, it's preferable to use `content` since you can then
1010
// access the raw content data using `content.body`.
1011
1012
Object.defineProperty(Request.prototype,"content",
1013
    Object.getOwnPropertyDescriptor(Request.prototype, "body"));
1014
1015
// The `Request` object can be pretty overwhelming to view using the built-in
1016
// Node.js inspect method. We want to make it a bit more manageable. This
1017
// probably goes [too far in the other
1018
// direction](https://github.com/spire-io/shred/issues/2).
1019
1020
Request.prototype.inspect = function () {
1021
  var request = this;
1022
  var headers = this.format_headers();
1023
  var summary = ["<Shred Request> ", request.method.toUpperCase(),
1024
      request.url].join(" ")
1025
  return [ summary, "- Headers:", headers].join("\n");
1026
};
1027
1028
Request.prototype.format_headers = function () {
1029
  var array = []
1030
  var headers = this._headers
1031
  for (var key in headers) {
1032
    if (headers.hasOwnProperty(key)) {
1033
      var value = headers[key]
1034
      array.push("\t" + key + ": " + value);
1035
    }
1036
  }
1037
  return array.join("\n");
1038
};
1039
1040
// Allow chainable 'on's:  shred.get({ ... }).on( ... ).  You can pass in a
1041
// single function, a pair (event, function), or a hash:
1042
// { event: function, event: function }
1043
Request.prototype.on = function (eventOrHash, listener) {
1044
  var emitter = this.emitter;
1045
  // Pass in a single argument as a function then make it the default response handler
1046
  if (arguments.length === 1 && typeof(eventOrHash) === 'function') {
1047
    emitter.on('response', eventOrHash);
1048
  } else if (arguments.length === 1 && typeof(eventOrHash) === 'object') {
1049
    for (var key in eventOrHash) {
1050
      if (eventOrHash.hasOwnProperty(key)) {
1051
        emitter.on(key, eventOrHash[key]);
1052
      }
1053
    }
1054
  } else {
1055
    emitter.on(eventOrHash, listener);
1056
  }
1057
  return this;
1058
};
1059
1060
// Add in the header methods. Again, these ensure we don't get the same header
1061
// multiple times with different case conventions.
1062
HeaderMixins.gettersAndSetters(Request);
1063
1064
// `processOptions` is called from the constructor to handle all the work
1065
// associated with making sure we do our best to ensure we have a valid request.
1066
1067
var processOptions = function(request,options) {
1068
1069
  request.log.debug("Processing request options ..");
1070
1071
  // We'll use `request.emitter` to manage the `on` event handlers.
1072
  request.emitter = (new Emitter);
1073
1074
  request.agent = options.agent;
1075
1076
  // Set up the handlers ...
1077
  if (options.on) {
1078
    for (var key in options.on) {
1079
      if (options.on.hasOwnProperty(key)) {
1080
        request.emitter.on(key, options.on[key]);
1081
      }
1082
    }
1083
  }
1084
1085
  // Make sure we were give a URL or a host
1086
  if (!options.url && !options.host) {
1087
    request.emitter.emit("request_error",
1088
        new Error("No url or url options (host, port, etc.)"));
1089
    return;
1090
  }
1091
1092
  // Allow for the [use of a proxy](http://www.jmarshall.com/easy/http/#proxies).
1093
1094
  if (options.url) {
1095
    if (options.proxy) {
1096
      request.url = options.proxy;
1097
      request.path = options.url;
1098
    } else {
1099
      request.url = options.url;
1100
    }
1101
  }
1102
1103
  // Set the remaining options.
1104
  request.query = options.query||options.parameters||request.query ;
1105
  request.method = options.method;
1106
  request.setHeader("user-agent",options.agent||"Shred");
1107
  request.setHeaders(options.headers);
1108
1109
  if (request.cookieJar) {
1110
    var cookies = request.cookieJar.getCookies( CookieAccessInfo( request.host, request.path ) );
1111
    if (cookies.length) {
1112
      var cookieString = request.getHeader('cookie')||'';
1113
      for (var cookieIndex = 0; cookieIndex < cookies.length; ++cookieIndex) {
1114
          if ( cookieString.length && cookieString[ cookieString.length - 1 ] != ';' )
1115
          {
1116
              cookieString += ';';
1117
          }
1118
          cookieString += cookies[ cookieIndex ].name + '=' + cookies[ cookieIndex ].value + ';';
1119
      }
1120
      request.setHeader("cookie", cookieString);
1121
    }
1122
  }
1123
1124
  // The content entity can be set either using the `body` or `content` attributes.
1125
  if (options.body||options.content) {
1126
    request.content = options.body||options.content;
1127
  }
1128
  request.timeout = options.timeout;
1129
1130
};
1131
1132
// `createRequest` is also called by the constructor, after `processOptions`.
1133
// This actually makes the request and processes the response, so `createRequest`
1134
// is a bit of a misnomer.
1135
1136
var createRequest = function(request) {
1137
  var timeout ;
1138
1139
  request.log.debug("Creating request ..");
1140
  request.log.debug(request);
1141
1142
  var reqParams = {
1143
    host: request.host,
1144
    port: request.port,
1145
    method: request.method,
1146
    path: request.path + (request.query ? '?'+request.query : ""),
1147
    headers: request.getHeaders(),
1148
    // Node's HTTP/S modules will ignore this, but we are using the
1149
    // browserify-http module in the browser for both HTTP and HTTPS, and this
1150
    // is how you differentiate the two.
1151
    scheme: request.scheme,
1152
    // Use a provided agent.  'Undefined' is the default, which uses a global
1153
    // agent.
1154
    agent: request.agent
1155
  };
1156
1157
  if (request.logCurl) {
1158
    logCurl(request);
1159
  }
1160
1161
  var http = request.scheme == "http" ? HTTP : HTTPS;
1162
1163
  // Set up the real request using the selected library. The request won't be
1164
  // sent until we call `.end()`.
1165
  request._raw = http.request(reqParams, function(response) {
1166
    request.log.debug("Received response ..");
1167
1168
    // We haven't timed out and we have a response, so make sure we clear the
1169
    // timeout so it doesn't fire while we're processing the response.
1170
    clearTimeout(timeout);
1171
1172
    // Construct a Shred `Response` object from the response. This will stream
1173
    // the response, thus the need for the callback. We can access the response
1174
    // entity safely once we're in the callback.
1175
    response = new Response(response, request, function(response) {
1176
1177
      // Set up some event magic. The precedence is given first to
1178
      // status-specific handlers, then to responses for a given event, and then
1179
      // finally to the more general `response` handler. In the last case, we
1180
      // need to first make sure we're not dealing with a a redirect.
1181
      var emit = function(event) {
1182
        var emitter = request.emitter;
1183
        var textStatus = STATUS_CODES[response.status] ? STATUS_CODES[response.status].toLowerCase() : null;
1184
        if (emitter.listeners(response.status).length > 0 || emitter.listeners(textStatus).length > 0) {
1185
          emitter.emit(response.status, response);
1186
          emitter.emit(textStatus, response);
1187
        } else {
1188
          if (emitter.listeners(event).length>0) {
1189
            emitter.emit(event, response);
1190
          } else if (!response.isRedirect) {
1191
            emitter.emit("response", response);
1192
            //console.warn("Request has no event listener for status code " + response.status);
1193
          }
1194
        }
1195
      };
1196
1197
      // Next, check for a redirect. We simply repeat the request with the URL
1198
      // given in the `Location` header. We fire a `redirect` event.
1199
      if (response.isRedirect) {
1200
        request.log.debug("Redirecting to "
1201
            + response.getHeader("Location"));
1202
        request.url = response.getHeader("Location");
1203
        emit("redirect");
1204
        createRequest(request);
1205
1206
      // Okay, it's not a redirect. Is it an error of some kind?
1207
      } else if (response.isError) {
1208
        emit("error");
1209
      } else {
1210
      // It looks like we're good shape. Trigger the `success` event.
1211
        emit("success");
1212
      }
1213
    });
1214
  });
1215
1216
  // We're still setting up the request. Next, we're going to handle error cases
1217
  // where we have no response. We don't emit an error event because that event
1218
  // takes a response. We don't response handlers to have to check for a null
1219
  // value. However, we [should introduce a different event
1220
  // type](https://github.com/spire-io/shred/issues/3) for this type of error.
1221
  request._raw.on("error", function(error) {
1222
    request.emitter.emit("request_error", error);
1223
  });
1224
1225
  request._raw.on("socket", function(socket) {
1226
    request.emitter.emit("socket", socket);
1227
  });
1228
1229
  // TCP timeouts should also trigger the "response_error" event.
1230
  request._raw.on('socket', function () {
1231
    request._raw.socket.on('timeout', function () {
1232
      // This should trigger the "error" event on the raw request, which will
1233
      // trigger the "response_error" on the shred request.
1234
      request._raw.abort();
1235
    });
1236
  });
1237
1238
1239
  // We're almost there. Next, we need to write the request entity to the
1240
  // underlying request object.
1241
  if (request.content) {
1242
    request.log.debug("Streaming body: '" +
1243
        request.content.data.slice(0,59) + "' ... ");
1244
    request._raw.write(request.content.data);
1245
  }
1246
1247
  // Finally, we need to set up the timeout. We do this last so that we don't
1248
  // start the clock ticking until the last possible moment.
1249
  if (request.timeout) {
1250
    timeout = setTimeout(function() {
1251
      request.log.debug("Timeout fired, aborting request ...");
1252
      request._raw.abort();
1253
      request.emitter.emit("timeout", request);
1254
    },request.timeout);
1255
  }
1256
1257
  // The `.end()` method will cause the request to fire. Technically, it might
1258
  // have already sent the headers and body.
1259
  request.log.debug("Sending request ...");
1260
  request._raw.end();
1261
};
1262
1263
// Logs the curl command for the request.
1264
var logCurl = function (req) {
1265
  var headers = req.getHeaders();
1266
  var headerString = "";
1267
1268
  for (var key in headers) {
1269
    headerString += '-H "' + key + ": " + headers[key] + '" ';
1270
  }
1271
1272
  var bodyString = ""
1273
1274
  if (req.content) {
1275
    bodyString += "-d '" + req.content.body + "' ";
1276
  }
1277
1278
  var query = req.query ? '?' + req.query : "";
1279
1280
  console.log("curl " +
1281
    "-X " + req.method.toUpperCase() + " " +
1282
    req.scheme + "://" + req.host + ":" + req.port + req.path + query + " " +
1283
    headerString +
1284
    bodyString
1285
  );
1286
};
1287
1288
1289
module.exports = Request;
1290
1291
});
1292
1293
require.define("http", function (require, module, exports, __dirname, __filename) {
1294
    // todo
1295
1296
});
1297
1298
require.define("https", function (require, module, exports, __dirname, __filename) {
1299
    // todo
1300
1301
});
1302
1303
require.define("/shred/parseUri.js", function (require, module, exports, __dirname, __filename) {
1304
    // parseUri 1.2.2
1305
// (c) Steven Levithan <stevenlevithan.com>
1306
// MIT License
1307
1308
function parseUri (str) {
1309
  var o   = parseUri.options,
1310
    m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
1311
    uri = {},
1312
    i   = 14;
1313
1314
  while (i--) uri[o.key[i]] = m[i] || "";
1315
1316
  uri[o.q.name] = {};
1317
  uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
1318
    if ($1) uri[o.q.name][$1] = $2;
1319
  });
1320
1321
  return uri;
1322
};
1323
1324
parseUri.options = {
1325
  strictMode: false,
1326
  key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
1327
  q:   {
1328
    name:   "queryKey",
1329
    parser: /(?:^|&)([^&=]*)=?([^&]*)/g
1330
  },
1331
  parser: {
1332
    strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
1333
    loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
1334
  }
1335
};
1336
1337
module.exports = parseUri;
1338
1339
});
1340
1341
require.define("events", function (require, module, exports, __dirname, __filename) {
1342
    if (!process.EventEmitter) process.EventEmitter = function () {};
1343
1344
var EventEmitter = exports.EventEmitter = process.EventEmitter;
1345
var isArray = typeof Array.isArray === 'function'
1346
    ? Array.isArray
1347
    : function (xs) {
1348
        return Object.toString.call(xs) === '[object Array]'
1349
    }
1350
;
1351
1352
// By default EventEmitters will print a warning if more than
1353
// 10 listeners are added to it. This is a useful default which
1354
// helps finding memory leaks.
1355
//
1356
// Obviously not all Emitters should be limited to 10. This function allows
1357
// that to be increased. Set to zero for unlimited.
1358
var defaultMaxListeners = 10;
1359
EventEmitter.prototype.setMaxListeners = function(n) {
1360
  if (!this._events) this._events = {};
1361
  this._events.maxListeners = n;
1362
};
1363
1364
1365
EventEmitter.prototype.emit = function(type) {
1366
  // If there is no 'error' event listener then throw.
1367
  if (type === 'error') {
1368
    if (!this._events || !this._events.error ||
1369
        (isArray(this._events.error) && !this._events.error.length))
1370
    {
1371
      if (arguments[1] instanceof Error) {
1372
        throw arguments[1]; // Unhandled 'error' event
1373
      } else {
1374
        throw new Error("Uncaught, unspecified 'error' event.");
1375
      }
1376
      return false;
1377
    }
1378
  }
1379
1380
  if (!this._events) return false;
1381
  var handler = this._events[type];
1382
  if (!handler) return false;
1383
1384
  if (typeof handler == 'function') {
1385
    switch (arguments.length) {
1386
      // fast cases
1387
      case 1:
1388
        handler.call(this);
1389
        break;
1390
      case 2:
1391
        handler.call(this, arguments[1]);
1392
        break;
1393
      case 3:
1394
        handler.call(this, arguments[1], arguments[2]);
1395
        break;
1396
      // slower
1397
      default:
1398
        var args = Array.prototype.slice.call(arguments, 1);
1399
        handler.apply(this, args);
1400
    }
1401
    return true;
1402
1403
  } else if (isArray(handler)) {
1404
    var args = Array.prototype.slice.call(arguments, 1);
1405
1406
    var listeners = handler.slice();
1407
    for (var i = 0, l = listeners.length; i < l; i++) {
1408
      listeners[i].apply(this, args);
1409
    }
1410
    return true;
1411
1412
  } else {
1413
    return false;
1414
  }
1415
};
1416
1417
// EventEmitter is defined in src/node_events.cc
1418
// EventEmitter.prototype.emit() is also defined there.
1419
EventEmitter.prototype.addListener = function(type, listener) {
1420
  if ('function' !== typeof listener) {
1421
    throw new Error('addListener only takes instances of Function');
1422
  }
1423
1424
  if (!this._events) this._events = {};
1425
1426
  // To avoid recursion in the case that type == "newListeners"! Before
1427
  // adding it to the listeners, first emit "newListeners".
1428
  this.emit('newListener', type, listener);
1429
1430
  if (!this._events[type]) {
1431
    // Optimize the case of one listener. Don't need the extra array object.
1432
    this._events[type] = listener;
1433
  } else if (isArray(this._events[type])) {
1434
1435
    // Check for listener leak
1436
    if (!this._events[type].warned) {
1437
      var m;
1438
      if (this._events.maxListeners !== undefined) {
1439
        m = this._events.maxListeners;
1440
      } else {
1441
        m = defaultMaxListeners;
1442
      }
1443
1444
      if (m && m > 0 && this._events[type].length > m) {
1445
        this._events[type].warned = true;
1446
        console.error('(node) warning: possible EventEmitter memory ' +
1447
                      'leak detected. %d listeners added. ' +
1448
                      'Use emitter.setMaxListeners() to increase limit.',
1449
                      this._events[type].length);
1450
        console.trace();
1451
      }
1452
    }
1453
1454
    // If we've already got an array, just append.
1455
    this._events[type].push(listener);
1456
  } else {
1457
    // Adding the second element, need to change to array.
1458
    this._events[type] = [this._events[type], listener];
1459
  }
1460
1461
  return this;
1462
};
1463
1464
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
1465
1466
EventEmitter.prototype.once = function(type, listener) {
1467
  var self = this;
1468
  self.on(type, function g() {
1469
    self.removeListener(type, g);
1470
    listener.apply(this, arguments);
1471
  });
1472
1473
  return this;
1474
};
1475
1476
EventEmitter.prototype.removeListener = function(type, listener) {
1477
  if ('function' !== typeof listener) {
1478
    throw new Error('removeListener only takes instances of Function');
1479
  }
1480
1481
  // does not use listeners(), so no side effect of creating _events[type]
1482
  if (!this._events || !this._events[type]) return this;
1483
1484
  var list = this._events[type];
1485
1486
  if (isArray(list)) {
1487
    var i = list.indexOf(listener);
1488
    if (i < 0) return this;
1489
    list.splice(i, 1);
1490
    if (list.length == 0)
1491
      delete this._events[type];
1492
  } else if (this._events[type] === listener) {
1493
    delete this._events[type];
1494
  }
1495
1496
  return this;
1497
};
1498
1499
EventEmitter.prototype.removeAllListeners = function(type) {
1500
  // does not use listeners(), so no side effect of creating _events[type]
1501
  if (type && this._events && this._events[type]) this._events[type] = null;
1502
  return this;
1503
};
1504
1505
EventEmitter.prototype.listeners = function(type) {
1506
  if (!this._events) this._events = {};
1507
  if (!this._events[type]) this._events[type] = [];
1508
  if (!isArray(this._events[type])) {
1509
    this._events[type] = [this._events[type]];
1510
  }
1511
  return this._events[type];
1512
};
1513
1514
});
1515
1516
require.define("/node_modules/sprintf/package.json", function (require, module, exports, __dirname, __filename) {
1517
    module.exports = {"main":"./lib/sprintf"}
1518
});
1519
1520
require.define("/node_modules/sprintf/lib/sprintf.js", function (require, module, exports, __dirname, __filename) {
1521
    /**
1522
sprintf() for JavaScript 0.7-beta1
1523
http://www.diveintojavascript.com/projects/javascript-sprintf
1524
1525
Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
1526
All rights reserved.
1527
1528
Redistribution and use in source and binary forms, with or without
1529
modification, are permitted provided that the following conditions are met:
1530
    * Redistributions of source code must retain the above copyright
1531
      notice, this list of conditions and the following disclaimer.
1532
    * Redistributions in binary form must reproduce the above copyright
1533
      notice, this list of conditions and the following disclaimer in the
1534
      documentation and/or other materials provided with the distribution.
1535
    * Neither the name of sprintf() for JavaScript nor the
1536
      names of its contributors may be used to endorse or promote products
1537
      derived from this software without specific prior written permission.
1538
1539
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1540
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1541
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1542
DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
1543
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1544
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1545
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1546
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1547
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1548
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1549
1550
1551
Changelog:
1552
2010.11.07 - 0.7-beta1-node
1553
  - converted it to a node.js compatible module
1554
1555
2010.09.06 - 0.7-beta1
1556
  - features: vsprintf, support for named placeholders
1557
  - enhancements: format cache, reduced global namespace pollution
1558
1559
2010.05.22 - 0.6:
1560
 - reverted to 0.4 and fixed the bug regarding the sign of the number 0
1561
 Note:
1562
 Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/)
1563
 who warned me about a bug in 0.5, I discovered that the last update was
1564
 a regress. I appologize for that.
1565
1566
2010.05.09 - 0.5:
1567
 - bug fix: 0 is now preceeded with a + sign
1568
 - bug fix: the sign was not at the right position on padded results (Kamal Abdali)
1569
 - switched from GPL to BSD license
1570
1571
2007.10.21 - 0.4:
1572
 - unit test and patch (David Baird)
1573
1574
2007.09.17 - 0.3:
1575
 - bug fix: no longer throws exception on empty paramenters (Hans Pufal)
1576
1577
2007.09.11 - 0.2:
1578
 - feature: added argument swapping
1579
1580
2007.04.03 - 0.1:
1581
 - initial release
1582
**/
1583
1584
var sprintf = (function() {
1585
  function get_type(variable) {
1586
    return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
1587
  }
1588
  function str_repeat(input, multiplier) {
1589
    for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
1590
    return output.join('');
1591
  }
1592
1593
  var str_format = function() {
1594
    if (!str_format.cache.hasOwnProperty(arguments[0])) {
1595
      str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
1596
    }
1597
    return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
1598
  };
1599
1600
  str_format.format = function(parse_tree, argv) {
1601
    var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
1602
    for (i = 0; i < tree_length; i++) {
1603
      node_type = get_type(parse_tree[i]);
1604
      if (node_type === 'string') {
1605
        output.push(parse_tree[i]);
1606
      }
1607
      else if (node_type === 'array') {
1608
        match = parse_tree[i]; // convenience purposes only
1609
        if (match[2]) { // keyword argument
1610
          arg = argv[cursor];
1611
          for (k = 0; k < match[2].length; k++) {
1612
            if (!arg.hasOwnProperty(match[2][k])) {
1613
              throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
1614
            }
1615
            arg = arg[match[2][k]];
1616
          }
1617
        }
1618
        else if (match[1]) { // positional argument (explicit)
1619
          arg = argv[match[1]];
1620
        }
1621
        else { // positional argument (implicit)
1622
          arg = argv[cursor++];
1623
        }
1624
1625
        if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
1626
          throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
1627
        }
1628
        switch (match[8]) {
1629
          case 'b': arg = arg.toString(2); break;
1630
          case 'c': arg = String.fromCharCode(arg); break;
1631
          case 'd': arg = parseInt(arg, 10); break;
1632
          case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
1633
          case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
1634
          case 'o': arg = arg.toString(8); break;
1635
          case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
1636
          case 'u': arg = Math.abs(arg); break;
1637
          case 'x': arg = arg.toString(16); break;
1638
          case 'X': arg = arg.toString(16).toUpperCase(); break;
1639
        }
1640
        arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
1641
        pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
1642
        pad_length = match[6] - String(arg).length;
1643
        pad = match[6] ? str_repeat(pad_character, pad_length) : '';
1644
        output.push(match[5] ? arg + pad : pad + arg);
1645
      }
1646
    }
1647
    return output.join('');
1648
  };
1649
1650
  str_format.cache = {};
1651
1652
  str_format.parse = function(fmt) {
1653
    var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
1654
    while (_fmt) {
1655
      if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
1656
        parse_tree.push(match[0]);
1657
      }
1658
      else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
1659
        parse_tree.push('%');
1660
      }
1661
      else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
1662
        if (match[2]) {
1663
          arg_names |= 1;
1664
          var field_list = [], replacement_field = match[2], field_match = [];
1665
          if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
1666
            field_list.push(field_match[1]);
1667
            while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
1668
              if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
1669
                field_list.push(field_match[1]);
1670
              }
1671
              else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
1672
                field_list.push(field_match[1]);
1673
              }
1674
              else {
1675
                throw('[sprintf] huh?');
1676
              }
1677
            }
1678
          }
1679
          else {
1680
            throw('[sprintf] huh?');
1681
          }
1682
          match[2] = field_list;
1683
        }
1684
        else {
1685
          arg_names |= 2;
1686
        }
1687
        if (arg_names === 3) {
1688
          throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
1689
        }
1690
        parse_tree.push(match);
1691
      }
1692
      else {
1693
        throw('[sprintf] huh?');
1694
      }
1695
      _fmt = _fmt.substring(match[0].length);
1696
    }
1697
    return parse_tree;
1698
  };
1699
1700
  return str_format;
1701
})();
1702
1703
var vsprintf = function(fmt, argv) {
1704
  argv.unshift(fmt);
1705
  return sprintf.apply(null, argv);
1706
};
1707
1708
exports.sprintf = sprintf;
1709
exports.vsprintf = vsprintf;
1710
});
1711
1712
require.define("/shred/response.js", function (require, module, exports, __dirname, __filename) {
1713
    // The `Response object` encapsulates a Node.js HTTP response.
1714
1715
var Content = require("./content")
1716
  , HeaderMixins = require("./mixins/headers")
1717
  , CookieJarLib = require( "cookiejar" )
1718
  , Cookie = CookieJarLib.Cookie
1719
;
1720
1721
// Browser doesn't have zlib.
1722
var zlib = null;
1723
try {
1724
  zlib = require('zlib');
1725
} catch (e) {
1726
  // console.warn("no zlib library");
1727
}
1728
1729
// Iconv doesn't work in browser
1730
var Iconv = null;
1731
try {
1732
  Iconv = require('iconv-lite');
1733
} catch (e) {
1734
  // console.warn("no iconv library");
1735
}
1736
1737
// Construct a `Response` object. You should never have to do this directly. The
1738
// `Request` object handles this, getting the raw response object and passing it
1739
// in here, along with the request. The callback allows us to stream the response
1740
// and then use the callback to let the request know when it's ready.
1741
var Response = function(raw, request, callback) {
1742
  var response = this;
1743
  this._raw = raw;
1744
1745
  // The `._setHeaders` method is "private"; you can't otherwise set headers on
1746
  // the response.
1747
  this._setHeaders.call(this,raw.headers);
1748
1749
  // store any cookies
1750
  if (request.cookieJar && this.getHeader('set-cookie')) {
1751
    var cookieStrings = this.getHeader('set-cookie');
1752
    var cookieObjs = []
1753
      , cookie;
1754
1755
    for (var i = 0; i < cookieStrings.length; i++) {
1756
      var cookieString = cookieStrings[i];
1757
      if (!cookieString) {
1758
        continue;
1759
      }
1760
1761
      if (!cookieString.match(/domain\=/i)) {
1762
        cookieString += '; domain=' + request.host;
1763
      }
1764
1765
      if (!cookieString.match(/path\=/i)) {
1766
        cookieString += '; path=' + request.path;
1767
      }
1768
1769
      try {
1770
        cookie = new Cookie(cookieString);
1771
        if (cookie) {
1772
          cookieObjs.push(cookie);
1773
        }
1774
      } catch (e) {
1775
        console.warn("Tried to set bad cookie: " + cookieString);
1776
      }
1777
    }
1778
1779
    request.cookieJar.setCookies(cookieObjs);
1780
  }
1781
1782
  this.request = request;
1783
  this.client = request.client;
1784
  this.log = this.request.log;
1785
1786
  // Stream the response content entity and fire the callback when we're done.
1787
  // Store the incoming data in a array of Buffers which we concatinate into one
1788
  // buffer at the end.  We need to use buffers instead of strings here in order
1789
  // to preserve binary data.
1790
  var chunkBuffers = [];
1791
  var dataLength = 0;
1792
  raw.on("data", function(chunk) {
1793
    chunkBuffers.push(chunk);
1794
    dataLength += chunk.length;
1795
  });
1796
  raw.on("end", function() {
1797
    var body;
1798
    if (typeof Buffer === 'undefined') {
1799
      // Just concatinate into a string
1800
      body = chunkBuffers.join('');
1801
    } else {
1802
      // Initialize new buffer and add the chunks one-at-a-time.
1803
      body = new Buffer(dataLength);
1804
      for (var i = 0, pos = 0; i < chunkBuffers.length; i++) {
1805
        chunkBuffers[i].copy(body, pos);
1806
        pos += chunkBuffers[i].length;
1807
      }
1808
    }
1809
1810
    var setBodyAndFinish = function (body) {
1811
      response._body = new Content({
1812
        body: body,
1813
        type: response.getHeader("Content-Type")
1814
      });
1815
      callback(response);
1816
    }
1817
1818
    if (zlib && response.getHeader("Content-Encoding") === 'gzip'){
1819
      zlib.gunzip(body, function (err, gunzippedBody) {
1820
        if (Iconv && response.request.encoding){
1821
          body = Iconv.fromEncoding(gunzippedBody,response.request.encoding);
1822
        } else {
1823
          body = gunzippedBody.toString();
1824
        }
1825
        setBodyAndFinish(body);
1826
      })
1827
    }
1828
    else{
1829
       if (response.request.encoding){
1830
            body = Iconv.fromEncoding(body,response.request.encoding);
1831
        }
1832
      setBodyAndFinish(body);
1833
    }
1834
  });
1835
};
1836
1837
// The `Response` object can be pretty overwhelming to view using the built-in
1838
// Node.js inspect method. We want to make it a bit more manageable. This
1839
// probably goes [too far in the other
1840
// direction](https://github.com/spire-io/shred/issues/2).
1841
1842
Response.prototype = {
1843
  inspect: function() {
1844
    var response = this;
1845
    var headers = this.format_headers();
1846
    var summary = ["<Shred Response> ", response.status].join(" ")
1847
    return [ summary, "- Headers:", headers].join("\n");
1848
  },
1849
  format_headers: function () {
1850
    var array = []
1851
    var headers = this._headers
1852
    for (var key in headers) {
1853
      if (headers.hasOwnProperty(key)) {
1854
        var value = headers[key]
1855
        array.push("\t" + key + ": " + value);
1856
      }
1857
    }
1858
    return array.join("\n");
1859
  }
1860
};
1861
1862
// `Response` object properties, all of which are read-only:
1863
Object.defineProperties(Response.prototype, {
1864
1865
// - **status**. The HTTP status code for the response.
1866
  status: {
1867
    get: function() { return this._raw.statusCode; },
1868
    enumerable: true
1869
  },
1870
1871
// - **content**. The HTTP content entity, if any. Provided as a [content
1872
//   object](./content.html), which will attempt to convert the entity based upon
1873
//   the `content-type` header. The converted value is available as
1874
//   `content.data`. The original raw content entity is available as
1875
//   `content.body`.
1876
  body: {
1877
    get: function() { return this._body; }
1878
  },
1879
  content: {
1880
    get: function() { return this.body; },
1881
    enumerable: true
1882
  },
1883
1884
// - **isRedirect**. Is the response a redirect? These are responses with 3xx
1885
//   status and a `Location` header.
1886
  isRedirect: {
1887
    get: function() {
1888
      return (this.status>299
1889
          &&this.status<400
1890
          &&this.getHeader("Location"));
1891
    },
1892
    enumerable: true
1893
  },
1894
1895
// - **isError**. Is the response an error? These are responses with status of
1896
//   400 or greater.
1897
  isError: {
1898
    get: function() {
1899
      return (this.status === 0 || this.status > 399)
1900
    },
1901
    enumerable: true
1902
  }
1903
});
1904
1905
// Add in the [getters for accessing the normalized headers](./headers.js).
1906
HeaderMixins.getters(Response);
1907
HeaderMixins.privateSetters(Response);
1908
1909
// Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes
1910
// getAllResponseHeaders() to return {} if the response is a CORS request.
1911
// xhr.getHeader still works correctly.
1912
var getHeader = Response.prototype.getHeader;
1913
Response.prototype.getHeader = function (name) {
1914
  return (getHeader.call(this,name) ||
1915
    (typeof this._raw.getHeader === 'function' && this._raw.getHeader(name)));
1916
};
1917
1918
module.exports = Response;
1919
1920
});
1921
1922
require.define("/shred/content.js", function (require, module, exports, __dirname, __filename) {
1923
1924
// The purpose of the `Content` object is to abstract away the data conversions
1925
// to and from raw content entities as strings. For example, you want to be able
1926
// to pass in a Javascript object and have it be automatically converted into a
1927
// JSON string if the `content-type` is set to a JSON-based media type.
1928
// Conversely, you want to be able to transparently get back a Javascript object
1929
// in the response if the `content-type` is a JSON-based media-type.
1930
1931
// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5).
1932
1933
// The `Content` constructor takes an options object, which *must* have either a
1934
// `body` or `data` property and *may* have a `type` property indicating the
1935
// media type. If there is no `type` attribute, a default will be inferred.
1936
var Content = function(options) {
1937
  this.body = options.body;
1938
  this.data = options.data;
1939
  this.type = options.type;
1940
};
1941
1942
Content.prototype = {
1943
  // Treat `toString()` as asking for the `content.body`. That is, the raw content entity.
1944
  //
1945
  //     toString: function() { return this.body; }
1946
  //
1947
  // Commented out, but I've forgotten why. :/
1948
};
1949
1950
1951
// `Content` objects have the following attributes:
1952
Object.defineProperties(Content.prototype,{
1953
1954
// - **type**. Typically accessed as `content.type`, reflects the `content-type`
1955
//   header associated with the request or response. If not passed as an options
1956
//   to the constructor or set explicitly, it will infer the type the `data`
1957
//   attribute, if possible, and, failing that, will default to `text/plain`.
1958
  type: {
1959
    get: function() {
1960
      if (this._type) {
1961
        return this._type;
1962
      } else {
1963
        if (this._data) {
1964
          switch(typeof this._data) {
1965
            case "string": return "text/plain";
1966
            case "object": return "application/json";
1967
          }
1968
        }
1969
      }
1970
      return "text/plain";
1971
    },
1972
    set: function(value) {
1973
      this._type = value;
1974
      return this;
1975
    },
1976
    enumerable: true
1977
  },
1978
1979
// - **data**. Typically accessed as `content.data`, reflects the content entity
1980
//   converted into Javascript data. This can be a string, if the `type` is, say,
1981
//   `text/plain`, but can also be a Javascript object. The conversion applied is
1982
//   based on the `processor` attribute. The `data` attribute can also be set
1983
//   directly, in which case the conversion will be done the other way, to infer
1984
//   the `body` attribute.
1985
  data: {
1986
    get: function() {
1987
      if (this._body) {
1988
        return this.processor.parser(this._body);
1989
      } else {
1990
        return this._data;
1991
      }
1992
    },
1993
    set: function(data) {
1994
      if (this._body&&data) Errors.setDataWithBody(this);
1995
      this._data = data;
1996
      return this;
1997
    },
1998
    enumerable: true
1999
  },
2000
2001
// - **body**. Typically accessed as `content.body`, reflects the content entity
2002
//   as a UTF-8 string. It is the mirror of the `data` attribute. If you set the
2003
//   `data` attribute, the `body` attribute will be inferred and vice-versa. If
2004
//   you attempt to set both, an exception is raised.
2005
  body: {
2006
    get: function() {
2007
      if (this._data) {
2008
        return this.processor.stringify(this._data);
2009
      } else {
2010
        return this.processor.stringify(this._body);
2011
      }
2012
    },
2013
    set: function(body) {
2014
      if (this._data&&body) Errors.setBodyWithData(this);
2015
      this._body = body;
2016
      return this;
2017
    },
2018
    enumerable: true
2019
  },
2020
2021
// - **processor**. The functions that will be used to convert to/from `data` and
2022
//   `body` attributes. You can add processors. The two that are built-in are for
2023
//   `text/plain`, which is basically an identity transformation and
2024
//   `application/json` and other JSON-based media types (including custom media
2025
//   types with `+json`). You can add your own processors. See below.
2026
  processor: {
2027
    get: function() {
2028
      var processor = Content.processors[this.type];
2029
      if (processor) {
2030
        return processor;
2031
      } else {
2032
        // Return the first processor that matches any part of the
2033
        // content type. ex: application/vnd.foobar.baz+json will match json.
2034
        var main = this.type.split(";")[0];
2035
        var parts = main.split(/\+|\//);
2036
        for (var i=0, l=parts.length; i < l; i++) {
2037
          processor = Content.processors[parts[i]]
2038
        }
2039
        return processor || {parser:identity,stringify:toString};
2040
      }
2041
    },
2042
    enumerable: true
2043
  },
2044
2045
// - **length**. Typically accessed as `content.length`, returns the length in
2046
//   bytes of the raw content entity.
2047
  length: {
2048
    get: function() {
2049
      if (typeof Buffer !== 'undefined') {
2050
        return Buffer.byteLength(this.body);
2051
      }
2052
      return this.body.length;
2053
    }
2054
  }
2055
});
2056
2057
Content.processors = {};
2058
2059
// The `registerProcessor` function allows you to add your own processors to
2060
// convert content entities. Each processor consists of a Javascript object with
2061
// two properties:
2062
// - **parser**. The function used to parse a raw content entity and convert it
2063
//   into a Javascript data type.
2064
// - **stringify**. The function used to convert a Javascript data type into a
2065
//   raw content entity.
2066
Content.registerProcessor = function(types,processor) {
2067
2068
// You can pass an array of types that will trigger this processor, or just one.
2069
// We determine the array via duck-typing here.
2070
  if (types.forEach) {
2071
    types.forEach(function(type) {
2072
      Content.processors[type] = processor;
2073
    });
2074
  } else {
2075
    // If you didn't pass an array, we just use what you pass in.
2076
    Content.processors[types] = processor;
2077
  }
2078
};
2079
2080
// Register the identity processor, which is used for text-based media types.
2081
var identity = function(x) { return x; }
2082
  , toString = function(x) { return x.toString(); }
2083
Content.registerProcessor(
2084
  ["text/html","text/plain","text"],
2085
  { parser: identity, stringify: toString });
2086
2087
// Register the JSON processor, which is used for JSON-based media types.
2088
Content.registerProcessor(
2089
  ["application/json; charset=utf-8","application/json","json"],
2090
  {
2091
    parser: function(string) {
2092
      return JSON.parse(string);
2093
    },
2094
    stringify: function(data) {
2095
      return JSON.stringify(data); }});
2096
2097
// Error functions are defined separately here in an attempt to make the code
2098
// easier to read.
2099
var Errors = {
2100
  setDataWithBody: function(object) {
2101
    throw new Error("Attempt to set data attribute of a content object " +
2102
        "when the body attributes was already set.");
2103
  },
2104
  setBodyWithData: function(object) {
2105
    throw new Error("Attempt to set body attribute of a content object " +
2106
        "when the data attributes was already set.");
2107
  }
2108
}
2109
module.exports = Content;
2110
2111
});
2112
2113
require.define("/shred/mixins/headers.js", function (require, module, exports, __dirname, __filename) {
2114
    // The header mixins allow you to add HTTP header support to any object. This
2115
// might seem pointless: why not simply use a hash? The main reason is that, per
2116
// the [HTTP spec](http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2),
2117
// headers are case-insensitive. So, for example, `content-type` is the same as
2118
// `CONTENT-TYPE` which is the same as `Content-Type`. Since there is no way to
2119
// overload the index operator in Javascript, using a hash to represent the
2120
// headers means it's possible to have two conflicting values for a single
2121
// header.
2122
//
2123
// The solution to this is to provide explicit methods to set or get headers.
2124
// This also has the benefit of allowing us to introduce additional variations,
2125
// including snake case, which we automatically convert to what Matthew King has
2126
// dubbed "corset case" - the hyphen-separated names with initial caps:
2127
// `Content-Type`. We use corset-case just in case we're dealing with servers
2128
// that haven't properly implemented the spec.
2129
2130
// Convert headers to corset-case. **Example:** `CONTENT-TYPE` will be converted
2131
// to `Content-Type`.
2132
2133
var corsetCase = function(string) {
2134
  return string;//.toLowerCase()
2135
      //.replace("_","-")
2136
      // .replace(/(^|-)(\w)/g,
2137
          // function(s) { return s.toUpperCase(); });
2138
};
2139
2140
// We suspect that `initializeHeaders` was once more complicated ...
2141
var initializeHeaders = function(object) {
2142
  return {};
2143
};
2144
2145
// Access the `_headers` property using lazy initialization. **Warning:** If you
2146
// mix this into an object that is using the `_headers` property already, you're
2147
// going to have trouble.
2148
var $H = function(object) {
2149
  return object._headers||(object._headers=initializeHeaders(object));
2150
};
2151
2152
// Hide the implementations as private functions, separate from how we expose them.
2153
2154
// The "real" `getHeader` function: get the header after normalizing the name.
2155
var getHeader = function(object,name) {
2156
  return $H(object)[corsetCase(name)];
2157
};
2158
2159
// The "real" `getHeader` function: get one or more headers, or all of them
2160
// if you don't ask for any specifics.
2161
var getHeaders = function(object,names) {
2162
  var keys = (names && names.length>0) ? names : Object.keys($H(object));
2163
  var hash = keys.reduce(function(hash,key) {
2164
    hash[key] = getHeader(object,key);
2165
    return hash;
2166
  },{});
2167
  // Freeze the resulting hash so you don't mistakenly think you're modifying
2168
  // the real headers.
2169
  Object.freeze(hash);
2170
  return hash;
2171
};
2172
2173
// The "real" `setHeader` function: set a header, after normalizing the name.
2174
var setHeader = function(object,name,value) {
2175
  $H(object)[corsetCase(name)] = value;
2176
  return object;
2177
};
2178
2179
// The "real" `setHeaders` function: set multiple headers based on a hash.
2180
var setHeaders = function(object,hash) {
2181
  for( var key in hash ) { setHeader(object,key,hash[key]); };
2182
  return this;
2183
};
2184
2185
// Here's where we actually bind the functionality to an object. These mixins work by
2186
// exposing mixin functions. Each function mixes in a specific batch of features.
2187
module.exports = {
2188
2189
  // Add getters.
2190
  getters: function(constructor) {
2191
    constructor.prototype.getHeader = function(name) { return getHeader(this,name); };
2192
    constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); };
2193
  },
2194
  // Add setters but as "private" methods.
2195
  privateSetters: function(constructor) {
2196
    constructor.prototype._setHeader = function(key,value) { return setHeader(this,key,value); };
2197
    constructor.prototype._setHeaders = function(hash) { return setHeaders(this,hash); };
2198
  },
2199
  // Add setters.
2200
  setters: function(constructor) {
2201
    constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); };
2202
    constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); };
2203
  },
2204
  // Add both getters and setters.
2205
  gettersAndSetters: function(constructor) {
2206
    constructor.prototype.getHeader = function(name) { return getHeader(this,name); };
2207
    constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); };
2208
    constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); };
2209
    constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); };
2210
  }
2211
};
2212
2213
});
2214
2215
require.define("/node_modules/iconv-lite/package.json", function (require, module, exports, __dirname, __filename) {
2216
    module.exports = {}
2217
});
2218
2219
require.define("/node_modules/iconv-lite/index.js", function (require, module, exports, __dirname, __filename) {
2220
    // Module exports
2221
var iconv = module.exports = {
2222
    toEncoding: function(str, encoding) {
2223
        return iconv.getCodec(encoding).toEncoding(str);
2224
    },
2225
    fromEncoding: function(buf, encoding) {
2226
        return iconv.getCodec(encoding).fromEncoding(buf);
2227
    },
2228
2229
    defaultCharUnicode: '�',
2230
    defaultCharSingleByte: '?',
2231
2232
    // Get correct codec for given encoding.
2233
    getCodec: function(encoding) {
2234
        var enc = encoding || "utf8";
2235
        var codecOptions = undefined;
2236
        while (1) {
2237
            if (getType(enc) === "String")
2238
                enc = enc.replace(/[- ]/g, "").toLowerCase();
2239
            var codec = iconv.encodings[enc];
2240
            var type = getType(codec);
2241
            if (type === "String") {
2242
                // Link to other encoding.
2243
                codecOptions = {originalEncoding: enc};
2244
                enc = codec;
2245
            }
2246
            else if (type === "Object" && codec.type != undefined) {
2247
                // Options for other encoding.
2248
                codecOptions = codec;
2249
                enc = codec.type;
2250
            }
2251
            else if (type === "Function")
2252
                // Codec itself.
2253
                return codec(codecOptions);
2254
            else
2255
                throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
2256
        }
2257
    },
2258
2259
    // Define basic encodings
2260
    encodings: {
2261
        internal: function(options) {
2262
            return {
2263
                toEncoding: function(str) {
2264
                    return new Buffer(ensureString(str), options.originalEncoding);
2265
                },
2266
                fromEncoding: function(buf) {
2267
                    return ensureBuffer(buf).toString(options.originalEncoding);
2268
                }
2269
            };
2270
        },
2271
        utf8: "internal",
2272
        ucs2: "internal",
2273
        binary: "internal",
2274
        ascii: "internal",
2275
        base64: "internal",
2276
2277
        // Codepage single-byte encodings.
2278
        singlebyte: function(options) {
2279
            // Prepare chars if needed
2280
            if (!options.chars || (options.chars.length !== 128 && options.chars.length !== 256))
2281
                throw new Error("Encoding '"+options.type+"' has incorrect 'chars' (must be of len 128 or 256)");
2282
2283
            if (options.chars.length === 128)
2284
                options.chars = asciiString + options.chars;
2285
2286
            if (!options.charsBuf) {
2287
                options.charsBuf = new Buffer(options.chars, 'ucs2');
2288
            }
2289
2290
            if (!options.revCharsBuf) {
2291
                options.revCharsBuf = new Buffer(65536);
2292
                var defChar = iconv.defaultCharSingleByte.charCodeAt(0);
2293
                for (var i = 0; i < options.revCharsBuf.length; i++)
2294
                    options.revCharsBuf[i] = defChar;
2295
                for (var i = 0; i < options.chars.length; i++)
2296
                    options.revCharsBuf[options.chars.charCodeAt(i)] = i;
2297
            }
2298
2299
            return {
2300
                toEncoding: function(str) {
2301
                    str = ensureString(str);
2302
2303
                    var buf = new Buffer(str.length);
2304
                    var revCharsBuf = options.revCharsBuf;
2305
                    for (var i = 0; i < str.length; i++)
2306
                        buf[i] = revCharsBuf[str.charCodeAt(i)];
2307
2308
                    return buf;
2309
                },
2310
                fromEncoding: function(buf) {
2311
                    buf = ensureBuffer(buf);
2312
2313
                    // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
2314
                    var charsBuf = options.charsBuf;
2315
                    var newBuf = new Buffer(buf.length*2);
2316
                    var idx1 = 0, idx2 = 0;
2317
                    for (var i = 0, _len = buf.length; i < _len; i++) {
2318
                        idx1 = buf[i]*2; idx2 = i*2;
2319
                        newBuf[idx2] = charsBuf[idx1];
2320
                        newBuf[idx2+1] = charsBuf[idx1+1];
2321
                    }
2322
                    return newBuf.toString('ucs2');
2323
                }
2324
            };
2325
        },
2326
2327
        // Codepage double-byte encodings.
2328
        table: function(options) {
2329
            var table = options.table, key, revCharsTable = options.revCharsTable;
2330
            if (!table) {
2331
                throw new Error("Encoding '" + options.type +"' has incorect 'table' option");
2332
            }
2333
            if(!revCharsTable) {
2334
                revCharsTable = options.revCharsTable = {};
2335
                for (key in table) {
2336
                    revCharsTable[table[key]] = parseInt(key);
2337
                }
2338
            }
2339
2340
            return {
2341
                toEncoding: function(str) {
2342
                    str = ensureString(str);
2343
                    var strLen = str.length;
2344
                    var bufLen = strLen;
2345
                    for (var i = 0; i < strLen; i++)
2346
                        if (str.charCodeAt(i) >> 7)
2347
                            bufLen++;
2348
2349
                    var newBuf = new Buffer(bufLen), gbkcode, unicode,
2350
                        defaultChar = revCharsTable[iconv.defaultCharUnicode.charCodeAt(0)];
2351
2352
                    for (var i = 0, j = 0; i < strLen; i++) {
2353
                        unicode = str.charCodeAt(i);
2354
                        if (unicode >> 7) {
2355
                            gbkcode = revCharsTable[unicode] || defaultChar;
2356
                            newBuf[j++] = gbkcode >> 8; //high byte;
2357
                            newBuf[j++] = gbkcode & 0xFF; //low byte
2358
                        } else {//ascii
2359
                            newBuf[j++] = unicode;
2360
                        }
2361
                    }
2362
                    return newBuf;
2363
                },
2364
                fromEncoding: function(buf) {
2365
                    buf = ensureBuffer(buf);
2366
                    var bufLen = buf.length, strLen = 0;
2367
                    for (var i = 0; i < bufLen; i++) {
2368
                        strLen++;
2369
                        if (buf[i] & 0x80) //the high bit is 1, so this byte is gbkcode's high byte.skip next byte
2370
                            i++;
2371
                    }
2372
                    var newBuf = new Buffer(strLen*2), unicode, gbkcode,
2373
                        defaultChar = iconv.defaultCharUnicode.charCodeAt(0);
2374
2375
                    for (var i = 0, j = 0; i < bufLen; i++, j+=2) {
2376
                        gbkcode = buf[i];
2377
                        if (gbkcode & 0x80) {
2378
                            gbkcode = (gbkcode << 8) + buf[++i];
2379
                            unicode = table[gbkcode] || defaultChar;
2380
                        } else {
2381
                            unicode = gbkcode;
2382
                        }
2383
                        newBuf[j] = unicode & 0xFF; //low byte
2384
                        newBuf[j+1] = unicode >> 8; //high byte
2385
                    }
2386
                    return newBuf.toString('ucs2');
2387
                }
2388
            }
2389
        }
2390
    }
2391
};
2392
2393
// Add aliases to convert functions
2394
iconv.encode = iconv.toEncoding;
2395
iconv.decode = iconv.fromEncoding;
2396
2397
// Load other encodings from files in /encodings dir.
2398
var encodingsDir = __dirname+"/encodings/",
2399
    fs = require('fs');
2400
fs.readdirSync(encodingsDir).forEach(function(file) {
2401
    if(fs.statSync(encodingsDir + file).isDirectory()) return;
2402
    var encodings = require(encodingsDir + file)
2403
    for (var key in encodings)
2404
        iconv.encodings[key] = encodings[key]
2405
});
2406
2407
// Utilities
2408
var asciiString = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+
2409
              ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f';
2410
2411
var ensureBuffer = function(buf) {
2412
    buf = buf || new Buffer(0);
2413
    return (buf instanceof Buffer) ? buf : new Buffer(buf.toString(), "utf8");
2414
}
2415
2416
var ensureString = function(str) {
2417
    str = str || "";
2418
    return (str instanceof String) ? str : str.toString((str instanceof Buffer) ? 'utf8' : undefined);
2419
}
2420
2421
var getType = function(obj) {
2422
    return Object.prototype.toString.call(obj).slice(8, -1);
2423
}
2424
2425
2426
});
2427
2428
require.define("/node_modules/http-browserify/package.json", function (require, module, exports, __dirname, __filename) {
2429
    module.exports = {"main":"index.js","browserify":"browser.js"}
2430
});
2431
2432
require.define("/node_modules/http-browserify/browser.js", function (require, module, exports, __dirname, __filename) {
2433
    var http = module.exports;
2434
var EventEmitter = require('events').EventEmitter;
2435
var Request = require('./lib/request');
2436
2437
http.request = function (params, cb) {
2438
    if (!params) params = {};
2439
    if (!params.host) params.host = window.location.host.split(':')[0];
2440
    if (!params.port) params.port = window.location.port;
2441
2442
    var req = new Request(new xhrHttp, params);
2443
    if (cb) req.on('response', cb);
2444
    return req;
2445
};
2446
2447
http.get = function (params, cb) {
2448
    params.method = 'GET';
2449
    var req = http.request(params, cb);
2450
    req.end();
2451
    return req;
2452
};
2453
2454
var xhrHttp = (function () {
2455
    if (typeof window === 'undefined') {
2456
        throw new Error('no window object present');
2457
    }
2458
    else if (window.XMLHttpRequest) {
2459
        return window.XMLHttpRequest;
2460
    }
2461
    else if (window.ActiveXObject) {
2462
        var axs = [
2463
            'Msxml2.XMLHTTP.6.0',
2464
            'Msxml2.XMLHTTP.3.0',
2465
            'Microsoft.XMLHTTP'
2466
        ];
2467
        for (var i = 0; i < axs.length; i++) {
2468
            try {
2469
                var ax = new(window.ActiveXObject)(axs[i]);
2470
                return function () {
2471
                    if (ax) {
2472
                        var ax_ = ax;
2473
                        ax = null;
2474
                        return ax_;
2475
                    }
2476
                    else {
2477
                        return new(window.ActiveXObject)(axs[i]);
2478
                    }
2479
                };
2480
            }
2481
            catch (e) {}
2482
        }
2483
        throw new Error('ajax not supported in this browser')
2484
    }
2485
    else {
2486
        throw new Error('ajax not supported in this browser');
2487
    }
2488
})();
2489
2490
http.STATUS_CODES = {
2491
    100 : 'Continue',
2492
    101 : 'Switching Protocols',
2493
    102 : 'Processing', // RFC 2518, obsoleted by RFC 4918
2494
    200 : 'OK',
2495
    201 : 'Created',
2496
    202 : 'Accepted',
2497
    203 : 'Non-Authoritative Information',
2498
    204 : 'No Content',
2499
    205 : 'Reset Content',
2500
    206 : 'Partial Content',
2501
    207 : 'Multi-Status', // RFC 4918
2502
    300 : 'Multiple Choices',
2503
    301 : 'Moved Permanently',
2504
    302 : 'Moved Temporarily',
2505
    303 : 'See Other',
2506
    304 : 'Not Modified',
2507
    305 : 'Use Proxy',
2508
    307 : 'Temporary Redirect',
2509
    400 : 'Bad Request',
2510
    401 : 'Unauthorized',
2511
    402 : 'Payment Required',
2512
    403 : 'Forbidden',
2513
    404 : 'Not Found',
2514
    405 : 'Method Not Allowed',
2515
    406 : 'Not Acceptable',
2516
    407 : 'Proxy Authentication Required',
2517
    408 : 'Request Time-out',
2518
    409 : 'Conflict',
2519
    410 : 'Gone',
2520
    411 : 'Length Required',
2521
    412 : 'Precondition Failed',
2522
    413 : 'Request Entity Too Large',
2523
    414 : 'Request-URI Too Large',
2524
    415 : 'Unsupported Media Type',
2525
    416 : 'Requested Range Not Satisfiable',
2526
    417 : 'Expectation Failed',
2527
    418 : 'I\'m a teapot', // RFC 2324
2528
    422 : 'Unprocessable Entity', // RFC 4918
2529
    423 : 'Locked', // RFC 4918
2530
    424 : 'Failed Dependency', // RFC 4918
2531
    425 : 'Unordered Collection', // RFC 4918
2532
    426 : 'Upgrade Required', // RFC 2817
2533
    500 : 'Internal Server Error',
2534
    501 : 'Not Implemented',
2535
    502 : 'Bad Gateway',
2536
    503 : 'Service Unavailable',
2537
    504 : 'Gateway Time-out',
2538
    505 : 'HTTP Version not supported',
2539
    506 : 'Variant Also Negotiates', // RFC 2295
2540
    507 : 'Insufficient Storage', // RFC 4918
2541
    509 : 'Bandwidth Limit Exceeded',
2542
    510 : 'Not Extended' // RFC 2774
2543
};
2544
2545
});
2546
2547
require.define("/node_modules/http-browserify/lib/request.js", function (require, module, exports, __dirname, __filename) {
2548
    var EventEmitter = require('events').EventEmitter;
2549
var Response = require('./response');
2550
var isSafeHeader = require('./isSafeHeader');
2551
2552
var Request = module.exports = function (xhr, params) {
2553
    var self = this;
2554
    self.xhr = xhr;
2555
    self.body = '';
2556
2557
    var uri = params.host + ':' + params.port + (params.path || '/');
2558
2559
    xhr.open(
2560
        params.method || 'GET',
2561
        (params.scheme || 'http') + '://' + uri,
2562
        true
2563
    );
2564
2565
    if (params.headers) {
2566
        Object.keys(params.headers).forEach(function (key) {
2567
            if (!isSafeHeader(key)) return;
2568
            var value = params.headers[key];
2569
            if (Array.isArray(value)) {
2570
                value.forEach(function (v) {
2571
                    xhr.setRequestHeader(key, v);
2572
                });
2573
            }
2574
            else xhr.setRequestHeader(key, value)
2575
        });
2576
    }
2577
2578
    var res = new Response(xhr);
2579
    res.on('ready', function () {
2580
        self.emit('response', res);
2581
    });
2582
2583
    xhr.onreadystatechange = function () {
2584
        res.handle(xhr);
2585
    };
2586
};
2587
2588
Request.prototype = new EventEmitter;
2589
2590
Request.prototype.setHeader = function (key, value) {
2591
    if ((Array.isArray && Array.isArray(value))
2592
    || value instanceof Array) {
2593
        for (var i = 0; i < value.length; i++) {
2594
            this.xhr.setRequestHeader(key, value[i]);
2595
        }
2596
    }
2597
    else {
2598
        this.xhr.setRequestHeader(key, value);
2599
    }
2600
};
2601
2602
Request.prototype.write = function (s) {
2603
    this.body += s;
2604
};
2605
2606
Request.prototype.end = function (s) {
2607
    if (s !== undefined) this.write(s);
2608
    this.xhr.send(this.body);
2609
};
2610
2611
});
2612
2613
require.define("/node_modules/http-browserify/lib/response.js", function (require, module, exports, __dirname, __filename) {
2614
    var EventEmitter = require('events').EventEmitter;
2615
var isSafeHeader = require('./isSafeHeader');
2616
2617
var Response = module.exports = function (xhr) {
2618
    this.xhr = xhr;
2619
    this.offset = 0;
2620
};
2621
2622
Response.prototype = new EventEmitter;
2623
2624
var capable = {
2625
    streaming : true,
2626
    status2 : true
2627
};
2628
2629
function parseHeaders (xhr) {
2630
    var lines = xhr.getAllResponseHeaders().split(/\r?\n/);
2631
    var headers = {};
2632
    for (var i = 0; i < lines.length; i++) {
2633
        var line = lines[i];
2634
        if (line === '') continue;
2635
2636
        var m = line.match(/^([^:]+):\s*(.*)/);
2637
        if (m) {
2638
            var key = m[1].toLowerCase(), value = m[2];
2639
2640
            if (headers[key] !== undefined) {
2641
                if ((Array.isArray && Array.isArray(headers[key]))
2642
                || headers[key] instanceof Array) {
2643
                    headers[key].push(value);
2644
                }
2645
                else {
2646
                    headers[key] = [ headers[key], value ];
2647
                }
2648
            }
2649
            else {
2650
                headers[key] = value;
2651
            }
2652
        }
2653
        else {
2654
            headers[line] = true;
2655
        }
2656
    }
2657
    return headers;
2658
}
2659
2660
Response.prototype.getHeader = function (key) {
2661
    var header = this.headers ? this.headers[key.toLowerCase()] : null;
2662
    if (header) return header;
2663
2664
    // Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes
2665
    // getAllResponseHeaders() to return {} if the response is a CORS request.
2666
    // xhr.getHeader still works correctly.
2667
    if (isSafeHeader(key)) {
2668
      return this.xhr.getResponseHeader(key);
2669
    }
2670
    return null;
2671
};
2672
2673
Response.prototype.handle = function () {
2674
    var xhr = this.xhr;
2675
    if (xhr.readyState === 2 && capable.status2) {
2676
        try {
2677
            this.statusCode = xhr.status;
2678
            this.headers = parseHeaders(xhr);
2679
        }
2680
        catch (err) {
2681
            capable.status2 = false;
2682
        }
2683
2684
        if (capable.status2) {
2685
            this.emit('ready');
2686
        }
2687
    }
2688
    else if (capable.streaming && xhr.readyState === 3) {
2689
        try {
2690
            if (!this.statusCode) {
2691
                this.statusCode = xhr.status;
2692
                this.headers = parseHeaders(xhr);
2693
                this.emit('ready');
2694
            }
2695
        }
2696
        catch (err) {}
2697
2698
        try {
2699
            this.write();
2700
        }
2701
        catch (err) {
2702
            capable.streaming = false;
2703
        }
2704
    }
2705
    else if (xhr.readyState === 4) {
2706
        if (!this.statusCode) {
2707
            this.statusCode = xhr.status;
2708
            this.emit('ready');
2709
        }
2710
        this.write();
2711
2712
        if (xhr.error) {
2713
            this.emit('error', xhr.responseText);
2714
        }
2715
        else this.emit('end');
2716
    }
2717
};
2718
2719
Response.prototype.write = function () {
2720
    var xhr = this.xhr;
2721
    if (xhr.responseText.length > this.offset) {
2722
        this.emit('data', xhr.responseText.slice(this.offset));
2723
        this.offset = xhr.responseText.length;
2724
    }
2725
};
2726
2727
});
2728
2729
require.define("/node_modules/http-browserify/lib/isSafeHeader.js", function (require, module, exports, __dirname, __filename) {
2730
    // Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html
2731
var unsafeHeaders = [
2732
    "accept-charset",
2733
    "accept-encoding",
2734
    "access-control-request-headers",
2735
    "access-control-request-method",
2736
    "connection",
2737
    "content-length",
2738
    "cookie",
2739
    "cookie2",
2740
    "content-transfer-encoding",
2741
    "date",
2742
    "expect",
2743
    "host",
2744
    "keep-alive",
2745
    "origin",
2746
    "referer",
2747
    "set-cookie",
2748
    "te",
2749
    "trailer",
2750
    "transfer-encoding",
2751
    "upgrade",
2752
    "user-agent",
2753
    "via"
2754
];
2755
2756
module.exports = function (headerName) {
2757
    if (!headerName) return false;
2758
    return (unsafeHeaders.indexOf(headerName.toLowerCase()) === -1)
2759
};
2760
2761
});
2762
2763
require.alias("http-browserify", "/node_modules/http");
2764
2765
require.alias("http-browserify", "/node_modules/https");
(-)a/api/v1/doc/lib/shred/content.js (+193 lines)
Line 0 Link Here
1
2
// The purpose of the `Content` object is to abstract away the data conversions
3
// to and from raw content entities as strings. For example, you want to be able
4
// to pass in a Javascript object and have it be automatically converted into a
5
// JSON string if the `content-type` is set to a JSON-based media type.
6
// Conversely, you want to be able to transparently get back a Javascript object
7
// in the response if the `content-type` is a JSON-based media-type.
8
9
// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5).
10
11
// The `Content` constructor takes an options object, which *must* have either a
12
// `body` or `data` property and *may* have a `type` property indicating the
13
// media type. If there is no `type` attribute, a default will be inferred.
14
var Content = function(options) {
15
  this.body = options.body;
16
  this.data = options.data;
17
  this.type = options.type;
18
};
19
20
Content.prototype = {
21
  // Treat `toString()` as asking for the `content.body`. That is, the raw content entity.
22
  //
23
  //     toString: function() { return this.body; }
24
  //
25
  // Commented out, but I've forgotten why. :/
26
};
27
28
29
// `Content` objects have the following attributes:
30
Object.defineProperties(Content.prototype,{
31
32
// - **type**. Typically accessed as `content.type`, reflects the `content-type`
33
//   header associated with the request or response. If not passed as an options
34
//   to the constructor or set explicitly, it will infer the type the `data`
35
//   attribute, if possible, and, failing that, will default to `text/plain`.
36
  type: {
37
    get: function() {
38
      if (this._type) {
39
        return this._type;
40
      } else {
41
        if (this._data) {
42
          switch(typeof this._data) {
43
            case "string": return "text/plain";
44
            case "object": return "application/json";
45
          }
46
        }
47
      }
48
      return "text/plain";
49
    },
50
    set: function(value) {
51
      this._type = value;
52
      return this;
53
    },
54
    enumerable: true
55
  },
56
57
// - **data**. Typically accessed as `content.data`, reflects the content entity
58
//   converted into Javascript data. This can be a string, if the `type` is, say,
59
//   `text/plain`, but can also be a Javascript object. The conversion applied is
60
//   based on the `processor` attribute. The `data` attribute can also be set
61
//   directly, in which case the conversion will be done the other way, to infer
62
//   the `body` attribute.
63
  data: {
64
    get: function() {
65
      if (this._body) {
66
        return this.processor.parser(this._body);
67
      } else {
68
        return this._data;
69
      }
70
    },
71
    set: function(data) {
72
      if (this._body&&data) Errors.setDataWithBody(this);
73
      this._data = data;
74
      return this;
75
    },
76
    enumerable: true
77
  },
78
79
// - **body**. Typically accessed as `content.body`, reflects the content entity
80
//   as a UTF-8 string. It is the mirror of the `data` attribute. If you set the
81
//   `data` attribute, the `body` attribute will be inferred and vice-versa. If
82
//   you attempt to set both, an exception is raised.
83
  body: {
84
    get: function() {
85
      if (this._data) {
86
        return this.processor.stringify(this._data);
87
      } else {
88
        return this._body.toString();
89
      }
90
    },
91
    set: function(body) {
92
      if (this._data&&body) Errors.setBodyWithData(this);
93
      this._body = body;
94
      return this;
95
    },
96
    enumerable: true
97
  },
98
99
// - **processor**. The functions that will be used to convert to/from `data` and
100
//   `body` attributes. You can add processors. The two that are built-in are for
101
//   `text/plain`, which is basically an identity transformation and
102
//   `application/json` and other JSON-based media types (including custom media
103
//   types with `+json`). You can add your own processors. See below.
104
  processor: {
105
    get: function() {
106
      var processor = Content.processors[this.type];
107
      if (processor) {
108
        return processor;
109
      } else {
110
        // Return the first processor that matches any part of the
111
        // content type. ex: application/vnd.foobar.baz+json will match json.
112
        var main = this.type.split(";")[0];
113
        var parts = main.split(/\+|\//);
114
        for (var i=0, l=parts.length; i < l; i++) {
115
          processor = Content.processors[parts[i]]
116
        }
117
        return processor || {parser:identity,stringify:toString};
118
      }
119
    },
120
    enumerable: true
121
  },
122
123
// - **length**. Typically accessed as `content.length`, returns the length in
124
//   bytes of the raw content entity.
125
  length: {
126
    get: function() {
127
      if (typeof Buffer !== 'undefined') {
128
        return Buffer.byteLength(this.body);
129
      }
130
      return this.body.length;
131
    }
132
  }
133
});
134
135
Content.processors = {};
136
137
// The `registerProcessor` function allows you to add your own processors to
138
// convert content entities. Each processor consists of a Javascript object with
139
// two properties:
140
// - **parser**. The function used to parse a raw content entity and convert it
141
//   into a Javascript data type.
142
// - **stringify**. The function used to convert a Javascript data type into a
143
//   raw content entity.
144
Content.registerProcessor = function(types,processor) {
145
146
// You can pass an array of types that will trigger this processor, or just one.
147
// We determine the array via duck-typing here.
148
  if (types.forEach) {
149
    types.forEach(function(type) {
150
      Content.processors[type] = processor;
151
    });
152
  } else {
153
    // If you didn't pass an array, we just use what you pass in.
154
    Content.processors[types] = processor;
155
  }
156
};
157
158
// Register the identity processor, which is used for text-based media types.
159
var identity = function(x) { return x; }
160
  , toString = function(x) { return x.toString(); }
161
Content.registerProcessor(
162
  ["text/html","text/plain","text"],
163
  { parser: identity, stringify: toString });
164
165
// Register the JSON processor, which is used for JSON-based media types.
166
Content.registerProcessor(
167
  ["application/json; charset=utf-8","application/json","json"],
168
  {
169
    parser: function(string) {
170
      return JSON.parse(string);
171
    },
172
    stringify: function(data) {
173
      return JSON.stringify(data); }});
174
175
var qs = require('querystring');
176
// Register the post processor, which is used for JSON-based media types.
177
Content.registerProcessor(
178
  ["application/x-www-form-urlencoded"],
179
  { parser : qs.parse, stringify : qs.stringify });
180
181
// Error functions are defined separately here in an attempt to make the code
182
// easier to read.
183
var Errors = {
184
  setDataWithBody: function(object) {
185
    throw new Error("Attempt to set data attribute of a content object " +
186
        "when the body attributes was already set.");
187
  },
188
  setBodyWithData: function(object) {
189
    throw new Error("Attempt to set body attribute of a content object " +
190
        "when the data attributes was already set.");
191
  }
192
}
193
module.exports = Content;
(-)a/api/v1/doc/lib/swagger-client.js (+3294 lines)
Line 0 Link Here
1
/**
2
 * swagger-client - swagger.js is a javascript client for use with swaggering APIs.
3
 * @version v2.1.9-M1
4
 * @link http://swagger.io
5
 * @license apache 2.0
6
 */
7
(function(){
8
var ArrayModel = function(definition) {
9
  this.name = "arrayModel";
10
  this.definition = definition || {};
11
  this.properties = [];
12
13
  var requiredFields = definition.enum || [];
14
  var innerType = definition.items;
15
  if(innerType) {
16
    if(innerType.type) {
17
      this.type = typeFromJsonSchema(innerType.type, innerType.format);
18
    }
19
    else {
20
      this.ref = innerType.$ref;
21
    }
22
  }
23
  return this;
24
};
25
26
ArrayModel.prototype.createJSONSample = function(modelsToIgnore) {
27
  var result;
28
  modelsToIgnore = (modelsToIgnore||{});
29
  if(this.type) {
30
    result = this.type;
31
  }
32
  else if (this.ref) {
33
    var name = simpleRef(this.ref);
34
    if(typeof modelsToIgnore[name] === 'undefined') {
35
      modelsToIgnore[name] = this;
36
      result = models[name].createJSONSample(modelsToIgnore);
37
    }
38
    else {
39
      return name;
40
    }
41
  }
42
  return [ result ];
43
};
44
45
ArrayModel.prototype.getSampleValue = function(modelsToIgnore) {
46
  var result;
47
  modelsToIgnore = (modelsToIgnore || {});
48
  if(this.type) {
49
    result = type;
50
  }
51
  else if (this.ref) {
52
    var name = simpleRef(this.ref);
53
    result = models[name].getSampleValue(modelsToIgnore);
54
  }
55
  return [ result ];
56
};
57
58
ArrayModel.prototype.getMockSignature = function(modelsToIgnore) {
59
  var propertiesStr = [];
60
  var i, prop;
61
  for (i = 0; i < this.properties.length; i++) {
62
    prop = this.properties[i];
63
    propertiesStr.push(prop.toString());
64
  }
65
66
  var strong = '<span class="strong">';
67
  var stronger = '<span class="stronger">';
68
  var strongClose = '</span>';
69
  var classOpen = strong + 'array' + ' {' + strongClose;
70
  var classClose = strong + '}' + strongClose;
71
  var returnVal = classOpen + '<div>' + propertiesStr.join(',</div><div>') + '</div>' + classClose;
72
73
  if (!modelsToIgnore)
74
    modelsToIgnore = {};
75
  modelsToIgnore[this.name] = this;
76
  for (i = 0; i < this.properties.length; i++) {
77
    prop = this.properties[i];
78
    var ref = prop.$ref;
79
    var model = models[ref];
80
    if (model && typeof modelsToIgnore[ref] === 'undefined') {
81
      returnVal = returnVal + ('<br>' + model.getMockSignature(modelsToIgnore));
82
    }
83
  }
84
  return returnVal;
85
};
86
87
88
/**
89
 * SwaggerAuthorizations applys the correct authorization to an operation being executed
90
 */
91
var SwaggerAuthorizations = function() {
92
  this.authz = {};
93
};
94
95
SwaggerAuthorizations.prototype.add = function(name, auth) {
96
  this.authz[name] = auth;
97
  return auth;
98
};
99
100
SwaggerAuthorizations.prototype.remove = function(name) {
101
  return delete this.authz[name];
102
};
103
104
SwaggerAuthorizations.prototype.apply = function (obj, authorizations) {
105
  var status = null;
106
  var key, name, value, result;
107
108
  // if the "authorizations" key is undefined, or has an empty array, add all keys
109
  if (typeof authorizations === 'undefined' || Object.keys(authorizations).length === 0) {
110
    for (key in this.authz) {
111
      value = this.authz[key];
112
      result = value.apply(obj, authorizations);
113
      if (result === true)
114
        status = true;
115
    }
116
  }
117
  else {
118
    // 2.0 support
119
    if (Array.isArray(authorizations)) {
120
121
      for (var i = 0; i < authorizations.length; i++) {
122
        var auth = authorizations[i];
123
        for (name in auth) {
124
          for (key in this.authz) {
125
            if (key == name) {
126
              value = this.authz[key];
127
              result = value.apply(obj, authorizations);
128
              if (result === true)
129
                status = true;
130
            }
131
          }
132
        }
133
      }
134
    }
135
    else {
136
      // 1.2 support
137
      for (name in authorizations) {
138
        for (key in this.authz) {
139
          if (key == name) {
140
            value = this.authz[key];
141
            result = value.apply(obj, authorizations);
142
            if (result === true)
143
              status = true;
144
          }
145
        }
146
      }
147
    }
148
  }
149
150
  return status;
151
};
152
153
/**
154
 * ApiKeyAuthorization allows a query param or header to be injected
155
 */
156
var ApiKeyAuthorization = function(name, value, type) {
157
  this.name = name;
158
  this.value = value;
159
  this.type = type;
160
};
161
162
ApiKeyAuthorization.prototype.apply = function(obj, authorizations) {
163
  if (this.type === "query") {
164
    if (obj.url.indexOf('?') > 0)
165
      obj.url = obj.url + "&" + this.name + "=" + this.value;
166
    else
167
      obj.url = obj.url + "?" + this.name + "=" + this.value;
168
    return true;
169
  } else if (this.type === "header") {
170
    obj.headers[this.name] = this.value;
171
    return true;
172
  }
173
};
174
175
var CookieAuthorization = function(cookie) {
176
  this.cookie = cookie;
177
};
178
179
CookieAuthorization.prototype.apply = function(obj, authorizations) {
180
  obj.cookieJar = obj.cookieJar || CookieJar();
181
  obj.cookieJar.setCookie(this.cookie);
182
  return true;
183
};
184
185
/**
186
 * Password Authorization is a basic auth implementation
187
 */
188
var PasswordAuthorization = function(name, username, password) {
189
  this.name = name;
190
  this.username = username;
191
  this.password = password;
192
  this._btoa = null;
193
  if (typeof window !== 'undefined')
194
    this._btoa = btoa;
195
  else
196
    this._btoa = require("btoa");
197
};
198
199
PasswordAuthorization.prototype.apply = function(obj, authorizations) {
200
  var base64encoder = this._btoa;
201
  obj.headers.Authorization = "Basic " + base64encoder(this.username + ":" + this.password);
202
  return true;
203
};
204
var __bind = function(fn, me){
205
  return function(){
206
    return fn.apply(me, arguments);
207
  };
208
};
209
210
fail = function(message) {
211
  log(message);
212
};
213
214
log = function(){
215
  log.history = log.history || [];
216
  log.history.push(arguments);
217
  if(this.console){
218
    console.log( Array.prototype.slice.call(arguments)[0] );
219
  }
220
};
221
222
if (!Array.prototype.indexOf) {
223
  Array.prototype.indexOf = function(obj, start) {
224
    for (var i = (start || 0), j = this.length; i < j; i++) {
225
      if (this[i] === obj) { return i; }
226
    }
227
    return -1;
228
  };
229
}
230
231
/**
232
 * allows override of the default value based on the parameter being
233
 * supplied
234
 **/
235
var applyParameterMacro = function (operation, parameter) {
236
  var e = (typeof window !== 'undefined' ? window : exports);
237
  if(e.parameterMacro)
238
    return e.parameterMacro(operation, parameter);
239
  else
240
    return parameter.defaultValue;
241
};
242
243
/**
244
 * allows overriding the default value of an model property
245
 **/
246
var applyModelPropertyMacro = function (model, property) {
247
  var e = (typeof window !== 'undefined' ? window : exports);
248
  if(e.modelPropertyMacro)
249
    return e.modelPropertyMacro(model, property);
250
  else
251
    return property.defaultValue;
252
};
253
254
/**
255
 * PrimitiveModel
256
 **/
257
var PrimitiveModel = function(definition) {
258
  this.name = "name";
259
  this.definition = definition || {};
260
  this.properties = [];
261
262
  var requiredFields = definition.enum || [];
263
  this.type = typeFromJsonSchema(definition.type, definition.format);
264
};
265
266
PrimitiveModel.prototype.createJSONSample = function(modelsToIgnore) {
267
  var result = this.type;
268
  return result;
269
};
270
271
PrimitiveModel.prototype.getSampleValue = function() {
272
  var result = this.type;
273
  return null;
274
};
275
276
PrimitiveModel.prototype.getMockSignature = function(modelsToIgnore) {
277
  var propertiesStr = [];
278
  var i, prop;
279
  for (i = 0; i < this.properties.length; i++) {
280
    prop = this.properties[i];
281
    propertiesStr.push(prop.toString());
282
  }
283
284
  var strong = '<span class="strong">';
285
  var stronger = '<span class="stronger">';
286
  var strongClose = '</span>';
287
  var classOpen = strong + this.name + ' {' + strongClose;
288
  var classClose = strong + '}' + strongClose;
289
  var returnVal = classOpen + '<div>' + propertiesStr.join(',</div><div>') + '</div>' + classClose;
290
291
  if (!modelsToIgnore)
292
    modelsToIgnore = {};
293
  modelsToIgnore[this.name] = this;
294
  for (i = 0; i < this.properties.length; i++) {
295
    prop = this.properties[i];
296
    var ref = prop.$ref;
297
    var model = models[ref];
298
    if (model && typeof modelsToIgnore[ref] === 'undefined') {
299
      returnVal = returnVal + ('<br>' + model.getMockSignature(modelsToIgnore));
300
    }
301
  }
302
  return returnVal;
303
};
304
/**
305
 * Resolves a spec's remote references
306
 */
307
var Resolver = function (){};
308
309
Resolver.prototype.resolve = function(spec, callback, scope) {
310
  this.scope = (scope || this);
311
  var host, name, path, property, propertyName, type;
312
  var processedCalls = 0, resolvedRefs = {}, unresolvedRefs = {};
313
314
  // store objects for dereferencing
315
  var resolutionTable = {};
316
317
  // models
318
  for(name in spec.definitions) {
319
    var model = spec.definitions[name];
320
    for(propertyName in model.properties) {
321
      property = model.properties[propertyName];
322
      this.resolveTo(property, resolutionTable);
323
    }
324
  }
325
  // operations
326
  for(name in spec.paths) {
327
    var method, operation, responseCode;
328
    path = spec.paths[name];
329
    for(method in path) {
330
      operation = path[method];
331
      var i, parameters = operation.parameters;
332
      for(i in parameters) {
333
        var parameter = parameters[i];
334
        if(parameter.in === 'body' && parameter.schema) {
335
          this.resolveTo(parameter.schema, resolutionTable);
336
        }
337
        if(parameter.$ref) {
338
          this.resolveInline(spec, parameter, resolutionTable, unresolvedRefs);
339
        }
340
      }
341
      for(responseCode in operation.responses) {
342
        var response = operation.responses[responseCode];
343
        if(response.schema) {
344
          this.resolveTo(response.schema, resolutionTable);
345
        }
346
      }
347
    }
348
  }
349
  // get hosts
350
  var opts = {}, expectedCalls = 0;
351
  for(name in resolutionTable) {
352
    var parts = name.split('#');
353
    if(parts.length == 2) {
354
      host = parts[0]; path = parts[1];
355
      if(!Array.isArray(opts[host])) {
356
        opts[host] = [];
357
        expectedCalls += 1;
358
      }
359
      opts[host].push(path);
360
    }
361
  }
362
363
  for(name in opts) {
364
    var self = this, opt = opts[name];
365
    host = name;
366
367
    var obj = {
368
      useJQuery: false,  // TODO
369
      url: host,
370
      method: "get",
371
      headers: {
372
        accept: this.scope.swaggerRequestHeaders || 'application/json'
373
      },
374
      on: {
375
        error: function(response) {
376
          processedCalls += 1;
377
          var i;
378
          for(i = 0; i < opt.length; i++) {
379
            // fail all of these
380
            var resolved = host + '#' + opt[i];
381
            unresolvedRefs[resolved] = null;
382
          }
383
          if(processedCalls === expectedCalls)
384
            self.finish(spec, resolutionTable, resolvedRefs, unresolvedRefs, callback);
385
        },
386
        response: function(response) {
387
          var i, j, swagger = response.obj;
388
          processedCalls += 1;
389
          for(i = 0; i < opt.length; i++) {
390
            var location = swagger, path = opt[i], parts = path.split('/');
391
            for(j = 0; j < parts.length; j++) {
392
              var segment = parts[j];
393
              if(typeof location === 'undefined')
394
                break;
395
              if(segment.length > 0)
396
                location = location[segment];
397
            }
398
            var resolved = host + '#' + path, resolvedName = parts[j-1];
399
            if(typeof location !== 'undefined') {
400
              resolvedRefs[resolved] = {
401
                name: resolvedName,
402
                obj: location
403
              };
404
            }
405
            else unresolvedRefs[resolved] = null;
406
          }
407
          if(processedCalls === expectedCalls)
408
            self.finish(spec, resolutionTable, resolvedRefs, unresolvedRefs, callback);
409
        }
410
      }
411
    };
412
    authorizations.apply(obj);
413
    new SwaggerHttp().execute(obj);
414
  }
415
  if(Object.keys(opts).length === 0)
416
    callback.call(this.scope, spec, unresolvedRefs);
417
};
418
419
Resolver.prototype.finish = function(spec, resolutionTable, resolvedRefs, unresolvedRefs, callback) {
420
  // walk resolution table and replace with resolved refs
421
  var ref;
422
  for(ref in resolutionTable) {
423
    var i, locations = resolutionTable[ref];
424
    for(i = 0; i < locations.length; i++) {
425
      var resolvedTo = resolvedRefs[locations[i].obj.$ref];
426
      if(resolvedTo) {
427
        if(!spec.definitions)
428
          spec.definitions = {};
429
        if(locations[i].resolveAs === '$ref') {
430
          spec.definitions[resolvedTo.name] = resolvedTo.obj;
431
          locations[i].obj.$ref = '#/definitions/' + resolvedTo.name;
432
        }
433
        else if (locations[i].resolveAs === 'inline') {
434
          var key;
435
          var targetObj = locations[i].obj;
436
          delete targetObj.$ref;
437
          for(key in resolvedTo.obj) {
438
            targetObj[key] = resolvedTo.obj[key];
439
          }
440
        }
441
      }
442
    }
443
  }
444
  callback.call(this.scope, spec, unresolvedRefs);
445
};
446
447
/**
448
 * immediately in-lines local refs, queues remote refs
449
 * for inline resolution
450
 */
451
Resolver.prototype.resolveInline = function (spec, property, objs, unresolvedRefs) {
452
  var ref = property.$ref;
453
  if(ref) {
454
    if(ref.indexOf('http') === 0) {
455
      if(Array.isArray(objs[ref])) {
456
        objs[ref].push({obj: property, resolveAs: 'inline'});
457
      }
458
      else {
459
        objs[ref] = [{obj: property, resolveAs: 'inline'}];
460
      }
461
    }
462
    else if (ref.indexOf('#') === 0) {
463
      // local resolve
464
      var shortenedRef = ref.substring(1);
465
      var i, parts = shortenedRef.split('/'), location = spec;
466
      for(i = 0; i < parts.length; i++) {
467
        var part = parts[i];
468
        if(part.length > 0) {
469
          location = location[part];
470
        }
471
      }
472
      if(location) {
473
        delete property.$ref;
474
        var key;
475
        for(key in location) {
476
          property[key] = location[key];
477
        }
478
      }
479
      else unresolvedRefs[ref] = null;
480
    }
481
  }
482
  else if(property.type === 'array') {
483
    this.resolveTo(property.items, objs);
484
  }
485
};
486
487
Resolver.prototype.resolveTo = function (property, objs) {
488
  var ref = property.$ref;
489
  if(ref) {
490
    if(ref.indexOf('http') === 0) {
491
      if(Array.isArray(objs[ref])) {
492
        objs[ref].push({obj: property, resolveAs: '$ref'});
493
      }
494
      else {
495
        objs[ref] = [{obj: property, resolveAs: '$ref'}];
496
      }
497
    }
498
  }
499
  else if(property.type === 'array') {
500
    var items = property.items;
501
    this.resolveTo(items, objs);
502
  }
503
};
504
var addModel = function(name, model) {
505
  models[name] = model;
506
};
507
508
var SwaggerClient = function(url, options) {
509
  this.isBuilt = false;
510
  this.url = null;
511
  this.debug = false;
512
  this.basePath = null;
513
  this.modelsArray = [];
514
  this.authorizations = null;
515
  this.authorizationScheme = null;
516
  this.isValid = false;
517
  this.info = null;
518
  this.useJQuery = false;
519
  this.resourceCount = 0;
520
521
  if(typeof url !== 'undefined')
522
    return this.initialize(url, options);
523
};
524
525
SwaggerClient.prototype.initialize = function (url, options) {
526
  this.models = models = {};
527
528
  options = (options||{});
529
530
  if(typeof url === 'string')
531
    this.url = url;
532
  else if(typeof url === 'object') {
533
    options = url;
534
    this.url = options.url;
535
  }
536
  this.swaggerRequstHeaders = options.swaggerRequstHeaders || 'application/json;charset=utf-8,*/*';
537
  this.defaultSuccessCallback = options.defaultSuccessCallback || null;
538
  this.defaultErrorCallback = options.defaultErrorCallback || null;
539
540
  if (typeof options.success === 'function')
541
    this.success = options.success;
542
543
  if (options.useJQuery)
544
    this.useJQuery = options.useJQuery;
545
546
  if (options.authorizations) {
547
    this.clientAuthorizations = options.authorizations;
548
  } else {
549
    this.clientAuthorizations = authorizations;
550
  }
551
552
  this.supportedSubmitMethods = options.supportedSubmitMethods || [];
553
  this.failure = options.failure || function() {};
554
  this.progress = options.progress || function() {};
555
  this.spec = options.spec;
556
  this.options = options;
557
558
  if (typeof options.success === 'function') {
559
    this.ready = true;
560
    this.build();
561
  }
562
};
563
564
SwaggerClient.prototype.build = function(mock) {
565
  if (this.isBuilt) return this;
566
  var self = this;
567
  this.progress('fetching resource list: ' + this.url);
568
  var obj = {
569
    useJQuery: this.useJQuery,
570
    url: this.url,
571
    method: "get",
572
    headers: {
573
      accept: this.swaggerRequstHeaders
574
    },
575
    on: {
576
      error: function(response) {
577
        if (self.url.substring(0, 4) !== 'http')
578
          return self.fail('Please specify the protocol for ' + self.url);
579
        else if (response.status === 0)
580
          return self.fail('Can\'t read from server.  It may not have the appropriate access-control-origin settings.');
581
        else if (response.status === 404)
582
          return self.fail('Can\'t read swagger JSON from ' + self.url);
583
        else
584
          return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url);
585
      },
586
      response: function(resp) {
587
        var responseObj = resp.obj || JSON.parse(resp.data);
588
        self.swaggerVersion = responseObj.swaggerVersion;
589
590
        if(responseObj.swagger && parseInt(responseObj.swagger) === 2) {
591
          self.swaggerVersion = responseObj.swagger;
592
          new Resolver().resolve(responseObj, self.buildFromSpec, self);
593
          self.isValid = true;
594
        }
595
        else {
596
          if (self.swaggerVersion === '1.2') {
597
            return self.buildFrom1_2Spec(responseObj);
598
          } else {
599
            return self.buildFrom1_1Spec(responseObj);
600
          }
601
        }
602
      }
603
    }
604
  };
605
  if(this.spec) {
606
    setTimeout(function() {
607
      new Resolver().resolve(self.spec, self.buildFromSpec, self);
608
   }, 10);
609
  }
610
  else {
611
    authorizations.apply(obj);
612
    if(mock)
613
      return obj;
614
    new SwaggerHttp().execute(obj);
615
  }
616
  return this;
617
};
618
619
SwaggerClient.prototype.buildFromSpec = function(response) {
620
  if(this.isBuilt) return this;
621
622
  this.info = response.info || {};
623
  this.title = response.title || '';
624
  this.host = response.host || '';
625
  this.schemes = response.schemes || [];
626
  this.basePath = response.basePath || '';
627
  this.apis = {};
628
  this.apisArray = [];
629
  this.consumes = response.consumes;
630
  this.produces = response.produces;
631
  this.securityDefinitions = response.securityDefinitions;
632
633
  // legacy support
634
  this.authSchemes = response.securityDefinitions;
635
636
  var definedTags = {};
637
  if(Array.isArray(response.tags)) {
638
    definedTags = {};
639
    for(k = 0; k < response.tags.length; k++) {
640
      var t = response.tags[k];
641
      definedTags[t.name] = t;
642
    }
643
  }
644
645
  var location;
646
  if(typeof this.url === 'string') {
647
    location = this.parseUri(this.url);
648
  }
649
650
  if(typeof this.schemes === 'undefined' || this.schemes.length === 0) {
651
    this.scheme = location.scheme || 'http';
652
  }
653
  else {
654
    this.scheme = this.schemes[0];
655
  }
656
657
  if(typeof this.host === 'undefined' || this.host === '') {
658
    this.host = location.host;
659
    if (location.port) {
660
      this.host = this.host + ':' + location.port;
661
    }
662
  }
663
664
  this.definitions = response.definitions;
665
  var key;
666
  for(key in this.definitions) {
667
    var model = new Model(key, this.definitions[key]);
668
    if(model) {
669
      models[key] = model;
670
    }
671
  }
672
673
  // get paths, create functions for each operationId
674
  var path;
675
  var operations = [];
676
  for(path in response.paths) {
677
    if(typeof response.paths[path] === 'object') {
678
      var httpMethod;
679
      for(httpMethod in response.paths[path]) {
680
        if(['delete', 'get', 'head', 'options', 'patch', 'post', 'put'].indexOf(httpMethod) === -1) {
681
          continue;
682
        }
683
        var operation = response.paths[path][httpMethod];
684
        var tags = operation.tags;
685
        if(typeof tags === 'undefined') {
686
          operation.tags = [ 'default' ];
687
          tags = operation.tags;
688
        }
689
        var operationId = this.idFromOp(path, httpMethod, operation);
690
        var operationObject = new Operation (
691
          this,
692
          operation.scheme,
693
          operationId,
694
          httpMethod,
695
          path,
696
          operation,
697
          this.definitions
698
        );
699
        // bind this operation's execute command to the api
700
        if(tags.length > 0) {
701
          var i;
702
          for(i = 0; i < tags.length; i++) {
703
            var tag = this.tagFromLabel(tags[i]);
704
            var operationGroup = this[tag];
705
            if(typeof this.apis[tag] === 'undefined')
706
              this.apis[tag] = {};
707
            if(typeof operationGroup === 'undefined') {
708
              this[tag] = [];
709
              operationGroup = this[tag];
710
              operationGroup.operations = {};
711
              operationGroup.label = tag;
712
              operationGroup.apis = [];
713
              var tagObject = definedTags[tag];
714
              if(typeof tagObject === 'object') {
715
                operationGroup.description = tagObject.description;
716
                operationGroup.externalDocs = tagObject.externalDocs;
717
              }
718
              this[tag].help = this.help.bind(operationGroup);
719
              this.apisArray.push(new OperationGroup(tag, operationGroup.description, operationGroup.externalDocs, operationObject));
720
            }
721
            if(typeof this.apis[tag].help !== 'function')
722
              this.apis[tag].help = this.help.bind(operationGroup);
723
            // bind to the apis object
724
            this.apis[tag][operationId] = operationObject.execute.bind(operationObject);
725
            this.apis[tag][operationId].help = operationObject.help.bind(operationObject);
726
            this.apis[tag][operationId].asCurl = operationObject.asCurl.bind(operationObject);
727
            operationGroup[operationId] = operationObject.execute.bind(operationObject);
728
            operationGroup[operationId].help = operationObject.help.bind(operationObject);
729
            operationGroup[operationId].asCurl = operationObject.asCurl.bind(operationObject);
730
731
            operationGroup.apis.push(operationObject);
732
            operationGroup.operations[operationId] = operationObject;
733
734
            // legacy UI feature
735
            var j;
736
            var api;
737
            for(j = 0; j < this.apisArray.length; j++) {
738
              if(this.apisArray[j].tag === tag) {
739
                api = this.apisArray[j];
740
              }
741
            }
742
            if(api) {
743
              api.operationsArray.push(operationObject);
744
            }
745
          }
746
        }
747
        else {
748
          log('no group to bind to');
749
        }
750
      }
751
    }
752
  }
753
  this.isBuilt = true;
754
  if (this.success) {
755
    this.isValid = true;
756
    this.isBuilt = true;
757
    this.success();
758
  }
759
  return this;
760
};
761
762
SwaggerClient.prototype.parseUri = function(uri) {
763
  var urlParseRE = /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/;
764
  var parts = urlParseRE.exec(uri);
765
  return {
766
    scheme: parts[4].replace(':',''),
767
    host: parts[11],
768
    port: parts[12],
769
    path: parts[15]
770
  };
771
};
772
773
SwaggerClient.prototype.help = function(dontPrint) {
774
  var i;
775
  var output = 'operations for the "' + this.label + '" tag';
776
  for(i = 0; i < this.apis.length; i++) {
777
    var api = this.apis[i];
778
    output += '\n  * ' + api.nickname + ': ' + api.operation.summary;
779
  }
780
  if(dontPrint)
781
    return output;
782
  else {
783
    log(output);
784
    return output;
785
  }
786
};
787
788
SwaggerClient.prototype.tagFromLabel = function(label) {
789
  return label;
790
};
791
792
SwaggerClient.prototype.idFromOp = function(path, httpMethod, op) {
793
  var opId = op.operationId || (path.substring(1) + '_' + httpMethod);
794
  return opId.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()\+\s]/g,'_');
795
};
796
797
SwaggerClient.prototype.fail = function(message) {
798
  this.failure(message);
799
  throw message;
800
};
801
802
var OperationGroup = function(tag, description, externalDocs, operation) {
803
  this.tag = tag;
804
  this.path = tag;
805
  this.description = description;
806
  this.externalDocs = externalDocs;
807
  this.name = tag;
808
  this.operation = operation;
809
  this.operationsArray = [];
810
};
811
812
var Operation = function(parent, scheme, operationId, httpMethod, path, args, definitions) {
813
  var errors = [];
814
  parent = parent||{};
815
  args = args||{};
816
817
  this.operations = {};
818
  this.operation = args;
819
  this.deprecated = args.deprecated;
820
  this.consumes = args.consumes;
821
  this.produces = args.produces;
822
  this.parent = parent;
823
  this.host = parent.host || 'localhost';
824
  this.schemes = parent.schemes;
825
  this.scheme = scheme || parent.scheme || 'http';
826
  this.basePath = parent.basePath || '/';
827
  this.nickname = (operationId||errors.push('Operations must have a nickname.'));
828
  this.method = (httpMethod||errors.push('Operation ' + operationId + ' is missing method.'));
829
  this.path = (path||errors.push('Operation ' + this.nickname + ' is missing path.'));
830
  this.parameters = args !== null ? (args.parameters||[]) : {};
831
  this.summary = args.summary || '';
832
  this.responses = (args.responses||{});
833
  this.type = null;
834
  this.security = args.security;
835
  this.authorizations = args.security;
836
  this.description = args.description;
837
  this.useJQuery = parent.useJQuery;
838
839
  if(typeof this.deprecated === 'string') {
840
    switch(this.deprecated.toLowerCase()) {
841
      case 'true': case 'yes': case '1': {
842
        this.deprecated = true;
843
        break;
844
      }
845
      case 'false': case 'no': case '0': case null: {
846
        this.deprecated = false;
847
        break;
848
      }
849
      default: this.deprecated = Boolean(this.deprecated);
850
    }
851
  }
852
853
  var i, model;
854
855
  if(definitions) {
856
    // add to global models
857
    var key;
858
    for(key in this.definitions) {
859
      model = new Model(key, definitions[key]);
860
      if(model) {
861
        models[key] = model;
862
      }
863
    }
864
  }
865
  for(i = 0; i < this.parameters.length; i++) {
866
    var param = this.parameters[i];
867
    if(param.type === 'array') {
868
      param.isList = true;
869
      param.allowMultiple = true;
870
    }
871
    var innerType = this.getType(param);
872
    if(innerType && innerType.toString().toLowerCase() === 'boolean') {
873
      param.allowableValues = {};
874
      param.isList = true;
875
      param['enum'] = ["true", "false"];
876
    }
877
    if(typeof param['enum'] !== 'undefined') {
878
      var id;
879
      param.allowableValues = {};
880
      param.allowableValues.values = [];
881
      param.allowableValues.descriptiveValues = [];
882
      for(id = 0; id < param['enum'].length; id++) {
883
        var value = param['enum'][id];
884
        var isDefault = (value === param.default) ? true : false;
885
        param.allowableValues.values.push(value);
886
        param.allowableValues.descriptiveValues.push({value : value, isDefault: isDefault});
887
      }
888
    }
889
    if(param.type === 'array') {
890
      innerType = [innerType];
891
      if(typeof param.allowableValues === 'undefined') {
892
        // can't show as a list if no values to select from
893
        delete param.isList;
894
        delete param.allowMultiple;
895
      }
896
    }
897
    param.signature = this.getModelSignature(innerType, models).toString();
898
    param.sampleJSON = this.getModelSampleJSON(innerType, models);
899
    param.responseClassSignature = param.signature;
900
  }
901
902
  var defaultResponseCode, response, responses = this.responses;
903
904
  if(responses['200']) {
905
    response = responses['200'];
906
    defaultResponseCode = '200';
907
  }
908
  else if(responses['201']) {
909
    response = responses['201'];
910
    defaultResponseCode = '201';
911
  }
912
  else if(responses['202']) {
913
    response = responses['202'];
914
    defaultResponseCode = '202';
915
  }
916
  else if(responses['203']) {
917
    response = responses['203'];
918
    defaultResponseCode = '203';
919
  }
920
  else if(responses['204']) {
921
    response = responses['204'];
922
    defaultResponseCode = '204';
923
  }
924
  else if(responses['205']) {
925
    response = responses['205'];
926
    defaultResponseCode = '205';
927
  }
928
  else if(responses['206']) {
929
    response = responses['206'];
930
    defaultResponseCode = '206';
931
  }
932
  else if(responses['default']) {
933
    response = responses['default'];
934
    defaultResponseCode = 'default';
935
  }
936
937
  if(response && response.schema) {
938
    var resolvedModel = this.resolveModel(response.schema, definitions);
939
    delete responses[defaultResponseCode];
940
    if(resolvedModel) {
941
      this.successResponse = {};
942
      this.successResponse[defaultResponseCode] = resolvedModel;
943
    }
944
    else {
945
      this.successResponse = {};
946
      this.successResponse[defaultResponseCode] = response.schema.type;
947
    }
948
    this.type = response;
949
  }
950
951
  if (errors.length > 0) {
952
    if(this.resource && this.resource.api && this.resource.api.fail)
953
      this.resource.api.fail(errors);
954
  }
955
956
  return this;
957
};
958
959
OperationGroup.prototype.sort = function(sorter) {
960
961
};
962
963
Operation.prototype.getType = function (param) {
964
  var type = param.type;
965
  var format = param.format;
966
  var isArray = false;
967
  var str;
968
  if(type === 'integer' && format === 'int32')
969
    str = 'integer';
970
  else if(type === 'integer' && format === 'int64')
971
    str = 'long';
972
  else if(type === 'integer')
973
    str = 'integer';
974
  else if(type === 'string') {
975
    if(format === 'date-time')
976
      str = 'date-time';
977
    else if(format === 'date')
978
      str = 'date';
979
    else
980
      str = 'string';
981
  }
982
  else if(type === 'number' && format === 'float')
983
    str = 'float';
984
  else if(type === 'number' && format === 'double')
985
    str = 'double';
986
  else if(type === 'number')
987
    str = 'double';
988
  else if(type === 'boolean')
989
    str = 'boolean';
990
  else if(type === 'array') {
991
    isArray = true;
992
    if(param.items)
993
      str = this.getType(param.items);
994
  }
995
  if(param.$ref)
996
    str = param.$ref;
997
998
  var schema = param.schema;
999
  if(schema) {
1000
    var ref = schema.$ref;
1001
    if(ref) {
1002
      ref = simpleRef(ref);
1003
      if(isArray)
1004
        return [ ref ];
1005
      else
1006
        return ref;
1007
    }
1008
    else
1009
      return this.getType(schema);
1010
  }
1011
  if(isArray)
1012
    return [ str ];
1013
  else
1014
    return str;
1015
};
1016
1017
Operation.prototype.resolveModel = function (schema, definitions) {
1018
  if(typeof schema.$ref !== 'undefined') {
1019
    var ref = schema.$ref;
1020
    if(ref.indexOf('#/definitions/') === 0)
1021
      ref = ref.substring('#/definitions/'.length);
1022
    if(definitions[ref]) {
1023
      return new Model(ref, definitions[ref]);
1024
    }
1025
  }
1026
  if(schema.type === 'array')
1027
    return new ArrayModel(schema);
1028
  else
1029
    return null;
1030
};
1031
1032
Operation.prototype.help = function(dontPrint) {
1033
  var out = this.nickname + ': ' + this.summary + '\n';
1034
  for(var i = 0; i < this.parameters.length; i++) {
1035
    var param = this.parameters[i];
1036
    var typeInfo = param.signature;
1037
    out += '\n  * ' + param.name + ' (' + typeInfo + '): ' + param.description;
1038
  }
1039
  if(typeof dontPrint === 'undefined')
1040
    log(out);
1041
  return out;
1042
};
1043
1044
Operation.prototype.getModelSignature = function(type, definitions) {
1045
  var isPrimitive, listType;
1046
1047
  if(type instanceof Array) {
1048
    listType = true;
1049
    type = type[0];
1050
  }
1051
  else if(typeof type === 'undefined')
1052
    type = 'undefined';
1053
1054
  if(type === 'string')
1055
    isPrimitive = true;
1056
  else
1057
    isPrimitive = (listType && definitions[listType]) || (definitions[type]) ? false : true;
1058
  if (isPrimitive) {
1059
    if(listType)
1060
      return 'Array[' + type + ']';
1061
    else
1062
      return type.toString();
1063
  } else {
1064
    if (listType)
1065
      return 'Array[' + definitions[type].getMockSignature() + ']';
1066
    else
1067
      return definitions[type].getMockSignature();
1068
  }
1069
};
1070
1071
Operation.prototype.supportHeaderParams = function () {
1072
  return true;
1073
};
1074
1075
Operation.prototype.supportedSubmitMethods = function () {
1076
  return this.parent.supportedSubmitMethods;
1077
};
1078
1079
Operation.prototype.getHeaderParams = function (args) {
1080
  var headers = this.setContentTypes(args, {});
1081
  for(var i = 0; i < this.parameters.length; i++) {
1082
    var param = this.parameters[i];
1083
    if(typeof args[param.name] !== 'undefined') {
1084
      if (param.in === 'header') {
1085
        var value = args[param.name];
1086
        if(Array.isArray(value))
1087
          value = value.toString();
1088
        headers[param.name] = value;
1089
      }
1090
    }
1091
  }
1092
  return headers;
1093
};
1094
1095
Operation.prototype.urlify = function (args) {
1096
  var formParams = {};
1097
  var requestUrl = this.path;
1098
1099
  // grab params from the args, build the querystring along the way
1100
  var querystring = '';
1101
  for(var i = 0; i < this.parameters.length; i++) {
1102
    var param = this.parameters[i];
1103
    if(typeof args[param.name] !== 'undefined') {
1104
      if(param.in === 'path') {
1105
        var reg = new RegExp('\{' + param.name + '\}', 'gi');
1106
        var value = args[param.name];
1107
        if(Array.isArray(value))
1108
          value = this.encodePathCollection(param.collectionFormat, param.name, value);
1109
        else
1110
          value = this.encodePathParam(value);
1111
        requestUrl = requestUrl.replace(reg, value);
1112
      }
1113
      else if (param.in === 'query' && typeof args[param.name] !== 'undefined') {
1114
        if(querystring === '')
1115
          querystring += '?';
1116
        else
1117
          querystring += '&';
1118
        if(typeof param.collectionFormat !== 'undefined') {
1119
          var qp = args[param.name];
1120
          if(Array.isArray(qp))
1121
            querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp);
1122
          else
1123
            querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]);
1124
        }
1125
        else
1126
          querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]);
1127
      }
1128
      else if (param.in === 'formData')
1129
        formParams[param.name] = args[param.name];
1130
    }
1131
  }
1132
  var url = this.scheme + '://' + this.host;
1133
1134
  if(this.basePath !== '/')
1135
    url += this.basePath;
1136
1137
  return url + requestUrl + querystring;
1138
};
1139
1140
Operation.prototype.getMissingParams = function(args) {
1141
  var missingParams = [];
1142
  // check required params, track the ones that are missing
1143
  var i;
1144
  for(i = 0; i < this.parameters.length; i++) {
1145
    var param = this.parameters[i];
1146
    if(param.required === true) {
1147
      if(typeof args[param.name] === 'undefined')
1148
        missingParams = param.name;
1149
    }
1150
  }
1151
  return missingParams;
1152
};
1153
1154
Operation.prototype.getBody = function(headers, args, opts) {
1155
  var formParams = {}, body, key;
1156
1157
  for(var i = 0; i < this.parameters.length; i++) {
1158
    var param = this.parameters[i];
1159
    if(typeof args[param.name] !== 'undefined') {
1160
      if (param.in === 'body') {
1161
        body = args[param.name];
1162
      } else if(param.in === 'formData') {
1163
        formParams[param.name] = args[param.name];
1164
      }
1165
    }
1166
  }
1167
1168
  // handle form params
1169
  if(headers['Content-Type'] === 'application/x-www-form-urlencoded') {
1170
    var encoded = "";
1171
    for(key in formParams) {
1172
      value = formParams[key];
1173
      if(typeof value !== 'undefined'){
1174
        if(encoded !== "")
1175
          encoded += "&";
1176
        encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value);
1177
      }
1178
    }
1179
    body = encoded;
1180
  }
1181
  else if (headers['Content-Type'] && headers['Content-Type'].indexOf('multipart/form-data') >= 0) {
1182
    if(opts.useJQuery) {
1183
      var bodyParam = new FormData();
1184
      bodyParam.type = 'formData';
1185
      for (key in formParams) {
1186
        value = args[key];
1187
        if (typeof value !== 'undefined') {
1188
          // required for jquery file upload
1189
          if(value.type === 'file' && value.value) {
1190
            delete headers['Content-Type'];
1191
            bodyParam.append(key, value.value);
1192
          }
1193
          else
1194
            bodyParam.append(key, value);
1195
        }
1196
      }
1197
      body = bodyParam;
1198
    }
1199
  }
1200
1201
  return body;
1202
};
1203
1204
/**
1205
 * gets sample response for a single operation
1206
 **/
1207
Operation.prototype.getModelSampleJSON = function(type, models) {
1208
  var isPrimitive, listType, sampleJson;
1209
1210
  listType = (type instanceof Array);
1211
  isPrimitive = models[type] ? false : true;
1212
  sampleJson = isPrimitive ? void 0 : models[type].createJSONSample();
1213
  if (sampleJson) {
1214
    sampleJson = listType ? [sampleJson] : sampleJson;
1215
    if(typeof sampleJson == 'string')
1216
      return sampleJson;
1217
    else if(typeof sampleJson === 'object') {
1218
      var t = sampleJson;
1219
      if(sampleJson instanceof Array && sampleJson.length > 0) {
1220
        t = sampleJson[0];
1221
      }
1222
      if(t.nodeName) {
1223
        var xmlString = new XMLSerializer().serializeToString(t);
1224
        return this.formatXml(xmlString);
1225
      }
1226
      else
1227
        return JSON.stringify(sampleJson, null, 2);
1228
    }
1229
    else
1230
      return sampleJson;
1231
  }
1232
};
1233
1234
/**
1235
 * legacy binding
1236
 **/
1237
Operation.prototype["do"] = function(args, opts, callback, error, parent) {
1238
  return this.execute(args, opts, callback, error, parent);
1239
};
1240
1241
1242
/**
1243
 * executes an operation
1244
 **/
1245
Operation.prototype.execute = function(arg1, arg2, arg3, arg4, parent) {
1246
  var args = arg1 || {};
1247
  var opts = {}, success, error;
1248
  if(typeof arg2 === 'object') {
1249
    opts = arg2;
1250
    success = arg3;
1251
    error = arg4;
1252
  }
1253
1254
  if(typeof arg2 === 'function') {
1255
    success = arg2;
1256
    error = arg3;
1257
  }
1258
1259
  success = (success||log);
1260
  error = (error||log);
1261
1262
  if(opts.useJQuery)
1263
    this.useJQuery = opts.useJQuery;
1264
1265
  var missingParams = this.getMissingParams(args);
1266
  if(missingParams.length > 0) {
1267
    var message = 'missing required params: ' + missingParams;
1268
    fail(message);
1269
    return;
1270
  }
1271
  var allHeaders = this.getHeaderParams(args);
1272
  var contentTypeHeaders = this.setContentTypes(args, opts);
1273
1274
  var headers = {}, attrname;
1275
  for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; }
1276
  for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; }
1277
1278
  var body = this.getBody(headers, args, opts);
1279
  var url = this.urlify(args);
1280
1281
  var obj = {
1282
    url: url,
1283
    method: this.method.toUpperCase(),
1284
    body: body,
1285
    useJQuery: this.useJQuery,
1286
    headers: headers,
1287
    on: {
1288
      response: function(response) {
1289
        return success(response, parent);
1290
      },
1291
      error: function(response) {
1292
        return error(response, parent);
1293
      }
1294
    }
1295
  };
1296
  var status = authorizations.apply(obj, this.operation.security);
1297
  if(opts.mock === true)
1298
    return obj;
1299
  else
1300
    new SwaggerHttp().execute(obj, opts);
1301
};
1302
1303
Operation.prototype.setContentTypes = function(args, opts) {
1304
  // default type
1305
  var accepts = 'application/json';
1306
  var consumes = args.parameterContentType || 'application/json';
1307
  var allDefinedParams = this.parameters;
1308
  var definedFormParams = [];
1309
  var definedFileParams = [];
1310
  var body;
1311
  var headers = {};
1312
1313
  // get params from the operation and set them in definedFileParams, definedFormParams, headers
1314
  var i;
1315
  for(i = 0; i < allDefinedParams.length; i++) {
1316
    var param = allDefinedParams[i];
1317
    if(param.in === 'formData') {
1318
      if(param.type === 'file')
1319
        definedFileParams.push(param);
1320
      else
1321
        definedFormParams.push(param);
1322
    }
1323
    else if(param.in === 'header' && opts) {
1324
      var key = param.name;
1325
      var headerValue = opts[param.name];
1326
      if(typeof opts[param.name] !== 'undefined')
1327
        headers[key] = headerValue;
1328
    }
1329
    else if(param.in === 'body' && typeof args[param.name] !== 'undefined') {
1330
      body = args[param.name];
1331
    }
1332
  }
1333
1334
  // if there's a body, need to set the consumes header via requestContentType
1335
  if (body && (this.method === 'post' || this.method === 'put' || this.method === 'patch' || this.method === 'delete')) {
1336
    if (opts.requestContentType)
1337
      consumes = opts.requestContentType;
1338
  } else {
1339
    // if any form params, content type must be set
1340
    if(definedFormParams.length > 0) {
1341
      if(opts.requestContentType)           // override if set
1342
        consumes = opts.requestContentType;
1343
      else if(definedFileParams.length > 0) // if a file, must be multipart/form-data
1344
        consumes = 'multipart/form-data';
1345
      else                                  // default to x-www-from-urlencoded
1346
        consumes = 'application/x-www-form-urlencoded';
1347
    }
1348
    else if (this.type == 'DELETE')
1349
      body = '{}';
1350
    else if (this.type != 'DELETE')
1351
      consumes = null;
1352
  }
1353
1354
  if (consumes && this.consumes) {
1355
    if (this.consumes.indexOf(consumes) === -1) {
1356
      log('server doesn\'t consume ' + consumes + ', try ' + JSON.stringify(this.consumes));
1357
    }
1358
  }
1359
1360
  if (opts.responseContentType) {
1361
    accepts = opts.responseContentType;
1362
  } else {
1363
    accepts = 'application/json';
1364
  }
1365
  if (accepts && this.produces) {
1366
    if (this.produces.indexOf(accepts) === -1) {
1367
      log('server can\'t produce ' + accepts);
1368
    }
1369
  }
1370
1371
  if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded'))
1372
    headers['Content-Type'] = consumes;
1373
  if (accepts)
1374
    headers.Accept = accepts;
1375
  return headers;
1376
};
1377
1378
Operation.prototype.asCurl = function (args) {
1379
  var obj = this.execute(args, {mock: true});
1380
  authorizations.apply(obj);
1381
  var results = [];
1382
  results.push('-X ' + this.method.toUpperCase());
1383
  if (obj.headers) {
1384
    var key;
1385
    for (key in obj.headers)
1386
      results.push('--header "' + key + ': ' + obj.headers[key] + '"');
1387
  }
1388
  if(obj.body) {
1389
    var body;
1390
    if(typeof obj.body === 'object')
1391
      body = JSON.stringify(obj.body);
1392
    else
1393
      body = obj.body;
1394
    results.push('-d "' + body.replace(/"/g, '\\"') + '"');
1395
  }
1396
  return 'curl ' + (results.join(' ')) + ' "' + obj.url + '"';
1397
};
1398
1399
Operation.prototype.encodePathCollection = function(type, name, value) {
1400
  var encoded = '';
1401
  var i;
1402
  var separator = '';
1403
  if(type === 'ssv')
1404
    separator = '%20';
1405
  else if(type === 'tsv')
1406
    separator = '\\t';
1407
  else if(type === 'pipes')
1408
    separator = '|';
1409
  else
1410
    separator = ',';
1411
1412
  for(i = 0; i < value.length; i++) {
1413
    if(i === 0)
1414
      encoded = this.encodeQueryParam(value[i]);
1415
    else
1416
      encoded += separator + this.encodeQueryParam(value[i]);
1417
  }
1418
  return encoded;
1419
};
1420
1421
Operation.prototype.encodeQueryCollection = function(type, name, value) {
1422
  var encoded = '';
1423
  var i;
1424
  if(type === 'default' || type === 'multi') {
1425
    for(i = 0; i < value.length; i++) {
1426
      if(i > 0) encoded += '&';
1427
      encoded += this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]);
1428
    }
1429
  }
1430
  else {
1431
    var separator = '';
1432
    if(type === 'csv')
1433
      separator = ',';
1434
    else if(type === 'ssv')
1435
      separator = '%20';
1436
    else if(type === 'tsv')
1437
      separator = '\\t';
1438
    else if(type === 'pipes')
1439
      separator = '|';
1440
    else if(type === 'brackets') {
1441
      for(i = 0; i < value.length; i++) {
1442
        if(i !== 0)
1443
          encoded += '&';
1444
        encoded += this.encodeQueryParam(name) + '[]=' + this.encodeQueryParam(value[i]);
1445
      }
1446
    }
1447
    if(separator !== '') {
1448
      for(i = 0; i < value.length; i++) {
1449
        if(i === 0)
1450
          encoded = this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]);
1451
        else
1452
          encoded += separator + this.encodeQueryParam(value[i]);
1453
      }
1454
    }
1455
  }
1456
  return encoded;
1457
};
1458
1459
Operation.prototype.encodeQueryParam = function(arg) {
1460
  return encodeURIComponent(arg);
1461
};
1462
1463
/**
1464
 * TODO revisit, might not want to leave '/'
1465
 **/
1466
Operation.prototype.encodePathParam = function(pathParam) {
1467
  var encParts, part, parts, i, len;
1468
  pathParam = pathParam.toString();
1469
  if (pathParam.indexOf('/') === -1) {
1470
    return encodeURIComponent(pathParam);
1471
  } else {
1472
    parts = pathParam.split('/');
1473
    encParts = [];
1474
    for (i = 0, len = parts.length; i < len; i++) {
1475
      encParts.push(encodeURIComponent(parts[i]));
1476
    }
1477
    return encParts.join('/');
1478
  }
1479
};
1480
1481
var Model = function(name, definition) {
1482
  this.name = name;
1483
  this.definition = definition || {};
1484
  this.properties = [];
1485
  var requiredFields = definition.required || [];
1486
  if(definition.type === 'array') {
1487
    var out = new ArrayModel(definition);
1488
    return out;
1489
  }
1490
  var key;
1491
  var props = definition.properties;
1492
  if(props) {
1493
    for(key in props) {
1494
      var required = false;
1495
      var property = props[key];
1496
      if(requiredFields.indexOf(key) >= 0)
1497
        required = true;
1498
      this.properties.push(new Property(key, property, required));
1499
    }
1500
  }
1501
};
1502
1503
Model.prototype.createJSONSample = function(modelsToIgnore) {
1504
  var i, result = {}, representations = {};
1505
  modelsToIgnore = (modelsToIgnore||{});
1506
  modelsToIgnore[this.name] = this;
1507
  for (i = 0; i < this.properties.length; i++) {
1508
    prop = this.properties[i];
1509
    var sample = prop.getSampleValue(modelsToIgnore, representations);
1510
    result[prop.name] = sample;
1511
  }
1512
  delete modelsToIgnore[this.name];
1513
  return result;
1514
};
1515
1516
Model.prototype.getSampleValue = function(modelsToIgnore) {
1517
  var i, obj = {}, representations = {};
1518
  for(i = 0; i < this.properties.length; i++ ) {
1519
    var property = this.properties[i];
1520
    obj[property.name] = property.sampleValue(false, modelsToIgnore, representations);
1521
  }
1522
  return obj;
1523
};
1524
1525
Model.prototype.getMockSignature = function(modelsToIgnore) {
1526
  var i, prop, propertiesStr = [];
1527
  for (i = 0; i < this.properties.length; i++) {
1528
    prop = this.properties[i];
1529
    propertiesStr.push(prop.toString());
1530
  }
1531
  var strong = '<span class="strong">';
1532
  var stronger = '<span class="stronger">';
1533
  var strongClose = '</span>';
1534
  var classOpen = strong + this.name + ' {' + strongClose;
1535
  var classClose = strong + '}' + strongClose;
1536
  var returnVal = classOpen + '<div>' + propertiesStr.join(',</div><div>') + '</div>' + classClose;
1537
  if (!modelsToIgnore)
1538
    modelsToIgnore = {};
1539
1540
  modelsToIgnore[this.name] = this;
1541
  for (i = 0; i < this.properties.length; i++) {
1542
    prop = this.properties[i];
1543
    var ref = prop.$ref;
1544
    var model = models[ref];
1545
    if (model && typeof modelsToIgnore[model.name] === 'undefined') {
1546
      returnVal = returnVal + ('<br>' + model.getMockSignature(modelsToIgnore));
1547
    }
1548
  }
1549
  return returnVal;
1550
};
1551
1552
var Property = function(name, obj, required) {
1553
  this.schema = obj;
1554
  this.required = required;
1555
  if(obj.$ref)
1556
    this.$ref = simpleRef(obj.$ref);
1557
  else if (obj.type === 'array' && obj.items) {
1558
    if(obj.items.$ref)
1559
      this.$ref = simpleRef(obj.items.$ref);
1560
    else
1561
      obj = obj.items;
1562
  }
1563
  this.name = name;
1564
  this.description = obj.description;
1565
  this.obj = obj;
1566
  this.optional = true;
1567
  this.optional = !required;
1568
  this.default = obj.default || null;
1569
  this.example = obj.example !== undefined ? obj.example : null;
1570
  this.collectionFormat = obj.collectionFormat || null;
1571
  this.maximum = obj.maximum || null;
1572
  this.exclusiveMaximum = obj.exclusiveMaximum || null;
1573
  this.minimum = obj.minimum || null;
1574
  this.exclusiveMinimum = obj.exclusiveMinimum || null;
1575
  this.maxLength = obj.maxLength || null;
1576
  this.minLength = obj.minLength || null;
1577
  this.pattern = obj.pattern || null;
1578
  this.maxItems = obj.maxItems || null;
1579
  this.minItems = obj.minItems || null;
1580
  this.uniqueItems = obj.uniqueItems || null;
1581
  this['enum'] = obj['enum'] || null;
1582
  this.multipleOf = obj.multipleOf || null;
1583
};
1584
1585
Property.prototype.getSampleValue = function (modelsToIgnore, representations) {
1586
  return this.sampleValue(false, modelsToIgnore, representations);
1587
};
1588
1589
Property.prototype.isArray = function () {
1590
  var schema = this.schema;
1591
  if(schema.type === 'array')
1592
    return true;
1593
  else
1594
    return false;
1595
};
1596
1597
Property.prototype.sampleValue = function(isArray, ignoredModels, representations) {
1598
  isArray = (isArray || this.isArray());
1599
  ignoredModels = (ignoredModels || {});
1600
  // representations = (representations || {});
1601
1602
  var type = getStringSignature(this.obj, true);
1603
  var output;
1604
1605
  if(this.$ref) {
1606
    var refModelName = simpleRef(this.$ref);
1607
    var refModel = models[refModelName];
1608
    if(typeof representations[type] !== 'undefined') {
1609
      return representations[type];
1610
    }
1611
    else
1612
1613
    if(refModel && typeof ignoredModels[type] === 'undefined') {
1614
      ignoredModels[type] = this;
1615
      output = refModel.getSampleValue(ignoredModels, representations);
1616
      representations[type] = output;
1617
    }
1618
    else {
1619
      output = (representations[type] || refModelName);
1620
    }
1621
  }
1622
  else if(this.example)
1623
    output = this.example;
1624
  else if(this.default)
1625
    output = this.default;
1626
  else if(type === 'date-time')
1627
    output = new Date().toISOString();
1628
  else if(type === 'date')
1629
    output = new Date().toISOString().split("T")[0];
1630
  else if(type === 'string')
1631
    output = 'string';
1632
  else if(type === 'integer')
1633
    output = 0;
1634
  else if(type === 'long')
1635
    output = 0;
1636
  else if(type === 'float')
1637
    output = 0.0;
1638
  else if(type === 'double')
1639
    output = 0.0;
1640
  else if(type === 'boolean')
1641
    output = true;
1642
  else
1643
    output = {};
1644
  ignoredModels[type] = output;
1645
  if(isArray)
1646
    return [output];
1647
  else
1648
    return output;
1649
};
1650
1651
getStringSignature = function(obj, baseComponent) {
1652
  var str = '';
1653
  if(typeof obj.$ref !== 'undefined')
1654
    str += simpleRef(obj.$ref);
1655
  else if(typeof obj.type === 'undefined')
1656
    str += 'object';
1657
  else if(obj.type === 'array') {
1658
    if(baseComponent)
1659
      str += getStringSignature((obj.items || obj.$ref || {}));
1660
    else {
1661
      str += 'Array[';
1662
      str += getStringSignature((obj.items || obj.$ref || {}));
1663
      str += ']';
1664
    }
1665
  }
1666
  else if(obj.type === 'integer' && obj.format === 'int32')
1667
    str += 'integer';
1668
  else if(obj.type === 'integer' && obj.format === 'int64')
1669
    str += 'long';
1670
  else if(obj.type === 'integer' && typeof obj.format === 'undefined')
1671
    str += 'long';
1672
  else if(obj.type === 'string' && obj.format === 'date-time')
1673
    str += 'date-time';
1674
  else if(obj.type === 'string' && obj.format === 'date')
1675
    str += 'date';
1676
  else if(obj.type === 'string' && typeof obj.format === 'undefined')
1677
    str += 'string';
1678
  else if(obj.type === 'number' && obj.format === 'float')
1679
    str += 'float';
1680
  else if(obj.type === 'number' && obj.format === 'double')
1681
    str += 'double';
1682
  else if(obj.type === 'number' && typeof obj.format === 'undefined')
1683
    str += 'double';
1684
  else if(obj.type === 'boolean')
1685
    str += 'boolean';
1686
  else if(obj.$ref)
1687
    str += simpleRef(obj.$ref);
1688
  else
1689
    str += obj.type;
1690
  return str;
1691
};
1692
1693
simpleRef = function(name) {
1694
  if(typeof name === 'undefined')
1695
    return null;
1696
  if(name.indexOf("#/definitions/") === 0)
1697
    return name.substring('#/definitions/'.length);
1698
  else
1699
    return name;
1700
};
1701
1702
Property.prototype.toString = function() {
1703
  var str = getStringSignature(this.obj);
1704
  if(str !== '') {
1705
    str = '<span class="propName ' + this.required + '">' + this.name + '</span> (<span class="propType">' + str + '</span>';
1706
    if(!this.required)
1707
      str += ', <span class="propOptKey">optional</span>';
1708
    str += ')';
1709
  }
1710
  else
1711
    str = this.name + ' (' + JSON.stringify(this.obj) + ')';
1712
1713
  if(typeof this.description !== 'undefined')
1714
    str += ': ' + this.description;
1715
1716
  if (this['enum']) {
1717
    str += ' = <span class="propVals">[\'' + this['enum'].join('\' or \'') + '\']</span>';
1718
  }
1719
  if (this.descr) {
1720
    str += ': <span class="propDesc">' + this.descr + '</span>';
1721
  }
1722
1723
1724
  var options = '';
1725
  var isArray = this.schema.type === 'array';
1726
  var type;
1727
1728
  if(isArray) {
1729
    if(this.schema.items)
1730
      type = this.schema.items.type;
1731
    else
1732
      type = '';
1733
  }
1734
  else {
1735
    type = this.schema.type;
1736
  }
1737
1738
  if (this.default)
1739
    options += optionHtml('Default', this.default);
1740
1741
  switch (type) {
1742
    case 'string':
1743
      if (this.minLength)
1744
        options += optionHtml('Min. Length', this.minLength);
1745
      if (this.maxLength)
1746
        options += optionHtml('Max. Length', this.maxLength);
1747
      if (this.pattern)
1748
        options += optionHtml('Reg. Exp.', this.pattern);
1749
      break;
1750
    case 'integer':
1751
    case 'number':
1752
      if (this.minimum)
1753
        options += optionHtml('Min. Value', this.minimum);
1754
      if (this.exclusiveMinimum)
1755
        options += optionHtml('Exclusive Min.', "true");
1756
      if (this.maximum)
1757
        options += optionHtml('Max. Value', this.maximum);
1758
      if (this.exclusiveMaximum)
1759
        options += optionHtml('Exclusive Max.', "true");
1760
      if (this.multipleOf)
1761
        options += optionHtml('Multiple Of', this.multipleOf);
1762
      break;
1763
  }
1764
1765
  if (isArray) {
1766
    if (this.minItems)
1767
      options += optionHtml('Min. Items', this.minItems);
1768
    if (this.maxItems)
1769
      options += optionHtml('Max. Items', this.maxItems);
1770
    if (this.uniqueItems)
1771
      options += optionHtml('Unique Items', "true");
1772
    if (this.collectionFormat)
1773
      options += optionHtml('Coll. Format', this.collectionFormat);
1774
  }
1775
1776
  if (this['enum']) {
1777
    var enumString;
1778
1779
    if (type === 'number' || type === 'integer')
1780
      enumString = this['enum'].join(', ');
1781
    else {
1782
      enumString = '"' + this['enum'].join('", "') + '"';
1783
    }
1784
1785
    options += optionHtml('Enum', enumString);
1786
  }
1787
1788
  if (options.length > 0)
1789
    str = '<span class="propWrap">' + str + '<table class="optionsWrapper"><tr><th colspan="2">' + this.name + '</th></tr>' + options + '</table></span>';
1790
1791
  return str;
1792
};
1793
1794
optionHtml = function(label, value) {
1795
  return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';
1796
};
1797
1798
typeFromJsonSchema = function(type, format) {
1799
  var str;
1800
  if(type === 'integer' && format === 'int32')
1801
    str = 'integer';
1802
  else if(type === 'integer' && format === 'int64')
1803
    str = 'long';
1804
  else if(type === 'integer' && typeof format === 'undefined')
1805
    str = 'long';
1806
  else if(type === 'string' && format === 'date-time')
1807
    str = 'date-time';
1808
  else if(type === 'string' && format === 'date')
1809
    str = 'date';
1810
  else if(type === 'number' && format === 'float')
1811
    str = 'float';
1812
  else if(type === 'number' && format === 'double')
1813
    str = 'double';
1814
  else if(type === 'number' && typeof format === 'undefined')
1815
    str = 'double';
1816
  else if(type === 'boolean')
1817
    str = 'boolean';
1818
  else if(type === 'string')
1819
    str = 'string';
1820
1821
  return str;
1822
};
1823
1824
var sampleModels = {};
1825
var cookies = {};
1826
var models = {};
1827
1828
SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
1829
  if (response.apiVersion !== null) {
1830
    this.apiVersion = response.apiVersion;
1831
  }
1832
  this.apis = {};
1833
  this.apisArray = [];
1834
  this.consumes = response.consumes;
1835
  this.produces = response.produces;
1836
  this.authSchemes = response.authorizations;
1837
  this.info = this.convertInfo(response.info);
1838
1839
  var isApi = false, i, res;
1840
  for (i = 0; i < response.apis.length; i++) {
1841
    var api = response.apis[i];
1842
    if (api.operations) {
1843
      var j;
1844
      for (j = 0; j < api.operations.length; j++) {
1845
        operation = api.operations[j];
1846
        isApi = true;
1847
      }
1848
    }
1849
  }
1850
  if (response.basePath)
1851
    this.basePath = response.basePath;
1852
  else if (this.url.indexOf('?') > 0)
1853
    this.basePath = this.url.substring(0, this.url.lastIndexOf('?'));
1854
  else
1855
    this.basePath = this.url;
1856
1857
  if (isApi) {
1858
    var newName = response.resourcePath.replace(/\//g, '');
1859
    this.resourcePath = response.resourcePath;
1860
    res = new SwaggerResource(response, this);
1861
    this.apis[newName] = res;
1862
    this.apisArray.push(res);
1863
    this.finish();
1864
  } else {
1865
    var k;
1866
    this.expectedResourceCount = response.apis.length;
1867
    for (k = 0; k < response.apis.length; k++) {
1868
      var resource = response.apis[k];
1869
      res = new SwaggerResource(resource, this);
1870
      this.apis[res.name] = res;
1871
      this.apisArray.push(res);
1872
    }
1873
  }
1874
  this.isValid = true;
1875
  return this;
1876
};
1877
1878
SwaggerClient.prototype.finish = function() {
1879
  if (typeof this.success === 'function') {
1880
    this.isValid = true;
1881
    this.ready = true;
1882
    this.isBuilt = true;
1883
    this.selfReflect();
1884
    this.success();
1885
  }
1886
};
1887
1888
SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
1889
  log('This API is using a deprecated version of Swagger!  Please see http://github.com/wordnik/swagger-core/wiki for more info');
1890
  if (response.apiVersion !== null)
1891
    this.apiVersion = response.apiVersion;
1892
  this.apis = {};
1893
  this.apisArray = [];
1894
  this.produces = response.produces;
1895
  this.info = this.convertInfo(response.info);
1896
  var isApi = false, res;
1897
  for (var i = 0; i < response.apis.length; i++) {
1898
    var api = response.apis[i];
1899
    if (api.operations) {
1900
      for (var j = 0; j < api.operations.length; j++) {
1901
        operation = api.operations[j];
1902
        isApi = true;
1903
      }
1904
    }
1905
  }
1906
  if (response.basePath) {
1907
    this.basePath = response.basePath;
1908
  } else if (this.url.indexOf('?') > 0) {
1909
    this.basePath = this.url.substring(0, this.url.lastIndexOf('?'));
1910
  } else {
1911
    this.basePath = this.url;
1912
  }
1913
  if (isApi) {
1914
    var newName = response.resourcePath.replace(/\//g, '');
1915
    this.resourcePath = response.resourcePath;
1916
    res = new SwaggerResource(response, this);
1917
    this.apis[newName] = res;
1918
    this.apisArray.push(res);
1919
    this.finish();
1920
  } else {
1921
    this.expectedResourceCount = response.apis.length;
1922
    for (k = 0; k < response.apis.length; k++) {
1923
      resource = response.apis[k];
1924
      res = new SwaggerResource(resource, this);
1925
      this.apis[res.name] = res;
1926
      this.apisArray.push(res);
1927
    }
1928
  }
1929
  this.isValid = true;
1930
  return this;
1931
};
1932
1933
SwaggerClient.prototype.convertInfo = function (resp) {
1934
  if(typeof resp == 'object') {
1935
    var info = {};
1936
1937
    info.title = resp.title;
1938
    info.description = resp.description;
1939
    info.termsOfService = resp.termsOfServiceUrl;
1940
    info.contact = {};
1941
    info.contact.name = resp.contact;
1942
    info.license = {};
1943
    info.license.name = resp.license;
1944
    info.license.url = resp.licenseUrl;
1945
1946
    return info;
1947
  }
1948
};
1949
1950
SwaggerClient.prototype.selfReflect = function () {
1951
  var resource, tag, ref;
1952
  if (this.apis === null) {
1953
    return false;
1954
  }
1955
  ref = this.apis;
1956
  for (tag in ref) {
1957
    api = ref[tag];
1958
    if (api.ready === null) {
1959
      return false;
1960
    }
1961
    this[tag] = api;
1962
    this[tag].help = __bind(api.help, api);
1963
  }
1964
  this.setConsolidatedModels();
1965
  this.ready = true;
1966
};
1967
1968
SwaggerClient.prototype.setConsolidatedModels = function () {
1969
  var model, modelName, resource, resource_name, i, apis, models, results;
1970
  this.models = {};
1971
  apis = this.apis;
1972
  for (resource_name in apis) {
1973
    resource = apis[resource_name];
1974
    for (modelName in resource.models) {
1975
      if (typeof this.models[modelName] === 'undefined') {
1976
        this.models[modelName] = resource.models[modelName];
1977
        this.modelsArray.push(resource.models[modelName]);
1978
      }
1979
    }
1980
  }
1981
  models = this.modelsArray;
1982
  results = [];
1983
  for (i = 0; i < models.length; i++) {
1984
    model = models[i];
1985
    results.push(model.setReferencedModels(this.models));
1986
  }
1987
  return results;
1988
};
1989
1990
var SwaggerResource = function (resourceObj, api) {
1991
  var _this = this;
1992
  this.api = api;
1993
  this.swaggerRequstHeaders = api.swaggerRequstHeaders;
1994
  this.path = (typeof this.api.resourcePath === 'string') ? this.api.resourcePath : resourceObj.path;
1995
  this.description = resourceObj.description;
1996
  this.authorizations = (resourceObj.authorizations || {});
1997
1998
  var parts = this.path.split('/');
1999
  this.name = parts[parts.length - 1].replace('.{format}', '');
2000
  this.basePath = this.api.basePath;
2001
  this.operations = {};
2002
  this.operationsArray = [];
2003
  this.modelsArray = [];
2004
  this.models = api.models || {};
2005
  this.rawModels = {};
2006
  this.useJQuery = (typeof api.useJQuery !== 'undefined') ? api.useJQuery : null;
2007
2008
  if ((resourceObj.apis) && this.api.resourcePath) {
2009
    this.addApiDeclaration(resourceObj);
2010
  } else {
2011
    if (typeof this.path === 'undefined') {
2012
      this.api.fail('SwaggerResources must have a path.');
2013
    }
2014
    if (this.path.substring(0, 4) === 'http') {
2015
      this.url = this.path.replace('{format}', 'json');
2016
    } else {
2017
      this.url = this.api.basePath + this.path.replace('{format}', 'json');
2018
    }
2019
    this.api.progress('fetching resource ' + this.name + ': ' + this.url);
2020
    var obj = {
2021
      url: this.url,
2022
      method: 'GET',
2023
      useJQuery: this.useJQuery,
2024
      headers: {
2025
        accept: this.swaggerRequstHeaders
2026
      },
2027
      on: {
2028
        response: function (resp) {
2029
          var responseObj = resp.obj || JSON.parse(resp.data);
2030
          _this.api.resourceCount += 1;
2031
          return _this.addApiDeclaration(responseObj);
2032
        },
2033
        error: function (response) {
2034
          _this.api.resourceCount += 1;
2035
          return _this.api.fail('Unable to read api \'' +
2036
          _this.name + '\' from path ' + _this.url + ' (server returned ' + response.statusText + ')');
2037
        }
2038
      }
2039
    };
2040
    var e = typeof window !== 'undefined' ? window : exports;
2041
    e.authorizations.apply(obj);
2042
    new SwaggerHttp().execute(obj);
2043
  }
2044
};
2045
2046
SwaggerResource.prototype.help = function (dontPrint) {
2047
  var i;
2048
  var output = 'operations for the "' + this.name + '" tag';
2049
  for(i = 0; i < this.operationsArray.length; i++) {
2050
    var api = this.operationsArray[i];
2051
    output += '\n  * ' + api.nickname + ': ' + api.description;
2052
  }
2053
  if(dontPrint)
2054
    return output;
2055
  else {
2056
    log(output);
2057
    return output;
2058
  }
2059
};
2060
2061
SwaggerResource.prototype.getAbsoluteBasePath = function (relativeBasePath) {
2062
  var pos, url;
2063
  url = this.api.basePath;
2064
  pos = url.lastIndexOf(relativeBasePath);
2065
  var parts = url.split('/');
2066
  var rootUrl = parts[0] + '//' + parts[2];
2067
2068
  if (relativeBasePath.indexOf('http') === 0)
2069
    return relativeBasePath;
2070
  if (relativeBasePath === '/')
2071
    return rootUrl;
2072
  if (relativeBasePath.substring(0, 1) == '/') {
2073
    // use root + relative
2074
    return rootUrl + relativeBasePath;
2075
  }
2076
  else {
2077
    pos = this.basePath.lastIndexOf('/');
2078
    var base = this.basePath.substring(0, pos);
2079
    if (base.substring(base.length - 1) == '/')
2080
      return base + relativeBasePath;
2081
    else
2082
      return base + '/' + relativeBasePath;
2083
  }
2084
};
2085
2086
SwaggerResource.prototype.addApiDeclaration = function (response) {
2087
  if (typeof response.produces === 'string')
2088
    this.produces = response.produces;
2089
  if (typeof response.consumes === 'string')
2090
    this.consumes = response.consumes;
2091
  if ((typeof response.basePath === 'string') && response.basePath.replace(/\s/g, '').length > 0)
2092
    this.basePath = response.basePath.indexOf('http') === -1 ? this.getAbsoluteBasePath(response.basePath) : response.basePath;
2093
  this.resourcePath = response.resourcePath;
2094
  this.addModels(response.models);
2095
  if (response.apis) {
2096
    for (var i = 0 ; i < response.apis.length; i++) {
2097
      var endpoint = response.apis[i];
2098
      this.addOperations(endpoint.path, endpoint.operations, response.consumes, response.produces);
2099
    }
2100
  }
2101
  this.api[this.name] = this;
2102
  this.ready = true;
2103
  if(this.api.resourceCount === this.api.expectedResourceCount)
2104
    this.api.finish();
2105
  return this;
2106
};
2107
2108
SwaggerResource.prototype.addModels = function (models) {
2109
  if (typeof models === 'object') {
2110
    var modelName;
2111
    for (modelName in models) {
2112
      if (typeof this.models[modelName] === 'undefined') {
2113
        var swaggerModel = new SwaggerModel(modelName, models[modelName]);
2114
        this.modelsArray.push(swaggerModel);
2115
        this.models[modelName] = swaggerModel;
2116
        this.rawModels[modelName] = models[modelName];
2117
      }
2118
    }
2119
    var output = [];
2120
    for (var i = 0; i < this.modelsArray.length; i++) {
2121
      var model = this.modelsArray[i];
2122
      output.push(model.setReferencedModels(this.models));
2123
    }
2124
    return output;
2125
  }
2126
};
2127
2128
SwaggerResource.prototype.addOperations = function (resource_path, ops, consumes, produces) {
2129
  if (ops) {
2130
    var output = [];
2131
    for (var i = 0; i < ops.length; i++) {
2132
      var o = ops[i];
2133
      consumes = this.consumes;
2134
      produces = this.produces;
2135
      if (typeof o.consumes !== 'undefined')
2136
        consumes = o.consumes;
2137
      else
2138
        consumes = this.consumes;
2139
2140
      if (typeof o.produces !== 'undefined')
2141
        produces = o.produces;
2142
      else
2143
        produces = this.produces;
2144
      var type = (o.type || o.responseClass);
2145
2146
      if (type === 'array') {
2147
        ref = null;
2148
        if (o.items)
2149
          ref = o.items.type || o.items.$ref;
2150
        type = 'array[' + ref + ']';
2151
      }
2152
      var responseMessages = o.responseMessages;
2153
      var method = o.method;
2154
      if (o.httpMethod) {
2155
        method = o.httpMethod;
2156
      }
2157
      if (o.supportedContentTypes) {
2158
        consumes = o.supportedContentTypes;
2159
      }
2160
      if (o.errorResponses) {
2161
        responseMessages = o.errorResponses;
2162
        for (var j = 0; j < responseMessages.length; j++) {
2163
          r = responseMessages[j];
2164
          r.message = r.reason;
2165
          r.reason = null;
2166
        }
2167
      }
2168
      o.nickname = this.sanitize(o.nickname);
2169
      var op = new SwaggerOperation(o.nickname,
2170
          resource_path,
2171
          method,
2172
          o.parameters,
2173
          o.summary,
2174
          o.notes,
2175
          type,
2176
          responseMessages,
2177
          this,
2178
          consumes,
2179
          produces,
2180
          o.authorizations,
2181
          o.deprecated);
2182
2183
      this.operations[op.nickname] = op;
2184
      output.push(this.operationsArray.push(op));
2185
    }
2186
    return output;
2187
  }
2188
};
2189
2190
SwaggerResource.prototype.sanitize = function (nickname) {
2191
  var op;
2192
  op = nickname.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_');
2193
  op = op.replace(/((_){2,})/g, '_');
2194
  op = op.replace(/^(_)*/g, '');
2195
  op = op.replace(/([_])*$/g, '');
2196
  return op;
2197
};
2198
2199
var SwaggerModel = function (modelName, obj) {
2200
  this.name = typeof obj.id !== 'undefined' ? obj.id : modelName;
2201
  this.properties = [];
2202
  var propertyName;
2203
  for (propertyName in obj.properties) {
2204
    if (obj.required) {
2205
      var value;
2206
      for (value in obj.required) {
2207
        if (propertyName === obj.required[value]) {
2208
          obj.properties[propertyName].required = true;
2209
        }
2210
      }
2211
    }
2212
    var prop = new SwaggerModelProperty(propertyName, obj.properties[propertyName], this);
2213
    this.properties.push(prop);
2214
  }
2215
};
2216
2217
SwaggerModel.prototype.setReferencedModels = function (allModels) {
2218
  var results = [];
2219
  for (var i = 0; i < this.properties.length; i++) {
2220
    var property = this.properties[i];
2221
    var type = property.type || property.dataType;
2222
    if (allModels[type])
2223
      results.push(property.refModel = allModels[type]);
2224
    else if ((property.refDataType) && (allModels[property.refDataType]))
2225
      results.push(property.refModel = allModels[property.refDataType]);
2226
    else
2227
      results.push(void 0);
2228
  }
2229
  return results;
2230
};
2231
2232
SwaggerModel.prototype.getMockSignature = function (modelsToIgnore) {
2233
  var i, prop, propertiesStr = [];
2234
  for (i = 0; i < this.properties.length; i++) {
2235
    prop = this.properties[i];
2236
    propertiesStr.push(prop.toString());
2237
  }
2238
2239
  var strong = '<span class="strong">';
2240
  var strongClose = '</span>';
2241
  var classOpen = strong + this.name + ' {' + strongClose;
2242
  var classClose = strong + '}' + strongClose;
2243
  var returnVal = classOpen + '<div>' + propertiesStr.join(',</div><div>') + '</div>' + classClose;
2244
  if (!modelsToIgnore)
2245
    modelsToIgnore = [];
2246
  modelsToIgnore.push(this.name);
2247
2248
  for (i = 0; i < this.properties.length; i++) {
2249
    prop = this.properties[i];
2250
    if ((prop.refModel) && modelsToIgnore.indexOf(prop.refModel.name) === -1) {
2251
      returnVal = returnVal + ('<br>' + prop.refModel.getMockSignature(modelsToIgnore));
2252
    }
2253
  }
2254
  return returnVal;
2255
};
2256
2257
SwaggerModel.prototype.createJSONSample = function (modelsToIgnore) {
2258
  if (sampleModels[this.name]) {
2259
    return sampleModels[this.name];
2260
  }
2261
  else {
2262
    var result = {};
2263
    modelsToIgnore = (modelsToIgnore || []);
2264
    modelsToIgnore.push(this.name);
2265
    for (var i = 0; i < this.properties.length; i++) {
2266
      var prop = this.properties[i];
2267
      result[prop.name] = prop.getSampleValue(modelsToIgnore);
2268
    }
2269
    modelsToIgnore.pop(this.name);
2270
    return result;
2271
  }
2272
};
2273
2274
var SwaggerModelProperty = function (name, obj, model) {
2275
  this.name = name;
2276
  this.dataType = obj.type || obj.dataType || obj.$ref;
2277
  this.isCollection = this.dataType && (this.dataType.toLowerCase() === 'array' || this.dataType.toLowerCase() === 'list' || this.dataType.toLowerCase() === 'set');
2278
  this.descr = obj.description;
2279
  this.required = obj.required;
2280
  this.defaultValue = applyModelPropertyMacro(obj, model);
2281
  if (obj.items) {
2282
    if (obj.items.type) {
2283
      this.refDataType = obj.items.type;
2284
    }
2285
    if (obj.items.$ref) {
2286
      this.refDataType = obj.items.$ref;
2287
    }
2288
  }
2289
  this.dataTypeWithRef = this.refDataType ? (this.dataType + '[' + this.refDataType + ']') : this.dataType;
2290
  if (obj.allowableValues) {
2291
    this.valueType = obj.allowableValues.valueType;
2292
    this.values = obj.allowableValues.values;
2293
    if (this.values) {
2294
      this.valuesString = '\'' + this.values.join('\' or \'') + '\'';
2295
    }
2296
  }
2297
  if (obj['enum']) {
2298
    this.valueType = 'string';
2299
    this.values = obj['enum'];
2300
    if (this.values) {
2301
      this.valueString = '\'' + this.values.join('\' or \'') + '\'';
2302
    }
2303
  }
2304
};
2305
2306
SwaggerModelProperty.prototype.getSampleValue = function (modelsToIgnore) {
2307
  var result;
2308
  if ((this.refModel) && (modelsToIgnore.indexOf(this.refModel.name) === -1)) {
2309
    result = this.refModel.createJSONSample(modelsToIgnore);
2310
  } else {
2311
    if (this.isCollection) {
2312
      result = this.toSampleValue(this.refDataType);
2313
    } else {
2314
      result = this.toSampleValue(this.dataType);
2315
    }
2316
  }
2317
  if (this.isCollection) {
2318
    return [result];
2319
  } else {
2320
    return result;
2321
  }
2322
};
2323
2324
SwaggerModelProperty.prototype.toSampleValue = function (value) {
2325
  var result;
2326
  if ((typeof this.defaultValue !== 'undefined') && this.defaultValue) {
2327
    result = this.defaultValue;
2328
  } else if (value === 'integer') {
2329
    result = 0;
2330
  } else if (value === 'boolean') {
2331
    result = false;
2332
  } else if (value === 'double' || value === 'number') {
2333
    result = 0.0;
2334
  } else if (value === 'string') {
2335
    result = '';
2336
  } else {
2337
    result = value;
2338
  }
2339
  return result;
2340
};
2341
2342
SwaggerModelProperty.prototype.toString = function () {
2343
  var req = this.required ? 'propReq' : 'propOpt';
2344
  var str = '<span class="propName ' + req + '">' + this.name + '</span> (<span class="propType">' + this.dataTypeWithRef + '</span>';
2345
  if (!this.required) {
2346
    str += ', <span class="propOptKey">optional</span>';
2347
  }
2348
  str += ')';
2349
  if (this.values) {
2350
    str += ' = <span class="propVals">[\'' + this.values.join('\' or \'') + '\']</span>';
2351
  }
2352
  if (this.descr) {
2353
    str += ': <span class="propDesc">' + this.descr + '</span>';
2354
  }
2355
  return str;
2356
};
2357
2358
var SwaggerOperation = function (nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces, authorizations, deprecated) {
2359
  var _this = this;
2360
2361
  var errors = [];
2362
  this.nickname = (nickname || errors.push('SwaggerOperations must have a nickname.'));
2363
  this.path = (path || errors.push('SwaggerOperation ' + nickname + ' is missing path.'));
2364
  this.method = (method || errors.push('SwaggerOperation ' + nickname + ' is missing method.'));
2365
  this.parameters = parameters ? parameters : [];
2366
  this.summary = summary;
2367
  this.notes = notes;
2368
  this.type = type;
2369
  this.responseMessages = (responseMessages || []);
2370
  this.resource = (resource || errors.push('Resource is required'));
2371
  this.consumes = consumes;
2372
  this.produces = produces;
2373
  this.authorizations = typeof authorizations !== 'undefined' ? authorizations : resource.authorizations;
2374
  this.deprecated = deprecated;
2375
  this['do'] = __bind(this['do'], this);
2376
2377
2378
  if(typeof this.deprecated === 'string') {
2379
    switch(this.deprecated.toLowerCase()) {
2380
      case 'true': case 'yes': case '1': {
2381
        this.deprecated = true;
2382
        break;
2383
      }
2384
      case 'false': case 'no': case '0': case null: {
2385
        this.deprecated = false;
2386
        break;
2387
      }
2388
      default: this.deprecated = Boolean(this.deprecated);
2389
    }
2390
  }
2391
2392
  if (errors.length > 0) {
2393
    console.error('SwaggerOperation errors', errors, arguments);
2394
    this.resource.api.fail(errors);
2395
  }
2396
2397
  this.path = this.path.replace('{format}', 'json');
2398
  this.method = this.method.toLowerCase();
2399
  this.isGetMethod = this.method === 'get';
2400
2401
  var i, j, v;
2402
  this.resourceName = this.resource.name;
2403
  if (typeof this.type !== 'undefined' && this.type === 'void')
2404
    this.type = null;
2405
  else {
2406
    this.responseClassSignature = this.getSignature(this.type, this.resource.models);
2407
    this.responseSampleJSON = this.getSampleJSON(this.type, this.resource.models);
2408
  }
2409
2410
  for (i = 0; i < this.parameters.length; i++) {
2411
    var param = this.parameters[i];
2412
    // might take this away
2413
    param.name = param.name || param.type || param.dataType;
2414
    // for 1.1 compatibility
2415
    type = param.type || param.dataType;
2416
    if (type === 'array') {
2417
      type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
2418
    }
2419
    param.type = type;
2420
2421
    if (type && type.toLowerCase() === 'boolean') {
2422
      param.allowableValues = {};
2423
      param.allowableValues.values = ['true', 'false'];
2424
    }
2425
    param.signature = this.getSignature(type, this.resource.models);
2426
    param.sampleJSON = this.getSampleJSON(type, this.resource.models);
2427
2428
    var enumValue = param['enum'];
2429
    if (typeof enumValue !== 'undefined') {
2430
      param.isList = true;
2431
      param.allowableValues = {};
2432
      param.allowableValues.descriptiveValues = [];
2433
2434
      for (j = 0; j < enumValue.length; j++) {
2435
        v = enumValue[j];
2436
        if (param.defaultValue) {
2437
          param.allowableValues.descriptiveValues.push({
2438
            value: String(v),
2439
            isDefault: (v === param.defaultValue)
2440
          });
2441
        }
2442
        else {
2443
          param.allowableValues.descriptiveValues.push({
2444
            value: String(v),
2445
            isDefault: false
2446
          });
2447
        }
2448
      }
2449
    }
2450
    else if (param.allowableValues) {
2451
      if (param.allowableValues.valueType === 'RANGE')
2452
        param.isRange = true;
2453
      else
2454
        param.isList = true;
2455
      if (param.allowableValues) {
2456
        param.allowableValues.descriptiveValues = [];
2457
        if (param.allowableValues.values) {
2458
          for (j = 0; j < param.allowableValues.values.length; j++) {
2459
            v = param.allowableValues.values[j];
2460
            if (param.defaultValue !== null) {
2461
              param.allowableValues.descriptiveValues.push({
2462
                value: String(v),
2463
                isDefault: (v === param.defaultValue)
2464
              });
2465
            }
2466
            else {
2467
              param.allowableValues.descriptiveValues.push({
2468
                value: String(v),
2469
                isDefault: false
2470
              });
2471
            }
2472
          }
2473
        }
2474
      }
2475
    }
2476
    param.defaultValue = applyParameterMacro(this, param);
2477
  }
2478
  var defaultSuccessCallback = this.resource.api.defaultSuccessCallback || null;
2479
  var defaultErrorCallback = this.resource.api.defaultErrorCallback || null;
2480
2481
  this.resource[this.nickname] = function (args, opts, callback, error) {
2482
    var arg1, arg2, arg3, arg4;
2483
    if(typeof args === 'function') {  // right shift 3
2484
      arg1 = {}; arg2 = {}; arg3 = args; arg4 = opts;
2485
    }
2486
    else if(typeof args === 'object' && typeof opts === 'function') { // right shift 2
2487
      arg1 = args; arg2 = {}; arg3 = opts; arg4 = callback;
2488
    }
2489
    else {
2490
      arg1 = args; arg2 = opts; arg3 = callback; arg4 = error;
2491
    }
2492
    return _this['do'](arg1 || {}, arg2 || {}, arg3 || defaultSuccessCallback, arg4 || defaultErrorCallback);
2493
  };
2494
2495
  this.resource[this.nickname].help = function (dontPrint) {
2496
    return _this.help(dontPrint);
2497
  };
2498
  this.resource[this.nickname].asCurl = function (args) {
2499
    return _this.asCurl(args);
2500
  };
2501
};
2502
2503
SwaggerOperation.prototype.isListType = function (type) {
2504
  if (type && type.indexOf('[') >= 0) {
2505
    return type.substring(type.indexOf('[') + 1, type.indexOf(']'));
2506
  } else {
2507
    return void 0;
2508
  }
2509
};
2510
2511
SwaggerOperation.prototype.getSignature = function (type, models) {
2512
  var isPrimitive, listType;
2513
  listType = this.isListType(type);
2514
  isPrimitive = ((typeof listType !== 'undefined') && models[listType]) || (typeof models[type] !== 'undefined') ? false : true;
2515
  if (isPrimitive) {
2516
    return type;
2517
  } else {
2518
    if (typeof listType !== 'undefined') {
2519
      return models[listType].getMockSignature();
2520
    } else {
2521
      return models[type].getMockSignature();
2522
    }
2523
  }
2524
};
2525
2526
SwaggerOperation.prototype.getSampleJSON = function (type, models) {
2527
  var isPrimitive, listType, val;
2528
  listType = this.isListType(type);
2529
  isPrimitive = ((typeof listType !== 'undefined') && models[listType]) || (typeof models[type] !== 'undefined') ? false : true;
2530
  val = isPrimitive ? void 0 : (listType ? models[listType].createJSONSample() : models[type].createJSONSample());
2531
  if (val) {
2532
    val = listType ? [val] : val;
2533
    if (typeof val == 'string')
2534
      return val;
2535
    else if (typeof val === 'object') {
2536
      var t = val;
2537
      if (val instanceof Array && val.length > 0) {
2538
        t = val[0];
2539
      }
2540
      if (t.nodeName) {
2541
        var xmlString = new XMLSerializer().serializeToString(t);
2542
        return this.formatXml(xmlString);
2543
      }
2544
      else
2545
        return JSON.stringify(val, null, 2);
2546
    }
2547
    else
2548
      return val;
2549
  }
2550
};
2551
2552
SwaggerOperation.prototype['do'] = function (args, opts, callback, error) {
2553
  var key, param, params, possibleParams = [], req, value;
2554
2555
  if (typeof error !== 'function') {
2556
    error = function (xhr, textStatus, error) {
2557
      return log(xhr, textStatus, error);
2558
    };
2559
  }
2560
2561
  if (typeof callback !== 'function') {
2562
    callback = function (response) {
2563
      var content;
2564
      content = null;
2565
      if (response !== null) {
2566
        content = response.data;
2567
      } else {
2568
        content = 'no data';
2569
      }
2570
      return log('default callback: ' + content);
2571
    };
2572
  }
2573
2574
  params = {};
2575
  params.headers = [];
2576
  if (args.headers) {
2577
    params.headers = args.headers;
2578
    delete args.headers;
2579
  }
2580
  // allow override from the opts
2581
  if(opts && opts.responseContentType) {
2582
    params.headers['Content-Type'] = opts.responseContentType;
2583
  }
2584
  if(opts && opts.requestContentType) {
2585
    params.headers.Accept = opts.requestContentType;
2586
  }
2587
2588
  for (var i = 0; i < this.parameters.length; i++) {
2589
    param = this.parameters[i];
2590
    if (param.paramType === 'header') {
2591
      if (typeof args[param.name] !== 'undefined')
2592
        params.headers[param.name] = args[param.name];
2593
    }
2594
    else if (param.paramType === 'form' || param.paramType.toLowerCase() === 'file')
2595
      possibleParams.push(param);
2596
    else if (param.paramType === 'body' && param.name !== 'body' && typeof args[param.name] !== 'undefined') {
2597
      if (args.body) {
2598
        throw new Error('Saw two body params in an API listing; expecting a max of one.');
2599
      }
2600
      args.body = args[param.name];
2601
    }
2602
  }
2603
2604
  if (typeof args.body !== 'undefined') {
2605
    params.body = args.body;
2606
    delete args.body;
2607
  }
2608
2609
  if (possibleParams) {
2610
    for (key in possibleParams) {
2611
      value = possibleParams[key];
2612
      if (args[value.name]) {
2613
        params[value.name] = args[value.name];
2614
      }
2615
    }
2616
  }
2617
2618
  req = new SwaggerRequest(this.method, this.urlify(args), params, opts, callback, error, this);
2619
  if (opts.mock) {
2620
    return req;
2621
  } else {
2622
    return true;
2623
  }
2624
};
2625
2626
SwaggerOperation.prototype.pathJson = function () {
2627
  return this.path.replace('{format}', 'json');
2628
};
2629
2630
SwaggerOperation.prototype.pathXml = function () {
2631
  return this.path.replace('{format}', 'xml');
2632
};
2633
2634
SwaggerOperation.prototype.encodePathParam = function (pathParam) {
2635
  var encParts, part, parts, _i, _len;
2636
  pathParam = pathParam.toString();
2637
  if (pathParam.indexOf('/') === -1) {
2638
    return encodeURIComponent(pathParam);
2639
  } else {
2640
    parts = pathParam.split('/');
2641
    encParts = [];
2642
    for (_i = 0, _len = parts.length; _i < _len; _i++) {
2643
      part = parts[_i];
2644
      encParts.push(encodeURIComponent(part));
2645
    }
2646
    return encParts.join('/');
2647
  }
2648
};
2649
2650
SwaggerOperation.prototype.urlify = function (args) {
2651
  var i, j, param, url;
2652
  // ensure no double slashing...
2653
  if(this.resource.basePath.length > 1 && this.resource.basePath.slice(-1) === '/' && this.pathJson().charAt(0) === '/')
2654
    url = this.resource.basePath + this.pathJson().substring(1);
2655
  else
2656
    url = this.resource.basePath + this.pathJson();
2657
  var params = this.parameters;
2658
  for (i = 0; i < params.length; i++) {
2659
    param = params[i];
2660
    if (param.paramType === 'path') {
2661
      if (typeof args[param.name] !== 'undefined') {
2662
        // apply path params and remove from args
2663
        var reg = new RegExp('\\{\\s*?' + param.name + '[^\\{\\}\\/]*(?:\\{.*?\\}[^\\{\\}\\/]*)*\\}(?=(\\/?|$))', 'gi');
2664
        url = url.replace(reg, this.encodePathParam(args[param.name]));
2665
        delete args[param.name];
2666
      }
2667
      else
2668
        throw '' + param.name + ' is a required path param.';
2669
    }
2670
  }
2671
2672
  var queryParams = '';
2673
  for (i = 0; i < params.length; i++) {
2674
    param = params[i];
2675
    if(param.paramType === 'query') {
2676
      if (queryParams !== '')
2677
        queryParams += '&';
2678
      if (Array.isArray(param)) {
2679
        var output = '';
2680
        for(j = 0; j < param.length; j++) {
2681
          if(j > 0)
2682
            output += ',';
2683
          output += encodeURIComponent(param[j]);
2684
        }
2685
        queryParams += encodeURIComponent(param.name) + '=' + output;
2686
      }
2687
      else {
2688
        if (typeof args[param.name] !== 'undefined') {
2689
          queryParams += encodeURIComponent(param.name) + '=' + encodeURIComponent(args[param.name]);
2690
        } else {
2691
          if (param.required)
2692
            throw '' + param.name + ' is a required query param.';
2693
        }
2694
      }
2695
    }
2696
  }
2697
  if ((queryParams) && queryParams.length > 0)
2698
    url += '?' + queryParams;
2699
  return url;
2700
};
2701
2702
SwaggerOperation.prototype.supportHeaderParams = function () {
2703
  return this.resource.api.supportHeaderParams;
2704
};
2705
2706
SwaggerOperation.prototype.supportedSubmitMethods = function () {
2707
  return this.resource.api.supportedSubmitMethods;
2708
};
2709
2710
SwaggerOperation.prototype.getQueryParams = function (args) {
2711
  return this.getMatchingParams(['query'], args);
2712
};
2713
2714
SwaggerOperation.prototype.getHeaderParams = function (args) {
2715
  return this.getMatchingParams(['header'], args);
2716
};
2717
2718
SwaggerOperation.prototype.getMatchingParams = function (paramTypes, args) {
2719
  var matchingParams = {};
2720
  var params = this.parameters;
2721
  for (var i = 0; i < params.length; i++) {
2722
    param = params[i];
2723
    if (args && args[param.name])
2724
      matchingParams[param.name] = args[param.name];
2725
  }
2726
  var headers = this.resource.api.headers;
2727
  var name;
2728
  for (name in headers) {
2729
    var value = headers[name];
2730
    matchingParams[name] = value;
2731
  }
2732
  return matchingParams;
2733
};
2734
2735
SwaggerOperation.prototype.help = function (dontPrint) {
2736
  var msg = this.nickname + ': ' + this.summary;
2737
  var params = this.parameters;
2738
  for (var i = 0; i < params.length; i++) {
2739
    var param = params[i];
2740
    msg += '\n* ' + param.name + (param.required ? ' (required)' : '') + " - " + param.description;
2741
  }
2742
  if(dontPrint)
2743
    return msg;
2744
  else {
2745
    console.log(msg);
2746
    return msg;
2747
  }
2748
};
2749
2750
SwaggerOperation.prototype.asCurl = function (args) {
2751
  var results = [];
2752
  var i;
2753
2754
  var headers = SwaggerRequest.prototype.setHeaders(args, {}, this);
2755
  for(i = 0; i < this.parameters.length; i++) {
2756
    var param = this.parameters[i];
2757
    if(param.paramType && param.paramType === 'header' && args[param.name]) {
2758
      headers[param.name] = args[param.name];
2759
    }
2760
  }
2761
2762
  var key;
2763
  for (key in headers) {
2764
    results.push('--header "' + key + ': ' + headers[key] + '"');
2765
  }
2766
  return 'curl ' + (results.join(' ')) + ' ' + this.urlify(args);
2767
};
2768
2769
SwaggerOperation.prototype.formatXml = function (xml) {
2770
  var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len;
2771
  reg = /(>)(<)(\/*)/g;
2772
  wsexp = /[ ]*(.*)[ ]+\n/g;
2773
  contexp = /(<.+>)(.+\n)/g;
2774
  xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2');
2775
  pad = 0;
2776
  formatted = '';
2777
  lines = xml.split('\n');
2778
  indent = 0;
2779
  lastType = 'other';
2780
  transitions = {
2781
    'single->single': 0,
2782
    'single->closing': -1,
2783
    'single->opening': 0,
2784
    'single->other': 0,
2785
    'closing->single': 0,
2786
    'closing->closing': -1,
2787
    'closing->opening': 0,
2788
    'closing->other': 0,
2789
    'opening->single': 1,
2790
    'opening->closing': 0,
2791
    'opening->opening': 1,
2792
    'opening->other': 1,
2793
    'other->single': 0,
2794
    'other->closing': -1,
2795
    'other->opening': 0,
2796
    'other->other': 0
2797
  };
2798
  _fn = function (ln) {
2799
    var fromTo, j, key, padding, type, types, value;
2800
    types = {
2801
      single: Boolean(ln.match(/<.+\/>/)),
2802
      closing: Boolean(ln.match(/<\/.+>/)),
2803
      opening: Boolean(ln.match(/<[^!?].*>/))
2804
    };
2805
    type = ((function () {
2806
      var _results;
2807
      _results = [];
2808
      for (key in types) {
2809
        value = types[key];
2810
        if (value) {
2811
          _results.push(key);
2812
        }
2813
      }
2814
      return _results;
2815
    })())[0];
2816
    type = type === void 0 ? 'other' : type;
2817
    fromTo = lastType + '->' + type;
2818
    lastType = type;
2819
    padding = '';
2820
    indent += transitions[fromTo];
2821
    padding = ((function () {
2822
      var _j, _ref5, _results;
2823
      _results = [];
2824
      for (j = _j = 0, _ref5 = indent; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; j = 0 <= _ref5 ? ++_j : --_j) {
2825
        _results.push('  ');
2826
      }
2827
      return _results;
2828
    })()).join('');
2829
    if (fromTo === 'opening->closing') {
2830
      formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';
2831
    } else {
2832
      formatted += padding + ln + '\n';
2833
    }
2834
  };
2835
  for (_i = 0, _len = lines.length; _i < _len; _i++) {
2836
    ln = lines[_i];
2837
    _fn(ln);
2838
  }
2839
  return formatted;
2840
};
2841
2842
var SwaggerRequest = function (type, url, params, opts, successCallback, errorCallback, operation, execution) {
2843
  var _this = this;
2844
  var errors = [];
2845
2846
  this.useJQuery = (typeof operation.resource.useJQuery !== 'undefined' ? operation.resource.useJQuery : null);
2847
  this.type = (type || errors.push('SwaggerRequest type is required (get/post/put/delete/patch/options).'));
2848
  this.url = (url || errors.push('SwaggerRequest url is required.'));
2849
  this.params = params;
2850
  this.opts = opts;
2851
  this.successCallback = (successCallback || errors.push('SwaggerRequest successCallback is required.'));
2852
  this.errorCallback = (errorCallback || errors.push('SwaggerRequest error callback is required.'));
2853
  this.operation = (operation || errors.push('SwaggerRequest operation is required.'));
2854
  this.execution = execution;
2855
  this.headers = (params.headers || {});
2856
2857
  if (errors.length > 0) {
2858
    throw errors;
2859
  }
2860
2861
  this.type = this.type.toUpperCase();
2862
2863
  // set request, response content type headers
2864
  var headers = this.setHeaders(params, opts, this.operation);
2865
  var body = params.body;
2866
2867
  // encode the body for form submits
2868
  if (headers['Content-Type']) {
2869
    var key, value, values = {}, i;
2870
    var operationParams = this.operation.parameters;
2871
    for (i = 0; i < operationParams.length; i++) {
2872
      var param = operationParams[i];
2873
      if (param.paramType === 'form')
2874
        values[param.name] = param;
2875
    }
2876
2877
    if (headers['Content-Type'].indexOf('application/x-www-form-urlencoded') === 0) {
2878
      var encoded = '';
2879
      for (key in values) {
2880
        value = this.params[key];
2881
        if (typeof value !== 'undefined') {
2882
          if (encoded !== '')
2883
            encoded += '&';
2884
          encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value);
2885
        }
2886
      }
2887
      body = encoded;
2888
    }
2889
    else if (headers['Content-Type'].indexOf('multipart/form-data') === 0) {
2890
      // encode the body for form submits
2891
      var data = '';
2892
      var boundary = '----SwaggerFormBoundary' + Date.now();
2893
      for (key in values) {
2894
        value = this.params[key];
2895
        if (typeof value !== 'undefined') {
2896
          data += '--' + boundary + '\n';
2897
          data += 'Content-Disposition: form-data; name="' + key + '"';
2898
          data += '\n\n';
2899
          data += value + '\n';
2900
        }
2901
      }
2902
      data += '--' + boundary + '--\n';
2903
      headers['Content-Type'] = 'multipart/form-data; boundary=' + boundary;
2904
      body = data;
2905
    }
2906
  }
2907
2908
  var obj;
2909
  if (!((this.headers) && (this.headers.mock))) {
2910
    obj = {
2911
      url: this.url,
2912
      method: this.type,
2913
      headers: headers,
2914
      body: body,
2915
      useJQuery: this.useJQuery,
2916
      on: {
2917
        error: function (response) {
2918
          return _this.errorCallback(response, _this.opts.parent);
2919
        },
2920
        redirect: function (response) {
2921
          return _this.successCallback(response, _this.opts.parent);
2922
        },
2923
        307: function (response) {
2924
          return _this.successCallback(response, _this.opts.parent);
2925
        },
2926
        response: function (response) {
2927
          return _this.successCallback(response, _this.opts.parent);
2928
        }
2929
      }
2930
    };
2931
2932
    var status = false;
2933
    if (this.operation.resource && this.operation.resource.api && this.operation.resource.api.clientAuthorizations) {
2934
      // Get the client authorizations from the resource declaration
2935
      status = this.operation.resource.api.clientAuthorizations.apply(obj, this.operation.authorizations);
2936
    } else {
2937
      // Get the client authorization from the default authorization declaration
2938
      var e;
2939
      if (typeof window !== 'undefined') {
2940
        e = window;
2941
      } else {
2942
        e = exports;
2943
      }
2944
      status = e.authorizations.apply(obj, this.operation.authorizations);
2945
    }
2946
2947
    if (!opts.mock) {
2948
      if (status !== false) {
2949
        new SwaggerHttp().execute(obj);
2950
      } else {
2951
        obj.canceled = true;
2952
      }
2953
    } else {
2954
      return obj;
2955
    }
2956
  }
2957
  return obj;
2958
};
2959
2960
SwaggerRequest.prototype.setHeaders = function (params, opts, operation) {
2961
  // default type
2962
  var accepts = opts.responseContentType || 'application/json';
2963
  var consumes = opts.requestContentType || 'application/json';
2964
2965
  var allDefinedParams = operation.parameters;
2966
  var definedFormParams = [];
2967
  var definedFileParams = [];
2968
  var body = params.body;
2969
  var headers = {};
2970
2971
  // get params from the operation and set them in definedFileParams, definedFormParams, headers
2972
  var i;
2973
  for (i = 0; i < allDefinedParams.length; i++) {
2974
    var param = allDefinedParams[i];
2975
    if (param.paramType === 'form')
2976
      definedFormParams.push(param);
2977
    else if (param.paramType === 'file')
2978
      definedFileParams.push(param);
2979
    else if (param.paramType === 'header' && this.params.headers) {
2980
      var key = param.name;
2981
      var headerValue = this.params.headers[param.name];
2982
      if (typeof this.params.headers[param.name] !== 'undefined')
2983
        headers[key] = headerValue;
2984
    }
2985
  }
2986
2987
  // if there's a body, need to set the accepts header via requestContentType
2988
  if (body && (this.type === 'POST' || this.type === 'PUT' || this.type === 'PATCH' || this.type === 'DELETE')) {
2989
    if (this.opts.requestContentType)
2990
      consumes = this.opts.requestContentType;
2991
  } else {
2992
    // if any form params, content type must be set
2993
    if (definedFormParams.length > 0) {
2994
      if (definedFileParams.length > 0)
2995
        consumes = 'multipart/form-data';
2996
      else
2997
        consumes = 'application/x-www-form-urlencoded';
2998
    }
2999
    else if (this.type === 'DELETE')
3000
      body = '{}';
3001
    else if (this.type != 'DELETE')
3002
      consumes = null;
3003
  }
3004
3005
  if (consumes && this.operation.consumes) {
3006
    if (this.operation.consumes.indexOf(consumes) === -1) {
3007
      log('server doesn\'t consume ' + consumes + ', try ' + JSON.stringify(this.operation.consumes));
3008
    }
3009
  }
3010
3011
  if (this.opts && this.opts.responseContentType) {
3012
    accepts = this.opts.responseContentType;
3013
  } else {
3014
    accepts = 'application/json';
3015
  }
3016
  if (accepts && operation.produces) {
3017
    if (operation.produces.indexOf(accepts) === -1) {
3018
      log('server can\'t produce ' + accepts);
3019
    }
3020
  }
3021
3022
  if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded'))
3023
    headers['Content-Type'] = consumes;
3024
  if (accepts)
3025
    headers.Accept = accepts;
3026
  return headers;
3027
};
3028
3029
/**
3030
 * SwaggerHttp is a wrapper for executing requests
3031
 */
3032
var SwaggerHttp = function() {};
3033
3034
SwaggerHttp.prototype.execute = function(obj, opts) {
3035
  if(obj && (typeof obj.useJQuery === 'boolean'))
3036
    this.useJQuery = obj.useJQuery;
3037
  else
3038
    this.useJQuery = this.isIE8();
3039
3040
  if(obj && typeof obj.body === 'object') {
3041
    if(obj.body.type && obj.body.type !== 'formData')
3042
      obj.body = JSON.stringify(obj.body);
3043
    else {
3044
      obj.contentType = false;
3045
      obj.processData = false;
3046
      // delete obj.cache;
3047
      delete obj.headers['Content-Type'];
3048
    }
3049
  }
3050
3051
  if(this.useJQuery)
3052
    return new JQueryHttpClient(opts).execute(obj);
3053
  else
3054
    return new ShredHttpClient(opts).execute(obj);
3055
};
3056
3057
SwaggerHttp.prototype.isIE8 = function() {
3058
  var detectedIE = false;
3059
  if (typeof navigator !== 'undefined' && navigator.userAgent) {
3060
    nav = navigator.userAgent.toLowerCase();
3061
    if (nav.indexOf('msie') !== -1) {
3062
      var version = parseInt(nav.split('msie')[1]);
3063
      if (version <= 8) {
3064
        detectedIE = true;
3065
      }
3066
    }
3067
  }
3068
  return detectedIE;
3069
};
3070
3071
/*
3072
 * JQueryHttpClient lets a browser take advantage of JQuery's cross-browser magic.
3073
 * NOTE: when jQuery is available it will export both '$' and 'jQuery' to the global space.
3074
 *       Since we are using closures here we need to alias it for internal use.
3075
 */
3076
var JQueryHttpClient = function(options) {
3077
  "use strict";
3078
  if(!jQuery){
3079
    var jQuery = window.jQuery;
3080
  }
3081
};
3082
3083
JQueryHttpClient.prototype.execute = function(obj) {
3084
  var cb = obj.on;
3085
  var request = obj;
3086
3087
  obj.type = obj.method;
3088
  obj.cache = false;
3089
  delete obj.useJQuery;
3090
3091
  /*
3092
  obj.beforeSend = function(xhr) {
3093
    var key, results;
3094
    if (obj.headers) {
3095
      results = [];
3096
      for (key in obj.headers) {
3097
        if (key.toLowerCase() === "content-type") {
3098
          results.push(obj.contentType = obj.headers[key]);
3099
        } else if (key.toLowerCase() === "accept") {
3100
          results.push(obj.accepts = obj.headers[key]);
3101
        } else {
3102
          results.push(xhr.setRequestHeader(key, obj.headers[key]));
3103
        }
3104
      }
3105
      return results;
3106
    }
3107
  };*/
3108
3109
  obj.data = obj.body;
3110
  delete obj.body;
3111
  obj.complete = function(response, textStatus, opts) {
3112
    var headers = {},
3113
      headerArray = response.getAllResponseHeaders().split("\n");
3114
3115
    for(var i = 0; i < headerArray.length; i++) {
3116
      var toSplit = headerArray[i].trim();
3117
      if(toSplit.length === 0)
3118
        continue;
3119
      var separator = toSplit.indexOf(":");
3120
      if(separator === -1) {
3121
        // Name but no value in the header
3122
        headers[toSplit] = null;
3123
        continue;
3124
      }
3125
      var name = toSplit.substring(0, separator).trim(),
3126
        value = toSplit.substring(separator + 1).trim();
3127
      headers[name] = value;
3128
    }
3129
3130
    var out = {
3131
      url: request.url,
3132
      method: request.method,
3133
      status: response.status,
3134
      statusText: response.statusText,
3135
      data: response.responseText,
3136
      headers: headers
3137
    };
3138
3139
    var contentType = (headers["content-type"]||headers["Content-Type"]||null);
3140
    if(contentType) {
3141
      if(contentType.indexOf("application/json") === 0 || contentType.indexOf("+json") > 0) {
3142
        try {
3143
          out.obj = response.responseJSON || JSON.parse(out.data) || {};
3144
        } catch (ex) {
3145
          // do not set out.obj
3146
          log("unable to parse JSON content");
3147
        }
3148
      }
3149
    }
3150
3151
    if(response.status >= 200 && response.status < 300)
3152
      cb.response(out);
3153
    else if(response.status === 0 || (response.status >= 400 && response.status < 599))
3154
      cb.error(out);
3155
    else
3156
      return cb.response(out);
3157
  };
3158
3159
  jQuery.support.cors = true;
3160
  return jQuery.ajax(obj);
3161
};
3162
3163
/*
3164
 * ShredHttpClient is a light-weight, node or browser HTTP client
3165
 */
3166
var ShredHttpClient = function(opts) {
3167
  this.opts = (opts||{});
3168
  this.isInitialized = false;
3169
3170
  var identity, toString;
3171
3172
  if (typeof window !== 'undefined') {
3173
    this.Shred = require("./shred");
3174
    this.content = require("./shred/content");
3175
  }
3176
  else
3177
    this.Shred = require("shred");
3178
  this.shred = new this.Shred(opts);
3179
};
3180
3181
ShredHttpClient.prototype.initShred = function () {
3182
  this.isInitialized = true;
3183
  this.registerProcessors(this.shred);
3184
};
3185
3186
ShredHttpClient.prototype.registerProcessors = function(shred) {
3187
  var identity = function(x) {
3188
    return x;
3189
  };
3190
  var toString = function(x) {
3191
    return x.toString();
3192
  };
3193
3194
  if (typeof window !== 'undefined') {
3195
    this.content.registerProcessor(["application/json; charset=utf-8", "application/json", "json"], {
3196
      parser: identity,
3197
      stringify: toString
3198
    });
3199
  } else {
3200
    this.Shred.registerProcessor(["application/json; charset=utf-8", "application/json", "json"], {
3201
      parser: identity,
3202
      stringify: toString
3203
    });
3204
  }
3205
};
3206
3207
ShredHttpClient.prototype.execute = function(obj) {
3208
  if(!this.isInitialized)
3209
    this.initShred();
3210
3211
  var cb = obj.on, res;
3212
  var transform = function(response) {
3213
    var out = {
3214
      headers: response._headers,
3215
      url: response.request.url,
3216
      method: response.request.method,
3217
      status: response.status,
3218
      data: response.content.data
3219
    };
3220
3221
    var headers = response._headers.normalized || response._headers;
3222
    var contentType = (headers["content-type"]||headers["Content-Type"]||null);
3223
3224
    if(contentType) {
3225
      if(contentType.indexOf("application/json") === 0 || contentType.indexOf("+json") > 0) {
3226
        if(response.content.data && response.content.data !== "")
3227
          try{
3228
            out.obj = JSON.parse(response.content.data);
3229
          }
3230
          catch (e) {
3231
            // unable to parse
3232
          }
3233
        else
3234
          out.obj = {};
3235
      }
3236
    }
3237
    return out;
3238
  };
3239
3240
  // Transform an error into a usable response-like object
3241
  var transformError = function (error) {
3242
    var out = {
3243
      // Default to a status of 0 - The client will treat this as a generic permissions sort of error
3244
      status: 0,
3245
      data: error.message || error
3246
    };
3247
3248
    if (error.code) {
3249
      out.obj = error;
3250
3251
      if (error.code === 'ENOTFOUND' || error.code === 'ECONNREFUSED') {
3252
        // We can tell the client that this should be treated as a missing resource and not as a permissions thing
3253
        out.status = 404;
3254
      }
3255
    }
3256
    return out;
3257
  };
3258
3259
  res = {
3260
    error: function (response) {
3261
      if (obj)
3262
        return cb.error(transform(response));
3263
    },
3264
    // Catch the Shred error raised when the request errors as it is made (i.e. No Response is coming)
3265
    request_error: function (err) {
3266
      if (obj)
3267
        return cb.error(transformError(err));
3268
    },
3269
    response: function (response) {
3270
      if (obj) {
3271
        return cb.response(transform(response));
3272
      }
3273
    }
3274
  };
3275
  if (obj) {
3276
    obj.on = res;
3277
  }
3278
  return this.shred.request(obj);
3279
};
3280
3281
3282
var e = (typeof window !== 'undefined' ? window : exports);
3283
3284
e.authorizations = authorizations = new SwaggerAuthorizations();
3285
e.ApiKeyAuthorization = ApiKeyAuthorization;
3286
e.PasswordAuthorization = PasswordAuthorization;
3287
e.CookieAuthorization = CookieAuthorization;
3288
e.SwaggerClient = SwaggerClient;
3289
e.SwaggerApi = SwaggerClient;
3290
e.Operation = Operation;
3291
e.Model = Model;
3292
e.addModel = addModel;
3293
e.Resolver = Resolver;
3294
})();
(-)a/api/v1/doc/lib/swagger-oauth.js (+279 lines)
Line 0 Link Here
1
var appName;
2
var popupMask;
3
var popupDialog;
4
var clientId;
5
var realm;
6
var oauth2KeyName;
7
var redirect_uri;
8
9
function handleLogin() {
10
  var scopes = [];
11
12
  var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;
13
  if(auths) {
14
    var key;
15
    var defs = auths;
16
    for(key in defs) {
17
      var auth = defs[key];
18
      if(auth.type === 'oauth2' && auth.scopes) {
19
        oauth2KeyName = key;
20
        var scope;
21
        if(Array.isArray(auth.scopes)) {
22
          // 1.2 support
23
          var i;
24
          for(i = 0; i < auth.scopes.length; i++) {
25
            scopes.push(auth.scopes[i]);
26
          }
27
        }
28
        else {
29
          // 2.0 support
30
          for(scope in auth.scopes) {
31
            scopes.push({scope: scope, description: auth.scopes[scope]});
32
          }
33
        }
34
      }
35
    }
36
  }
37
38
  if(window.swaggerUi.api
39
    && window.swaggerUi.api.info) {
40
    appName = window.swaggerUi.api.info.title;
41
  }
42
43
  popupDialog = $(
44
    [
45
      '<div class="api-popup-dialog">',
46
      '<div class="api-popup-title">Select OAuth2.0 Scopes</div>',
47
      '<div class="api-popup-content">',
48
        '<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.',
49
          '<a href="#">Learn how to use</a>',
50
        '</p>',
51
        '<p><strong>' + appName + '</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>',
52
        '<ul class="api-popup-scopes">',
53
        '</ul>',
54
        '<p class="error-msg"></p>',
55
        '<div class="api-popup-actions"><button class="api-popup-authbtn api-button green" type="button">Authorize</button><button class="api-popup-cancel api-button gray" type="button">Cancel</button></div>',
56
      '</div>',
57
      '</div>'].join(''));
58
  $(document.body).append(popupDialog);
59
60
  popup = popupDialog.find('ul.api-popup-scopes').empty();
61
  for (i = 0; i < scopes.length; i ++) {
62
    scope = scopes[i];
63
    str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"/>' + '<label for="scope_' + i + '">' + scope.scope;
64
    if (scope.description) {
65
      str += '<br/><span class="api-scope-desc">' + scope.description + '</span>';
66
    }
67
    str += '</label></li>';
68
    popup.append(str);
69
  }
70
71
  var $win = $(window),
72
    dw = $win.width(),
73
    dh = $win.height(),
74
    st = $win.scrollTop(),
75
    dlgWd = popupDialog.outerWidth(),
76
    dlgHt = popupDialog.outerHeight(),
77
    top = (dh -dlgHt)/2 + st,
78
    left = (dw - dlgWd)/2;
79
80
  popupDialog.css({
81
    top: (top < 0? 0 : top) + 'px',
82
    left: (left < 0? 0 : left) + 'px'
83
  });
84
85
  popupDialog.find('button.api-popup-cancel').click(function() {
86
    popupMask.hide();
87
    popupDialog.hide();
88
    popupDialog.empty();
89
    popupDialog = [];
90
  });
91
92
  $('button.api-popup-authbtn').unbind();
93
  popupDialog.find('button.api-popup-authbtn').click(function() {
94
    popupMask.hide();
95
    popupDialog.hide();
96
97
    var authSchemes = window.swaggerUi.api.authSchemes;
98
    var host = window.location;
99
    var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
100
    var redirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
101
    var url = null;
102
103
    for (var key in authSchemes) {
104
      if (authSchemes.hasOwnProperty(key)) {
105
        var flow = authSchemes[key].flow;
106
107
        if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {
108
          var dets = authSchemes[key];
109
          url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');
110
          window.swaggerUi.tokenName = dets.tokenName || 'access_token';
111
          window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);
112
        }
113
        else if(authSchemes[key].grantTypes) {
114
          // 1.2 support
115
          var o = authSchemes[key].grantTypes;
116
          for(var t in o) {
117
            if(o.hasOwnProperty(t) && t === 'implicit') {
118
              var dets = o[t];
119
              var ep = dets.loginEndpoint.url;
120
              url = dets.loginEndpoint.url + '?response_type=token';
121
              window.swaggerUi.tokenName = dets.tokenName;
122
            }
123
            else if (o.hasOwnProperty(t) && t === 'accessCode') {
124
              var dets = o[t];
125
              var ep = dets.tokenRequestEndpoint.url;
126
              url = dets.tokenRequestEndpoint.url + '?response_type=code';
127
              window.swaggerUi.tokenName = dets.tokenName;
128
            }
129
          }
130
        }
131
      }
132
    }
133
    var scopes = []
134
    var o = $('.api-popup-scopes').find('input:checked');
135
136
    for(k =0; k < o.length; k++) {
137
      var scope = $(o[k]).attr('scope');
138
139
      if (scopes.indexOf(scope) === -1)
140
        scopes.push(scope);
141
    }
142
143
    window.enabledScopes=scopes;
144
145
    redirect_uri = redirectUrl;
146
147
    url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
148
    url += '&realm=' + encodeURIComponent(realm);
149
    url += '&client_id=' + encodeURIComponent(clientId);
150
    url += '&scope=' + encodeURIComponent(scopes);
151
152
    window.open(url);
153
  });
154
155
  popupMask.show();
156
  popupDialog.show();
157
  return;
158
}
159
160
161
function handleLogout() {
162
  for(key in window.authorizations.authz){
163
    window.authorizations.remove(key)
164
  }
165
  window.enabledScopes = null;
166
  $('.api-ic.ic-on').addClass('ic-off');
167
  $('.api-ic.ic-on').removeClass('ic-on');
168
169
  // set the info box
170
  $('.api-ic.ic-warning').addClass('ic-error');
171
  $('.api-ic.ic-warning').removeClass('ic-warning');
172
}
173
174
function initOAuth(opts) {
175
  var o = (opts||{});
176
  var errors = [];
177
178
  appName = (o.appName||errors.push('missing appName'));
179
  popupMask = (o.popupMask||$('#api-common-mask'));
180
  popupDialog = (o.popupDialog||$('.api-popup-dialog'));
181
  clientId = (o.clientId||errors.push('missing client id'));
182
  realm = (o.realm||errors.push('missing realm'));
183
184
  if(errors.length > 0){
185
    log('auth unable initialize oauth: ' + errors);
186
    return;
187
  }
188
189
  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
190
  $('.api-ic').unbind();
191
  $('.api-ic').click(function(s) {
192
    if($(s.target).hasClass('ic-off'))
193
      handleLogin();
194
    else {
195
      handleLogout();
196
    }
197
    false;
198
  });
199
}
200
201
function processOAuthCode(data) {
202
  var params = {
203
    'client_id': clientId,
204
    'code': data.code,
205
    'grant_type': 'authorization_code',
206
    'redirect_uri': redirect_uri
207
  }
208
  $.ajax(
209
  {
210
    url : window.swaggerUi.tokenUrl,
211
    type: "POST",
212
    data: params,
213
    success:function(data, textStatus, jqXHR)
214
    {
215
      onOAuthComplete(data);
216
    },
217
    error: function(jqXHR, textStatus, errorThrown)
218
    {
219
      onOAuthComplete("");
220
    }
221
  });
222
}
223
224
function onOAuthComplete(token) {
225
  if(token) {
226
    if(token.error) {
227
      var checkbox = $('input[type=checkbox],.secured')
228
      checkbox.each(function(pos){
229
        checkbox[pos].checked = false;
230
      });
231
      alert(token.error);
232
    }
233
    else {
234
      var b = token[window.swaggerUi.tokenName];
235
      if(b){
236
        // if all roles are satisfied
237
        var o = null;
238
        $.each($('.auth #api_information_panel'), function(k, v) {
239
          var children = v;
240
          if(children && children.childNodes) {
241
            var requiredScopes = [];
242
            $.each((children.childNodes), function (k1, v1){
243
              var inner = v1.innerHTML;
244
              if(inner)
245
                requiredScopes.push(inner);
246
            });
247
            var diff = [];
248
            for(var i=0; i < requiredScopes.length; i++) {
249
              var s = requiredScopes[i];
250
              if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) {
251
                diff.push(s);
252
              }
253
            }
254
            if(diff.length > 0){
255
              o = v.parentNode;
256
              $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off');
257
              $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on');
258
259
              // sorry, not all scopes are satisfied
260
              $(o).find('.api-ic').addClass('ic-warning');
261
              $(o).find('.api-ic').removeClass('ic-error');
262
            }
263
            else {
264
              o = v.parentNode;
265
              $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on');
266
              $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off');
267
268
              // all scopes are satisfied
269
              $(o).find('.api-ic').addClass('ic-info');
270
              $(o).find('.api-ic').removeClass('ic-warning');
271
              $(o).find('.api-ic').removeClass('ic-error');
272
            }
273
          }
274
        });
275
        window.authorizations.add(oauth2KeyName, new ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
276
      }
277
    }
278
  }
279
}
(-)a/api/v1/doc/lib/underscore-min.js (+6 lines)
Line 0 Link Here
1
//     Underscore.js 1.7.0
2
//     http://underscorejs.org
3
//     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4
//     Underscore may be freely distributed under the MIT license.
5
(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])<u?i=o+1:a=o}return i},h.toArray=function(n){return n?h.isArray(n)?a.call(n):n.length===+n.length?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:n.length===+n.length?n.length:h.keys(n).length},h.partition=function(n,t,r){t=h.iteratee(t,r);var e=[],u=[];return h.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},h.first=h.head=h.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:0>t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r++]);return n.apply(this,e)}},h.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this);
6
//# sourceMappingURL=underscore-min.map
(-)a/api/v1/doc/o2c.html (+20 lines)
Line 0 Link Here
1
<script>
2
var qp = null;
3
if(window.location.hash) {
4
  qp = location.hash.substring(1);
5
}
6
else {
7
  qp = location.search.substring(1);
8
}
9
qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
10
  function(key, value) {
11
    return key===""?value:decodeURIComponent(value) }
12
  ):{}
13
14
if (window.opener.swaggerUi.tokenUrl)
15
    window.opener.processOAuthCode(qp);
16
else
17
    window.opener.onOAuthComplete(qp);
18
19
window.close();
20
</script>
(-)a/api/v1/doc/swagger-ui.js (+2240 lines)
Line 0 Link Here
1
/**
2
 * swagger-ui - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
3
 * @version v2.1.8-M1
4
 * @link http://swagger.io
5
 * @license Apache 2.0
6
 */
7
$(function() {
8
9
	// Helper function for vertically aligning DOM elements
10
	// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
11
	$.fn.vAlign = function() {
12
		return this.each(function(i){
13
		var ah = $(this).height();
14
		var ph = $(this).parent().height();
15
		var mh = (ph - ah) / 2;
16
		$(this).css('margin-top', mh);
17
		});
18
	};
19
20
	$.fn.stretchFormtasticInputWidthToParent = function() {
21
		return this.each(function(i){
22
		var p_width = $(this).closest("form").innerWidth();
23
		var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
24
		var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
25
		$(this).css('width', p_width - p_padding - this_padding);
26
		});
27
	};
28
29
	$('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
30
31
	// Vertically center these paragraphs
32
	// Parent may need a min-height for this to work..
33
	$('ul.downplayed li div.content p').vAlign();
34
35
	// When a sandbox form is submitted..
36
	$("form.sandbox").submit(function(){
37
38
		var error_free = true;
39
40
		// Cycle through the forms required inputs
41
		$(this).find("input.required").each(function() {
42
43
			// Remove any existing error styles from the input
44
			$(this).removeClass('error');
45
46
			// Tack the error style on if the input is empty..
47
			if ($(this).val() == '') {
48
				$(this).addClass('error');
49
				$(this).wiggle();
50
				error_free = false;
51
			}
52
53
		});
54
55
		return error_free;
56
	});
57
58
});
59
60
function clippyCopiedCallback(a) {
61
  $('#api_key_copied').fadeIn().delay(1000).fadeOut();
62
63
  // var b = $("#clippy_tooltip_" + a);
64
  // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
65
  //   b.attr("title", "copy to clipboard")
66
  // },
67
  // 500))
68
}
69
70
// Logging function that accounts for browsers that don't have window.console
71
log = function(){
72
  log.history = log.history || [];
73
  log.history.push(arguments);
74
  if(this.console){
75
    console.log( Array.prototype.slice.call(arguments)[0] );
76
  }
77
};
78
79
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
80
if (Function.prototype.bind && console && typeof console.log == "object") {
81
    [
82
      "log","info","warn","error","assert","dir","clear","profile","profileEnd"
83
    ].forEach(function (method) {
84
        console[method] = this.bind(console[method], console);
85
    }, Function.prototype.call);
86
}
87
88
var Docs = {
89
90
	shebang: function() {
91
92
		// If shebang has an operation nickname in it..
93
		// e.g. /docs/#!/words/get_search
94
		var fragments = $.param.fragment().split('/');
95
		fragments.shift(); // get rid of the bang
96
97
		switch (fragments.length) {
98
			case 1:
99
				// Expand all operations for the resource and scroll to it
100
				var dom_id = 'resource_' + fragments[0];
101
102
				Docs.expandEndpointListForResource(fragments[0]);
103
				$("#"+dom_id).slideto({highlight: false});
104
				break;
105
			case 2:
106
				// Refer to the endpoint DOM element, e.g. #words_get_search
107
108
        // Expand Resource
109
        Docs.expandEndpointListForResource(fragments[0]);
110
        $("#"+dom_id).slideto({highlight: false});
111
112
        // Expand operation
113
				var li_dom_id = fragments.join('_');
114
				var li_content_dom_id = li_dom_id + "_content";
115
116
117
				Docs.expandOperation($('#'+li_content_dom_id));
118
				$('#'+li_dom_id).slideto({highlight: false});
119
				break;
120
		}
121
122
	},
123
124
	toggleEndpointListForResource: function(resource) {
125
		var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
126
		if (elem.is(':visible')) {
127
			Docs.collapseEndpointListForResource(resource);
128
		} else {
129
			Docs.expandEndpointListForResource(resource);
130
		}
131
	},
132
133
	// Expand resource
134
	expandEndpointListForResource: function(resource) {
135
		var resource = Docs.escapeResourceName(resource);
136
		if (resource == '') {
137
			$('.resource ul.endpoints').slideDown();
138
			return;
139
		}
140
141
		$('li#resource_' + resource).addClass('active');
142
143
		var elem = $('li#resource_' + resource + ' ul.endpoints');
144
		elem.slideDown();
145
	},
146
147
	// Collapse resource and mark as explicitly closed
148
	collapseEndpointListForResource: function(resource) {
149
		var resource = Docs.escapeResourceName(resource);
150
		if (resource == '') {
151
			$('.resource ul.endpoints').slideUp();
152
			return;
153
		}
154
155
		$('li#resource_' + resource).removeClass('active');
156
157
		var elem = $('li#resource_' + resource + ' ul.endpoints');
158
		elem.slideUp();
159
	},
160
161
	expandOperationsForResource: function(resource) {
162
		// Make sure the resource container is open..
163
		Docs.expandEndpointListForResource(resource);
164
165
		if (resource == '') {
166
			$('.resource ul.endpoints li.operation div.content').slideDown();
167
			return;
168
		}
169
170
		$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
171
			Docs.expandOperation($(this));
172
		});
173
	},
174
175
	collapseOperationsForResource: function(resource) {
176
		// Make sure the resource container is open..
177
		Docs.expandEndpointListForResource(resource);
178
179
		if (resource == '') {
180
			$('.resource ul.endpoints li.operation div.content').slideUp();
181
			return;
182
		}
183
184
		$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
185
			Docs.collapseOperation($(this));
186
		});
187
	},
188
189
	escapeResourceName: function(resource) {
190
		return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&");
191
	},
192
193
	expandOperation: function(elem) {
194
		elem.slideDown();
195
	},
196
197
	collapseOperation: function(elem) {
198
		elem.slideUp();
199
	}
200
};
201
202
this["Handlebars"] = this["Handlebars"] || {};
203
this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
204
this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
205
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
206
  return "<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n  <div class='key_input_container'>\n    <div class='auth_label'>"
207
    + escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper)))
208
    + "</div>\n    <input placeholder=\"api_key\" class=\"auth_input\" id=\"input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n    <div class='auth_submit'><a class='auth_submit_button' id=\"apply_api_key\" href=\"#\">apply</a></div>\n  </div>\n</div>\n\n";
209
},"useData":true});
210
var SwaggerUi,
211
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
212
  __hasProp = {}.hasOwnProperty;
213
214
SwaggerUi = (function(_super) {
215
  __extends(SwaggerUi, _super);
216
217
  function SwaggerUi() {
218
    return SwaggerUi.__super__.constructor.apply(this, arguments);
219
  }
220
221
  SwaggerUi.prototype.dom_id = "swagger_ui";
222
223
  SwaggerUi.prototype.options = null;
224
225
  SwaggerUi.prototype.api = null;
226
227
  SwaggerUi.prototype.headerView = null;
228
229
  SwaggerUi.prototype.mainView = null;
230
231
  SwaggerUi.prototype.initialize = function(options) {
232
    if (options == null) {
233
      options = {};
234
    }
235
    if (options.dom_id != null) {
236
      this.dom_id = options.dom_id;
237
      delete options.dom_id;
238
    }
239
    if (options.supportedSubmitMethods == null) {
240
      options.supportedSubmitMethods = ['get', 'put', 'post', 'delete', 'head', 'options', 'patch'];
241
    }
242
    if ($('#' + this.dom_id) == null) {
243
      $('body').append('<div id="' + this.dom_id + '"></div>');
244
    }
245
    this.options = options;
246
    this.options.success = (function(_this) {
247
      return function() {
248
        return _this.render();
249
      };
250
    })(this);
251
    this.options.progress = (function(_this) {
252
      return function(d) {
253
        return _this.showMessage(d);
254
      };
255
    })(this);
256
    this.options.failure = (function(_this) {
257
      return function(d) {
258
        return _this.onLoadFailure(d);
259
      };
260
    })(this);
261
    this.headerView = new HeaderView({
262
      el: $('#header')
263
    });
264
    return this.headerView.on('update-swagger-ui', (function(_this) {
265
      return function(data) {
266
        return _this.updateSwaggerUi(data);
267
      };
268
    })(this));
269
  };
270
271
  SwaggerUi.prototype.setOption = function(option, value) {
272
    return this.options[option] = value;
273
  };
274
275
  SwaggerUi.prototype.getOption = function(option) {
276
    return this.options[option];
277
  };
278
279
  SwaggerUi.prototype.updateSwaggerUi = function(data) {
280
    this.options.url = data.url;
281
    return this.load();
282
  };
283
284
  SwaggerUi.prototype.load = function() {
285
    var url, _ref;
286
    if ((_ref = this.mainView) != null) {
287
      _ref.clear();
288
    }
289
    url = this.options.url;
290
    if (url && url.indexOf("http") !== 0) {
291
      url = this.buildUrl(window.location.href.toString(), url);
292
    }
293
    this.options.url = url;
294
    this.headerView.update(url);
295
    return this.api = new SwaggerClient(this.options);
296
  };
297
298
  SwaggerUi.prototype.collapseAll = function() {
299
    return Docs.collapseEndpointListForResource('');
300
  };
301
302
  SwaggerUi.prototype.listAll = function() {
303
    return Docs.collapseOperationsForResource('');
304
  };
305
306
  SwaggerUi.prototype.expandAll = function() {
307
    return Docs.expandOperationsForResource('');
308
  };
309
310
  SwaggerUi.prototype.render = function() {
311
    this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...');
312
    this.mainView = new MainView({
313
      model: this.api,
314
      el: $('#' + this.dom_id),
315
      swaggerOptions: this.options
316
    }).render();
317
    this.showMessage();
318
    switch (this.options.docExpansion) {
319
      case "full":
320
        this.expandAll();
321
        break;
322
      case "list":
323
        this.listAll();
324
    }
325
    this.renderGFM();
326
    if (this.options.onComplete) {
327
      this.options.onComplete(this.api, this);
328
    }
329
    return setTimeout((function(_this) {
330
      return function() {
331
        return Docs.shebang();
332
      };
333
    })(this), 100);
334
  };
335
336
  SwaggerUi.prototype.buildUrl = function(base, url) {
337
    var endOfPath, parts;
338
    if (url.indexOf("/") === 0) {
339
      parts = base.split("/");
340
      base = parts[0] + "//" + parts[2];
341
      return base + url;
342
    } else {
343
      endOfPath = base.length;
344
      if (base.indexOf("?") > -1) {
345
        endOfPath = Math.min(endOfPath, base.indexOf("?"));
346
      }
347
      if (base.indexOf("#") > -1) {
348
        endOfPath = Math.min(endOfPath, base.indexOf("#"));
349
      }
350
      base = base.substring(0, endOfPath);
351
      if (base.indexOf("/", base.length - 1) !== -1) {
352
        return base + url;
353
      }
354
      return base + "/" + url;
355
    }
356
  };
357
358
  SwaggerUi.prototype.showMessage = function(data) {
359
    if (data == null) {
360
      data = '';
361
    }
362
    $('#message-bar').removeClass('message-fail');
363
    $('#message-bar').addClass('message-success');
364
    return $('#message-bar').html(data);
365
  };
366
367
  SwaggerUi.prototype.onLoadFailure = function(data) {
368
    var val;
369
    if (data == null) {
370
      data = '';
371
    }
372
    $('#message-bar').removeClass('message-success');
373
    $('#message-bar').addClass('message-fail');
374
    val = $('#message-bar').html(data);
375
    if (this.options.onFailure != null) {
376
      this.options.onFailure(data);
377
    }
378
    return val;
379
  };
380
381
  SwaggerUi.prototype.renderGFM = function(data) {
382
    if (data == null) {
383
      data = '';
384
    }
385
    return $('.markdown').each(function(index) {
386
      return $(this).html(marked($(this).html()));
387
    });
388
  };
389
390
  return SwaggerUi;
391
392
})(Backbone.Router);
393
394
window.SwaggerUi = SwaggerUi;
395
396
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
397
  return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n  <div class='key_input_container'>\n    <div class=\"auth_label\">Username</div>\n    <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n    <div class=\"auth_label\">Password</div>\n    <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n    <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\">apply</a></div>\n  </div>\n</div>\n\n";
398
  },"useData":true});
399
Handlebars.registerHelper('sanitize', function(html) {
400
  html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
401
  return new Handlebars.SafeString(html);
402
});
403
404
this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
405
  var stack1, buffer = "";
406
  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
407
  if (stack1 != null) { buffer += stack1; }
408
  return buffer;
409
},"2":function(depth0,helpers,partials,data) {
410
  var stack1, lambda=this.lambda, buffer = "	<option value=\"";
411
  stack1 = lambda(depth0, depth0);
412
  if (stack1 != null) { buffer += stack1; }
413
  buffer += "\">";
414
  stack1 = lambda(depth0, depth0);
415
  if (stack1 != null) { buffer += stack1; }
416
  return buffer + "</option>\n";
417
},"4":function(depth0,helpers,partials,data) {
418
  return "  <option value=\"application/json\">application/json</option>\n";
419
  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
420
  var stack1, buffer = "<label for=\"contentType\"></label>\n<select name=\"contentType\">\n";
421
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
422
  if (stack1 != null) { buffer += stack1; }
423
  return buffer + "</select>\n";
424
},"useData":true});
425
var ApiKeyButton,
426
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
427
  __hasProp = {}.hasOwnProperty;
428
429
ApiKeyButton = (function(_super) {
430
  __extends(ApiKeyButton, _super);
431
432
  function ApiKeyButton() {
433
    return ApiKeyButton.__super__.constructor.apply(this, arguments);
434
  }
435
436
  ApiKeyButton.prototype.initialize = function() {};
437
438
  ApiKeyButton.prototype.render = function() {
439
    var template;
440
    template = this.template();
441
    $(this.el).html(template(this.model));
442
    return this;
443
  };
444
445
  ApiKeyButton.prototype.events = {
446
    "click #apikey_button": "toggleApiKeyContainer",
447
    "click #apply_api_key": "applyApiKey"
448
  };
449
450
  ApiKeyButton.prototype.applyApiKey = function() {
451
    var elem;
452
    window.authorizations.add(this.model.name, new ApiKeyAuthorization(this.model.name, $("#input_apiKey_entry").val(), this.model["in"]));
453
    window.swaggerUi.load();
454
    return elem = $('#apikey_container').show();
455
  };
456
457
  ApiKeyButton.prototype.toggleApiKeyContainer = function() {
458
    var elem;
459
    if ($('#apikey_container').length > 0) {
460
      elem = $('#apikey_container').first();
461
      if (elem.is(':visible')) {
462
        return elem.hide();
463
      } else {
464
        $('.auth_container').hide();
465
        return elem.show();
466
      }
467
    }
468
  };
469
470
  ApiKeyButton.prototype.template = function() {
471
    return Handlebars.templates.apikey_button_view;
472
  };
473
474
  return ApiKeyButton;
475
476
})(Backbone.View);
477
478
this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
479
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "  <div class=\"info_title\">"
480
    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
481
    + "</div>\n  <div class=\"info_description markdown\">";
482
  stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0);
483
  if (stack1 != null) { buffer += stack1; }
484
  buffer += "</div>\n  ";
485
  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
486
  if (stack1 != null) { buffer += stack1; }
487
  buffer += "\n  ";
488
  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data});
489
  if (stack1 != null) { buffer += stack1; }
490
  buffer += "\n  ";
491
  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data});
492
  if (stack1 != null) { buffer += stack1; }
493
  buffer += "\n  ";
494
  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});
495
  if (stack1 != null) { buffer += stack1; }
496
  buffer += "\n  ";
497
  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});
498
  if (stack1 != null) { buffer += stack1; }
499
  return buffer + "\n";
500
},"2":function(depth0,helpers,partials,data) {
501
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
502
  return "<div class=\"info_tos\"><a href=\""
503
    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), depth0))
504
    + "\">Terms of service</a></div>";
505
},"4":function(depth0,helpers,partials,data) {
506
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
507
  return "<div class='info_name'>Created by "
508
    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0))
509
    + "</div>";
510
},"6":function(depth0,helpers,partials,data) {
511
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
512
  return "<div class='info_url'>See more at <a href=\""
513
    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0))
514
    + "\">"
515
    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0))
516
    + "</a></div>";
517
},"8":function(depth0,helpers,partials,data) {
518
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
519
  return "<div class='info_email'><a href=\"mailto:"
520
    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0))
521
    + "?subject="
522
    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
523
    + "\">Contact the developer</a></div>";
524
},"10":function(depth0,helpers,partials,data) {
525
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
526
  return "<div class='info_license'><a href='"
527
    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.url : stack1), depth0))
528
    + "'>"
529
    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.name : stack1), depth0))
530
    + "</a></div>";
531
},"12":function(depth0,helpers,partials,data) {
532
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
533
  return "    , <span style=\"font-variant: small-caps\">api version</span>: "
534
    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))
535
    + "\n    ";
536
},"14":function(depth0,helpers,partials,data) {
537
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
538
  return "    <span style=\"float:right\"><a href=\""
539
    + escapeExpression(((helper = (helper = helpers.validatorUrl || (depth0 != null ? depth0.validatorUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"validatorUrl","hash":{},"data":data}) : helper)))
540
    + "/debug?url="
541
    + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))
542
    + "\"><img id=\"validator\" src=\""
543
    + escapeExpression(((helper = (helper = helpers.validatorUrl || (depth0 != null ? depth0.validatorUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"validatorUrl","hash":{},"data":data}) : helper)))
544
    + "?url="
545
    + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))
546
    + "\"></a>\n    </span>\n";
547
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
548
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class='info' id='api_info'>\n";
549
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
550
  if (stack1 != null) { buffer += stack1; }
551
  buffer += "</div>\n<div class='container' id='resources_container'>\n  <ul id='resources'></ul>\n\n  <div class=\"footer\">\n    <br>\n    <br>\n    <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "
552
    + escapeExpression(((helper = (helper = helpers.basePath || (depth0 != null ? depth0.basePath : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"basePath","hash":{},"data":data}) : helper)))
553
    + "\n";
554
  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});
555
  if (stack1 != null) { buffer += stack1; }
556
  buffer += "]\n";
557
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.validatorUrl : depth0), {"name":"if","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data});
558
  if (stack1 != null) { buffer += stack1; }
559
  return buffer + "    </h4>\n    </div>\n</div>\n";
560
},"useData":true});
561
var BasicAuthButton,
562
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
563
  __hasProp = {}.hasOwnProperty;
564
565
BasicAuthButton = (function(_super) {
566
  __extends(BasicAuthButton, _super);
567
568
  function BasicAuthButton() {
569
    return BasicAuthButton.__super__.constructor.apply(this, arguments);
570
  }
571
572
  BasicAuthButton.prototype.initialize = function() {};
573
574
  BasicAuthButton.prototype.render = function() {
575
    var template;
576
    template = this.template();
577
    $(this.el).html(template(this.model));
578
    return this;
579
  };
580
581
  BasicAuthButton.prototype.events = {
582
    "click #basic_auth_button": "togglePasswordContainer",
583
    "click #apply_basic_auth": "applyPassword"
584
  };
585
586
  BasicAuthButton.prototype.applyPassword = function() {
587
    var elem, password, username;
588
    username = $(".input_username").val();
589
    password = $(".input_password").val();
590
    window.authorizations.add(this.model.type, new PasswordAuthorization("basic", username, password));
591
    window.swaggerUi.load();
592
    return elem = $('#basic_auth_container').hide();
593
  };
594
595
  BasicAuthButton.prototype.togglePasswordContainer = function() {
596
    var elem;
597
    if ($('#basic_auth_container').length > 0) {
598
      elem = $('#basic_auth_container').show();
599
      if (elem.is(':visible')) {
600
        return elem.slideUp();
601
      } else {
602
        $('.auth_container').hide();
603
        return elem.show();
604
      }
605
    }
606
  };
607
608
  BasicAuthButton.prototype.template = function() {
609
    return Handlebars.templates.basic_auth_button_view;
610
  };
611
612
  return BasicAuthButton;
613
614
})(Backbone.View);
615
616
this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
617
  return "deprecated";
618
  },"3":function(depth0,helpers,partials,data) {
619
  return "            <h4>Warning: Deprecated</h4>\n";
620
  },"5":function(depth0,helpers,partials,data) {
621
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "        <h4>Implementation Notes</h4>\n        <p class=\"markdown\">";
622
  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
623
  if (stack1 != null) { buffer += stack1; }
624
  return buffer + "</p>\n";
625
},"7":function(depth0,helpers,partials,data) {
626
  return "        <div class=\"auth\">\n        <span class=\"api-ic ic-error\"></span>";
627
  },"9":function(depth0,helpers,partials,data) {
628
  var stack1, buffer = "          <div id=\"api_information_panel\" style=\"top: 526px; left: 776px; display: none;\">\n";
629
  stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});
630
  if (stack1 != null) { buffer += stack1; }
631
  return buffer + "          </div>\n";
632
},"10":function(depth0,helpers,partials,data) {
633
  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "            <div title='";
634
  stack1 = lambda((depth0 != null ? depth0.description : depth0), depth0);
635
  if (stack1 != null) { buffer += stack1; }
636
  return buffer + "'>"
637
    + escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0))
638
    + "</div>\n";
639
},"12":function(depth0,helpers,partials,data) {
640
  return "</div>";
641
  },"14":function(depth0,helpers,partials,data) {
642
  return "        <div class='access'>\n          <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n        </div>\n";
643
  },"16":function(depth0,helpers,partials,data) {
644
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
645
  return "          <h4>Response Class (Status "
646
    + escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper)))
647
    + ")</h4>\n          <p><span class=\"model-signature\" /></p>\n          <br/>\n          <div class=\"response-content-type\" />\n";
648
},"18":function(depth0,helpers,partials,data) {
649
  return "          <h4>Parameters</h4>\n          <table class='fullwidth'>\n          <thead>\n            <tr>\n            <th style=\"width: 100px; max-width: 100px\">Parameter</th>\n            <th style=\"width: 310px; max-width: 310px\">Value</th>\n            <th style=\"width: 200px; max-width: 200px\">Description</th>\n            <th style=\"width: 100px; max-width: 100px\">Parameter Type</th>\n            <th style=\"width: 220px; max-width: 230px\">Data Type</th>\n            </tr>\n          </thead>\n          <tbody class=\"operation-params\">\n\n          </tbody>\n          </table>\n";
650
  },"20":function(depth0,helpers,partials,data) {
651
  return "          <div style='margin:0;padding:0;display:inline'></div>\n          <h4>Response Messages</h4>\n          <table class='fullwidth'>\n            <thead>\n            <tr>\n              <th>HTTP Status Code</th>\n              <th>Reason</th>\n              <th>Response Model</th>\n            </tr>\n            </thead>\n            <tbody class=\"operation-status\">\n            \n            </tbody>\n          </table>\n";
652
  },"22":function(depth0,helpers,partials,data) {
653
  return "";
654
},"24":function(depth0,helpers,partials,data) {
655
  return "          <div class='sandbox_header'>\n            <input class='submit' name='commit' type='button' value='Try it out!' />\n            <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n            <span class='response_throbber' style='display:none'></span>\n          </div>\n";
656
  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
657
  var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "\n  <ul class='operations' >\n    <li class='"
658
    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
659
    + " operation' id='"
660
    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
661
    + "_"
662
    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
663
    + "'>\n      <div class='heading'>\n        <h3>\n          <span class='http_method'>\n          <a href='#!/"
664
    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
665
    + "/"
666
    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
667
    + "' class=\"toggleOperation\">"
668
    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
669
    + "</a>\n          </span>\n          <span class='path'>\n          <a href='#!/"
670
    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
671
    + "/"
672
    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
673
    + "' class=\"toggleOperation ";
674
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
675
  if (stack1 != null) { buffer += stack1; }
676
  buffer += "\">"
677
    + escapeExpression(((helper = (helper = helpers.path || (depth0 != null ? depth0.path : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"path","hash":{},"data":data}) : helper)))
678
    + "</a>\n          </span>\n        </h3>\n        <ul class='options'>\n          <li>\n          <a href='#!/"
679
    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
680
    + "/"
681
    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
682
    + "' class=\"toggleOperation\">";
683
  stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper));
684
  if (stack1 != null) { buffer += stack1; }
685
  buffer += "</a>\n          </li>\n        </ul>\n      </div>\n      <div class='content' id='"
686
    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
687
    + "_"
688
    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
689
    + "_content' style='display:none'>\n";
690
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
691
  if (stack1 != null) { buffer += stack1; }
692
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.description : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});
693
  if (stack1 != null) { buffer += stack1; }
694
  stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
695
  if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
696
  if (stack1 != null) { buffer += stack1; }
697
  buffer += "\n";
698
  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.oauth : depth0), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
699
  if (stack1 != null) { buffer += stack1; }
700
  buffer += "        ";
701
  stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
702
  if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
703
  if (stack1 != null) { buffer += stack1; }
704
  buffer += "\n";
705
  stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
706
  if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
707
  if (stack1 != null) { buffer += stack1; }
708
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(16, data),"inverse":this.noop,"data":data});
709
  if (stack1 != null) { buffer += stack1; }
710
  buffer += "        <form accept-charset='UTF-8' class='sandbox'>\n          <div style='margin:0;padding:0;display:inline'></div>\n";
711
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(18, data),"inverse":this.noop,"data":data});
712
  if (stack1 != null) { buffer += stack1; }
713
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(20, data),"inverse":this.noop,"data":data});
714
  if (stack1 != null) { buffer += stack1; }
715
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(22, data),"inverse":this.program(24, data),"data":data});
716
  if (stack1 != null) { buffer += stack1; }
717
  return buffer + "        </form>\n        <div class='response' style='display:none'>\n          <h4>Request URL</h4>\n          <div class='block request_url'></div>\n          <h4>Response Body</h4>\n          <div class='block response_body'></div>\n          <h4>Response Code</h4>\n          <div class='block response_code'></div>\n          <h4>Response Headers</h4>\n          <div class='block response_headers'></div>\n        </div>\n      </div>\n    </li>\n  </ul>\n";
718
},"useData":true});
719
var ContentTypeView,
720
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
721
  __hasProp = {}.hasOwnProperty;
722
723
ContentTypeView = (function(_super) {
724
  __extends(ContentTypeView, _super);
725
726
  function ContentTypeView() {
727
    return ContentTypeView.__super__.constructor.apply(this, arguments);
728
  }
729
730
  ContentTypeView.prototype.initialize = function() {};
731
732
  ContentTypeView.prototype.render = function() {
733
    var template;
734
    template = this.template();
735
    $(this.el).html(template(this.model));
736
    $('label[for=contentType]', $(this.el)).text('Response Content Type');
737
    return this;
738
  };
739
740
  ContentTypeView.prototype.template = function() {
741
    return Handlebars.templates.content_type;
742
  };
743
744
  return ContentTypeView;
745
746
})(Backbone.View);
747
748
this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
749
  var stack1, buffer = "";
750
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
751
  if (stack1 != null) { buffer += stack1; }
752
  return buffer;
753
},"2":function(depth0,helpers,partials,data) {
754
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
755
  return "			<input type=\"file\" name='"
756
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
757
    + "'/>\n			<div class=\"parameter-content-type\" />\n";
758
},"4":function(depth0,helpers,partials,data) {
759
  var stack1, buffer = "";
760
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
761
  if (stack1 != null) { buffer += stack1; }
762
  return buffer;
763
},"5":function(depth0,helpers,partials,data) {
764
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
765
  return "				<textarea class='body-textarea' name='"
766
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
767
    + "'>"
768
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
769
    + "</textarea>\n        <br />\n        <div class=\"parameter-content-type\" />\n";
770
},"7":function(depth0,helpers,partials,data) {
771
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
772
  return "				<textarea class='body-textarea' name='"
773
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
774
    + "'></textarea>\n				<br />\n				<div class=\"parameter-content-type\" />\n";
775
},"9":function(depth0,helpers,partials,data) {
776
  var stack1, buffer = "";
777
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data});
778
  if (stack1 != null) { buffer += stack1; }
779
  return buffer;
780
},"10":function(depth0,helpers,partials,data) {
781
  var stack1, buffer = "";
782
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(11, data),"inverse":this.program(13, data),"data":data});
783
  if (stack1 != null) { buffer += stack1; }
784
  return buffer;
785
},"11":function(depth0,helpers,partials,data) {
786
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
787
  return "				<input class='parameter' minlength='0' name='"
788
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
789
    + "' placeholder='' type='text' value='"
790
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
791
    + "'/>\n";
792
},"13":function(depth0,helpers,partials,data) {
793
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
794
  return "				<input class='parameter' minlength='0' name='"
795
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
796
    + "' placeholder='' type='text' value=''/>\n";
797
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
798
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
799
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
800
    + "</td>\n<td>\n\n";
801
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
802
  if (stack1 != null) { buffer += stack1; }
803
  buffer += "\n</td>\n<td class=\"markdown\">";
804
  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
805
  if (stack1 != null) { buffer += stack1; }
806
  buffer += "</td>\n<td>";
807
  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
808
  if (stack1 != null) { buffer += stack1; }
809
  return buffer + "</td>\n<td>\n	<span class=\"model-signature\"></span>\n</td>\n";
810
},"useData":true});
811
var HeaderView,
812
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
813
  __hasProp = {}.hasOwnProperty;
814
815
HeaderView = (function(_super) {
816
  __extends(HeaderView, _super);
817
818
  function HeaderView() {
819
    return HeaderView.__super__.constructor.apply(this, arguments);
820
  }
821
822
  HeaderView.prototype.events = {
823
    'click #show-pet-store-icon': 'showPetStore',
824
    'click #show-wordnik-dev-icon': 'showWordnikDev',
825
    'click #explore': 'showCustom',
826
    'keyup #input_baseUrl': 'showCustomOnKeyup',
827
    'keyup #input_apiKey': 'showCustomOnKeyup'
828
  };
829
830
  HeaderView.prototype.initialize = function() {};
831
832
  HeaderView.prototype.showPetStore = function(e) {
833
    return this.trigger('update-swagger-ui', {
834
      url: "http://petstore.swagger.wordnik.com/api/api-docs"
835
    });
836
  };
837
838
  HeaderView.prototype.showWordnikDev = function(e) {
839
    return this.trigger('update-swagger-ui', {
840
      url: "http://api.wordnik.com/v4/resources.json"
841
    });
842
  };
843
844
  HeaderView.prototype.showCustomOnKeyup = function(e) {
845
    if (e.keyCode === 13) {
846
      return this.showCustom();
847
    }
848
  };
849
850
  HeaderView.prototype.showCustom = function(e) {
851
    if (e != null) {
852
      e.preventDefault();
853
    }
854
    return this.trigger('update-swagger-ui', {
855
      url: $('#input_baseUrl').val(),
856
      apiKey: $('#input_apiKey').val()
857
    });
858
  };
859
860
  HeaderView.prototype.update = function(url, apiKey, trigger) {
861
    if (trigger == null) {
862
      trigger = false;
863
    }
864
    $('#input_baseUrl').val(url);
865
    if (trigger) {
866
      return this.trigger('update-swagger-ui', {
867
        url: url
868
      });
869
    }
870
  };
871
872
  return HeaderView;
873
874
})(Backbone.View);
875
876
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
877
  return " multiple='multiple'";
878
  },"3":function(depth0,helpers,partials,data) {
879
  return "";
880
},"5":function(depth0,helpers,partials,data) {
881
  var stack1, buffer = "";
882
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
883
  if (stack1 != null) { buffer += stack1; }
884
  return buffer;
885
},"6":function(depth0,helpers,partials,data) {
886
  var stack1, helperMissing=helpers.helperMissing, buffer = "";
887
  stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
888
  if (stack1 != null) { buffer += stack1; }
889
  return buffer;
890
},"7":function(depth0,helpers,partials,data) {
891
  return "          <option selected=\"\" value=''></option>\n";
892
  },"9":function(depth0,helpers,partials,data) {
893
  var stack1, buffer = "";
894
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
895
  if (stack1 != null) { buffer += stack1; }
896
  return buffer;
897
},"10":function(depth0,helpers,partials,data) {
898
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
899
  return "        <option selected=\"\" value='"
900
    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
901
    + "'>"
902
    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
903
    + " (default)</option>\n";
904
},"12":function(depth0,helpers,partials,data) {
905
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
906
  return "        <option value='"
907
    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
908
    + "'>"
909
    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
910
    + "</option>\n";
911
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
912
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
913
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
914
    + "</td>\n<td>\n  <select ";
915
  stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
916
  if (stack1 != null) { buffer += stack1; }
917
  buffer += " class='parameter' name='"
918
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
919
    + "'>\n";
920
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
921
  if (stack1 != null) { buffer += stack1; }
922
  stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
923
  if (stack1 != null) { buffer += stack1; }
924
  buffer += "  </select>\n</td>\n<td class=\"markdown\">";
925
  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
926
  if (stack1 != null) { buffer += stack1; }
927
  buffer += "</td>\n<td>";
928
  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
929
  if (stack1 != null) { buffer += stack1; }
930
  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
931
},"useData":true});
932
var MainView,
933
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
934
  __hasProp = {}.hasOwnProperty;
935
936
MainView = (function(_super) {
937
  var sorters;
938
939
  __extends(MainView, _super);
940
941
  function MainView() {
942
    return MainView.__super__.constructor.apply(this, arguments);
943
  }
944
945
  sorters = {
946
    'alpha': function(a, b) {
947
      return a.path.localeCompare(b.path);
948
    },
949
    'method': function(a, b) {
950
      return a.method.localeCompare(b.method);
951
    }
952
  };
953
954
  MainView.prototype.initialize = function(opts) {
955
    var auth, key, value, _ref;
956
    if (opts == null) {
957
      opts = {};
958
    }
959
    this.model.auths = [];
960
    _ref = this.model.securityDefinitions;
961
    for (key in _ref) {
962
      value = _ref[key];
963
      auth = {
964
        name: key,
965
        type: value.type,
966
        value: value
967
      };
968
      this.model.auths.push(auth);
969
    }
970
    if (this.model.swaggerVersion === "2.0") {
971
      if ("validatorUrl" in opts.swaggerOptions) {
972
        return this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
973
      } else if (this.model.url.indexOf("localhost") > 0) {
974
        return this.model.validatorUrl = null;
975
      } else {
976
        return this.model.validatorUrl = "http://online.swagger.io/validator";
977
      }
978
    }
979
  };
980
981
  MainView.prototype.render = function() {
982
    var auth, button, counter, id, name, resource, resources, _i, _len, _ref;
983
    if (this.model.securityDefinitions) {
984
      for (name in this.model.securityDefinitions) {
985
        auth = this.model.securityDefinitions[name];
986
        if (auth.type === "apiKey" && $("#apikey_button").length === 0) {
987
          button = new ApiKeyButton({
988
            model: auth
989
          }).render().el;
990
          $('.auth_main_container').append(button);
991
        }
992
        if (auth.type === "basicAuth" && $("#basic_auth_button").length === 0) {
993
          button = new BasicAuthButton({
994
            model: auth
995
          }).render().el;
996
          $('.auth_main_container').append(button);
997
        }
998
      }
999
    }
1000
    $(this.el).html(Handlebars.templates.main(this.model));
1001
    resources = {};
1002
    counter = 0;
1003
    _ref = this.model.apisArray;
1004
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1005
      resource = _ref[_i];
1006
      id = resource.name;
1007
      while (typeof resources[id] !== 'undefined') {
1008
        id = id + "_" + counter;
1009
        counter += 1;
1010
      }
1011
      resource.id = id;
1012
      resources[id] = resource;
1013
      this.addResource(resource, this.model.auths);
1014
    }
1015
    $('.propWrap').hover(function() {
1016
      return $('.optionsWrapper', $(this)).show();
1017
    }, function() {
1018
      return $('.optionsWrapper', $(this)).hide();
1019
    });
1020
    return this;
1021
  };
1022
1023
  MainView.prototype.addResource = function(resource, auths) {
1024
    var resourceView;
1025
    resource.id = resource.id.replace(/\s/g, '_');
1026
    resourceView = new ResourceView({
1027
      model: resource,
1028
      tagName: 'li',
1029
      id: 'resource_' + resource.id,
1030
      className: 'resource',
1031
      auths: auths,
1032
      swaggerOptions: this.options.swaggerOptions
1033
    });
1034
    return $('#resources').append(resourceView.render().el);
1035
  };
1036
1037
  MainView.prototype.clear = function() {
1038
    return $(this.el).html('');
1039
  };
1040
1041
  return MainView;
1042
1043
})(Backbone.View);
1044
1045
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
1046
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1047
  return "        <textarea class='body-textarea' readonly='readonly' name='"
1048
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1049
    + "'>"
1050
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
1051
    + "</textarea>\n";
1052
},"3":function(depth0,helpers,partials,data) {
1053
  var stack1, buffer = "";
1054
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
1055
  if (stack1 != null) { buffer += stack1; }
1056
  return buffer;
1057
},"4":function(depth0,helpers,partials,data) {
1058
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1059
  return "            "
1060
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
1061
    + "\n";
1062
},"6":function(depth0,helpers,partials,data) {
1063
  return "            (empty)\n";
1064
  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
1065
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
1066
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1067
    + "</td>\n<td>\n";
1068
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
1069
  if (stack1 != null) { buffer += stack1; }
1070
  buffer += "</td>\n<td class=\"markdown\">";
1071
  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
1072
  if (stack1 != null) { buffer += stack1; }
1073
  buffer += "</td>\n<td>";
1074
  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
1075
  if (stack1 != null) { buffer += stack1; }
1076
  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
1077
},"useData":true});
1078
this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
1079
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1080
  return "        <textarea class='body-textarea'  readonly='readonly' placeholder='(required)' name='"
1081
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1082
    + "'>"
1083
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
1084
    + "</textarea>\n";
1085
},"3":function(depth0,helpers,partials,data) {
1086
  var stack1, buffer = "";
1087
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
1088
  if (stack1 != null) { buffer += stack1; }
1089
  return buffer;
1090
},"4":function(depth0,helpers,partials,data) {
1091
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1092
  return "            "
1093
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
1094
    + "\n";
1095
},"6":function(depth0,helpers,partials,data) {
1096
  return "            (empty)\n";
1097
  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
1098
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'>"
1099
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1100
    + "</td>\n<td>\n";
1101
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
1102
  if (stack1 != null) { buffer += stack1; }
1103
  buffer += "</td>\n<td class=\"markdown\">";
1104
  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
1105
  if (stack1 != null) { buffer += stack1; }
1106
  buffer += "</td>\n<td>";
1107
  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
1108
  if (stack1 != null) { buffer += stack1; }
1109
  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
1110
},"useData":true});
1111
var OperationView,
1112
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
1113
  __hasProp = {}.hasOwnProperty;
1114
1115
OperationView = (function(_super) {
1116
  __extends(OperationView, _super);
1117
1118
  function OperationView() {
1119
    return OperationView.__super__.constructor.apply(this, arguments);
1120
  }
1121
1122
  OperationView.prototype.invocationUrl = null;
1123
1124
  OperationView.prototype.events = {
1125
    'submit .sandbox': 'submitOperation',
1126
    'click .submit': 'submitOperation',
1127
    'click .response_hider': 'hideResponse',
1128
    'click .toggleOperation': 'toggleOperationContent',
1129
    'mouseenter .api-ic': 'mouseEnter',
1130
    'mouseout .api-ic': 'mouseExit'
1131
  };
1132
1133
  OperationView.prototype.initialize = function(opts) {
1134
    if (opts == null) {
1135
      opts = {};
1136
    }
1137
    this.auths = opts.auths;
1138
    this.parentId = this.model.parentId;
1139
    this.nickname = this.model.nickname;
1140
    return this;
1141
  };
1142
1143
  OperationView.prototype.mouseEnter = function(e) {
1144
    var elem, hgh, pos, scMaxX, scMaxY, scX, scY, wd, x, y;
1145
    elem = $(this.el).find('.content');
1146
    x = e.pageX;
1147
    y = e.pageY;
1148
    scX = $(window).scrollLeft();
1149
    scY = $(window).scrollTop();
1150
    scMaxX = scX + $(window).width();
1151
    scMaxY = scY + $(window).height();
1152
    wd = elem.width();
1153
    hgh = elem.height();
1154
    if (x + wd > scMaxX) {
1155
      x = scMaxX - wd;
1156
    }
1157
    if (x < scX) {
1158
      x = scX;
1159
    }
1160
    if (y + hgh > scMaxY) {
1161
      y = scMaxY - hgh;
1162
    }
1163
    if (y < scY) {
1164
      y = scY;
1165
    }
1166
    pos = {};
1167
    pos.top = y;
1168
    pos.left = x;
1169
    elem.css(pos);
1170
    return $(e.currentTarget.parentNode).find('#api_information_panel').show();
1171
  };
1172
1173
  OperationView.prototype.mouseExit = function(e) {
1174
    return $(e.currentTarget.parentNode).find('#api_information_panel').hide();
1175
  };
1176
1177
  OperationView.prototype.render = function() {
1178
    var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, modelAuths, o, param, ref, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4;
1179
    isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
1180
    if (!isMethodSubmissionSupported) {
1181
      this.model.isReadOnly = true;
1182
    }
1183
    this.model.description = this.model.description || this.model.notes;
1184
    if (this.model.description) {
1185
      this.model.description = this.model.description.replace(/(?:\r\n|\r|\n)/g, '<br />');
1186
    }
1187
    this.model.oauth = null;
1188
    modelAuths = this.model.authorizations || this.model.security;
1189
    if (modelAuths) {
1190
      if (Array.isArray(modelAuths)) {
1191
        for (_i = 0, _len = modelAuths.length; _i < _len; _i++) {
1192
          auths = modelAuths[_i];
1193
          for (key in auths) {
1194
            auth = auths[key];
1195
            for (a in this.auths) {
1196
              auth = this.auths[a];
1197
              if (auth.type === 'oauth2') {
1198
                this.model.oauth = {};
1199
                this.model.oauth.scopes = [];
1200
                _ref = auth.value.scopes;
1201
                for (k in _ref) {
1202
                  v = _ref[k];
1203
                  scopeIndex = auths[key].indexOf(k);
1204
                  if (scopeIndex >= 0) {
1205
                    o = {
1206
                      scope: k,
1207
                      description: v
1208
                    };
1209
                    this.model.oauth.scopes.push(o);
1210
                  }
1211
                }
1212
              }
1213
            }
1214
          }
1215
        }
1216
      } else {
1217
        for (k in modelAuths) {
1218
          v = modelAuths[k];
1219
          if (k === "oauth2") {
1220
            if (this.model.oauth === null) {
1221
              this.model.oauth = {};
1222
            }
1223
            if (this.model.oauth.scopes === void 0) {
1224
              this.model.oauth.scopes = [];
1225
            }
1226
            for (_j = 0, _len1 = v.length; _j < _len1; _j++) {
1227
              o = v[_j];
1228
              this.model.oauth.scopes.push(o);
1229
            }
1230
          }
1231
        }
1232
      }
1233
    }
1234
    if (typeof this.model.responses !== 'undefined') {
1235
      this.model.responseMessages = [];
1236
      _ref1 = this.model.responses;
1237
      for (code in _ref1) {
1238
        value = _ref1[code];
1239
        schema = null;
1240
        schemaObj = this.model.responses[code].schema;
1241
        if (schemaObj && schemaObj['$ref']) {
1242
          schema = schemaObj['$ref'];
1243
          if (schema.indexOf('#/definitions/') === 0) {
1244
            schema = schema.substring('#/definitions/'.length);
1245
          }
1246
        }
1247
        this.model.responseMessages.push({
1248
          code: code,
1249
          message: value.description,
1250
          responseModel: schema
1251
        });
1252
      }
1253
    }
1254
    if (typeof this.model.responseMessages === 'undefined') {
1255
      this.model.responseMessages = [];
1256
    }
1257
    signatureModel = null;
1258
    if (this.model.successResponse) {
1259
      successResponse = this.model.successResponse;
1260
      for (key in successResponse) {
1261
        value = successResponse[key];
1262
        this.model.successCode = key;
1263
        if (typeof value === 'object' && typeof value.createJSONSample === 'function') {
1264
          signatureModel = {
1265
            sampleJSON: JSON.stringify(value.createJSONSample(), void 0, 2),
1266
            isParam: false,
1267
            signature: value.getMockSignature()
1268
          };
1269
        }
1270
      }
1271
    } else if (this.model.responseClassSignature && this.model.responseClassSignature !== 'string') {
1272
      signatureModel = {
1273
        sampleJSON: this.model.responseSampleJSON,
1274
        isParam: false,
1275
        signature: this.model.responseClassSignature
1276
      };
1277
    }
1278
    $(this.el).html(Handlebars.templates.operation(this.model));
1279
    if (signatureModel) {
1280
      responseSignatureView = new SignatureView({
1281
        model: signatureModel,
1282
        tagName: 'div'
1283
      });
1284
      $('.model-signature', $(this.el)).append(responseSignatureView.render().el);
1285
    } else {
1286
      this.model.responseClassSignature = 'string';
1287
      $('.model-signature', $(this.el)).html(this.model.type);
1288
    }
1289
    contentTypeModel = {
1290
      isParam: false
1291
    };
1292
    contentTypeModel.consumes = this.model.consumes;
1293
    contentTypeModel.produces = this.model.produces;
1294
    _ref2 = this.model.parameters;
1295
    for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1296
      param = _ref2[_k];
1297
      type = param.type || param.dataType || '';
1298
      if (typeof type === 'undefined') {
1299
        schema = param.schema;
1300
        if (schema && schema['$ref']) {
1301
          ref = schema['$ref'];
1302
          if (ref.indexOf('#/definitions/') === 0) {
1303
            type = ref.substring('#/definitions/'.length);
1304
          } else {
1305
            type = ref;
1306
          }
1307
        }
1308
      }
1309
      if (type && type.toLowerCase() === 'file') {
1310
        if (!contentTypeModel.consumes) {
1311
          contentTypeModel.consumes = 'multipart/form-data';
1312
        }
1313
      }
1314
      param.type = type;
1315
    }
1316
    responseContentTypeView = new ResponseContentTypeView({
1317
      model: contentTypeModel
1318
    });
1319
    $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
1320
    _ref3 = this.model.parameters;
1321
    for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
1322
      param = _ref3[_l];
1323
      this.addParameter(param, contentTypeModel.consumes);
1324
    }
1325
    _ref4 = this.model.responseMessages;
1326
    for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
1327
      statusCode = _ref4[_m];
1328
      this.addStatusCode(statusCode);
1329
    }
1330
    return this;
1331
  };
1332
1333
  OperationView.prototype.addParameter = function(param, consumes) {
1334
    var paramView;
1335
    param.consumes = consumes;
1336
    paramView = new ParameterView({
1337
      model: param,
1338
      tagName: 'tr',
1339
      readOnly: this.model.isReadOnly
1340
    });
1341
    return $('.operation-params', $(this.el)).append(paramView.render().el);
1342
  };
1343
1344
  OperationView.prototype.addStatusCode = function(statusCode) {
1345
    var statusCodeView;
1346
    statusCodeView = new StatusCodeView({
1347
      model: statusCode,
1348
      tagName: 'tr'
1349
    });
1350
    return $('.operation-status', $(this.el)).append(statusCodeView.render().el);
1351
  };
1352
1353
  OperationView.prototype.submitOperation = function(e) {
1354
    var error_free, form, isFileUpload, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
1355
    if (e != null) {
1356
      e.preventDefault();
1357
    }
1358
    form = $('.sandbox', $(this.el));
1359
    error_free = true;
1360
    form.find("input.required").each(function() {
1361
      $(this).removeClass("error");
1362
      if (jQuery.trim($(this).val()) === "") {
1363
        $(this).addClass("error");
1364
        $(this).wiggle({
1365
          callback: (function(_this) {
1366
            return function() {
1367
              return $(_this).focus();
1368
            };
1369
          })(this)
1370
        });
1371
        return error_free = false;
1372
      }
1373
    });
1374
    form.find("textarea.required").each(function() {
1375
      $(this).removeClass("error");
1376
      if (jQuery.trim($(this).val()) === "") {
1377
        $(this).addClass("error");
1378
        $(this).wiggle({
1379
          callback: (function(_this) {
1380
            return function() {
1381
              return $(_this).focus();
1382
            };
1383
          })(this)
1384
        });
1385
        return error_free = false;
1386
      }
1387
    });
1388
    if (error_free) {
1389
      map = {};
1390
      opts = {
1391
        parent: this
1392
      };
1393
      isFileUpload = false;
1394
      _ref = form.find("input");
1395
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1396
        o = _ref[_i];
1397
        if ((o.value != null) && jQuery.trim(o.value).length > 0) {
1398
          map[o.name] = o.value;
1399
        }
1400
        if (o.type === "file") {
1401
          map[o.name] = o.files[0];
1402
          isFileUpload = true;
1403
        }
1404
      }
1405
      _ref1 = form.find("textarea");
1406
      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1407
        o = _ref1[_j];
1408
        if ((o.value != null) && jQuery.trim(o.value).length > 0) {
1409
          map[o.name] = o.value;
1410
        }
1411
      }
1412
      _ref2 = form.find("select");
1413
      for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1414
        o = _ref2[_k];
1415
        val = this.getSelectedValue(o);
1416
        if ((val != null) && jQuery.trim(val).length > 0) {
1417
          map[o.name] = val;
1418
        }
1419
      }
1420
      opts.responseContentType = $("div select[name=responseContentType]", $(this.el)).val();
1421
      opts.requestContentType = $("div select[name=parameterContentType]", $(this.el)).val();
1422
      $(".response_throbber", $(this.el)).show();
1423
      if (isFileUpload) {
1424
        return this.handleFileUpload(map, form);
1425
      } else {
1426
        return this.model["do"](map, opts, this.showCompleteStatus, this.showErrorStatus, this);
1427
      }
1428
    }
1429
  };
1430
1431
  OperationView.prototype.success = function(response, parent) {
1432
    return parent.showCompleteStatus(response);
1433
  };
1434
1435
  OperationView.prototype.handleFileUpload = function(map, form) {
1436
    var bodyParam, el, headerParams, o, obj, param, params, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3;
1437
    _ref = form.serializeArray();
1438
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1439
      o = _ref[_i];
1440
      if ((o.value != null) && jQuery.trim(o.value).length > 0) {
1441
        map[o.name] = o.value;
1442
      }
1443
    }
1444
    bodyParam = new FormData();
1445
    params = 0;
1446
    _ref1 = this.model.parameters;
1447
    for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1448
      param = _ref1[_j];
1449
      if (param.paramType === 'form' || param["in"] === 'formData') {
1450
        if (param.type.toLowerCase() !== 'file' && map[param.name] !== void 0) {
1451
          bodyParam.append(param.name, map[param.name]);
1452
        }
1453
      }
1454
    }
1455
    headerParams = {};
1456
    _ref2 = this.model.parameters;
1457
    for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1458
      param = _ref2[_k];
1459
      if (param.paramType === 'header') {
1460
        headerParams[param.name] = map[param.name];
1461
      }
1462
    }
1463
    _ref3 = form.find('input[type~="file"]');
1464
    for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
1465
      el = _ref3[_l];
1466
      if (typeof el.files[0] !== 'undefined') {
1467
        bodyParam.append($(el).attr('name'), el.files[0]);
1468
        params += 1;
1469
      }
1470
    }
1471
    this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), delete headerParams['Content-Type'], this.model.urlify(map, false)) : this.model.urlify(map, true);
1472
    $(".request_url", $(this.el)).html("<pre></pre>");
1473
    $(".request_url pre", $(this.el)).text(this.invocationUrl);
1474
    obj = {
1475
      type: this.model.method,
1476
      url: this.invocationUrl,
1477
      headers: headerParams,
1478
      data: bodyParam,
1479
      dataType: 'json',
1480
      contentType: false,
1481
      processData: false,
1482
      error: (function(_this) {
1483
        return function(data, textStatus, error) {
1484
          return _this.showErrorStatus(_this.wrap(data), _this);
1485
        };
1486
      })(this),
1487
      success: (function(_this) {
1488
        return function(data) {
1489
          return _this.showResponse(data, _this);
1490
        };
1491
      })(this),
1492
      complete: (function(_this) {
1493
        return function(data) {
1494
          return _this.showCompleteStatus(_this.wrap(data), _this);
1495
        };
1496
      })(this)
1497
    };
1498
    if (window.authorizations) {
1499
      window.authorizations.apply(obj);
1500
    }
1501
    if (params === 0) {
1502
      obj.data.append("fake", "true");
1503
    }
1504
    jQuery.ajax(obj);
1505
    return false;
1506
  };
1507
1508
  OperationView.prototype.wrap = function(data) {
1509
    var h, headerArray, headers, i, o, _i, _len;
1510
    headers = {};
1511
    headerArray = data.getAllResponseHeaders().split("\r");
1512
    for (_i = 0, _len = headerArray.length; _i < _len; _i++) {
1513
      i = headerArray[_i];
1514
      h = i.match(/^([^:]*?):(.*)$/);
1515
      if (!h) {
1516
        h = [];
1517
      }
1518
      h.shift();
1519
      if (h[0] !== void 0 && h[1] !== void 0) {
1520
        headers[h[0].trim()] = h[1].trim();
1521
      }
1522
    }
1523
    o = {};
1524
    o.content = {};
1525
    o.content.data = data.responseText;
1526
    o.headers = headers;
1527
    o.request = {};
1528
    o.request.url = this.invocationUrl;
1529
    o.status = data.status;
1530
    return o;
1531
  };
1532
1533
  OperationView.prototype.getSelectedValue = function(select) {
1534
    var opt, options, _i, _len, _ref;
1535
    if (!select.multiple) {
1536
      return select.value;
1537
    } else {
1538
      options = [];
1539
      _ref = select.options;
1540
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1541
        opt = _ref[_i];
1542
        if (opt.selected) {
1543
          options.push(opt.value);
1544
        }
1545
      }
1546
      if (options.length > 0) {
1547
        return options;
1548
      } else {
1549
        return null;
1550
      }
1551
    }
1552
  };
1553
1554
  OperationView.prototype.hideResponse = function(e) {
1555
    if (e != null) {
1556
      e.preventDefault();
1557
    }
1558
    $(".response", $(this.el)).slideUp();
1559
    return $(".response_hider", $(this.el)).fadeOut();
1560
  };
1561
1562
  OperationView.prototype.showResponse = function(response) {
1563
    var prettyJson;
1564
    prettyJson = JSON.stringify(response, null, "\t").replace(/\n/g, "<br>");
1565
    return $(".response_body", $(this.el)).html(escape(prettyJson));
1566
  };
1567
1568
  OperationView.prototype.showErrorStatus = function(data, parent) {
1569
    return parent.showStatus(data);
1570
  };
1571
1572
  OperationView.prototype.showCompleteStatus = function(data, parent) {
1573
    return parent.showStatus(data);
1574
  };
1575
1576
  OperationView.prototype.formatXml = function(xml) {
1577
    var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len;
1578
    reg = /(>)(<)(\/*)/g;
1579
    wsexp = /[ ]*(.*)[ ]+\n/g;
1580
    contexp = /(<.+>)(.+\n)/g;
1581
    xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2');
1582
    pad = 0;
1583
    formatted = '';
1584
    lines = xml.split('\n');
1585
    indent = 0;
1586
    lastType = 'other';
1587
    transitions = {
1588
      'single->single': 0,
1589
      'single->closing': -1,
1590
      'single->opening': 0,
1591
      'single->other': 0,
1592
      'closing->single': 0,
1593
      'closing->closing': -1,
1594
      'closing->opening': 0,
1595
      'closing->other': 0,
1596
      'opening->single': 1,
1597
      'opening->closing': 0,
1598
      'opening->opening': 1,
1599
      'opening->other': 1,
1600
      'other->single': 0,
1601
      'other->closing': -1,
1602
      'other->opening': 0,
1603
      'other->other': 0
1604
    };
1605
    _fn = function(ln) {
1606
      var fromTo, j, key, padding, type, types, value;
1607
      types = {
1608
        single: Boolean(ln.match(/<.+\/>/)),
1609
        closing: Boolean(ln.match(/<\/.+>/)),
1610
        opening: Boolean(ln.match(/<[^!?].*>/))
1611
      };
1612
      type = ((function() {
1613
        var _results;
1614
        _results = [];
1615
        for (key in types) {
1616
          value = types[key];
1617
          if (value) {
1618
            _results.push(key);
1619
          }
1620
        }
1621
        return _results;
1622
      })())[0];
1623
      type = type === void 0 ? 'other' : type;
1624
      fromTo = lastType + '->' + type;
1625
      lastType = type;
1626
      padding = '';
1627
      indent += transitions[fromTo];
1628
      padding = ((function() {
1629
        var _j, _ref, _results;
1630
        _results = [];
1631
        for (j = _j = 0, _ref = indent; 0 <= _ref ? _j < _ref : _j > _ref; j = 0 <= _ref ? ++_j : --_j) {
1632
          _results.push('  ');
1633
        }
1634
        return _results;
1635
      })()).join('');
1636
      if (fromTo === 'opening->closing') {
1637
        return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';
1638
      } else {
1639
        return formatted += padding + ln + '\n';
1640
      }
1641
    };
1642
    for (_i = 0, _len = lines.length; _i < _len; _i++) {
1643
      ln = lines[_i];
1644
      _fn(ln);
1645
    }
1646
    return formatted;
1647
  };
1648
1649
  OperationView.prototype.showStatus = function(response) {
1650
    var code, content, contentType, e, headers, json, opts, pre, response_body, response_body_el, url;
1651
    if (response.content === void 0) {
1652
      content = response.data;
1653
      url = response.url;
1654
    } else {
1655
      content = response.content.data;
1656
      url = response.request.url;
1657
    }
1658
    headers = response.headers;
1659
    contentType = null;
1660
    if (headers) {
1661
      contentType = headers["Content-Type"] || headers["content-type"];
1662
      if (contentType) {
1663
        contentType = contentType.split(";")[0].trim();
1664
      }
1665
    }
1666
    $(".response_body", $(this.el)).removeClass('json');
1667
    $(".response_body", $(this.el)).removeClass('xml');
1668
    if (!content) {
1669
      code = $('<code />').text("no content");
1670
      pre = $('<pre class="json" />').append(code);
1671
    } else if (contentType === "application/json" || /\+json$/.test(contentType)) {
1672
      json = null;
1673
      try {
1674
        json = JSON.stringify(JSON.parse(content), null, "  ");
1675
      } catch (_error) {
1676
        e = _error;
1677
        json = "can't parse JSON.  Raw result:\n\n" + content;
1678
      }
1679
      code = $('<code />').text(json);
1680
      pre = $('<pre class="json" />').append(code);
1681
    } else if (contentType === "application/xml" || /\+xml$/.test(contentType)) {
1682
      code = $('<code />').text(this.formatXml(content));
1683
      pre = $('<pre class="xml" />').append(code);
1684
    } else if (contentType === "text/html") {
1685
      code = $('<code />').html(_.escape(content));
1686
      pre = $('<pre class="xml" />').append(code);
1687
    } else if (/^image\//.test(contentType)) {
1688
      pre = $('<img>').attr('src', url);
1689
    } else {
1690
      code = $('<code />').text(content);
1691
      pre = $('<pre class="json" />').append(code);
1692
    }
1693
    response_body = pre;
1694
    $(".request_url", $(this.el)).html("<pre></pre>");
1695
    $(".request_url pre", $(this.el)).text(url);
1696
    $(".response_code", $(this.el)).html("<pre>" + response.status + "</pre>");
1697
    $(".response_body", $(this.el)).html(response_body);
1698
    $(".response_headers", $(this.el)).html("<pre>" + _.escape(JSON.stringify(response.headers, null, "  ")).replace(/\n/g, "<br>") + "</pre>");
1699
    $(".response", $(this.el)).slideDown();
1700
    $(".response_hider", $(this.el)).show();
1701
    $(".response_throbber", $(this.el)).hide();
1702
    response_body_el = $('.response_body', $(this.el))[0];
1703
    opts = this.options.swaggerOptions;
1704
    if (opts.highlightSizeThreshold && response.data.length > opts.highlightSizeThreshold) {
1705
      return response_body_el;
1706
    } else {
1707
      return hljs.highlightBlock(response_body_el);
1708
    }
1709
  };
1710
1711
  OperationView.prototype.toggleOperationContent = function() {
1712
    var elem;
1713
    elem = $('#' + Docs.escapeResourceName(this.parentId + "_" + this.nickname + "_content"));
1714
    if (elem.is(':visible')) {
1715
      return Docs.collapseOperation(elem);
1716
    } else {
1717
      return Docs.expandOperation(elem);
1718
    }
1719
  };
1720
1721
  return OperationView;
1722
1723
})(Backbone.View);
1724
1725
var ParameterContentTypeView,
1726
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
1727
  __hasProp = {}.hasOwnProperty;
1728
1729
ParameterContentTypeView = (function(_super) {
1730
  __extends(ParameterContentTypeView, _super);
1731
1732
  function ParameterContentTypeView() {
1733
    return ParameterContentTypeView.__super__.constructor.apply(this, arguments);
1734
  }
1735
1736
  ParameterContentTypeView.prototype.initialize = function() {};
1737
1738
  ParameterContentTypeView.prototype.render = function() {
1739
    var template;
1740
    template = this.template();
1741
    $(this.el).html(template(this.model));
1742
    $('label[for=parameterContentType]', $(this.el)).text('Parameter content type:');
1743
    return this;
1744
  };
1745
1746
  ParameterContentTypeView.prototype.template = function() {
1747
    return Handlebars.templates.parameter_content_type;
1748
  };
1749
1750
  return ParameterContentTypeView;
1751
1752
})(Backbone.View);
1753
1754
this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
1755
  var stack1, buffer = "";
1756
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
1757
  if (stack1 != null) { buffer += stack1; }
1758
  return buffer;
1759
},"2":function(depth0,helpers,partials,data) {
1760
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1761
  return "			<input type=\"file\" name='"
1762
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1763
    + "'/>\n";
1764
},"4":function(depth0,helpers,partials,data) {
1765
  var stack1, buffer = "";
1766
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
1767
  if (stack1 != null) { buffer += stack1; }
1768
  return buffer;
1769
},"5":function(depth0,helpers,partials,data) {
1770
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1771
  return "				<textarea class='body-textarea required' placeholder='(required)' name='"
1772
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1773
    + "'>"
1774
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
1775
    + "</textarea>\n        <br />\n        <div class=\"parameter-content-type\" />\n";
1776
},"7":function(depth0,helpers,partials,data) {
1777
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1778
  return "				<textarea class='body-textarea required' placeholder='(required)' name='"
1779
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1780
    + "'></textarea>\n				<br />\n				<div class=\"parameter-content-type\" />\n";
1781
},"9":function(depth0,helpers,partials,data) {
1782
  var stack1, buffer = "";
1783
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
1784
  if (stack1 != null) { buffer += stack1; }
1785
  return buffer;
1786
},"10":function(depth0,helpers,partials,data) {
1787
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1788
  return "			<input class='parameter' class='required' type='file' name='"
1789
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1790
    + "'/>\n";
1791
},"12":function(depth0,helpers,partials,data) {
1792
  var stack1, buffer = "";
1793
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.program(15, data),"data":data});
1794
  if (stack1 != null) { buffer += stack1; }
1795
  return buffer;
1796
},"13":function(depth0,helpers,partials,data) {
1797
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1798
  return "				<input class='parameter required' minlength='1' name='"
1799
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1800
    + "' placeholder='(required)' type='text' value='"
1801
    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
1802
    + "'/>\n";
1803
},"15":function(depth0,helpers,partials,data) {
1804
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
1805
  return "				<input class='parameter required' minlength='1' name='"
1806
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1807
    + "' placeholder='(required)' type='text' value=''/>\n";
1808
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
1809
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'>"
1810
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
1811
    + "</td>\n<td>\n";
1812
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
1813
  if (stack1 != null) { buffer += stack1; }
1814
  buffer += "</td>\n<td>\n	<strong><span class=\"markdown\">";
1815
  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
1816
  if (stack1 != null) { buffer += stack1; }
1817
  buffer += "</span></strong>\n</td>\n<td>";
1818
  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
1819
  if (stack1 != null) { buffer += stack1; }
1820
  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
1821
},"useData":true});
1822
this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
1823
  var stack1, buffer = "";
1824
  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
1825
  if (stack1 != null) { buffer += stack1; }
1826
  return buffer;
1827
},"2":function(depth0,helpers,partials,data) {
1828
  var stack1, lambda=this.lambda, buffer = "  <option value=\"";
1829
  stack1 = lambda(depth0, depth0);
1830
  if (stack1 != null) { buffer += stack1; }
1831
  buffer += "\">";
1832
  stack1 = lambda(depth0, depth0);
1833
  if (stack1 != null) { buffer += stack1; }
1834
  return buffer + "</option>\n";
1835
},"4":function(depth0,helpers,partials,data) {
1836
  return "  <option value=\"application/json\">application/json</option>\n";
1837
  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
1838
  var stack1, buffer = "<label for=\"parameterContentType\"></label>\n<select name=\"parameterContentType\">\n";
1839
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
1840
  if (stack1 != null) { buffer += stack1; }
1841
  return buffer + "</select>\n";
1842
},"useData":true});
1843
var ParameterView,
1844
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
1845
  __hasProp = {}.hasOwnProperty;
1846
1847
ParameterView = (function(_super) {
1848
  __extends(ParameterView, _super);
1849
1850
  function ParameterView() {
1851
    return ParameterView.__super__.constructor.apply(this, arguments);
1852
  }
1853
1854
  ParameterView.prototype.initialize = function() {
1855
    return Handlebars.registerHelper('isArray', function(param, opts) {
1856
      if (param.type.toLowerCase() === 'array' || param.allowMultiple) {
1857
        return opts.fn(this);
1858
      } else {
1859
        return opts.inverse(this);
1860
      }
1861
    });
1862
  };
1863
1864
  ParameterView.prototype.render = function() {
1865
    var contentTypeModel, isParam, parameterContentTypeView, ref, responseContentTypeView, schema, signatureModel, signatureView, template, type;
1866
    type = this.model.type || this.model.dataType;
1867
    if (typeof type === 'undefined') {
1868
      schema = this.model.schema;
1869
      if (schema && schema['$ref']) {
1870
        ref = schema['$ref'];
1871
        if (ref.indexOf('#/definitions/') === 0) {
1872
          type = ref.substring('#/definitions/'.length);
1873
        } else {
1874
          type = ref;
1875
        }
1876
      }
1877
    }
1878
    this.model.type = type;
1879
    this.model.paramType = this.model["in"] || this.model.paramType;
1880
    if (this.model.paramType === 'body' || this.model["in"] === 'body') {
1881
      this.model.isBody = true;
1882
    }
1883
    if (type && type.toLowerCase() === 'file') {
1884
      this.model.isFile = true;
1885
    }
1886
    this.model["default"] = this.model["default"] || this.model.defaultValue;
1887
    if (this.model.allowableValues) {
1888
      this.model.isList = true;
1889
    }
1890
    template = this.template();
1891
    $(this.el).html(template(this.model));
1892
    signatureModel = {
1893
      sampleJSON: this.model.sampleJSON,
1894
      isParam: true,
1895
      signature: this.model.signature
1896
    };
1897
    if (this.model.sampleJSON) {
1898
      signatureView = new SignatureView({
1899
        model: signatureModel,
1900
        tagName: 'div'
1901
      });
1902
      $('.model-signature', $(this.el)).append(signatureView.render().el);
1903
    } else {
1904
      $('.model-signature', $(this.el)).html(this.model.signature);
1905
    }
1906
    isParam = false;
1907
    if (this.model.isBody) {
1908
      isParam = true;
1909
    }
1910
    contentTypeModel = {
1911
      isParam: isParam
1912
    };
1913
    contentTypeModel.consumes = this.model.consumes;
1914
    if (isParam) {
1915
      parameterContentTypeView = new ParameterContentTypeView({
1916
        model: contentTypeModel
1917
      });
1918
      $('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el);
1919
    } else {
1920
      responseContentTypeView = new ResponseContentTypeView({
1921
        model: contentTypeModel
1922
      });
1923
      $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
1924
    }
1925
    return this;
1926
  };
1927
1928
  ParameterView.prototype.template = function() {
1929
    if (this.model.isList) {
1930
      return Handlebars.templates.param_list;
1931
    } else {
1932
      if (this.options.readOnly) {
1933
        if (this.model.required) {
1934
          return Handlebars.templates.param_readonly_required;
1935
        } else {
1936
          return Handlebars.templates.param_readonly;
1937
        }
1938
      } else {
1939
        if (this.model.required) {
1940
          return Handlebars.templates.param_required;
1941
        } else {
1942
          return Handlebars.templates.param;
1943
        }
1944
      }
1945
    }
1946
  };
1947
1948
  return ParameterView;
1949
1950
})(Backbone.View);
1951
1952
var ResourceView,
1953
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
1954
  __hasProp = {}.hasOwnProperty;
1955
1956
ResourceView = (function(_super) {
1957
  __extends(ResourceView, _super);
1958
1959
  function ResourceView() {
1960
    return ResourceView.__super__.constructor.apply(this, arguments);
1961
  }
1962
1963
  ResourceView.prototype.initialize = function(opts) {
1964
    if (opts == null) {
1965
      opts = {};
1966
    }
1967
    this.auths = opts.auths;
1968
    if ("" === this.model.description) {
1969
      this.model.description = null;
1970
    }
1971
    if (this.model.description != null) {
1972
      return this.model.summary = this.model.description;
1973
    }
1974
  };
1975
1976
  ResourceView.prototype.render = function() {
1977
    var counter, id, methods, operation, _i, _len, _ref;
1978
    methods = {};
1979
    $(this.el).html(Handlebars.templates.resource(this.model));
1980
    _ref = this.model.operationsArray;
1981
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1982
      operation = _ref[_i];
1983
      counter = 0;
1984
      id = operation.nickname;
1985
      while (typeof methods[id] !== 'undefined') {
1986
        id = id + "_" + counter;
1987
        counter += 1;
1988
      }
1989
      methods[id] = operation;
1990
      operation.nickname = id;
1991
      operation.parentId = this.model.id;
1992
      this.addOperation(operation);
1993
    }
1994
    $('.toggleEndpointList', this.el).click(this.callDocs.bind(this, 'toggleEndpointListForResource'));
1995
    $('.collapseResource', this.el).click(this.callDocs.bind(this, 'collapseOperationsForResource'));
1996
    $('.expandResource', this.el).click(this.callDocs.bind(this, 'expandOperationsForResource'));
1997
    return this;
1998
  };
1999
2000
  ResourceView.prototype.addOperation = function(operation) {
2001
    var operationView;
2002
    operation.number = this.number;
2003
    operationView = new OperationView({
2004
      model: operation,
2005
      tagName: 'li',
2006
      className: 'endpoint',
2007
      swaggerOptions: this.options.swaggerOptions,
2008
      auths: this.auths
2009
    });
2010
    $('.endpoints', $(this.el)).append(operationView.render().el);
2011
    return this.number++;
2012
  };
2013
2014
  ResourceView.prototype.callDocs = function(fnName, e) {
2015
    e.preventDefault();
2016
    return Docs[fnName](e.currentTarget.getAttribute('data-id'));
2017
  };
2018
2019
  return ResourceView;
2020
2021
})(Backbone.View);
2022
2023
this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
2024
  return " : ";
2025
  },"3":function(depth0,helpers,partials,data) {
2026
  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
2027
  return "<li>\n      <a href='"
2028
    + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))
2029
    + "'>Raw</a>\n    </li>";
2030
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
2031
  var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "<div class='heading'>\n  <h2>\n    <a href='#!/"
2032
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2033
    + "' class=\"toggleEndpointList\" data-id=\""
2034
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2035
    + "\">"
2036
    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
2037
    + "</a> ";
2038
  stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(options={"name":"summary","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
2039
  if (!helpers.summary) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
2040
  if (stack1 != null) { buffer += stack1; }
2041
  stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper));
2042
  if (stack1 != null) { buffer += stack1; }
2043
  buffer += "\n  </h2>\n  <ul class='options'>\n    <li>\n      <a href='#!/"
2044
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2045
    + "' id='endpointListTogger_"
2046
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2047
    + "' class=\"toggleEndpointList\" data-id=\""
2048
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2049
    + "\">Show/Hide</a>\n    </li>\n    <li>\n      <a href='#' class=\"collapseResource\" data-id=\""
2050
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2051
    + "\">\n        List Operations\n      </a>\n    </li>\n    <li>\n      <a href='#' class=\"expandResource\" data-id=\""
2052
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2053
    + "\">\n        Expand Operations\n      </a>\n    </li>\n    ";
2054
  stack1 = ((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(options={"name":"url","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
2055
  if (!helpers.url) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
2056
  if (stack1 != null) { buffer += stack1; }
2057
  return buffer + "\n  </ul>\n</div>\n<ul class='endpoints' id='"
2058
    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
2059
    + "_endpoint_list' style='display:none'>\n\n</ul>\n";
2060
},"useData":true});
2061
var ResponseContentTypeView,
2062
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
2063
  __hasProp = {}.hasOwnProperty;
2064
2065
ResponseContentTypeView = (function(_super) {
2066
  __extends(ResponseContentTypeView, _super);
2067
2068
  function ResponseContentTypeView() {
2069
    return ResponseContentTypeView.__super__.constructor.apply(this, arguments);
2070
  }
2071
2072
  ResponseContentTypeView.prototype.initialize = function() {};
2073
2074
  ResponseContentTypeView.prototype.render = function() {
2075
    var template;
2076
    template = this.template();
2077
    $(this.el).html(template(this.model));
2078
    $('label[for=responseContentType]', $(this.el)).text('Response Content Type');
2079
    return this;
2080
  };
2081
2082
  ResponseContentTypeView.prototype.template = function() {
2083
    return Handlebars.templates.response_content_type;
2084
  };
2085
2086
  return ResponseContentTypeView;
2087
2088
})(Backbone.View);
2089
2090
this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
2091
  var stack1, buffer = "";
2092
  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
2093
  if (stack1 != null) { buffer += stack1; }
2094
  return buffer;
2095
},"2":function(depth0,helpers,partials,data) {
2096
  var stack1, lambda=this.lambda, buffer = "  <option value=\"";
2097
  stack1 = lambda(depth0, depth0);
2098
  if (stack1 != null) { buffer += stack1; }
2099
  buffer += "\">";
2100
  stack1 = lambda(depth0, depth0);
2101
  if (stack1 != null) { buffer += stack1; }
2102
  return buffer + "</option>\n";
2103
},"4":function(depth0,helpers,partials,data) {
2104
  return "  <option value=\"application/json\">application/json</option>\n";
2105
  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
2106
  var stack1, buffer = "<label for=\"responseContentType\"></label>\n<select name=\"responseContentType\">\n";
2107
  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
2108
  if (stack1 != null) { buffer += stack1; }
2109
  return buffer + "</select>\n";
2110
},"useData":true});
2111
var SignatureView,
2112
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
2113
  __hasProp = {}.hasOwnProperty;
2114
2115
SignatureView = (function(_super) {
2116
  __extends(SignatureView, _super);
2117
2118
  function SignatureView() {
2119
    return SignatureView.__super__.constructor.apply(this, arguments);
2120
  }
2121
2122
  SignatureView.prototype.events = {
2123
    'click a.description-link': 'switchToDescription',
2124
    'click a.snippet-link': 'switchToSnippet',
2125
    'mousedown .snippet': 'snippetToTextArea'
2126
  };
2127
2128
  SignatureView.prototype.initialize = function() {};
2129
2130
  SignatureView.prototype.render = function() {
2131
    var template;
2132
    template = this.template();
2133
    $(this.el).html(template(this.model));
2134
    this.switchToSnippet();
2135
    this.isParam = this.model.isParam;
2136
    if (this.isParam) {
2137
      $('.notice', $(this.el)).text('Click to set as parameter value');
2138
    }
2139
    return this;
2140
  };
2141
2142
  SignatureView.prototype.template = function() {
2143
    return Handlebars.templates.signature;
2144
  };
2145
2146
  SignatureView.prototype.switchToDescription = function(e) {
2147
    if (e != null) {
2148
      e.preventDefault();
2149
    }
2150
    $(".snippet", $(this.el)).hide();
2151
    $(".description", $(this.el)).show();
2152
    $('.description-link', $(this.el)).addClass('selected');
2153
    return $('.snippet-link', $(this.el)).removeClass('selected');
2154
  };
2155
2156
  SignatureView.prototype.switchToSnippet = function(e) {
2157
    if (e != null) {
2158
      e.preventDefault();
2159
    }
2160
    $(".description", $(this.el)).hide();
2161
    $(".snippet", $(this.el)).show();
2162
    $('.snippet-link', $(this.el)).addClass('selected');
2163
    return $('.description-link', $(this.el)).removeClass('selected');
2164
  };
2165
2166
  SignatureView.prototype.snippetToTextArea = function(e) {
2167
    var textArea;
2168
    if (this.isParam) {
2169
      if (e != null) {
2170
        e.preventDefault();
2171
      }
2172
      textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode));
2173
      if ($.trim(textArea.val()) === '') {
2174
        return textArea.val(this.model.sampleJSON);
2175
      }
2176
    }
2177
  };
2178
2179
  return SignatureView;
2180
2181
})(Backbone.View);
2182
2183
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
2184
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div>\n<ul class=\"signature-nav\">\n  <li><a class=\"description-link\" href=\"#\">Model</a></li>\n  <li><a class=\"snippet-link\" href=\"#\">Model Schema</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n  <div class=\"description\">\n    ";
2185
  stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper));
2186
  if (stack1 != null) { buffer += stack1; }
2187
  return buffer + "\n  </div>\n\n  <div class=\"snippet\">\n    <pre><code>"
2188
    + escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
2189
    + "</code></pre>\n    <small class=\"notice\"></small>\n  </div>\n</div>\n\n";
2190
},"useData":true});
2191
var StatusCodeView,
2192
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
2193
  __hasProp = {}.hasOwnProperty;
2194
2195
StatusCodeView = (function(_super) {
2196
  __extends(StatusCodeView, _super);
2197
2198
  function StatusCodeView() {
2199
    return StatusCodeView.__super__.constructor.apply(this, arguments);
2200
  }
2201
2202
  StatusCodeView.prototype.initialize = function() {};
2203
2204
  StatusCodeView.prototype.render = function() {
2205
    var responseModel, responseModelView, template;
2206
    template = this.template();
2207
    $(this.el).html(template(this.model));
2208
    if (swaggerUi.api.models.hasOwnProperty(this.model.responseModel)) {
2209
      responseModel = {
2210
        sampleJSON: JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(), null, 2),
2211
        isParam: false,
2212
        signature: swaggerUi.api.models[this.model.responseModel].getMockSignature()
2213
      };
2214
      responseModelView = new SignatureView({
2215
        model: responseModel,
2216
        tagName: 'div'
2217
      });
2218
      $('.model-signature', this.$el).append(responseModelView.render().el);
2219
    } else {
2220
      $('.model-signature', this.$el).html('');
2221
    }
2222
    return this;
2223
  };
2224
2225
  StatusCodeView.prototype.template = function() {
2226
    return Handlebars.templates.status_code;
2227
  };
2228
2229
  return StatusCodeView;
2230
2231
})(Backbone.View);
2232
2233
this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
2234
  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td width='15%' class='code'>"
2235
    + escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper)))
2236
    + "</td>\n<td>";
2237
  stack1 = ((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper));
2238
  if (stack1 != null) { buffer += stack1; }
2239
  return buffer + "</td>\n<td width='50%'><span class=\"model-signature\" /></td>";
2240
},"useData":true});
(-)a/api/v1/doc/swagger-ui.min.js (+2 lines)
Line 0 Link Here
1
function clippyCopiedCallback(){$("#api_key_copied").fadeIn().delay(1e3).fadeOut()}$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""==$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),log=function(){log.history=log.history||[],log.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])},Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),a=n+"_content";Docs.expandOperation($("#"+a)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}};this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n  <div class='key_input_container'>\n    <div class='auth_label'>"+l((s=null!=(s=t.keyName||(null!=e?e.keyName:e))?s:r,typeof s===i?s.call(e,{name:"keyName",hash:{},data:a}):s))+'</div>\n    <input placeholder="api_key" class="auth_input" id="input_apiKey_entry" name="apiKey" type="text"/>\n    <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_api_key" href="#">apply</a></div>\n  </div>\n</div>\n\n'},useData:!0});var SwaggerUi,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;SwaggerUi=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.dom_id="swagger_ui",t.prototype.options=null,t.prototype.api=null,t.prototype.headerView=null,t.prototype.mainView=null,t.prototype.initialize=function(e){return null==e&&(e={}),null!=e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),null==e.supportedSubmitMethods&&(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),null==$("#"+this.dom_id)&&$("body").append('<div id="'+this.dom_id+'"></div>'),this.options=e,this.options.success=function(e){return function(){return e.render()}}(this),this.options.progress=function(e){return function(t){return e.showMessage(t)}}(this),this.options.failure=function(e){return function(t){return e.onLoadFailure(t)}}(this),this.headerView=new HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return function(t){return e.updateSwaggerUi(t)}}(this))},t.prototype.setOption=function(e,t){return this.options[e]=t},t.prototype.getOption=function(e){return this.options[e]},t.prototype.updateSwaggerUi=function(e){return this.options.url=e.url,this.load()},t.prototype.load=function(){var e,t;return null!=(t=this.mainView)&&t.clear(),e=this.options.url,e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},t.prototype.collapseAll=function(){return Docs.collapseEndpointListForResource("")},t.prototype.listAll=function(){return Docs.collapseOperationsForResource("")},t.prototype.expandAll=function(){return Docs.expandOperationsForResource("")},t.prototype.render=function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}return this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(function(){return function(){return Docs.shebang()}}(this),100)},t.prototype.buildUrl=function(e,t){var n,a;return 0===t.indexOf("/")?(a=e.split("/"),e=a[0]+"//"+a[2],e+t):(n=e.length,e.indexOf("?")>-1&&(n=Math.min(n,e.indexOf("?"))),e.indexOf("#")>-1&&(n=Math.min(n,e.indexOf("#"))),e=e.substring(0,n),-1!==e.indexOf("/",e.length-1)?e+t:e+"/"+t)},t.prototype.showMessage=function(e){return null==e&&(e=""),$("#message-bar").removeClass("message-fail"),$("#message-bar").addClass("message-success"),$("#message-bar").html(e)},t.prototype.onLoadFailure=function(e){var t;return null==e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail"),t=$("#message-bar").html(e),null!=this.options.onFailure&&this.options.onFailure(e),t},t.prototype.renderGFM=function(e){return null==e&&(e=""),$(".markdown").each(function(){return $(this).html(marked($(this).html()))})},t}(Backbone.Router),window.SwaggerUi=SwaggerUi,this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(){return'<div class=\'auth_button\' id=\'basic_auth_button\'><img class=\'auth_icon\' src=\'images/password.jpeg\'></div>\n<div class=\'auth_container\' id=\'basic_auth_container\'>\n  <div class=\'key_input_container\'>\n    <div class="auth_label">Username</div>\n    <input placeholder="username" class="auth_input" id="input_username" name="username" type="text"/>\n    <div class="auth_label">Password</div>\n    <input placeholder="password" class="auth_input" id="input_password" name="password" type="password"/>\n    <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_basic_auth" href="#">apply</a></div>\n  </div>\n</div>\n\n'},useData:!0}),Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a='	<option value="';return t=n(e,e),null!=t&&(a+=t),a+='">',t=n(e,e),null!=t&&(a+=t),a+"</option>\n"},4:function(){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='<label for="contentType"></label>\n<select name="contentType">\n';return s=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i+"</select>\n"},useData:!0});var ApiKeyButton,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ApiKeyButton=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),this},t.prototype.events={"click #apikey_button":"toggleApiKeyContainer","click #apply_api_key":"applyApiKey"},t.prototype.applyApiKey=function(){var e;return window.authorizations.add(this.model.name,new ApiKeyAuthorization(this.model.name,$("#input_apiKey_entry").val(),this.model["in"])),window.swaggerUi.load(),e=$("#apikey_container").show()},t.prototype.toggleApiKeyContainer=function(){var e;return $("#apikey_container").length>0?(e=$("#apikey_container").first(),e.is(":visible")?e.hide():($(".auth_container").hide(),e.show())):void 0},t.prototype.template=function(){return Handlebars.templates.apikey_button_view},t}(Backbone.View),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,a){var s,i=this.lambda,r=this.escapeExpression,l='  <div class="info_title">'+r(i(null!=(s=null!=e?e.info:e)?s.title:s,e))+'</div>\n  <div class="info_description markdown">';return s=i(null!=(s=null!=e?e.info:e)?s.description:s,e),null!=s&&(l+=s),l+="</div>\n  ",s=t["if"].call(e,null!=(s=null!=e?e.info:e)?s.termsOfServiceUrl:s,{name:"if",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n  ",s=t["if"].call(e,null!=(s=null!=(s=null!=e?e.info:e)?s.contact:s)?s.name:s,{name:"if",hash:{},fn:this.program(4,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n  ",s=t["if"].call(e,null!=(s=null!=(s=null!=e?e.info:e)?s.contact:s)?s.url:s,{name:"if",hash:{},fn:this.program(6,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n  ",s=t["if"].call(e,null!=(s=null!=(s=null!=e?e.info:e)?s.contact:s)?s.email:s,{name:"if",hash:{},fn:this.program(8,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n  ",s=t["if"].call(e,null!=(s=null!=e?e.info:e)?s.license:s,{name:"if",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+"\n"},2:function(e){var t,n=this.lambda,a=this.escapeExpression;return'<div class="info_tos"><a href="'+a(n(null!=(t=null!=e?e.info:e)?t.termsOfServiceUrl:t,e))+'">Terms of service</a></div>'},4:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_name'>Created by "+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.name:t,e))+"</div>"},6:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_url'>See more at <a href=\""+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.url:t,e))+'">'+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.url:t,e))+"</a></div>"},8:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_email'><a href=\"mailto:"+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.email:t,e))+"?subject="+a(n(null!=(t=null!=e?e.info:e)?t.title:t,e))+'">Contact the developer</a></div>'},10:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_license'><a href='"+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.license:t)?t.url:t,e))+"'>"+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.license:t)?t.name:t,e))+"</a></div>"},12:function(e){var t,n=this.lambda,a=this.escapeExpression;return'    , <span style="font-variant: small-caps">api version</span>: '+a(n(null!=(t=null!=e?e.info:e)?t.version:t,e))+"\n    "},14:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return'    <span style="float:right"><a href="'+l((s=null!=(s=t.validatorUrl||(null!=e?e.validatorUrl:e))?s:r,typeof s===i?s.call(e,{name:"validatorUrl",hash:{},data:a}):s))+"/debug?url="+l((s=null!=(s=t.url||(null!=e?e.url:e))?s:r,typeof s===i?s.call(e,{name:"url",hash:{},data:a}):s))+'"><img id="validator" src="'+l((s=null!=(s=t.validatorUrl||(null!=e?e.validatorUrl:e))?s:r,typeof s===i?s.call(e,{name:"validatorUrl",hash:{},data:a}):s))+"?url="+l((s=null!=(s=t.url||(null!=e?e.url:e))?s:r,typeof s===i?s.call(e,{name:"url",hash:{},data:a}):s))+'"></a>\n    </span>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<div class='info' id='api_info'>\n";return s=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+="</div>\n<div class='container' id='resources_container'>\n  <ul id='resources'></ul>\n\n  <div class=\"footer\">\n    <br>\n    <br>\n    <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "+o((i=null!=(i=t.basePath||(null!=e?e.basePath:e))?i:l,typeof i===r?i.call(e,{name:"basePath",hash:{},data:a}):i))+"\n",s=t["if"].call(e,null!=(s=null!=e?e.info:e)?s.version:s,{name:"if",hash:{},fn:this.program(12,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+="]\n",s=t["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(14,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+"    </h4>\n    </div>\n</div>\n"},useData:!0});var BasicAuthButton,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;BasicAuthButton=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),this},t.prototype.events={"click #basic_auth_button":"togglePasswordContainer","click #apply_basic_auth":"applyPassword"},t.prototype.applyPassword=function(){var e,t,n;return n=$(".input_username").val(),t=$(".input_password").val(),window.authorizations.add(this.model.type,new PasswordAuthorization("basic",n,t)),window.swaggerUi.load(),e=$("#basic_auth_container").hide()},t.prototype.togglePasswordContainer=function(){var e;return $("#basic_auth_container").length>0?(e=$("#basic_auth_container").show(),e.is(":visible")?e.slideUp():($(".auth_container").hide(),e.show())):void 0},t.prototype.template=function(){return Handlebars.templates.basic_auth_button_view},t}(Backbone.View),this.Handlebars.templates.operation=Handlebars.template({1:function(){return"deprecated"},3:function(){return"            <h4>Warning: Deprecated</h4>\n"},5:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o='        <h4>Implementation Notes</h4>\n        <p class="markdown">';return i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(o+=s),o+"</p>\n"},7:function(){return'        <div class="auth">\n        <span class="api-ic ic-error"></span>'},9:function(e,t,n,a){var s,i='          <div id="api_information_panel" style="top: 526px; left: 776px; display: none;">\n';return s=t.each.call(e,e,{name:"each",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i+"          </div>\n"},10:function(e){var t,n=this.lambda,a=this.escapeExpression,s="            <div title='";return t=n(null!=e?e.description:e,e),null!=t&&(s+=t),s+"'>"+a(n(null!=e?e.scope:e,e))+"</div>\n"},12:function(){return"</div>"},14:function(){return'        <div class=\'access\'>\n          <span class="api-ic ic-off" title="click to authenticate"></span>\n        </div>\n'},16:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"          <h4>Response Class (Status "+l((s=null!=(s=t.successCode||(null!=e?e.successCode:e))?s:r,typeof s===i?s.call(e,{name:"successCode",hash:{},data:a}):s))+')</h4>\n          <p><span class="model-signature" /></p>\n          <br/>\n          <div class="response-content-type" />\n'},18:function(){return'          <h4>Parameters</h4>\n          <table class=\'fullwidth\'>\n          <thead>\n            <tr>\n            <th style="width: 100px; max-width: 100px">Parameter</th>\n            <th style="width: 310px; max-width: 310px">Value</th>\n            <th style="width: 200px; max-width: 200px">Description</th>\n            <th style="width: 100px; max-width: 100px">Parameter Type</th>\n            <th style="width: 220px; max-width: 230px">Data Type</th>\n            </tr>\n          </thead>\n          <tbody class="operation-params">\n\n          </tbody>\n          </table>\n'},20:function(){return"          <div style='margin:0;padding:0;display:inline'></div>\n          <h4>Response Messages</h4>\n          <table class='fullwidth'>\n            <thead>\n            <tr>\n              <th>HTTP Status Code</th>\n              <th>Reason</th>\n              <th>Response Model</th>\n            </tr>\n            </thead>\n            <tbody class=\"operation-status\">\n            \n            </tbody>\n          </table>\n"},22:function(){return""},24:function(){return"          <div class='sandbox_header'>\n            <input class='submit' name='commit' type='button' value='Try it out!' />\n            <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n            <span class='response_throbber' style='display:none'></span>\n          </div>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r,l="function",o=t.helperMissing,p=this.escapeExpression,u=t.blockHelperMissing,h="\n  <ul class='operations' >\n    <li class='"+p((i=null!=(i=t.method||(null!=e?e.method:e))?i:o,typeof i===l?i.call(e,{name:"method",hash:{},data:a}):i))+" operation' id='"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"_"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+"'>\n      <div class='heading'>\n        <h3>\n          <span class='http_method'>\n          <a href='#!/"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"/"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+'\' class="toggleOperation">'+p((i=null!=(i=t.method||(null!=e?e.method:e))?i:o,typeof i===l?i.call(e,{name:"method",hash:{},data:a}):i))+"</a>\n          </span>\n          <span class='path'>\n          <a href='#!/"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"/"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+"' class=\"toggleOperation ";return s=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=s&&(h+=s),h+='">'+p((i=null!=(i=t.path||(null!=e?e.path:e))?i:o,typeof i===l?i.call(e,{name:"path",hash:{},data:a}):i))+"</a>\n          </span>\n        </h3>\n        <ul class='options'>\n          <li>\n          <a href='#!/"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"/"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+'\' class="toggleOperation">',i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,s=typeof i===l?i.call(e,{name:"summary",hash:{},data:a}):i,null!=s&&(h+=s),h+="</a>\n          </li>\n        </ul>\n      </div>\n      <div class='content' id='"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"_"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+"_content' style='display:none'>\n",s=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=s&&(h+=s),i=null!=(i=t.oauth||(null!=e?e.oauth:e))?i:o,r={name:"oauth",hash:{},fn:this.program(7,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.oauth||(s=u.call(e,s,r)),null!=s&&(h+=s),h+="\n",s=t.each.call(e,null!=e?e.oauth:e,{name:"each",hash:{},fn:this.program(9,a),inverse:this.noop,data:a}),null!=s&&(h+=s),h+="        ",i=null!=(i=t.oauth||(null!=e?e.oauth:e))?i:o,r={name:"oauth",hash:{},fn:this.program(12,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.oauth||(s=u.call(e,s,r)),null!=s&&(h+=s),h+="\n",i=null!=(i=t.oauth||(null!=e?e.oauth:e))?i:o,r={name:"oauth",hash:{},fn:this.program(14,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.oauth||(s=u.call(e,s,r)),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(16,a),inverse:this.noop,data:a}),null!=s&&(h+=s),h+="        <form accept-charset='UTF-8' class='sandbox'>\n          <div style='margin:0;padding:0;display:inline'></div>\n",s=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(18,a),inverse:this.noop,data:a}),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(20,a),inverse:this.noop,data:a}),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.isReadOnly:e,{name:"if",hash:{},fn:this.program(22,a),inverse:this.program(24,a),data:a}),null!=s&&(h+=s),h+"        </form>\n        <div class='response' style='display:none'>\n          <h4>Request URL</h4>\n          <div class='block request_url'></div>\n          <h4>Response Body</h4>\n          <div class='block response_body'></div>\n          <h4>Response Code</h4>\n          <div class='block response_code'></div>\n          <h4>Response Headers</h4>\n          <div class='block response_headers'></div>\n        </div>\n      </div>\n    </li>\n  </ul>\n"},useData:!0});var ContentTypeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ContentTypeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),$("label[for=contentType]",$(this.el)).text("Response Content Type"),this},t.prototype.template=function(){return Handlebars.templates.content_type},t}(Backbone.View),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i},2:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return'			<input type="file" name=\''+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+'\'/>\n			<div class="parameter-content-type" />\n'},4:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=s&&(i+=s),i},5:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<textarea class='body-textarea' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+'</textarea>\n        <br />\n        <div class="parameter-content-type" />\n'},7:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<textarea class='body-textarea' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+'\'></textarea>\n				<br />\n				<div class="parameter-content-type" />\n'},9:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(10,a),data:a}),null!=s&&(i+=s),i},10:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(11,a),inverse:this.program(13,a),data:a}),null!=s&&(i+=s),i},11:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<input class='parameter' minlength='0' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='' type='text' value='"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"'/>\n"},13:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<input class='parameter' minlength='0' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='' type='text' value=''/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=s&&(p+=s),p+='\n</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td>\n	<span class="model-signature"></span>\n</td>\n'},useData:!0});var HeaderView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;HeaderView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},t.prototype.initialize=function(){},t.prototype.showPetStore=function(){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})},t.prototype.showWordnikDev=function(){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})},t.prototype.showCustomOnKeyup=function(e){return 13===e.keyCode?this.showCustom():void 0},t.prototype.showCustom=function(e){return null!=e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})},t.prototype.update=function(e,t,n){return null==n&&(n=!1),$("#input_baseUrl").val(e),n?this.trigger("update-swagger-ui",{url:e}):void 0},t}(Backbone.View),this.Handlebars.templates.param_list=Handlebars.template({1:function(){return" multiple='multiple'"},3:function(){return""},5:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.program(6,a),data:a}),null!=s&&(i+=s),i},6:function(e,t,n,a){var s,i=t.helperMissing,r="";return s=(t.isArray||e&&e.isArray||i).call(e,e,{name:"isArray",hash:{},fn:this.program(3,a),inverse:this.program(7,a),data:a}),null!=s&&(r+=s),r},7:function(){return"          <option selected=\"\" value=''></option>\n"},9:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.program(12,a),data:a}),null!=s&&(i+=s),i},10:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return'        <option selected="" value=\''+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+" (default)</option>\n"},12:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"        <option value='"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+"</option>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n  <select ";return s=(t.isArray||e&&e.isArray||l).call(e,e,{name:"isArray",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+=" class='parameter' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"'>\n",s=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.program(5,a),data:a}),null!=s&&(p+=s),s=t.each.call(e,null!=(s=null!=e?e.allowableValues:e)?s.descriptiveValues:s,{name:"each",hash:{},fn:this.program(9,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+='  </select>\n</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>'},useData:!0});var MainView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;MainView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}var n;return __extends(t,e),n={alpha:function(e,t){return e.path.localeCompare(t.path)},method:function(e,t){return e.method.localeCompare(t.method)}},t.prototype.initialize=function(e){var t,n,a,s;null==e&&(e={}),this.model.auths=[],s=this.model.securityDefinitions;for(n in s)a=s[n],t={name:n,type:a.type,value:a},this.model.auths.push(t);return"2.0"===this.model.swaggerVersion?this.model.validatorUrl="validatorUrl"in e.swaggerOptions?e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0?null:"http://online.swagger.io/validator":void 0},t.prototype.render=function(){var e,t,n,a,s,i,r,l,o,p;if(this.model.securityDefinitions)for(s in this.model.securityDefinitions)e=this.model.securityDefinitions[s],"apiKey"===e.type&&0===$("#apikey_button").length&&(t=new ApiKeyButton({model:e}).render().el,$(".auth_main_container").append(t)),"basicAuth"===e.type&&0===$("#basic_auth_button").length&&(t=new BasicAuthButton({model:e}).render().el,$(".auth_main_container").append(t));for($(this.el).html(Handlebars.templates.main(this.model)),r={},n=0,p=this.model.apisArray,l=0,o=p.length;o>l;l++){for(i=p[l],a=i.name;"undefined"!=typeof r[a];)a=a+"_"+n,n+=1;
2
i.id=a,r[a]=i,this.addResource(i,this.model.auths)}return $(".propWrap").hover(function(){return $(".optionsWrapper",$(this)).show()},function(){return $(".optionsWrapper",$(this)).hide()}),this},t.prototype.addResource=function(e,t){var n;return e.id=e.id.replace(/\s/g,"_"),n=new ResourceView({model:e,tagName:"li",id:"resource_"+e.id,className:"resource",auths:t,swaggerOptions:this.options.swaggerOptions}),$("#resources").append(n.render().el)},t.prototype.clear=function(){return $(this.el).html("")},t}(Backbone.View),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"        <textarea class='body-textarea' readonly='readonly' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"</textarea>\n"},3:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=s&&(i+=s),i},4:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"            "+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"\n"},6:function(){return"            (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=s&&(p+=s),p+='</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"        <textarea class='body-textarea'  readonly='readonly' placeholder='(required)' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"</textarea>\n"},3:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=s&&(i+=s),i},4:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"            "+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"\n"},6:function(){return"            (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code required'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=s&&(p+=s),p+='</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0});var OperationView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;OperationView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.invocationUrl=null,t.prototype.events={"submit .sandbox":"submitOperation","click .submit":"submitOperation","click .response_hider":"hideResponse","click .toggleOperation":"toggleOperationContent","mouseenter .api-ic":"mouseEnter","mouseout .api-ic":"mouseExit"},t.prototype.initialize=function(e){return null==e&&(e={}),this.auths=e.auths,this.parentId=this.model.parentId,this.nickname=this.model.nickname,this},t.prototype.mouseEnter=function(e){var t,n,a,s,i,r,l,o,p,u;return t=$(this.el).find(".content"),p=e.pageX,u=e.pageY,r=$(window).scrollLeft(),l=$(window).scrollTop(),s=r+$(window).width(),i=l+$(window).height(),o=t.width(),n=t.height(),p+o>s&&(p=s-o),r>p&&(p=r),u+n>i&&(u=i-n),l>u&&(u=l),a={},a.top=u,a.left=p,t.css(a),$(e.currentTarget.parentNode).find("#api_information_panel").show()},t.prototype.mouseExit=function(e){return $(e.currentTarget.parentNode).find("#api_information_panel").hide()},t.prototype.render=function(){var e,t,n,a,s,i,r,l,o,p,u,h,c,d,m,f,y,g,v,_,w,b,x,k,O,C,S,P,T,D,H,M,E,R,V,N,U,A;if(i=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,i||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.description&&(this.model.description=this.model.description.replace(/(?:\r\n|\r|\n)/g,"<br />")),this.model.oauth=null,o=this.model.authorizations||this.model.security)if(Array.isArray(o))for(k=0,P=o.length;P>k;k++){n=o[k];for(l in n){t=n[l];for(e in this.auths)if(t=this.auths[e],"oauth2"===t.type){this.model.oauth={},this.model.oauth.scopes=[],R=t.value.scopes;for(r in R)b=R[r],y=n[l].indexOf(r),y>=0&&(p={scope:r,description:b},this.model.oauth.scopes.push(p))}}}else for(r in o)if(b=o[r],"oauth2"===r)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),O=0,T=b.length;T>O;O++)p=b[O],this.model.oauth.scopes.push(p);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],V=this.model.responses;for(a in V)x=V[a],m=null,f=this.model.responses[a].schema,f&&f.$ref&&(m=f.$ref,0===m.indexOf("#/definitions/")&&(m=m.substring("#/definitions/".length))),this.model.responseMessages.push({code:a,message:x.description,responseModel:m})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),g=null,this.model.successResponse){_=this.model.successResponse;for(l in _)x=_[l],this.model.successCode=l,"object"==typeof x&&"function"==typeof x.createJSONSample&&(g={sampleJSON:JSON.stringify(x.createJSONSample(),void 0,2),isParam:!1,signature:x.getMockSignature()})}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(g={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),g?(d=new SignatureView({model:g,tagName:"div"}),$(".model-signature",$(this.el)).append(d.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),s={isParam:!1},s.consumes=this.model.consumes,s.produces=this.model.produces,N=this.model.parameters,C=0,D=N.length;D>C;C++)u=N[C],w=u.type||u.dataType||"","undefined"==typeof w&&(m=u.schema,m&&m.$ref&&(h=m.$ref,w=0===h.indexOf("#/definitions/")?h.substring("#/definitions/".length):h)),w&&"file"===w.toLowerCase()&&(s.consumes||(s.consumes="multipart/form-data")),u.type=w;for(c=new ResponseContentTypeView({model:s}),$(".response-content-type",$(this.el)).append(c.render().el),U=this.model.parameters,S=0,H=U.length;H>S;S++)u=U[S],this.addParameter(u,s.consumes);for(A=this.model.responseMessages,E=0,M=A.length;M>E;E++)v=A[E],this.addStatusCode(v);return this},t.prototype.addParameter=function(e,t){var n;return e.consumes=t,n=new ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly}),$(".operation-params",$(this.el)).append(n.render().el)},t.prototype.addStatusCode=function(e){var t;return t=new StatusCodeView({model:e,tagName:"tr"}),$(".operation-status",$(this.el)).append(t.render().el)},t.prototype.submitOperation=function(e){var t,n,a,s,i,r,l,o,p,u,h,c,d,m,f,y;if(null!=e&&e.preventDefault(),n=$(".sandbox",$(this.el)),t=!0,n.find("input.required").each(function(){return $(this).removeClass("error"),""===jQuery.trim($(this).val())?($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1):void 0}),n.find("textarea.required").each(function(){return $(this).removeClass("error"),""===jQuery.trim($(this).val())?($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1):void 0}),t){for(s={},r={parent:this},a=!1,m=n.find("input"),o=0,h=m.length;h>o;o++)i=m[o],null!=i.value&&jQuery.trim(i.value).length>0&&(s[i.name]=i.value),"file"===i.type&&(s[i.name]=i.files[0],a=!0);for(f=n.find("textarea"),p=0,c=f.length;c>p;p++)i=f[p],null!=i.value&&jQuery.trim(i.value).length>0&&(s[i.name]=i.value);for(y=n.find("select"),u=0,d=y.length;d>u;u++)i=y[u],l=this.getSelectedValue(i),null!=l&&jQuery.trim(l).length>0&&(s[i.name]=l);return r.responseContentType=$("div select[name=responseContentType]",$(this.el)).val(),r.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val(),$(".response_throbber",$(this.el)).show(),a?this.handleFileUpload(s,n):this.model["do"](s,r,this.showCompleteStatus,this.showErrorStatus,this)}},t.prototype.success=function(e,t){return t.showCompleteStatus(e)},t.prototype.handleFileUpload=function(e,t){var n,a,s,i,r,l,o,p,u,h,c,d,m,f,y,g,v,_,w;for(g=t.serializeArray(),p=0,d=g.length;d>p;p++)i=g[p],null!=i.value&&jQuery.trim(i.value).length>0&&(e[i.name]=i.value);for(n=new FormData,o=0,v=this.model.parameters,u=0,m=v.length;m>u;u++)l=v[u],("form"===l.paramType||"formData"===l["in"])&&"file"!==l.type.toLowerCase()&&void 0!==e[l.name]&&n.append(l.name,e[l.name]);for(s={},_=this.model.parameters,h=0,f=_.length;f>h;h++)l=_[h],"header"===l.paramType&&(s[l.name]=e[l.name]);for(w=t.find('input[type~="file"]'),c=0,y=w.length;y>c;c++)a=w[c],"undefined"!=typeof a.files[0]&&(n.append($(a).attr("name"),a.files[0]),o+=1);return this.invocationUrl=this.model.supportHeaderParams()?(s=this.model.getHeaderParams(e),delete s["Content-Type"],this.model.urlify(e,!1)):this.model.urlify(e,!0),$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(this.invocationUrl),r={type:this.model.method,url:this.invocationUrl,headers:s,data:n,dataType:"json",contentType:!1,processData:!1,error:function(e){return function(t){return e.showErrorStatus(e.wrap(t),e)}}(this),success:function(e){return function(t){return e.showResponse(t,e)}}(this),complete:function(e){return function(t){return e.showCompleteStatus(e.wrap(t),e)}}(this)},window.authorizations&&window.authorizations.apply(r),0===o&&r.data.append("fake","true"),jQuery.ajax(r),!1},t.prototype.wrap=function(e){var t,n,a,s,i,r,l;for(a={},n=e.getAllResponseHeaders().split("\r"),r=0,l=n.length;l>r;r++)s=n[r],t=s.match(/^([^:]*?):(.*)$/),t||(t=[]),t.shift(),void 0!==t[0]&&void 0!==t[1]&&(a[t[0].trim()]=t[1].trim());return i={},i.content={},i.content.data=e.responseText,i.headers=a,i.request={},i.request.url=this.invocationUrl,i.status=e.status,i},t.prototype.getSelectedValue=function(e){var t,n,a,s,i;if(e.multiple){for(n=[],i=e.options,a=0,s=i.length;s>a;a++)t=i[a],t.selected&&n.push(t.value);return n.length>0?n:null}return e.value},t.prototype.hideResponse=function(e){return null!=e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},t.prototype.showResponse=function(e){var t;return t=JSON.stringify(e,null,"	").replace(/\n/g,"<br>"),$(".response_body",$(this.el)).html(escape(t))},t.prototype.showErrorStatus=function(e,t){return t.showStatus(e)},t.prototype.showCompleteStatus=function(e,t){return t.showStatus(e)},t.prototype.formatXml=function(e){var t,n,a,s,i,r,l,o,p,u,h,c,d;for(o=/(>)(<)(\/*)/g,u=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(o,"$1\n$2$3").replace(u,"$1\n").replace(t,"$1\n$2"),l=0,n="",i=e.split("\n"),a=0,s="other",p={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},h=function(e){var t,i,r,l,o,u,h;return u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},o=function(){var e;e=[];for(r in u)h=u[r],h&&e.push(r);return e}()[0],o=void 0===o?"other":o,t=s+"->"+o,s=o,l="",a+=p[t],l=function(){var e,t,n;for(n=[],i=e=0,t=a;t>=0?t>e:e>t;i=t>=0?++e:--e)n.push("  ");return n}().join(""),"opening->closing"===t?n=n.substr(0,n.length-1)+e+"\n":n+=l+e+"\n"},c=0,d=i.length;d>c;c++)r=i[c],h(r);return n},t.prototype.showStatus=function(e){var t,n,a,s,i,r,l,o,p,u,h;if(void 0===e.content?(n=e.data,h=e.url):(n=e.content.data,h=e.request.url),i=e.headers,a=null,i&&(a=i["Content-Type"]||i["content-type"],a&&(a=a.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml"),n)if("application/json"===a||/\+json$/.test(a)){r=null;try{r=JSON.stringify(JSON.parse(n),null,"  ")}catch(c){s=c,r="can't parse JSON.  Raw result:\n\n"+n}t=$("<code />").text(r),o=$('<pre class="json" />').append(t)}else"application/xml"===a||/\+xml$/.test(a)?(t=$("<code />").text(this.formatXml(n)),o=$('<pre class="xml" />').append(t)):"text/html"===a?(t=$("<code />").html(_.escape(n)),o=$('<pre class="xml" />').append(t)):/^image\//.test(a)?o=$("<img>").attr("src",h):(t=$("<code />").text(n),o=$('<pre class="json" />').append(t));else t=$("<code />").text("no content"),o=$('<pre class="json" />').append(t);return p=o,$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(h),$(".response_code",$(this.el)).html("<pre>"+e.status+"</pre>"),$(".response_body",$(this.el)).html(p),$(".response_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(e.headers,null,"  ")).replace(/\n/g,"<br>")+"</pre>"),$(".response",$(this.el)).slideDown(),$(".response_hider",$(this.el)).show(),$(".response_throbber",$(this.el)).hide(),u=$(".response_body",$(this.el))[0],l=this.options.swaggerOptions,l.highlightSizeThreshold&&e.data.length>l.highlightSizeThreshold?u:hljs.highlightBlock(u)},t.prototype.toggleOperationContent=function(){var e;return e=$("#"+Docs.escapeResourceName(this.parentId+"_"+this.nickname+"_content")),e.is(":visible")?Docs.collapseOperation(e):Docs.expandOperation(e)},t}(Backbone.View);var ParameterContentTypeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ParameterContentTypeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:"),this},t.prototype.template=function(){return Handlebars.templates.parameter_content_type},t}(Backbone.View),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i},2:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return'			<input type="file" name=\''+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'/>\n"},4:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=s&&(i+=s),i},5:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<textarea class='body-textarea required' placeholder='(required)' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+'</textarea>\n        <br />\n        <div class="parameter-content-type" />\n'},7:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<textarea class='body-textarea required' placeholder='(required)' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+'\'></textarea>\n				<br />\n				<div class="parameter-content-type" />\n'},9:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.program(12,a),data:a}),null!=s&&(i+=s),i},10:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"			<input class='parameter' class='required' type='file' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'/>\n"},12:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(13,a),inverse:this.program(15,a),data:a}),null!=s&&(i+=s),i},13:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<input class='parameter required' minlength='1' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='(required)' type='text' value='"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"'/>\n"},15:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"				<input class='parameter required' minlength='1' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='(required)' type='text' value=''/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code required'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=s&&(p+=s),p+='</td>\n<td>\n	<strong><span class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</span></strong>\n</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a='  <option value="';return t=n(e,e),null!=t&&(a+=t),a+='">',t=n(e,e),null!=t&&(a+=t),a+"</option>\n"},4:function(){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='<label for="parameterContentType"></label>\n<select name="parameterContentType">\n';return s=t["if"].call(e,null!=e?e.consumes:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i+"</select>\n"},useData:!0});var ParameterView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ParameterView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(e,t){return"array"===e.type.toLowerCase()||e.allowMultiple?t.fn(this):t.inverse(this)})},t.prototype.render=function(){var e,t,n,a,s,i,r,l,o,p;return p=this.model.type||this.model.dataType,"undefined"==typeof p&&(i=this.model.schema,i&&i.$ref&&(a=i.$ref,p=0===a.indexOf("#/definitions/")?a.substring("#/definitions/".length):a)),this.model.type=p,this.model.paramType=this.model["in"]||this.model.paramType,("body"===this.model.paramType||"body"===this.model["in"])&&(this.model.isBody=!0),p&&"file"===p.toLowerCase()&&(this.model.isFile=!0),this.model["default"]=this.model["default"]||this.model.defaultValue,this.model.allowableValues&&(this.model.isList=!0),o=this.template(),$(this.el).html(o(this.model)),r={sampleJSON:this.model.sampleJSON,isParam:!0,signature:this.model.signature},this.model.sampleJSON?(l=new SignatureView({model:r,tagName:"div"}),$(".model-signature",$(this.el)).append(l.render().el)):$(".model-signature",$(this.el)).html(this.model.signature),t=!1,this.model.isBody&&(t=!0),e={isParam:t},e.consumes=this.model.consumes,t?(n=new ParameterContentTypeView({model:e}),$(".parameter-content-type",$(this.el)).append(n.render().el)):(s=new ResponseContentTypeView({model:e}),$(".response-content-type",$(this.el)).append(s.render().el)),this},t.prototype.template=function(){return this.model.isList?Handlebars.templates.param_list:this.options.readOnly?this.model.required?Handlebars.templates.param_readonly_required:Handlebars.templates.param_readonly:this.model.required?Handlebars.templates.param_required:Handlebars.templates.param},t}(Backbone.View);var ResourceView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ResourceView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(e){return null==e&&(e={}),this.auths=e.auths,""===this.model.description&&(this.model.description=null),null!=this.model.description?this.model.summary=this.model.description:void 0},t.prototype.render=function(){var e,t,n,a,s,i,r;for(n={},$(this.el).html(Handlebars.templates.resource(this.model)),r=this.model.operationsArray,s=0,i=r.length;i>s;s++){for(a=r[s],e=0,t=a.nickname;"undefined"!=typeof n[t];)t=t+"_"+e,e+=1;n[t]=a,a.nickname=t,a.parentId=this.model.id,this.addOperation(a)}return $(".toggleEndpointList",this.el).click(this.callDocs.bind(this,"toggleEndpointListForResource")),$(".collapseResource",this.el).click(this.callDocs.bind(this,"collapseOperationsForResource")),$(".expandResource",this.el).click(this.callDocs.bind(this,"expandOperationsForResource")),this},t.prototype.addOperation=function(e){var t;return e.number=this.number,t=new OperationView({model:e,tagName:"li",className:"endpoint",swaggerOptions:this.options.swaggerOptions,auths:this.auths}),$(".endpoints",$(this.el)).append(t.render().el),this.number++},t.prototype.callDocs=function(e,t){return t.preventDefault(),Docs[e](t.currentTarget.getAttribute("data-id"))},t}(Backbone.View),this.Handlebars.templates.resource=Handlebars.template({1:function(){return" : "},3:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"<li>\n      <a href='"+l((s=null!=(s=t.url||(null!=e?e.url:e))?s:r,typeof s===i?s.call(e,{name:"url",hash:{},data:a}):s))+"'>Raw</a>\n    </li>"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r,l="function",o=t.helperMissing,p=this.escapeExpression,u=t.blockHelperMissing,h="<div class='heading'>\n  <h2>\n    <a href='#!/"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'\' class="toggleEndpointList" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">'+p((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===l?i.call(e,{name:"name",hash:{},data:a}):i))+"</a> ";return i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,r={name:"summary",hash:{},fn:this.program(1,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.summary||(s=u.call(e,s,r)),null!=s&&(h+=s),i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,s=typeof i===l?i.call(e,{name:"summary",hash:{},data:a}):i,null!=s&&(h+=s),h+="\n  </h2>\n  <ul class='options'>\n    <li>\n      <a href='#!/"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+"' id='endpointListTogger_"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'\' class="toggleEndpointList" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">Show/Hide</a>\n    </li>\n    <li>\n      <a href=\'#\' class="collapseResource" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">\n        List Operations\n      </a>\n    </li>\n    <li>\n      <a href=\'#\' class="expandResource" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">\n        Expand Operations\n      </a>\n    </li>\n    ',i=null!=(i=t.url||(null!=e?e.url:e))?i:o,r={name:"url",hash:{},fn:this.program(3,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.url||(s=u.call(e,s,r)),null!=s&&(h+=s),h+"\n  </ul>\n</div>\n<ul class='endpoints' id='"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+"_endpoint_list' style='display:none'>\n\n</ul>\n"},useData:!0});var ResponseContentTypeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ResponseContentTypeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),$("label[for=responseContentType]",$(this.el)).text("Response Content Type"),this},t.prototype.template=function(){return Handlebars.templates.response_content_type},t}(Backbone.View),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a='  <option value="';return t=n(e,e),null!=t&&(a+=t),a+='">',t=n(e,e),null!=t&&(a+=t),a+"</option>\n"},4:function(){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='<label for="responseContentType"></label>\n<select name="responseContentType">\n';return s=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i+"</select>\n"},useData:!0});var SignatureView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;SignatureView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"},t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),this.switchToSnippet(),this.isParam=this.model.isParam,this.isParam&&$(".notice",$(this.el)).text("Click to set as parameter value"),this},t.prototype.template=function(){return Handlebars.templates.signature},t.prototype.switchToDescription=function(e){return null!=e&&e.preventDefault(),$(".snippet",$(this.el)).hide(),$(".description",$(this.el)).show(),$(".description-link",$(this.el)).addClass("selected"),$(".snippet-link",$(this.el)).removeClass("selected")},t.prototype.switchToSnippet=function(e){return null!=e&&e.preventDefault(),$(".description",$(this.el)).hide(),$(".snippet",$(this.el)).show(),$(".snippet-link",$(this.el)).addClass("selected"),$(".description-link",$(this.el)).removeClass("selected")},t.prototype.snippetToTextArea=function(e){var t;return this.isParam&&(null!=e&&e.preventDefault(),t=$("textarea",$(this.el.parentNode.parentNode.parentNode)),""===$.trim(t.val()))?t.val(this.model.sampleJSON):void 0},t}(Backbone.View),this.Handlebars.templates.signature=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p='<div>\n<ul class="signature-nav">\n  <li><a class="description-link" href="#">Model</a></li>\n  <li><a class="snippet-link" href="#">Model Schema</a></li>\n</ul>\n<div>\n\n<div class="signature-container">\n  <div class="description">\n    ';return i=null!=(i=t.signature||(null!=e?e.signature:e))?i:l,s=typeof i===r?i.call(e,{name:"signature",hash:{},data:a}):i,null!=s&&(p+=s),p+'\n  </div>\n\n  <div class="snippet">\n    <pre><code>'+o((i=null!=(i=t.sampleJSON||(null!=e?e.sampleJSON:e))?i:l,typeof i===r?i.call(e,{name:"sampleJSON",hash:{},data:a}):i))+'</code></pre>\n    <small class="notice"></small>\n  </div>\n</div>\n\n'},useData:!0});var StatusCodeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;StatusCodeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e,t,n;return n=this.template(),$(this.el).html(n(this.model)),swaggerUi.api.models.hasOwnProperty(this.model.responseModel)?(e={sampleJSON:JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2),isParam:!1,signature:swaggerUi.api.models[this.model.responseModel].getMockSignature()},t=new SignatureView({model:e,tagName:"div"}),$(".model-signature",this.$el).append(t.render().el)):$(".model-signature",this.$el).html(""),this},t.prototype.template=function(){return Handlebars.templates.status_code},t}(Backbone.View),this.Handlebars.templates.status_code=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td width='15%' class='code'>"+o((i=null!=(i=t.code||(null!=e?e.code:e))?i:l,typeof i===r?i.call(e,{name:"code",hash:{},data:a}):i))+"</td>\n<td>";return i=null!=(i=t.message||(null!=e?e.message:e))?i:l,s=typeof i===r?i.call(e,{name:"message",hash:{},data:a}):i,null!=s&&(p+=s),p+"</td>\n<td width='50%'><span class=\"model-signature\" /></td>"},useData:!0});
(-)a/Koha/REST/V1.swagger (-2 / +7 lines)
Lines 12-23 Link Here
12
      "url": "http://koha-community.org/"
12
      "url": "http://koha-community.org/"
13
    }
13
    }
14
  },
14
  },
15
  "basePath": "/",
15
  "basePath": "/v1",
16
  "paths": {
16
  "paths": {
17
    "/borrowers": {
17
    "/borrowers": {
18
      "get": {
18
      "get": {
19
        "x-mojo-controller": "Koha::REST::V1::Borrowers",
19
        "x-mojo-controller": "Koha::REST::V1::Borrowers",
20
        "operationId": "listBorrowers",
20
        "operationId": "listBorrowers",
21
        "tags": ["borrowers"],
21
        "produces": [
22
        "produces": [
22
          "application/json"
23
          "application/json"
23
        ],
24
        ],
Lines 38-43 Link Here
38
      "get": {
39
      "get": {
39
        "x-mojo-controller": "Koha::REST::V1::Borrowers",
40
        "x-mojo-controller": "Koha::REST::V1::Borrowers",
40
        "operationId": "getBorrower",
41
        "operationId": "getBorrower",
42
        "tags": ["borrowers"],
41
        "parameters": [
43
        "parameters": [
42
          {
44
          {
43
            "$ref": "#/parameters/borrowernumberPathParam"
45
            "$ref": "#/parameters/borrowernumberPathParam"
Lines 68-74 Link Here
68
      "type": "object",
70
      "type": "object",
69
      "properties": {
71
      "properties": {
70
        "borrowernumber": {
72
        "borrowernumber": {
71
          "description": "Borrower internal identifier"
73
          "$ref": "#/definitions/borrowernumber"
72
        },
74
        },
73
        "cardnumber": {
75
        "cardnumber": {
74
          "description": "library assigned ID number for borrowers"
76
          "description": "library assigned ID number for borrowers"
Lines 81-86 Link Here
81
        }
83
        }
82
      }
84
      }
83
    },
85
    },
86
    "borrowernumber": {
87
      "description": "Borrower internal identifier"
88
    },
84
    "error": {
89
    "error": {
85
      "type": "object",
90
      "type": "object",
86
      "properties": {
91
      "properties": {
(-)a/etc/koha-httpd.conf (-1 / +19 lines)
Lines 216-218 Link Here
216
     RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
216
     RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
217
   </IfModule>
217
   </IfModule>
218
</VirtualHost>
218
</VirtualHost>
219
- 
219
220
<VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT__>
221
   ServerAdmin __WEBMASTER_EMAIL__
222
   DocumentRoot __INTRANET_CGI_DIR__/api
223
   ServerName api.__WEBSERVER_HOST__:__WEBSERVER_PORT__
224
   SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
225
   SetEnv PERL5LIB "__PERL_MODULE_DIR__"
226
227
  <Directory __INTRANET_CGI_DIR__/api>
228
    Options +ExecCGI +FollowSymlinks
229
    AddHandler cgi-script .cgi
230
231
    RewriteEngine on
232
    RewriteCond %{REQUEST_FILENAME} !-f
233
    RewriteCond %{REQUEST_FILENAME} !-d
234
    RewriteCond %{DOCUMENT_ROOT}/$1/script.cgi -f
235
    RewriteRule ^(.*?)/.* $1/script.cgi/$0 [L]
236
  </Directory>
237
</VirtualHost>

Return to bug 13799