Merge pull request #1940 from sveltejs/remove-component-references

Remove component references
pull/1941/head
Rich Harris 6 years ago committed by GitHub
commit c6d2cdddb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -104,9 +104,7 @@ export default class Block {
this.getUniqueName = this.renderer.component.getUniqueNameMaker();
this.variables = new Map();
this.aliases = new Map()
.set('component', this.getUniqueName('component'))
.set('ctx', this.getUniqueName('ctx'));
this.aliases = new Map().set('ctx', this.getUniqueName('ctx'));
if (this.key) this.aliases.set('key', this.getUniqueName('key'));
this.hasUpdateMethod = false; // determined later
@ -410,7 +408,7 @@ export default class Block {
return deindent`
${this.comment && `// ${this.comment}`}
function ${this.name}(${this.alias('component')}, ${this.key ? `${localKey}, ` : ''}ctx) {
function ${this.name}($$, ${this.key ? `${localKey}, ` : ''}ctx) {
${this.getContents(localKey)}
}
`;

@ -238,7 +238,7 @@ export default function dom(
if (component.props.length > 0 || component.has_reactive_assignments) args.push('$$props', '$$invalidate');
builder.addBlock(deindent`
function create_fragment(${component.alias('component')}, ctx) {
function create_fragment($$, ctx) {
${block.getContents()}
}

@ -135,7 +135,7 @@ export default class AwaitBlockWrapper extends Wrapper {
block.maintainContext = true;
const infoProps = [
block.alias('component') === 'component' ? 'component' : `component: #component`,
'$$',
'ctx',
'current: null',
this.pending.block.name && `pending: ${this.pending.block.name}`,

@ -216,7 +216,7 @@ export default class EachBlockWrapper extends Wrapper {
// TODO neaten this up... will end up with an empty line in the block
block.builders.init.addBlock(deindent`
if (!${this.vars.each_block_value}.${this.vars.length}) {
${each_block_else} = ${this.else.block.name}(#component, ctx);
${each_block_else} = ${this.else.block.name}($$, ctx);
${each_block_else}.c();
}
`);
@ -234,7 +234,7 @@ export default class EachBlockWrapper extends Wrapper {
if (!${this.vars.each_block_value}.${this.vars.length} && ${each_block_else}) {
${each_block_else}.p(changed, ctx);
} else if (!${this.vars.each_block_value}.${this.vars.length}) {
${each_block_else} = ${this.else.block.name}(#component, ctx);
${each_block_else} = ${this.else.block.name}($$, ctx);
${each_block_else}.c();
${each_block_else}.${mountOrIntro}(${initialMountNode}, ${this.vars.anchor});
} else if (${each_block_else}) {
@ -250,7 +250,7 @@ export default class EachBlockWrapper extends Wrapper {
${each_block_else} = null;
}
} else if (!${each_block_else}) {
${each_block_else} = ${this.else.block.name}(#component, ctx);
${each_block_else} = ${this.else.block.name}($$, ctx);
${each_block_else}.c();
${each_block_else}.${mountOrIntro}(${initialMountNode}, ${this.vars.anchor});
}
@ -307,7 +307,7 @@ export default class EachBlockWrapper extends Wrapper {
for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) {
let child_ctx = ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i);
let key = ${get_key}(child_ctx);
${blocks}[#i] = ${lookup}[key] = ${create_each_block}(#component, key, child_ctx);
${blocks}[#i] = ${lookup}[key] = ${create_each_block}($$, key, child_ctx);
}
`);
@ -343,7 +343,7 @@ export default class EachBlockWrapper extends Wrapper {
${this.block.hasOutros && `@group_outros();`}
${this.node.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].r();`}
${blocks} = @updateKeyedEach(${blocks}, #component, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, "${mountOrIntro}", ${anchor}, ${this.vars.get_each_context});
${blocks} = @updateKeyedEach(${blocks}, $$, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, "${mountOrIntro}", ${anchor}, ${this.vars.get_each_context});
${this.node.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].a();`}
`);
@ -378,7 +378,7 @@ export default class EachBlockWrapper extends Wrapper {
var ${iterations} = [];
for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) {
${iterations}[#i] = ${create_each_block}(#component, ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i));
${iterations}[#i] = ${create_each_block}($$, ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i));
}
`);
@ -440,7 +440,7 @@ export default class EachBlockWrapper extends Wrapper {
if (${iterations}[#i]) {
${iterations}[#i].p(changed, child_ctx);
} else {
${iterations}[#i] = ${create_each_block}(#component, child_ctx);
${iterations}[#i] = ${create_each_block}($$, child_ctx);
${iterations}[#i].c();
}
${iterations}[#i].i(${updateMountNode}, ${anchor});
@ -449,13 +449,13 @@ export default class EachBlockWrapper extends Wrapper {
if (${iterations}[#i]) {
${iterations}[#i].p(changed, child_ctx);
} else {
${iterations}[#i] = ${create_each_block}(#component, child_ctx);
${iterations}[#i] = ${create_each_block}($$, child_ctx);
${iterations}[#i].c();
${iterations}[#i].m(${updateMountNode}, ${anchor});
}
`
: deindent`
${iterations}[#i] = ${create_each_block}(#component, child_ctx);
${iterations}[#i] = ${create_each_block}($$, child_ctx);
${iterations}[#i].c();
${iterations}[#i].${mountOrIntro}(${updateMountNode}, ${anchor});
`;

@ -123,11 +123,11 @@ export default class BindingWrapper {
const bindingGroup = getBindingGroup(parent.renderer, this.node.expression.node);
block.builders.hydrate.addLine(
`(#component.$$.binding_groups[${bindingGroup}] || (#component.$$.binding_groups[${bindingGroup}] = [])).push(${parent.var});`
`($$.binding_groups[${bindingGroup}] || ($$.binding_groups[${bindingGroup}] = [])).push(${parent.var});`
);
block.builders.destroy.addLine(
`#component.$$.binding_groups[${bindingGroup}].splice(#component.$$.binding_groups[${bindingGroup}].indexOf(${parent.var}), 1);`
`$$.binding_groups[${bindingGroup}].splice($$.binding_groups[${bindingGroup}].indexOf(${parent.var}), 1);`
);
break;

@ -222,7 +222,7 @@ export default class IfBlockWrapper extends Wrapper {
block.builders.init.addBlock(deindent`
var ${current_block_type} = ${select_block_type}(ctx);
var ${name} = ${current_block_type_and}${current_block_type}(#component, ctx);
var ${name} = ${current_block_type_and}${current_block_type}($$, ctx);
`);
const mountOrIntro = this.branches[0].block.hasIntroMethod ? 'i' : 'm';
@ -237,7 +237,7 @@ export default class IfBlockWrapper extends Wrapper {
const changeBlock = deindent`
${if_name}${name}.d(1);
${name} = ${current_block_type_and}${current_block_type}(#component, ctx);
${name} = ${current_block_type_and}${current_block_type}($$, ctx);
${if_name}${name}.c();
${if_name}${name}.${mountOrIntro}(${updateMountNode}, ${anchor});
`;
@ -301,12 +301,12 @@ export default class IfBlockWrapper extends Wrapper {
if (hasElse) {
block.builders.init.addBlock(deindent`
${current_block_type_index} = ${select_block_type}(ctx);
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](#component, ctx);
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx);
`);
} else {
block.builders.init.addBlock(deindent`
if (~(${current_block_type_index} = ${select_block_type}(ctx))) {
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](#component, ctx);
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx);
}
`);
}
@ -332,7 +332,7 @@ export default class IfBlockWrapper extends Wrapper {
const createNewBlock = deindent`
${name} = ${if_blocks}[${current_block_type_index}];
if (!${name}) {
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](#component, ctx);
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx);
${name}.c();
}
${name}.${mountOrIntro}(${updateMountNode}, ${anchor});
@ -391,7 +391,7 @@ export default class IfBlockWrapper extends Wrapper {
const branch = this.branches[0];
block.builders.init.addBlock(deindent`
var ${name} = (${branch.condition}) && ${branch.block.name}(#component, ctx);
var ${name} = (${branch.condition}) && ${branch.block.name}($$, ctx);
`);
const mountOrIntro = branch.block.hasIntroMethod ? 'i' : 'm';
@ -410,7 +410,7 @@ export default class IfBlockWrapper extends Wrapper {
if (${name}) {
${name}.p(changed, ctx);
} else {
${name} = ${branch.block.name}(#component, ctx);
${name} = ${branch.block.name}($$, ctx);
if (${name}) ${name}.c();
}
@ -420,7 +420,7 @@ export default class IfBlockWrapper extends Wrapper {
if (${name}) {
${name}.p(changed, ctx);
} else {
${name} = ${branch.block.name}(#component, ctx);
${name} = ${branch.block.name}($$, ctx);
${name}.c();
${name}.m(${updateMountNode}, ${anchor});
}
@ -428,14 +428,14 @@ export default class IfBlockWrapper extends Wrapper {
: (branch.block.hasIntroMethod || branch.block.hasOutroMethod)
? deindent`
if (!${name}) {
${name} = ${branch.block.name}(#component, ctx);
${name} = ${branch.block.name}($$, ctx);
${name}.c();
}
${name}.i(${updateMountNode}, ${anchor});
`
: deindent`
if (!${name}) {
${name} = ${branch.block.name}(#component, ctx);
${name} = ${branch.block.name}($$, ctx);
${name}.c();
${name}.m(${updateMountNode}, ${anchor});
}

@ -46,7 +46,7 @@ export default class SlotWrapper extends Wrapper {
const content_name = block.getUniqueName(`slot_content_${sanitize(slotName)}`);
const prop = quotePropIfNecessary(slotName);
block.addVariable(content_name, `#component.$$.slotted${prop}`);
block.addVariable(content_name, `$$.slotted${prop}`);
// TODO can we use isDomNode instead of type === 'Element'?
const needsAnchorBefore = this.prev ? this.prev.node.type !== 'Element' : !parentNode;

@ -98,7 +98,7 @@ export function init(component, options, instance, create_fragment, not_equal) {
$$.update();
ready = true;
run_all($$.before_render);
$$.fragment = create_fragment(component, $$.ctx);
$$.fragment = create_fragment($$, $$.ctx);
if (options.target) {
intros.enabled = !!options.intro;

@ -1,4 +1,4 @@
import { assign, run_all, isPromise } from './utils.js';
import { assign, isPromise } from './utils.js';
import { group_outros } from './transitions.js';
import { flush } from '../internal/scheduler.js';
@ -11,7 +11,7 @@ export function handlePromise(promise, info) {
info.resolved = key && { [key]: value };
const child_ctx = assign(assign({}, info.ctx), info.resolved);
const block = type && (info.current = type)(info.component, child_ctx);
const block = type && (info.current = type)(info.$$, child_ctx);
if (info.block) {
if (info.blocks) {
@ -31,8 +31,6 @@ export function handlePromise(promise, info) {
block.c();
block[block.i ? 'i' : 'm'](info.mount(), info.anchor);
// TODO is some of this redundant?
run_all(info.component.$$.after_render);
flush();
}

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var button, foo_action, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var a, link_action, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, div_resize_listener, current;
return {

@ -8,7 +8,7 @@ function add_css() {
append(document.head, style);
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var p, text, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
var nested = new ctx.Nested({ props: { foo: [1, 2, 3] } });

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
var nested = new ctx.Nested({ props: { foo: "bar" } });

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
var nested = new ctx.Nested({ props: { foo: "bar" } });

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
var nested = new ctx.Nested({ props: { foo: "bar" } });

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
return {

@ -8,7 +8,7 @@ function add_css() {
append(document.head, style);
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteElement, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, current;
return {

@ -3,7 +3,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo
const file = undefined;
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var h1, text0, text1, text2, text3, current;
return {

@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) {
}
// (1:0) {#each things as thing}
function create_each_block(component, ctx) {
function create_each_block($$, ctx) {
var span, text0_value = ctx.thing.name, text0, text1;
return {
@ -54,7 +54,7 @@ function create_each_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var text0, p, text1, text2, current;
var each_value = ctx.things;
@ -62,7 +62,7 @@ function create_fragment(component, ctx) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i));
each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i));
}
return {
@ -104,7 +104,7 @@ function create_fragment(component, ctx) {
if (each_blocks[i]) {
each_blocks[i].p(changed, child_ctx);
} else {
each_blocks[i] = create_each_block(component, child_ctx);
each_blocks[i] = create_each_block($$, child_ctx);
each_blocks[i].c();
each_blocks[i].m(text0.parentNode, text0);
}

@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) {
}
// (1:0) {#each things as thing}
function create_each_block(component, ctx) {
function create_each_block($$, ctx) {
var span, text0_value = ctx.thing.name, text0, text1;
return {
@ -54,7 +54,7 @@ function create_each_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var text0, p, text1, text2, current;
var each_value = ctx.things;
@ -62,7 +62,7 @@ function create_fragment(component, ctx) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i));
each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i));
}
return {
@ -104,7 +104,7 @@ function create_fragment(component, ctx) {
if (each_blocks[i]) {
each_blocks[i].p(changed, child_ctx);
} else {
each_blocks[i] = create_each_block(component, child_ctx);
each_blocks[i] = create_each_block($$, child_ctx);
each_blocks[i].c();
each_blocks[i].m(text0.parentNode, text0);
}

@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) {
}
// (1:0) {#each createElement as node}
function create_each_block(component, ctx) {
function create_each_block($$, ctx) {
var span, text_value = ctx.node, text;
return {
@ -36,7 +36,7 @@ function create_each_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var each_anchor, current;
var each_value = ctx.createElement;
@ -44,7 +44,7 @@ function create_fragment(component, ctx) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i));
each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i));
}
return {
@ -75,7 +75,7 @@ function create_fragment(component, ctx) {
if (each_blocks[i]) {
each_blocks[i].p(changed, child_ctx);
} else {
each_blocks[i] = create_each_block(component, child_ctx);
each_blocks[i] = create_each_block($$, child_ctx);
each_blocks[i].c();
each_blocks[i].m(each_anchor.parentNode, each_anchor);
}

@ -2,7 +2,7 @@
import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal";
import { onMount } from "svelte";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
return {

@ -3,7 +3,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo
const file = undefined;
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div0, text, div1, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div0, text, div1, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var svg, g0, g1, current;
return {

@ -2,7 +2,7 @@
import { SvelteComponent as SvelteComponent_1, identity, init, mount_component, noop, safe_not_equal } from "svelte/internal";
import LazyLoad from "./LazyLoad.html";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
var lazyload = new LazyLoad({ props: { load: func } });

@ -9,7 +9,7 @@ function get_each_context(ctx, list, i) {
}
// (1:0) {#each comments as comment, i}
function create_each_block(component, ctx) {
function create_each_block($$, ctx) {
var div, strong, text0, text1, span, text2_value = ctx.comment.author, text2, text3, text4_value = ctx.elapsed(ctx.comment.time, ctx.time), text4, text5, text6, raw_value = ctx.comment.html, raw_before;
return {
@ -67,7 +67,7 @@ function create_each_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var text0, p, text1, current;
var each_value = ctx.comments;
@ -75,7 +75,7 @@ function create_fragment(component, ctx) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i));
each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i));
}
return {
@ -110,7 +110,7 @@ function create_fragment(component, ctx) {
if (each_blocks[i]) {
each_blocks[i].p(changed, child_ctx);
} else {
each_blocks[i] = create_each_block(component, child_ctx);
each_blocks[i] = create_each_block($$, child_ctx);
each_blocks[i].c();
each_blocks[i].m(text0.parentNode, text0);
}

@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) {
}
// (19:0) {#each things as thing (thing.id)}
function create_each_block(component, key_1, ctx) {
function create_each_block($$, key_1, ctx) {
var div, text_value = ctx.thing.name, text, rect, stop_animation = noop;
return {
@ -55,7 +55,7 @@ function create_each_block(component, key_1, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current;
var each_value = ctx.things;
@ -65,7 +65,7 @@ function create_fragment(component, ctx) {
for (var i = 0; i < each_value.length; i += 1) {
let child_ctx = get_each_context(ctx, each_value, i);
let key = get_key(child_ctx);
each_blocks_1[i] = each_lookup[key] = create_each_block(component, key, child_ctx);
each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx);
}
return {
@ -85,7 +85,7 @@ function create_fragment(component, ctx) {
p(changed, ctx) {
const each_value = ctx.things;
for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].r();
each_blocks_1 = updateKeyedEach(each_blocks_1, component, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context);
each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context);
for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].a();
},

@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) {
}
// (1:0) {#each things as thing (thing.id)}
function create_each_block(component, key_1, ctx) {
function create_each_block($$, key_1, ctx) {
var div, text_value = ctx.thing.name, text;
return {
@ -41,7 +41,7 @@ function create_each_block(component, key_1, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current;
var each_value = ctx.things;
@ -51,7 +51,7 @@ function create_fragment(component, ctx) {
for (var i = 0; i < each_value.length; i += 1) {
let child_ctx = get_each_context(ctx, each_value, i);
let key = get_key(child_ctx);
each_blocks_1[i] = each_lookup[key] = create_each_block(component, key, child_ctx);
each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx);
}
return {
@ -70,7 +70,7 @@ function create_fragment(component, ctx) {
p(changed, ctx) {
const each_value = ctx.things;
each_blocks_1 = updateKeyedEach(each_blocks_1, component, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context);
each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context);
},
i(target, anchor) {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var a, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, button0, text1, button1, text3, button2, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var meta0, meta1, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var b, text_value = get_answer(), text, current;
return {

@ -2,7 +2,7 @@
import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal";
// (3:0) {:else}
function create_else_block(component, ctx) {
function create_else_block($$, ctx) {
var p;
return {
@ -24,7 +24,7 @@ function create_else_block(component, ctx) {
}
// (1:0) {#if foo}
function create_if_block(component, ctx) {
function create_if_block($$, ctx) {
var p;
return {
@ -45,7 +45,7 @@ function create_if_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var if_block_anchor, current;
function select_block_type(ctx) {
@ -54,7 +54,7 @@ function create_fragment(component, ctx) {
}
var current_block_type = select_block_type(ctx);
var if_block = current_block_type(component, ctx);
var if_block = current_block_type($$, ctx);
return {
c() {
@ -71,7 +71,7 @@ function create_fragment(component, ctx) {
p(changed, ctx) {
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
if_block.d(1);
if_block = current_block_type(component, ctx);
if_block = current_block_type($$, ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}

@ -2,7 +2,7 @@
import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal";
// (1:0) {#if foo}
function create_if_block(component, ctx) {
function create_if_block($$, ctx) {
var p;
return {
@ -23,10 +23,10 @@ function create_if_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var if_block_anchor, current;
var if_block = (ctx.foo) && create_if_block(component, ctx);
var if_block = (ctx.foo) && create_if_block($$, ctx);
return {
c() {
@ -43,7 +43,7 @@ function create_fragment(component, ctx) {
p(changed, ctx) {
if (ctx.foo) {
if (!if_block) {
if_block = create_if_block(component, ctx);
if_block = create_if_block($$, ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div0, text, div1, div1_style_value, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var input, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var input, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var input, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var button, text1, p, text2, text3, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var button, text1, p, text2, text3, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var input, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, current, dispose;
function audio_timeupdate_handler() {

@ -2,7 +2,7 @@
import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal";
import Imported from "Imported.html";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var text, current;
var imported = new Imported({});

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var select, option0, option1, select_value_value, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, identity, init, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var svg, title, text, current;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var title_value, current;
document.title = title_value = "a " + ctx.custom + " title";

@ -2,7 +2,7 @@
import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal";
// (2:1) {#if a}
function create_if_block_4(component, ctx) {
function create_if_block_4($$, ctx) {
var p;
return {
@ -24,7 +24,7 @@ function create_if_block_4(component, ctx) {
}
// (8:1) {#if b}
function create_if_block_3(component, ctx) {
function create_if_block_3($$, ctx) {
var p;
return {
@ -46,7 +46,7 @@ function create_if_block_3(component, ctx) {
}
// (12:1) {#if c}
function create_if_block_2(component, ctx) {
function create_if_block_2($$, ctx) {
var p;
return {
@ -68,7 +68,7 @@ function create_if_block_2(component, ctx) {
}
// (18:1) {#if d}
function create_if_block_1(component, ctx) {
function create_if_block_1($$, ctx) {
var p;
return {
@ -90,7 +90,7 @@ function create_if_block_1(component, ctx) {
}
// (25:0) {#if e}
function create_if_block(component, ctx) {
function create_if_block($$, ctx) {
var p;
return {
@ -111,18 +111,18 @@ function create_if_block(component, ctx) {
};
}
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current;
var if_block0 = (ctx.a) && create_if_block_4(component, ctx);
var if_block0 = (ctx.a) && create_if_block_4($$, ctx);
var if_block1 = (ctx.b) && create_if_block_3(component, ctx);
var if_block1 = (ctx.b) && create_if_block_3($$, ctx);
var if_block2 = (ctx.c) && create_if_block_2(component, ctx);
var if_block2 = (ctx.c) && create_if_block_2($$, ctx);
var if_block3 = (ctx.d) && create_if_block_1(component, ctx);
var if_block3 = (ctx.d) && create_if_block_1($$, ctx);
var if_block4 = (ctx.e) && create_if_block(component, ctx);
var if_block4 = (ctx.e) && create_if_block($$, ctx);
return {
c() {
@ -167,7 +167,7 @@ function create_fragment(component, ctx) {
p(changed, ctx) {
if (ctx.a) {
if (!if_block0) {
if_block0 = create_if_block_4(component, ctx);
if_block0 = create_if_block_4($$, ctx);
if_block0.c();
if_block0.m(div, text0);
}
@ -178,7 +178,7 @@ function create_fragment(component, ctx) {
if (ctx.b) {
if (!if_block1) {
if_block1 = create_if_block_3(component, ctx);
if_block1 = create_if_block_3($$, ctx);
if_block1.c();
if_block1.m(div, text3);
}
@ -189,7 +189,7 @@ function create_fragment(component, ctx) {
if (ctx.c) {
if (!if_block2) {
if_block2 = create_if_block_2(component, ctx);
if_block2 = create_if_block_2($$, ctx);
if_block2.c();
if_block2.m(div, text4);
}
@ -200,7 +200,7 @@ function create_fragment(component, ctx) {
if (ctx.d) {
if (!if_block3) {
if_block3 = create_if_block_1(component, ctx);
if_block3 = create_if_block_1($$, ctx);
if_block3.c();
if_block3.m(div, null);
}
@ -211,7 +211,7 @@ function create_fragment(component, ctx) {
if (ctx.e) {
if (!if_block4) {
if_block4 = create_if_block(component, ctx);
if_block4 = create_if_block($$, ctx);
if_block4.c();
if_block4.m(if_block4_anchor.parentNode, if_block4_anchor);
}

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal";
function create_fragment(component, ctx) {
function create_fragment($$, ctx) {
var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, current, dispose;
add_render_callback(ctx.onwindowscroll);

Loading…
Cancel
Save