45 lines
2.0 KiB
JavaScript
45 lines
2.0 KiB
JavaScript
import { c as create_ssr_component, s as setContext, v as validate_component, m as missing_component } from "../../chunks/ssr.js";
|
|
import { Buffer } from "buffer";
|
|
import { s as subscribe } from "../../chunks/utils.js";
|
|
import { w as writable } from "../../chunks/index2.js";
|
|
import "../../chunks/walletStore.js";
|
|
import "@stellar/stellar-sdk";
|
|
const SimpleModalProvider = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let $modalStore, $$unsubscribe_modalStore;
|
|
const modalStore = writable({ component: null, props: {} });
|
|
$$unsubscribe_modalStore = subscribe(modalStore, (value) => $modalStore = value);
|
|
function open(component, props) {
|
|
modalStore.set({ component, props });
|
|
}
|
|
setContext("simple-modal", { open });
|
|
$$unsubscribe_modalStore();
|
|
return `${slots.default ? slots.default({}) : ``} ${$modalStore.component ? `${validate_component($modalStore.component || missing_component, "svelte:component").$$render($$result, Object.assign({}, $modalStore.props), {}, {})}` : ``}`;
|
|
});
|
|
const css = {
|
|
code: "body{margin:0;padding:0}",
|
|
map: null
|
|
};
|
|
let status = 200;
|
|
let error = null;
|
|
const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
let form;
|
|
if (typeof window !== "undefined") {
|
|
window.Buffer = Buffer;
|
|
window.process = window.process || { env: {} };
|
|
if (!window.process.env) window.process.env = {};
|
|
if (!window.process.cwd) window.process.cwd = () => "/";
|
|
}
|
|
let { data = {} } = $$props;
|
|
if ($$props.data === void 0 && $$bindings.data && data !== void 0) $$bindings.data(data);
|
|
$$result.css.add(css);
|
|
form = data?.form || null;
|
|
return ` <main>${validate_component(SimpleModalProvider, "SimpleModalProvider").$$render($$result, {}, {}, {
|
|
default: () => {
|
|
return `${slots.default ? slots.default({ form, status, error }) : ``}`;
|
|
}
|
|
})}</main> <div class="fixed bottom-4 right-4 z-50" data-svelte-h="svelte-1el9h9o"><a href="/emergency-access" class="btn btn-sm btn-warning">Emergency Dashboard Access</a> </div>`;
|
|
});
|
|
export {
|
|
Layout as default
|
|
};
|