(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document); import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, v as validate_slots, g as getContext, o as onMount, c as setContext, f as element, h as space, n as noop, k as attr_dev, j as add_location, l as append_dev, p as detach_dev, q as binding_callbacks } from './index-998178c7.js'; import { debounce } from '../../../../../../../../../js/libraries/miscTools.js'; /* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */ const file = "src\\components\\pane-aligner.svelte"; function create_fragment(ctx) { let div6; let div5; let div2; let div0; let slot0; let t0; let div1; let slot1; let t1; let div3; let slot2; let t2; let div4; let slot3; const block = { c: function create() { div6 = element("div"); div5 = element("div"); div2 = element("div"); div0 = element("div"); slot0 = element("slot"); t0 = space(); div1 = element("div"); slot1 = element("slot"); t1 = space(); div3 = element("div"); slot2 = element("slot"); t2 = space(); div4 = element("div"); slot3 = element("slot"); this.c = noop; attr_dev(slot0, "name", "sidebar-left"); add_location(slot0, file, 74, 16, 2554); attr_dev(div0, "id", "sidebar-left"); add_location(div0, file, 73, 12, 2489); attr_dev(slot1, "name", "sidebar-left2"); add_location(slot1, file, 77, 16, 2688); attr_dev(div1, "id", "sidebar-left2"); add_location(div1, file, 76, 12, 2621); attr_dev(div2, "id", "sidebars-left"); attr_dev(div2, "class", "sidebar"); add_location(div2, file, 72, 8, 2435); attr_dev(slot2, "name", "sidebar-right"); add_location(slot2, file, 81, 12, 2853); attr_dev(div3, "id", "sidebar-right"); attr_dev(div3, "class", "pane sidebar"); add_location(div3, file, 80, 8, 2768); attr_dev(slot3, "name", "main"); attr_dev(slot3, "id", "main-slot"); add_location(slot3, file, 84, 12, 2968); attr_dev(div4, "id", "main-pane"); add_location(div4, file, 83, 8, 2913); attr_dev(div5, "class", "pane-container"); add_location(div5, file, 71, 4, 2397); attr_dev(div6, "id", "root"); attr_dev(div6, "class", "pane-centering"); add_location(div6, file, 70, 0, 2336); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); }, m: function mount(target, anchor) { insert_dev(target, div6, anchor); append_dev(div6, div5); append_dev(div5, div2); append_dev(div2, div0); append_dev(div0, slot0); /*div0_binding*/ ctx[5](div0); append_dev(div2, t0); append_dev(div2, div1); append_dev(div1, slot1); /*div1_binding*/ ctx[6](div1); append_dev(div5, t1); append_dev(div5, div3); append_dev(div3, slot2); /*div3_binding*/ ctx[7](div3); append_dev(div5, t2); append_dev(div5, div4); append_dev(div4, slot3); /*div4_binding*/ ctx[8](div4); /*div6_binding*/ ctx[9](div6); }, p: noop, i: noop, o: noop, d: function destroy(detaching) { if (detaching) detach_dev(div6); /*div0_binding*/ ctx[5](null); /*div1_binding*/ ctx[6](null); /*div3_binding*/ ctx[7](null); /*div4_binding*/ ctx[8](null); /*div6_binding*/ ctx[9](null); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_fragment.name, type: "component", source: "", ctx }); return block; } function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('pane-aligner', slots, []); let root; let mainPane; let sidebarLeft; let sidebarLeft2; let sidebarRight; let parentProps = getContext("alignerParent"); let switchView = parentProps != undefined ? getContext("alignerParent").switchView : undefined; let leftReplaced = false; let left2Replaced = false; let rightReplaced = false; let switchViewReplaced = false; function adjustSlotted() { if (root.parentNode != null) { let slotted = root.parentNode.host.childNodes; if (slotted.length == 0) { setTimeout(adjustSlotted, 50); } else { let changed = false; let html = root.parentNode.innerHTML; for (let item of slotted) { if (item.slot == "sidebar-left" && !leftReplaced) { html = html.replace("#sidebar-left{display:none}", ""); leftReplaced = true; changed = true; } else if (item.slot == "sidebar-left2" && !left2Replaced) { html = html.replace("#sidebar-left2{display:none}", ""); left2Replaced = true; changed = true; } else if (item.slot == "sidebar-right" && !rightReplaced) { html = html.replace("#sidebar-right{display:none;", "#sidebar-right{"); rightReplaced = true; changed = true; } } if (switchView != undefined && !switchViewReplaced) { html = html.replace("1880px", switchView); changed = true; } if (changed) { $$invalidate(0, root.parentNode.innerHTML = html, root); } } } } window.addEventListener("resize", debounce(adjustSlotted, 100)); onMount(() => { adjustSlotted(); }); const writable_props = []; Object.keys($$props).forEach(key => { if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); function div0_binding($$value) { binding_callbacks[$$value ? 'unshift' : 'push'](() => { sidebarLeft = $$value; $$invalidate(2, sidebarLeft); }); } function div1_binding($$value) { binding_callbacks[$$value ? 'unshift' : 'push'](() => { sidebarLeft2 = $$value; $$invalidate(3, sidebarLeft2); }); } function div3_binding($$value) { binding_callbacks[$$value ? 'unshift' : 'push'](() => { sidebarRight = $$value; $$invalidate(4, sidebarRight); }); } function div4_binding($$value) { binding_callbacks[$$value ? 'unshift' : 'push'](() => { mainPane = $$value; $$invalidate(1, mainPane); }); } function div6_binding($$value) { binding_callbacks[$$value ? 'unshift' : 'push'](() => { root = $$value; $$invalidate(0, root); }); } $$self.$capture_state = () => ({ getContext, setContext, onMount, debounce, root, mainPane, sidebarLeft, sidebarLeft2, sidebarRight, parentProps, switchView, leftReplaced, left2Replaced, rightReplaced, switchViewReplaced, adjustSlotted }); $$self.$inject_state = $$props => { if ('root' in $$props) $$invalidate(0, root = $$props.root); if ('mainPane' in $$props) $$invalidate(1, mainPane = $$props.mainPane); if ('sidebarLeft' in $$props) $$invalidate(2, sidebarLeft = $$props.sidebarLeft); if ('sidebarLeft2' in $$props) $$invalidate(3, sidebarLeft2 = $$props.sidebarLeft2); if ('sidebarRight' in $$props) $$invalidate(4, sidebarRight = $$props.sidebarRight); if ('parentProps' in $$props) parentProps = $$props.parentProps; if ('switchView' in $$props) switchView = $$props.switchView; if ('leftReplaced' in $$props) leftReplaced = $$props.leftReplaced; if ('left2Replaced' in $$props) left2Replaced = $$props.left2Replaced; if ('rightReplaced' in $$props) rightReplaced = $$props.rightReplaced; if ('switchViewReplaced' in $$props) switchViewReplaced = $$props.switchViewReplaced; }; if ($$props && "$$inject" in $$props) { $$self.$inject_state($$props.$$inject); } return [ root, mainPane, sidebarLeft, sidebarLeft2, sidebarRight, div0_binding, div1_binding, div3_binding, div4_binding, div6_binding ]; } class Pane_aligner extends SvelteElement { constructor(options) { super(); this.shadowRoot.innerHTML = ``; init( this, { target: this.shadowRoot, props: attribute_to_object(this.attributes), customElement: true }, instance, create_fragment, safe_not_equal, {}, null ); if (options) { if (options.target) { insert_dev(options.target, this, options.anchor); } } } } customElements.define("pane-aligner", Pane_aligner); export { Pane_aligner as default };