swagger-ui-svelte
Advanced tools
@@ -278,2 +278,68 @@ (function (global, factory) { | ||
const subscriber_queue = []; | ||
/** | ||
* Create a `Writable` store that allows both updating and reading by subscription. | ||
* @param {*=}value initial value | ||
* @param {StartStopNotifier=}start start and stop notifications for subscriptions | ||
*/ | ||
function writable(value, start = noop) { | ||
let stop; | ||
const subscribers = []; | ||
function set(new_value) { | ||
if (safe_not_equal(value, new_value)) { | ||
value = new_value; | ||
if (stop) { // store is ready | ||
const run_queue = !subscriber_queue.length; | ||
for (let i = 0; i < subscribers.length; i += 1) { | ||
const s = subscribers[i]; | ||
s[1](); | ||
subscriber_queue.push(s, value); | ||
} | ||
if (run_queue) { | ||
for (let i = 0; i < subscriber_queue.length; i += 2) { | ||
subscriber_queue[i][0](subscriber_queue[i + 1]); | ||
} | ||
subscriber_queue.length = 0; | ||
} | ||
} | ||
} | ||
} | ||
function update(fn) { | ||
set(fn(value)); | ||
} | ||
function subscribe(run, invalidate = noop) { | ||
const subscriber = [run, invalidate]; | ||
subscribers.push(subscriber); | ||
if (subscribers.length === 1) { | ||
stop = start(set) || noop; | ||
} | ||
run(value); | ||
return () => { | ||
const index = subscribers.indexOf(subscriber); | ||
if (index !== -1) { | ||
subscribers.splice(index, 1); | ||
} | ||
if (subscribers.length === 0) { | ||
stop(); | ||
stop = null; | ||
} | ||
}; | ||
} | ||
return { set, update, subscribe }; | ||
} | ||
const swagger = writable(null); | ||
let swaggerLocal = null; | ||
swagger.subscribe((v) => { swaggerLocal = v; }); | ||
const loadSwagger = async (swaggerUrl) => { | ||
const res = await fetch(swaggerUrl); | ||
swaggerLocal = await res.json(); | ||
swagger.set(swaggerLocal); | ||
}; | ||
const getSchema = (refName) => { | ||
const division = refName.replace("#/", "").split("/"); | ||
return swaggerLocal[division[0]][division[1]][division[2]]; | ||
}; | ||
/* src/SwaggerUISvelte.svelte generated by Svelte v3.25.1 */ | ||
@@ -283,3 +349,3 @@ | ||
const child_ctx = ctx.slice(); | ||
child_ctx[13] = list[i]; | ||
child_ctx[10] = list[i]; | ||
return child_ctx; | ||
@@ -290,3 +356,3 @@ } | ||
const child_ctx = ctx.slice(); | ||
child_ctx[16] = list[i]; | ||
child_ctx[13] = list[i]; | ||
return child_ctx; | ||
@@ -297,3 +363,3 @@ } | ||
const child_ctx = ctx.slice(); | ||
child_ctx[22] = list[i]; | ||
child_ctx[19] = list[i]; | ||
return child_ctx; | ||
@@ -304,3 +370,3 @@ } | ||
const child_ctx = ctx.slice(); | ||
child_ctx[22] = list[i]; | ||
child_ctx[19] = list[i]; | ||
return child_ctx; | ||
@@ -311,3 +377,3 @@ } | ||
const child_ctx = ctx.slice(); | ||
child_ctx[19] = list[i]; | ||
child_ctx[16] = list[i]; | ||
return child_ctx; | ||
@@ -318,4 +384,4 @@ } | ||
const child_ctx = ctx.slice(); | ||
child_ctx[10] = list[i]; | ||
child_ctx[12] = i; | ||
child_ctx[7] = list[i]; | ||
child_ctx[9] = i; | ||
return child_ctx; | ||
@@ -326,8 +392,8 @@ } | ||
const child_ctx = ctx.slice(); | ||
child_ctx[7] = list[i]; | ||
child_ctx[9] = i; | ||
child_ctx[4] = list[i]; | ||
child_ctx[6] = i; | ||
return child_ctx; | ||
} | ||
// (31:2) {:else} | ||
// (16:2) {:else} | ||
function create_else_block_5(ctx) { | ||
@@ -343,33 +409,27 @@ return { | ||
// (29:2) {#if swagger} | ||
function create_if_block_11(ctx) { | ||
// (14:2) {#if swaggerLocal} | ||
function create_if_block_12(ctx) { | ||
let title_value; | ||
document.title = title_value = /*swagger*/ ctx[1].info.title; | ||
document.title = title_value = /*swaggerLocal*/ ctx[0].info.title; | ||
return { c: noop, m: noop, d: noop }; | ||
} | ||
// (39:6) {#if swagger} | ||
// (24:6) {#if swaggerLocal} | ||
function create_if_block(ctx) { | ||
let h1; | ||
let t0_value = /*swagger*/ ctx[1].info.title + ""; | ||
let t0_value = /*swaggerLocal*/ ctx[0].info.title + ""; | ||
let t0; | ||
let t1; | ||
let h2; | ||
let t2_value = /*swagger*/ ctx[1].info.description + ""; | ||
let t2_value = /*swaggerLocal*/ ctx[0].info.description + ""; | ||
let t2; | ||
let t3; | ||
let t4_value = /*swagger*/ ctx[1].info.version + ""; | ||
let t4_value = /*swaggerLocal*/ ctx[0].info.version + ""; | ||
let t4; | ||
let t5; | ||
let p; | ||
let a; | ||
let t6_value = /*swagger*/ ctx[1].info.contact.name + ""; | ||
let t6; | ||
let a_href_value; | ||
let t7; | ||
let t8_value = /*swagger*/ ctx[1].info.contact.email + ""; | ||
let t8; | ||
let t9; | ||
let each_1_anchor; | ||
let each_value = Object.entries(/*swagger*/ ctx[1].paths); | ||
let if_block = /*swaggerLocal*/ ctx[0].info.contact && create_if_block_11(ctx); | ||
let each_value = Object.entries(/*swaggerLocal*/ ctx[0].paths); | ||
let each_blocks = []; | ||
@@ -392,7 +452,4 @@ | ||
p = element("p"); | ||
a = element("a"); | ||
t6 = text(t6_value); | ||
t7 = text(" - \n "); | ||
t8 = text(t8_value); | ||
t9 = space(); | ||
if (if_block) if_block.c(); | ||
t6 = space(); | ||
@@ -406,4 +463,2 @@ for (let i = 0; i < each_blocks.length; i += 1) { | ||
attr(h2, "class", "subtitle"); | ||
attr(a, "href", a_href_value = /*swagger*/ ctx[1].info.contact.url); | ||
attr(a, "target", "_blank"); | ||
}, | ||
@@ -420,7 +475,4 @@ m(target, anchor) { | ||
insert(target, p, anchor); | ||
append(p, a); | ||
append(a, t6); | ||
append(p, t7); | ||
append(p, t8); | ||
insert(target, t9, anchor); | ||
if (if_block) if_block.m(p, null); | ||
insert(target, t6, anchor); | ||
@@ -434,15 +486,21 @@ for (let i = 0; i < each_blocks.length; i += 1) { | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*swagger*/ ctx[1].info.title + "")) set_data(t0, t0_value); | ||
if (dirty & /*swagger*/ 2 && t2_value !== (t2_value = /*swagger*/ ctx[1].info.description + "")) set_data(t2, t2_value); | ||
if (dirty & /*swagger*/ 2 && t4_value !== (t4_value = /*swagger*/ ctx[1].info.version + "")) set_data(t4, t4_value); | ||
if (dirty & /*swagger*/ 2 && t6_value !== (t6_value = /*swagger*/ ctx[1].info.contact.name + "")) set_data(t6, t6_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*swaggerLocal*/ ctx[0].info.title + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t2_value !== (t2_value = /*swaggerLocal*/ ctx[0].info.description + "")) set_data(t2, t2_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t4_value !== (t4_value = /*swaggerLocal*/ ctx[0].info.version + "")) set_data(t4, t4_value); | ||
if (dirty & /*swagger*/ 2 && a_href_value !== (a_href_value = /*swagger*/ ctx[1].info.contact.url)) { | ||
attr(a, "href", a_href_value); | ||
if (/*swaggerLocal*/ ctx[0].info.contact) { | ||
if (if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if_block = create_if_block_11(ctx); | ||
if_block.c(); | ||
if_block.m(p, null); | ||
} | ||
} else if (if_block) { | ||
if_block.d(1); | ||
if_block = null; | ||
} | ||
if (dirty & /*swagger*/ 2 && t8_value !== (t8_value = /*swagger*/ ctx[1].info.contact.email + "")) set_data(t8, t8_value); | ||
if (dirty & /*Object, swagger, active, getSchema*/ 7) { | ||
each_value = Object.entries(/*swagger*/ ctx[1].paths); | ||
if (dirty & /*Object, swaggerLocal, active, getSchema*/ 3) { | ||
each_value = Object.entries(/*swaggerLocal*/ ctx[0].paths); | ||
let i; | ||
@@ -475,3 +533,4 @@ | ||
if (detaching) detach(p); | ||
if (detaching) detach(t9); | ||
if (if_block) if_block.d(); | ||
if (detaching) detach(t6); | ||
destroy_each(each_blocks, detaching); | ||
@@ -483,5 +542,47 @@ if (detaching) detach(each_1_anchor); | ||
// (54:20) {#if method[1].summary} | ||
// (28:10) {#if swaggerLocal.info.contact} | ||
function create_if_block_11(ctx) { | ||
let a; | ||
let t0_value = /*swaggerLocal*/ ctx[0].info.contact.name + ""; | ||
let t0; | ||
let a_href_value; | ||
let t1; | ||
let t2_value = /*swaggerLocal*/ ctx[0].info.contact.email + ""; | ||
let t2; | ||
return { | ||
c() { | ||
a = element("a"); | ||
t0 = text(t0_value); | ||
t1 = text(" - \n "); | ||
t2 = text(t2_value); | ||
attr(a, "href", a_href_value = /*swaggerLocal*/ ctx[0].info.contact.url); | ||
attr(a, "target", "_blank"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, a, anchor); | ||
append(a, t0); | ||
insert(target, t1, anchor); | ||
insert(target, t2, anchor); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*swaggerLocal*/ ctx[0].info.contact.name + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && a_href_value !== (a_href_value = /*swaggerLocal*/ ctx[0].info.contact.url)) { | ||
attr(a, "href", a_href_value); | ||
} | ||
if (dirty & /*swaggerLocal*/ 1 && t2_value !== (t2_value = /*swaggerLocal*/ ctx[0].info.contact.email + "")) set_data(t2, t2_value); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(a); | ||
if (detaching) detach(t1); | ||
if (detaching) detach(t2); | ||
} | ||
}; | ||
} | ||
// (41:20) {#if method[1].summary} | ||
function create_if_block_10(ctx) { | ||
let t_value = /*method*/ ctx[10][1].summary + ""; | ||
let t_value = /*method*/ ctx[7][1].summary + ""; | ||
let t; | ||
@@ -497,3 +598,3 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*method*/ ctx[10][1].summary + "")) set_data(t, t_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t_value !== (t_value = /*method*/ ctx[7][1].summary + "")) set_data(t, t_value); | ||
}, | ||
@@ -506,6 +607,6 @@ d(detaching) { | ||
// (60:18) {#if method[1].requestBody && method[1].requestBody.content} | ||
// (47:18) {#if method[1].requestBody && method[1].requestBody.content} | ||
function create_if_block_6(ctx) { | ||
let each_1_anchor; | ||
let each_value_4 = Object.entries(/*method*/ ctx[10][1].requestBody.content); | ||
let each_value_4 = Object.entries(/*method*/ ctx[7][1].requestBody.content); | ||
let each_blocks = []; | ||
@@ -533,4 +634,4 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*Object, getSchema, swagger*/ 6) { | ||
each_value_4 = Object.entries(/*method*/ ctx[10][1].requestBody.content); | ||
if (dirty & /*Object, getSchema, swaggerLocal*/ 1) { | ||
each_value_4 = Object.entries(/*method*/ ctx[7][1].requestBody.content); | ||
let i; | ||
@@ -564,6 +665,6 @@ | ||
// (92:26) {:else} | ||
// (79:26) {:else} | ||
function create_else_block_3(ctx) { | ||
let each_1_anchor; | ||
let each_value_6 = Object.entries(/*requestBody*/ ctx[19][1]["schema"]["properties"]); | ||
let each_value_6 = Object.entries(/*requestBody*/ ctx[16][1]["schema"]["properties"]); | ||
let each_blocks = []; | ||
@@ -591,4 +692,4 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*Object, swagger*/ 2) { | ||
each_value_6 = Object.entries(/*requestBody*/ ctx[19][1]["schema"]["properties"]); | ||
if (dirty & /*Object, swaggerLocal*/ 1) { | ||
each_value_6 = Object.entries(/*requestBody*/ ctx[16][1]["schema"]["properties"]); | ||
let i; | ||
@@ -622,6 +723,6 @@ | ||
// (74:26) {#if '$ref' in requestBody[1]["schema"]} | ||
// (61:26) {#if '$ref' in requestBody[1]["schema"]} | ||
function create_if_block_7(ctx) { | ||
let each_1_anchor; | ||
let each_value_5 = Object.entries(/*getSchema*/ ctx[2](/*requestBody*/ ctx[19][1]["schema"]["$ref"]).properties); | ||
let each_value_5 = Object.entries(getSchema(/*requestBody*/ ctx[16][1]["schema"]["$ref"]).properties); | ||
let each_blocks = []; | ||
@@ -649,4 +750,4 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*Object, getSchema, swagger*/ 6) { | ||
each_value_5 = Object.entries(/*getSchema*/ ctx[2](/*requestBody*/ ctx[19][1]["schema"]["$ref"]).properties); | ||
if (dirty & /*Object, getSchema, swaggerLocal*/ 1) { | ||
each_value_5 = Object.entries(getSchema(/*requestBody*/ ctx[16][1]["schema"]["$ref"]).properties); | ||
let i; | ||
@@ -680,3 +781,3 @@ | ||
// (104:32) {:else} | ||
// (91:32) {:else} | ||
function create_else_block_4(ctx) { | ||
@@ -699,5 +800,5 @@ let t; | ||
// (102:32) {#if property[1].type} | ||
// (89:32) {#if property[1].type} | ||
function create_if_block_9(ctx) { | ||
let t_value = /*property*/ ctx[22][1].type + ""; | ||
let t_value = /*property*/ ctx[19][1].type + ""; | ||
let t; | ||
@@ -713,3 +814,3 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*property*/ ctx[22][1].type + "")) set_data(t, t_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t_value !== (t_value = /*property*/ ctx[19][1].type + "")) set_data(t, t_value); | ||
}, | ||
@@ -722,3 +823,3 @@ d(detaching) { | ||
// (93:26) {#each Object.entries(requestBody[1]["schema"]["properties"]) as property} | ||
// (80:26) {#each Object.entries(requestBody[1]["schema"]["properties"]) as property} | ||
function create_each_block_6(ctx) { | ||
@@ -728,7 +829,7 @@ let tr; | ||
let span; | ||
let t0_value = /*property*/ ctx[22][0] + ""; | ||
let t0_value = /*property*/ ctx[19][0] + ""; | ||
let t0; | ||
let t1; | ||
let td1; | ||
let raw_value = /*property*/ ctx[22][1].description + ""; | ||
let raw_value = /*property*/ ctx[19][1].description + ""; | ||
let t2; | ||
@@ -739,3 +840,3 @@ let td2; | ||
function select_block_type_3(ctx, dirty) { | ||
if (/*property*/ ctx[22][1].type) return create_if_block_9; | ||
if (/*property*/ ctx[19][1].type) return create_if_block_9; | ||
return create_else_block_4; | ||
@@ -774,4 +875,4 @@ } | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*property*/ ctx[22][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*property*/ ctx[22][1].description + "")) td1.innerHTML = raw_value; | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*property*/ ctx[19][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && raw_value !== (raw_value = /*property*/ ctx[19][1].description + "")) td1.innerHTML = raw_value; | ||
if (current_block_type === (current_block_type = select_block_type_3(ctx)) && if_block) { | ||
@@ -796,3 +897,3 @@ if_block.p(ctx, dirty); | ||
// (86:32) {:else} | ||
// (73:32) {:else} | ||
function create_else_block_2(ctx) { | ||
@@ -815,5 +916,5 @@ let t; | ||
// (84:32) {#if property[1].type} | ||
// (71:32) {#if property[1].type} | ||
function create_if_block_8(ctx) { | ||
let t_value = /*property*/ ctx[22][1].type + ""; | ||
let t_value = /*property*/ ctx[19][1].type + ""; | ||
let t; | ||
@@ -829,3 +930,3 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*property*/ ctx[22][1].type + "")) set_data(t, t_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t_value !== (t_value = /*property*/ ctx[19][1].type + "")) set_data(t, t_value); | ||
}, | ||
@@ -838,3 +939,3 @@ d(detaching) { | ||
// (75:28) {#each Object.entries(getSchema(requestBody[1]["schema"]["$ref"]).properties) as property} | ||
// (62:28) {#each Object.entries(getSchema(requestBody[1]["schema"]["$ref"]).properties) as property} | ||
function create_each_block_5(ctx) { | ||
@@ -844,7 +945,7 @@ let tr; | ||
let span; | ||
let t0_value = /*property*/ ctx[22][0] + ""; | ||
let t0_value = /*property*/ ctx[19][0] + ""; | ||
let t0; | ||
let t1; | ||
let td1; | ||
let raw_value = /*property*/ ctx[22][1].description + ""; | ||
let raw_value = /*property*/ ctx[19][1].description + ""; | ||
let t2; | ||
@@ -855,3 +956,3 @@ let td2; | ||
function select_block_type_2(ctx, dirty) { | ||
if (/*property*/ ctx[22][1].type) return create_if_block_8; | ||
if (/*property*/ ctx[19][1].type) return create_if_block_8; | ||
return create_else_block_2; | ||
@@ -890,4 +991,4 @@ } | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*property*/ ctx[22][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*property*/ ctx[22][1].description + "")) td1.innerHTML = raw_value; | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*property*/ ctx[19][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && raw_value !== (raw_value = /*property*/ ctx[19][1].description + "")) td1.innerHTML = raw_value; | ||
if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block) { | ||
@@ -912,3 +1013,3 @@ if_block.p(ctx, dirty); | ||
// (61:18) {#each Object.entries(method[1].requestBody.content) as requestBody } | ||
// (48:18) {#each Object.entries(method[1].requestBody.content) as requestBody } | ||
function create_each_block_4(ctx) { | ||
@@ -918,3 +1019,3 @@ let div1; | ||
let t0; | ||
let t1_value = /*requestBody*/ ctx[19][0] + ""; | ||
let t1_value = /*requestBody*/ ctx[16][0] + ""; | ||
let t1; | ||
@@ -930,3 +1031,3 @@ let t2; | ||
function select_block_type_1(ctx, dirty) { | ||
if ("$ref" in /*requestBody*/ ctx[19][1]["schema"]) return create_if_block_7; | ||
if ("$ref" in /*requestBody*/ ctx[16][1]["schema"]) return create_if_block_7; | ||
return create_else_block_3; | ||
@@ -978,3 +1079,3 @@ } | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*requestBody*/ ctx[19][0] + "")) set_data(t1, t1_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t1_value !== (t1_value = /*requestBody*/ ctx[16][0] + "")) set_data(t1, t1_value); | ||
@@ -1000,3 +1101,3 @@ if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) { | ||
// (117:18) {#if method[1].parameters} | ||
// (104:18) {#if method[1].parameters} | ||
function create_if_block_2(ctx) { | ||
@@ -1011,3 +1112,3 @@ let div1; | ||
let tbody; | ||
let each_value_3 = /*method*/ ctx[10][1].parameters; | ||
let each_value_3 = /*method*/ ctx[7][1].parameters; | ||
let each_blocks = []; | ||
@@ -1062,4 +1163,4 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*Object, swagger*/ 2) { | ||
each_value_3 = /*method*/ ctx[10][1].parameters; | ||
if (dirty & /*Object, swaggerLocal*/ 1) { | ||
each_value_3 = /*method*/ ctx[7][1].parameters; | ||
let i; | ||
@@ -1093,6 +1194,6 @@ | ||
// (138:32) {:else} | ||
// (125:32) {:else} | ||
function create_else_block_1(ctx) { | ||
let span; | ||
let t_value = /*parameter*/ ctx[16].name + ""; | ||
let t_value = /*parameter*/ ctx[13].name + ""; | ||
let t; | ||
@@ -1110,3 +1211,3 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*parameter*/ ctx[16].name + "")) set_data(t, t_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t_value !== (t_value = /*parameter*/ ctx[13].name + "")) set_data(t, t_value); | ||
}, | ||
@@ -1119,6 +1220,6 @@ d(detaching) { | ||
// (134:32) {#if parameter.required} | ||
// (121:32) {#if parameter.required} | ||
function create_if_block_5(ctx) { | ||
let span; | ||
let t_value = /*parameter*/ ctx[16].name + ""; | ||
let t_value = /*parameter*/ ctx[13].name + ""; | ||
let t; | ||
@@ -1137,3 +1238,3 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*parameter*/ ctx[16].name + "")) set_data(t, t_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t_value !== (t_value = /*parameter*/ ctx[13].name + "")) set_data(t, t_value); | ||
}, | ||
@@ -1146,3 +1247,3 @@ d(detaching) { | ||
// (153:32) {:else} | ||
// (140:32) {:else} | ||
function create_else_block(ctx) { | ||
@@ -1165,9 +1266,9 @@ let t; | ||
// (147:32) {#if parameter.type} | ||
// (134:32) {#if parameter.type} | ||
function create_if_block_3(ctx) { | ||
let t0_value = /*parameter*/ ctx[16].type + ""; | ||
let t0_value = /*parameter*/ ctx[13].type + ""; | ||
let t0; | ||
let t1; | ||
let if_block_anchor; | ||
let if_block = /*parameter*/ ctx[16].items && create_if_block_4(ctx); | ||
let if_block = /*parameter*/ ctx[13].items && create_if_block_4(ctx); | ||
@@ -1188,5 +1289,5 @@ return { | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*parameter*/ ctx[16].type + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*parameter*/ ctx[13].type + "")) set_data(t0, t0_value); | ||
if (/*parameter*/ ctx[16].items) { | ||
if (/*parameter*/ ctx[13].items) { | ||
if (if_block) { | ||
@@ -1213,6 +1314,6 @@ if_block.p(ctx, dirty); | ||
// (149:34) {#if parameter.items } | ||
// (136:34) {#if parameter.items } | ||
function create_if_block_4(ctx) { | ||
let t0; | ||
let t1_value = /*parameter*/ ctx[16].items.type + ""; | ||
let t1_value = /*parameter*/ ctx[13].items.type + ""; | ||
let t1; | ||
@@ -1230,3 +1331,3 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*parameter*/ ctx[16].items.type + "")) set_data(t1, t1_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t1_value !== (t1_value = /*parameter*/ ctx[13].items.type + "")) set_data(t1, t1_value); | ||
}, | ||
@@ -1240,3 +1341,3 @@ d(detaching) { | ||
// (131:26) {#each method[1].parameters as parameter} | ||
// (118:26) {#each method[1].parameters as parameter} | ||
function create_each_block_3(ctx) { | ||
@@ -1247,7 +1348,7 @@ let tr; | ||
let td1; | ||
let t1_value = /*parameter*/ ctx[16].in + ""; | ||
let t1_value = /*parameter*/ ctx[13].in + ""; | ||
let t1; | ||
let t2; | ||
let td2; | ||
let raw_value = /*parameter*/ ctx[16].description + ""; | ||
let raw_value = /*parameter*/ ctx[13].description + ""; | ||
let t3; | ||
@@ -1258,3 +1359,3 @@ let td3; | ||
function select_block_type_4(ctx, dirty) { | ||
if (/*parameter*/ ctx[16].required) return create_if_block_5; | ||
if (/*parameter*/ ctx[13].required) return create_if_block_5; | ||
return create_else_block_1; | ||
@@ -1267,3 +1368,3 @@ } | ||
function select_block_type_5(ctx, dirty) { | ||
if (/*parameter*/ ctx[16].type) return create_if_block_3; | ||
if (/*parameter*/ ctx[13].type) return create_if_block_3; | ||
return create_else_block; | ||
@@ -1318,4 +1419,4 @@ } | ||
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*parameter*/ ctx[16].in + "")) set_data(t1, t1_value); | ||
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*parameter*/ ctx[16].description + "")) td2.innerHTML = raw_value; | ||
if (dirty & /*swaggerLocal*/ 1 && t1_value !== (t1_value = /*parameter*/ ctx[13].in + "")) set_data(t1, t1_value); | ||
if (dirty & /*swaggerLocal*/ 1 && raw_value !== (raw_value = /*parameter*/ ctx[13].description + "")) td2.innerHTML = raw_value; | ||
if (current_block_type_1 === (current_block_type_1 = select_block_type_5(ctx)) && if_block1) { | ||
@@ -1341,3 +1442,3 @@ if_block1.p(ctx, dirty); | ||
// (164:18) {#if method[1].responses} | ||
// (151:18) {#if method[1].responses} | ||
function create_if_block_1(ctx) { | ||
@@ -1347,3 +1448,3 @@ let div; | ||
let t1; | ||
let each_value_2 = Object.entries(/*method*/ ctx[10][1].responses); | ||
let each_value_2 = Object.entries(/*method*/ ctx[7][1].responses); | ||
let each_blocks = []; | ||
@@ -1378,4 +1479,4 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*Object, swagger*/ 2) { | ||
each_value_2 = Object.entries(/*method*/ ctx[10][1].responses); | ||
if (dirty & /*Object, swaggerLocal*/ 1) { | ||
each_value_2 = Object.entries(/*method*/ ctx[7][1].responses); | ||
let i; | ||
@@ -1409,10 +1510,10 @@ | ||
// (167:22) {#each Object.entries(method[1].responses) as response} | ||
// (154:22) {#each Object.entries(method[1].responses) as response} | ||
function create_each_block_2(ctx) { | ||
let h5; | ||
let span; | ||
let t0_value = /*response*/ ctx[13][0] + ""; | ||
let t0_value = /*response*/ ctx[10][0] + ""; | ||
let t0; | ||
let t1; | ||
let t2_value = /*response*/ ctx[13][1].description + ""; | ||
let t2_value = /*response*/ ctx[10][1].description + ""; | ||
let t2; | ||
@@ -1437,4 +1538,4 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*response*/ ctx[13][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swagger*/ 2 && t2_value !== (t2_value = /*response*/ ctx[13][1].description + "")) set_data(t2, t2_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*response*/ ctx[10][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t2_value !== (t2_value = /*response*/ ctx[10][1].description + "")) set_data(t2, t2_value); | ||
}, | ||
@@ -1447,3 +1548,3 @@ d(detaching) { | ||
// (49:12) {#each Object.entries(route[1]) as method, methodIdx} | ||
// (36:12) {#each Object.entries(route[1]) as method, methodIdx} | ||
function create_each_block_1(ctx) { | ||
@@ -1454,3 +1555,3 @@ let div2; | ||
let span; | ||
let t0_value = /*method*/ ctx[10][0] + ""; | ||
let t0_value = /*method*/ ctx[7][0] + ""; | ||
let t0; | ||
@@ -1466,11 +1567,11 @@ let t1; | ||
let dispose; | ||
let if_block0 = /*method*/ ctx[10][1].summary && create_if_block_10(ctx); | ||
let if_block0 = /*method*/ ctx[7][1].summary && create_if_block_10(ctx); | ||
function click_handler(...args) { | ||
return /*click_handler*/ ctx[4](/*routeIdx*/ ctx[9], /*methodIdx*/ ctx[12], ...args); | ||
return /*click_handler*/ ctx[3](/*routeIdx*/ ctx[6], /*methodIdx*/ ctx[9], ...args); | ||
} | ||
let if_block1 = /*method*/ ctx[10][1].requestBody && /*method*/ ctx[10][1].requestBody.content && create_if_block_6(ctx); | ||
let if_block2 = /*method*/ ctx[10][1].parameters && create_if_block_2(ctx); | ||
let if_block3 = /*method*/ ctx[10][1].responses && create_if_block_1(ctx); | ||
let if_block1 = /*method*/ ctx[7][1].requestBody && /*method*/ ctx[7][1].requestBody.content && create_if_block_6(ctx); | ||
let if_block2 = /*method*/ ctx[7][1].parameters && create_if_block_2(ctx); | ||
let if_block3 = /*method*/ ctx[7][1].responses && create_if_block_1(ctx); | ||
@@ -1498,4 +1599,4 @@ return { | ||
attr(div1, "class", "swagger-method-details open"); | ||
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[9]}-${/*methodIdx*/ ctx[12]}`]); | ||
attr(div2, "class", div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[10][0]); | ||
toggle_class(div1, "open", /*active*/ ctx[1][`${/*routeIdx*/ ctx[6]}-${/*methodIdx*/ ctx[9]}`]); | ||
attr(div2, "class", div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[7][0]); | ||
}, | ||
@@ -1525,5 +1626,5 @@ m(target, anchor) { | ||
ctx = new_ctx; | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*method*/ ctx[10][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*method*/ ctx[7][0] + "")) set_data(t0, t0_value); | ||
if (/*method*/ ctx[10][1].summary) { | ||
if (/*method*/ ctx[7][1].summary) { | ||
if (if_block0) { | ||
@@ -1541,3 +1642,3 @@ if_block0.p(ctx, dirty); | ||
if (/*method*/ ctx[10][1].requestBody && /*method*/ ctx[10][1].requestBody.content) { | ||
if (/*method*/ ctx[7][1].requestBody && /*method*/ ctx[7][1].requestBody.content) { | ||
if (if_block1) { | ||
@@ -1555,3 +1656,3 @@ if_block1.p(ctx, dirty); | ||
if (/*method*/ ctx[10][1].parameters) { | ||
if (/*method*/ ctx[7][1].parameters) { | ||
if (if_block2) { | ||
@@ -1569,3 +1670,3 @@ if_block2.p(ctx, dirty); | ||
if (/*method*/ ctx[10][1].responses) { | ||
if (/*method*/ ctx[7][1].responses) { | ||
if (if_block3) { | ||
@@ -1583,7 +1684,7 @@ if_block3.p(ctx, dirty); | ||
if (dirty & /*active*/ 1) { | ||
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[9]}-${/*methodIdx*/ ctx[12]}`]); | ||
if (dirty & /*active*/ 2) { | ||
toggle_class(div1, "open", /*active*/ ctx[1][`${/*routeIdx*/ ctx[6]}-${/*methodIdx*/ ctx[9]}`]); | ||
} | ||
if (dirty & /*swagger*/ 2 && div2_class_value !== (div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[10][0])) { | ||
if (dirty & /*swaggerLocal*/ 1 && div2_class_value !== (div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[7][0])) { | ||
attr(div2, "class", div2_class_value); | ||
@@ -1604,11 +1705,11 @@ } | ||
// (46:8) {#each Object.entries(swagger.paths) as route, routeIdx} | ||
// (33:8) {#each Object.entries(swaggerLocal.paths) as route, routeIdx} | ||
function create_each_block(ctx) { | ||
let div; | ||
let h3; | ||
let t0_value = /*route*/ ctx[7][0] + ""; | ||
let t0_value = /*route*/ ctx[4][0] + ""; | ||
let t0; | ||
let t1; | ||
let t2; | ||
let each_value_1 = Object.entries(/*route*/ ctx[7][1]); | ||
let each_value_1 = Object.entries(/*route*/ ctx[4][1]); | ||
let each_blocks = []; | ||
@@ -1648,6 +1749,6 @@ | ||
p(ctx, dirty) { | ||
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*route*/ ctx[7][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*swaggerLocal*/ 1 && t0_value !== (t0_value = /*route*/ ctx[4][0] + "")) set_data(t0, t0_value); | ||
if (dirty & /*Object, swagger, active, getSchema*/ 7) { | ||
each_value_1 = Object.entries(/*route*/ ctx[7][1]); | ||
if (dirty & /*Object, swaggerLocal, active, getSchema*/ 3) { | ||
each_value_1 = Object.entries(/*route*/ ctx[4][1]); | ||
let i; | ||
@@ -1689,3 +1790,3 @@ | ||
function select_block_type(ctx, dirty) { | ||
if (/*swagger*/ ctx[1]) return create_if_block_11; | ||
if (/*swaggerLocal*/ ctx[0]) return create_if_block_12; | ||
return create_else_block_5; | ||
@@ -1696,3 +1797,3 @@ } | ||
let if_block0 = current_block_type(ctx); | ||
let if_block1 = /*swagger*/ ctx[1] && create_if_block(ctx); | ||
let if_block1 = /*swaggerLocal*/ ctx[0] && create_if_block(ctx); | ||
@@ -1731,3 +1832,3 @@ return { | ||
if (/*swagger*/ ctx[1]) { | ||
if (/*swaggerLocal*/ ctx[0]) { | ||
if (if_block1) { | ||
@@ -1758,53 +1859,11 @@ if_block1.p(ctx, dirty); | ||
function instance($$self, $$props, $$invalidate) { | ||
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
return value instanceof P | ||
? value | ||
: new P(function (resolve) { | ||
resolve(value); | ||
}); | ||
} | ||
let swaggerLocal = null; | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { | ||
try { | ||
step(generator.next(value)); | ||
} catch(e) { | ||
reject(e); | ||
} | ||
} | ||
swagger.subscribe(v => { | ||
$$invalidate(0, swaggerLocal = v); | ||
}); | ||
function rejected(value) { | ||
try { | ||
step(generator["throw"](value)); | ||
} catch(e) { | ||
reject(e); | ||
} | ||
} | ||
function step(result) { | ||
result.done | ||
? resolve(result.value) | ||
: adopt(result.value).then(fulfilled, rejected); | ||
} | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
let { swaggerUrl = "swagger-example.json" } = $$props; | ||
let active = {}; | ||
let swagger = null; | ||
const loadSwagger = swaggerUrl => __awaiter(void 0, void 0, void 0, function* () { | ||
const res = yield fetch(swaggerUrl); | ||
$$invalidate(1, swagger = yield res.json()); | ||
}); | ||
const getSchema = refName => { | ||
const division = refName.replace("#/", "").split("/"); | ||
return swagger[division[0]][division[1]][division[2]]; | ||
}; | ||
onMount(() => { | ||
@@ -1814,9 +1873,9 @@ loadSwagger(swaggerUrl); | ||
const click_handler = (routeIdx, methodIdx) => $$invalidate(0, active[`${routeIdx}-${methodIdx}`] = !active[`${routeIdx}-${methodIdx}`], active); | ||
const click_handler = (routeIdx, methodIdx) => $$invalidate(1, active[`${routeIdx}-${methodIdx}`] = !active[`${routeIdx}-${methodIdx}`], active); | ||
$$self.$$set = $$props => { | ||
if ("swaggerUrl" in $$props) $$invalidate(3, swaggerUrl = $$props.swaggerUrl); | ||
if ("swaggerUrl" in $$props) $$invalidate(2, swaggerUrl = $$props.swaggerUrl); | ||
}; | ||
return [active, swagger, getSchema, swaggerUrl, click_handler]; | ||
return [swaggerLocal, active, swaggerUrl, click_handler]; | ||
} | ||
@@ -1827,3 +1886,3 @@ | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, { swaggerUrl: 3 }); | ||
init(this, options, instance, create_fragment, safe_not_equal, { swaggerUrl: 2 }); | ||
} | ||
@@ -1830,0 +1889,0 @@ } |
@@ -12,3 +12,3 @@ { | ||
"svelte": "src/SwaggerUISvelte.svelte", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"scripts": { | ||
@@ -15,0 +15,0 @@ "build": "rollup -c", |
@@ -1,2 +0,2 @@ | ||
var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function i(t,e,n){t.insertBefore(e,n||null)}function s(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function a(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function p(){return f("")}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e,n){t.classList[n?"add":"remove"](e)}let $;function y(t){$=t}function b(t){(function(){if(!$)throw new Error("Function called outside component initialization");return $})().$$.on_mount.push(t)}const v=[],w=[],_=[],x=[],j=Promise.resolve();let O=!1;function L(t){_.push(t)}let T=!1;const k=new Set;function N(){if(!T){T=!0;do{for(let t=0;t<v.length;t+=1){const e=v[t];y(e),q(e.$$)}for(y(null),v.length=0;w.length;)w.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];k.has(e)||(k.add(e),e())}_.length=0}while(v.length);for(;x.length;)x.pop()();O=!1,T=!1,k.clear()}}function q(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const M=new Set;function B(t,e){-1===t.$$.dirty[0]&&(v.push(t),O||(O=!0,j.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(l,c,i,u,a,f,d=[-1]){const p=$;y(l);const m=c.props||{},h=l.$$={fragment:null,ctx:null,props:f,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:d,skip_bound:!1};let g=!1;if(h.ctx=i?i(l,m,(t,e,...n)=>{const r=n.length?n[0]:e;return h.ctx&&a(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),g&&B(l,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);h.fragment&&h.fragment.l(t),t.forEach(s)}else h.fragment&&h.fragment.c();c.intro&&((b=l.$$.fragment)&&b.i&&(M.delete(b),b.i(v))),function(t,n,l){const{fragment:c,on_mount:i,on_destroy:s,after_update:u}=t.$$;c&&c.m(n,l),L(()=>{const n=i.map(e).filter(o);s?s.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(L)}(l,c.target,c.anchor),N()}var b,v;y(p)}function H(t,e,n){const r=t.slice();return r[13]=e[n],r}function S(t,e,n){const r=t.slice();return r[16]=e[n],r}function U(t,e,n){const r=t.slice();return r[22]=e[n],r}function A(t,e,n){const r=t.slice();return r[22]=e[n],r}function C(t,e,n){const r=t.slice();return r[19]=e[n],r}function P(t,e,n){const r=t.slice();return r[10]=e[n],r[12]=n,r}function D(t,e,n){const r=t.slice();return r[7]=e[n],r[9]=n,r}function R(e){return{c(){document.title="Swagger UI using Svelte"},m:t,d:t}}function z(e){let n;return document.title=n=e[1].info.title,{c:t,m:t,d:t}}function F(t){let e,n,r,o,l,g,$,y,b,v,w,_,x,j,O,L,T=t[1].info.title+"",k=t[1].info.description+"",N=t[1].info.version+"",q=t[1].info.contact.name+"",M=t[1].info.contact.email+"",B=Object.entries(t[1].paths),E=[];for(let e=0;e<B.length;e+=1)E[e]=ft(D(t,B,e));return{c(){e=a("h1"),n=f(T),r=d(),o=a("h2"),l=f(k),g=f(" - "),$=f(N),y=d(),b=a("p"),v=a("a"),w=f(q),x=f(" - \n "),j=f(M),O=d();for(let t=0;t<E.length;t+=1)E[t].c();L=p(),m(e,"class","title"),m(o,"class","subtitle"),m(v,"href",_=t[1].info.contact.url),m(v,"target","_blank")},m(t,s){i(t,e,s),c(e,n),i(t,r,s),i(t,o,s),c(o,l),c(o,g),c(o,$),i(t,y,s),i(t,b,s),c(b,v),c(v,w),c(b,x),c(b,j),i(t,O,s);for(let e=0;e<E.length;e+=1)E[e].m(t,s);i(t,L,s)},p(t,e){if(2&e&&T!==(T=t[1].info.title+"")&&h(n,T),2&e&&k!==(k=t[1].info.description+"")&&h(l,k),2&e&&N!==(N=t[1].info.version+"")&&h($,N),2&e&&q!==(q=t[1].info.contact.name+"")&&h(w,q),2&e&&_!==(_=t[1].info.contact.url)&&m(v,"href",_),2&e&&M!==(M=t[1].info.contact.email+"")&&h(j,M),7&e){let n;for(B=Object.entries(t[1].paths),n=0;n<B.length;n+=1){const r=D(t,B,n);E[n]?E[n].p(r,e):(E[n]=ft(r),E[n].c(),E[n].m(L.parentNode,L))}for(;n<E.length;n+=1)E[n].d(1);E.length=B.length}},d(t){t&&s(e),t&&s(r),t&&s(o),t&&s(y),t&&s(b),t&&s(O),u(E,t),t&&s(L)}}}function I(t){let e,n=t[10][1].summary+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){2&r&&n!==(n=t[10][1].summary+"")&&h(e,n)},d(t){t&&s(e)}}}function G(t){let e,n=Object.entries(t[10][1].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=tt(C(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,o){if(6&o){let l;for(n=Object.entries(t[10][1].requestBody.content),l=0;l<n.length;l+=1){const c=C(t,n,l);r[l]?r[l].p(c,o):(r[l]=tt(c),r[l].c(),r[l].m(e.parentNode,e))}for(;l<r.length;l+=1)r[l].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function J(t){let e,n=Object.entries(t[19][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=W(U(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,o){if(2&o){let l;for(n=Object.entries(t[19][1].schema.properties),l=0;l<n.length;l+=1){const c=U(t,n,l);r[l]?r[l].p(c,o):(r[l]=W(c),r[l].c(),r[l].m(e.parentNode,e))}for(;l<r.length;l+=1)r[l].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function K(t){let e,n=Object.entries(t[2](t[19][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=Z(A(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,o){if(6&o){let l;for(n=Object.entries(t[2](t[19][1].schema.$ref).properties),l=0;l<n.length;l+=1){const c=A(t,n,l);r[l]?r[l].p(c,o):(r[l]=Z(c),r[l].c(),r[l].m(e.parentNode,e))}for(;l<r.length;l+=1)r[l].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function Q(e){let n;return{c(){n=f("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function V(t){let e,n=t[22][1].type+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){2&r&&n!==(n=t[22][1].type+"")&&h(e,n)},d(t){t&&s(e)}}}function W(t){let e,n,r,o,l,u,p,m,g,$=t[22][0]+"",y=t[22][1].description+"";function b(t,e){return t[22][1].type?V:Q}let v=b(t),w=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),o=f($),l=d(),u=a("td"),p=d(),m=a("td"),w.c(),g=d()},m(t,s){i(t,e,s),c(e,n),c(n,r),c(r,o),c(e,l),c(e,u),u.innerHTML=y,c(e,p),c(e,m),w.m(m,null),c(e,g)},p(t,e){2&e&&$!==($=t[22][0]+"")&&h(o,$),2&e&&y!==(y=t[22][1].description+"")&&(u.innerHTML=y),v===(v=b(t))&&w?w.p(t,e):(w.d(1),w=v(t),w&&(w.c(),w.m(m,null)))},d(t){t&&s(e),w.d()}}}function X(e){let n;return{c(){n=f("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function Y(t){let e,n=t[22][1].type+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){2&r&&n!==(n=t[22][1].type+"")&&h(e,n)},d(t){t&&s(e)}}}function Z(t){let e,n,r,o,l,u,p,m,g,$=t[22][0]+"",y=t[22][1].description+"";function b(t,e){return t[22][1].type?Y:X}let v=b(t),w=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),o=f($),l=d(),u=a("td"),p=d(),m=a("td"),w.c(),g=d()},m(t,s){i(t,e,s),c(e,n),c(n,r),c(r,o),c(e,l),c(e,u),u.innerHTML=y,c(e,p),c(e,m),w.m(m,null),c(e,g)},p(t,e){2&e&&$!==($=t[22][0]+"")&&h(o,$),2&e&&y!==(y=t[22][1].description+"")&&(u.innerHTML=y),v===(v=b(t))&&w?w.p(t,e):(w.d(1),w=v(t),w&&(w.c(),w.m(m,null)))},d(t){t&&s(e),w.d()}}}function tt(t){let e,n,r,o,l,u,p,g,$,y,b,v=t[19][0]+"";function w(t,e){return"$ref"in t[19][1].schema?K:J}let _=w(t),x=_(t);return{c(){e=a("div"),n=a("h4"),r=f("Request Body - "),o=f(v),l=d(),u=a("div"),p=a("table"),g=a("thead"),g.innerHTML="<tr><th>Name</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",$=d(),y=a("tbody"),x.c(),b=d(),m(n,"class","subtitle"),m(p,"class","table is-hoverable is-fullwidth"),m(u,"class","table-container"),m(e,"class","swagger-parameters")},m(t,s){i(t,e,s),c(e,n),c(n,r),c(n,o),c(e,l),c(e,u),c(u,p),c(p,g),c(p,$),c(p,y),x.m(y,null),c(e,b)},p(t,e){2&e&&v!==(v=t[19][0]+"")&&h(o,v),_===(_=w(t))&&x?x.p(t,e):(x.d(1),x=_(t),x&&(x.c(),x.m(y,null)))},d(t){t&&s(e),x.d()}}}function et(t){let e,n,r,o,l,f,p,h,g=t[10][1].parameters,$=[];for(let e=0;e<g.length;e+=1)$[e]=it(S(t,g,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=d(),o=a("div"),l=a("table"),f=a("thead"),f.innerHTML="<tr><th>Name</th> \n <th>Located in</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",p=d(),h=a("tbody");for(let t=0;t<$.length;t+=1)$[t].c();m(n,"class","subtitle"),m(l,"class","table is-hoverable"),m(o,"class","table-container"),m(e,"class","swagger-parameters")},m(t,s){i(t,e,s),c(e,n),c(e,r),c(e,o),c(o,l),c(l,f),c(l,p),c(l,h);for(let t=0;t<$.length;t+=1)$[t].m(h,null)},p(t,e){if(2&e){let n;for(g=t[10][1].parameters,n=0;n<g.length;n+=1){const r=S(t,g,n);$[n]?$[n].p(r,e):($[n]=it(r),$[n].c(),$[n].m(h,null))}for(;n<$.length;n+=1)$[n].d(1);$.length=g.length}},d(t){t&&s(e),u($,t)}}}function nt(t){let e,n,r=t[16].name+"";return{c(){e=a("span"),n=f(r)},m(t,r){i(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[16].name+"")&&h(n,r)},d(t){t&&s(e)}}}function rt(t){let e,n,r=t[16].name+"";return{c(){e=a("span"),n=f(r),m(e,"class","swagger-parameter-required")},m(t,r){i(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[16].name+"")&&h(n,r)},d(t){t&&s(e)}}}function ot(e){let n;return{c(){n=f("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function lt(t){let e,n,r,o=t[16].type+"",l=t[16].items&&ct(t);return{c(){e=f(o),n=d(),l&&l.c(),r=p()},m(t,o){i(t,e,o),i(t,n,o),l&&l.m(t,o),i(t,r,o)},p(t,n){2&n&&o!==(o=t[16].type+"")&&h(e,o),t[16].items?l?l.p(t,n):(l=ct(t),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},d(t){t&&s(e),t&&s(n),l&&l.d(t),t&&s(r)}}}function ct(t){let e,n,r=t[16].items.type+"";return{c(){e=f("of\n "),n=f(r)},m(t,r){i(t,e,r),i(t,n,r)},p(t,e){2&e&&r!==(r=t[16].items.type+"")&&h(n,r)},d(t){t&&s(e),t&&s(n)}}}function it(t){let e,n,r,o,l,u,p,m,g,$,y=t[16].in+"",b=t[16].description+"";function v(t,e){return t[16].required?rt:nt}let w=v(t),_=w(t);function x(t,e){return t[16].type?lt:ot}let j=x(t),O=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=d(),o=a("td"),l=f(y),u=d(),p=a("td"),m=d(),g=a("td"),O.c(),$=d()},m(t,s){i(t,e,s),c(e,n),_.m(n,null),c(e,r),c(e,o),c(o,l),c(e,u),c(e,p),p.innerHTML=b,c(e,m),c(e,g),O.m(g,null),c(e,$)},p(t,e){w===(w=v(t))&&_?_.p(t,e):(_.d(1),_=w(t),_&&(_.c(),_.m(n,null))),2&e&&y!==(y=t[16].in+"")&&h(l,y),2&e&&b!==(b=t[16].description+"")&&(p.innerHTML=b),j===(j=x(t))&&O?O.p(t,e):(O.d(1),O=j(t),O&&(O.c(),O.m(g,null)))},d(t){t&&s(e),_.d(),O.d()}}}function st(t){let e,n,r,o=Object.entries(t[10][1].responses),l=[];for(let e=0;e<o.length;e+=1)l[e]=ut(H(t,o,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=d();for(let t=0;t<l.length;t+=1)l[t].c();m(e,"class","swagger-response")},m(t,o){i(t,e,o),c(e,n),c(e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null)},p(t,n){if(2&n){let r;for(o=Object.entries(t[10][1].responses),r=0;r<o.length;r+=1){const c=H(t,o,r);l[r]?l[r].p(c,n):(l[r]=ut(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=o.length}},d(t){t&&s(e),u(l,t)}}}function ut(t){let e,n,r,o,l,u=t[13][0]+"",p=t[13][1].description+"";return{c(){e=a("h5"),n=a("span"),r=f(u),o=d(),l=f(p),m(n,"class","swagger-response-code")},m(t,s){i(t,e,s),c(e,n),c(n,r),c(e,o),c(e,l)},p(t,e){2&e&&u!==(u=t[13][0]+"")&&h(r,u),2&e&&p!==(p=t[13][1].description+"")&&h(l,p)},d(t){t&&s(e)}}}function at(t){let e,n,r,o,l,u,p,$,y,b,v,w,_,x,j=t[10][0]+"",O=t[10][1].summary&&I(t);function L(...e){return t[4](t[9],t[12],...e)}let T=t[10][1].requestBody&&t[10][1].requestBody.content&&G(t),k=t[10][1].parameters&&et(t),N=t[10][1].responses&&st(t);return{c(){e=a("div"),n=a("div"),r=a("a"),o=a("span"),l=f(j),u=d(),O&&O.c(),$=d(),y=a("div"),T&&T.c(),b=d(),k&&k.c(),v=d(),N&&N.c(),m(o,"class","swagger-method-name"),m(r,"class","swagger-method-link"),m(r,"href",p=null),m(n,"class","swagger-method-title"),m(y,"class","swagger-method-details open"),g(y,"open",t[0][`${t[9]}-${t[12]}`]),m(e,"class",w="swagger-method swagger-method-"+t[10][0])},m(t,s){var a,f,d,p;i(t,e,s),c(e,n),c(n,r),c(r,o),c(o,l),c(r,u),O&&O.m(r,null),c(e,$),c(e,y),T&&T.m(y,null),c(y,b),k&&k.m(y,null),c(y,v),N&&N.m(y,null),_||(f="click",d=L,(a=n).addEventListener(f,d,p),x=()=>a.removeEventListener(f,d,p),_=!0)},p(n,o){t=n,2&o&&j!==(j=t[10][0]+"")&&h(l,j),t[10][1].summary?O?O.p(t,o):(O=I(t),O.c(),O.m(r,null)):O&&(O.d(1),O=null),t[10][1].requestBody&&t[10][1].requestBody.content?T?T.p(t,o):(T=G(t),T.c(),T.m(y,b)):T&&(T.d(1),T=null),t[10][1].parameters?k?k.p(t,o):(k=et(t),k.c(),k.m(y,v)):k&&(k.d(1),k=null),t[10][1].responses?N?N.p(t,o):(N=st(t),N.c(),N.m(y,null)):N&&(N.d(1),N=null),1&o&&g(y,"open",t[0][`${t[9]}-${t[12]}`]),2&o&&w!==(w="swagger-method swagger-method-"+t[10][0])&&m(e,"class",w)},d(t){t&&s(e),O&&O.d(),T&&T.d(),k&&k.d(),N&&N.d(),_=!1,x()}}}function ft(t){let e,n,r,o,l,p=t[7][0]+"",g=Object.entries(t[7][1]),$=[];for(let e=0;e<g.length;e+=1)$[e]=at(P(t,g,e));return{c(){e=a("div"),n=a("h3"),r=f(p),o=d();for(let t=0;t<$.length;t+=1)$[t].c();l=d(),m(n,"class","title is-small is-3"),m(e,"class","swagger-paths is-small")},m(t,s){i(t,e,s),c(e,n),c(n,r),c(e,o);for(let t=0;t<$.length;t+=1)$[t].m(e,null);c(e,l)},p(t,n){if(2&n&&p!==(p=t[7][0]+"")&&h(r,p),7&n){let r;for(g=Object.entries(t[7][1]),r=0;r<g.length;r+=1){const o=P(t,g,r);$[r]?$[r].p(o,n):($[r]=at(o),$[r].c(),$[r].m(e,l))}for(;r<$.length;r+=1)$[r].d(1);$.length=g.length}},d(t){t&&s(e),u($,t)}}}function dt(e){let n,r,o,l,u;function f(t,e){return t[1]?z:R}let h=f(e),g=h(e),$=e[1]&&F(e);return{c(){g.c(),n=p(),r=d(),o=a("main"),l=a("section"),u=a("div"),$&&$.c(),m(u,"class","container"),m(l,"class","section")},m(t,e){g.m(document.head,null),c(document.head,n),i(t,r,e),i(t,o,e),c(o,l),c(l,u),$&&$.m(u,null)},p(t,[e]){h!==(h=f(t))&&(g.d(1),g=h(t),g&&(g.c(),g.m(n.parentNode,n))),t[1]?$?$.p(t,e):($=F(t),$.c(),$.m(u,null)):$&&($.d(1),$=null)},i:t,o:t,d(t){g.d(t),s(n),t&&s(r),t&&s(o),$&&$.d()}}}function pt(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,l){function c(t){try{s(r.next(t))}catch(t){l(t)}}function i(t){try{s(r.throw(t))}catch(t){l(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,i)}s((r=r.apply(t,e||[])).next())}))};let{swaggerUrl:o="swagger-example.json"}=e,l={},c=null;b(()=>{(t=>{r(void 0,void 0,void 0,(function*(){const e=yield fetch(t);n(1,c=yield e.json())}))})(o)});return t.$$set=t=>{"swaggerUrl"in t&&n(3,o=t.swaggerUrl)},[l,c,t=>{const e=t.replace("#/","").split("/");return c[e[0]][e[1]][e[2]]},o,(t,e)=>n(0,l[`${t}-${e}`]=!l[`${t}-${e}`],l)]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),E(this,t,pt,dt,l,{swaggerUrl:3})}}({target:document.body})}(); | ||
var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function l(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function i(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function a(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function p(){return f("")}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e,n){t.classList[n?"add":"remove"](e)}let b;function $(t){b=t}function y(t){(function(){if(!b)throw new Error("Function called outside component initialization");return b})().$$.on_mount.push(t)}const w=[],v=[],_=[],x=[],j=Promise.resolve();let O=!1;function L(t){_.push(t)}let T=!1;const k=new Set;function N(){if(!T){T=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];$(e),q(e.$$)}for($(null),w.length=0;v.length;)v.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];k.has(e)||(k.add(e),e())}_.length=0}while(w.length);for(;x.length;)x.pop()();O=!1,T=!1,k.clear()}}function q(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const M=new Set;function B(t,e){-1===t.$$.dirty[0]&&(w.push(t),O||(O=!0,j.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(o,c,s,u,a,f,d=[-1]){const p=b;$(o);const m=c.props||{},h=o.$$={fragment:null,ctx:null,props:f,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:d,skip_bound:!1};let g=!1;if(h.ctx=s?s(o,m,(t,e,...n)=>{const r=n.length?n[0]:e;return h.ctx&&a(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),g&&B(o,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);h.fragment&&h.fragment.l(t),t.forEach(i)}else h.fragment&&h.fragment.c();c.intro&&((y=o.$$.fragment)&&y.i&&(M.delete(y),y.i(w))),function(t,n,o){const{fragment:c,on_mount:s,on_destroy:i,after_update:u}=t.$$;c&&c.m(n,o),L(()=>{const n=s.map(e).filter(l);i?i.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(L)}(o,c.target,c.anchor),N()}var y,w;$(p)}const H=[];const S=function(e,n=t){let r;const l=[];function c(t){if(o(e,t)&&(e=t,r)){const t=!H.length;for(let t=0;t<l.length;t+=1){const n=l[t];n[1](),H.push(n,e)}if(t){for(let t=0;t<H.length;t+=2)H[t][0](H[t+1]);H.length=0}}}return{set:c,update:function(t){c(t(e))},subscribe:function(o,s=t){const i=[o,s];return l.push(i),1===l.length&&(r=n(c)||t),o(e),()=>{const t=l.indexOf(i);-1!==t&&l.splice(t,1),0===l.length&&(r(),r=null)}}}}(null);let U=null;S.subscribe(t=>{U=t});const A=async t=>{const e=await fetch(t);U=await e.json(),S.set(U)},C=t=>{const e=t.replace("#/","").split("/");return U[e[0]][e[1]][e[2]]};function D(t,e,n){const r=t.slice();return r[10]=e[n],r}function P(t,e,n){const r=t.slice();return r[13]=e[n],r}function R(t,e,n){const r=t.slice();return r[19]=e[n],r}function z(t,e,n){const r=t.slice();return r[19]=e[n],r}function F(t,e,n){const r=t.slice();return r[16]=e[n],r}function I(t,e,n){const r=t.slice();return r[7]=e[n],r[9]=n,r}function G(t,e,n){const r=t.slice();return r[4]=e[n],r[6]=n,r}function J(e){return{c(){document.title="Swagger UI using Svelte"},m:t,d:t}}function K(e){let n;return document.title=n=e[0].info.title,{c:t,m:t,d:t}}function Q(t){let e,n,r,l,o,g,b,$,y,w,v,_=t[0].info.title+"",x=t[0].info.description+"",j=t[0].info.version+"",O=t[0].info.contact&&V(t),L=Object.entries(t[0].paths),T=[];for(let e=0;e<L.length;e+=1)T[e]=bt(G(t,L,e));return{c(){e=a("h1"),n=f(_),r=d(),l=a("h2"),o=f(x),g=f(" - "),b=f(j),$=d(),y=a("p"),O&&O.c(),w=d();for(let t=0;t<T.length;t+=1)T[t].c();v=p(),m(e,"class","title"),m(l,"class","subtitle")},m(t,i){s(t,e,i),c(e,n),s(t,r,i),s(t,l,i),c(l,o),c(l,g),c(l,b),s(t,$,i),s(t,y,i),O&&O.m(y,null),s(t,w,i);for(let e=0;e<T.length;e+=1)T[e].m(t,i);s(t,v,i)},p(t,e){if(1&e&&_!==(_=t[0].info.title+"")&&h(n,_),1&e&&x!==(x=t[0].info.description+"")&&h(o,x),1&e&&j!==(j=t[0].info.version+"")&&h(b,j),t[0].info.contact?O?O.p(t,e):(O=V(t),O.c(),O.m(y,null)):O&&(O.d(1),O=null),3&e){let n;for(L=Object.entries(t[0].paths),n=0;n<L.length;n+=1){const r=G(t,L,n);T[n]?T[n].p(r,e):(T[n]=bt(r),T[n].c(),T[n].m(v.parentNode,v))}for(;n<T.length;n+=1)T[n].d(1);T.length=L.length}},d(t){t&&i(e),t&&i(r),t&&i(l),t&&i($),t&&i(y),O&&O.d(),t&&i(w),u(T,t),t&&i(v)}}}function V(t){let e,n,r,l,o,u=t[0].info.contact.name+"",d=t[0].info.contact.email+"";return{c(){e=a("a"),n=f(u),l=f(" - \n "),o=f(d),m(e,"href",r=t[0].info.contact.url),m(e,"target","_blank")},m(t,r){s(t,e,r),c(e,n),s(t,l,r),s(t,o,r)},p(t,l){1&l&&u!==(u=t[0].info.contact.name+"")&&h(n,u),1&l&&r!==(r=t[0].info.contact.url)&&m(e,"href",r),1&l&&d!==(d=t[0].info.contact.email+"")&&h(o,d)},d(t){t&&i(e),t&&i(l),t&&i(o)}}}function W(t){let e,n=t[7][1].summary+"";return{c(){e=f(n)},m(t,n){s(t,e,n)},p(t,r){1&r&&n!==(n=t[7][1].summary+"")&&h(e,n)},d(t){t&&i(e)}}}function X(t){let e,n=Object.entries(t[7][1].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=ct(F(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);s(t,e,n)},p(t,l){if(1&l){let o;for(n=Object.entries(t[7][1].requestBody.content),o=0;o<n.length;o+=1){const c=F(t,n,o);r[o]?r[o].p(c,l):(r[o]=ct(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&i(e)}}}function Y(t){let e,n=Object.entries(t[16][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=nt(R(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);s(t,e,n)},p(t,l){if(1&l){let o;for(n=Object.entries(t[16][1].schema.properties),o=0;o<n.length;o+=1){const c=R(t,n,o);r[o]?r[o].p(c,l):(r[o]=nt(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&i(e)}}}function Z(t){let e,n=Object.entries(C(t[16][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=ot(z(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);s(t,e,n)},p(t,l){if(1&l){let o;for(n=Object.entries(C(t[16][1].schema.$ref).properties),o=0;o<n.length;o+=1){const c=z(t,n,o);r[o]?r[o].p(c,l):(r[o]=ot(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&i(e)}}}function tt(e){let n;return{c(){n=f("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function et(t){let e,n=t[19][1].type+"";return{c(){e=f(n)},m(t,n){s(t,e,n)},p(t,r){1&r&&n!==(n=t[19][1].type+"")&&h(e,n)},d(t){t&&i(e)}}}function nt(t){let e,n,r,l,o,u,p,m,g,b=t[19][0]+"",$=t[19][1].description+"";function y(t,e){return t[19][1].type?et:tt}let w=y(t),v=w(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=f(b),o=d(),u=a("td"),p=d(),m=a("td"),v.c(),g=d()},m(t,i){s(t,e,i),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=$,c(e,p),c(e,m),v.m(m,null),c(e,g)},p(t,e){1&e&&b!==(b=t[19][0]+"")&&h(l,b),1&e&&$!==($=t[19][1].description+"")&&(u.innerHTML=$),w===(w=y(t))&&v?v.p(t,e):(v.d(1),v=w(t),v&&(v.c(),v.m(m,null)))},d(t){t&&i(e),v.d()}}}function rt(e){let n;return{c(){n=f("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function lt(t){let e,n=t[19][1].type+"";return{c(){e=f(n)},m(t,n){s(t,e,n)},p(t,r){1&r&&n!==(n=t[19][1].type+"")&&h(e,n)},d(t){t&&i(e)}}}function ot(t){let e,n,r,l,o,u,p,m,g,b=t[19][0]+"",$=t[19][1].description+"";function y(t,e){return t[19][1].type?lt:rt}let w=y(t),v=w(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=f(b),o=d(),u=a("td"),p=d(),m=a("td"),v.c(),g=d()},m(t,i){s(t,e,i),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=$,c(e,p),c(e,m),v.m(m,null),c(e,g)},p(t,e){1&e&&b!==(b=t[19][0]+"")&&h(l,b),1&e&&$!==($=t[19][1].description+"")&&(u.innerHTML=$),w===(w=y(t))&&v?v.p(t,e):(v.d(1),v=w(t),v&&(v.c(),v.m(m,null)))},d(t){t&&i(e),v.d()}}}function ct(t){let e,n,r,l,o,u,p,g,b,$,y,w=t[16][0]+"";function v(t,e){return"$ref"in t[16][1].schema?Z:Y}let _=v(t),x=_(t);return{c(){e=a("div"),n=a("h4"),r=f("Request Body - "),l=f(w),o=d(),u=a("div"),p=a("table"),g=a("thead"),g.innerHTML="<tr><th>Name</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",b=d(),$=a("tbody"),x.c(),y=d(),m(n,"class","subtitle"),m(p,"class","table is-hoverable is-fullwidth"),m(u,"class","table-container"),m(e,"class","swagger-parameters")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(n,l),c(e,o),c(e,u),c(u,p),c(p,g),c(p,b),c(p,$),x.m($,null),c(e,y)},p(t,e){1&e&&w!==(w=t[16][0]+"")&&h(l,w),_===(_=v(t))&&x?x.p(t,e):(x.d(1),x=_(t),x&&(x.c(),x.m($,null)))},d(t){t&&i(e),x.d()}}}function st(t){let e,n,r,l,o,f,p,h,g=t[7][1].parameters,b=[];for(let e=0;e<g.length;e+=1)b[e]=pt(P(t,g,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=d(),l=a("div"),o=a("table"),f=a("thead"),f.innerHTML="<tr><th>Name</th> \n <th>Located in</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",p=d(),h=a("tbody");for(let t=0;t<b.length;t+=1)b[t].c();m(n,"class","subtitle"),m(o,"class","table is-hoverable"),m(l,"class","table-container"),m(e,"class","swagger-parameters")},m(t,i){s(t,e,i),c(e,n),c(e,r),c(e,l),c(l,o),c(o,f),c(o,p),c(o,h);for(let t=0;t<b.length;t+=1)b[t].m(h,null)},p(t,e){if(1&e){let n;for(g=t[7][1].parameters,n=0;n<g.length;n+=1){const r=P(t,g,n);b[n]?b[n].p(r,e):(b[n]=pt(r),b[n].c(),b[n].m(h,null))}for(;n<b.length;n+=1)b[n].d(1);b.length=g.length}},d(t){t&&i(e),u(b,t)}}}function it(t){let e,n,r=t[13].name+"";return{c(){e=a("span"),n=f(r)},m(t,r){s(t,e,r),c(e,n)},p(t,e){1&e&&r!==(r=t[13].name+"")&&h(n,r)},d(t){t&&i(e)}}}function ut(t){let e,n,r=t[13].name+"";return{c(){e=a("span"),n=f(r),m(e,"class","swagger-parameter-required")},m(t,r){s(t,e,r),c(e,n)},p(t,e){1&e&&r!==(r=t[13].name+"")&&h(n,r)},d(t){t&&i(e)}}}function at(e){let n;return{c(){n=f("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function ft(t){let e,n,r,l=t[13].type+"",o=t[13].items&&dt(t);return{c(){e=f(l),n=d(),o&&o.c(),r=p()},m(t,l){s(t,e,l),s(t,n,l),o&&o.m(t,l),s(t,r,l)},p(t,n){1&n&&l!==(l=t[13].type+"")&&h(e,l),t[13].items?o?o.p(t,n):(o=dt(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(t){t&&i(e),t&&i(n),o&&o.d(t),t&&i(r)}}}function dt(t){let e,n,r=t[13].items.type+"";return{c(){e=f("of\n "),n=f(r)},m(t,r){s(t,e,r),s(t,n,r)},p(t,e){1&e&&r!==(r=t[13].items.type+"")&&h(n,r)},d(t){t&&i(e),t&&i(n)}}}function pt(t){let e,n,r,l,o,u,p,m,g,b,$=t[13].in+"",y=t[13].description+"";function w(t,e){return t[13].required?ut:it}let v=w(t),_=v(t);function x(t,e){return t[13].type?ft:at}let j=x(t),O=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=d(),l=a("td"),o=f($),u=d(),p=a("td"),m=d(),g=a("td"),O.c(),b=d()},m(t,i){s(t,e,i),c(e,n),_.m(n,null),c(e,r),c(e,l),c(l,o),c(e,u),c(e,p),p.innerHTML=y,c(e,m),c(e,g),O.m(g,null),c(e,b)},p(t,e){v===(v=w(t))&&_?_.p(t,e):(_.d(1),_=v(t),_&&(_.c(),_.m(n,null))),1&e&&$!==($=t[13].in+"")&&h(o,$),1&e&&y!==(y=t[13].description+"")&&(p.innerHTML=y),j===(j=x(t))&&O?O.p(t,e):(O.d(1),O=j(t),O&&(O.c(),O.m(g,null)))},d(t){t&&i(e),_.d(),O.d()}}}function mt(t){let e,n,r,l=Object.entries(t[7][1].responses),o=[];for(let e=0;e<l.length;e+=1)o[e]=ht(D(t,l,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=d();for(let t=0;t<o.length;t+=1)o[t].c();m(e,"class","swagger-response")},m(t,l){s(t,e,l),c(e,n),c(e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,n){if(1&n){let r;for(l=Object.entries(t[7][1].responses),r=0;r<l.length;r+=1){const c=D(t,l,r);o[r]?o[r].p(c,n):(o[r]=ht(c),o[r].c(),o[r].m(e,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=l.length}},d(t){t&&i(e),u(o,t)}}}function ht(t){let e,n,r,l,o,u=t[10][0]+"",p=t[10][1].description+"";return{c(){e=a("h5"),n=a("span"),r=f(u),l=d(),o=f(p),m(n,"class","swagger-response-code")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(e,l),c(e,o)},p(t,e){1&e&&u!==(u=t[10][0]+"")&&h(r,u),1&e&&p!==(p=t[10][1].description+"")&&h(o,p)},d(t){t&&i(e)}}}function gt(t){let e,n,r,l,o,u,p,b,$,y,w,v,_,x,j=t[7][0]+"",O=t[7][1].summary&&W(t);function L(...e){return t[3](t[6],t[9],...e)}let T=t[7][1].requestBody&&t[7][1].requestBody.content&&X(t),k=t[7][1].parameters&&st(t),N=t[7][1].responses&&mt(t);return{c(){e=a("div"),n=a("div"),r=a("a"),l=a("span"),o=f(j),u=d(),O&&O.c(),b=d(),$=a("div"),T&&T.c(),y=d(),k&&k.c(),w=d(),N&&N.c(),m(l,"class","swagger-method-name"),m(r,"class","swagger-method-link"),m(r,"href",p=null),m(n,"class","swagger-method-title"),m($,"class","swagger-method-details open"),g($,"open",t[1][`${t[6]}-${t[9]}`]),m(e,"class",v="swagger-method swagger-method-"+t[7][0])},m(t,i){var a,f,d,p;s(t,e,i),c(e,n),c(n,r),c(r,l),c(l,o),c(r,u),O&&O.m(r,null),c(e,b),c(e,$),T&&T.m($,null),c($,y),k&&k.m($,null),c($,w),N&&N.m($,null),_||(f="click",d=L,(a=n).addEventListener(f,d,p),x=()=>a.removeEventListener(f,d,p),_=!0)},p(n,l){t=n,1&l&&j!==(j=t[7][0]+"")&&h(o,j),t[7][1].summary?O?O.p(t,l):(O=W(t),O.c(),O.m(r,null)):O&&(O.d(1),O=null),t[7][1].requestBody&&t[7][1].requestBody.content?T?T.p(t,l):(T=X(t),T.c(),T.m($,y)):T&&(T.d(1),T=null),t[7][1].parameters?k?k.p(t,l):(k=st(t),k.c(),k.m($,w)):k&&(k.d(1),k=null),t[7][1].responses?N?N.p(t,l):(N=mt(t),N.c(),N.m($,null)):N&&(N.d(1),N=null),2&l&&g($,"open",t[1][`${t[6]}-${t[9]}`]),1&l&&v!==(v="swagger-method swagger-method-"+t[7][0])&&m(e,"class",v)},d(t){t&&i(e),O&&O.d(),T&&T.d(),k&&k.d(),N&&N.d(),_=!1,x()}}}function bt(t){let e,n,r,l,o,p=t[4][0]+"",g=Object.entries(t[4][1]),b=[];for(let e=0;e<g.length;e+=1)b[e]=gt(I(t,g,e));return{c(){e=a("div"),n=a("h3"),r=f(p),l=d();for(let t=0;t<b.length;t+=1)b[t].c();o=d(),m(n,"class","title is-small is-3"),m(e,"class","swagger-paths is-small")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(e,l);for(let t=0;t<b.length;t+=1)b[t].m(e,null);c(e,o)},p(t,n){if(1&n&&p!==(p=t[4][0]+"")&&h(r,p),3&n){let r;for(g=Object.entries(t[4][1]),r=0;r<g.length;r+=1){const l=I(t,g,r);b[r]?b[r].p(l,n):(b[r]=gt(l),b[r].c(),b[r].m(e,o))}for(;r<b.length;r+=1)b[r].d(1);b.length=g.length}},d(t){t&&i(e),u(b,t)}}}function $t(e){let n,r,l,o,u;function f(t,e){return t[0]?K:J}let h=f(e),g=h(e),b=e[0]&&Q(e);return{c(){g.c(),n=p(),r=d(),l=a("main"),o=a("section"),u=a("div"),b&&b.c(),m(u,"class","container"),m(o,"class","section")},m(t,e){g.m(document.head,null),c(document.head,n),s(t,r,e),s(t,l,e),c(l,o),c(o,u),b&&b.m(u,null)},p(t,[e]){h!==(h=f(t))&&(g.d(1),g=h(t),g&&(g.c(),g.m(n.parentNode,n))),t[0]?b?b.p(t,e):(b=Q(t),b.c(),b.m(u,null)):b&&(b.d(1),b=null)},i:t,o:t,d(t){g.d(t),i(n),t&&i(r),t&&i(l),b&&b.d()}}}function yt(t,e,n){let r=null;S.subscribe(t=>{n(0,r=t)});let{swaggerUrl:l="swagger-example.json"}=e,o={};y(()=>{A(l)});return t.$$set=t=>{"swaggerUrl"in t&&n(2,l=t.swaggerUrl)},[r,o,l,(t,e)=>n(1,o[`${t}-${e}`]=!o[`${t}-${e}`],o)]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),E(this,t,yt,$t,o,{swaggerUrl:2})}}({target:document.body})}(); | ||
//# sourceMappingURL=bundle.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
217949
3.85%17
13.33%3045
2.87%