/* generated by Svelte vX.Y.Z */ import { addLoc, append, assign, createElement, createText, detachNode, init, insert, protoDev, setData } from "svelte/shared.js"; function bar({ foo }) { return foo * 2; } const file = undefined; function create_main_fragment(component, ctx) { var p, text0_value = ctx.Math.max(0, ctx.foo), text0, text1, text2; return { c: function create() { p = createElement("p"); text0 = createText(text0_value); text1 = createText("\n\t"); text2 = createText(ctx.bar); addLoc(p, file, 0, 0, 0); }, m: function mount(target, anchor) { insert(target, p, anchor); append(p, text0); append(p, text1); append(p, text2); }, p: function update(changed, ctx) { if ((changed.Math || changed.foo) && text0_value !== (text0_value = ctx.Math.max(0, ctx.foo))) { setData(text0, text0_value); } if (changed.bar) { setData(text2, ctx.bar); } }, d: function destroy(detach) { if (detach) { detachNode(p); } } }; } function SvelteComponent(options) { this._debugName = ''; if (!options || (!options.target && !options.root)) { throw new Error("'target' is a required option"); } init(this, options); this._state = assign({ Math : Math }, options.data); this._recompute({ foo: 1 }, this._state); if (!('foo' in this._state)) console.warn(" was created without expected data property 'foo'"); this._intro = true; this._fragment = create_main_fragment(this, this._state); if (options.target) { if (options.hydrate) throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); this._fragment.c(); this._mount(options.target, options.anchor); } } assign(SvelteComponent.prototype, protoDev); SvelteComponent.prototype._checkReadOnly = function _checkReadOnly(newState) { if ('bar' in newState && !this._updatingReadonlyProperty) throw new Error(": Cannot set read-only property 'bar'"); }; SvelteComponent.prototype._recompute = function _recompute(changed, state) { if (changed.foo) { if (this._differs(state.bar, (state.bar = bar(state)))) changed.bar = true; } } export default SvelteComponent;