;(function(l, i, v, e) { v = l.createElement(i) v.async = 1 v.src = "//" + (location.host || "localhost").split(":")[0] + ":35729/livereload.js?snipver=1" e = l.getElementsByTagName(i)[0] e.parentNode.insertBefore(v, e) })(document, "script") var app = (function() { "use strict" function noop() {} function assign(tar, src) { // @ts-ignore for (const k in src) tar[k] = src[k] return tar } function is_promise(value) { return ( value && typeof value === "object" && typeof value.then === "function" ) } function add_location(element, file, line, column, char) { element.__svelte_meta = { loc: { file, line, column, char }, } } function run(fn) { return fn() } function blank_object() { return Object.create(null) } function run_all(fns) { fns.forEach(run) } function is_function(thing) { return typeof thing === "function" } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || (a && typeof a === "object") || typeof a === "function" } function null_to_empty(value) { return value == null ? "" : value } function append(target, node) { target.appendChild(node) } function insert(target, node, anchor) { target.insertBefore(node, anchor || null) } function detach(node) { node.parentNode.removeChild(node) } function destroy_each(iterations, detaching) { for (let i = 0; i < iterations.length; i += 1) { if (iterations[i]) iterations[i].d(detaching) } } function element(name) { return document.createElement(name) } function svg_element(name) { return document.createElementNS("http://www.w3.org/2000/svg", name) } function text(data) { return document.createTextNode(data) } function space() { return text(" ") } function empty() { return text("") } function listen(node, event, handler, options) { node.addEventListener(event, handler, options) return () => node.removeEventListener(event, handler, options) } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute) else node.setAttribute(attribute, value) } function children(element) { return Array.from(element.childNodes) } function claim_element(nodes, name, attributes, svg) { for (let i = 0; i < nodes.length; i += 1) { const node = nodes[i] if (node.nodeName === name) { for (let j = 0; j < node.attributes.length; j += 1) { const attribute = node.attributes[j] if (!attributes[attribute.name]) node.removeAttribute(attribute.name) } return nodes.splice(i, 1)[0] // TODO strip unwanted attributes } } return svg ? svg_element(name) : element(name) } function claim_text(nodes, data) { for (let i = 0; i < nodes.length; i += 1) { const node = nodes[i] if (node.nodeType === 3) { node.data = "" + data return nodes.splice(i, 1)[0] } } return text(data) } function claim_space(nodes) { return claim_text(nodes, " ") } function set_input_value(input, value) { if (value != null || input.value) { input.value = value } } function toggle_class(element, name, toggle) { element.classList[toggle ? "add" : "remove"](name) } function custom_event(type, detail) { const e = document.createEvent("CustomEvent") e.initCustomEvent(type, false, false, detail) return e } let current_component function set_current_component(component) { current_component = component } function get_current_component() { if (!current_component) throw new Error(`Function called outside component initialization`) return current_component } const dirty_components = [] const binding_callbacks = [] const render_callbacks = [] const flush_callbacks = [] const resolved_promise = Promise.resolve() let update_scheduled = false function schedule_update() { if (!update_scheduled) { update_scheduled = true resolved_promise.then(flush) } } function add_render_callback(fn) { render_callbacks.push(fn) } function flush() { const seen_callbacks = new Set() do { // first, call beforeUpdate functions // and update components while (dirty_components.length) { const component = dirty_components.shift() set_current_component(component) update(component.$$) } while (binding_callbacks.length) binding_callbacks.pop()() // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (let i = 0; i < render_callbacks.length; i += 1) { const callback = render_callbacks[i] if (!seen_callbacks.has(callback)) { callback() // ...so guard against infinite loops seen_callbacks.add(callback) } } render_callbacks.length = 0 } while (dirty_components.length) while (flush_callbacks.length) { flush_callbacks.pop()() } update_scheduled = false } function update($$) { if ($$.fragment) { $$.update($$.dirty) run_all($$.before_update) $$.fragment.p($$.dirty, $$.ctx) $$.dirty = null $$.after_update.forEach(add_render_callback) } } const outroing = new Set() let outros function group_outros() { outros = { r: 0, c: [], p: outros, // parent group } } function check_outros() { if (!outros.r) { run_all(outros.c) } outros = outros.p } function transition_in(block, local) { if (block && block.i) { outroing.delete(block) block.i(local) } } function transition_out(block, local, detach, callback) { if (block && block.o) { if (outroing.has(block)) return outroing.add(block) outros.c.push(() => { outroing.delete(block) if (callback) { if (detach) block.d(1) callback() } }) block.o(local) } } function handle_promise(promise, info) { const token = (info.token = {}) function update(type, index, key, value) { if (info.token !== token) return info.resolved = key && { [key]: value } const child_ctx = assign(assign({}, info.ctx), info.resolved) const block = type && (info.current = type)(child_ctx) if (info.block) { if (info.blocks) { info.blocks.forEach((block, i) => { if (i !== index && block) { group_outros() transition_out(block, 1, 1, () => { info.blocks[i] = null }) check_outros() } }) } else { info.block.d(1) } block.c() transition_in(block, 1) block.m(info.mount(), info.anchor) flush() } info.block = block if (info.blocks) info.blocks[index] = block } if (is_promise(promise)) { const current_component = get_current_component() promise.then( value => { set_current_component(current_component) update(info.then, 1, info.value, value) set_current_component(null) }, error => { set_current_component(current_component) update(info.catch, 2, info.error, error) set_current_component(null) } ) // if we previously had a then/catch block, destroy it if (info.current !== info.pending) { update(info.pending, 0) return true } } else { if (info.current !== info.then) { update(info.then, 1, info.value, promise) return true } info.resolved = { [info.value]: promise } } } const globals = typeof window !== "undefined" ? window : global function mount_component(component, target, anchor) { const { fragment, on_mount, on_destroy, after_update } = component.$$ fragment.m(target, anchor) // onMount happens before the initial afterUpdate add_render_callback(() => { const new_on_destroy = on_mount.map(run).filter(is_function) if (on_destroy) { on_destroy.push(...new_on_destroy) } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy) } component.$$.on_mount = [] }) after_update.forEach(add_render_callback) } function destroy_component(component, detaching) { if (component.$$.fragment) { run_all(component.$$.on_destroy) component.$$.fragment.d(detaching) // TODO null out other refs, including component.$$ (but need to // preserve final state?) component.$$.on_destroy = component.$$.fragment = null component.$$.ctx = {} } } function make_dirty(component, key) { if (!component.$$.dirty) { dirty_components.push(component) schedule_update() component.$$.dirty = blank_object() } component.$$.dirty[key] = true } function init( component, options, instance, create_fragment, not_equal, prop_names ) { const parent_component = current_component set_current_component(component) const props = options.props || {} const $$ = (component.$$ = { fragment: null, ctx: null, // state props: prop_names, update: noop, not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: null, }) let ready = false $$.ctx = instance ? instance(component, props, (key, ret, value = ret) => { if ($$.ctx && not_equal($$.ctx[key], ($$.ctx[key] = value))) { if ($$.bound[key]) $$.bound[key](value) if (ready) make_dirty(component, key) } return ret }) : props $$.update() ready = true run_all($$.before_update) $$.fragment = create_fragment($$.ctx) if (options.target) { if (options.hydrate) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment.l(children(options.target)) } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment.c() } if (options.intro) transition_in(component.$$.fragment) mount_component(component, options.target, options.anchor) flush() } set_current_component(parent_component) } let SvelteElement if (typeof HTMLElement !== "undefined") { SvelteElement = class extends HTMLElement { constructor() { super() this.attachShadow({ mode: "open" }) } connectedCallback() { // @ts-ignore todo: improve typings for (const key in this.$$.slotted) { // @ts-ignore todo: improve typings this.appendChild(this.$$.slotted[key]) } } attributeChangedCallback(attr, _oldValue, newValue) { this[attr] = newValue } $destroy() { destroy_component(this, 1) this.$destroy = noop } $on(type, callback) { // TODO should this delegate to addEventListener? const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []) callbacks.push(callback) return () => { const index = callbacks.indexOf(callback) if (index !== -1) callbacks.splice(index, 1) } } $set() { // overridden by instance, if it has props } } } class SvelteComponent { $destroy() { destroy_component(this, 1) this.$destroy = noop } $on(type, callback) { const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []) callbacks.push(callback) return () => { const index = callbacks.indexOf(callback) if (index !== -1) callbacks.splice(index, 1) } } $set() { // overridden by instance, if it has props } } function dispatch_dev(type, detail) { document.dispatchEvent(custom_event(type, detail)) } function append_dev(target, node) { dispatch_dev("SvelteDOMInsert", { target, node }) append(target, node) } function insert_dev(target, node, anchor) { dispatch_dev("SvelteDOMInsert", { target, node, anchor }) insert(target, node, anchor) } function detach_dev(node) { dispatch_dev("SvelteDOMRemove", { node }) detach(node) } function listen_dev( node, event, handler, options, has_prevent_default, has_stop_propagation ) { const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : [] if (has_prevent_default) modifiers.push("preventDefault") if (has_stop_propagation) modifiers.push("stopPropagation") dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers, }) const dispose = listen(node, event, handler, options) return () => { dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers, }) dispose() } } function attr_dev(node, attribute, value) { attr(node, attribute, value) if (value == null) dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute }) else dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value }) } function prop_dev(node, property, value) { node[property] = value dispatch_dev("SvelteDOMSetProperty", { node, property, value }) } function set_data_dev(text, data) { data = "" + data if (text.data === data) return dispatch_dev("SvelteDOMSetData", { node: text, data }) text.data = data } class SvelteComponentDev extends SvelteComponent { constructor(options) { if (!options || (!options.target && !options.$$inline)) { throw new Error(`'target' is a required option`) } super() } $destroy() { super.$destroy() this.$destroy = () => { console.warn(`Component was already destroyed`) // eslint-disable-line no-console } } } const subscriber_queue = [] /** * Create a `Writable` store that allows both updating and reading by subscription. * @param {*=}value initial value * @param {StartStopNotifier=}start start and stop notifications for subscriptions */ function writable(value, start = noop) { let stop const subscribers = [] function set(new_value) { if (safe_not_equal(value, new_value)) { value = new_value if (stop) { // store is ready const run_queue = !subscriber_queue.length for (let i = 0; i < subscribers.length; i += 1) { const s = subscribers[i] s[1]() subscriber_queue.push(s, value) } if (run_queue) { for (let i = 0; i < subscriber_queue.length; i += 2) { subscriber_queue[i][0](subscriber_queue[i + 1]) } subscriber_queue.length = 0 } } } } function update(fn) { set(fn(value)) } function subscribe(run, invalidate = noop) { const subscriber = [run, invalidate] subscribers.push(subscriber) if (subscribers.length === 1) { stop = start(set) || noop } run(value) return () => { const index = subscribers.indexOf(subscriber) if (index !== -1) { subscribers.splice(index, 1) } if (subscribers.length === 0) { stop() stop = null } } } return { set, update, subscribe } } // https://github.com/kaisermann/svelte-css-vars var cssVars = (node, props) => { Object.entries(props).forEach(([key, value]) => { node.style.setProperty(`--${key}`, value) }) return { update(new_props) { Object.entries(new_props).forEach(([key, value]) => { node.style.setProperty(`--${key}`, value) delete props[key] }) Object.keys(props).forEach(name => node.style.removeProperty(`--${name}`) ) props = new_props }, } } const buildStyle = styles => { let str = "" for (let s in styles) { if (styles[s]) { str += `${s}: ${styles[s]}; ` } } return str } /* src\Button.svelte generated by Svelte v3.12.1 */ const file = "src\\Button.svelte" // (76:4) {#if !_children || _children.length === 0} function create_if_block(ctx) { var t const block = { c: function create() { t = text(ctx.contentText) }, l: function claim(nodes) { t = claim_text(nodes, ctx.contentText) }, m: function mount(target, anchor) { insert_dev(target, t, anchor) }, p: function update(changed, ctx) { if (changed.contentText) { set_data_dev(t, ctx.contentText) } }, d: function destroy(detaching) { if (detaching) { detach_dev(t) } }, } dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block.name, type: "if", source: "(76:4) {#if !_children || _children.length === 0}", ctx, }) return block } function create_fragment(ctx) { var button, button_class_value, button_disabled_value, cssVars_action, dispose var if_block = (!ctx._children || ctx._children.length === 0) && create_if_block(ctx) const block = { c: function create() { button = element("button") if (if_block) if_block.c() this.h() }, l: function claim(nodes) { button = claim_element( nodes, "BUTTON", { class: true, disabled: true, style: true }, false ) var button_nodes = children(button) if (if_block) if_block.l(button_nodes) button_nodes.forEach(detach_dev) this.h() }, h: function hydrate() { attr_dev( button, "class", (button_class_value = "" + ctx.className + " " + ctx.customClasses + " svelte-1smqkrd") ) button.disabled = button_disabled_value = ctx.disabled || false attr_dev(button, "style", ctx.buttonStyles) add_location(button, file, 69, 0, 1197) dispose = listen_dev(button, "click", ctx.clickHandler) }, m: function mount(target, anchor) { insert_dev(target, button, anchor) if (if_block) if_block.m(button, null) ctx.button_binding(button) cssVars_action = cssVars.call(null, button, ctx.cssVariables) || {} }, p: function update(changed, ctx) { if (!ctx._children || ctx._children.length === 0) { if (if_block) { if_block.p(changed, ctx) } else { if_block = create_if_block(ctx) if_block.c() if_block.m(button, null) } } else if (if_block) { if_block.d(1) if_block = null } if ( (changed.className || changed.customClasses) && button_class_value !== (button_class_value = "" + ctx.className + " " + ctx.customClasses + " svelte-1smqkrd") ) { attr_dev(button, "class", button_class_value) } if ( changed.disabled && button_disabled_value !== (button_disabled_value = ctx.disabled || false) ) { prop_dev(button, "disabled", button_disabled_value) } if (changed.buttonStyles) { attr_dev(button, "style", ctx.buttonStyles) } if ( typeof cssVars_action.update === "function" && changed.cssVariables ) { cssVars_action.update.call(null, ctx.cssVariables) } }, i: noop, o: noop, d: function destroy(detaching) { if (detaching) { detach_dev(button) } if (if_block) if_block.d() ctx.button_binding(null) if (cssVars_action && typeof cssVars_action.destroy === "function") cssVars_action.destroy() dispose() }, } dispatch_dev("SvelteRegisterBlock", { block, id: create_fragment.name, type: "component", source: "", ctx, }) return block } function instance($$self, $$props, $$invalidate) { let { className = "default", disabled = false, contentText, onClick, background, color, border, padding, hoverColor, hoverBackground, hoverBorder, _children, _bb, } = $$props let theButton let cssVariables let buttonStyles let customHoverColorClass let customHoverBorderClass let customHoverBackClass let customClasses = "" const createClasses = classes => { let all = "" for (let cls in classes) { if (classes[cls]) { all = all + " " + cls } } return all } const clickHandler = () => { _bb.call(onClick) } const writable_props = [ "className", "disabled", "contentText", "onClick", "background", "color", "border", "padding", "hoverColor", "hoverBackground", "hoverBorder", "_children", "_bb", ] Object.keys($$props).forEach(key => { if (!writable_props.includes(key) && !key.startsWith("$$")) console.warn(`