// @svizzle/time_region_value v0.5.0 - © 2021 nestauk (https://www.nesta.org.uk/)
'use strict';

function noop() { }
function assign(tar, src) {
    for (const k in src)
        tar[k] = src[k];
    return tar;
}
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 is_empty(obj) {
    return Object.keys(obj).length === 0;
}
function subscribe(store, ...callbacks) {
    if (store == null) {
        return noop;
    }
    const unsub = store.subscribe(...callbacks);
    return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
}
function get_store_value(store) {
    let value;
    subscribe(store, _ => value = _)();
    return value;
}
function component_subscribe(component, store, callback) {
    component.$$.on_destroy.push(subscribe(store, callback));
}
function create_slot(definition, ctx, $$scope, fn) {
    if (definition) {
        const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);
        return definition[0](slot_ctx);
    }
}
function get_slot_context(definition, ctx, $$scope, fn) {
    return definition[1] && fn
        ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
        : $$scope.ctx;
}
function get_slot_changes(definition, $$scope, dirty, fn) {
    if (definition[2] && fn) {
        const lets = definition[2](fn(dirty));
        if ($$scope.dirty === undefined) {
            return lets;
        }
        if (typeof lets === 'object') {
            const merged = [];
            const len = Math.max($$scope.dirty.length, lets.length);
            for (let i = 0; i < len; i += 1) {
                merged[i] = $$scope.dirty[i] | lets[i];
            }
            return merged;
        }
        return $$scope.dirty | lets;
    }
    return $$scope.dirty;
}
function update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {
    if (slot_changes) {
        const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);
        slot.p(slot_context, slot_changes);
    }
}
function get_all_dirty_from_scope($$scope) {
    if ($$scope.ctx.length > 32) {
        const dirty = [];
        const length = $$scope.ctx.length / 32;
        for (let i = 0; i < length; i++) {
            dirty[i] = -1;
        }
        return dirty;
    }
    return -1;
}
function set_store_value(store, ret, value) {
    store.set(value);
    return ret;
}
function action_destroyer(action_result) {
    return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
}
function append(target, node) {
    target.appendChild(node);
}
function append_styles(target, style_sheet_id, styles) {
    const append_styles_to = get_root_for_style(target);
    if (!append_styles_to.getElementById(style_sheet_id)) {
        const style = element('style');
        style.id = style_sheet_id;
        style.textContent = styles;
        append_stylesheet(append_styles_to, style);
    }
}
function get_root_for_style(node) {
    if (!node)
        return document;
    const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
    if (root && root.host) {
        return root;
    }
    return node.ownerDocument;
}
function append_stylesheet(node, style) {
    append(node.head || node, style);
}
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 stop_propagation(fn) {
    return function (event) {
        event.stopPropagation();
        return fn.call(this, event);
    };
}
function attr(node, attribute, value) {
    if (value == null)
        node.removeAttribute(attribute);
    else if (node.getAttribute(attribute) !== value)
        node.setAttribute(attribute, value);
}
function children(element) {
    return Array.from(element.childNodes);
}
function set_data(text, data) {
    data = '' + data;
    if (text.wholeText !== data)
        text.data = data;
}
function set_style(node, key, value, important) {
    node.style.setProperty(key, value, important ? 'important' : '');
}
let crossorigin;
function is_crossorigin() {
    if (crossorigin === undefined) {
        crossorigin = false;
        try {
            if (typeof window !== 'undefined' && window.parent) {
                void window.parent.document;
            }
        }
        catch (error) {
            crossorigin = true;
        }
    }
    return crossorigin;
}
function add_resize_listener(node, fn) {
    const computed_style = getComputedStyle(node);
    if (computed_style.position === 'static') {
        node.style.position = 'relative';
    }
    const iframe = element('iframe');
    iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +
        'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');
    iframe.setAttribute('aria-hidden', 'true');
    iframe.tabIndex = -1;
    const crossorigin = is_crossorigin();
    let unsubscribe;
    if (crossorigin) {
        iframe.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>";
        unsubscribe = listen(window, 'message', (event) => {
            if (event.source === iframe.contentWindow)
                fn();
        });
    }
    else {
        iframe.src = 'about:blank';
        iframe.onload = () => {
            unsubscribe = listen(iframe.contentWindow, 'resize', fn);
        };
    }
    append(node, iframe);
    return () => {
        if (crossorigin) {
            unsubscribe();
        }
        else if (unsubscribe && iframe.contentWindow) {
            unsubscribe();
        }
        detach(iframe);
    };
}
function toggle_class(element, name, toggle) {
    element.classList[toggle ? 'add' : 'remove'](name);
}
function custom_event(type, detail, bubbles = false) {
    const e = document.createEvent('CustomEvent');
    e.initCustomEvent(type, bubbles, 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;
}
function beforeUpdate(fn) {
    get_current_component().$$.before_update.push(fn);
}
function onMount(fn) {
    get_current_component().$$.on_mount.push(fn);
}
function afterUpdate(fn) {
    get_current_component().$$.after_update.push(fn);
}
function createEventDispatcher() {
    const component = get_current_component();
    return (type, detail) => {
        const callbacks = component.$$.callbacks[type];
        if (callbacks) {
            const event = custom_event(type, detail);
            callbacks.slice().forEach(fn => {
                fn.call(component, event);
            });
        }
    };
}
function bubble(component, event) {
    const callbacks = component.$$.callbacks[event.type];
    if (callbacks) {
        callbacks.slice().forEach(fn => fn.call(this, event));
    }
}
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 add_flush_callback(fn) {
    flush_callbacks.push(fn);
}
let flushing = false;
const seen_callbacks = new Set();
function flush() {
    if (flushing)
        return;
    flushing = true;
    do {
        for (let i = 0; i < dirty_components.length; i += 1) {
            const component = dirty_components[i];
            set_current_component(component);
            update(component.$$);
        }
        set_current_component(null);
        dirty_components.length = 0;
        while (binding_callbacks.length)
            binding_callbacks.pop()();
        for (let i = 0; i < render_callbacks.length; i += 1) {
            const callback = render_callbacks[i];
            if (!seen_callbacks.has(callback)) {
                seen_callbacks.add(callback);
                callback();
            }
        }
        render_callbacks.length = 0;
    } while (dirty_components.length);
    while (flush_callbacks.length) {
        flush_callbacks.pop()();
    }
    update_scheduled = false;
    flushing = false;
    seen_callbacks.clear();
}
function update($$) {
    if ($$.fragment !== null) {
        $$.update();
        run_all($$.before_update);
        const dirty = $$.dirty;
        $$.dirty = [-1];
        $$.fragment && $$.fragment.p($$.ctx, dirty);
        $$.after_update.forEach(add_render_callback);
    }
}
const outroing = new Set();
let outros;
function group_outros() {
    outros = {
        r: 0,
        c: [],
        p: outros
    };
}
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 destroy_block(block, lookup) {
    block.d(1);
    lookup.delete(block.key);
}
function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {
    let o = old_blocks.length;
    let n = list.length;
    let i = o;
    const old_indexes = {};
    while (i--)
        old_indexes[old_blocks[i].key] = i;
    const new_blocks = [];
    const new_lookup = new Map();
    const deltas = new Map();
    i = n;
    while (i--) {
        const child_ctx = get_context(ctx, list, i);
        const key = get_key(child_ctx);
        let block = lookup.get(key);
        if (!block) {
            block = create_each_block(key, child_ctx);
            block.c();
        }
        else if (dynamic) {
            block.p(child_ctx, dirty);
        }
        new_lookup.set(key, new_blocks[i] = block);
        if (key in old_indexes)
            deltas.set(key, Math.abs(i - old_indexes[key]));
    }
    const will_move = new Set();
    const did_move = new Set();
    function insert(block) {
        transition_in(block, 1);
        block.m(node, next);
        lookup.set(block.key, block);
        next = block.first;
        n--;
    }
    while (o && n) {
        const new_block = new_blocks[n - 1];
        const old_block = old_blocks[o - 1];
        const new_key = new_block.key;
        const old_key = old_block.key;
        if (new_block === old_block) {
            next = new_block.first;
            o--;
            n--;
        }
        else if (!new_lookup.has(old_key)) {
            destroy(old_block, lookup);
            o--;
        }
        else if (!lookup.has(new_key) || will_move.has(new_key)) {
            insert(new_block);
        }
        else if (did_move.has(old_key)) {
            o--;
        }
        else if (deltas.get(new_key) > deltas.get(old_key)) {
            did_move.add(new_key);
            insert(new_block);
        }
        else {
            will_move.add(old_key);
            o--;
        }
    }
    while (o--) {
        const old_block = old_blocks[o];
        if (!new_lookup.has(old_block.key))
            destroy(old_block, lookup);
    }
    while (n)
        insert(new_blocks[n - 1]);
    return new_blocks;
}
function bind(component, name, callback) {
    const index = component.$$.props[name];
    if (index !== undefined) {
        component.$$.bound[index] = callback;
        callback(component.$$.ctx[index]);
    }
}
function create_component(block) {
    block && block.c();
}
function mount_component(component, target, anchor, customElement) {
    const { fragment, on_mount, on_destroy, after_update } = component.$$;
    fragment && fragment.m(target, anchor);
    if (!customElement) {
        add_render_callback(() => {
            const new_on_destroy = on_mount.map(run).filter(is_function);
            if (on_destroy) {
                on_destroy.push(...new_on_destroy);
            }
            else {
                run_all(new_on_destroy);
            }
            component.$$.on_mount = [];
        });
    }
    after_update.forEach(add_render_callback);
}
function destroy_component(component, detaching) {
    const $$ = component.$$;
    if ($$.fragment !== null) {
        run_all($$.on_destroy);
        $$.fragment && $$.fragment.d(detaching);
        $$.on_destroy = $$.fragment = null;
        $$.ctx = [];
    }
}
function make_dirty(component, i) {
    if (component.$$.dirty[0] === -1) {
        dirty_components.push(component);
        schedule_update();
        component.$$.dirty.fill(0);
    }
    component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
}
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
    const parent_component = current_component;
    set_current_component(component);
    const $$ = component.$$ = {
        fragment: null,
        ctx: null,
        props,
        update: noop,
        not_equal,
        bound: blank_object(),
        on_mount: [],
        on_destroy: [],
        on_disconnect: [],
        before_update: [],
        after_update: [],
        context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
        callbacks: blank_object(),
        dirty,
        skip_bound: false,
        root: options.target || parent_component.$$.root
    };
    append_styles && append_styles($$.root);
    let ready = false;
    $$.ctx = instance
        ? instance(component, options.props || {}, (i, ret, ...rest) => {
            const value = rest.length ? rest[0] : ret;
            if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
                if (!$$.skip_bound && $$.bound[i])
                    $$.bound[i](value);
                if (ready)
                    make_dirty(component, i);
            }
            return ret;
        })
        : [];
    $$.update();
    ready = true;
    run_all($$.before_update);
    $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
    if (options.target) {
        if (options.hydrate) {
            const nodes = children(options.target);
            $$.fragment && $$.fragment.l(nodes);
            nodes.forEach(detach);
        }
        else {
            $$.fragment && $$.fragment.c();
        }
        if (options.intro)
            transition_in(component.$$.fragment);
        mount_component(component, options.target, options.anchor, options.customElement);
        flush();
    }
    set_current_component(parent_component);
}
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($$props) {
        if (this.$$set && !is_empty($$props)) {
            this.$$.skip_bound = true;
            this.$$set($$props);
            this.$$.skip_bound = false;
        }
    }
}

const isServerSide = typeof window === 'undefined';
const isClientSide = !isServerSide;

/**
* @overview lamb - A lightweight, and docile, JavaScript library to help embracing functional programming.
* @author Andrea Scartabelli <andrea.scartabelli@gmail.com>
* @version 0.60.0
* @module lamb
* @license MIT
*/
var __ = {};
function always (value) {
    return function () {
        return value;
    };
}
function areSVZ (a, b) {
    return a !== a ? b !== b : a === b;
}
function binary (fn) {
    return function (a, b) {
        return fn.call(this, a, b);
    };
}
function clamp (n, min, max) {
    n = +n;
    min = +min;
    max = +max;
    if (min > max) {
        return NaN;
    } else {
        return n < min ? min : n > max ? max : n;
    }
}
function partial (fn, args) {
    return function () {
        if (!Array.isArray(args)) {
            return fn.apply(this, arguments);
        }
        var lastIdx = 0;
        var newArgs = [];
        var argsLen = args.length;
        for (var i = 0, boundArg; i < argsLen; i++) {
            boundArg = args[i];
            newArgs[i] = boundArg === __ ? arguments[lastIdx++] : boundArg;
        }
        for (var len = arguments.length; lastIdx < len; lastIdx++) {
            newArgs[i++] = arguments[lastIdx];
        }
        return fn.apply(this, newArgs);
    };
}
function _makePartial3 (fn, shouldAritize) {
    return function (a, b) {
        var f = shouldAritize && arguments.length !== 2 ? binary(fn) : fn;
        return partial(f, [__, a, b]);
    };
}
function identity$1 (value) {
    return value;
}
function compose (a, b) {
    return arguments.length ? function () {
        return a.call(this, b.apply(this, arguments));
    } : identity$1;
}
var MAX_ARRAY_LENGTH = 4294967295;
function _toArrayLength (value) {
    return clamp(value, 0, MAX_ARRAY_LENGTH) >>> 0;
}
function forEach (arrayLike, iteratee) {
    for (var i = 0, len = _toArrayLength(arrayLike.length); i < len; i++) {
        iteratee(arrayLike[i], i, arrayLike);
    }
}
var generic = Function.bind.bind(Function.call);
function isNull (value) {
    return value === null;
}
function isUndefined (value) {
    return value === void 0;
}
function isNil (value) {
    return isNull(value) || isUndefined(value);
}
function _curry2 (fn, isRightCurry) {
    return function (a) {
        return function (b) {
            return isRightCurry ? fn.call(this, b, a) : fn.call(this, a, b);
        };
    };
}
function map$1 (arrayLike, iteratee) {
    var len = _toArrayLength(arrayLike.length);
    var result = Array(len);
    for (var i = 0; i < len; i++) {
        result[i] = iteratee(arrayLike[i], i, arrayLike);
    }
    return result;
}
var mapWith = _curry2(map$1, true);
function _makeReducer (step) {
    return function (arrayLike, accumulator, initialValue) {
        var len = _toArrayLength(arrayLike.length);
        var idx = step === 1 ? 0 : len - 1;
        var nCalls;
        var result;
        if (arguments.length === 3) {
            nCalls = len;
            result = initialValue;
        } else {
            if (len === 0) {
                throw new TypeError("Reduce of empty array-like with no initial value");
            }
            result = arrayLike[idx];
            idx += step;
            nCalls = len - 1;
        }
        for (; nCalls--; idx += step) {
            result = accumulator(result, arrayLike[idx], idx, arrayLike);
        }
        return result;
    };
}
var reduce = _makeReducer(1);
var reduceWith = _makePartial3(reduce, true);
function _toInteger (value) {
    var n = +value;
    if (n !== n) {
        return 0;
    } else if (n % 1 === 0) {
        return n;
    } else {
        return Math.floor(Math.abs(n)) * (n < 0 ? -1 : 1);
    }
}
function slice (arrayLike, start, end) {
    var len = _toArrayLength(arrayLike.length);
    var begin = _toInteger(start);
    var upTo = _toInteger(end);
    if (begin < 0) {
        begin = begin < -len ? 0 : begin + len;
    }
    if (upTo < 0) {
        upTo = upTo < -len ? 0 : upTo + len;
    } else if (upTo > len) {
        upTo = len;
    }
    var resultLen = upTo - begin;
    var result = resultLen > 0 ? Array(resultLen) : [];
    for (var i = 0; i < resultLen; i++) {
        result[i] = arrayLike[begin + i];
    }
    return result;
}
var objectProtoToString = Object.prototype.toString;
function type (value) {
    return objectProtoToString.call(value).slice(8, -1);
}
function appendTo (arrayLike, value) {
    return slice(arrayLike, 0, arrayLike.length).concat([value]);
}
function isIn (arrayLike, value) {
    var result = false;
    for (var i = 0, len = arrayLike.length; i < len; i++) {
        if (areSVZ(value, arrayLike[i])) {
            result = true;
            break;
        }
    }
    return result;
}
function _groupWith (makeValue) {
    return function (arrayLike, iteratee) {
        var result = {};
        var len = arrayLike.length;
        for (var i = 0, element, key; i < len; i++) {
            element = arrayLike[i];
            key = iteratee(element, i, arrayLike);
            result[key] = makeValue(result[key], element);
        }
        return result;
    };
}
function filter (arrayLike, predicate) {
    var len = arrayLike.length;
    var result = [];
    for (var i = 0; i < len; i++) {
        predicate(arrayLike[i], i, arrayLike) && result.push(arrayLike[i]);
    }
    return result;
}
function not (predicate) {
    return function () {
        return !predicate.apply(this, arguments);
    };
}
function uniquesBy (iteratee) {
    return function (arrayLike) {
        var result = [];
        for (var i = 0, len = arrayLike.length, seen = [], value; i < len; i++) {
            value = iteratee(arrayLike[i], i, arrayLike);
            if (!isIn(seen, value)) {
                seen.push(value);
                result.push(arrayLike[i]);
            }
        }
        return result;
    };
}
var uniques = uniquesBy(identity$1);
function dropFrom (arrayLike, n) {
    return slice(arrayLike, n, arrayLike.length);
}
var drop = _curry2(dropFrom, true);
function _makeArrayChecker (defaultResult) {
    return function (arrayLike, predicate) {
        for (var i = 0, len = arrayLike.length; i < len; i++) {
            if (defaultResult ^ !!predicate(arrayLike[i], i, arrayLike)) {
                return !defaultResult;
            }
        }
        return defaultResult;
    };
}
var everyIn = _makeArrayChecker(true);
var every = _curry2(everyIn, true);
var filterWith = _curry2(filter, true);
function _findIndex (arrayLike, predicate, fromLast) {
    var start;
    var increment;
    var len = arrayLike.length;
    var result = -1;
    if (fromLast) {
        start = len - 1;
        increment = -1;
    } else {
        start = 0;
        increment = 1;
    }
    for (var i = start; i < len && i >= 0; i += increment) {
        if (predicate(arrayLike[i], i, arrayLike)) {
            result = i;
            break;
        }
    }
    return result;
}
function findIndex (arrayLike, predicate) {
    return _findIndex(arrayLike, predicate, false);
}
function flatMap (array, iteratee) {
    return reduce(array, function (result, el, idx, arr) {
        var v = iteratee(el, idx, arr);
        if (!Array.isArray(v)) {
            v = [v];
        }
        for (var i = 0, len = v.length, rLen = result.length; i < len; i++) {
            result[rLen + i] = v[i];
        }
        return result;
    }, []);
}
var flatMapWith = _curry2(flatMap, true);
function _flatten (array, isDeep, output, idx) {
    for (var i = 0, len = array.length, value, j, vLen; i < len; i++) {
        value = array[i];
        if (!Array.isArray(value)) {
            output[idx++] = value;
        } else if (isDeep) {
            _flatten(value, true, output, idx);
            idx = output.length;
        } else {
            vLen = value.length;
            output.length += vLen;
            for (j = 0; j < vLen; j++) {
                output[idx++] = value[j];
            }
        }
    }
    return output;
}
var _makeArrayFlattener = _curry2(function (isDeep, array) {
    return Array.isArray(array) ? _flatten(array, isDeep, [], 0) : slice(array, 0, array.length);
});
var flatten = _makeArrayFlattener(true);
function _toNaturalIndex (idx, len) {
    idx = _toInteger(idx);
    return idx >= -len && idx < len ? idx < 0 ? idx + len : idx : NaN;
}
function getIndex (arrayLike, index) {
    var idx = _toNaturalIndex(index, _toArrayLength(arrayLike.length));
    return idx === idx ? arrayLike[idx] : void 0;
}
var getAt = _curry2(getIndex, true);
var group = _groupWith(function (a, b) {
    if (!a) {
        return [b];
    }
    a[a.length] = b;
    return a;
});
var groupBy = _curry2(group, true);
var head = getAt(0);
var index = _groupWith(function (a, b) {
    return b;
});
var indexBy = _curry2(index, true);
function join (arrayLike, separator) {
    return map$1(arrayLike, String).join(String(separator));
}
var joinWith = _curry2(join, true);
var last = getAt(-1);
function _argsToArrayFrom (idx) {
    return function () {
        var argsLen = arguments.length || idx;
        var len = argsLen - idx;
        var result = Array(len);
        for (var i = 0; i < len; i++) {
            result[i] = arguments[i + idx];
        }
        return result;
    };
}
var list = _argsToArrayFrom(0);
function getIn (obj, key) {
    return obj[key];
}
var getKey$1 = _curry2(getIn, true);
var pluck = compose(mapWith, getKey$1);
function pullFrom (arrayLike, values) {
    return values ? filter(arrayLike, function (element) {
        return !isIn(values, element);
    }) : slice(arrayLike, 0, arrayLike.length);
}
function reverse (arrayLike) {
    var len = _toArrayLength(arrayLike.length);
    var result = Array(len);
    for (var i = 0, ofs = len - 1; i < len; i++) {
        result[i] = arrayLike[ofs - i];
    }
    return result;
}
function _setIndex (arrayLike, idx, value, updater) {
    var result = slice(arrayLike, 0, arrayLike.length);
    var n = _toNaturalIndex(idx, result.length);
    if (n === n) {
        result[n] = arguments.length === 4 ? updater(arrayLike[n]) : value;
    }
    return result;
}
function _compareWith (criteria) {
    return function (a, b) {
        var len = criteria.length;
        var criterion = criteria[0];
        var result = criterion.compare(a.value, b.value);
        for (var i = 1; result === 0 && i < len; i++) {
            criterion = criteria[i];
            result = criterion.compare(a.value, b.value);
        }
        if (result === 0) {
            result = a.index - b.index;
        }
        return criterion.isDescending ? -result : result;
    };
}
function _comparer (a, b) {
    var result = 0;
    if (typeof a !== typeof b) {
        a = String(a);
        b = String(b);
    }
    if (!areSVZ(a, b)) {
        result = a > b || a !== a ? 1 : -1;
    }
    return result;
}
function _sorter (reader, isDescending, comparer) {
    if (typeof reader !== "function" || reader === identity$1) {
        reader = null;
    }
    if (typeof comparer !== "function") {
        comparer = _comparer;
    }
    return {
        isDescending: isDescending === true,
        compare: function (a, b) {
            if (reader) {
                a = reader(a);
                b = reader(b);
            }
            return comparer(a, b);
        }
    };
}
function _makeCriterion (criterion) {
    return criterion && typeof criterion.compare === "function" ? criterion : _sorter(criterion);
}
function _makeCriteria (sorters) {
    return sorters && sorters.length ? map$1(sorters, _makeCriterion) : [_sorter()];
}
function sort (arrayLike, sorters) {
    var criteria = _makeCriteria(sorters);
    var len = _toArrayLength(arrayLike.length);
    var result = Array(len);
    for (var i = 0; i < len; i++) {
        result[i] = { value: arrayLike[i], index: i };
    }
    result.sort(_compareWith(criteria));
    for (i = 0; i < len; i++) {
        result[i] = result[i].value;
    }
    return result;
}
var sorter = partial(_sorter, [__, false, __]);
var sorterDesc = partial(_sorter, [__, true, __]);
var sortWith = _curry2(sort, true);
var tail = drop(1);
function transpose (arrayLike) {
    var minLen = MAX_ARRAY_LENGTH;
    var len = _toArrayLength(arrayLike.length);
    if (len === 0) {
        return [];
    }
    for (var j = 0, elementLen; j < len; j++) {
        elementLen = _toArrayLength(arrayLike[j].length);
        if (elementLen < minLen) {
            minLen = elementLen;
        }
    }
    var result = Array(minLen);
    for (var i = 0, el; i < minLen; i++) {
        el = result[i] = Array(len);
        for (j = 0; j < len; j++) {
            el[j] = arrayLike[j][i];
        }
    }
    return result;
}
function _makeTypeErrorFor (value, desiredType) {
    return new TypeError("Cannot convert " + type(value).toLowerCase() + " to " + desiredType);
}
function pipe (functions) {
    if (!Array.isArray(functions)) {
        throw _makeTypeErrorFor(functions, "array");
    }
    var len = functions.length;
    return len ? function () {
        var result = functions[0].apply(this, arguments);
        for (var i = 1; i < len; i++) {
            result = functions[i].call(this, result);
        }
        return result;
    } : identity$1;
}
function unionBy (iteratee) {
    return pipe([binary(list), flatMapWith(drop(0)), uniquesBy(iteratee)]);
}
unionBy(identity$1);
function zip (a, b) {
    return transpose([a, b]);
}
var zipWithIndex = mapWith(binary(list));
function application (fn, args) {
    return fn.apply(this, Object(args));
}
var apply = _curry2(application);
var applyTo = _curry2(application, true);
function collect (functions) {
    if (!Array.isArray(functions)) {
        throw _makeTypeErrorFor(functions, "array");
    }
    return function () {
        return map$1(functions, applyTo(arguments));
    };
}
function adapter (functions) {
    if (!Array.isArray(functions)) {
        throw _makeTypeErrorFor(functions, "array");
    }
    return function () {
        var len = functions.length;
        var result;
        for (var i = 0; i < len; i++) {
            result = functions[i].apply(this, arguments);
            if (!isUndefined(result)) {
                break;
            }
        }
        return result;
    };
}
function _checkPredicates (checkAll) {
    return function (predicates) {
        if (!Array.isArray(predicates)) {
            throw _makeTypeErrorFor(predicates, "array");
        }
        return function () {
            for (var i = 0, len = predicates.length, result; i < len; i++) {
                result = predicates[i].apply(this, arguments);
                if (checkAll && !result) {
                    return false;
                } else if (!checkAll && result) {
                    return true;
                }
            }
            return checkAll;
        };
    };
}
var allOf = _checkPredicates(true);
function areSame (a, b) {
    return a === 0 && b === 0 ? 1 / a === 1 / b : areSVZ(a, b);
}
function casus (predicate, fn) {
    return function () {
        return predicate.apply(this, arguments) ? fn.apply(this, arguments) : void 0;
    };
}
function gt (a, b) {
    return a > b;
}
var is = _curry2(areSame);
var isGT = _curry2(gt, true);
function when (predicate, fn) {
    return function (value) {
        return predicate.call(this, value) ? fn.call(this, value) : value;
    };
}
function sum (a, b) {
    return a + b;
}
function divide (a, b) {
    return a / b;
}
function _forceToNumber (value) {
    var n = +value;
    return n === n ? n : 0;
}
function range (start, limit, step) {
    start = _forceToNumber(start);
    limit = _forceToNumber(limit);
    step = arguments.length === 3 ? _forceToNumber(step) : 1;
    if (step === 0) {
        return limit === start ? [] : [start];
    }
    var len = Math.max(Math.ceil((limit - start) / step), 0);
    var result = Array(len);
    for (var i = 0, last = start; i < len; i++) {
        result[i] = last;
        last += step;
    }
    return result;
}
var _isOwnEnumerable = generic(Object.prototype.propertyIsEnumerable);
function _safeEnumerables (obj) {
    var result = [];
    for (var key in obj) {
        result.push(key);
    }
    return result;
}
function _isEnumerable (obj, key) {
    return key in Object(obj) && (_isOwnEnumerable(obj, key) || ~_safeEnumerables(obj).indexOf(key));
}
function _getPathKey (target, key, includeNonEnumerables) {
    if (includeNonEnumerables && key in Object(target) || _isEnumerable(target, key)) {
        return key;
    }
    var n = +key;
    var len = target && target.length;
    return n >= -len && n < len ? n < 0 ? n + len : n : void 0;
}
function _getPathInfo (obj, parts, walkNonEnumerables) {
    if (isNil(obj)) {
        throw _makeTypeErrorFor(obj, "object");
    }
    var target = obj;
    var i = -1;
    var len = parts.length;
    var key;
    while (++i < len) {
        key = _getPathKey(target, parts[i], walkNonEnumerables);
        if (isUndefined(key)) {
            break;
        }
        target = target[key];
    }
    return i === len ? { isValid: true, target: target } : { isValid: false, target: void 0 };
}
function _toPathParts (path, separator) {
    return String(path).split(separator || ".");
}
function getPathIn (obj, path, separator) {
    return _getPathInfo(obj, _toPathParts(path, separator), true).target;
}
var _unsafeKeyListFrom = _curry2(function (getKeys, obj) {
    if (isNil(obj)) {
        throw _makeTypeErrorFor(obj, "object");
    }
    return getKeys(obj);
});
var enumerables = _unsafeKeyListFrom(_safeEnumerables);
function fromPairs (pairsList) {
    var result = {};
    forEach(pairsList, function (pair) {
        result[pair[0]] = pair[1];
    });
    return result;
}
var getPath = _makePartial3(getPathIn);
function has (obj, key) {
    if (typeof obj !== "object" && !isUndefined(obj)) {
        obj = Object(obj);
    }
    return key in obj;
}
var hasKey = _curry2(has, true);
generic(Object.prototype.hasOwnProperty);
var _safeKeys = compose(Object.keys, Object);
var keys = _unsafeKeyListFrom(_safeKeys);
function make (names, values) {
    var result = {};
    var valuesLen = values.length;
    for (var i = 0, len = names.length; i < len; i++) {
        result[names[i]] = i < valuesLen ? values[i] : void 0;
    }
    return result;
}
function mapValues (source, fn) {
    if (isNil(source)) {
        throw _makeTypeErrorFor(source, "object");
    }
    var result = {};
    for (var key in source) {
        result[key] = fn(source[key], key, source);
    }
    return result;
}
var mapValuesWith = _curry2(mapValues, true);
function _merge (getKeys, a, b) {
    return reduce([a, b], function (result, source) {
        forEach(getKeys(source), function (key) {
            result[key] = source[key];
        });
        return result;
    }, {});
}
var merge = partial(_merge, [enumerables]);
var _keyToPairIn = _curry2(function (obj, key) {
    return [key, obj[key]];
});
var _pairsFrom = _curry2(function (getKeys, obj) {
    return map$1(getKeys(obj), _keyToPairIn(obj));
});
var _valuesFrom = _curry2(function (getKeys, obj) {
    return map$1(getKeys(obj), function (key) {
        return obj[key];
    });
});
var pairs = _pairsFrom(enumerables);
function pickIf (predicate) {
    return function (source) {
        if (isNil(source)) {
            throw _makeTypeErrorFor(source, "object");
        }
        var result = {};
        for (var key in source) {
            if (predicate(source[key], key, source)) {
                result[key] = source[key];
            }
        }
        return result;
    };
}
function _setIn (source, key, value) {
    var result = {};
    for (var prop in source) {
        result[prop] = source[prop];
    }
    result[key] = value;
    return result;
}
function setIn (source, key, value) {
    if (isNil(source)) {
        throw _makeTypeErrorFor(source, "object");
    }
    return _setIn(source, key, value);
}
var setKey = _makePartial3(setIn);
function _isArrayIndex (target, key) {
    var n = +key;
    return Array.isArray(target) && n % 1 === 0 && !(n < 0 && _isEnumerable(target, key));
}
function _setPathIn (obj, parts, value) {
    var key = parts[0];
    var partsLen = parts.length;
    var v;
    if (partsLen === 1) {
        v = value;
    } else {
        var targetKey = _getPathKey(obj, key, false);
        v = _setPathIn(
            isUndefined(targetKey) ? targetKey : obj[targetKey],
            slice(parts, 1, partsLen),
            value
        );
    }
    return _isArrayIndex(obj, key) ? _setIndex(obj, key, v) : _setIn(obj, key, v);
}
function setPathIn (source, path, value, separator) {
    if (isNil(source)) {
        throw _makeTypeErrorFor(source, "object");
    }
    return _setPathIn(source, _toPathParts(path, separator), value);
}
function skipIn (source, blacklist) {
    if (isNil(source)) {
        throw _makeTypeErrorFor(source, "object");
    }
    var result = {};
    var props = make(blacklist, []);
    for (var key in source) {
        if (!(key in props)) {
            result[key] = source[key];
        }
    }
    return result;
}
var skip = _curry2(skipIn, true);
var skipIf = compose(pickIf, not);
function updateIn (source, key, updater) {
    return _isEnumerable(source, key)
        ? _setIn(source, key, updater(source[key]))
        : _merge(enumerables, source, {});
}
var updateKey = _makePartial3(updateIn);
var values = _valuesFrom(enumerables);
_makePartial3(generic(String.prototype.replace));
binary(generic(String.prototype.split));
generic(String.prototype.search);
function isType (typeName) {
    return function (value) {
        return type(value) === typeName;
    };
}

const subscriber_queue = [];
function readable(value, start) {
    return {
        subscribe: writable(value, start).subscribe
    };
}
function writable(value, start = noop) {
    let stop;
    const subscribers = new Set();
    function set(new_value) {
        if (safe_not_equal(value, new_value)) {
            value = new_value;
            if (stop) {
                const run_queue = !subscriber_queue.length;
                for (const subscriber of subscribers) {
                    subscriber[1]();
                    subscriber_queue.push(subscriber, 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.add(subscriber);
        if (subscribers.size === 1) {
            stop = start(set) || noop;
        }
        run(value);
        return () => {
            subscribers.delete(subscriber);
            if (subscribers.size === 0) {
                stop();
                stop = null;
            }
        };
    }
    return { set, update, subscribe };
}
function derived(stores, fn, initial_value) {
    const single = !Array.isArray(stores);
    const stores_array = single
        ? [stores]
        : stores;
    const auto = fn.length < 2;
    return readable(initial_value, (set) => {
        let inited = false;
        const values = [];
        let pending = 0;
        let cleanup = noop;
        const sync = () => {
            if (pending) {
                return;
            }
            cleanup();
            const result = fn(single ? values[0] : values, set);
            if (auto) {
                set(result);
            }
            else {
                cleanup = is_function(result) ? result : noop;
            }
        };
        const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {
            values[i] = value;
            pending &= ~(1 << i);
            if (inited) {
                sync();
            }
        }, () => {
            pending |= (1 << i);
        }));
        inited = true;
        sync();
        return function stop() {
            run_all(unsubscribers);
            cleanup();
        };
    });
}

function linear(domain, range) {
    var d0 = domain[0];
    var r0 = range[0];
    var m = (range[1] - r0) / (domain[1] - d0);
    return Object.assign(function (num) {
        return r0 + (num - d0) * m;
    }, {
        inverse: function () { return linear(range, domain); }
    });
}

const isArray = isType('Array');
const isNotNaN = not(isNaN);
const isNotNil = not(isNil);
const isNotNull = not(isNull);
const isFunction = isType('Function');
const isNumber = isType('Number');
const isObject = isType('Object');
allOf([
	isNotNil,
	obj => obj.then && isFunction(obj.then)
]);
const isValidNumber = allOf([isNumber, isNotNaN]);
const negate = x => !x;
pipe([Number, isValidNumber]);
pipe([parseFloat, isValidNumber]);

const concat = generic(Array.prototype.concat);

const mergeWith = fn => (a, b) => reduce(
	pairs(b),
	(obj, [bKey, bValue]) => {
		obj[bKey] = has(obj, bKey) ? fn(obj[bKey], bValue) : bValue;
		return obj;
	},
	merge({}, a)
);

const reduceTo = ctor => fn => reduceWith(fn, new ctor());

const reduceFromEmptyArray = reduceTo(Array);
const reduceFromEmptyObject = reduceTo(Object);

const getId = getKey$1('id');
const getKey = getKey$1('key');
const getValue = getKey$1('value');
const getValues = getKey$1('values');

const getFirstAndLast = collect([head, last]);
const inclusiveRange = ([start, end, step = 1]) => {
	if (start === end) {
		return isUndefined(start) ? [] : [start];
	}
	const range$1 = range(start, end, step);
	return range$1.length === 0 || last(range$1) + step > end
		? range$1
		: appendTo(range$1, end);
};
const setIndexAsKey = (key = 'index') => pipe([
	zipWithIndex,
	mapWith(([obj, index]) => setIn(obj, key, index))
]);
sortWith([
	getValue,
	sorterDesc(getKey)
]);
sortWith([
	sorterDesc(getValue),
	getKey
]);
sortWith([
	sorterDesc(getValue),
	sorterDesc(getKey)
]);

const getLength = getKey$1('length');

const arraySumWith = accessor => reduceWith((acc, item) => {
	const value = accessor(item);
	return acc + (isNumber(value) ? value : 0);
}, 0);

const makeKeyed = value => pipe([
	collect([identity$1, mapWith(always(value))]),
	apply(make)
]);

const toFloatOrIdentity = x => {
	const parsed = parseFloat(x);
	return isValidNumber(parsed) ? parsed : x;
};

const makeArrayTransformer = fnArr => pipe([
	partial(zip, [fnArr, __]),
	mapWith(([fn, arg]) => fn(arg))
]);

const isKeyValue = ([key, value]) => pipe([getKey$1(key), is(value)]);

const sliceString = generic(String.prototype.slice);
generic(String.prototype.trim);

const sliceStringAt = arr => partial(sliceString, [__, ...arr]);

const arrayMax = apply(Math.max);
const arrayMin = apply(Math.min);
const arraySum = reduceWith(sum, 0);
pipe([
	collect([arraySum, getLength]),
	apply(divide),
]);
const keyValueArrayAverage = pipe([
	collect([arraySumWith(getValue), getLength]),
	apply(divide),
]);

const keyValueArrayToObject = objects => reduce(objects,
	(acc, {key, value}) => {
		acc[key] = value;
		return acc;
	},
	{}
);
pipe([zipWithIndex, fromPairs]);
makeKeyed(false);
makeKeyed(true);
makeKeyed(0);
reduceFromEmptyObject((acc, item) => {
	forEach(keys(item), key => {
		if (has(acc, key)) {
			acc[key] += 1;
		} else {
			acc[key] = 1;
		}
	});
	return acc;
});
const mergeObjects = reduceFromEmptyObject((acc, item) => {
	forEach(pairs(item), ([key, value]) => {
		acc[key] = value;
	});
	return acc;
});

const joinWithBlank = joinWith(' ');
const joinWithColon = joinWith(':');
const joinWithSemicolon = joinWith(';');

const is0 = is(0);
const is1 = is(1);
const isGT0 = isGT(0);
const isGT1 = isGT(1);

const isIterableEmpty = pipe([getLength, is0]);
const isIterableNotEmpty = pipe([getLength, isGT0]);
pipe([getLength, is1]);
pipe([getLength, isGT1]);

const pairToKeyValueObject = ([key, value]) => ({key, value});

mapValuesWith(toFloatOrIdentity);
mergeWith(sum);
mergeWith(merge);
mergeWith(concat);
mergeWith(appendTo);
const pickIfTruthy = pickIf(identity$1);
pipe([
	pairs,
	mapWith(reverse),
	fromPairs
]);

pipe([values, apply(concat)]);
pipe([
	pairs,
	filterWith(pipe([
		last,
		allOf([isArray, isIterableNotEmpty])
	])),
	reduceFromEmptyArray((acc, [key, values]) => {
		const props = values.map(value => ({[key]: value}));
		return acc.length === 0
			? props
			: flatMap(
				props,
				prop => acc.map(obj => merge(obj, prop))
			);
	})
]);
const objectToKeyValueArray = pipe([
	pairs,
	mapWith(pairToKeyValueObject)
]);
const getTruthyValuesKeys = pipe([pickIfTruthy, keys]);

const setupResizeObserver = () => {
	const _writable = writable({blockSize: 0, inlineSize: 0});
	function resizeObserver (node, type = 'borderBoxSize') {
		const callback = entries => _writable.set(entries[0][type][0]);
		const observer = new ResizeObserver(callback);
		observer.observe(node);
		return () => observer.disconnect();
	}
	return {_writable, resizeObserver}
};

/* ../ui/src/sensors/screen/WindowBinder.svelte generated by Svelte v3.44.2 */

function create_fragment$1(ctx) {
	let mounted;
	let dispose;
	add_render_callback(/*onwindowresize*/ ctx[3]);

	return {
		c: noop,
		m(target, anchor) {
			if (!mounted) {
				dispose = [
					listen(window, "resize", function () {
						if (is_function(/*onResize*/ ctx[2])) /*onResize*/ ctx[2].apply(this, arguments);
					}),
					listen(window, "resize", /*onwindowresize*/ ctx[3])
				];

				mounted = true;
			}
		},
		p(new_ctx, [dirty]) {
			ctx = new_ctx;
		},
		i: noop,
		o: noop,
		d(detaching) {
			mounted = false;
			run_all(dispose);
		}
	};
}

function instance$1($$self, $$props, $$invalidate) {
	let { innerHeight = null } = $$props;
	let { innerWidth = null } = $$props;
	let { onResize } = $$props;

	function onwindowresize() {
		$$invalidate(1, innerWidth = window.innerWidth);
		$$invalidate(0, innerHeight = window.innerHeight);
	}

	$$self.$$set = $$props => {
		if ('innerHeight' in $$props) $$invalidate(0, innerHeight = $$props.innerHeight);
		if ('innerWidth' in $$props) $$invalidate(1, innerWidth = $$props.innerWidth);
		if ('onResize' in $$props) $$invalidate(2, onResize = $$props.onResize);
	};

	return [innerHeight, innerWidth, onResize, onwindowresize];
}

class WindowBinder extends SvelteComponent {
	constructor(options) {
		super();

		init(this, options, instance$1, create_fragment$1, safe_not_equal, {
			innerHeight: 0,
			innerWidth: 1,
			onResize: 2
		});
	}
}

var WindowBinder$1 = WindowBinder;

/* ../ui/src/sensors/screen/ScreenSensor.svelte generated by Svelte v3.44.2 */

function add_css(target) {
	append_styles(target, "svelte-c7ttbw", ".textSample.svelte-c7ttbw.svelte-c7ttbw{background:blue;left:0;overflow:hidden;pointer-events:none;position:fixed;top:0;visibility:hidden;width:0}.textSample.svelte-c7ttbw span.svelte-c7ttbw{display:block;width:max-content}.devInfo.svelte-c7ttbw.svelte-c7ttbw{background-color:white;border:1px solid darkgrey;box-shadow:2px 2px 2px grey;left:25vw;padding:0.5em;position:absolute;top:4em;width:50vw;z-index:1000}button.svelte-c7ttbw.svelte-c7ttbw{padding:0.25rem}");
}

// (107:0) {#if shouldRender}
function create_if_block(ctx) {
	let windowbinder;
	let updating_innerHeight;
	let updating_innerWidth;
	let t0;
	let div;
	let span;
	let t1;
	let resizeObserver_action;
	let t2;
	let if_block_anchor;
	let current;
	let mounted;
	let dispose;

	function windowbinder_innerHeight_binding(value) {
		/*windowbinder_innerHeight_binding*/ ctx[12](value);
	}

	function windowbinder_innerWidth_binding(value) {
		/*windowbinder_innerWidth_binding*/ ctx[13](value);
	}

	let windowbinder_props = { onResize: /*updateScreen*/ ctx[9] };

	if (/*innerHeight*/ ctx[3] !== void 0) {
		windowbinder_props.innerHeight = /*innerHeight*/ ctx[3];
	}

	if (/*innerWidth*/ ctx[4] !== void 0) {
		windowbinder_props.innerWidth = /*innerWidth*/ ctx[4];
	}

	windowbinder = new WindowBinder$1({ props: windowbinder_props });
	binding_callbacks.push(() => bind(windowbinder, 'innerHeight', windowbinder_innerHeight_binding));
	binding_callbacks.push(() => bind(windowbinder, 'innerWidth', windowbinder_innerWidth_binding));
	let if_block = /*isDev*/ ctx[0] && /*$_sampleSize*/ ctx[2] && /*devInfo*/ ctx[5] && create_if_block_1(ctx);

	return {
		c() {
			create_component(windowbinder.$$.fragment);
			t0 = space();
			div = element("div");
			span = element("span");
			t1 = text(/*sampleText*/ ctx[1]);
			t2 = space();
			if (if_block) if_block.c();
			if_block_anchor = empty();
			attr(span, "class", "svelte-c7ttbw");
			attr(div, "class", "textSample svelte-c7ttbw");
		},
		m(target, anchor) {
			mount_component(windowbinder, target, anchor);
			insert(target, t0, anchor);
			insert(target, div, anchor);
			append(div, span);
			append(span, t1);
			insert(target, t2, anchor);
			if (if_block) if_block.m(target, anchor);
			insert(target, if_block_anchor, anchor);
			current = true;

			if (!mounted) {
				dispose = action_destroyer(resizeObserver_action = /*resizeObserver*/ ctx[8].call(null, span));
				mounted = true;
			}
		},
		p(ctx, dirty) {
			const windowbinder_changes = {};

			if (!updating_innerHeight && dirty & /*innerHeight*/ 8) {
				updating_innerHeight = true;
				windowbinder_changes.innerHeight = /*innerHeight*/ ctx[3];
				add_flush_callback(() => updating_innerHeight = false);
			}

			if (!updating_innerWidth && dirty & /*innerWidth*/ 16) {
				updating_innerWidth = true;
				windowbinder_changes.innerWidth = /*innerWidth*/ ctx[4];
				add_flush_callback(() => updating_innerWidth = false);
			}

			windowbinder.$set(windowbinder_changes);
			if (!current || dirty & /*sampleText*/ 2) set_data(t1, /*sampleText*/ ctx[1]);

			if (/*isDev*/ ctx[0] && /*$_sampleSize*/ ctx[2] && /*devInfo*/ ctx[5]) {
				if (if_block) {
					if_block.p(ctx, dirty);
				} else {
					if_block = create_if_block_1(ctx);
					if_block.c();
					if_block.m(if_block_anchor.parentNode, if_block_anchor);
				}
			} else if (if_block) {
				if_block.d(1);
				if_block = null;
			}
		},
		i(local) {
			if (current) return;
			transition_in(windowbinder.$$.fragment, local);
			current = true;
		},
		o(local) {
			transition_out(windowbinder.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			destroy_component(windowbinder, detaching);
			if (detaching) detach(t0);
			if (detaching) detach(div);
			if (detaching) detach(t2);
			if (if_block) if_block.d(detaching);
			if (detaching) detach(if_block_anchor);
			mounted = false;
			dispose();
		}
	};
}

// (116:1) {#if isDev && $_sampleSize && devInfo}
function create_if_block_1(ctx) {
	let div;
	let p0;
	let t0;
	let t1_value = /*devInfo*/ ctx[5].DPPR + "";
	let t1;
	let t2;
	let p1;
	let t3;
	let t4_value = /*devInfo*/ ctx[5].Display + "";
	let t4;
	let t5;
	let p2;
	let t6;
	let t7_value = /*devInfo*/ ctx[5].Text + "";
	let t7;
	let t8;
	let p3;
	let t9;
	let t10_value = /*devInfo*/ ctx[5].Classes + "";
	let t10;
	let t11;
	let p4;
	let t12;
	let t13_value = /*devInfo*/ ctx[5].Orientation + "";
	let t13;
	let t14;
	let button;
	let mounted;
	let dispose;

	return {
		c() {
			div = element("div");
			p0 = element("p");
			t0 = text("DPPR: ");
			t1 = text(t1_value);
			t2 = space();
			p1 = element("p");
			t3 = text("Display: ");
			t4 = text(t4_value);
			t5 = space();
			p2 = element("p");
			t6 = text("Text: ");
			t7 = text(t7_value);
			t8 = space();
			p3 = element("p");
			t9 = text("Classes: ");
			t10 = text(t10_value);
			t11 = space();
			p4 = element("p");
			t12 = text("Orientation: ");
			t13 = text(t13_value);
			t14 = space();
			button = element("button");
			button.textContent = "Close";
			attr(button, "class", "svelte-c7ttbw");
			attr(div, "class", "devInfo svelte-c7ttbw");
		},
		m(target, anchor) {
			insert(target, div, anchor);
			append(div, p0);
			append(p0, t0);
			append(p0, t1);
			append(div, t2);
			append(div, p1);
			append(p1, t3);
			append(p1, t4);
			append(div, t5);
			append(div, p2);
			append(p2, t6);
			append(p2, t7);
			append(div, t8);
			append(div, p3);
			append(p3, t9);
			append(p3, t10);
			append(div, t11);
			append(div, p4);
			append(p4, t12);
			append(p4, t13);
			append(div, t14);
			append(div, button);

			if (!mounted) {
				dispose = listen(button, "click", /*click_handler*/ ctx[14]);
				mounted = true;
			}
		},
		p(ctx, dirty) {
			if (dirty & /*devInfo*/ 32 && t1_value !== (t1_value = /*devInfo*/ ctx[5].DPPR + "")) set_data(t1, t1_value);
			if (dirty & /*devInfo*/ 32 && t4_value !== (t4_value = /*devInfo*/ ctx[5].Display + "")) set_data(t4, t4_value);
			if (dirty & /*devInfo*/ 32 && t7_value !== (t7_value = /*devInfo*/ ctx[5].Text + "")) set_data(t7, t7_value);
			if (dirty & /*devInfo*/ 32 && t10_value !== (t10_value = /*devInfo*/ ctx[5].Classes + "")) set_data(t10, t10_value);
			if (dirty & /*devInfo*/ 32 && t13_value !== (t13_value = /*devInfo*/ ctx[5].Orientation + "")) set_data(t13, t13_value);
		},
		d(detaching) {
			if (detaching) detach(div);
			mounted = false;
			dispose();
		}
	};
}

function create_fragment(ctx) {
	let if_block_anchor;
	let current;
	let if_block = /*shouldRender*/ ctx[6] && create_if_block(ctx);

	return {
		c() {
			if (if_block) if_block.c();
			if_block_anchor = empty();
		},
		m(target, anchor) {
			if (if_block) if_block.m(target, anchor);
			insert(target, if_block_anchor, anchor);
			current = true;
		},
		p(ctx, [dirty]) {
			if (/*shouldRender*/ ctx[6]) if_block.p(ctx, dirty);
		},
		i(local) {
			if (current) return;
			transition_in(if_block);
			current = true;
		},
		o(local) {
			transition_out(if_block);
			current = false;
		},
		d(detaching) {
			if (if_block) if_block.d(detaching);
			if (detaching) detach(if_block_anchor);
		}
	};
}

const _screen = writable();
const defaultBreakpoints = [45, 90, 135, 180];
let instancesCount = 0;

function instance($$self, $$props, $$invalidate) {
	let sampleLength;
	let devInfo;

	let $_screen,
		$$unsubscribe__screen = noop;

	let $_sampleSize;
	component_subscribe($$self, _screen, $$value => $$invalidate(11, $_screen = $$value));
	$$self.$$.on_destroy.push(() => $$unsubscribe__screen());
	const makeClasses = pipe([mergeObjects, getTruthyValuesKeys, joinWithBlank]);

	// singleton
	const instanceId = instancesCount++;

	const shouldRender = instanceId === 0;

	// action
	const { _writable: _sampleSize, resizeObserver } = setupResizeObserver();

	component_subscribe($$self, _sampleSize, value => $$invalidate(2, $_sampleSize = value));
	let { isDev = false } = $$props;
	let { sampleText = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' } = $$props;
	let { breakpoints = defaultBreakpoints } = $$props;
	let innerHeight;
	let innerWidth;

	const updateScreen = () => {
		if (isServerSide) {
			return;
		}

		// geometry
		const display = {
			aspectRatio: window.innerWidth / window.innerHeight,
			height: window.innerHeight,
			orientation: window.screen.orientation,
			pixelRatio: window.devicePixelRatio,
			width: window.innerWidth
		};

		const glyph = {
			width: $_sampleSize.inlineSize / sampleLength,
			height: $_sampleSize.blockSize
		};

		const text = {
			maxChars: Math.floor(display.width / glyph.width),
			maxLines: Math.floor(display.height / glyph.height)
		};

		// flags
		const orientations = {
			landscape: display.aspectRatio >= 1,
			portrait: display.aspectRatio < 1
		};

		const sizes = {
			xSmall: text.maxChars < breakpoints[0],
			small: true,
			medium: text.maxChars >= breakpoints[1],
			large: text.maxChars >= breakpoints[2],
			xLarge: text.maxChars >= breakpoints[3]
		};

		// update
		_screen.set({
			classes: makeClasses([sizes, orientations]),
			display,
			glyph,
			orientations,
			sizes,
			text
		});
	};

	function windowbinder_innerHeight_binding(value) {
		innerHeight = value;
		$$invalidate(3, innerHeight);
	}

	function windowbinder_innerWidth_binding(value) {
		innerWidth = value;
		$$invalidate(4, innerWidth);
	}

	const click_handler = () => {
		$$invalidate(0, isDev = false);
	};

	$$self.$$set = $$props => {
		if ('isDev' in $$props) $$invalidate(0, isDev = $$props.isDev);
		if ('sampleText' in $$props) $$invalidate(1, sampleText = $$props.sampleText);
		if ('breakpoints' in $$props) $$invalidate(10, breakpoints = $$props.breakpoints);
	};

	$$self.$$.update = () => {
		if ($$self.$$.dirty & /*sampleText*/ 2) {
			sampleLength = sampleText.length;
		}

		if ($$self.$$.dirty & /*$_sampleSize*/ 4) {
			$_sampleSize && updateScreen();
		}

		if ($$self.$$.dirty & /*$_screen*/ 2048) {
			$$invalidate(5, devInfo = shouldRender && $_screen && {
				Classes: $_screen.classes,
				Display: `${$_screen.display.width} x ${$_screen.display.height} px`,
				DPPR: $_screen.display.pixelRatio.toPrecision(4),
				Orientation: $_screen.display.aspectRatio > 1
				? 'landscape'
				: 'portrait',
				Text: `${$_screen.text.maxChars} x ${$_screen.text.maxLines} chars`
			});
		}
	};

	return [
		isDev,
		sampleText,
		$_sampleSize,
		innerHeight,
		innerWidth,
		devInfo,
		shouldRender,
		_sampleSize,
		resizeObserver,
		updateScreen,
		breakpoints,
		$_screen,
		windowbinder_innerHeight_binding,
		windowbinder_innerWidth_binding,
		click_handler
	];
}

class ScreenSensor extends SvelteComponent {
	constructor(options) {
		super();
		init(this, options, instance, create_fragment, safe_not_equal, { isDev: 0, sampleText: 1, breakpoints: 10 }, add_css);
	}
}

const _groups = writable([]);
const setGroups = groups => _groups.set(groups);
const _lookup = writable({});
const makeIndicatorsLookup = pipe([
	pluck('indicators'),
	flatten,
	indexBy(getPath('schema.value.id')),
]);
_groups.subscribe(groups => {
	_lookup.set(makeIndicatorsLookup(groups));
});
const getYearExtent = pipe([
	pluck('indicators'),
	flatten,
	pluck('year_extent'),
	transpose,
	makeArrayTransformer([arrayMin, arrayMax]),
]);
const _yearExtent = derived(_groups, getYearExtent);
const _yearRange = derived(_yearExtent, inclusiveRange);

const _isSmallScreen = derived(
	_screen,
	s => s && (s.sizes.small && !s.sizes.medium)
);
const _screenClasses = derived(_screen, s => s?.classes);
const smallSafety = {left: 40, right: 40};
const largeSafety = {left: 120, right: 80};
const _safety = derived(
	_isSmallScreen,
	isSmall => isSmall ? smallSafety : largeSafety
);
const _timelineHeight = writable(0);
const _timelineWidth = writable(0);
const _timelineLayout = derived([
	_safety,
	_timelineHeight,
	_timelineWidth,
	_yearExtent,
], ([safety, height, width, yearExtent]) => {
	const padding = 10;
	const fontSize = Math.min(height / 4, 14);
	const radius = Math.min(height / 8, 7);
	const fullExtent = [
		padding + radius,
		width - padding - radius
	];
	const fullScaleX = linear(yearExtent, fullExtent);
	const start = fullExtent[0] + safety.left;
	const end = fullExtent[1] - safety.right;
	const scaleX = linear(yearExtent, [start, end]);
	const step = scaleX(start + 1) - scaleX(start);
	const doShortenYears = step < 3 * fontSize;
	const y1 = height / 3;
	const y2 = (height + y1 + radius) / 2;
	const ym = height / 2;
	return {
		doShortenYears,
		end,
		fontSize,
		fullScaleX,
		height,
		radius,
		scaleX,
		start,
		width,
		y1,
		y2,
		ym,
	}
});

const makeClasses = pipe([getTruthyValuesKeys, joinWithBlank]);

const activate = id => mapValuesWith((value, key) => key === id);
const defaultViews = {
	barchart: false,
	distribution: true,
	info: false,
	map: false,
	settings: false,
	sidebar: false,
	trends: false,
};
const _views = writable(defaultViews);
const showView = id => _views.update(activate(id));
const _viewsClasses = derived(_views, makeClasses);
const defaultRoutes = {
	Id: false,
	IdYear: false,
	Index: true,
};
const _routes = writable(defaultRoutes);
const setRoute = id => _routes.update(activate(id));
const _isTimelineHidden = derived(
	[_isSmallScreen, _views],
	([isSmall, views]) => isSmall && (views.info || views.settings)
);
const _navFlags = writable({showPOIs: false});
const _hrefBase = writable('');

const _selectedYear = writable();
const setSelectedYear = year => _selectedYear.set(Number(year));
const resetSelectedYear = () => _selectedYear.set();

function formatDecimal(x) {
  return Math.abs(x = Math.round(x)) >= 1e21
      ? x.toLocaleString("en").replace(/,/g, "")
      : x.toString(10);
}
function formatDecimalParts(x, p) {
  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null;
  var i, coefficient = x.slice(0, i);
  return [
    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
    +x.slice(i + 1)
  ];
}

function exponent(x) {
  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
}

function formatGroup(grouping, thousands) {
  return function(value, width) {
    var i = value.length,
        t = [],
        j = 0,
        g = grouping[0],
        length = 0;
    while (i > 0 && g > 0) {
      if (length + g + 1 > width) g = Math.max(1, width - length);
      t.push(value.substring(i -= g, i + g));
      if ((length += g + 1) > width) break;
      g = grouping[j = (j + 1) % grouping.length];
    }
    return t.reverse().join(thousands);
  };
}

function formatNumerals(numerals) {
  return function(value) {
    return value.replace(/[0-9]/g, function(i) {
      return numerals[+i];
    });
  };
}

var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function formatSpecifier(specifier) {
  if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
  var match;
  return new FormatSpecifier({
    fill: match[1],
    align: match[2],
    sign: match[3],
    symbol: match[4],
    zero: match[5],
    width: match[6],
    comma: match[7],
    precision: match[8] && match[8].slice(1),
    trim: match[9],
    type: match[10]
  });
}
formatSpecifier.prototype = FormatSpecifier.prototype;
function FormatSpecifier(specifier) {
  this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
  this.align = specifier.align === undefined ? ">" : specifier.align + "";
  this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
  this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
  this.zero = !!specifier.zero;
  this.width = specifier.width === undefined ? undefined : +specifier.width;
  this.comma = !!specifier.comma;
  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
  this.trim = !!specifier.trim;
  this.type = specifier.type === undefined ? "" : specifier.type + "";
}
FormatSpecifier.prototype.toString = function() {
  return this.fill
      + this.align
      + this.sign
      + this.symbol
      + (this.zero ? "0" : "")
      + (this.width === undefined ? "" : Math.max(1, this.width | 0))
      + (this.comma ? "," : "")
      + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
      + (this.trim ? "~" : "")
      + this.type;
};

function formatTrim(s) {
  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
    switch (s[i]) {
      case ".": i0 = i1 = i; break;
      case "0": if (i0 === 0) i0 = i; i1 = i; break;
      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;
    }
  }
  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
}

var prefixExponent;
function formatPrefixAuto(x, p) {
  var d = formatDecimalParts(x, p);
  if (!d) return x + "";
  var coefficient = d[0],
      exponent = d[1],
      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
      n = coefficient.length;
  return i === n ? coefficient
      : i > n ? coefficient + new Array(i - n + 1).join("0")
      : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
      : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
}

function formatRounded(x, p) {
  var d = formatDecimalParts(x, p);
  if (!d) return x + "";
  var coefficient = d[0],
      exponent = d[1];
  return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
      : coefficient + new Array(exponent - coefficient.length + 2).join("0");
}

var formatTypes = {
  "%": (x, p) => (x * 100).toFixed(p),
  "b": (x) => Math.round(x).toString(2),
  "c": (x) => x + "",
  "d": formatDecimal,
  "e": (x, p) => x.toExponential(p),
  "f": (x, p) => x.toFixed(p),
  "g": (x, p) => x.toPrecision(p),
  "o": (x) => Math.round(x).toString(8),
  "p": (x, p) => formatRounded(x * 100, p),
  "r": formatRounded,
  "s": formatPrefixAuto,
  "X": (x) => Math.round(x).toString(16).toUpperCase(),
  "x": (x) => Math.round(x).toString(16)
};

function identity(x) {
  return x;
}

var map = Array.prototype.map,
    prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
function formatLocale(locale) {
  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
      currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
      currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
      decimal = locale.decimal === undefined ? "." : locale.decimal + "",
      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),
      percent = locale.percent === undefined ? "%" : locale.percent + "",
      minus = locale.minus === undefined ? "−" : locale.minus + "",
      nan = locale.nan === undefined ? "NaN" : locale.nan + "";
  function newFormat(specifier) {
    specifier = formatSpecifier(specifier);
    var fill = specifier.fill,
        align = specifier.align,
        sign = specifier.sign,
        symbol = specifier.symbol,
        zero = specifier.zero,
        width = specifier.width,
        comma = specifier.comma,
        precision = specifier.precision,
        trim = specifier.trim,
        type = specifier.type;
    if (type === "n") comma = true, type = "g";
    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g";
    if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
    var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
        suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
    var formatType = formatTypes[type],
        maybeSuffix = /[defgprs%]/.test(type);
    precision = precision === undefined ? 6
        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
        : Math.max(0, Math.min(20, precision));
    function format(value) {
      var valuePrefix = prefix,
          valueSuffix = suffix,
          i, n, c;
      if (type === "c") {
        valueSuffix = formatType(value) + valueSuffix;
        value = "";
      } else {
        value = +value;
        var valueNegative = value < 0 || 1 / value < 0;
        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
        if (trim) value = formatTrim(value);
        if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
        valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
        valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
        if (maybeSuffix) {
          i = -1, n = value.length;
          while (++i < n) {
            if (c = value.charCodeAt(i), 48 > c || c > 57) {
              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
              value = value.slice(0, i);
              break;
            }
          }
        }
      }
      if (comma && !zero) value = group(value, Infinity);
      var length = valuePrefix.length + value.length + valueSuffix.length,
          padding = length < width ? new Array(width - length + 1).join(fill) : "";
      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
      switch (align) {
        case "<": value = valuePrefix + value + valueSuffix + padding; break;
        case "=": value = valuePrefix + padding + value + valueSuffix; break;
        case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
        default: value = padding + valuePrefix + value + valueSuffix; break;
      }
      return numerals(value);
    }
    format.toString = function() {
      return specifier + "";
    };
    return format;
  }
  function formatPrefix(specifier, value) {
    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
        k = Math.pow(10, -e),
        prefix = prefixes[8 + e / 3];
    return function(value) {
      return f(k * value) + prefix;
    };
  }
  return {
    format: newFormat,
    formatPrefix: formatPrefix
  };
}

var locale;
exports.format = void 0;
exports.formatPrefix = void 0;
defaultLocale({
  thousands: ",",
  grouping: [3],
  currency: ["$", ""]
});
function defaultLocale(definition) {
  locale = formatLocale(definition);
  exports.format = locale.format;
  exports.formatPrefix = locale.formatPrefix;
  return locale;
}

const getIdentity = () => identity$1;
const makeGetIndicatorFormatOf = id => pipe([
	getPath(`${id}.schema.value`),
	adapter([
		casus(isNil, getIdentity),
		casus(
			allOf([
				isKeyValue(['data_type', 'int']),
				hasKey('format'),
			]),
			value => pipe([
				Math.round,
				exports.format(value.format)
			])
		),
		casus(
			allOf([
				isKeyValue(['data_type', 'int']),
				not(hasKey('format')),
			]),
			() => Math.round
		),
		casus(
			hasKey('format'),
			value => exports.format(value.format)
		),
		getIdentity,
	]),
]);
const makeGetRefFormatOf = id => pipe([
	getPath(`${id}.schema.value`),
	adapter([
		casus(isNil, getIdentity),
		casus(
			allOf([
				isKeyValue(['data_type', 'int']),
				hasKey('format'),
			]),
			value => pipe([
				Math.round,
				exports.format(value.format)
			])
		),
		casus(
			isKeyValue(['data_type', 'int']),
			() => Math.round
		),
		casus(
			hasKey('format'),
			value => exports.format(value.format)
		),
		getIdentity,
	])
]);
const shortenYear = pipe([String, sliceStringAt([2, 4])]);

exports.ScreenSensor = ScreenSensor;
exports.SvelteComponent = SvelteComponent;
exports.__ = __;
exports._hrefBase = _hrefBase;
exports._isSmallScreen = _isSmallScreen;
exports._isTimelineHidden = _isTimelineHidden;
exports._lookup = _lookup;
exports._navFlags = _navFlags;
exports._routes = _routes;
exports._screenClasses = _screenClasses;
exports._selectedYear = _selectedYear;
exports._timelineHeight = _timelineHeight;
exports._timelineLayout = _timelineLayout;
exports._timelineWidth = _timelineWidth;
exports._views = _views;
exports._viewsClasses = _viewsClasses;
exports._yearRange = _yearRange;
exports.action_destroyer = action_destroyer;
exports.add_render_callback = add_render_callback;
exports.add_resize_listener = add_resize_listener;
exports.afterUpdate = afterUpdate;
exports.allOf = allOf;
exports.always = always;
exports.append = append;
exports.appendTo = appendTo;
exports.append_styles = append_styles;
exports.application = application;
exports.applyTo = applyTo;
exports.attr = attr;
exports.beforeUpdate = beforeUpdate;
exports.binding_callbacks = binding_callbacks;
exports.bubble = bubble;
exports.check_outros = check_outros;
exports.collect = collect;
exports.component_subscribe = component_subscribe;
exports.concat = concat;
exports.createEventDispatcher = createEventDispatcher;
exports.create_component = create_component;
exports.create_slot = create_slot;
exports.derived = derived;
exports.destroy_block = destroy_block;
exports.destroy_component = destroy_component;
exports.destroy_each = destroy_each;
exports.detach = detach;
exports.element = element;
exports.empty = empty;
exports.every = every;
exports.exponent = exponent;
exports.filter = filter;
exports.filterWith = filterWith;
exports.findIndex = findIndex;
exports.flatMapWith = flatMapWith;
exports.flatten = flatten;
exports.formatSpecifier = formatSpecifier;
exports.generic = generic;
exports.getAt = getAt;
exports.getFirstAndLast = getFirstAndLast;
exports.getId = getId;
exports.getKey = getKey$1;
exports.getKey$1 = getKey;
exports.getPath = getPath;
exports.getPathIn = getPathIn;
exports.getValue = getValue;
exports.getValues = getValues;
exports.get_all_dirty_from_scope = get_all_dirty_from_scope;
exports.get_slot_changes = get_slot_changes;
exports.get_store_value = get_store_value;
exports.groupBy = groupBy;
exports.group_outros = group_outros;
exports.has = has;
exports.hasKey = hasKey;
exports.identity = identity$1;
exports.inclusiveRange = inclusiveRange;
exports.index = index;
exports.indexBy = indexBy;
exports.init = init;
exports.insert = insert;
exports.is = is;
exports.isArray = isArray;
exports.isClientSide = isClientSide;
exports.isGT = isGT;
exports.isIn = isIn;
exports.isIterableEmpty = isIterableEmpty;
exports.isIterableNotEmpty = isIterableNotEmpty;
exports.isNil = isNil;
exports.isNotNil = isNotNil;
exports.isNotNull = isNotNull;
exports.isObject = isObject;
exports.isServerSide = isServerSide;
exports.isUndefined = isUndefined;
exports.is_function = is_function;
exports.joinWithColon = joinWithColon;
exports.joinWithSemicolon = joinWithSemicolon;
exports.keyValueArrayAverage = keyValueArrayAverage;
exports.keyValueArrayToObject = keyValueArrayToObject;
exports.keys = keys;
exports.last = last;
exports.linear = linear;
exports.listen = listen;
exports.make = make;
exports.makeGetIndicatorFormatOf = makeGetIndicatorFormatOf;
exports.makeGetRefFormatOf = makeGetRefFormatOf;
exports.map = map$1;
exports.mapValues = mapValues;
exports.mapValuesWith = mapValuesWith;
exports.mapWith = mapWith;
exports.merge = merge;
exports.mount_component = mount_component;
exports.negate = negate;
exports.noop = noop;
exports.not = not;
exports.objectToKeyValueArray = objectToKeyValueArray;
exports.onMount = onMount;
exports.pairs = pairs;
exports.partial = partial;
exports.pipe = pipe;
exports.pluck = pluck;
exports.pullFrom = pullFrom;
exports.reduce = reduce;
exports.reduceWith = reduceWith;
exports.resetSelectedYear = resetSelectedYear;
exports.run_all = run_all;
exports.safe_not_equal = safe_not_equal;
exports.setGroups = setGroups;
exports.setIndexAsKey = setIndexAsKey;
exports.setKey = setKey;
exports.setPathIn = setPathIn;
exports.setRoute = setRoute;
exports.setSelectedYear = setSelectedYear;
exports.set_data = set_data;
exports.set_store_value = set_store_value;
exports.set_style = set_style;
exports.shortenYear = shortenYear;
exports.showView = showView;
exports.skip = skip;
exports.skipIf = skipIf;
exports.sliceString = sliceString;
exports.sort = sort;
exports.sortWith = sortWith;
exports.sorter = sorter;
exports.sorterDesc = sorterDesc;
exports.space = space;
exports.stop_propagation = stop_propagation;
exports.subscribe = subscribe;
exports.svg_element = svg_element;
exports.tail = tail;
exports.text = text;
exports.toggle_class = toggle_class;
exports.transition_in = transition_in;
exports.transition_out = transition_out;
exports.uniques = uniques;
exports.updateKey = updateKey;
exports.update_keyed_each = update_keyed_each;
exports.update_slot_base = update_slot_base;
exports.values = values;
exports.when = when;
exports.writable = writable;
exports.zip = zip;
