simplify module wrapping

pull/7738/head
Rich Harris 8 years ago
parent 8f5303ad30
commit c765ec6acc

@ -8,7 +8,7 @@ import globalWhitelist from '../utils/globalWhitelist';
import reservedNames from '../utils/reservedNames';
import namespaces from '../utils/namespaces';
import { removeNode, removeObjectKey } from '../utils/removeNode';
import getModuleWrapper from './shared/utils/getModuleWrapper';
import wrapModule from './shared/utils/wrapModule';
import annotateWithScopes from '../utils/annotateWithScopes';
import clone from '../utils/clone';
import DomBlock from './dom/Block';
@ -305,7 +305,9 @@ export default class Generator {
generate(result: string, options: CompileOptions, { banner = '', sharedPath, helpers, name, format }: GenerateOptions ) {
const pattern = /\[✂(\d+)-(\d+)$/;
const parts = result.split('✂]');
const module = wrapModule(result, format, name, options, banner, sharedPath, helpers, this.imports, this.source);
const parts = module.split('✂]');
const finalChunk = parts.pop();
const compiled = new Bundle({ separator: '' });
@ -316,10 +318,6 @@ export default class Generator {
});
}
const { intro, outro } = getModuleWrapper(format, name, options, banner, sharedPath, helpers, this.imports, this.source);
addString(intro + '\n\n');
const { filename } = options;
// special case — the source file doesn't actually get used anywhere. we need
@ -346,7 +344,6 @@ export default class Generator {
});
addString(finalChunk);
addString('\n\n' + outro);
const { css, cssMap } = this.customElement ?
{ css: null, cssMap: null } :

@ -407,17 +407,17 @@ export default function dom(
// special case
const global = `_svelteTransitionManager`;
inlineHelpers += `var ${generator.alias('transitionManager')} = window.${global} || (window.${global} = ${code});\n\n`;
inlineHelpers += `\n\nvar ${generator.alias('transitionManager')} = window.${global} || (window.${global} = ${code});\n\n`;
} else {
const alias = generator.alias(expression.id.name);
if (alias !== expression.id.name)
code.overwrite(expression.id.start, expression.id.end, alias);
inlineHelpers += `${code}\n\n`;
inlineHelpers += `\n\n${code}`;
}
});
result = inlineHelpers + result;
result += inlineHelpers;
}
const filename = options.filename && (

@ -7,7 +7,10 @@ interface Dependency {
source: string;
}
export default function getModuleWrapper(
const wrappers = { es, amd, cjs, iife, umd, eval: expr };
export default function wrapModule(
code: string,
format: ModuleFormat,
name: string,
options: CompileOptions,
@ -16,8 +19,8 @@ export default function getModuleWrapper(
helpers: { name: string, alias: string }[],
imports: Node[],
source: string
) {
if (format === 'es') return getEsWrapper(name, options, banner, sharedPath, helpers, imports, source);
): string {
if (format === 'es') return es(code, name, options, banner, sharedPath, helpers, imports, source);
const dependencies = imports.map((declaration, i) => {
const defaultImport = declaration.specifiers.find(
@ -56,16 +59,17 @@ export default function getModuleWrapper(
return { name, statements, source: declaration.source.value };
});
if (format === 'amd') return getAmdWrapper(name, options, banner, dependencies);
if (format === 'cjs') return getCjsWrapper(name, options, banner, sharedPath, helpers, dependencies);
if (format === 'iife') return getIifeWrapper(name, options, banner, dependencies);
if (format === 'umd') return getUmdWrapper(name, options, banner, dependencies);
if (format === 'eval') return getEvalWrapper(name, options, banner, dependencies);
if (format === 'amd') return amd(code, name, options, banner, dependencies);
if (format === 'cjs') return cjs(code, name, options, banner, sharedPath, helpers, dependencies);
if (format === 'iife') return iife(code, name, options, banner, dependencies);
if (format === 'umd') return umd(code, name, options, banner, dependencies);
if (format === 'eval') return expr(code, name, options, banner, dependencies);
throw new Error(`Not implemented: ${format}`);
}
function getEsWrapper(
function es(
code: string,
name: string,
options: CompileOptions,
banner: string,
@ -78,25 +82,25 @@ function getEsWrapper(
`import { ${helpers.map(h => h.name === h.alias ? h.name : `${h.name} as ${h.alias}`).join(', ')} } from ${JSON.stringify(sharedPath)};`
);
const importBlock = imports
.map((declaration: Node) => source.slice(declaration.start, declaration.end))
.join('\n');
const importBlock = imports.length > 0 && (
imports
.map((declaration: Node) => source.slice(declaration.start, declaration.end))
.join('\n')
);
return {
intro: deindent`
${banner}
${importHelpers}
${importBlock}
return deindent`
${banner}
${importHelpers}
${importBlock}
export default (function() {
`,
outro: deindent`
export default (function() {
${code}
return ${name};
}());`
};
}());`;
}
function getAmdWrapper(
function amd(
code: string,
name: string,
options: CompileOptions,
banner: string,
@ -108,20 +112,17 @@ function getAmdWrapper(
const id = options.amd && options.amd.id;
return {
intro: deindent`
define(${id ? `"${id}", ` : ''}${sourceString}function(${paramString(dependencies)}) { "use strict";
return deindent`
define(${id ? `"${id}", ` : ''}${sourceString}function(${paramString(dependencies)}) { "use strict";
${getCompatibilityStatements(dependencies)}
`,
outro: deindent`
${code}
return ${name};
});`
};
});`;
}
function getCjsWrapper(
function cjs(
code: string,
name: string,
options: CompileOptions,
banner: string,
@ -137,33 +138,27 @@ function getCjsWrapper(
}).join('\n')
);
const requireBlock = dependencies
.map(d => `var ${d.name} = require("${d.source}");`)
.join('\n\n');
const intro = requireBlock ?
deindent`
${banner}
"use strict";
${helperBlock}
${requireBlock}
${getCompatibilityStatements(dependencies)}
const requireBlock = dependencies.length > 0 && (
dependencies
.map(d => `var ${d.name} = require("${d.source}");`)
.join('\n\n')
);
` :
deindent`
${banner}
"use strict";
return deindent`
${banner}
"use strict";
${helperBlock}
`;
${helperBlock}
${requireBlock}
${getCompatibilityStatements(dependencies)}
const outro = `module.exports = ${name};`
${code}
return { intro, outro };
module.exports = ${name};`
}
function getIifeWrapper(
function iife(
code: string,
name: string,
options: CompileOptions,
banner: string,
@ -175,22 +170,18 @@ function getIifeWrapper(
const globals = getGlobals(dependencies, options);
return {
intro: deindent`
${banner}
var ${options.name} = (function(${paramString(dependencies)}) { "use strict";
return deindent`
${banner}
var ${options.name} = (function(${paramString(dependencies)}) { "use strict";
${getCompatibilityStatements(dependencies)}
`,
outro: deindent`
${code}
return ${name};
}(${globals.join(', ')}));`
};
}(${globals.join(', ')}));`;
}
function getUmdWrapper(
function umd(
code: string,
name: string,
options: CompileOptions,
banner: string,
@ -212,27 +203,25 @@ function getUmdWrapper(
const globals = getGlobals(dependencies, options);
return {
intro: deindent`
${banner}
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(${cjsDeps}) :
typeof define === "function" && define.amd ? define(${amdId}${amdDeps}factory) :
(global.${options.name} = factory(${globals}));
}(this, (function (${paramString(dependencies)}) { "use strict";
return deindent`
${banner}
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(${cjsDeps}) :
typeof define === "function" && define.amd ? define(${amdId}${amdDeps}factory) :
(global.${options.name} = factory(${globals}));
}(this, (function (${paramString(dependencies)}) { "use strict";
${getCompatibilityStatements(dependencies)}
`,
${code}
outro: deindent`
return ${name};
})));`
};
})));`;
}
function getEvalWrapper(
function expr(
code: string,
name: string,
options: CompileOptions,
banner: string,
@ -240,17 +229,16 @@ function getEvalWrapper(
) {
const globals = getGlobals(dependencies, options);
return {
intro: deindent`
(function (${paramString(dependencies)}) { "use strict";
return deindent`
(function (${paramString(dependencies)}) { "use strict";
${banner}
${getCompatibilityStatements(dependencies)}
`,
${code}
outro: `return ${name};\n\n}(${globals.join(', ')}))`
};
return ${name};
}(${globals.join(', ')}))`;
}
function paramString(dependencies: Dependency[]) {

@ -191,8 +191,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
data: function () {
return { foo: 42 }
@ -200,67 +199,66 @@ var template = (function() {
};
}());
function encapsulateStyles(node) {
setAttribute(node, "svelte-3590263702", "");
}
function add_css() {
var style = createElement("style");
style.id = 'svelte-3590263702-style';
style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}";
appendNode(style, document.head);
}
function encapsulateStyles(node) {
setAttribute(node, "svelte-3590263702", "");
}
function create_main_fragment(state, component) {
var p, text;
function add_css() {
var style = createElement("style");
style.id = 'svelte-3590263702-style';
style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}";
appendNode(style, document.head);
}
return {
create: function() {
p = createElement("p");
text = createText(state.foo);
this.hydrate();
},
hydrate: function() {
encapsulateStyles(p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
update: function(changed, state) {
if (changed.foo) {
text.data = state.foo;
}
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function create_main_fragment(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText(state.foo);
this.hydrate();
},
hydrate: function() {
encapsulateStyles(p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
update: function(changed, state) {
if (changed.foo) {
text.data = state.foo;
}
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = assign(template.data(), options.data);
function SvelteComponent(options) {
init(this, options);
this._state = assign(template.data(), options.data);
if (!document.getElementById("svelte-3590263702-style")) add_css();
if (!document.getElementById("svelte-3590263702-style")) add_css();
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
export default (function() {
var template = (function() {
var template = (function() {
return {
data: function () {
return { foo: 42 }
@ -12,65 +10,64 @@ var template = (function() {
};
}());
function encapsulateStyles(node) {
setAttribute(node, "svelte-3590263702", "");
}
function add_css() {
var style = createElement("style");
style.id = 'svelte-3590263702-style';
style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}";
appendNode(style, document.head);
}
function create_main_fragment(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText(state.foo);
this.hydrate();
},
hydrate: function() {
encapsulateStyles(p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
update: function(changed, state) {
if (changed.foo) {
text.data = state.foo;
}
},
function encapsulateStyles(node) {
setAttribute(node, "svelte-3590263702", "");
}
unmount: function() {
detachNode(p);
},
function add_css() {
var style = createElement("style");
style.id = 'svelte-3590263702-style';
style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}";
appendNode(style, document.head);
}
destroy: noop
};
}
function create_main_fragment(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText(state.foo);
this.hydrate();
},
hydrate: function() {
encapsulateStyles(p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
update: function(changed, state) {
if (changed.foo) {
text.data = state.foo;
}
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = assign(template.data(), options.data);
function SvelteComponent(options) {
init(this, options);
this._state = assign(template.data(), options.data);
if (!document.getElementById("svelte-3590263702-style")) add_css();
if (!document.getElementById("svelte-3590263702-style")) add_css();
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -167,8 +167,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
components: {
Nested: window.Nested
@ -176,61 +175,60 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
var nested = new template.components.Nested({
_root: component._root,
data: { foo: "bar" }
});
var nested = new template.components.Nested({
_root: component._root,
data: { foo: "bar" }
});
return {
create: function() {
nested._fragment.create();
},
return {
create: function() {
nested._fragment.create();
},
mount: function(target, anchor) {
nested._mount(target, anchor);
},
mount: function(target, anchor) {
nested._mount(target, anchor);
},
update: noop,
update: noop,
unmount: function() {
nested._unmount();
},
unmount: function() {
nested._unmount();
},
destroy: function() {
nested.destroy(false);
}
};
}
destroy: function() {
nested.destroy(false);
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */
import { assign, callAll, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() {
var template = (function() {
return {
components: {
Nested: window.Nested
@ -12,59 +10,58 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
var nested = new template.components.Nested({
_root: component._root,
data: { foo: "bar" }
});
var nested = new template.components.Nested({
_root: component._root,
data: { foo: "bar" }
});
return {
create: function() {
nested._fragment.create();
},
return {
create: function() {
nested._fragment.create();
},
mount: function(target, anchor) {
nested._mount(target, anchor);
},
mount: function(target, anchor) {
nested._mount(target, anchor);
},
update: noop,
update: noop,
unmount: function() {
nested._unmount();
},
unmount: function() {
nested._unmount();
},
destroy: function() {
nested.destroy(false);
}
};
}
destroy: function() {
nested.destroy(false);
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -167,8 +167,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
computed: {
a: x => x * 2,
@ -177,44 +176,43 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
return {
create: noop,
return {
create: noop,
mount: noop,
mount: noop,
update: noop,
update: noop,
unmount: noop,
unmount: noop,
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._recompute({ x: 1 }, this._state);
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._recompute({ x: 1 }, this._state);
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._recompute = function _recompute(changed, state) {
if (changed.x) {
if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true;
if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true;
}
};
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
SvelteComponent.prototype._recompute = function _recompute(changed, state) {
if (changed.x) {
if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true;
if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true;
}
};
return SvelteComponent;
}());
export default _actual;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */
import { assign, differs, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() {
var template = (function() {
return {
computed: {
a: x => x * 2,
@ -13,42 +11,41 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
return {
create: noop,
return {
create: noop,
mount: noop,
mount: noop,
update: noop,
update: noop,
unmount: noop,
unmount: noop,
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._recompute({ x: 1 }, this._state);
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._recompute({ x: 1 }, this._state);
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._recompute = function _recompute(changed, state) {
if (changed.x) {
if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true;
if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true;
SvelteComponent.prototype._recompute = function _recompute(changed, state) {
if (changed.x) {
if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true;
if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true;
}
}
}
return SvelteComponent;
return SvelteComponent;
}());

@ -187,62 +187,60 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function encapsulateStyles(node) {
setAttribute(node, "svelte-2363328337", "");
}
function encapsulateStyles(node) {
setAttribute(node, "svelte-2363328337", "");
}
function add_css() {
var style = createElement("style");
style.id = 'svelte-2363328337-style';
style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}";
appendNode(style, document.head);
}
function add_css() {
var style = createElement("style");
style.id = 'svelte-2363328337-style';
style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}";
appendNode(style, document.head);
}
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
encapsulateStyles(div);
},
hydrate: function() {
encapsulateStyles(div);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: noop,
update: noop,
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!document.getElementById("svelte-2363328337-style")) add_css();
if (!document.getElementById("svelte-2363328337-style")) add_css();
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,62 +1,59 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
export default (function() {
function encapsulateStyles(node) {
setAttribute(node, "svelte-2363328337", "");
}
function encapsulateStyles(node) {
setAttribute(node, "svelte-2363328337", "");
}
function add_css() {
var style = createElement("style");
style.id = 'svelte-2363328337-style';
style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}";
appendNode(style, document.head);
}
function add_css() {
var style = createElement("style");
style.id = 'svelte-2363328337-style';
style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}";
appendNode(style, document.head);
}
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
encapsulateStyles(div);
},
hydrate: function() {
encapsulateStyles(div);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: noop,
update: noop,
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!document.getElementById("svelte-2363328337-style")) add_css();
if (!document.getElementById("svelte-2363328337-style")) add_css();
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -187,69 +187,67 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div, text;
function create_main_fragment(state, component) {
var div, text;
return {
create: function() {
div = createElement("div");
text = createText("fades in");
},
return {
create: function() {
div = createElement("div");
text = createText("fades in");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
},
update: noop,
update: noop,
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
class SvelteComponent extends HTMLElement {
constructor(options = {}) {
super();
init(this, options);
this._state = options.data || {};
class SvelteComponent extends HTMLElement {
constructor(options = {}) {
super();
init(this, options);
this._state = options.data || {};
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
this._fragment.create();
this._fragment.mount(this.shadowRoot, null);
this._fragment.create();
this._fragment.mount(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null);
}
if (options.target) this._mount(options.target, options.anchor || null);
}
static get observedAttributes() {
return [];
}
static get observedAttributes() {
return [];
}
attributeChangedCallback(attr, oldValue, newValue) {
this.set({ [attr]: newValue });
attributeChangedCallback(attr, oldValue, newValue) {
this.set({ [attr]: newValue });
}
}
}
customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},
_unmount() {
this.parentNode.removeChild(this);
}
});
customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},
return SvelteComponent;
_unmount() {
this.parentNode.removeChild(this);
}
});
return SvelteComponent;
}());
export default _actual;

@ -1,69 +1,66 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div, text;
function create_main_fragment(state, component) {
var div, text;
return {
create: function() {
div = createElement("div");
text = createText("fades in");
},
return {
create: function() {
div = createElement("div");
text = createText("fades in");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(text, div);
},
update: noop,
update: noop,
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
class SvelteComponent extends HTMLElement {
constructor(options = {}) {
super();
init(this, options);
this._state = options.data || {};
class SvelteComponent extends HTMLElement {
constructor(options = {}) {
super();
init(this, options);
this._state = options.data || {};
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
this._fragment.create();
this._fragment.mount(this.shadowRoot, null);
this._fragment.create();
this._fragment.mount(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null);
}
if (options.target) this._mount(options.target, options.anchor || null);
}
static get observedAttributes() {
return [];
}
static get observedAttributes() {
return [];
attributeChangedCallback(attr, oldValue, newValue) {
this.set({ [attr]: newValue });
}
}
attributeChangedCallback(attr, oldValue, newValue) {
this.set({ [attr]: newValue });
}
}
customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},
_unmount() {
this.parentNode.removeChild(this);
}
});
customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},
return SvelteComponent;
_unmount() {
this.parentNode.removeChild(this);
}
});
return SvelteComponent;
}());

@ -200,160 +200,158 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var text, p, text_1;
function create_main_fragment(state, component) {
var text, p, text_1;
var comments = state.comments;
var comments = state.comments;
var each_blocks = [];
var each_blocks = [];
for (var i = 0; i < comments.length; i += 1) {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
}
for (var i = 0; i < comments.length; i += 1) {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
}
return {
create: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create();
}
return {
create: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create();
}
text = createText("\n\n");
p = createElement("p");
text_1 = createText(state.foo);
},
text = createText("\n\n");
p = createElement("p");
text_1 = createText(state.foo);
},
mount: function(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].mount(target, anchor);
}
mount: function(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].mount(target, anchor);
}
insertNode(text, target, anchor);
insertNode(p, target, anchor);
appendNode(text_1, p);
},
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
}
}
insertNode(text, target, anchor);
insertNode(p, target, anchor);
appendNode(text_1, p);
},
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
for (; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
each_blocks[i].destroy();
}
each_blocks.length = comments.length;
}
for (; i < each_blocks.length; i += 1) {
if (changed.foo) {
text_1.data = state.foo;
}
},
unmount: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
each_blocks[i].destroy();
}
each_blocks.length = comments.length;
}
if (changed.foo) {
text_1.data = state.foo;
}
},
detachNode(text);
detachNode(p);
},
unmount: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
destroy: function() {
destroyEach(each_blocks, false, 0);
}
};
}
detachNode(text);
detachNode(p);
},
destroy: function() {
destroyEach(each_blocks, false, 0);
}
};
}
// (1:0) {{#each comments as comment, i}}
function create_each_block(state, comments, comment, i, component) {
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 {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
// (1:0) {{#each comments as comment, i}}
function create_each_block(state, comments, comment, i, component) {
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;
update: function(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value;
}
return {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
update: function(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
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))) {
text_4.data = text_4_value;
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
text_4.data = text_4_value;
}
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}
},
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
unmount: function() {
detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}
},
unmount: function() {
detachAfter(raw_before);
detachNode(div);
},
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,160 +1,157 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var text, p, text_1;
function create_main_fragment(state, component) {
var text, p, text_1;
var comments = state.comments;
var comments = state.comments;
var each_blocks = [];
var each_blocks = [];
for (var i = 0; i < comments.length; i += 1) {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
}
for (var i = 0; i < comments.length; i += 1) {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
}
return {
create: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create();
}
return {
create: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create();
}
text = createText("\n\n");
p = createElement("p");
text_1 = createText(state.foo);
},
text = createText("\n\n");
p = createElement("p");
text_1 = createText(state.foo);
},
mount: function(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].mount(target, anchor);
}
mount: function(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].mount(target, anchor);
}
insertNode(text, target, anchor);
insertNode(p, target, anchor);
appendNode(text_1, p);
},
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
}
}
insertNode(text, target, anchor);
insertNode(p, target, anchor);
appendNode(text_1, p);
},
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
for (; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
each_blocks[i].destroy();
}
each_blocks.length = comments.length;
}
if (changed.foo) {
text_1.data = state.foo;
}
},
for (; i < each_blocks.length; i += 1) {
unmount: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
each_blocks[i].destroy();
}
each_blocks.length = comments.length;
}
if (changed.foo) {
text_1.data = state.foo;
}
},
detachNode(text);
detachNode(p);
},
unmount: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
destroy: function() {
destroyEach(each_blocks, false, 0);
}
};
}
detachNode(text);
detachNode(p);
},
// (1:0) {{#each comments as comment, i}}
function create_each_block(state, comments, comment, i, component) {
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 {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
destroy: function() {
destroyEach(each_blocks, false, 0);
}
};
}
// (1:0) {{#each comments as comment, i}}
function create_each_block(state, comments, comment, i, component) {
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 {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
update: function(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value;
}
update: function(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
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))) {
text_4.data = text_4_value;
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
text_4.data = text_4_value;
}
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}
},
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}
},
unmount: function() {
detachAfter(raw_before);
unmount: function() {
detachAfter(raw_before);
detachNode(div);
},
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -187,8 +187,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
methods: {
foo ( bar ) {
@ -203,55 +202,54 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
var button, foo_handler, text;
function create_main_fragment(state, component) {
var button, foo_handler, text;
return {
create: function() {
button = createElement("button");
text = createText("foo");
this.hydrate();
},
return {
create: function() {
button = createElement("button");
text = createText("foo");
this.hydrate();
},
hydrate: function() {
foo_handler = template.events.foo.call(component, button, function(event) {
var state = component.get();
component.foo( state.bar );
});
},
hydrate: function() {
foo_handler = template.events.foo.call(component, button, function(event) {
var state = component.get();
component.foo( state.bar );
});
},
mount: function(target, anchor) {
insertNode(button, target, anchor);
appendNode(text, button);
},
mount: function(target, anchor) {
insertNode(button, target, anchor);
appendNode(text, button);
},
update: noop,
update: noop,
unmount: function() {
detachNode(button);
},
unmount: function() {
detachNode(button);
},
destroy: function() {
foo_handler.teardown();
}
};
}
destroy: function() {
foo_handler.teardown();
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() {
var template = (function() {
return {
methods: {
foo ( bar ) {
@ -19,53 +17,52 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
var button, foo_handler, text;
function create_main_fragment(state, component) {
var button, foo_handler, text;
return {
create: function() {
button = createElement("button");
text = createText("foo");
this.hydrate();
},
return {
create: function() {
button = createElement("button");
text = createText("foo");
this.hydrate();
},
hydrate: function() {
foo_handler = template.events.foo.call(component, button, function(event) {
var state = component.get();
component.foo( state.bar );
});
},
hydrate: function() {
foo_handler = template.events.foo.call(component, button, function(event) {
var state = component.get();
component.foo( state.bar );
});
},
mount: function(target, anchor) {
insertNode(button, target, anchor);
appendNode(text, button);
},
mount: function(target, anchor) {
insertNode(button, target, anchor);
appendNode(text, button);
},
update: noop,
update: noop,
unmount: function() {
detachNode(button);
},
unmount: function() {
detachNode(button);
},
destroy: function() {
foo_handler.teardown();
}
};
}
destroy: function() {
foo_handler.teardown();
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
}());

@ -191,111 +191,109 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var if_block_anchor;
function create_main_fragment(state, component) {
var if_block_anchor;
var current_block_type = select_block_type(state);
var if_block = current_block_type(state, component);
var current_block_type = select_block_type(state);
var if_block = current_block_type(state, component);
return {
create: function() {
if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
return {
create: function() {
if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
if_block.unmount();
if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
},
unmount: function() {
if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() {
if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
},
unmount: function() {
if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() {
if_block.destroy();
}
};
}
};
}
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
// (3:0) {{else}}
function create_if_block_1(state, component) {
var p, text;
// (3:0) {{else}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("not foo!");
},
return {
create: function() {
p = createElement("p");
text = createText("not foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
function select_block_type(state) {
if (state.foo) return create_if_block;
return create_if_block_1;
}
function select_block_type(state) {
if (state.foo) return create_if_block;
return create_if_block_1;
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,111 +1,108 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var if_block_anchor;
function create_main_fragment(state, component) {
var if_block_anchor;
var current_block_type = select_block_type(state);
var if_block = current_block_type(state, component);
return {
create: function() {
if_block.create();
if_block_anchor = createComment();
},
var current_block_type = select_block_type(state);
var if_block = current_block_type(state, component);
mount: function(target, anchor) {
if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
return {
create: function() {
if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
if_block.unmount();
if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
},
unmount: function() {
if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() {
if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
},
};
}
unmount: function() {
if_block.unmount();
detachNode(if_block_anchor);
},
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
destroy: function() {
if_block.destroy();
}
};
}
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (3:0) {{else}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("not foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function select_block_type(state) {
if (state.foo) return create_if_block;
return create_if_block_1;
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
}
assign(SvelteComponent.prototype, proto);
// (3:0) {{else}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("not foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function select_block_type(state) {
if (state.foo) return create_if_block;
return create_if_block_1;
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -191,86 +191,84 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var if_block_anchor;
var if_block = (state.foo) && create_if_block(state, component);
return {
create: function() {
if (if_block) if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if (if_block) if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (state.foo) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
function create_main_fragment(state, component) {
var if_block_anchor;
var if_block = (state.foo) && create_if_block(state, component);
return {
create: function() {
if (if_block) if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if (if_block) if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (state.foo) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
},
},
unmount: function() {
if (if_block) if_block.unmount();
detachNode(if_block_anchor);
},
unmount: function() {
if (if_block) if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
}
};
}
destroy: function() {
if (if_block) if_block.destroy();
}
};
}
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,86 +1,83 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var if_block_anchor;
var if_block = (state.foo) && create_if_block(state, component);
return {
create: function() {
if (if_block) if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if (if_block) if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (state.foo) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
function create_main_fragment(state, component) {
var if_block_anchor;
var if_block = (state.foo) && create_if_block(state, component);
return {
create: function() {
if (if_block) if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if (if_block) if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (state.foo) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
},
},
unmount: function() {
if (if_block) if_block.unmount();
detachNode(if_block_anchor);
},
unmount: function() {
if (if_block) if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
}
};
}
destroy: function() {
if (if_block) if_block.destroy();
}
};
}
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -183,58 +183,56 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.color) {
hydrate: function() {
setStyle(div, "color", state.color);
}
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}
},
},
unmount: function() {
detachNode(div);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
destroy: noop
};
}
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}
},
this._fragment = create_main_fragment(this._state, this);
unmount: function() {
detachNode(div);
},
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
destroy: noop
};
}
}
assign(SvelteComponent.prototype, proto);
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,58 +1,55 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
update: function(changed, state) {
if (changed.color) {
hydrate: function() {
setStyle(div, "color", state.color);
}
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}
},
},
unmount: function() {
detachNode(div);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
destroy: noop
};
}
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}
},
this._fragment = create_main_fragment(this._state, this);
unmount: function() {
detachNode(div);
},
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
destroy: noop
};
}
}
assign(SvelteComponent.prototype, proto);
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -183,53 +183,51 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
},
hydrate: function() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}
},
update: function(changed, state) {
if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}
},
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,53 +1,50 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
},
hydrate: function() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}
},
update: function(changed, state) {
if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}
},
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -183,53 +183,51 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
setStyle(div, "color", state.color);
},
hydrate: function() {
setStyle(div, "color", state.color);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
},
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,53 +1,50 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
hydrate: function() {
setStyle(div, "color", state.color);
},
hydrate: function() {
setStyle(div, "color", state.color);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
},
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -183,64 +183,62 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div, text, div_1, div_1_style_value;
return {
create: function() {
div = createElement("div");
text = createText("\n");
div_1 = createElement("div");
this.hydrate();
},
hydrate: function() {
div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
function create_main_fragment(state, component) {
var div, text, div_1, div_1_style_value;
return {
create: function() {
div = createElement("div");
text = createText("\n");
div_1 = createElement("div");
this.hydrate();
},
hydrate: function() {
div.style.cssText = state.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value;
}
},
unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
destroy: noop
};
}
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
div.style.cssText = state.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value;
}
},
unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,64 +1,61 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div, text, div_1, div_1_style_value;
return {
create: function() {
div = createElement("div");
text = createText("\n");
div_1 = createElement("div");
this.hydrate();
},
hydrate: function() {
div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
function create_main_fragment(state, component) {
var div, text, div_1, div_1_style_value;
return {
create: function() {
div = createElement("div");
text = createText("\n");
div_1 = createElement("div");
this.hydrate();
},
hydrate: function() {
div.style.cssText = state.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value;
}
},
unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
destroy: noop
};
}
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
div.style.cssText = state.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value;
}
},
unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -187,60 +187,58 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var input;
function create_main_fragment(state, component) {
var input;
function input_change_handler() {
component.set({ foo: input.checked });
}
function input_change_handler() {
component.set({ foo: input.checked });
}
return {
create: function() {
input = createElement("input");
this.hydrate();
},
return {
create: function() {
input = createElement("input");
this.hydrate();
},
hydrate: function() {
input.type = "checkbox";
addListener(input, "change", input_change_handler);
},
hydrate: function() {
input.type = "checkbox";
addListener(input, "change", input_change_handler);
},
mount: function(target, anchor) {
insertNode(input, target, anchor);
mount: function(target, anchor) {
insertNode(input, target, anchor);
input.checked = state.foo;
},
input.checked = state.foo;
},
update: function(changed, state) {
input.checked = state.foo;
},
update: function(changed, state) {
input.checked = state.foo;
},
unmount: function() {
detachNode(input);
},
unmount: function() {
detachNode(input);
},
destroy: function() {
removeListener(input, "change", input_change_handler);
}
};
}
destroy: function() {
removeListener(input, "change", input_change_handler);
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,60 +1,57 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var input;
function create_main_fragment(state, component) {
var input;
function input_change_handler() {
component.set({ foo: input.checked });
}
function input_change_handler() {
component.set({ foo: input.checked });
}
return {
create: function() {
input = createElement("input");
this.hydrate();
},
return {
create: function() {
input = createElement("input");
this.hydrate();
},
hydrate: function() {
input.type = "checkbox";
addListener(input, "change", input_change_handler);
},
hydrate: function() {
input.type = "checkbox";
addListener(input, "change", input_change_handler);
},
mount: function(target, anchor) {
insertNode(input, target, anchor);
mount: function(target, anchor) {
insertNode(input, target, anchor);
input.checked = state.foo;
},
input.checked = state.foo;
},
update: function(changed, state) {
input.checked = state.foo;
},
update: function(changed, state) {
input.checked = state.foo;
},
unmount: function() {
detachNode(input);
},
unmount: function() {
detachNode(input);
},
destroy: function() {
removeListener(input, "change", input_change_handler);
}
};
}
destroy: function() {
removeListener(input, "change", input_change_handler);
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -185,49 +185,47 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var input;
function create_main_fragment(state, component) {
var input;
return {
create: function() {
input = createElement("input");
this.hydrate();
},
return {
create: function() {
input = createElement("input");
this.hydrate();
},
hydrate: function() {
setInputType(input, "search");
},
hydrate: function() {
setInputType(input, "search");
},
mount: function(target, anchor) {
insertNode(input, target, anchor);
},
mount: function(target, anchor) {
insertNode(input, target, anchor);
},
update: noop,
update: noop,
unmount: function() {
detachNode(input);
},
unmount: function() {
detachNode(input);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,49 +1,46 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var input;
function create_main_fragment(state, component) {
var input;
return {
create: function() {
input = createElement("input");
this.hydrate();
},
return {
create: function() {
input = createElement("input");
this.hydrate();
},
hydrate: function() {
setInputType(input, "search");
},
hydrate: function() {
setInputType(input, "search");
},
mount: function(target, anchor) {
insertNode(input, target, anchor);
},
mount: function(target, anchor) {
insertNode(input, target, anchor);
},
update: noop,
update: noop,
unmount: function() {
detachNode(input);
},
unmount: function() {
detachNode(input);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -202,59 +202,57 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
claim: function(nodes) {
div = claimElement(nodes, "DIV", { "class": true }, false);
var div_nodes = children(div);
claim: function(nodes) {
div = claimElement(nodes, "DIV", { "class": true }, false);
var div_nodes = children(div);
div_nodes.forEach(detachNode);
this.hydrate();
},
div_nodes.forEach(detachNode);
this.hydrate();
},
hydrate: function() {
div.className = "foo";
},
hydrate: function() {
div.className = "foo";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: noop,
update: noop,
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
var nodes = children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create();
nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
var nodes = children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create();
nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,59 +1,56 @@
/* generated by Svelte vX.Y.Z */
import { assign, children, claimElement, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div;
function create_main_fragment(state, component) {
var div;
return {
create: function() {
div = createElement("div");
this.hydrate();
},
return {
create: function() {
div = createElement("div");
this.hydrate();
},
claim: function(nodes) {
div = claimElement(nodes, "DIV", { "class": true }, false);
var div_nodes = children(div);
claim: function(nodes) {
div = claimElement(nodes, "DIV", { "class": true }, false);
var div_nodes = children(div);
div_nodes.forEach(detachNode);
this.hydrate();
},
div_nodes.forEach(detachNode);
this.hydrate();
},
hydrate: function() {
div.className = "foo";
},
hydrate: function() {
div.className = "foo";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: noop,
update: noop,
unmount: function() {
detachNode(div);
},
unmount: function() {
detachNode(div);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
var nodes = children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create();
nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
var nodes = children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create();
nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -195,135 +195,133 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
function create_main_fragment(state, component) {
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
function audio_progress_loadedmetadata_handler() {
audio_updating = true;
component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false;
}
function audio_progress_loadedmetadata_handler() {
audio_updating = true;
component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false;
}
function audio_loadedmetadata_handler() {
audio_updating = true;
component.set({ seekable: timeRangesToArray(audio.seekable) });
audio_updating = false;
}
function audio_loadedmetadata_handler() {
audio_updating = true;
component.set({ seekable: timeRangesToArray(audio.seekable) });
audio_updating = false;
}
function audio_timeupdate_handler() {
audio_updating = true;
component.set({ played: timeRangesToArray(audio.played) });
audio_updating = false;
}
function audio_timeupdate_handler() {
audio_updating = true;
component.set({ played: timeRangesToArray(audio.played) });
audio_updating = false;
}
function audio_timeupdate_handler_1() {
audio_updating = true;
cancelAnimationFrame(audio_animationframe);
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1);
component.set({ currentTime: audio.currentTime });
audio_updating = false;
}
function audio_timeupdate_handler_1() {
audio_updating = true;
cancelAnimationFrame(audio_animationframe);
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1);
component.set({ currentTime: audio.currentTime });
audio_updating = false;
}
function audio_durationchange_handler() {
audio_updating = true;
component.set({ duration: audio.duration });
audio_updating = false;
}
function audio_durationchange_handler() {
audio_updating = true;
component.set({ duration: audio.duration });
audio_updating = false;
}
function audio_pause_handler() {
audio_updating = true;
component.set({ paused: audio.paused });
audio_updating = false;
}
function audio_pause_handler() {
audio_updating = true;
component.set({ paused: audio.paused });
audio_updating = false;
}
return {
create: function() {
audio = createElement("audio");
addListener(audio, "play", audio_pause_handler);
this.hydrate();
},
return {
create: function() {
audio = createElement("audio");
addListener(audio, "play", audio_pause_handler);
this.hydrate();
},
hydrate: function() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
hydrate: function() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
addListener(audio, "progress", audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
addListener(audio, "progress", audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
component._root._beforecreate.push(audio_loadedmetadata_handler);
component._root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
component._root._beforecreate.push(audio_timeupdate_handler);
component._root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler);
component._root._beforecreate.push(audio_timeupdate_handler_1);
component._root._beforecreate.push(audio_timeupdate_handler_1);
addListener(audio, "timeupdate", audio_timeupdate_handler_1);
addListener(audio, "timeupdate", audio_timeupdate_handler_1);
component._root._beforecreate.push(audio_durationchange_handler);
component._root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "durationchange", audio_durationchange_handler);
addListener(audio, "durationchange", audio_durationchange_handler);
component._root._beforecreate.push(audio_pause_handler);
component._root._beforecreate.push(audio_pause_handler);
addListener(audio, "pause", audio_pause_handler);
},
addListener(audio, "pause", audio_pause_handler);
},
mount: function(target, anchor) {
insertNode(audio, target, anchor);
},
mount: function(target, anchor) {
insertNode(audio, target, anchor);
},
update: function(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) {
audio.currentTime = state.currentTime ;
}
update: function(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) {
audio.currentTime = state.currentTime ;
}
if (audio_paused_value !== (audio_paused_value = state.paused)) {
audio[audio_paused_value ? "pause" : "play"]();
}
},
unmount: function() {
detachNode(audio);
},
if (audio_paused_value !== (audio_paused_value = state.paused)) {
audio[audio_paused_value ? "pause" : "play"]();
destroy: function() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
}
},
unmount: function() {
detachNode(audio);
},
destroy: function() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
}
};
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
}
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
callAll(this._beforecreate);
callAll(this._beforecreate);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,135 +1,132 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
function create_main_fragment(state, component) {
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
function audio_progress_loadedmetadata_handler() {
audio_updating = true;
component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false;
}
function audio_progress_loadedmetadata_handler() {
audio_updating = true;
component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false;
}
function audio_loadedmetadata_handler() {
audio_updating = true;
component.set({ seekable: timeRangesToArray(audio.seekable) });
audio_updating = false;
}
function audio_loadedmetadata_handler() {
audio_updating = true;
component.set({ seekable: timeRangesToArray(audio.seekable) });
audio_updating = false;
}
function audio_timeupdate_handler() {
audio_updating = true;
component.set({ played: timeRangesToArray(audio.played) });
audio_updating = false;
}
function audio_timeupdate_handler() {
audio_updating = true;
component.set({ played: timeRangesToArray(audio.played) });
audio_updating = false;
}
function audio_timeupdate_handler_1() {
audio_updating = true;
cancelAnimationFrame(audio_animationframe);
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1);
component.set({ currentTime: audio.currentTime });
audio_updating = false;
}
function audio_timeupdate_handler_1() {
audio_updating = true;
cancelAnimationFrame(audio_animationframe);
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1);
component.set({ currentTime: audio.currentTime });
audio_updating = false;
}
function audio_durationchange_handler() {
audio_updating = true;
component.set({ duration: audio.duration });
audio_updating = false;
}
function audio_durationchange_handler() {
audio_updating = true;
component.set({ duration: audio.duration });
audio_updating = false;
}
function audio_pause_handler() {
audio_updating = true;
component.set({ paused: audio.paused });
audio_updating = false;
}
function audio_pause_handler() {
audio_updating = true;
component.set({ paused: audio.paused });
audio_updating = false;
}
return {
create: function() {
audio = createElement("audio");
addListener(audio, "play", audio_pause_handler);
this.hydrate();
},
return {
create: function() {
audio = createElement("audio");
addListener(audio, "play", audio_pause_handler);
this.hydrate();
},
hydrate: function() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
hydrate: function() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
addListener(audio, "progress", audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
addListener(audio, "progress", audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
component._root._beforecreate.push(audio_loadedmetadata_handler);
component._root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
component._root._beforecreate.push(audio_timeupdate_handler);
component._root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler);
component._root._beforecreate.push(audio_timeupdate_handler_1);
component._root._beforecreate.push(audio_timeupdate_handler_1);
addListener(audio, "timeupdate", audio_timeupdate_handler_1);
addListener(audio, "timeupdate", audio_timeupdate_handler_1);
component._root._beforecreate.push(audio_durationchange_handler);
component._root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "durationchange", audio_durationchange_handler);
addListener(audio, "durationchange", audio_durationchange_handler);
component._root._beforecreate.push(audio_pause_handler);
component._root._beforecreate.push(audio_pause_handler);
addListener(audio, "pause", audio_pause_handler);
},
addListener(audio, "pause", audio_pause_handler);
},
mount: function(target, anchor) {
insertNode(audio, target, anchor);
},
mount: function(target, anchor) {
insertNode(audio, target, anchor);
},
update: function(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) {
audio.currentTime = state.currentTime ;
}
update: function(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) {
audio.currentTime = state.currentTime ;
}
if (audio_paused_value !== (audio_paused_value = state.paused)) {
audio[audio_paused_value ? "pause" : "play"]();
}
},
if (audio_paused_value !== (audio_paused_value = state.paused)) {
audio[audio_paused_value ? "pause" : "play"]();
unmount: function() {
detachNode(audio);
},
destroy: function() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
}
},
unmount: function() {
detachNode(audio);
},
destroy: function() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
}
};
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
}
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
callAll(this._beforecreate);
callAll(this._beforecreate);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -181,8 +181,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
components: {
NonImported
@ -190,72 +189,71 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
var text;
var imported = new Imported({
_root: component._root
});
function create_main_fragment(state, component) {
var text;
var imported = new Imported({
_root: component._root
});
var nonimported = new template.components.NonImported({
_root: component._root
});
return {
create: function() {
imported._fragment.create();
text = createText("\n");
nonimported._fragment.create();
},
mount: function(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
nonimported._mount(target, anchor);
},
update: noop,
unmount: function() {
imported._unmount();
detachNode(text);
nonimported._unmount();
},
destroy: function() {
imported.destroy(false);
nonimported.destroy(false);
}
};
}
var nonimported = new template.components.NonImported({
_root: component._root
});
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
return {
create: function() {
imported._fragment.create();
text = createText("\n");
nonimported._fragment.create();
},
mount: function(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
nonimported._mount(target, anchor);
},
update: noop,
unmount: function() {
imported._unmount();
detachNode(text);
nonimported._unmount();
},
destroy: function() {
imported.destroy(false);
nonimported.destroy(false);
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -3,8 +3,7 @@ import { assign, callAll, createText, detachNode, init, insertNode, noop, proto
import Imported from 'Imported.html';
export default (function() {
var template = (function() {
var template = (function() {
return {
components: {
NonImported
@ -12,70 +11,69 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
var text;
var imported = new Imported({
_root: component._root
});
var nonimported = new template.components.NonImported({
_root: component._root
});
return {
create: function() {
imported._fragment.create();
text = createText("\n");
nonimported._fragment.create();
},
mount: function(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
nonimported._mount(target, anchor);
},
update: noop,
function create_main_fragment(state, component) {
var text;
var imported = new Imported({
_root: component._root
});
var nonimported = new template.components.NonImported({
_root: component._root
});
return {
create: function() {
imported._fragment.create();
text = createText("\n");
nonimported._fragment.create();
},
mount: function(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
nonimported._mount(target, anchor);
},
update: noop,
unmount: function() {
imported._unmount();
detachNode(text);
nonimported._unmount();
},
destroy: function() {
imported.destroy(false);
nonimported.destroy(false);
}
};
}
unmount: function() {
imported._unmount();
detachNode(text);
nonimported._unmount();
},
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
destroy: function() {
imported.destroy(false);
nonimported.destroy(false);
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (!options._root) {
this._oncreate = [];
this._beforecreate = [];
this._aftercreate = [];
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -167,8 +167,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
// this test should be removed in v2
oncreate () {},
@ -176,48 +175,47 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
return {
create: noop,
return {
create: noop,
mount: noop,
mount: noop,
update: noop,
update: noop,
unmount: noop,
unmount: noop,
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._handlers.destroy = [template.ondestroy];
this._handlers.destroy = [template.ondestroy];
var oncreate = template.oncreate.bind(this);
var oncreate = template.oncreate.bind(this);
if (!options._root) {
this._oncreate = [oncreate];
} else {
this._root._oncreate.push(oncreate);
}
if (!options._root) {
this._oncreate = [oncreate];
} else {
this._root._oncreate.push(oncreate);
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
callAll(this._oncreate);
callAll(this._oncreate);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */
import { assign, callAll, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() {
var template = (function() {
return {
// this test should be removed in v2
oncreate () {},
@ -12,46 +10,45 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
return {
create: noop,
return {
create: noop,
mount: noop,
mount: noop,
update: noop,
update: noop,
unmount: noop,
unmount: noop,
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._handlers.destroy = [template.ondestroy]
this._handlers.destroy = [template.ondestroy]
var oncreate = template.oncreate.bind(this);
var oncreate = template.oncreate.bind(this);
if (!options._root) {
this._oncreate = [oncreate];
} else {
this._root._oncreate.push(oncreate);
}
if (!options._root) {
this._oncreate = [oncreate];
} else {
this._root._oncreate.push(oncreate);
}
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
callAll(this._oncreate);
callAll(this._oncreate);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());

@ -167,8 +167,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() {
var template = (function() {
return {
methods: {
foo ( bar ) {
@ -187,38 +186,37 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
return {
create: noop,
return {
create: noop,
mount: noop,
mount: noop,
update: noop,
update: noop,
unmount: noop,
unmount: noop,
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, template.methods, proto);
template.setup(SvelteComponent);
assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
template.setup(SvelteComponent);
return SvelteComponent;
}());
export default _actual;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */
import { assign, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() {
var template = (function() {
return {
methods: {
foo ( bar ) {
@ -23,36 +21,35 @@ var template = (function() {
};
}());
function create_main_fragment(state, component) {
function create_main_fragment(state, component) {
return {
create: noop,
return {
create: noop,
mount: noop,
mount: noop,
update: noop,
update: noop,
unmount: noop,
unmount: noop,
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, template.methods, proto);
template.setup(SvelteComponent);
assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
template.setup(SvelteComponent);
return SvelteComponent;
}());

@ -191,274 +191,272 @@ var proto = {
/* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) {
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
return {
create: function() {
div = createElement("div");
if (if_block) if_block.create();
text = createText("\n\n\t");
p = createElement("p");
text_1 = createText("this can be used as an anchor");
text_2 = createText("\n\n\t");
if (if_block_1) if_block_1.create();
text_3 = createText("\n\n\t");
if (if_block_2) if_block_2.create();
text_4 = createText("\n\n\t");
p_1 = createElement("p");
text_5 = createText("so can this");
text_6 = createText("\n\n\t");
if (if_block_3) if_block_3.create();
text_8 = createText("\n\n");
if (if_block_4) if_block_4.create();
if_block_4_anchor = createComment();
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
if (if_block) if_block.mount(div, null);
appendNode(text, div);
appendNode(p, div);
appendNode(text_1, p);
appendNode(text_2, div);
if (if_block_1) if_block_1.mount(div, null);
appendNode(text_3, div);
if (if_block_2) if_block_2.mount(div, null);
appendNode(text_4, div);
appendNode(p_1, div);
appendNode(text_5, p_1);
appendNode(text_6, div);
if (if_block_3) if_block_3.mount(div, null);
insertNode(text_8, target, anchor);
if (if_block_4) if_block_4.mount(target, anchor);
insertNode(if_block_4_anchor, target, anchor);
},
update: function(changed, state) {
if (state.a) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(div, text);
function create_main_fragment(state, component) {
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
return {
create: function() {
div = createElement("div");
if (if_block) if_block.create();
text = createText("\n\n\t");
p = createElement("p");
text_1 = createText("this can be used as an anchor");
text_2 = createText("\n\n\t");
if (if_block_1) if_block_1.create();
text_3 = createText("\n\n\t");
if (if_block_2) if_block_2.create();
text_4 = createText("\n\n\t");
p_1 = createElement("p");
text_5 = createText("so can this");
text_6 = createText("\n\n\t");
if (if_block_3) if_block_3.create();
text_8 = createText("\n\n");
if (if_block_4) if_block_4.create();
if_block_4_anchor = createComment();
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
if (if_block) if_block.mount(div, null);
appendNode(text, div);
appendNode(p, div);
appendNode(text_1, p);
appendNode(text_2, div);
if (if_block_1) if_block_1.mount(div, null);
appendNode(text_3, div);
if (if_block_2) if_block_2.mount(div, null);
appendNode(text_4, div);
appendNode(p_1, div);
appendNode(text_5, p_1);
appendNode(text_6, div);
if (if_block_3) if_block_3.mount(div, null);
insertNode(text_8, target, anchor);
if (if_block_4) if_block_4.mount(target, anchor);
insertNode(if_block_4_anchor, target, anchor);
},
update: function(changed, state) {
if (state.a) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(div, text);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
if (state.b) {
if (!if_block_1) {
if_block_1 = create_if_block_1(state, component);
if_block_1.create();
if_block_1.mount(div, text_3);
if (state.b) {
if (!if_block_1) {
if_block_1 = create_if_block_1(state, component);
if_block_1.create();
if_block_1.mount(div, text_3);
}
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
}
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
}
if (state.c) {
if (!if_block_2) {
if_block_2 = create_if_block_2(state, component);
if_block_2.create();
if_block_2.mount(div, text_4);
if (state.c) {
if (!if_block_2) {
if_block_2 = create_if_block_2(state, component);
if_block_2.create();
if_block_2.mount(div, text_4);
}
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
}
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
}
if (state.d) {
if (!if_block_3) {
if_block_3 = create_if_block_3(state, component);
if_block_3.create();
if_block_3.mount(div, null);
if (state.d) {
if (!if_block_3) {
if_block_3 = create_if_block_3(state, component);
if_block_3.create();
if_block_3.mount(div, null);
}
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
}
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
}
if (state.e) {
if (!if_block_4) {
if_block_4 = create_if_block_4(state, component);
if_block_4.create();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor);
if (state.e) {
if (!if_block_4) {
if_block_4 = create_if_block_4(state, component);
if_block_4.create();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor);
}
} else if (if_block_4) {
if_block_4.unmount();
if_block_4.destroy();
if_block_4 = null;
}
} else if (if_block_4) {
if_block_4.unmount();
if_block_4.destroy();
if_block_4 = null;
},
unmount: function() {
detachNode(div);
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
}
},
unmount: function() {
detachNode(div);
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
}
};
}
};
}
// (2:1) {{#if a}}
function create_if_block(state, component) {
var p, text;
// (2:1) {{#if a}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("a");
},
return {
create: function() {
p = createElement("p");
text = createText("a");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
// (8:1) {{#if b}}
function create_if_block_1(state, component) {
var p, text;
// (8:1) {{#if b}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("b");
},
return {
create: function() {
p = createElement("p");
text = createText("b");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
// (12:1) {{#if c}}
function create_if_block_2(state, component) {
var p, text;
// (12:1) {{#if c}}
function create_if_block_2(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("c");
},
return {
create: function() {
p = createElement("p");
text = createText("c");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
// (18:1) {{#if d}}
function create_if_block_3(state, component) {
var p, text;
// (18:1) {{#if d}}
function create_if_block_3(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("d");
},
return {
create: function() {
p = createElement("p");
text = createText("d");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
// (25:0) {{#if e}}
function create_if_block_4(state, component) {
var p, text;
// (25:0) {{#if e}}
function create_if_block_4(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("e");
},
return {
create: function() {
p = createElement("p");
text = createText("e");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
}
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual;

@ -1,274 +1,271 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) {
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
return {
create: function() {
div = createElement("div");
if (if_block) if_block.create();
text = createText("\n\n\t");
p = createElement("p");
text_1 = createText("this can be used as an anchor");
text_2 = createText("\n\n\t");
if (if_block_1) if_block_1.create();
text_3 = createText("\n\n\t");
if (if_block_2) if_block_2.create();
text_4 = createText("\n\n\t");
p_1 = createElement("p");
text_5 = createText("so can this");
text_6 = createText("\n\n\t");
if (if_block_3) if_block_3.create();
text_8 = createText("\n\n");
if (if_block_4) if_block_4.create();
if_block_4_anchor = createComment();
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
if (if_block) if_block.mount(div, null);
appendNode(text, div);
appendNode(p, div);
appendNode(text_1, p);
appendNode(text_2, div);
if (if_block_1) if_block_1.mount(div, null);
appendNode(text_3, div);
if (if_block_2) if_block_2.mount(div, null);
appendNode(text_4, div);
appendNode(p_1, div);
appendNode(text_5, p_1);
appendNode(text_6, div);
if (if_block_3) if_block_3.mount(div, null);
insertNode(text_8, target, anchor);
if (if_block_4) if_block_4.mount(target, anchor);
insertNode(if_block_4_anchor, target, anchor);
},
update: function(changed, state) {
if (state.a) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(div, text);
function create_main_fragment(state, component) {
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
return {
create: function() {
div = createElement("div");
if (if_block) if_block.create();
text = createText("\n\n\t");
p = createElement("p");
text_1 = createText("this can be used as an anchor");
text_2 = createText("\n\n\t");
if (if_block_1) if_block_1.create();
text_3 = createText("\n\n\t");
if (if_block_2) if_block_2.create();
text_4 = createText("\n\n\t");
p_1 = createElement("p");
text_5 = createText("so can this");
text_6 = createText("\n\n\t");
if (if_block_3) if_block_3.create();
text_8 = createText("\n\n");
if (if_block_4) if_block_4.create();
if_block_4_anchor = createComment();
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
if (if_block) if_block.mount(div, null);
appendNode(text, div);
appendNode(p, div);
appendNode(text_1, p);
appendNode(text_2, div);
if (if_block_1) if_block_1.mount(div, null);
appendNode(text_3, div);
if (if_block_2) if_block_2.mount(div, null);
appendNode(text_4, div);
appendNode(p_1, div);
appendNode(text_5, p_1);
appendNode(text_6, div);
if (if_block_3) if_block_3.mount(div, null);
insertNode(text_8, target, anchor);
if (if_block_4) if_block_4.mount(target, anchor);
insertNode(if_block_4_anchor, target, anchor);
},
update: function(changed, state) {
if (state.a) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(div, text);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
if (state.b) {
if (!if_block_1) {
if_block_1 = create_if_block_1(state, component);
if_block_1.create();
if_block_1.mount(div, text_3);
if (state.b) {
if (!if_block_1) {
if_block_1 = create_if_block_1(state, component);
if_block_1.create();
if_block_1.mount(div, text_3);
}
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
}
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
}
if (state.c) {
if (!if_block_2) {
if_block_2 = create_if_block_2(state, component);
if_block_2.create();
if_block_2.mount(div, text_4);
if (state.c) {
if (!if_block_2) {
if_block_2 = create_if_block_2(state, component);
if_block_2.create();
if_block_2.mount(div, text_4);
}
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
}
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
}
if (state.d) {
if (!if_block_3) {
if_block_3 = create_if_block_3(state, component);
if_block_3.create();
if_block_3.mount(div, null);
if (state.d) {
if (!if_block_3) {
if_block_3 = create_if_block_3(state, component);
if_block_3.create();
if_block_3.mount(div, null);
}
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
}
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
}
if (state.e) {
if (!if_block_4) {
if_block_4 = create_if_block_4(state, component);
if_block_4.create();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor);
if (state.e) {
if (!if_block_4) {
if_block_4 = create_if_block_4(state, component);
if_block_4.create();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor);
}
} else if (if_block_4) {
if_block_4.unmount();
if_block_4.destroy();
if_block_4 = null;
}
} else if (if_block_4) {
if_block_4.unmount();
if_block_4.destroy();
if_block_4 = null;
},
unmount: function() {
detachNode(div);
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
}
},
unmount: function() {
detachNode(div);
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
}
};
}
// (2:1) {{#if a}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("a");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (8:1) {{#if b}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("b");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (12:1) {{#if c}}
function create_if_block_2(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("c");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (18:1) {{#if d}}
function create_if_block_3(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("d");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (25:0) {{#if e}}
function create_if_block_4(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("e");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
};
}
}
assign(SvelteComponent.prototype, proto);
// (2:1) {{#if a}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("a");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (8:1) {{#if b}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("b");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (12:1) {{#if c}}
function create_if_block_2(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("c");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (18:1) {{#if d}}
function create_if_block_3(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("d");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (25:0) {{#if e}}
function create_if_block_4(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("e");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
}
}
return SvelteComponent;
assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
Loading…
Cancel
Save