|
|
@ -1,4 +1,3 @@
|
|
|
|
/* generated by Svelte vX.Y.Z */
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
HtmlTag,
|
|
|
|
HtmlTag,
|
|
|
|
SvelteComponent,
|
|
|
|
SvelteComponent,
|
|
|
@ -23,9 +22,21 @@ function get_each_context(ctx, list, i) {
|
|
|
|
return child_ctx;
|
|
|
|
return child_ctx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// (8:0) {#each comments as comment, i}
|
|
|
|
|
|
|
|
function create_each_block(ctx) {
|
|
|
|
function create_each_block(ctx) {
|
|
|
|
var div, strong, t0, t1, span, t2_value = ctx.comment.author + "", t2, t3, t4_value = ctx.elapsed(ctx.comment.time, ctx.time) + "", t4, t5, t6, html_tag, raw_value = ctx.comment.html + "";
|
|
|
|
let div;
|
|
|
|
|
|
|
|
let strong;
|
|
|
|
|
|
|
|
let t0;
|
|
|
|
|
|
|
|
let t1;
|
|
|
|
|
|
|
|
let span;
|
|
|
|
|
|
|
|
let t2_value = ctx.comment.author + "";
|
|
|
|
|
|
|
|
let t2;
|
|
|
|
|
|
|
|
let t3;
|
|
|
|
|
|
|
|
let t4_value = ctx.elapsed(ctx.comment.time, ctx.time) + "";
|
|
|
|
|
|
|
|
let t4;
|
|
|
|
|
|
|
|
let t5;
|
|
|
|
|
|
|
|
let t6;
|
|
|
|
|
|
|
|
let html_tag;
|
|
|
|
|
|
|
|
let raw_value = ctx.comment.html + "";
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
c() {
|
|
|
|
c() {
|
|
|
@ -43,7 +54,6 @@ function create_each_block(ctx) {
|
|
|
|
html_tag = new HtmlTag(raw_value, null);
|
|
|
|
html_tag = new HtmlTag(raw_value, null);
|
|
|
|
attr(div, "class", "comment");
|
|
|
|
attr(div, "class", "comment");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
m(target, anchor) {
|
|
|
|
m(target, anchor) {
|
|
|
|
insert(target, div, anchor);
|
|
|
|
insert(target, div, anchor);
|
|
|
|
append(div, strong);
|
|
|
|
append(div, strong);
|
|
|
@ -57,34 +67,22 @@ function create_each_block(ctx) {
|
|
|
|
append(div, t6);
|
|
|
|
append(div, t6);
|
|
|
|
html_tag.m(div);
|
|
|
|
html_tag.m(div);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
p(changed, ctx) {
|
|
|
|
p(changed, ctx) {
|
|
|
|
if ((changed.comments) && t2_value !== (t2_value = ctx.comment.author + "")) {
|
|
|
|
if (changed.comments && t2_value !== (t2_value = ctx.comment.author + "")) set_data(t2, t2_value);
|
|
|
|
set_data(t2, t2_value);
|
|
|
|
if ((changed.elapsed || changed.comments || changed.time) && t4_value !== (t4_value = ctx.elapsed(ctx.comment.time, ctx.time) + "")) set_data(t4, t4_value);
|
|
|
|
}
|
|
|
|
if (changed.comments && raw_value !== (raw_value = ctx.comment.html + "")) html_tag.p(raw_value);
|
|
|
|
|
|
|
|
|
|
|
|
if ((changed.elapsed || changed.comments || changed.time) && t4_value !== (t4_value = ctx.elapsed(ctx.comment.time, ctx.time) + "")) {
|
|
|
|
|
|
|
|
set_data(t4, t4_value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html + "")) {
|
|
|
|
|
|
|
|
html_tag.p(raw_value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
d(detaching) {
|
|
|
|
d(detaching) {
|
|
|
|
if (detaching) {
|
|
|
|
if (detaching) detach(div);
|
|
|
|
detach(div);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function create_fragment(ctx) {
|
|
|
|
function create_fragment(ctx) {
|
|
|
|
var t0, p, t1;
|
|
|
|
let t0;
|
|
|
|
|
|
|
|
let p;
|
|
|
|
|
|
|
|
let t1;
|
|
|
|
let each_value = ctx.comments;
|
|
|
|
let each_value = ctx.comments;
|
|
|
|
|
|
|
|
|
|
|
|
let each_blocks = [];
|
|
|
|
let each_blocks = [];
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
|
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
|
@ -101,7 +99,6 @@ function create_fragment(ctx) {
|
|
|
|
p = element("p");
|
|
|
|
p = element("p");
|
|
|
|
t1 = text(ctx.foo);
|
|
|
|
t1 = text(ctx.foo);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
m(target, anchor) {
|
|
|
|
m(target, anchor) {
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
|
|
each_blocks[i].m(target, anchor);
|
|
|
|
each_blocks[i].m(target, anchor);
|
|
|
@ -111,12 +108,11 @@ function create_fragment(ctx) {
|
|
|
|
insert(target, p, anchor);
|
|
|
|
insert(target, p, anchor);
|
|
|
|
append(p, t1);
|
|
|
|
append(p, t1);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
p(changed, ctx) {
|
|
|
|
p(changed, ctx) {
|
|
|
|
if (changed.comments || changed.elapsed || changed.time) {
|
|
|
|
if (changed.comments || changed.elapsed || changed.time) {
|
|
|
|
each_value = ctx.comments;
|
|
|
|
each_value = ctx.comments;
|
|
|
|
|
|
|
|
|
|
|
|
let i;
|
|
|
|
let i;
|
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < each_value.length; i += 1) {
|
|
|
|
for (i = 0; i < each_value.length; i += 1) {
|
|
|
|
const child_ctx = get_each_context(ctx, each_value, i);
|
|
|
|
const child_ctx = get_each_context(ctx, each_value, i);
|
|
|
|
|
|
|
|
|
|
|
@ -132,36 +128,33 @@ function create_fragment(ctx) {
|
|
|
|
for (; i < each_blocks.length; i += 1) {
|
|
|
|
for (; i < each_blocks.length; i += 1) {
|
|
|
|
each_blocks[i].d(1);
|
|
|
|
each_blocks[i].d(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
each_blocks.length = each_value.length;
|
|
|
|
each_blocks.length = each_value.length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (changed.foo) {
|
|
|
|
if (changed.foo) set_data(t1, ctx.foo);
|
|
|
|
set_data(t1, ctx.foo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
i: noop,
|
|
|
|
i: noop,
|
|
|
|
o: noop,
|
|
|
|
o: noop,
|
|
|
|
|
|
|
|
|
|
|
|
d(detaching) {
|
|
|
|
d(detaching) {
|
|
|
|
destroy_each(each_blocks, detaching);
|
|
|
|
destroy_each(each_blocks, detaching);
|
|
|
|
|
|
|
|
if (detaching) detach(t0);
|
|
|
|
if (detaching) {
|
|
|
|
if (detaching) detach(p);
|
|
|
|
detach(t0);
|
|
|
|
|
|
|
|
detach(p);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
|
|
let { comments, elapsed, time, foo } = $$props;
|
|
|
|
let { comments } = $$props;
|
|
|
|
|
|
|
|
let { elapsed } = $$props;
|
|
|
|
|
|
|
|
let { time } = $$props;
|
|
|
|
|
|
|
|
let { foo } = $$props;
|
|
|
|
|
|
|
|
|
|
|
|
$$self.$set = $$props => {
|
|
|
|
$$self.$set = $$props => {
|
|
|
|
if ('comments' in $$props) $$invalidate('comments', comments = $$props.comments);
|
|
|
|
if ("comments" in $$props) $$invalidate("comments", comments = $$props.comments);
|
|
|
|
if ('elapsed' in $$props) $$invalidate('elapsed', elapsed = $$props.elapsed);
|
|
|
|
if ("elapsed" in $$props) $$invalidate("elapsed", elapsed = $$props.elapsed);
|
|
|
|
if ('time' in $$props) $$invalidate('time', time = $$props.time);
|
|
|
|
if ("time" in $$props) $$invalidate("time", time = $$props.time);
|
|
|
|
if ('foo' in $$props) $$invalidate('foo', foo = $$props.foo);
|
|
|
|
if ("foo" in $$props) $$invalidate("foo", foo = $$props.foo);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return { comments, elapsed, time, foo };
|
|
|
|
return { comments, elapsed, time, foo };
|
|
|
|