minor fixes, update various tests

pull/1367/head
Rich Harris 7 years ago
parent a641019ab9
commit 86d3476b55

@ -89,7 +89,7 @@ export default class Attribute extends Node {
if (chunk.type === 'Text') { if (chunk.type === 'Text') {
return stringify(chunk.data); return stringify(chunk.data);
} else { } else {
return getExpressionPrecedence(chunk) <= 13 ? `(${chunk.snippet})` : snippet; return getExpressionPrecedence(chunk.node) <= 13 ? `(${chunk.snippet})` : snippet;
} }
}) })
.join(' + '); .join(' + ');
@ -183,7 +183,7 @@ export default class Attribute extends Node {
allDependencies.add(d); allDependencies.add(d);
}); });
return getExpressionPrecedence(chunk) <= 13 ? `(${snippet})` : snippet; return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
} }
}) })
.join(' + '); .join(' + ');
@ -330,7 +330,7 @@ export default class Attribute extends Node {
allDependencies.add(d); allDependencies.add(d);
}); });
return getExpressionPrecedence(chunk) <= 13 ? `(${snippet})` : snippet; return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
} }
}) })
.join(' + '); .join(' + ');

@ -2,4 +2,10 @@ import Node from './shared/Node';
export default class Comment extends Node { export default class Comment extends Node {
type: 'Comment'; type: 'Comment';
data: string;
constructor(compiler, parent, scope, info) {
super(compiler, parent, scope, info);
this.data = info.data;
}
} }

@ -160,19 +160,19 @@ export default class Element extends Node {
}); });
this.actions.forEach(action => { this.actions.forEach(action => {
this.cannotUseInnerHTML(); this.parent.cannotUseInnerHTML();
if (action.expression) { if (action.expression) {
block.addDependencies(action.expression.dependencies); block.addDependencies(action.expression.dependencies);
} }
}); });
this.bindings.forEach(binding => { this.bindings.forEach(binding => {
this.cannotUseInnerHTML(); this.parent.cannotUseInnerHTML();
block.addDependencies(binding.value.dependencies); block.addDependencies(binding.value.dependencies);
}); });
this.handlers.forEach(handler => { this.handlers.forEach(handler => {
this.cannotUseInnerHTML(); this.parent.cannotUseInnerHTML();
block.addDependencies(handler.dependencies); block.addDependencies(handler.dependencies);
}); });

@ -57,7 +57,7 @@ export default class Title extends Node {
allDependencies.add(d); allDependencies.add(d);
}); });
return getExpressionPrecedence(chunk) <= 13 ? `(${snippet})` : snippet; return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
} }
}) })
.join(' + '); .join(' + ');

@ -1,22 +1,21 @@
import { DomGenerator } from '../generators/dom/index'; import { DomGenerator } from '../generators/dom/index';
import { Node } from '../interfaces'; import { Node } from '../interfaces';
export default function createDebuggingComment(node: Node, generator: DomGenerator) { export default function createDebuggingComment(node: Node, compiler: DomGenerator) {
return `TODO ${node.start}-${node.end}`; const { locate, source } = compiler;
// const { locate, source } = generator;
// let c = node.start; let c = node.start;
// if (node.type === 'ElseBlock') { if (node.type === 'ElseBlock') {
// while (source[c - 1] !== '{') c -= 1; while (source[c - 1] !== '{') c -= 1;
// while (source[c - 1] === '{') c -= 1; while (source[c - 1] === '{') c -= 1;
// } }
// let d = node.expression ? node.expression.end : c; let d = node.expression ? node.expression.node.end : c;
// while (source[d] !== '}') d += 1; while (source[d] !== '}') d += 1;
// while (source[d] === '}') d += 1; while (source[d] === '}') d += 1;
// const start = locate(c); const start = locate(c);
// const loc = `(${start.line + 1}:${start.column})`; const loc = `(${start.line + 1}:${start.column})`;
// return `${loc} ${source.slice(c, d)}`.replace(/\s/g, ' '); return `${loc} ${source.slice(c, d)}`.replace(/\s/g, ' ');
} }

@ -48,6 +48,7 @@ const precedence: Record<string, (expression?: Node) => number> = {
SequenceExpression: () => 0 SequenceExpression: () => 0
}; };
// TODO make this a method of Expression
export default function getExpressionPrecedence(expression: Node) { export default function getExpressionPrecedence(expression: Node) {
return expression.type in precedence ? precedence[expression.type](expression) : 0; return expression.type in precedence ? precedence[expression.type](expression) : 0;
} }

@ -4,7 +4,7 @@ import * as path from "path";
import { rollup } from "rollup"; import { rollup } from "rollup";
import { loadConfig, svelte } from "../helpers.js"; import { loadConfig, svelte } from "../helpers.js";
describe("js", () => { describe.only("js", () => {
fs.readdirSync("test/js/samples").forEach(dir => { fs.readdirSync("test/js/samples").forEach(dir => {
if (dir[0] === ".") return; if (dir[0] === ".") return;

@ -150,7 +150,7 @@ function link(node) {
} }
} }
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var a, link_action; var a, link_action;
return { return {

@ -17,7 +17,7 @@ function link(node) {
} }
}; };
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var a, link_action; var a, link_action;
return { return {

@ -153,13 +153,13 @@ function add_css() {
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var p, text; var p, text;
return { return {
c: function create() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText(state.foo); text = createText(ctx.foo);
this.h(); this.h();
}, },
@ -172,9 +172,9 @@ function create_main_fragment(component, state) {
appendNode(text, p); appendNode(text, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.foo) { if (changed.foo) {
text.data = state.foo; text.data = ctx.foo;
} }
}, },

@ -12,13 +12,13 @@ function add_css() {
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var p, text; var p, text;
return { return {
c: function create() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText(state.foo); text = createText(ctx.foo);
this.h(); this.h();
}, },
@ -31,9 +31,9 @@ function create_main_fragment(component, state) {
appendNode(text, p); appendNode(text, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.foo) { if (changed.foo) {
text.data = state.foo; text.data = ctx.foo;
} }
}, },

@ -129,7 +129,7 @@ var proto = {
var Nested = window.Nested; var Nested = window.Nested;
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({

@ -3,7 +3,7 @@ import { _differsImmutable, assign, callAll, init, noop, proto } from "svelte/sh
var Nested = window.Nested; var Nested = window.Nested;
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({

@ -129,7 +129,7 @@ var proto = {
var Nested = window.Nested; var Nested = window.Nested;
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({

@ -3,7 +3,7 @@ import { _differsImmutable, assign, callAll, init, noop, proto } from "svelte/sh
var Nested = window.Nested; var Nested = window.Nested;
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({

@ -125,7 +125,7 @@ var proto = {
var Nested = window.Nested; var Nested = window.Nested;
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({

@ -3,7 +3,7 @@ import { assign, callAll, init, noop, proto } from "svelte/shared.js";
var Nested = window.Nested; var Nested = window.Nested;
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({

@ -131,7 +131,7 @@ function b({ x }) {
return x * 3; return x * 3;
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
return { return {
c: noop, c: noop,

@ -9,7 +9,7 @@ function b({ x }) {
return x * 3; return x * 3;
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
return { return {
c: noop, c: noop,

@ -146,7 +146,7 @@ function add_css() {
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {

@ -8,7 +8,7 @@ function add_css() {
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {

@ -135,7 +135,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {

@ -153,15 +153,15 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var each_anchor; var each_anchor;
var each_value = state.createElement; var each_value = ctx.createElement;
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), { each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
node: each_value[i], node: each_value[i],
node_index: i node_index: i
@ -185,12 +185,12 @@ function create_main_fragment(component, state) {
insertNode(each_anchor, target, anchor); insertNode(each_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
var each_value = state.createElement; var each_value = ctx.createElement;
if (changed.createElement) { if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), { var each_context = assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
node: each_value[i], node: each_value[i],
node_index: i node_index: i
@ -228,9 +228,8 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#each createElement as node} // (1:0) {#each createElement as node}
function create_each_block(component, state) { function create_each_block(component, ctx) {
var node = state.node, each_value = state.each_value, node_index = state.node_index; var span, text_value = ctx.node, text;
var span, text_value = node, text;
return { return {
c: function create() { c: function create() {
@ -243,11 +242,8 @@ function create_each_block(component, state) {
appendNode(text, span); appendNode(text, span);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
node = state.node; if ((changed.createElement) && text_value !== (text_value = ctx.node)) {
each_value = state.each_value;
node_index = state.node_index;
if ((changed.createElement) && text_value !== (text_value = node)) {
text.data = text_value; text.data = text_value;
} }
}, },

@ -1,15 +1,15 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, destroyEach, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, destroyEach, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var each_anchor; var each_anchor;
var each_value = state.createElement; var each_value = ctx.createElement;
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), { each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
node: each_value[i], node: each_value[i],
node_index: i node_index: i
@ -33,12 +33,12 @@ function create_main_fragment(component, state) {
insertNode(each_anchor, target, anchor); insertNode(each_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
var each_value = state.createElement; var each_value = ctx.createElement;
if (changed.createElement) { if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), { var each_context = assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
node: each_value[i], node: each_value[i],
node_index: i node_index: i
@ -76,9 +76,8 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#each createElement as node} // (1:0) {#each createElement as node}
function create_each_block(component, state) { function create_each_block(component, ctx) {
var node = state.node, each_value = state.each_value, node_index = state.node_index; var span, text_value = ctx.node, text;
var span, text_value = node, text;
return { return {
c: function create() { c: function create() {
@ -91,11 +90,8 @@ function create_each_block(component, state) {
appendNode(text, span); appendNode(text, span);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
node = state.node; if ((changed.createElement) && text_value !== (text_value = ctx.node)) {
each_value = state.each_value;
node_index = state.node_index;
if ((changed.createElement) && text_value !== (text_value = node)) {
text.data = text_value; text.data = text_value;
} }
}, },

@ -137,7 +137,7 @@ function data_1() {
function oncreate() { function oncreate() {
alert(JSON.stringify(data())); alert(JSON.stringify(data()));
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
return { return {
c: noop, c: noop,

@ -11,7 +11,7 @@ function oncreate() {
alert(JSON.stringify(data())); alert(JSON.stringify(data()));
}; };
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
return { return {
c: noop, c: noop,

@ -165,15 +165,15 @@ function bar({ foo }) {
return foo * 2; return foo * 2;
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var p, text_value = state.Math.max(0, state.foo), text, text_1, text_2; var p, text_value = ctx.Math.max(0, ctx.foo), text, text_1, text_2;
return { return {
c: function create() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText(text_value); text = createText(text_value);
text_1 = createText("\n\t"); text_1 = createText("\n\t");
text_2 = createText(state.bar); text_2 = createText(ctx.bar);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -183,13 +183,13 @@ function create_main_fragment(component, state) {
appendNode(text_2, p); appendNode(text_2, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if ((changed.Math || changed.foo) && text_value !== (text_value = state.Math.max(0, state.foo))) { if ((changed.Math || changed.foo) && text_value !== (text_value = ctx.Math.max(0, ctx.foo))) {
text.data = text_value; text.data = text_value;
} }
if (changed.bar) { if (changed.bar) {
text_2.data = state.bar; text_2.data = ctx.bar;
} }
}, },

@ -5,15 +5,15 @@ function bar({ foo }) {
return foo * 2; return foo * 2;
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var p, text_value = state.Math.max(0, state.foo), text, text_1, text_2; var p, text_value = ctx.Math.max(0, ctx.foo), text, text_1, text_2;
return { return {
c: function create() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText(text_value); text = createText(text_value);
text_1 = createText("\n\t"); text_1 = createText("\n\t");
text_2 = createText(state.bar); text_2 = createText(ctx.bar);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -23,13 +23,13 @@ function create_main_fragment(component, state) {
appendNode(text_2, p); appendNode(text_2, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if ((changed.Math || changed.foo) && text_value !== (text_value = state.Math.max(0, state.foo))) { if ((changed.Math || changed.foo) && text_value !== (text_value = ctx.Math.max(0, ctx.foo))) {
text.data = text_value; text.data = text_value;
} }
if (changed.bar) { if (changed.bar) {
text_2.data = state.bar; text_2.data = ctx.bar;
} }
}, },

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, div_1; var div, text, div_1;
return { return {
@ -152,7 +152,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
div.dataset.foo = "bar"; div.dataset.foo = "bar";
div_1.dataset.foo = state.bar; div_1.dataset.foo = ctx.bar;
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -161,9 +161,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.bar) { if (changed.bar) {
div_1.dataset.foo = state.bar; div_1.dataset.foo = ctx.bar;
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, div_1; var div, text, div_1;
return { return {
@ -14,7 +14,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
div.dataset.foo = "bar"; div.dataset.foo = "bar";
div_1.dataset.foo = state.bar; div_1.dataset.foo = ctx.bar;
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -23,9 +23,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.bar) { if (changed.bar) {
div_1.dataset.foo = state.bar; div_1.dataset.foo = ctx.bar;
} }
}, },

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, div_1; var div, text, div_1;
return { return {
@ -156,7 +156,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
setAttribute(div, "data-foo", "bar"); setAttribute(div, "data-foo", "bar");
setAttribute(div_1, "data-foo", state.bar); setAttribute(div_1, "data-foo", ctx.bar);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -165,9 +165,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.bar) { if (changed.bar) {
setAttribute(div_1, "data-foo", state.bar); setAttribute(div_1, "data-foo", ctx.bar);
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; import { assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, div_1; var div, text, div_1;
return { return {
@ -14,7 +14,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
setAttribute(div, "data-foo", "bar"); setAttribute(div, "data-foo", "bar");
setAttribute(div_1, "data-foo", state.bar); setAttribute(div_1, "data-foo", ctx.bar);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -23,9 +23,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.bar) { if (changed.bar) {
setAttribute(div_1, "data-foo", state.bar); setAttribute(div_1, "data-foo", ctx.bar);
} }
}, },

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var svg, g, g_1; var svg, g, g_1;
return { return {
@ -156,7 +156,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
setAttribute(g, "data-foo", "bar"); setAttribute(g, "data-foo", "bar");
setAttribute(g_1, "data-foo", state.bar); setAttribute(g_1, "data-foo", ctx.bar);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -165,9 +165,9 @@ function create_main_fragment(component, state) {
appendNode(g_1, svg); appendNode(g_1, svg);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.bar) { if (changed.bar) {
setAttribute(g_1, "data-foo", state.bar); setAttribute(g_1, "data-foo", ctx.bar);
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createSvgElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; import { appendNode, assign, createSvgElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var svg, g, g_1; var svg, g, g_1;
return { return {
@ -14,7 +14,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
setAttribute(g, "data-foo", "bar"); setAttribute(g, "data-foo", "bar");
setAttribute(g_1, "data-foo", state.bar); setAttribute(g_1, "data-foo", ctx.bar);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -23,9 +23,9 @@ function create_main_fragment(component, state) {
appendNode(g_1, svg); appendNode(g_1, svg);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.bar) { if (changed.bar) {
setAttribute(g_1, "data-foo", state.bar); setAttribute(g_1, "data-foo", ctx.bar);
} }
}, },

@ -155,15 +155,15 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var text, p, text_1; var text, p, text_1;
var each_value = state.comments; var each_value = ctx.comments;
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), { each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
comment: each_value[i], comment: each_value[i],
i: i i: i
@ -178,7 +178,7 @@ function create_main_fragment(component, state) {
text = createText("\n\n"); text = createText("\n\n");
p = createElement("p"); p = createElement("p");
text_1 = createText(state.foo); text_1 = createText(ctx.foo);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -191,12 +191,12 @@ function create_main_fragment(component, state) {
appendNode(text_1, p); appendNode(text_1, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
var each_value = state.comments; var each_value = ctx.comments;
if (changed.comments || changed.elapsed || changed.time) { if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), { var each_context = assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
comment: each_value[i], comment: each_value[i],
i: i i: i
@ -219,7 +219,7 @@ function create_main_fragment(component, state) {
} }
if (changed.foo) { if (changed.foo) {
text_1.data = state.foo; text_1.data = ctx.foo;
} }
}, },
@ -239,15 +239,14 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#each comments as comment, i} // (1:0) {#each comments as comment, i}
function create_each_block(component, state) { function create_each_block(component, ctx) {
var comment = state.comment, each_value = state.each_value, i = state.i; var div, strong, text, text_1, span, text_2_value = ctx.comment.author, text_2, text_3, text_4_value = ctx.elapsed(ctx.comment.time, ctx.time), text_4, text_5, text_6, raw_value = ctx.comment.html, raw_before;
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
return { return {
c: function create() { c: function create() {
div = createElement("div"); div = createElement("div");
strong = createElement("strong"); strong = createElement("strong");
text = createText(i); text = createText(ctx.i);
text_1 = createText("\n\n\t\t"); text_1 = createText("\n\n\t\t");
span = createElement("span"); span = createElement("span");
text_2 = createText(text_2_value); text_2 = createText(text_2_value);
@ -279,19 +278,16 @@ function create_each_block(component, state) {
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
comment = state.comment; if ((changed.comments) && text_2_value !== (text_2_value = ctx.comment.author)) {
each_value = state.each_value;
i = state.i;
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value; text_2.data = text_2_value;
} }
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) { if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = ctx.elapsed(ctx.comment.time, ctx.time))) {
text_4.data = text_4_value; text_4.data = text_4_value;
} }
if ((changed.comments) && raw_value !== (raw_value = comment.html)) { if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html)) {
detachAfter(raw_before); detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
} }

@ -1,15 +1,15 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var text, p, text_1; var text, p, text_1;
var each_value = state.comments; var each_value = ctx.comments;
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), { each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
comment: each_value[i], comment: each_value[i],
i: i i: i
@ -24,7 +24,7 @@ function create_main_fragment(component, state) {
text = createText("\n\n"); text = createText("\n\n");
p = createElement("p"); p = createElement("p");
text_1 = createText(state.foo); text_1 = createText(ctx.foo);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -37,12 +37,12 @@ function create_main_fragment(component, state) {
appendNode(text_1, p); appendNode(text_1, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
var each_value = state.comments; var each_value = ctx.comments;
if (changed.comments || changed.elapsed || changed.time) { if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) { for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), { var each_context = assign(assign({}, ctx), {
each_value: each_value, each_value: each_value,
comment: each_value[i], comment: each_value[i],
i: i i: i
@ -65,7 +65,7 @@ function create_main_fragment(component, state) {
} }
if (changed.foo) { if (changed.foo) {
text_1.data = state.foo; text_1.data = ctx.foo;
} }
}, },
@ -85,15 +85,14 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#each comments as comment, i} // (1:0) {#each comments as comment, i}
function create_each_block(component, state) { function create_each_block(component, ctx) {
var comment = state.comment, each_value = state.each_value, i = state.i; var div, strong, text, text_1, span, text_2_value = ctx.comment.author, text_2, text_3, text_4_value = ctx.elapsed(ctx.comment.time, ctx.time), text_4, text_5, text_6, raw_value = ctx.comment.html, raw_before;
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
return { return {
c: function create() { c: function create() {
div = createElement("div"); div = createElement("div");
strong = createElement("strong"); strong = createElement("strong");
text = createText(i); text = createText(ctx.i);
text_1 = createText("\n\n\t\t"); text_1 = createText("\n\n\t\t");
span = createElement("span"); span = createElement("span");
text_2 = createText(text_2_value); text_2 = createText(text_2_value);
@ -125,19 +124,16 @@ function create_each_block(component, state) {
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
comment = state.comment; if ((changed.comments) && text_2_value !== (text_2_value = ctx.comment.author)) {
each_value = state.each_value;
i = state.i;
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value; text_2.data = text_2_value;
} }
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) { if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = ctx.elapsed(ctx.comment.time, ctx.time))) {
text_4.data = text_4_value; text_4.data = text_4_value;
} }
if ((changed.comments) && raw_value !== (raw_value = comment.html)) { if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html)) {
detachAfter(raw_before); detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
} }

@ -144,7 +144,7 @@ var methods = {
} }
}; };
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var button, foo_handler; var button, foo_handler;
return { return {
@ -156,8 +156,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
foo_handler = foo.call(component, button, function(event) { foo_handler = foo.call(component, button, function(event) {
var state = component.get(); component.foo( ctx.bar );
component.foo( state.bar );
}); });
}, },
@ -165,7 +164,9 @@ function create_main_fragment(component, state) {
insertNode(button, target, anchor); insertNode(button, target, anchor);
}, },
p: noop, p: function(changed, _ctx) {
ctx = _ctx;
},
u: function unmount() { u: function unmount() {
detachNode(button); detachNode(button);

@ -11,7 +11,7 @@ var methods = {
} }
}; };
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var button, foo_handler; var button, foo_handler;
return { return {
@ -23,8 +23,7 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
foo_handler = foo.call(component, button, function(event) { foo_handler = foo.call(component, button, function(event) {
var state = component.get(); component.foo( ctx.bar );
component.foo( state.bar );
}); });
}, },
@ -32,7 +31,9 @@ function create_main_fragment(component, state) {
insertNode(button, target, anchor); insertNode(button, target, anchor);
}, },
p: noop, p: function update(changed, _ctx) {
ctx = _ctx;
},
u: function unmount() { u: function unmount() {
detachNode(button); detachNode(button);

@ -135,7 +135,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var meta, meta_1; var meta, meta_1;
return { return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var meta, meta_1; var meta, meta_1;
return { return {

@ -139,16 +139,16 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var if_block_anchor; var if_block_anchor;
function select_block_type(state) { function select_block_type(ctx) {
if (state.foo) return create_if_block; if (ctx.foo) return create_if_block;
return create_if_block_1; return create_if_block_1;
} }
var current_block_type = select_block_type(state); var current_block_type = select_block_type(ctx);
var if_block = current_block_type(component, state); var if_block = current_block_type(component, ctx);
return { return {
c: function create() { c: function create() {
@ -161,11 +161,11 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (current_block_type !== (current_block_type = select_block_type(state))) { if (current_block_type !== (current_block_type = select_block_type(ctx))) {
if_block.u(); if_block.u();
if_block.d(); if_block.d();
if_block = current_block_type(component, state); if_block = current_block_type(component, ctx);
if_block.c(); if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
@ -183,7 +183,7 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#if foo} // (1:0) {#if foo}
function create_if_block(component, state) { function create_if_block(component, ctx) {
var p; var p;
return { return {
@ -205,7 +205,7 @@ function create_if_block(component, state) {
} }
// (3:0) {:else} // (3:0) {:else}
function create_if_block_1(component, state) { function create_if_block_1(component, ctx) {
var p; var p;
return { return {

@ -1,16 +1,16 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createComment, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createComment, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var if_block_anchor; var if_block_anchor;
function select_block_type(state) { function select_block_type(ctx) {
if (state.foo) return create_if_block; if (ctx.foo) return create_if_block;
return create_if_block_1; return create_if_block_1;
} }
var current_block_type = select_block_type(state); var current_block_type = select_block_type(ctx);
var if_block = current_block_type(component, state); var if_block = current_block_type(component, ctx);
return { return {
c: function create() { c: function create() {
@ -23,11 +23,11 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (current_block_type !== (current_block_type = select_block_type(state))) { if (current_block_type !== (current_block_type = select_block_type(ctx))) {
if_block.u(); if_block.u();
if_block.d(); if_block.d();
if_block = current_block_type(component, state); if_block = current_block_type(component, ctx);
if_block.c(); if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
@ -45,7 +45,7 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#if foo} // (1:0) {#if foo}
function create_if_block(component, state) { function create_if_block(component, ctx) {
var p; var p;
return { return {
@ -67,7 +67,7 @@ function create_if_block(component, state) {
} }
// (3:0) {:else} // (3:0) {:else}
function create_if_block_1(component, state) { function create_if_block_1(component, ctx) {
var p; var p;
return { return {

@ -139,10 +139,10 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var if_block_anchor; var if_block_anchor;
var if_block = (state.foo) && create_if_block(component, state); var if_block = (ctx.foo) && create_if_block(component, ctx);
return { return {
c: function create() { c: function create() {
@ -155,10 +155,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (state.foo) { if (ctx.foo) {
if (!if_block) { if (!if_block) {
if_block = create_if_block(component, state); if_block = create_if_block(component, ctx);
if_block.c(); if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
@ -181,7 +181,7 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#if foo} // (1:0) {#if foo}
function create_if_block(component, state) { function create_if_block(component, ctx) {
var p; var p;
return { return {

@ -1,10 +1,10 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createComment, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createComment, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var if_block_anchor; var if_block_anchor;
var if_block = (state.foo) && create_if_block(component, state); var if_block = (ctx.foo) && create_if_block(component, ctx);
return { return {
c: function create() { c: function create() {
@ -17,10 +17,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (state.foo) { if (ctx.foo) {
if (!if_block) { if (!if_block) {
if_block = create_if_block(component, state); if_block = create_if_block(component, ctx);
if_block.c(); if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
@ -43,7 +43,7 @@ function create_main_fragment(component, state) {
} }
// (1:0) {#if foo} // (1:0) {#if foo}
function create_if_block(component, state) { function create_if_block(component, ctx) {
var p; var p;
return { return {

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {
@ -149,21 +149,21 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
} }
if (changed.x || changed.y) { if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {
@ -11,21 +11,21 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
} }
if (changed.x || changed.y) { if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
} }
}, },

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {
@ -149,16 +149,16 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.data) { if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {
@ -11,16 +11,16 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.data) { if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
} }
}, },

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {
@ -149,16 +149,16 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div; var div;
return { return {
@ -11,16 +11,16 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", ctx.color);
} }
}, },

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, div_1, div_1_style_value; var div, text, div_1, div_1_style_value;
return { return {
@ -151,8 +151,8 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
div.style.cssText = state.style; div.style.cssText = ctx.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value; div_1.style.cssText = div_1_style_value = "" + ctx.key + ": " + ctx.value;
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -161,12 +161,12 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.style) { if (changed.style) {
div.style.cssText = state.style; div.style.cssText = ctx.style;
} }
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) { if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + ctx.key + ": " + ctx.value)) {
div_1.style.cssText = div_1_style_value; div_1.style.cssText = div_1_style_value;
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, div_1, div_1_style_value; var div, text, div_1, div_1_style_value;
return { return {
@ -13,8 +13,8 @@ function create_main_fragment(component, state) {
}, },
h: function hydrate() { h: function hydrate() {
div.style.cssText = state.style; div.style.cssText = ctx.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value; div_1.style.cssText = div_1_style_value = "" + ctx.key + ": " + ctx.value;
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -23,12 +23,12 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.style) { if (changed.style) {
div.style.cssText = state.style; div.style.cssText = ctx.style;
} }
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) { if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + ctx.key + ": " + ctx.value)) {
div_1.style.cssText = div_1_style_value; div_1.style.cssText = div_1_style_value;
} }
}, },

@ -147,7 +147,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var input; var input;
function input_change_handler() { function input_change_handler() {
@ -168,11 +168,11 @@ function create_main_fragment(component, state) {
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
input.checked = state.foo; input.checked = ctx.foo;
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
input.checked = state.foo; input.checked = ctx.foo;
}, },
u: function unmount() { u: function unmount() {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js"; import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var input; var input;
function input_change_handler() { function input_change_handler() {
@ -22,11 +22,11 @@ function create_main_fragment(component, state) {
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
input.checked = state.foo; input.checked = ctx.foo;
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
input.checked = state.foo; input.checked = ctx.foo;
}, },
u: function unmount() { u: function unmount() {

@ -141,7 +141,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var input; var input;
return { return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var input; var input;
return { return {

@ -151,7 +151,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var audio, audio_is_paused = true, audio_updating = false, audio_animationframe; var audio, audio_is_paused = true, audio_updating = false, audio_animationframe;
function audio_timeupdate_handler() { function audio_timeupdate_handler() {
@ -194,28 +194,28 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
addListener(audio, "timeupdate", audio_timeupdate_handler); addListener(audio, "timeupdate", audio_timeupdate_handler);
if (!('played' in state && 'currentTime' in state)) component.root._beforecreate.push(audio_timeupdate_handler); if (!('played' in ctx && 'currentTime' in ctx)) component.root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "durationchange", audio_durationchange_handler); addListener(audio, "durationchange", audio_durationchange_handler);
if (!('duration' in state)) component.root._beforecreate.push(audio_durationchange_handler); if (!('duration' in ctx)) component.root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "play", audio_play_pause_handler); addListener(audio, "play", audio_play_pause_handler);
addListener(audio, "pause", audio_play_pause_handler); addListener(audio, "pause", audio_play_pause_handler);
addListener(audio, "progress", audio_progress_handler); addListener(audio, "progress", audio_progress_handler);
if (!('buffered' in state)) component.root._beforecreate.push(audio_progress_handler); if (!('buffered' in ctx)) component.root._beforecreate.push(audio_progress_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler); addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
if (!('buffered' in state && 'seekable' in state)) component.root._beforecreate.push(audio_loadedmetadata_handler); if (!('buffered' in ctx && 'seekable' in ctx)) component.root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "volumechange", audio_volumechange_handler); addListener(audio, "volumechange", audio_volumechange_handler);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(audio, target, anchor); insertNode(audio, target, anchor);
audio.volume = state.volume; audio.volume = ctx.volume;
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (!audio_updating && !isNaN(state.currentTime )) audio.currentTime = state.currentTime ; if (!audio_updating && !isNaN(ctx.currentTime )) audio.currentTime = ctx.currentTime ;
if (!audio_updating && audio_is_paused !== (audio_is_paused = state.paused )) audio[audio_is_paused ? "pause" : "play"](); if (!audio_updating && audio_is_paused !== (audio_is_paused = ctx.paused )) audio[audio_is_paused ? "pause" : "play"]();
if (!audio_updating && !isNaN(state.volume)) audio.volume = state.volume; if (!audio_updating && !isNaN(ctx.volume)) audio.volume = ctx.volume;
}, },
u: function unmount() { u: function unmount() {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js"; import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var audio, audio_is_paused = true, audio_updating = false, audio_animationframe; var audio, audio_is_paused = true, audio_updating = false, audio_animationframe;
function audio_timeupdate_handler() { function audio_timeupdate_handler() {
@ -44,28 +44,28 @@ function create_main_fragment(component, state) {
h: function hydrate() { h: function hydrate() {
addListener(audio, "timeupdate", audio_timeupdate_handler); addListener(audio, "timeupdate", audio_timeupdate_handler);
if (!('played' in state && 'currentTime' in state)) component.root._beforecreate.push(audio_timeupdate_handler); if (!('played' in ctx && 'currentTime' in ctx)) component.root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "durationchange", audio_durationchange_handler); addListener(audio, "durationchange", audio_durationchange_handler);
if (!('duration' in state)) component.root._beforecreate.push(audio_durationchange_handler); if (!('duration' in ctx)) component.root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "play", audio_play_pause_handler); addListener(audio, "play", audio_play_pause_handler);
addListener(audio, "pause", audio_play_pause_handler); addListener(audio, "pause", audio_play_pause_handler);
addListener(audio, "progress", audio_progress_handler); addListener(audio, "progress", audio_progress_handler);
if (!('buffered' in state)) component.root._beforecreate.push(audio_progress_handler); if (!('buffered' in ctx)) component.root._beforecreate.push(audio_progress_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler); addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
if (!('buffered' in state && 'seekable' in state)) component.root._beforecreate.push(audio_loadedmetadata_handler); if (!('buffered' in ctx && 'seekable' in ctx)) component.root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "volumechange", audio_volumechange_handler); addListener(audio, "volumechange", audio_volumechange_handler);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insertNode(audio, target, anchor); insertNode(audio, target, anchor);
audio.volume = state.volume; audio.volume = ctx.volume;
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (!audio_updating && !isNaN(state.currentTime )) audio.currentTime = state.currentTime ; if (!audio_updating && !isNaN(ctx.currentTime )) audio.currentTime = ctx.currentTime ;
if (!audio_updating && audio_is_paused !== (audio_is_paused = state.paused )) audio[audio_is_paused ? "pause" : "play"](); if (!audio_updating && audio_is_paused !== (audio_is_paused = ctx.paused )) audio[audio_is_paused ? "pause" : "play"]();
if (!audio_updating && !isNaN(state.volume)) audio.volume = state.volume; if (!audio_updating && !isNaN(ctx.volume)) audio.volume = ctx.volume;
}, },
u: function unmount() { u: function unmount() {

@ -139,7 +139,7 @@ var proto = {
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var text; var text;
var imported = new Imported({ var imported = new Imported({

@ -4,7 +4,7 @@ import Imported from 'Imported.html';
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var text; var text;
var imported = new Imported({ var imported = new Imported({

@ -139,7 +139,7 @@ function setup(Component) {
Component.prototype.foo( 'baz' ); Component.prototype.foo( 'baz' );
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
return { return {
c: noop, c: noop,

@ -17,7 +17,7 @@ function setup(Component) {
Component.prototype.foo( 'baz' ); Component.prototype.foo( 'baz' );
} }
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
return { return {
c: noop, c: noop,

@ -28,10 +28,10 @@ SvelteComponent.render = function(state, options = {}) {
}; };
}; };
SvelteComponent._render = function(__result, state, options) { SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent); __result.addComponent(SvelteComponent);
state = Object.assign({}, state); ctx = Object.assign({}, ctx);
return ``; return ``;
}; };

@ -32,10 +32,10 @@ SvelteComponent.render = function(state, options = {}) {
}; };
} }
SvelteComponent._render = function(__result, state, options) { SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent); __result.addComponent(SvelteComponent);
state = Object.assign({}, state); ctx = Object.assign({}, ctx);
return ``; return ``;
}; };

@ -25,10 +25,10 @@ SvelteComponent.render = function(state, options = {}) {
}; };
}; };
SvelteComponent._render = function(__result, state, options) { SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent); __result.addComponent(SvelteComponent);
state = Object.assign({}, state); ctx = Object.assign({}, ctx);
return `<div>content</div> return `<div>content</div>
<!-- comment --> <!-- comment -->

@ -28,10 +28,10 @@ SvelteComponent.render = function(state, options = {}) {
}; };
} }
SvelteComponent._render = function(__result, state, options) { SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent); __result.addComponent(SvelteComponent);
state = Object.assign({}, state); ctx = Object.assign({}, ctx);
return `<div>content</div> return `<div>content</div>
<!-- comment --> <!-- comment -->

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var svg, title, text; var svg, title, text;
return { return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createSvgElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createSvgElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var svg, title, text; var svg, title, text;
return { return {

@ -123,18 +123,18 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var title_value; var title_value;
document.title = title_value = "a " + state.custom + " title"; document.title = title_value = "a " + ctx.custom + " title";
return { return {
c: noop, c: noop,
m: noop, m: noop,
p: function update(changed, state) { p: function update(changed, ctx) {
if ((changed.custom) && title_value !== (title_value = "a " + state.custom + " title")) { if ((changed.custom) && title_value !== (title_value = "a " + ctx.custom + " title")) {
document.title = title_value; document.title = title_value;
} }
}, },

@ -1,18 +1,18 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, init, noop, proto } from "svelte/shared.js"; import { assign, init, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var title_value; var title_value;
document.title = title_value = "a " + state.custom + " title"; document.title = title_value = "a " + ctx.custom + " title";
return { return {
c: noop, c: noop,
m: noop, m: noop,
p: function update(changed, state) { p: function update(changed, ctx) {
if ((changed.custom) && title_value !== (title_value = "a " + state.custom + " title")) { if ((changed.custom) && title_value !== (title_value = "a " + ctx.custom + " title")) {
document.title = title_value; document.title = title_value;
} }
}, },

@ -147,18 +147,18 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor; var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(component, state); var if_block = (ctx.a) && create_if_block(component, ctx);
var if_block_1 = (state.b) && create_if_block_1(component, state); var if_block_1 = (ctx.b) && create_if_block_1(component, ctx);
var if_block_2 = (state.c) && create_if_block_2(component, state); var if_block_2 = (ctx.c) && create_if_block_2(component, ctx);
var if_block_3 = (state.d) && create_if_block_3(component, state); var if_block_3 = (ctx.d) && create_if_block_3(component, ctx);
var if_block_4 = (state.e) && create_if_block_4(component, state); var if_block_4 = (ctx.e) && create_if_block_4(component, ctx);
return { return {
c: function create() { c: function create() {
@ -199,10 +199,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_4_anchor, target, anchor); insertNode(if_block_4_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (state.a) { if (ctx.a) {
if (!if_block) { if (!if_block) {
if_block = create_if_block(component, state); if_block = create_if_block(component, ctx);
if_block.c(); if_block.c();
if_block.m(div, text); if_block.m(div, text);
} }
@ -212,9 +212,9 @@ function create_main_fragment(component, state) {
if_block = null; if_block = null;
} }
if (state.b) { if (ctx.b) {
if (!if_block_1) { if (!if_block_1) {
if_block_1 = create_if_block_1(component, state); if_block_1 = create_if_block_1(component, ctx);
if_block_1.c(); if_block_1.c();
if_block_1.m(div, text_3); if_block_1.m(div, text_3);
} }
@ -224,9 +224,9 @@ function create_main_fragment(component, state) {
if_block_1 = null; if_block_1 = null;
} }
if (state.c) { if (ctx.c) {
if (!if_block_2) { if (!if_block_2) {
if_block_2 = create_if_block_2(component, state); if_block_2 = create_if_block_2(component, ctx);
if_block_2.c(); if_block_2.c();
if_block_2.m(div, text_4); if_block_2.m(div, text_4);
} }
@ -236,9 +236,9 @@ function create_main_fragment(component, state) {
if_block_2 = null; if_block_2 = null;
} }
if (state.d) { if (ctx.d) {
if (!if_block_3) { if (!if_block_3) {
if_block_3 = create_if_block_3(component, state); if_block_3 = create_if_block_3(component, ctx);
if_block_3.c(); if_block_3.c();
if_block_3.m(div, null); if_block_3.m(div, null);
} }
@ -248,9 +248,9 @@ function create_main_fragment(component, state) {
if_block_3 = null; if_block_3 = null;
} }
if (state.e) { if (ctx.e) {
if (!if_block_4) { if (!if_block_4) {
if_block_4 = create_if_block_4(component, state); if_block_4 = create_if_block_4(component, ctx);
if_block_4.c(); if_block_4.c();
if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor); if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor);
} }
@ -283,7 +283,7 @@ function create_main_fragment(component, state) {
} }
// (2:1) {#if a} // (2:1) {#if a}
function create_if_block(component, state) { function create_if_block(component, ctx) {
var p; var p;
return { return {
@ -305,7 +305,7 @@ function create_if_block(component, state) {
} }
// (8:1) {#if b} // (8:1) {#if b}
function create_if_block_1(component, state) { function create_if_block_1(component, ctx) {
var p; var p;
return { return {
@ -327,7 +327,7 @@ function create_if_block_1(component, state) {
} }
// (12:1) {#if c} // (12:1) {#if c}
function create_if_block_2(component, state) { function create_if_block_2(component, ctx) {
var p; var p;
return { return {
@ -349,7 +349,7 @@ function create_if_block_2(component, state) {
} }
// (18:1) {#if d} // (18:1) {#if d}
function create_if_block_3(component, state) { function create_if_block_3(component, ctx) {
var p; var p;
return { return {
@ -371,7 +371,7 @@ function create_if_block_3(component, state) {
} }
// (25:0) {#if e} // (25:0) {#if e}
function create_if_block_4(component, state) { function create_if_block_4(component, ctx) {
var p; var p;
return { return {

@ -1,18 +1,18 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor; var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(component, state); var if_block = (ctx.a) && create_if_block(component, ctx);
var if_block_1 = (state.b) && create_if_block_1(component, state); var if_block_1 = (ctx.b) && create_if_block_1(component, ctx);
var if_block_2 = (state.c) && create_if_block_2(component, state); var if_block_2 = (ctx.c) && create_if_block_2(component, ctx);
var if_block_3 = (state.d) && create_if_block_3(component, state); var if_block_3 = (ctx.d) && create_if_block_3(component, ctx);
var if_block_4 = (state.e) && create_if_block_4(component, state); var if_block_4 = (ctx.e) && create_if_block_4(component, ctx);
return { return {
c: function create() { c: function create() {
@ -53,10 +53,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_4_anchor, target, anchor); insertNode(if_block_4_anchor, target, anchor);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (state.a) { if (ctx.a) {
if (!if_block) { if (!if_block) {
if_block = create_if_block(component, state); if_block = create_if_block(component, ctx);
if_block.c(); if_block.c();
if_block.m(div, text); if_block.m(div, text);
} }
@ -66,9 +66,9 @@ function create_main_fragment(component, state) {
if_block = null; if_block = null;
} }
if (state.b) { if (ctx.b) {
if (!if_block_1) { if (!if_block_1) {
if_block_1 = create_if_block_1(component, state); if_block_1 = create_if_block_1(component, ctx);
if_block_1.c(); if_block_1.c();
if_block_1.m(div, text_3); if_block_1.m(div, text_3);
} }
@ -78,9 +78,9 @@ function create_main_fragment(component, state) {
if_block_1 = null; if_block_1 = null;
} }
if (state.c) { if (ctx.c) {
if (!if_block_2) { if (!if_block_2) {
if_block_2 = create_if_block_2(component, state); if_block_2 = create_if_block_2(component, ctx);
if_block_2.c(); if_block_2.c();
if_block_2.m(div, text_4); if_block_2.m(div, text_4);
} }
@ -90,9 +90,9 @@ function create_main_fragment(component, state) {
if_block_2 = null; if_block_2 = null;
} }
if (state.d) { if (ctx.d) {
if (!if_block_3) { if (!if_block_3) {
if_block_3 = create_if_block_3(component, state); if_block_3 = create_if_block_3(component, ctx);
if_block_3.c(); if_block_3.c();
if_block_3.m(div, null); if_block_3.m(div, null);
} }
@ -102,9 +102,9 @@ function create_main_fragment(component, state) {
if_block_3 = null; if_block_3 = null;
} }
if (state.e) { if (ctx.e) {
if (!if_block_4) { if (!if_block_4) {
if_block_4 = create_if_block_4(component, state); if_block_4 = create_if_block_4(component, ctx);
if_block_4.c(); if_block_4.c();
if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor); if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor);
} }
@ -137,7 +137,7 @@ function create_main_fragment(component, state) {
} }
// (2:1) {#if a} // (2:1) {#if a}
function create_if_block(component, state) { function create_if_block(component, ctx) {
var p; var p;
return { return {
@ -159,7 +159,7 @@ function create_if_block(component, state) {
} }
// (8:1) {#if b} // (8:1) {#if b}
function create_if_block_1(component, state) { function create_if_block_1(component, ctx) {
var p; var p;
return { return {
@ -181,7 +181,7 @@ function create_if_block_1(component, state) {
} }
// (12:1) {#if c} // (12:1) {#if c}
function create_if_block_2(component, state) { function create_if_block_2(component, ctx) {
var p; var p;
return { return {
@ -203,7 +203,7 @@ function create_if_block_2(component, state) {
} }
// (18:1) {#if d} // (18:1) {#if d}
function create_if_block_3(component, state) { function create_if_block_3(component, ctx) {
var p; var p;
return { return {
@ -225,7 +225,7 @@ function create_if_block_3(component, state) {
} }
// (25:0) {#if e} // (25:0) {#if e}
function create_if_block_4(component, state) { function create_if_block_4(component, ctx) {
var p; var p;
return { return {

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1; var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1;
function onwindowscroll(event) { function onwindowscroll(event) {
@ -170,7 +170,7 @@ function create_main_fragment(component, state) {
c: function create() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText("scrolled to "); text = createText("scrolled to ");
text_1 = createText(state.y); text_1 = createText(ctx.y);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -179,9 +179,9 @@ function create_main_fragment(component, state) {
appendNode(text_1, p); appendNode(text_1, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.y) { if (changed.y) {
text_1.data = state.y; text_1.data = ctx.y;
} }
}, },

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js";
function create_main_fragment(component, state) { function create_main_fragment(component, ctx) {
var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1; var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1;
function onwindowscroll(event) { function onwindowscroll(event) {
@ -28,7 +28,7 @@ function create_main_fragment(component, state) {
c: function create() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText("scrolled to "); text = createText("scrolled to ");
text_1 = createText(state.y); text_1 = createText(ctx.y);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
@ -37,9 +37,9 @@ function create_main_fragment(component, state) {
appendNode(text_1, p); appendNode(text_1, p);
}, },
p: function update(changed, state) { p: function update(changed, ctx) {
if (changed.y) { if (changed.y) {
text_1.data = state.y; text_1.data = ctx.y;
} }
}, },

Loading…
Cancel
Save