You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/use-elements-as-anchors/expected.js

281 lines
4.8 KiB

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteComponent,
6 years ago
append,
detach,
element,
empty,
6 years ago
init,
insert,
noop,
safe_not_equal,
space
6 years ago
} from "svelte/internal";
// (10:1) {#if a}
function create_if_block_4(ctx) {
var p;
return {
c() {
6 years ago
p = element("p");
p.textContent = "a";
},
m(target, anchor) {
insert(target, p, anchor);
},
6 years ago
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (16:1) {#if b}
function create_if_block_3(ctx) {
var p;
return {
c() {
6 years ago
p = element("p");
p.textContent = "b";
},
m(target, anchor) {
insert(target, p, anchor);
},
6 years ago
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (20:1) {#if c}
function create_if_block_2(ctx) {
var p;
return {
c() {
6 years ago
p = element("p");
p.textContent = "c";
},
m(target, anchor) {
insert(target, p, anchor);
},
6 years ago
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (26:1) {#if d}
function create_if_block_1(ctx) {
var p;
return {
c() {
6 years ago
p = element("p");
p.textContent = "d";
},
m(target, anchor) {
insert(target, p, anchor);
},
6 years ago
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (33:0) {#if e}
function create_if_block(ctx) {
var p;
return {
c() {
6 years ago
p = element("p");
p.textContent = "e";
},
m(target, anchor) {
insert(target, p, anchor);
},
6 years ago
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
function create_fragment(ctx) {
6 years ago
var div, t0, p0, t2, t3, t4, p1, t6, t7, if_block4_anchor;
var if_block0 = (ctx.a) && create_if_block_4(ctx);
var if_block1 = (ctx.b) && create_if_block_3(ctx);
var if_block2 = (ctx.c) && create_if_block_2(ctx);
var if_block3 = (ctx.d) && create_if_block_1(ctx);
var if_block4 = (ctx.e) && create_if_block(ctx);
return {
6 years ago
c() {
6 years ago
div = element("div");
if (if_block0) if_block0.c();
t0 = space();
6 years ago
p0 = element("p");
p0.textContent = "this can be used as an anchor";
t2 = space();
if (if_block1) if_block1.c();
t3 = space();
if (if_block2) if_block2.c();
t4 = space();
6 years ago
p1 = element("p");
p1.textContent = "so can this";
t6 = space();
if (if_block3) if_block3.c();
t7 = space();
if (if_block4) if_block4.c();
if_block4_anchor = empty();
7 years ago
},
6 years ago
m(target, anchor) {
insert(target, div, anchor);
if (if_block0) if_block0.m(div, null);
6 years ago
append(div, t0);
append(div, p0);
6 years ago
append(div, t2);
if (if_block1) if_block1.m(div, null);
6 years ago
append(div, t3);
if (if_block2) if_block2.m(div, null);
6 years ago
append(div, t4);
append(div, p1);
6 years ago
append(div, t6);
if (if_block3) if_block3.m(div, null);
6 years ago
insert(target, t7, anchor);
if (if_block4) if_block4.m(target, anchor);
insert(target, if_block4_anchor, anchor);
},
6 years ago
p(changed, ctx) {
if (ctx.a) {
if (!if_block0) {
if_block0 = create_if_block_4(ctx);
if_block0.c();
6 years ago
if_block0.m(div, t0);
}
} else if (if_block0) {
if_block0.d(1);
if_block0 = null;
}
if (ctx.b) {
if (!if_block1) {
if_block1 = create_if_block_3(ctx);
if_block1.c();
6 years ago
if_block1.m(div, t3);
}
} else if (if_block1) {
if_block1.d(1);
if_block1 = null;
}
if (ctx.c) {
if (!if_block2) {
if_block2 = create_if_block_2(ctx);
if_block2.c();
6 years ago
if_block2.m(div, t4);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
if (ctx.d) {
if (!if_block3) {
if_block3 = create_if_block_1(ctx);
if_block3.c();
if_block3.m(div, null);
}
} else if (if_block3) {
if_block3.d(1);
if_block3 = null;
}
if (ctx.e) {
if (!if_block4) {
if_block4 = create_if_block(ctx);
if_block4.c();
if_block4.m(if_block4_anchor.parentNode, if_block4_anchor);
}
} else if (if_block4) {
if_block4.d(1);
if_block4 = null;
}
},
i: noop,
o: noop,
6 years ago
d(detaching) {
if (detaching) {
detach(div);
6 years ago
}
7 years ago
if (if_block0) if_block0.d();
if (if_block1) if_block1.d();
if (if_block2) if_block2.d();
if (if_block3) if_block3.d();
6 years ago
if (detaching) {
detach(t7);
6 years ago
}
6 years ago
if (if_block4) if_block4.d(detaching);
6 years ago
if (detaching) {
detach(if_block4_anchor);
6 years ago
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { a, b, c, d, e } = $$props;
7 years ago
6 years ago
$$self.$set = $$props => {
if ('a' in $$props) $$invalidate('a', a = $$props.a);
if ('b' in $$props) $$invalidate('b', b = $$props.b);
if ('c' in $$props) $$invalidate('c', c = $$props.c);
if ('d' in $$props) $$invalidate('d', d = $$props.d);
if ('e' in $$props) $$invalidate('e', e = $$props.e);
};
return { a, b, c, d, e };
}
class Component extends SvelteComponent {
constructor(options) {
super();
6 years ago
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]);
}
}
export default Component;