🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

swagger-ui-svelte

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-ui-svelte - npm Package Compare versions

Comparing version

to
0.0.5

@@ -324,3 +324,21 @@ (function (global, factory) {

// (23:6) {#if swagger}
// (23:2) {:else}
function create_else_block_5(ctx) {
return {
c() {
document.title = "Swagger UI using Svelte";
},
m: noop,
d: noop
};
}
// (21:2) {#if swagger}
function create_if_block_11(ctx) {
let title_value;
document.title = title_value = /*swagger*/ ctx[1].info.title;
return { c: noop, m: noop, d: noop };
}
// (31:6) {#if swagger}
function create_if_block(ctx) {

@@ -331,2 +349,18 @@ let h1;

let t1;
let h2;
let t2_value = /*swagger*/ ctx[1].info.description + "";
let t2;
let t3;
let t4_value = /*swagger*/ ctx[1].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;

@@ -345,2 +379,13 @@ let each_value = Object.entries(/*swagger*/ ctx[1].paths);

t1 = space();
h2 = element("h2");
t2 = text(t2_value);
t3 = text(" - ");
t4 = text(t4_value);
t5 = space();
p = element("p");
a = element("a");
t6 = text(t6_value);
t7 = text(" - \n ");
t8 = text(t8_value);
t9 = space();

@@ -353,2 +398,5 @@ for (let i = 0; i < each_blocks.length; i += 1) {

attr(h1, "class", "title");
attr(h2, "class", "subtitle");
attr(a, "href", a_href_value = /*swagger*/ ctx[1].info.contact.url);
attr(a, "target", "_blank");
},

@@ -359,2 +407,13 @@ m(target, anchor) {

insert(target, t1, anchor);
insert(target, h2, anchor);
append(h2, t2);
append(h2, t3);
append(h2, t4);
insert(target, t5, anchor);
insert(target, p, anchor);
append(p, a);
append(a, t6);
append(p, t7);
append(p, t8);
insert(target, t9, anchor);

@@ -369,3 +428,12 @@ for (let i = 0; i < each_blocks.length; i += 1) {

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 & /*swagger*/ 2 && a_href_value !== (a_href_value = /*swagger*/ ctx[1].info.contact.url)) {
attr(a, "href", a_href_value);
}
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) {

@@ -397,2 +465,6 @@ each_value = Object.entries(/*swagger*/ ctx[1].paths);

if (detaching) detach(t1);
if (detaching) detach(h2);
if (detaching) detach(t5);
if (detaching) detach(p);
if (detaching) detach(t9);
destroy_each(each_blocks, detaching);

@@ -404,3 +476,3 @@ if (detaching) detach(each_1_anchor);

// (33:20) {#if method[1].summary}
// (46:20) {#if method[1].summary}
function create_if_block_10(ctx) {

@@ -426,3 +498,3 @@ let t_value = /*method*/ ctx[8][1].summary + "";

// (39:18) {#if method[1].requestBody && method[1].requestBody.content}
// (52:18) {#if method[1].requestBody && method[1].requestBody.content}
function create_if_block_6(ctx) {

@@ -483,3 +555,3 @@ let each_1_anchor;

// (71:26) {:else}
// (84:26) {:else}
function create_else_block_3(ctx) {

@@ -540,3 +612,3 @@ let each_1_anchor;

// (53:26) {#if '$ref' in requestBody[1]["schema"]}
// (66:26) {#if '$ref' in requestBody[1]["schema"]}
function create_if_block_7(ctx) {

@@ -597,3 +669,3 @@ let each_1_anchor;

// (83:32) {:else}
// (96:32) {:else}
function create_else_block_4(ctx) {

@@ -616,3 +688,3 @@ let t;

// (81:32) {#if property[1].type}
// (94:32) {#if property[1].type}
function create_if_block_9(ctx) {

@@ -638,3 +710,3 @@ let t_value = /*property*/ ctx[20][1].type + "";

// (72:26) {#each Object.entries(requestBody[1]["schema"]["properties"]) as property}
// (85:26) {#each Object.entries(requestBody[1]["schema"]["properties"]) as property}
function create_each_block_6(ctx) {

@@ -653,3 +725,3 @@ let tr;

function select_block_type_2(ctx, dirty) {
function select_block_type_3(ctx, dirty) {
if (/*property*/ ctx[20][1].type) return create_if_block_9;

@@ -659,3 +731,3 @@ return create_else_block_4;

let current_block_type = select_block_type_2(ctx);
let current_block_type = select_block_type_3(ctx);
let if_block = current_block_type(ctx);

@@ -692,3 +764,3 @@

if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*property*/ ctx[20][1].description + "")) td1.innerHTML = raw_value;
if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block) {
if (current_block_type === (current_block_type = select_block_type_3(ctx)) && if_block) {
if_block.p(ctx, dirty);

@@ -712,3 +784,3 @@ } else {

// (65:32) {:else}
// (78:32) {:else}
function create_else_block_2(ctx) {

@@ -731,3 +803,3 @@ let t;

// (63:32) {#if property[1].type}
// (76:32) {#if property[1].type}
function create_if_block_8(ctx) {

@@ -753,3 +825,3 @@ let t_value = /*property*/ ctx[20][1].type + "";

// (54:28) {#each Object.entries(getSchema(requestBody[1]["schema"]["$ref"]).properties) as property}
// (67:28) {#each Object.entries(getSchema(requestBody[1]["schema"]["$ref"]).properties) as property}
function create_each_block_5(ctx) {

@@ -768,3 +840,3 @@ let tr;

function select_block_type_1(ctx, dirty) {
function select_block_type_2(ctx, dirty) {
if (/*property*/ ctx[20][1].type) return create_if_block_8;

@@ -774,3 +846,3 @@ return create_else_block_2;

let current_block_type = select_block_type_1(ctx);
let current_block_type = select_block_type_2(ctx);
let if_block = current_block_type(ctx);

@@ -807,3 +879,3 @@

if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*property*/ ctx[20][1].description + "")) td1.innerHTML = raw_value;
if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) {
if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block) {
if_block.p(ctx, dirty);

@@ -827,3 +899,3 @@ } else {

// (40:18) {#each Object.entries(method[1].requestBody.content) as requestBody }
// (53:18) {#each Object.entries(method[1].requestBody.content) as requestBody }
function create_each_block_4(ctx) {

@@ -843,3 +915,3 @@ let div1;

function select_block_type(ctx, dirty) {
function select_block_type_1(ctx, dirty) {
if ("$ref" in /*requestBody*/ ctx[17][1]["schema"]) return create_if_block_7;

@@ -849,3 +921,3 @@ return create_else_block_3;

let current_block_type = select_block_type(ctx);
let current_block_type = select_block_type_1(ctx);
let if_block = current_block_type(ctx);

@@ -895,3 +967,3 @@

if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) {
if_block.p(ctx, dirty);

@@ -915,3 +987,3 @@ } else {

// (96:18) {#if method[1].parameters}
// (109:18) {#if method[1].parameters}
function create_if_block_2(ctx) {

@@ -1006,3 +1078,3 @@ let div1;

// (117:32) {:else}
// (130:32) {:else}
function create_else_block_1(ctx) {

@@ -1031,3 +1103,3 @@ let span;

// (113:32) {#if parameter.required}
// (126:32) {#if parameter.required}
function create_if_block_5(ctx) {

@@ -1057,3 +1129,3 @@ let span;

// (132:32) {:else}
// (145:32) {:else}
function create_else_block(ctx) {

@@ -1076,3 +1148,3 @@ let t;

// (126:32) {#if parameter.type}
// (139:32) {#if parameter.type}
function create_if_block_3(ctx) {

@@ -1123,3 +1195,3 @@ let t0_value = /*parameter*/ ctx[14].type + "";

// (128:34) {#if parameter.items }
// (141:34) {#if parameter.items }
function create_if_block_4(ctx) {

@@ -1149,3 +1221,3 @@ let t0;

// (110:26) {#each method[1].parameters as parameter}
// (123:26) {#each method[1].parameters as parameter}
function create_each_block_3(ctx) {

@@ -1165,3 +1237,3 @@ let tr;

function select_block_type_3(ctx, dirty) {
function select_block_type_4(ctx, dirty) {
if (/*parameter*/ ctx[14].required) return create_if_block_5;

@@ -1171,6 +1243,6 @@ return create_else_block_1;

let current_block_type = select_block_type_3(ctx);
let current_block_type = select_block_type_4(ctx);
let if_block0 = current_block_type(ctx);
function select_block_type_4(ctx, dirty) {
function select_block_type_5(ctx, dirty) {
if (/*parameter*/ ctx[14].type) return create_if_block_3;

@@ -1180,3 +1252,3 @@ return create_else_block;

let current_block_type_1 = select_block_type_4(ctx);
let current_block_type_1 = select_block_type_5(ctx);
let if_block1 = current_block_type_1(ctx);

@@ -1215,3 +1287,3 @@

p(ctx, dirty) {
if (current_block_type === (current_block_type = select_block_type_3(ctx)) && if_block0) {
if (current_block_type === (current_block_type = select_block_type_4(ctx)) && if_block0) {
if_block0.p(ctx, dirty);

@@ -1230,3 +1302,3 @@ } else {

if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*parameter*/ ctx[14].description + "")) td2.innerHTML = raw_value;
if (current_block_type_1 === (current_block_type_1 = select_block_type_4(ctx)) && if_block1) {
if (current_block_type_1 === (current_block_type_1 = select_block_type_5(ctx)) && if_block1) {
if_block1.p(ctx, dirty);

@@ -1251,3 +1323,3 @@ } else {

// (143:18) {#if method[1].responses}
// (156:18) {#if method[1].responses}
function create_if_block_1(ctx) {

@@ -1317,3 +1389,3 @@ let div;

// (146:22) {#each Object.entries(method[1].responses) as response}
// (159:22) {#each Object.entries(method[1].responses) as response}
function create_each_block_2(ctx) {

@@ -1354,3 +1426,3 @@ let h5;

// (28:12) {#each Object.entries(route[1]) as method, methodIdx}
// (41:12) {#each Object.entries(route[1]) as method, methodIdx}
function create_each_block_1(ctx) {

@@ -1375,3 +1447,3 @@ let div2;

function click_handler(...args) {
return /*click_handler*/ ctx[4](/*routeIdx*/ ctx[7], ...args);
return /*click_handler*/ ctx[4](/*routeIdx*/ ctx[7], /*methodIdx*/ ctx[10], ...args);
}

@@ -1404,3 +1476,3 @@

attr(div1, "class", "swagger-method-details open");
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[7]}`]);
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[7]}-${/*methodIdx*/ ctx[10]}`]);
attr(div2, "class", div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[8][0]);

@@ -1486,3 +1558,3 @@ },

if (dirty & /*active*/ 1) {
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[7]}`]);
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[7]}-${/*methodIdx*/ ctx[10]}`]);
}

@@ -1506,3 +1578,3 @@

// (25:8) {#each Object.entries(swagger.paths) as route, routeIdx}
// (38:8) {#each Object.entries(swagger.paths) as route, routeIdx}
function create_each_block(ctx) {

@@ -1583,13 +1655,26 @@ let div;

function create_fragment(ctx) {
let if_block0_anchor;
let t;
let main;
let section;
let div;
let if_block = /*swagger*/ ctx[1] && create_if_block(ctx);
function select_block_type(ctx, dirty) {
if (/*swagger*/ ctx[1]) return create_if_block_11;
return create_else_block_5;
}
let current_block_type = select_block_type(ctx);
let if_block0 = current_block_type(ctx);
let if_block1 = /*swagger*/ ctx[1] && create_if_block(ctx);
return {
c() {
if_block0.c();
if_block0_anchor = empty();
t = space();
main = element("main");
section = element("section");
div = element("div");
if (if_block) if_block.c();
if (if_block1) if_block1.c();
attr(div, "class", "container");

@@ -1599,19 +1684,32 @@ attr(section, "class", "section");

m(target, anchor) {
if_block0.m(document.head, null);
append(document.head, if_block0_anchor);
insert(target, t, anchor);
insert(target, main, anchor);
append(main, section);
append(section, div);
if (if_block) if_block.m(div, null);
if (if_block1) if_block1.m(div, null);
},
p(ctx, [dirty]) {
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
if_block0.d(1);
if_block0 = current_block_type(ctx);
if (if_block0) {
if_block0.c();
if_block0.m(if_block0_anchor.parentNode, if_block0_anchor);
}
}
if (/*swagger*/ ctx[1]) {
if (if_block) {
if_block.p(ctx, dirty);
if (if_block1) {
if_block1.p(ctx, dirty);
} else {
if_block = create_if_block(ctx);
if_block.c();
if_block.m(div, null);
if_block1 = create_if_block(ctx);
if_block1.c();
if_block1.m(div, null);
}
} else if (if_block) {
if_block.d(1);
if_block = null;
} else if (if_block1) {
if_block1.d(1);
if_block1 = null;
}

@@ -1622,4 +1720,7 @@ },

d(detaching) {
if_block0.d(detaching);
detach(if_block0_anchor);
if (detaching) detach(t);
if (detaching) detach(main);
if (if_block) if_block.d();
if (if_block1) if_block1.d();
}

@@ -1644,3 +1745,3 @@ };

const click_handler = routeIdx => $$invalidate(0, active[`${routeIdx}`] = !active[`${routeIdx}`], active);
const click_handler = (routeIdx, methodIdx) => $$invalidate(0, active[`${routeIdx}-${methodIdx}`] = !active[`${routeIdx}-${methodIdx}`], active);

@@ -1647,0 +1748,0 @@ $$self.$$set = $$props => {

@@ -6,3 +6,3 @@ {

"svelte": "src/SwaggerUISvelte.svelte",
"version": "0.0.4",
"version": "0.0.5",
"scripts": {

@@ -9,0 +9,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 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 d(t){return document.createTextNode(t)}function f(){return d(" ")}function p(){return d("")}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 y;function b(t){y=t}function $(t){(function(){if(!y)throw new Error("Function called outside component initialization");return y})().$$.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 q(){if(!T){T=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];b(e),N(e.$$)}for(b(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 N(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(q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(o,c,s,u,a,d,f=[-1]){const p=y;b(o);const m=c.props||{},h=o.$$={fragment:null,ctx:null,props:d,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:f,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&&(($=o.$$.fragment)&&$.i&&(M.delete($),$.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),q()}var $,w;b(p)}function H(t,e,n){const r=t.slice();return r[12]=e[n],r}function S(t,e,n){const r=t.slice();return r[15]=e[n],r}function A(t,e,n){const r=t.slice();return r[21]=e[n],r}function C(t,e,n){const r=t.slice();return r[21]=e[n],r}function P(t,e,n){const r=t.slice();return r[18]=e[n],r}function D(t,e,n){const r=t.slice();return r[9]=e[n],r[11]=n,r}function R(t,e,n){const r=t.slice();return r[6]=e[n],r[8]=n,r}function z(t){let e,n,r,l,o=t[1].info.title+"",g=Object.entries(t[1].paths),y=[];for(let e=0;e<g.length;e+=1)y[e]=ut(R(t,g,e));return{c(){e=a("h1"),n=d(o),r=f();for(let t=0;t<y.length;t+=1)y[t].c();l=p(),m(e,"class","title")},m(t,o){s(t,e,o),c(e,n),s(t,r,o);for(let e=0;e<y.length;e+=1)y[e].m(t,o);s(t,l,o)},p(t,e){if(2&e&&o!==(o=t[1].info.title+"")&&h(n,o),7&e){let n;for(g=Object.entries(t[1].paths),n=0;n<g.length;n+=1){const r=R(t,g,n);y[n]?y[n].p(r,e):(y[n]=ut(r),y[n].c(),y[n].m(l.parentNode,l))}for(;n<y.length;n+=1)y[n].d(1);y.length=g.length}},d(t){t&&i(e),t&&i(r),u(y,t),t&&i(l)}}}function F(t){let e,n=t[9][1].summary+"";return{c(){e=d(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[9][1].summary+"")&&h(e,n)},d(t){t&&i(e)}}}function G(t){let e,n=Object.entries(t[9][1].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=Y(P(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(6&l){let o;for(n=Object.entries(t[9][1].requestBody.content),o=0;o<n.length;o+=1){const c=P(t,n,o);r[o]?r[o].p(c,l):(r[o]=Y(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 I(t){let e,n=Object.entries(t[18][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=U(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);s(t,e,n)},p(t,l){if(2&l){let o;for(n=Object.entries(t[18][1].schema.properties),o=0;o<n.length;o+=1){const c=A(t,n,o);r[o]?r[o].p(c,l):(r[o]=U(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 J(t){let e,n=Object.entries(t[2](t[18][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=X(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);s(t,e,n)},p(t,l){if(6&l){let o;for(n=Object.entries(t[2](t[18][1].schema.$ref).properties),o=0;o<n.length;o+=1){const c=C(t,n,o);r[o]?r[o].p(c,l):(r[o]=X(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 K(e){let n;return{c(){n=d("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function Q(t){let e,n=t[21][1].type+"";return{c(){e=d(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[21][1].type+"")&&h(e,n)},d(t){t&&i(e)}}}function U(t){let e,n,r,l,o,u,p,m,g,y=t[21][0]+"",b=t[21][1].description+"";function $(t,e){return t[21][1].type?Q:K}let w=$(t),v=w(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=d(y),o=f(),u=a("td"),p=f(),m=a("td"),v.c(),g=f()},m(t,i){s(t,e,i),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=b,c(e,p),c(e,m),v.m(m,null),c(e,g)},p(t,e){2&e&&y!==(y=t[21][0]+"")&&h(l,y),2&e&&b!==(b=t[21][1].description+"")&&(u.innerHTML=b),w===(w=$(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 V(e){let n;return{c(){n=d("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function W(t){let e,n=t[21][1].type+"";return{c(){e=d(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[21][1].type+"")&&h(e,n)},d(t){t&&i(e)}}}function X(t){let e,n,r,l,o,u,p,m,g,y=t[21][0]+"",b=t[21][1].description+"";function $(t,e){return t[21][1].type?W:V}let w=$(t),v=w(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=d(y),o=f(),u=a("td"),p=f(),m=a("td"),v.c(),g=f()},m(t,i){s(t,e,i),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=b,c(e,p),c(e,m),v.m(m,null),c(e,g)},p(t,e){2&e&&y!==(y=t[21][0]+"")&&h(l,y),2&e&&b!==(b=t[21][1].description+"")&&(u.innerHTML=b),w===(w=$(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 Y(t){let e,n,r,l,o,u,p,g,y,b,$,w=t[18][0]+"";function v(t,e){return"$ref"in t[18][1].schema?J:I}let _=v(t),x=_(t);return{c(){e=a("div"),n=a("h4"),r=d("Request Body - "),l=d(w),o=f(),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>",y=f(),b=a("tbody"),x.c(),$=f(),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,y),c(p,b),x.m(b,null),c(e,$)},p(t,e){2&e&&w!==(w=t[18][0]+"")&&h(l,w),_===(_=v(t))&&x?x.p(t,e):(x.d(1),x=_(t),x&&(x.c(),x.m(b,null)))},d(t){t&&i(e),x.d()}}}function Z(t){let e,n,r,l,o,d,p,h,g=t[9][1].parameters,y=[];for(let e=0;e<g.length;e+=1)y[e]=ot(S(t,g,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=f(),l=a("div"),o=a("table"),d=a("thead"),d.innerHTML="<tr><th>Name</th> \n <th>Located in</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",p=f(),h=a("tbody");for(let t=0;t<y.length;t+=1)y[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,d),c(o,p),c(o,h);for(let t=0;t<y.length;t+=1)y[t].m(h,null)},p(t,e){if(2&e){let n;for(g=t[9][1].parameters,n=0;n<g.length;n+=1){const r=S(t,g,n);y[n]?y[n].p(r,e):(y[n]=ot(r),y[n].c(),y[n].m(h,null))}for(;n<y.length;n+=1)y[n].d(1);y.length=g.length}},d(t){t&&i(e),u(y,t)}}}function tt(t){let e,n,r=t[15].name+"";return{c(){e=a("span"),n=d(r)},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[15].name+"")&&h(n,r)},d(t){t&&i(e)}}}function et(t){let e,n,r=t[15].name+"";return{c(){e=a("span"),n=d(r),m(e,"class","swagger-parameter-required")},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[15].name+"")&&h(n,r)},d(t){t&&i(e)}}}function nt(e){let n;return{c(){n=d("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function rt(t){let e,n,r,l=t[15].type+"",o=t[15].items&&lt(t);return{c(){e=d(l),n=f(),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){2&n&&l!==(l=t[15].type+"")&&h(e,l),t[15].items?o?o.p(t,n):(o=lt(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 lt(t){let e,n,r=t[15].items.type+"";return{c(){e=d("of\n "),n=d(r)},m(t,r){s(t,e,r),s(t,n,r)},p(t,e){2&e&&r!==(r=t[15].items.type+"")&&h(n,r)},d(t){t&&i(e),t&&i(n)}}}function ot(t){let e,n,r,l,o,u,p,m,g,y,b=t[15].in+"",$=t[15].description+"";function w(t,e){return t[15].required?et:tt}let v=w(t),_=v(t);function x(t,e){return t[15].type?rt:nt}let j=x(t),O=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=f(),l=a("td"),o=d(b),u=f(),p=a("td"),m=f(),g=a("td"),O.c(),y=f()},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=$,c(e,m),c(e,g),O.m(g,null),c(e,y)},p(t,e){v===(v=w(t))&&_?_.p(t,e):(_.d(1),_=v(t),_&&(_.c(),_.m(n,null))),2&e&&b!==(b=t[15].in+"")&&h(o,b),2&e&&$!==($=t[15].description+"")&&(p.innerHTML=$),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 ct(t){let e,n,r,l=Object.entries(t[9][1].responses),o=[];for(let e=0;e<l.length;e+=1)o[e]=st(H(t,l,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=f();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(2&n){let r;for(l=Object.entries(t[9][1].responses),r=0;r<l.length;r+=1){const c=H(t,l,r);o[r]?o[r].p(c,n):(o[r]=st(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 st(t){let e,n,r,l,o,u=t[12][0]+"",p=t[12][1].description+"";return{c(){e=a("h5"),n=a("span"),r=d(u),l=f(),o=d(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){2&e&&u!==(u=t[12][0]+"")&&h(r,u),2&e&&p!==(p=t[12][1].description+"")&&h(o,p)},d(t){t&&i(e)}}}function it(t){let e,n,r,l,o,u,p,y,b,$,w,v,_,x,j=t[9][0]+"",O=t[9][1].summary&&F(t);function L(...e){return t[4](t[8],...e)}let T=t[9][1].requestBody&&t[9][1].requestBody.content&&G(t),k=t[9][1].parameters&&Z(t),q=t[9][1].responses&&ct(t);return{c(){e=a("div"),n=a("div"),r=a("a"),l=a("span"),o=d(j),u=f(),O&&O.c(),y=f(),b=a("div"),T&&T.c(),$=f(),k&&k.c(),w=f(),q&&q.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(b,"class","swagger-method-details open"),g(b,"open",t[0][""+t[8]]),m(e,"class",v="swagger-method swagger-method-"+t[9][0])},m(t,i){var a,d,f,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,y),c(e,b),T&&T.m(b,null),c(b,$),k&&k.m(b,null),c(b,w),q&&q.m(b,null),_||(d="click",f=L,(a=n).addEventListener(d,f,p),x=()=>a.removeEventListener(d,f,p),_=!0)},p(n,l){t=n,2&l&&j!==(j=t[9][0]+"")&&h(o,j),t[9][1].summary?O?O.p(t,l):(O=F(t),O.c(),O.m(r,null)):O&&(O.d(1),O=null),t[9][1].requestBody&&t[9][1].requestBody.content?T?T.p(t,l):(T=G(t),T.c(),T.m(b,$)):T&&(T.d(1),T=null),t[9][1].parameters?k?k.p(t,l):(k=Z(t),k.c(),k.m(b,w)):k&&(k.d(1),k=null),t[9][1].responses?q?q.p(t,l):(q=ct(t),q.c(),q.m(b,null)):q&&(q.d(1),q=null),1&l&&g(b,"open",t[0][""+t[8]]),2&l&&v!==(v="swagger-method swagger-method-"+t[9][0])&&m(e,"class",v)},d(t){t&&i(e),O&&O.d(),T&&T.d(),k&&k.d(),q&&q.d(),_=!1,x()}}}function ut(t){let e,n,r,l,o,p=t[6][0]+"",g=Object.entries(t[6][1]),y=[];for(let e=0;e<g.length;e+=1)y[e]=it(D(t,g,e));return{c(){e=a("div"),n=a("h3"),r=d(p),l=f();for(let t=0;t<y.length;t+=1)y[t].c();o=f(),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<y.length;t+=1)y[t].m(e,null);c(e,o)},p(t,n){if(2&n&&p!==(p=t[6][0]+"")&&h(r,p),7&n){let r;for(g=Object.entries(t[6][1]),r=0;r<g.length;r+=1){const l=D(t,g,r);y[r]?y[r].p(l,n):(y[r]=it(l),y[r].c(),y[r].m(e,o))}for(;r<y.length;r+=1)y[r].d(1);y.length=g.length}},d(t){t&&i(e),u(y,t)}}}function at(e){let n,r,l,o=e[1]&&z(e);return{c(){n=a("main"),r=a("section"),l=a("div"),o&&o.c(),m(l,"class","container"),m(r,"class","section")},m(t,e){s(t,n,e),c(n,r),c(r,l),o&&o.m(l,null)},p(t,[e]){t[1]?o?o.p(t,e):(o=z(t),o.c(),o.m(l,null)):o&&(o.d(1),o=null)},i:t,o:t,d(t){t&&i(n),o&&o.d()}}}function dt(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(l,o){function c(t){try{i(r.next(t))}catch(t){o(t)}}function s(t){try{i(r.throw(t))}catch(t){o(t)}}function i(t){var e;t.done?l(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}i((r=r.apply(t,e||[])).next())}))};let l,{swagger_url:o="swagger-example.json"}=e,c={};$(()=>r(void 0,void 0,void 0,(function*(){const t=yield fetch(o);n(1,l=yield t.json())})));return t.$$set=t=>{"swagger_url"in t&&n(3,o=t.swagger_url)},[c,l,t=>{const e=t.replace("#/","").split("/");return l[e[0]][e[1]][e[2]]},o,t=>n(0,c[""+t]=!c[""+t],c)]}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,dt,at,o,{swagger_url: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 o(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(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(c,l,i,u,a,f,d=[-1]){const p=$;y(c);const m=l.props||{},h=c.$$={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(c,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(c,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);h.fragment&&h.fragment.l(t),t.forEach(s)}else h.fragment&&h.fragment.c();l.intro&&((b=c.$$.fragment)&&b.i&&(M.delete(b),b.i(v))),function(t,n,c){const{fragment:l,on_mount:i,on_destroy:s,after_update:u}=t.$$;l&&l.m(n,c),L(()=>{const n=i.map(e).filter(o);s?s.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(L)}(c,l.target,l.anchor),N()}var b,v;y(p)}function H(t,e,n){const r=t.slice();return r[12]=e[n],r}function S(t,e,n){const r=t.slice();return r[15]=e[n],r}function A(t,e,n){const r=t.slice();return r[21]=e[n],r}function C(t,e,n){const r=t.slice();return r[21]=e[n],r}function P(t,e,n){const r=t.slice();return r[18]=e[n],r}function D(t,e,n){const r=t.slice();return r[9]=e[n],r[11]=n,r}function R(t,e,n){const r=t.slice();return r[6]=e[n],r[8]=n,r}function z(e){return{c(){document.title="Swagger UI using Svelte"},m:t,d:t}}function F(e){let n;return document.title=n=e[1].info.title,{c:t,m:t,d:t}}function I(t){let e,n,r,o,c,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(R(t,B,e));return{c(){e=a("h1"),n=f(T),r=d(),o=a("h2"),c=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),l(e,n),i(t,r,s),i(t,o,s),l(o,c),l(o,g),l(o,$),i(t,y,s),i(t,b,s),l(b,v),l(v,w),l(b,x),l(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(c,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=R(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 U(t){let e,n=t[9][1].summary+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){2&r&&n!==(n=t[9][1].summary+"")&&h(e,n)},d(t){t&&s(e)}}}function G(t){let e,n=Object.entries(t[9][1].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=tt(P(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 c;for(n=Object.entries(t[9][1].requestBody.content),c=0;c<n.length;c+=1){const l=P(t,n,c);r[c]?r[c].p(l,o):(r[c]=tt(l),r[c].c(),r[c].m(e.parentNode,e))}for(;c<r.length;c+=1)r[c].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function J(t){let e,n=Object.entries(t[18][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=W(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(2&o){let c;for(n=Object.entries(t[18][1].schema.properties),c=0;c<n.length;c+=1){const l=A(t,n,c);r[c]?r[c].p(l,o):(r[c]=W(l),r[c].c(),r[c].m(e.parentNode,e))}for(;c<r.length;c+=1)r[c].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[18][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=Z(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 c;for(n=Object.entries(t[2](t[18][1].schema.$ref).properties),c=0;c<n.length;c+=1){const l=C(t,n,c);r[c]?r[c].p(l,o):(r[c]=Z(l),r[c].c(),r[c].m(e.parentNode,e))}for(;c<r.length;c+=1)r[c].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[21][1].type+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){2&r&&n!==(n=t[21][1].type+"")&&h(e,n)},d(t){t&&s(e)}}}function W(t){let e,n,r,o,c,u,p,m,g,$=t[21][0]+"",y=t[21][1].description+"";function b(t,e){return t[21][1].type?V:Q}let v=b(t),w=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),o=f($),c=d(),u=a("td"),p=d(),m=a("td"),w.c(),g=d()},m(t,s){i(t,e,s),l(e,n),l(n,r),l(r,o),l(e,c),l(e,u),u.innerHTML=y,l(e,p),l(e,m),w.m(m,null),l(e,g)},p(t,e){2&e&&$!==($=t[21][0]+"")&&h(o,$),2&e&&y!==(y=t[21][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[21][1].type+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){2&r&&n!==(n=t[21][1].type+"")&&h(e,n)},d(t){t&&s(e)}}}function Z(t){let e,n,r,o,c,u,p,m,g,$=t[21][0]+"",y=t[21][1].description+"";function b(t,e){return t[21][1].type?Y:X}let v=b(t),w=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),o=f($),c=d(),u=a("td"),p=d(),m=a("td"),w.c(),g=d()},m(t,s){i(t,e,s),l(e,n),l(n,r),l(r,o),l(e,c),l(e,u),u.innerHTML=y,l(e,p),l(e,m),w.m(m,null),l(e,g)},p(t,e){2&e&&$!==($=t[21][0]+"")&&h(o,$),2&e&&y!==(y=t[21][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,c,u,p,g,$,y,b,v=t[18][0]+"";function w(t,e){return"$ref"in t[18][1].schema?K:J}let _=w(t),x=_(t);return{c(){e=a("div"),n=a("h4"),r=f("Request Body - "),o=f(v),c=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),l(e,n),l(n,r),l(n,o),l(e,c),l(e,u),l(u,p),l(p,g),l(p,$),l(p,y),x.m(y,null),l(e,b)},p(t,e){2&e&&v!==(v=t[18][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,c,f,p,h,g=t[9][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"),c=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(c,"class","table is-hoverable"),m(o,"class","table-container"),m(e,"class","swagger-parameters")},m(t,s){i(t,e,s),l(e,n),l(e,r),l(e,o),l(o,c),l(c,f),l(c,p),l(c,h);for(let t=0;t<$.length;t+=1)$[t].m(h,null)},p(t,e){if(2&e){let n;for(g=t[9][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[15].name+"";return{c(){e=a("span"),n=f(r)},m(t,r){i(t,e,r),l(e,n)},p(t,e){2&e&&r!==(r=t[15].name+"")&&h(n,r)},d(t){t&&s(e)}}}function rt(t){let e,n,r=t[15].name+"";return{c(){e=a("span"),n=f(r),m(e,"class","swagger-parameter-required")},m(t,r){i(t,e,r),l(e,n)},p(t,e){2&e&&r!==(r=t[15].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 ct(t){let e,n,r,o=t[15].type+"",c=t[15].items&&lt(t);return{c(){e=f(o),n=d(),c&&c.c(),r=p()},m(t,o){i(t,e,o),i(t,n,o),c&&c.m(t,o),i(t,r,o)},p(t,n){2&n&&o!==(o=t[15].type+"")&&h(e,o),t[15].items?c?c.p(t,n):(c=lt(t),c.c(),c.m(r.parentNode,r)):c&&(c.d(1),c=null)},d(t){t&&s(e),t&&s(n),c&&c.d(t),t&&s(r)}}}function lt(t){let e,n,r=t[15].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[15].items.type+"")&&h(n,r)},d(t){t&&s(e),t&&s(n)}}}function it(t){let e,n,r,o,c,u,p,m,g,$,y=t[15].in+"",b=t[15].description+"";function v(t,e){return t[15].required?rt:nt}let w=v(t),_=w(t);function x(t,e){return t[15].type?ct:ot}let j=x(t),O=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=d(),o=a("td"),c=f(y),u=d(),p=a("td"),m=d(),g=a("td"),O.c(),$=d()},m(t,s){i(t,e,s),l(e,n),_.m(n,null),l(e,r),l(e,o),l(o,c),l(e,u),l(e,p),p.innerHTML=b,l(e,m),l(e,g),O.m(g,null),l(e,$)},p(t,e){w===(w=v(t))&&_?_.p(t,e):(_.d(1),_=w(t),_&&(_.c(),_.m(n,null))),2&e&&y!==(y=t[15].in+"")&&h(c,y),2&e&&b!==(b=t[15].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[9][1].responses),c=[];for(let e=0;e<o.length;e+=1)c[e]=ut(H(t,o,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=d();for(let t=0;t<c.length;t+=1)c[t].c();m(e,"class","swagger-response")},m(t,o){i(t,e,o),l(e,n),l(e,r);for(let t=0;t<c.length;t+=1)c[t].m(e,null)},p(t,n){if(2&n){let r;for(o=Object.entries(t[9][1].responses),r=0;r<o.length;r+=1){const l=H(t,o,r);c[r]?c[r].p(l,n):(c[r]=ut(l),c[r].c(),c[r].m(e,null))}for(;r<c.length;r+=1)c[r].d(1);c.length=o.length}},d(t){t&&s(e),u(c,t)}}}function ut(t){let e,n,r,o,c,u=t[12][0]+"",p=t[12][1].description+"";return{c(){e=a("h5"),n=a("span"),r=f(u),o=d(),c=f(p),m(n,"class","swagger-response-code")},m(t,s){i(t,e,s),l(e,n),l(n,r),l(e,o),l(e,c)},p(t,e){2&e&&u!==(u=t[12][0]+"")&&h(r,u),2&e&&p!==(p=t[12][1].description+"")&&h(c,p)},d(t){t&&s(e)}}}function at(t){let e,n,r,o,c,u,p,$,y,b,v,w,_,x,j=t[9][0]+"",O=t[9][1].summary&&U(t);function L(...e){return t[4](t[8],t[11],...e)}let T=t[9][1].requestBody&&t[9][1].requestBody.content&&G(t),k=t[9][1].parameters&&et(t),N=t[9][1].responses&&st(t);return{c(){e=a("div"),n=a("div"),r=a("a"),o=a("span"),c=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[8]}-${t[11]}`]),m(e,"class",w="swagger-method swagger-method-"+t[9][0])},m(t,s){var a,f,d,p;i(t,e,s),l(e,n),l(n,r),l(r,o),l(o,c),l(r,u),O&&O.m(r,null),l(e,$),l(e,y),T&&T.m(y,null),l(y,b),k&&k.m(y,null),l(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[9][0]+"")&&h(c,j),t[9][1].summary?O?O.p(t,o):(O=U(t),O.c(),O.m(r,null)):O&&(O.d(1),O=null),t[9][1].requestBody&&t[9][1].requestBody.content?T?T.p(t,o):(T=G(t),T.c(),T.m(y,b)):T&&(T.d(1),T=null),t[9][1].parameters?k?k.p(t,o):(k=et(t),k.c(),k.m(y,v)):k&&(k.d(1),k=null),t[9][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[8]}-${t[11]}`]),2&o&&w!==(w="swagger-method swagger-method-"+t[9][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,c,p=t[6][0]+"",g=Object.entries(t[6][1]),$=[];for(let e=0;e<g.length;e+=1)$[e]=at(D(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();c=d(),m(n,"class","title is-small is-3"),m(e,"class","swagger-paths is-small")},m(t,s){i(t,e,s),l(e,n),l(n,r),l(e,o);for(let t=0;t<$.length;t+=1)$[t].m(e,null);l(e,c)},p(t,n){if(2&n&&p!==(p=t[6][0]+"")&&h(r,p),7&n){let r;for(g=Object.entries(t[6][1]),r=0;r<g.length;r+=1){const o=D(t,g,r);$[r]?$[r].p(o,n):($[r]=at(o),$[r].c(),$[r].m(e,c))}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,c,u;function f(t,e){return t[1]?F:z}let h=f(e),g=h(e),$=e[1]&&I(e);return{c(){g.c(),n=p(),r=d(),o=a("main"),c=a("section"),u=a("div"),$&&$.c(),m(u,"class","container"),m(c,"class","section")},m(t,e){g.m(document.head,null),l(document.head,n),i(t,r,e),i(t,o,e),l(o,c),l(c,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):($=I(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,c){function l(t){try{s(r.next(t))}catch(t){c(t)}}function i(t){try{s(r.throw(t))}catch(t){c(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(l,i)}s((r=r.apply(t,e||[])).next())}))};let o,{swagger_url:c="swagger-example.json"}=e,l={};b(()=>r(void 0,void 0,void 0,(function*(){const t=yield fetch(c);n(1,o=yield t.json())})));return t.$$set=t=>{"swagger_url"in t&&n(3,c=t.swagger_url)},[l,o,t=>{const e=t.replace("#/","").split("/");return o[e[0]][e[1]][e[2]]},c,(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,c,{swagger_url:3})}}({target:document.body})}();
//# sourceMappingURL=bundle.js.map

@@ -1,1 +0,45 @@

# Swagger ui for svelte
# Swagger-UI for Svelte
![npm](https://img.shields.io/npm/v/swagger-ui-svelte) ![npm](https://img.shields.io/npm/dm/swagger-ui-svelte) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/matchid-project/swagger-ui-svelte/Node.js%20Package)
Light version of swagger UI using Svelte JavaScript framework.
## Installation
```
npm i swagger-ui-svelte
// OR
yarn add swagger-ui-svelte
```
<em>Note: to use this library in sapper, install as devDependency. See the [link](https://github.com/sveltejs/sapper-template#using-external-components).</em>
## Demo [Link](https://matchid.io/swagger-ui-svelte)
Local demo:
```
git clone https://github.com/matchid-project/swagger-ui-svelte
cd swagger-ui-svelte
npm install && npm run dev
```
## Examples
An example of how to use the library
```js
<script>
import SwaggerUISvelte from "swagger-ui-svelte";
</script>
<SwaggerUISvelte swagger_url="/swagger.json" />
```
## Properties
Component props:
| Prop | Type | Default | Description |
| --------------- | ------ | ------- | ------------------------- |
| `swagger_url` | string | swagger-example.json | URL for swagger.json file |

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet