forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpected.js
136 lines (110 loc) · 2.63 KB
/
expected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
append,
destroy_each,
detach,
element,
empty,
init,
insert,
noop,
safe_not_equal,
set_data,
text
} from "svelte/internal";
function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx);
child_ctx.num = list[i];
return child_ctx;
}
// (9:0) {#each [a, b, c, d, e] as num}
function create_each_block(ctx) {
var span, t_value = ctx.num, t;
return {
c() {
span = element("span");
t = text(t_value);
},
m(target, anchor) {
insert(target, span, anchor);
append(span, t);
},
p(changed, ctx) {
if ((changed.a || changed.b || changed.c || changed.d || changed.e) && t_value !== (t_value = ctx.num)) {
set_data(t, t_value);
}
},
d(detaching) {
if (detaching) {
detach(span);
}
}
};
}
function create_fragment(ctx) {
var each_1_anchor;
var each_value = [ctx.a, ctx.b, ctx.c, ctx.d, ctx.e];
var each_blocks = [];
for (var i = 0; i < 5; i += 1) {
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
}
return {
c() {
for (var i = 0; i < 5; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (var i = 0; i < 5; i += 1) {
each_blocks[i].m(target, anchor);
}
insert(target, each_1_anchor, anchor);
},
p(changed, ctx) {
if (changed.a || changed.b || changed.c || changed.d || changed.e) {
each_value = [ctx.a, ctx.b, ctx.c, ctx.d, ctx.e];
for (var i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(changed, child_ctx);
} else {
each_blocks[i] = create_each_block(child_ctx);
each_blocks[i].c();
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < 5; i += 1) {
each_blocks[i].d(1);
}
}
},
i: noop,
o: noop,
d(detaching) {
destroy_each(each_blocks, detaching);
if (detaching) {
detach(each_1_anchor);
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { a, b, c, d, e } = $$props;
$$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();
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]);
}
}
export default Component;