diff --git a/.gitignore b/.gitignore index 092a493..7fbd70c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ /node_modules/ /src/node_modules/@sapper/ yarn-error.log -/__sapper__/ /static/main.css \ No newline at end of file diff --git a/__sapper__/build/build.json b/__sapper__/build/build.json new file mode 100644 index 0000000..243db50 --- /dev/null +++ b/__sapper__/build/build.json @@ -0,0 +1,36 @@ +{ + "bundler": "rollup", + "shimport": "2.0.4", + "assets": { + "main": "client.c2670d50.js" + }, + "css": { + "main": [ + "client-e118e612.css" + ] + }, + "dependencies": { + "index.svelte": [ + "index.ade356b9.js", + "inject_styles.5607aec6.js", + "index-39716d32.css" + ], + "about.svelte": [ + "about.e97c8bf2.js", + "inject_styles.5607aec6.js" + ], + "blog/index.svelte": [ + "index.39882a62.js", + "inject_styles.5607aec6.js", + "index-7ed37c94.css" + ], + "blog/[slug].svelte": [ + "[slug].fac92fe6.js", + "inject_styles.5607aec6.js", + "[slug]-5bc8f95f.css" + ] + }, + "legacy_assets": { + "main": "client.eb14add1.js" + } +} \ No newline at end of file diff --git a/__sapper__/build/client/465898c830bb9d2c.jpg b/__sapper__/build/client/465898c830bb9d2c.jpg new file mode 100644 index 0000000..5ad19cc Binary files /dev/null and b/__sapper__/build/client/465898c830bb9d2c.jpg differ diff --git a/__sapper__/build/client/[slug]-5bc8f95f.css b/__sapper__/build/client/[slug]-5bc8f95f.css new file mode 100644 index 0000000..7255deb --- /dev/null +++ b/__sapper__/build/client/[slug]-5bc8f95f.css @@ -0,0 +1 @@ +.content.svelte-emm3f3 h2{font-size:1.4em;font-weight:500}.content.svelte-emm3f3 pre{background-color:#f9f9f9;box-shadow:inset 1px 1px 5px rgba(0, 0, 0, 0.05);padding:0.5em;border-radius:2px;overflow-x:auto}.content.svelte-emm3f3 pre code{background-color:transparent;padding:0}.content.svelte-emm3f3 ul{line-height:1.5}.content.svelte-emm3f3 li{margin:0 0 0.5em 0} diff --git a/__sapper__/build/client/[slug].fac92fe6.js b/__sapper__/build/client/[slug].fac92fe6.js new file mode 100644 index 0000000..a895691 --- /dev/null +++ b/__sapper__/build/client/[slug].fac92fe6.js @@ -0,0 +1 @@ +import{S as t,i as s,s as a,a as e,e as n,t as o,q as i,d as r,c,b as l,f as h,g as u,h as f,j as m,k as d,l as p,n as v}from"./client.c2670d50.js";function g(t){let s,a,g,j,x,E,H=t[0].title+"",$=t[0].html+"";return document.title=s=t[0].title,{c(){a=e(),g=n("h1"),j=o(H),x=e(),E=n("div"),this.h()},l(t){i('[data-svelte="svelte-1uty71u"]',document.head).forEach(r),a=c(t),g=l(t,"H1",{});var s=h(g);j=u(s,H),s.forEach(r),x=c(t),E=l(t,"DIV",{class:!0}),h(E).forEach(r),this.h()},h(){f(E,"class","content svelte-emm3f3")},m(t,s){m(t,a,s),m(t,g,s),d(g,j),m(t,x,s),m(t,E,s),E.innerHTML=$},p(t,[a]){1&a&&s!==(s=t[0].title)&&(document.title=s),1&a&&H!==(H=t[0].title+"")&&p(j,H),1&a&&$!==($=t[0].html+"")&&(E.innerHTML=$)},i:v,o:v,d(t){t&&r(a),t&&r(g),t&&r(x),t&&r(E)}}}async function j({params:t}){const s=await this.fetch(`blog/${t.slug}.json`),a=await s.json();if(200===s.status)return{post:a};this.error(s.status,a.message)}function x(t,s,a){let{post:e}=s;return t.$$set=t=>{"post"in t&&a(0,e=t.post)},[e]}export default class extends t{constructor(t){super(),s(this,t,x,g,a,{post:0})}}export{j as preload}; diff --git a/__sapper__/build/client/about.e97c8bf2.js b/__sapper__/build/client/about.e97c8bf2.js new file mode 100644 index 0000000..fe32a2d --- /dev/null +++ b/__sapper__/build/client/about.e97c8bf2.js @@ -0,0 +1 @@ +import{S as s,i as t,s as e,a,e as h,t as o,q as i,d as r,c,b as u,f as n,g as l,j as d,k as f,n as m}from"./client.c2670d50.js";function p(s){let t,e,p,b,v,T;return{c(){t=a(),e=h("h1"),p=o("About this site"),b=a(),v=h("p"),T=o("This is the 'about' page. There's not much here."),this.h()},l(s){i('[data-svelte="svelte-1ine71f"]',document.head).forEach(r),t=c(s),e=u(s,"H1",{});var a=n(e);p=l(a,"About this site"),a.forEach(r),b=c(s),v=u(s,"P",{});var h=n(v);T=l(h,"This is the 'about' page. There's not much here."),h.forEach(r),this.h()},h(){document.title="About"},m(s,a){d(s,t,a),d(s,e,a),f(e,p),d(s,b,a),d(s,v,a),f(v,T)},p:m,i:m,o:m,d(s){s&&r(t),s&&r(e),s&&r(b),s&&r(v)}}}export default class extends s{constructor(s){super(),t(this,s,null,p,e,{})}} diff --git a/__sapper__/build/client/client-e118e612.css b/__sapper__/build/client/client-e118e612.css new file mode 100644 index 0000000..f6eb2fd --- /dev/null +++ b/__sapper__/build/client/client-e118e612.css @@ -0,0 +1,3 @@ +nav.svelte-1dbd5up{border-bottom:1px solid rgba(255,62,0,0.1);font-weight:300;padding:0 1em}ul.svelte-1dbd5up{margin:0;padding:0}ul.svelte-1dbd5up::after{content:'';display:block;clear:both}li.svelte-1dbd5up{display:block;float:left}[aria-current].svelte-1dbd5up{position:relative;display:inline-block}[aria-current].svelte-1dbd5up::after{position:absolute;content:'';width:calc(100% - 1em);height:2px;background-color:rgb(255,62,0);display:block;bottom:-1px}a.svelte-1dbd5up{text-decoration:none;padding:1em 0.5em;display:block} +main.svelte-1uhnsl8{position:relative;max-width:56em;background-color:white;padding:2em;margin:0 auto;box-sizing:border-box} +h1.svelte-8od9u6,p.svelte-8od9u6{margin:0 auto}h1.svelte-8od9u6{font-size:2.8em;font-weight:700;margin:0 0 0.5em 0}p.svelte-8od9u6{margin:1em auto}@media(min-width: 480px){h1.svelte-8od9u6{font-size:4em}} diff --git a/__sapper__/build/client/client.c2670d50.js b/__sapper__/build/client/client.c2670d50.js new file mode 100644 index 0000000..4287ba9 --- /dev/null +++ b/__sapper__/build/client/client.c2670d50.js @@ -0,0 +1,18 @@ +function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function r(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,n,r,o){return t[1]&&o?e(r.ctx.slice(),t[1](o(n))):r.ctx}function i(t,e,n,r,o,s,c){const i=function(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r{q.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}function D(t,e){const n={},r={},o={$$scope:1};let s=t.length;for(;s--;){const c=t[s],a=e[s];if(a){for(const t in c)t in a||(r[t]=1);for(const t in a)o[t]||(n[t]=a[t],o[t]=1);t[s]=a}else for(const t in c)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}function H(t){return"object"==typeof t&&null!==t?t:{}}function Y(t){t&&t.c()}function z(t,e){t&&t.l(e)}function F(t,e,r,c){const{fragment:a,on_mount:i,on_destroy:l,after_update:u}=t.$$;a&&a.m(e,r),c||I((()=>{const e=i.map(n).filter(s);l?l.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(I)}function G(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function W(t,e){-1===t.$$.dirty[0]&&(P.push(t),C||(C=!0,L.then(T)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const o=r.length?r[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),d&&W(e,t)),n})):[],p.update(),d=!0,o(p.before_update),p.fragment=!!c&&c(p.ctx),n.target){if(n.hydrate){const t=v(n.target);p.fragment&&p.fragment.l(t),t.forEach(f)}else p.fragment&&p.fragment.c();n.intro&&M(e.$$.fragment),F(e,n.target,n.anchor,n.customElement),T()}w(u)}class Q{$destroy(){G(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Z=[];function tt(e,n=t){let r;const o=[];function s(t){if(c(e,t)&&(e=t,r)){const t=!Z.length;for(let t=0;t{const t=o.indexOf(i);-1!==t&&o.splice(t,1),0===o.length&&(r(),r=null)}}}}const et={};function nt(e){let n,r,o,s,c,a,i,p,g,E,x,S,w,N,P,A;return{c(){n=d("nav"),r=d("ul"),o=d("li"),s=d("a"),c=h("home"),i=m(),p=d("li"),g=d("a"),E=h("about"),S=m(),w=d("li"),N=d("a"),P=h("blog"),this.h()},l(t){n=b(t,"NAV",{class:!0});var e=v(n);r=b(e,"UL",{class:!0});var a=v(r);o=b(a,"LI",{class:!0});var l=v(o);s=b(l,"A",{"aria-current":!0,href:!0,class:!0});var u=v(s);c=y(u,"home"),u.forEach(f),l.forEach(f),i=_(a),p=b(a,"LI",{class:!0});var d=v(p);g=b(d,"A",{"aria-current":!0,href:!0,class:!0});var h=v(g);E=y(h,"about"),h.forEach(f),d.forEach(f),S=_(a),w=b(a,"LI",{class:!0});var m=v(w);N=b(m,"A",{rel:!0,"aria-current":!0,href:!0,class:!0});var $=v(N);P=y($,"blog"),$.forEach(f),m.forEach(f),a.forEach(f),e.forEach(f),this.h()},h(){$(s,"aria-current",a=void 0===e[0]?"page":void 0),$(s,"href","."),$(s,"class","svelte-1dbd5up"),$(o,"class","svelte-1dbd5up"),$(g,"aria-current",x="about"===e[0]?"page":void 0),$(g,"href","about"),$(g,"class","svelte-1dbd5up"),$(p,"class","svelte-1dbd5up"),$(N,"rel","prefetch"),$(N,"aria-current",A="blog"===e[0]?"page":void 0),$(N,"href","blog"),$(N,"class","svelte-1dbd5up"),$(w,"class","svelte-1dbd5up"),$(r,"class","svelte-1dbd5up"),$(n,"class","svelte-1dbd5up")},m(t,e){u(t,n,e),l(n,r),l(r,o),l(o,s),l(s,c),l(r,i),l(r,p),l(p,g),l(g,E),l(r,S),l(r,w),l(w,N),l(N,P)},p(t,[e]){1&e&&a!==(a=void 0===t[0]?"page":void 0)&&$(s,"aria-current",a),1&e&&x!==(x="about"===t[0]?"page":void 0)&&$(g,"aria-current",x),1&e&&A!==(A="blog"===t[0]?"page":void 0)&&$(N,"aria-current",A)},i:t,o:t,d(t){t&&f(n)}}}function rt(t,e,n){let{segment:r}=e;return t.$$set=t=>{"segment"in t&&n(0,r=t.segment)},[r]}class ot extends Q{constructor(t){super(),X(this,t,rt,nt,c,{segment:0})}}function st(t){let e,n,r,o;e=new ot({props:{segment:t[0]}});const s=t[2].default,c=function(t,e,n,r){if(t){const o=a(t,e,n,r);return t[0](o)}}(s,t,t[1],null);return{c(){Y(e.$$.fragment),n=m(),r=d("main"),c&&c.c(),this.h()},l(t){z(e.$$.fragment,t),n=_(t),r=b(t,"MAIN",{class:!0});var o=v(r);c&&c.l(o),o.forEach(f),this.h()},h(){$(r,"class","svelte-1uhnsl8")},m(t,s){F(e,t,s),u(t,n,s),u(t,r,s),c&&c.m(r,null),o=!0},p(t,[n]){const r={};1&n&&(r.segment=t[0]),e.$set(r),c&&c.p&&2&n&&i(c,s,t,t[1],n,null,null)},i(t){o||(M(e.$$.fragment,t),M(c,t),o=!0)},o(t){V(e.$$.fragment,t),V(c,t),o=!1},d(t){G(e,t),t&&f(n),t&&f(r),c&&c.d(t)}}}function ct(t,e,n){let{$$slots:r={},$$scope:o}=e,{segment:s}=e;return t.$$set=t=>{"segment"in t&&n(0,s=t.segment),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,r]}class at extends Q{constructor(t){super(),X(this,t,ct,st,c,{segment:0})}}function it(t){let e,n,r=t[1].stack+"";return{c(){e=d("pre"),n=h(r)},l(t){e=b(t,"PRE",{});var o=v(e);n=y(o,r),o.forEach(f)},m(t,r){u(t,e,r),l(e,n)},p(t,e){2&e&&r!==(r=t[1].stack+"")&&E(n,r)},d(t){t&&f(e)}}}function lt(e){let n,r,o,s,c,a,i,p,S,w=e[1].message+"";document.title=n=e[0];let N=e[2]&&e[1].stack&&it(e);return{c(){r=m(),o=d("h1"),s=h(e[0]),c=m(),a=d("p"),i=h(w),p=m(),N&&N.c(),S=g(),this.h()},l(t){x('[data-svelte="svelte-1o9r2ue"]',document.head).forEach(f),r=_(t),o=b(t,"H1",{class:!0});var n=v(o);s=y(n,e[0]),n.forEach(f),c=_(t),a=b(t,"P",{class:!0});var l=v(a);i=y(l,w),l.forEach(f),p=_(t),N&&N.l(t),S=g(),this.h()},h(){$(o,"class","svelte-8od9u6"),$(a,"class","svelte-8od9u6")},m(t,e){u(t,r,e),u(t,o,e),l(o,s),u(t,c,e),u(t,a,e),l(a,i),u(t,p,e),N&&N.m(t,e),u(t,S,e)},p(t,[e]){1&e&&n!==(n=t[0])&&(document.title=n),1&e&&E(s,t[0]),2&e&&w!==(w=t[1].message+"")&&E(i,w),t[2]&&t[1].stack?N?N.p(t,e):(N=it(t),N.c(),N.m(S.parentNode,S)):N&&(N.d(1),N=null)},i:t,o:t,d(t){t&&f(r),t&&f(o),t&&f(c),t&&f(a),t&&f(p),N&&N.d(t),t&&f(S)}}}function ut(t,e,n){let{status:r}=e,{error:o}=e;return t.$$set=t=>{"status"in t&&n(0,r=t.status),"error"in t&&n(1,o=t.error)},[r,o,false]}class ft extends Q{constructor(t){super(),X(this,t,ut,lt,c,{status:0,error:1})}}function pt(t){let n,r,o;const s=[t[4].props];var c=t[4].component;function a(t){let n={};for(let t=0;t{G(t,1)})),K()}c?(n=new c(a()),Y(n.$$.fragment),M(n.$$.fragment,1),F(n,r.parentNode,r)):n=null}else c&&n.$set(o)},i(t){o||(n&&M(n.$$.fragment,t),o=!0)},o(t){n&&V(n.$$.fragment,t),o=!1},d(t){t&&f(r),n&&G(n,t)}}}function dt(t){let e,n;return e=new ft({props:{error:t[0],status:t[1]}}),{c(){Y(e.$$.fragment)},l(t){z(e.$$.fragment,t)},m(t,r){F(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.error=t[0]),2&n&&(r.status=t[1]),e.$set(r)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){V(e.$$.fragment,t),n=!1},d(t){G(e,t)}}}function ht(t){let e,n,r,o;const s=[dt,pt],c=[];function a(t,e){return t[0]?0:1}return e=a(t),n=c[e]=s[e](t),{c(){n.c(),r=g()},l(t){n.l(t),r=g()},m(t,n){c[e].m(t,n),u(t,r,n),o=!0},p(t,o){let i=e;e=a(t),e===i?c[e].p(t,o):(B(),V(c[i],1,1,(()=>{c[i]=null})),K(),n=c[e],n?n.p(t,o):(n=c[e]=s[e](t),n.c()),M(n,1),n.m(r.parentNode,r))},i(t){o||(M(n),o=!0)},o(t){V(n),o=!1},d(t){c[e].d(t),t&&f(r)}}}function mt(t){let n,r;const o=[{segment:t[2][0]},t[3].props];let s={$$slots:{default:[ht]},$$scope:{ctx:t}};for(let t=0;t{"stores"in t&&n(5,r=t.stores),"error"in t&&n(0,o=t.error),"status"in t&&n(1,s=t.status),"segments"in t&&n(2,c=t.segments),"level0"in t&&n(3,a=t.level0),"level1"in t&&n(4,i=t.level1),"notify"in t&&n(6,l=t.notify)},[o,s,c,a,i,r,l]}class $t extends Q{constructor(t){super(),X(this,t,gt,mt,c,{stores:5,error:0,status:1,segments:2,level0:3,level1:4,notify:6})}}const vt=[/^\/blog\.json$/,/^\/blog\/([^/]+?)\.json$/],bt=[{js:()=>Promise.all([import("./index.ade356b9.js"),__inject_styles(["client-e118e612.css","index-39716d32.css"])]).then((function(t){return t[0]}))},{js:()=>Promise.all([import("./about.e97c8bf2.js"),__inject_styles(["client-e118e612.css"])]).then((function(t){return t[0]}))},{js:()=>Promise.all([import("./index.39882a62.js"),__inject_styles(["client-e118e612.css","index-7ed37c94.css"])]).then((function(t){return t[0]}))},{js:()=>Promise.all([import("./[slug].fac92fe6.js"),__inject_styles(["client-e118e612.css","[slug]-5bc8f95f.css"])]).then((function(t){return t[0]}))}],yt=(_t=decodeURIComponent,[{pattern:/^\/$/,parts:[{i:0}]},{pattern:/^\/about\/?$/,parts:[{i:1}]},{pattern:/^\/blog\/?$/,parts:[{i:2}]},{pattern:/^\/blog\/([^/]+?)\/?$/,parts:[null,{i:3,params:t=>({slug:_t(t[1])})}]}]);var _t; +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +function Et(t,e,n,r){return new(n||(n=Promise))((function(o,s){function c(t){try{i(r.next(t))}catch(t){s(t)}}function a(t){try{i(r.throw(t))}catch(t){s(t)}}function i(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,a)}i((r=r.apply(t,e||[])).next())}))}function xt(t){for(;t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;return t}let St,wt=1;const Nt="undefined"!=typeof history?history:{pushState:()=>{},replaceState:()=>{},scrollRestoration:"auto"},Pt={};let At,Rt;function jt(t){const e=Object.create(null);return t.length>0&&t.slice(1).split("&").forEach((t=>{const[,n,r=""]=/([^=]*)(?:=(.*))?/.exec(decodeURIComponent(t.replace(/\+/g," ")));"string"==typeof e[n]&&(e[n]=[e[n]]),"object"==typeof e[n]?e[n].push(r):e[n]=r})),e}function Lt(t){if(t.origin!==location.origin)return null;if(!t.pathname.startsWith(At))return null;let e=t.pathname.slice(At.length);if(""===e&&(e="/"),!vt.some((t=>t.test(e))))for(let n=0;n{Jt(t)}),20)}function Kt(t,e={noscroll:!1,replaceState:!1}){const n=Lt(new URL(t,Tt(document)));return n?(Nt[e.replaceState?"replaceState":"pushState"]({id:St},"",t),kt(n,null,e.noscroll)):(location.href=t,new Promise((()=>{})))}const Mt="undefined"!=typeof __SAPPER__&&__SAPPER__;let Vt,Dt,Ht,Yt=!1,zt=[],Ft="{}";const Gt={page:function(t){const e=tt(t);let n=!0;return{notify:function(){n=!0,e.update((t=>t))},set:function(t){n=!1,e.set(t)},subscribe:function(t){let r;return e.subscribe((e=>{(void 0===r||n&&e!==r)&&t(r=e)}))}}}({}),preloading:tt(null),session:tt(Mt&&Mt.session)};let Wt,Xt,Qt;function Zt(t,e){const{error:n}=t;return Object.assign({error:n},e)}function te(t){return Et(this,void 0,void 0,(function*(){Vt&&Gt.preloading.set(!0);const e=function(t){return qt&&qt.href===t.href?qt.promise:ne(t)}(t),n=Dt={},r=yield e,{redirect:o}=r;if(n===Dt)if(o)yield Kt(o.location,{replaceState:!0});else{const{props:e,branch:n}=r;yield ee(n,e,Zt(e,t.page))}}))}function ee(t,e,n){return Et(this,void 0,void 0,(function*(){Gt.page.set(n),Gt.preloading.set(!1),Vt?Vt.$set(e):(e.stores={page:{subscribe:Gt.page.subscribe},preloading:{subscribe:Gt.preloading.subscribe},session:Gt.session},e.level0={props:yield Ht},e.notify=Gt.page.notify,Vt=new $t({target:Qt,props:e,hydrate:!0})),zt=t,Ft=JSON.stringify(n.query),Yt=!0,Xt=!1}))}function ne(t){return Et(this,void 0,void 0,(function*(){const{route:e,page:n}=t,r=n.path.split("/").filter(Boolean);let o=null;const s={error:null,status:200,segments:[r[0]]},c={fetch:(t,e)=>fetch(t,e),redirect:(t,e)=>{if(o&&(o.statusCode!==t||o.location!==e))throw new Error("Conflicting redirects");o={statusCode:t,location:e}},error:(t,e)=>{s.error="string"==typeof e?new Error(e):e,s.status=t}};if(!Ht){const t=()=>({});Ht=Mt.preloaded[0]||t.call(c,{host:n.host,path:n.path,query:n.query,params:{}},Wt)}let a,i=1;try{const o=JSON.stringify(n.query),l=e.pattern.exec(n.path);let u=!1;a=yield Promise.all(e.parts.map(((e,a)=>Et(this,void 0,void 0,(function*(){const f=r[a];if(function(t,e,n,r){if(r!==Ft)return!0;const o=zt[t];return!!o&&(e!==o.segment||!(!o.match||JSON.stringify(o.match.slice(1,t+2))===JSON.stringify(n.slice(1,t+2)))||void 0)}(a,f,l,o)&&(u=!0),s.segments[i]=r[a+1],!e)return{segment:f};const p=i++;if(!Xt&&!u&&zt[a]&&zt[a].part===e.i)return zt[a];u=!1;const{default:d,preload:h}=yield bt[e.i].js();let m;return m=Yt||!Mt.preloaded[a+1]?h?yield h.call(c,{host:n.host,path:n.path,query:n.query,params:e.params?e.params(t.match):{}},Wt):{}:Mt.preloaded[a+1],s[`level${p}`]={component:d,props:m,segment:f,match:l,part:e.i}})))))}catch(t){s.error=t,s.status=500,a=[]}return{redirect:o,props:s,branch:a}}))}var re,oe,se;Gt.session.subscribe((t=>Et(void 0,void 0,void 0,(function*(){if(Wt=t,!Yt)return;Xt=!0;const e=Lt(new URL(location.href)),n=Dt={},{redirect:r,props:o,branch:s}=yield ne(e);n===Dt&&(r?yield Kt(r.location,{replaceState:!0}):yield ee(s,o,Zt(o,e.page)))})))),re={target:document.querySelector("#sapper")},oe=re.target,Qt=oe,se=Mt.baseUrl,At=se,Rt=te,"scrollRestoration"in Nt&&(Nt.scrollRestoration="manual"),addEventListener("beforeunload",(()=>{Nt.scrollRestoration="auto"})),addEventListener("load",(()=>{Nt.scrollRestoration="manual"})),addEventListener("click",Ct),addEventListener("popstate",Ot),addEventListener("touchstart",Jt),addEventListener("mousemove",Bt),Mt.error?Promise.resolve().then((()=>function(){const{host:t,pathname:e,search:n}=location,{session:r,preloaded:o,status:s,error:c}=Mt;Ht||(Ht=o&&o[0]);const a={error:c,status:s,session:r,level0:{props:Ht},level1:{props:{status:s,error:c},component:ft},segments:o},i=jt(n);ee([],a,{host:t,path:e,query:i,params:{},error:c})}())):Promise.resolve().then((()=>{const{hash:t,href:e}=location;Nt.replaceState({id:wt},"",e);const n=Lt(new URL(location.href));if(n)return kt(n,wt,!0,t)}));export{Q as S,m as a,b,_ as c,f as d,d as e,v as f,y as g,$ as h,X as i,u as j,l as k,E as l,p as m,t as n,x as q,c as s,h as t}; + +import __inject_styles from './inject_styles.5607aec6.js'; \ No newline at end of file diff --git a/__sapper__/build/client/index-39716d32.css b/__sapper__/build/client/index-39716d32.css new file mode 100644 index 0000000..f8bab68 --- /dev/null +++ b/__sapper__/build/client/index-39716d32.css @@ -0,0 +1 @@ +h1.svelte-1kk9opm,figure.svelte-1kk9opm,p.svelte-1kk9opm{text-align:center;margin:0 auto}h1.svelte-1kk9opm{font-size:2.8em;text-transform:uppercase;font-weight:700;margin:0 0 0.5em 0}figure.svelte-1kk9opm{margin:0 0 1em 0}img.svelte-1kk9opm{width:100%;max-width:400px;margin:0 0 1em 0}p.svelte-1kk9opm{margin:1em auto}@media(min-width: 480px){h1.svelte-1kk9opm{font-size:4em}} diff --git a/__sapper__/build/client/index-7ed37c94.css b/__sapper__/build/client/index-7ed37c94.css new file mode 100644 index 0000000..a30ec9d --- /dev/null +++ b/__sapper__/build/client/index-7ed37c94.css @@ -0,0 +1 @@ +ul.svelte-1frg2tf{margin:0 0 1em 0;line-height:1.5} diff --git a/__sapper__/build/client/index.39882a62.js b/__sapper__/build/client/index.39882a62.js new file mode 100644 index 0000000..46083ab --- /dev/null +++ b/__sapper__/build/client/index.39882a62.js @@ -0,0 +1 @@ +import{S as t,i as s,s as e,e as l,t as n,b as o,f as r,g as a,d as h,h as c,j as f,k as i,l as u,a as g,q as p,c as d,n as m,m as v}from"./client.c2670d50.js";function E(t,s,e){const l=t.slice();return l[1]=s[e],l}function b(t){let s,e,g,p,d=t[1].title+"";return{c(){s=l("li"),e=l("a"),g=n(d),this.h()},l(t){s=o(t,"LI",{});var l=r(s);e=o(l,"A",{rel:!0,href:!0});var n=r(e);g=a(n,d),n.forEach(h),l.forEach(h),this.h()},h(){c(e,"rel","prefetch"),c(e,"href",p="blog/"+t[1].slug)},m(t,l){f(t,s,l),i(s,e),i(e,g)},p(t,s){1&s&&d!==(d=t[1].title+"")&&u(g,d),1&s&&p!==(p="blog/"+t[1].slug)&&c(e,"href",p)},d(t){t&&h(s)}}}function j(t){let s,e,u,j,x,L=t[0],R=[];for(let s=0;st.json())).then((t=>({posts:t})))}function L(t,s,e){let{posts:l}=s;return t.$$set=t=>{"posts"in t&&e(0,l=t.posts)},[l]}export default class extends t{constructor(t){super(),s(this,t,L,j,e,{posts:0})}}export{x as preload}; diff --git a/__sapper__/build/client/index.ade356b9.js b/__sapper__/build/client/index.ade356b9.js new file mode 100644 index 0000000..040cd23 --- /dev/null +++ b/__sapper__/build/client/index.ade356b9.js @@ -0,0 +1 @@ +import{S as s,i as e,s as a,a as t,e as c,t as r,q as l,d as i,c as o,b as n,f as h,g as p,h as d,j as v,k as f,n as u}from"./client.c2670d50.js";function g(s){let e,a,g,m,k,E,G,S,b,j,x,I,T,y;return{c(){e=t(),a=c("h1"),g=r("Great success!"),m=t(),k=c("figure"),E=c("img"),S=t(),b=c("figcaption"),j=r("Have fun with Sapper!"),x=t(),I=c("p"),T=c("strong"),y=r("Try editing this file (src/routes/index.svelte) to test live reloading."),this.h()},l(s){l('[data-svelte="svelte-oh6yg0"]',document.head).forEach(i),e=o(s),a=n(s,"H1",{class:!0});var t=h(a);g=p(t,"Great success!"),t.forEach(i),m=o(s),k=n(s,"FIGURE",{class:!0});var c=h(k);E=n(c,"IMG",{alt:!0,src:!0,class:!0}),S=o(c),b=n(c,"FIGCAPTION",{});var r=h(b);j=p(r,"Have fun with Sapper!"),r.forEach(i),c.forEach(i),x=o(s),I=n(s,"P",{class:!0});var d=h(I);T=n(d,"STRONG",{});var v=h(T);y=p(v,"Try editing this file (src/routes/index.svelte) to test live reloading."),v.forEach(i),d.forEach(i),this.h()},h(){document.title="Sapper project template",d(a,"class","svelte-1kk9opm"),d(E,"alt","Success Kid"),E.src!==(G="/client/465898c830bb9d2c.jpg")&&d(E,"src","/client/465898c830bb9d2c.jpg"),d(E,"class","svelte-1kk9opm"),d(k,"class","svelte-1kk9opm"),d(I,"class","svelte-1kk9opm")},m(s,t){v(s,e,t),v(s,a,t),f(a,g),v(s,m,t),v(s,k,t),f(k,E),f(k,S),f(k,b),f(b,j),v(s,x,t),v(s,I,t),f(I,T),f(T,y)},p:u,i:u,o:u,d(s){s&&i(e),s&&i(a),s&&i(m),s&&i(k),s&&i(x),s&&i(I)}}}export default class extends s{constructor(s){super(),e(this,s,null,g,a,{})}} diff --git a/__sapper__/build/client/inject_styles.5607aec6.js b/__sapper__/build/client/inject_styles.5607aec6.js new file mode 100644 index 0000000..d10d1c7 --- /dev/null +++ b/__sapper__/build/client/inject_styles.5607aec6.js @@ -0,0 +1 @@ +function e(e){return Promise.all(e.map((function(e){return new Promise((function(t,n){var r=new URL(e,import.meta.url),l=document.baseURI;if(!l){var o=document.getElementsByTagName("base");l=o.length?o[0].href:document.URL}var u=(""+r).substring(l.length),a=document.querySelector('link[rel=stylesheet][href="'+u+'"]')||document.querySelector('link[rel=stylesheet][href="'+r+'"]');a||((a=document.createElement("link")).rel="stylesheet",a.href=r,document.head.appendChild(a)),a.sheet?t():(a.onload=function(){return t()},a.onerror=n)}))})))}export default e; diff --git a/__sapper__/build/client/legacy/465898c830bb9d2c.jpg b/__sapper__/build/client/legacy/465898c830bb9d2c.jpg new file mode 100644 index 0000000..5ad19cc Binary files /dev/null and b/__sapper__/build/client/legacy/465898c830bb9d2c.jpg differ diff --git a/__sapper__/build/client/legacy/[slug]-5bc8f95f.css b/__sapper__/build/client/legacy/[slug]-5bc8f95f.css new file mode 100644 index 0000000..7255deb --- /dev/null +++ b/__sapper__/build/client/legacy/[slug]-5bc8f95f.css @@ -0,0 +1 @@ +.content.svelte-emm3f3 h2{font-size:1.4em;font-weight:500}.content.svelte-emm3f3 pre{background-color:#f9f9f9;box-shadow:inset 1px 1px 5px rgba(0, 0, 0, 0.05);padding:0.5em;border-radius:2px;overflow-x:auto}.content.svelte-emm3f3 pre code{background-color:transparent;padding:0}.content.svelte-emm3f3 ul{line-height:1.5}.content.svelte-emm3f3 li{margin:0 0 0.5em 0} diff --git a/__sapper__/build/client/legacy/[slug].56a49ff2.js b/__sapper__/build/client/legacy/[slug].56a49ff2.js new file mode 100644 index 0000000..cd451be --- /dev/null +++ b/__sapper__/build/client/legacy/[slug].56a49ff2.js @@ -0,0 +1 @@ +import{w as t,_ as n,a as e,b as r,c as s,i as a,d as o,S as c,s as u,e as i,f,t as l,q as h,g as p,h as v,j as d,k as m,l as y,m as x,n as b,o as w,u as R,r as g,p as j}from"./client.eb14add1.js";function k(t,n,e,r,s,a,o){try{var c=t[a](o),u=c.value}catch(t){return void e(t)}c.done?n(u):Promise.resolve(u).then(r,s)}function E(t){return function(){var n=this,e=arguments;return new Promise((function(r,s){var a=t.apply(n,e);function o(t){k(a,r,s,o,c,"next",t)}function c(t){k(a,r,s,o,c,"throw",t)}o(void 0)}))}}function H(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var s,a=e(t);if(n){var o=e(this).constructor;s=Reflect.construct(a,arguments,o)}else s=a.apply(this,arguments);return r(this,s)}}function P(t){var n,e,r,s,a,o,c=t[0].title+"",u=t[0].html+"";return document.title=n=t[0].title,{c:function(){e=i(),r=f("h1"),s=l(c),a=i(),o=f("div"),this.h()},l:function(t){h('[data-svelte="svelte-1uty71u"]',document.head).forEach(p),e=v(t),r=d(t,"H1",{});var n=m(r);s=y(n,c),n.forEach(p),a=v(t),o=d(t,"DIV",{class:!0}),m(o).forEach(p),this.h()},h:function(){x(o,"class","content svelte-emm3f3")},m:function(t,n){b(t,e,n),b(t,r,n),w(r,s),b(t,a,n),b(t,o,n),o.innerHTML=u},p:function(t,e){var r=R(e,1)[0];1&r&&n!==(n=t[0].title)&&(document.title=n),1&r&&c!==(c=t[0].title+"")&&g(s,c),1&r&&u!==(u=t[0].html+"")&&(o.innerHTML=u)},i:j,o:j,d:function(t){t&&p(e),t&&p(r),t&&p(a),t&&p(o)}}}function B(t){return L.apply(this,arguments)}function L(){return(L=E(t.mark((function n(e){var r,s,a;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.params,t.next=3,this.fetch("blog/".concat(r.slug,".json"));case 3:return s=t.sent,t.next=6,s.json();case 6:if(a=t.sent,200!==s.status){t.next=11;break}return t.abrupt("return",{post:a});case 11:this.error(s.status,a.message);case 12:case"end":return t.stop()}}),n,this)})))).apply(this,arguments)}function M(t,n,e){var r=n.post;return t.$$set=function(t){"post"in t&&e(0,r=t.post)},[r]}var T=function(t){n(r,c);var e=H(r);function r(t){var n;return s(this,r),n=e.call(this),a(o(n),t,M,P,u,{post:0}),n}return r}();export default T;export{B as preload}; diff --git a/__sapper__/build/client/legacy/about.2765021c.js b/__sapper__/build/client/legacy/about.2765021c.js new file mode 100644 index 0000000..4e5933d --- /dev/null +++ b/__sapper__/build/client/legacy/about.2765021c.js @@ -0,0 +1 @@ +import{_ as t,a as e,b as n,c as a,i as r,d as s,S as o,s as c,e as u,f as i,t as f,q as h,g as l,h as p,j as v,k as d,l as m,n as b,o as y,p as R}from"./client.eb14add1.js";function T(t){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,s=e(t);if(a){var o=e(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return n(this,r)}}function g(t){var e,n,a,r,s,o;return{c:function(){e=u(),n=i("h1"),a=f("About this site"),r=u(),s=i("p"),o=f("This is the 'about' page. There's not much here."),this.h()},l:function(t){h('[data-svelte="svelte-1ine71f"]',document.head).forEach(l),e=p(t),n=v(t,"H1",{});var c=d(n);a=m(c,"About this site"),c.forEach(l),r=p(t),s=v(t,"P",{});var u=d(s);o=m(u,"This is the 'about' page. There's not much here."),u.forEach(l),this.h()},h:function(){document.title="About"},m:function(t,c){b(t,e,c),b(t,n,c),y(n,a),b(t,r,c),b(t,s,c),y(s,o)},p:R,i:R,o:R,d:function(t){t&&l(e),t&&l(n),t&&l(r),t&&l(s)}}}var A=function(e){t(u,o);var n=T(u);function u(t){var e;return a(this,u),e=n.call(this),r(s(e),t,null,g,c,{}),e}return u}();export default A; diff --git a/__sapper__/build/client/legacy/client-e118e612.css b/__sapper__/build/client/legacy/client-e118e612.css new file mode 100644 index 0000000..f6eb2fd --- /dev/null +++ b/__sapper__/build/client/legacy/client-e118e612.css @@ -0,0 +1,3 @@ +nav.svelte-1dbd5up{border-bottom:1px solid rgba(255,62,0,0.1);font-weight:300;padding:0 1em}ul.svelte-1dbd5up{margin:0;padding:0}ul.svelte-1dbd5up::after{content:'';display:block;clear:both}li.svelte-1dbd5up{display:block;float:left}[aria-current].svelte-1dbd5up{position:relative;display:inline-block}[aria-current].svelte-1dbd5up::after{position:absolute;content:'';width:calc(100% - 1em);height:2px;background-color:rgb(255,62,0);display:block;bottom:-1px}a.svelte-1dbd5up{text-decoration:none;padding:1em 0.5em;display:block} +main.svelte-1uhnsl8{position:relative;max-width:56em;background-color:white;padding:2em;margin:0 auto;box-sizing:border-box} +h1.svelte-8od9u6,p.svelte-8od9u6{margin:0 auto}h1.svelte-8od9u6{font-size:2.8em;font-weight:700;margin:0 0 0.5em 0}p.svelte-8od9u6{margin:1em auto}@media(min-width: 480px){h1.svelte-8od9u6{font-size:4em}} diff --git a/__sapper__/build/client/legacy/client.eb14add1.js b/__sapper__/build/client/legacy/client.eb14add1.js new file mode 100644 index 0000000..4907fa4 --- /dev/null +++ b/__sapper__/build/client/legacy/client.eb14add1.js @@ -0,0 +1,18 @@ +function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),f=o.call(i,"finallyLoc");if(c&&f){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},e}(e.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}));function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}var f,s=o((function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}));function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?l(t):e}function h(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:document.body;return Array.from(e.querySelectorAll(t))}function G(t){f=t}function J(){if(!f)throw new Error("Function called outside component initialization");return f}var M=[],F=[],K=[],V=[],Y=Promise.resolve(),D=!1;function H(t){K.push(t)}var z=!1,W=new Set;function X(){if(!z){z=!0;do{for(var t=0;t6&&void 0!==arguments[6]?arguments[6]:[-1],u=f;G(t);var c=t.$$={fragment:null,ctx:null,props:a,update:m,not_equal:o,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:b(),dirty:i,skip_bound:!1},s=!1;if(c.ctx=r?r(t,e.props||{},(function(e,r){var n=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:r;return c.ctx&&o(c.ctx[e],c.ctx[e]=n)&&(!c.skip_bound&&c.bound[e]&&c.bound[e](n),s&<(t,e)),r})):[],c.update(),s=!0,x(c.before_update),c.fragment=!!n&&n(c.ctx),e.target){if(e.hydrate){var l=I(e.target);c.fragment&&c.fragment.l(l),l.forEach(L)}else c.fragment&&c.fragment.c();e.intro&&nt(t.$$.fragment),ft(t,e.target,e.anchor,e.customElement),X()}G(u)}var ht=function(){function t(){d(this,t)}var e,r,n;return e=t,(r=[{key:"$destroy",value:function(){st(this,1),this.$destroy=m}},{key:"$on",value:function(t,e){var r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}}},{key:"$set",value:function(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}])&&v(e.prototype,r),n&&v(e,n),t}(),dt=[];function vt(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m,n=[];function o(r){if(w(t,r)&&(t=r,e)){for(var o=!dt.length,a=0;a1&&void 0!==arguments[1]?arguments[1]:m,u=[a,i];return n.push(u),1===n.length&&(e=r(o)||m),a(t),function(){var t=n.indexOf(u);-1!==t&&n.splice(t,1),0===n.length&&(e(),e=null)}}return{set:o,update:a,subscribe:i}}var mt={};function yt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function gt(t){var e,r,o,a,i,u,c,f,s,l,p,h,d,v,y,g;return{c:function(){e=j("nav"),r=j("ul"),o=j("li"),a=j("a"),i=O("home"),c=P(),f=j("li"),s=j("a"),l=O("about"),h=P(),d=j("li"),v=j("a"),y=O("blog"),this.h()},l:function(t){var n=I(e=T(t,"NAV",{class:!0})),u=I(r=T(n,"UL",{class:!0})),p=I(o=T(u,"LI",{class:!0})),m=I(a=T(p,"A",{"aria-current":!0,href:!0,class:!0}));i=C(m,"home"),m.forEach(L),p.forEach(L),c=q(u);var g=I(f=T(u,"LI",{class:!0})),b=I(s=T(g,"A",{"aria-current":!0,href:!0,class:!0}));l=C(b,"about"),b.forEach(L),g.forEach(L),h=q(u);var x=I(d=T(u,"LI",{class:!0})),$=I(v=T(x,"A",{rel:!0,"aria-current":!0,href:!0,class:!0}));y=C($,"blog"),$.forEach(L),x.forEach(L),u.forEach(L),n.forEach(L),this.h()},h:function(){N(a,"aria-current",u=void 0===t[0]?"page":void 0),N(a,"href","."),N(a,"class","svelte-1dbd5up"),N(o,"class","svelte-1dbd5up"),N(s,"aria-current",p="about"===t[0]?"page":void 0),N(s,"href","about"),N(s,"class","svelte-1dbd5up"),N(f,"class","svelte-1dbd5up"),N(v,"rel","prefetch"),N(v,"aria-current",g="blog"===t[0]?"page":void 0),N(v,"href","blog"),N(v,"class","svelte-1dbd5up"),N(d,"class","svelte-1dbd5up"),N(r,"class","svelte-1dbd5up"),N(e,"class","svelte-1dbd5up")},m:function(t,n){k(t,e,n),S(e,r),S(r,o),S(o,a),S(a,i),S(r,c),S(r,f),S(f,s),S(s,l),S(r,h),S(r,d),S(d,v),S(v,y)},p:function(t,e){var r=n(e,1)[0];1&r&&u!==(u=void 0===t[0]?"page":void 0)&&N(a,"aria-current",u),1&r&&p!==(p="about"===t[0]?"page":void 0)&&N(s,"aria-current",p),1&r&&g!==(g="blog"===t[0]?"page":void 0)&&N(v,"aria-current",g)},i:m,o:m,d:function(t){t&&L(e)}}}function bt(t,e,r){var n=e.segment;return t.$$set=function(t){"segment"in t&&r(0,n=t.segment)},[n]}var xt=function(t){c(r,ht);var e=yt(r);function r(t){var n;return d(this,r),pt(l(n=e.call(this)),t,bt,gt,w,{segment:0}),n}return r}();function $t(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function wt(t){var e,r,o,a;e=new xt({props:{segment:t[0]}});var i=t[2].default,u=function(t,e,r,n){if(t){var o=_(t,e,r,n);return t[0](o)}}(i,t,t[1],null);return{c:function(){ut(e.$$.fragment),r=P(),o=j("main"),u&&u.c(),this.h()},l:function(t){ct(e.$$.fragment,t),r=q(t);var n=I(o=T(t,"MAIN",{class:!0}));u&&u.l(n),n.forEach(L),this.h()},h:function(){N(o,"class","svelte-1uhnsl8")},m:function(t,n){ft(e,t,n),k(t,r,n),k(t,o,n),u&&u.m(o,null),a=!0},p:function(t,r){var o=n(r,1)[0],a={};1&o&&(a.segment=t[0]),e.$set(a),u&&u.p&&2&o&&E(u,i,t,t[1],o,null,null)},i:function(t){a||(nt(e.$$.fragment,t),nt(u,t),a=!0)},o:function(t){ot(e.$$.fragment,t),ot(u,t),a=!1},d:function(t){st(e,t),t&&L(r),t&&L(o),u&&u.d(t)}}}function _t(t,e,r){var n=e.$$slots,o=void 0===n?{}:n,a=e.$$scope,i=e.segment;return t.$$set=function(t){"segment"in t&&r(0,i=t.segment),"$$scope"in t&&r(1,a=t.$$scope)},[i,a,o]}var Et=function(t){c(r,ht);var e=$t(r);function r(t){var n;return d(this,r),pt(l(n=e.call(this)),t,_t,wt,w,{segment:0}),n}return r}();function St(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function kt(t){var e,r,n=t[1].stack+"";return{c:function(){e=j("pre"),r=O(n)},l:function(t){var o=I(e=T(t,"PRE",{}));r=C(o,n),o.forEach(L)},m:function(t,n){k(t,e,n),S(e,r)},p:function(t,e){2&e&&n!==(n=t[1].stack+"")&&U(r,n)},d:function(t){t&&L(e)}}}function Lt(t){var e,r,o,a,i,u,c,f,s,l=t[1].message+"";document.title=e=t[0];var p=t[2]&&t[1].stack&&kt(t);return{c:function(){r=P(),o=j("h1"),a=O(t[0]),i=P(),u=j("p"),c=O(l),f=P(),p&&p.c(),s=A(),this.h()},l:function(e){B('[data-svelte="svelte-1o9r2ue"]',document.head).forEach(L),r=q(e);var n=I(o=T(e,"H1",{class:!0}));a=C(n,t[0]),n.forEach(L),i=q(e);var h=I(u=T(e,"P",{class:!0}));c=C(h,l),h.forEach(L),f=q(e),p&&p.l(e),s=A(),this.h()},h:function(){N(o,"class","svelte-8od9u6"),N(u,"class","svelte-8od9u6")},m:function(t,e){k(t,r,e),k(t,o,e),S(o,a),k(t,i,e),k(t,u,e),S(u,c),k(t,f,e),p&&p.m(t,e),k(t,s,e)},p:function(t,r){var o=n(r,1)[0];1&o&&e!==(e=t[0])&&(document.title=e),1&o&&U(a,t[0]),2&o&&l!==(l=t[1].message+"")&&U(c,l),t[2]&&t[1].stack?p?p.p(t,o):((p=kt(t)).c(),p.m(s.parentNode,s)):p&&(p.d(1),p=null)},i:m,o:m,d:function(t){t&&L(r),t&&L(o),t&&L(i),t&&L(u),t&&L(f),p&&p.d(t),t&&L(s)}}}function Rt(t,e,r){var n=e.status,o=e.error;return t.$$set=function(t){"status"in t&&r(0,n=t.status),"error"in t&&r(1,o=t.error)},[n,o,false]}var jt=function(t){c(r,ht);var e=St(r);function r(t){var n;return d(this,r),pt(l(n=e.call(this)),t,Rt,Lt,w,{status:0,error:1}),n}return r}();function Ot(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function Pt(t){var e,r,n,o=[t[4].props],a=t[4].component;function i(t){for(var e={},r=0;r0&&e.slice(1).split("&").forEach((function(e){var o=n(/([^=]*)(?:=(.*))?/.exec(decodeURIComponent(e.replace(/\+/g," "))),3),a=o[1],i=o[2],u=void 0===i?"":i;"string"==typeof r[a]&&(r[a]=[r[a]]),"object"===t(r[a])?r[a].push(u):r[a]=u})),r}function Wt(t){if(t.origin!==location.origin)return null;if(!t.pathname.startsWith(Vt))return null;var e=t.pathname.slice(Vt.length);if(""===e&&(e="/"),!Ut.some((function(t){return t.test(e)})))for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{noscroll:!1,replaceState:!1},r=Wt(new URL(t,ee(document)));return r?(Dt[e.replaceState?"replaceState":"pushState"]({id:Ft},"",t),te(r,null,e.noscroll)):(location.href=t,new Promise((function(){})))}var ce,fe,se,le,pe,he,de,ve,me,ye="undefined"!=typeof __SAPPER__&&__SAPPER__,ge=!1,be=[],xe="{}",$e={page:function(t){var e=vt(t),r=!0;return{notify:function(){r=!0,e.update((function(t){return t}))},set:function(t){r=!1,e.set(t)},subscribe:function(t){var n;return e.subscribe((function(e){(void 0===n||r&&e!==n)&&t(n=e)}))}}}({}),preloading:vt(null),session:vt(ye&&ye.session)};function we(t,e){var r=t.error;return Object.assign({error:r},e)}function _e(t){return Jt(this,void 0,void 0,a.mark((function e(){var r,n,o,i,u,c;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ce&&$e.preloading.set(!0),r=oe(t),n=fe={},e.next=5,r;case 5:if(o=e.sent,i=o.redirect,n===fe){e.next=9;break}return e.abrupt("return");case 9:if(!i){e.next=14;break}return e.next=12,ue(i.location,{replaceState:!0});case 12:e.next=17;break;case 14:return u=o.props,c=o.branch,e.next=17,Ee(c,u,we(u,t.page));case 17:case"end":return e.stop()}}),e)})))}function Ee(t,e,r){return Jt(this,void 0,void 0,a.mark((function n(){return a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if($e.page.set(r),$e.preloading.set(!1),!ce){n.next=6;break}ce.$set(e),n.next=13;break;case 6:return e.stores={page:{subscribe:$e.page.subscribe},preloading:{subscribe:$e.preloading.subscribe},session:$e.session},n.next=9,se;case 9:n.t0=n.sent,e.level0={props:n.t0},e.notify=$e.page.notify,ce=new qt({target:he,props:e,hydrate:!0});case 13:be=t,xe=JSON.stringify(r.query),ge=!0,pe=!1;case 17:case"end":return n.stop()}}),n)})))}function Se(t,e,r,n){if(n!==xe)return!0;var o=be[t];return!!o&&(e!==o.segment||(!(!o.match||JSON.stringify(o.match.slice(1,t+2))===JSON.stringify(r.slice(1,t+2)))||void 0))}function ke(t){return Jt(this,void 0,void 0,a.mark((function e(){var r,n,o,i,u,c,f,s,l,p,h,d,v=this;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.route,n=t.page,o=n.path.split("/").filter(Boolean),i=null,u={error:null,status:200,segments:[o[0]]},c={fetch:function(t){function e(e,r){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t,e){return fetch(t,e)})),redirect:function(t,e){if(i&&(i.statusCode!==t||i.location!==e))throw new Error("Conflicting redirects");i={statusCode:t,location:e}},error:function(t,e){u.error="string"==typeof e?new Error(e):e,u.status=t}},se||(f=function(){return{}},se=ye.preloaded[0]||f.call(c,{host:n.host,path:n.path,query:n.query,params:{}},le)),l=1,e.prev=7,p=JSON.stringify(n.query),h=r.pattern.exec(n.path),d=!1,e.next=13,Promise.all(r.parts.map((function(e,r){return Jt(v,void 0,void 0,a.mark((function i(){var f,s,v,m,y,g;return a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(f=o[r],Se(r,f,h,p)&&(d=!0),u.segments[l]=o[r+1],e){a.next=5;break}return a.abrupt("return",{segment:f});case 5:if(s=l++,pe||d||!be[r]||be[r].part!==e.i){a.next=8;break}return a.abrupt("return",be[r]);case 8:return d=!1,a.next=11,Bt[e.i].js();case 11:if(v=a.sent,m=v.default,y=v.preload,!ge&&ye.preloaded[r+1]){a.next=25;break}if(!y){a.next=21;break}return a.next=18,y.call(c,{host:n.host,path:n.path,query:n.query,params:e.params?e.params(t.match):{}},le);case 18:a.t0=a.sent,a.next=22;break;case 21:a.t0={};case 22:g=a.t0,a.next=26;break;case 25:g=ye.preloaded[r+1];case 26:return a.abrupt("return",u["level".concat(s)]={component:m,props:g,segment:f,match:h,part:e.i});case 27:case"end":return a.stop()}}),i)})))})));case 13:s=e.sent,e.next=21;break;case 16:e.prev=16,e.t0=e.catch(7),u.error=e.t0,u.status=500,s=[];case 21:return e.abrupt("return",{redirect:i,props:u,branch:s});case 22:case"end":return e.stop()}}),e,null,[[7,16]])})))}$e.session.subscribe((function(t){return Jt(void 0,void 0,void 0,a.mark((function e(){var r,n,o,i,u,c;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(le=t,ge){e.next=3;break}return e.abrupt("return");case 3:return pe=!0,r=Wt(new URL(location.href)),n=fe={},e.next=8,ke(r);case 8:if(o=e.sent,i=o.redirect,u=o.props,c=o.branch,n===fe){e.next=14;break}return e.abrupt("return");case 14:if(!i){e.next=19;break}return e.next=17,ue(i.location,{replaceState:!0});case 17:e.next=21;break;case 19:return e.next=21,Ee(c,u,we(u,r.page));case 21:case"end":return e.stop()}}),e)})))})),de={target:document.querySelector("#sapper")},ve=de.target,he=ve,me=ye.baseUrl,Vt=me,Yt=_e,"scrollRestoration"in Dt&&(Dt.scrollRestoration="manual"),addEventListener("beforeunload",(function(){Dt.scrollRestoration="auto"})),addEventListener("load",(function(){Dt.scrollRestoration="manual"})),addEventListener("click",Xt),addEventListener("popstate",Zt),addEventListener("touchstart",ae),addEventListener("mousemove",ie),ye.error?Promise.resolve().then((function(){return function(){var t=location,e=t.host,r=t.pathname,n=t.search,o=ye.session,a=ye.preloaded,i=ye.status,u=ye.error;se||(se=a&&a[0]);var c={error:u,status:i,session:o,level0:{props:se},level1:{props:{status:i,error:u},component:jt},segments:a},f=zt(n);Ee([],c,{host:e,path:r,query:f,params:{},error:u})}()})):Promise.resolve().then((function(){var t=location,e=t.hash,r=t.href;Dt.replaceState({id:Kt},"",r);var n=Wt(new URL(location.href));if(n)return te(n,Kt,!0,e)}));export{ht as S,c as _,i as a,p as b,d as c,l as d,P as e,j as f,L as g,q as h,pt as i,T as j,I as k,C as l,N as m,k as n,S as o,m as p,B as q,U as r,w as s,O as t,n as u,R as v,a as w}; + +import __inject_styles from './inject_styles.fe622066.js'; \ No newline at end of file diff --git a/__sapper__/build/client/legacy/index-39716d32.css b/__sapper__/build/client/legacy/index-39716d32.css new file mode 100644 index 0000000..f8bab68 --- /dev/null +++ b/__sapper__/build/client/legacy/index-39716d32.css @@ -0,0 +1 @@ +h1.svelte-1kk9opm,figure.svelte-1kk9opm,p.svelte-1kk9opm{text-align:center;margin:0 auto}h1.svelte-1kk9opm{font-size:2.8em;text-transform:uppercase;font-weight:700;margin:0 0 0.5em 0}figure.svelte-1kk9opm{margin:0 0 1em 0}img.svelte-1kk9opm{width:100%;max-width:400px;margin:0 0 1em 0}p.svelte-1kk9opm{margin:1em auto}@media(min-width: 480px){h1.svelte-1kk9opm{font-size:4em}} diff --git a/__sapper__/build/client/legacy/index-7ed37c94.css b/__sapper__/build/client/legacy/index-7ed37c94.css new file mode 100644 index 0000000..a30ec9d --- /dev/null +++ b/__sapper__/build/client/legacy/index-7ed37c94.css @@ -0,0 +1 @@ +ul.svelte-1frg2tf{margin:0 0 1em 0;line-height:1.5} diff --git a/__sapper__/build/client/legacy/index.1d635a01.js b/__sapper__/build/client/legacy/index.1d635a01.js new file mode 100644 index 0000000..cdc969c --- /dev/null +++ b/__sapper__/build/client/legacy/index.1d635a01.js @@ -0,0 +1 @@ +import{_ as t,a as e,b as s,c as a,i as c,d as r,S as n,s as o,e as i,f as l,t as u,q as f,g as h,h as p,j as v,k as d,l as m,m as g,n as k,o as y,p as E}from"./client.eb14add1.js";function R(t){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var c,r=e(t);if(a){var n=e(this).constructor;c=Reflect.construct(r,arguments,n)}else c=r.apply(this,arguments);return s(this,c)}}function b(t){var e,s,a,c,r,n,o,R,b,G,S,j,x;return{c:function(){e=i(),s=l("h1"),a=u("Great success!"),c=i(),r=l("figure"),n=l("img"),o=i(),R=l("figcaption"),b=u("Have fun with Sapper!"),G=i(),S=l("p"),j=l("strong"),x=u("Try editing this file (src/routes/index.svelte) to test live reloading."),this.h()},l:function(t){f('[data-svelte="svelte-oh6yg0"]',document.head).forEach(h),e=p(t),s=v(t,"H1",{class:!0});var i=d(s);a=m(i,"Great success!"),i.forEach(h),c=p(t),r=v(t,"FIGURE",{class:!0});var l=d(r);n=v(l,"IMG",{alt:!0,src:!0,class:!0}),o=p(l),R=v(l,"FIGCAPTION",{});var u=d(R);b=m(u,"Have fun with Sapper!"),u.forEach(h),l.forEach(h),G=p(t),S=v(t,"P",{class:!0});var g=d(S);j=v(g,"STRONG",{});var k=d(j);x=m(k,"Try editing this file (src/routes/index.svelte) to test live reloading."),k.forEach(h),g.forEach(h),this.h()},h:function(){document.title="Sapper project template",g(s,"class","svelte-1kk9opm"),g(n,"alt","Success Kid"),n.src!=="/client/465898c830bb9d2c.jpg"&&g(n,"src","/client/465898c830bb9d2c.jpg"),g(n,"class","svelte-1kk9opm"),g(r,"class","svelte-1kk9opm"),g(S,"class","svelte-1kk9opm")},m:function(t,i){k(t,e,i),k(t,s,i),y(s,a),k(t,c,i),k(t,r,i),y(r,n),y(r,o),y(r,R),y(R,b),k(t,G,i),k(t,S,i),y(S,j),y(j,x)},p:E,i:E,o:E,d:function(t){t&&h(e),t&&h(s),t&&h(c),t&&h(r),t&&h(G),t&&h(S)}}}var G=function(e){t(i,n);var s=R(i);function i(t){var e;return a(this,i),e=s.call(this),c(r(e),t,null,b,o,{}),e}return i}();export default G; diff --git a/__sapper__/build/client/legacy/index.fa14eb71.js b/__sapper__/build/client/legacy/index.fa14eb71.js new file mode 100644 index 0000000..6f5feb0 --- /dev/null +++ b/__sapper__/build/client/legacy/index.fa14eb71.js @@ -0,0 +1 @@ +import{_ as t,a as n,b as r,c as e,i as o,d as s,S as c,s as a,f,t as u,j as i,k as l,l as h,g as v,m as p,n as g,o as d,r as m,e as R,q as y,h as b,u as E,p as j,v as x}from"./client.eb14add1.js";function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var o,s=n(t);if(e){var c=n(this).constructor;o=Reflect.construct(s,arguments,c)}else o=s.apply(this,arguments);return r(this,o)}}function L(t,n,r){var e=t.slice();return e[1]=n[r],e}function $(t){var n,r,e,o,s=t[1].title+"";return{c:function(){n=f("li"),r=f("a"),e=u(s),this.h()},l:function(t){n=i(t,"LI",{});var o=l(n);r=i(o,"A",{rel:!0,href:!0});var c=l(r);e=h(c,s),c.forEach(v),o.forEach(v),this.h()},h:function(){p(r,"rel","prefetch"),p(r,"href",o="blog/"+t[1].slug)},m:function(t,o){g(t,n,o),d(n,r),d(r,e)},p:function(t,n){1&n&&s!==(s=t[1].title+"")&&m(e,s),1&n&&o!==(o="blog/"+t[1].slug)&&p(r,"href",o)},d:function(t){t&&v(n)}}}function k(t){for(var n,r,e,o,s,c=t[0],a=[],m=0;m|<=|>=|==|!=|===|!==|\+|-|\*\%|<<|>>|>>>|&|\||\^|!|~|&&|\|\||\?|:|=|\+=|-=|\*=|%=|<<=|>>=|>>>=|&=|\|=|\^=|\/=|\/)\s*$/,o=/(\}|\)|\+\+|--)\s*$/,a=/[{}()[.;,<>=+\-*%&|\^!~?:/]/,i=/[a-zA-Z_$0-9]/,f={" ":1,"\t":1,"\n":1,"\r":1,"\f":1,"\v":1," ":1,"\u2028":1,"\u2029":1};function s(n){return n in f}function c(n){return"'"===n||'"'===n}var l=/^\*\s+as\s+(\w+)$/,d=/(\w+)\s*,\s*\*\s*as\s*(\w+)$/,p=/(\w+)\s*,\s*{(.+)}$/;function v(n){return n?n.split(",").map((function(n){var t=n.trim().split(/[^\S]+/),r=t[0];return{name:r,as:t[2]||r}})):[]}function m(n,t){for(var e=t,u=t+=6;n[t]&&s(n[t]);)t+=1;for(;n[t]&&!c(n[t]);)t+=1;for(var o=t,a=t+=1;n[t]&&!c(n[t]);)t+=1;var i=t++;return function(n,t,e,u,o){var a=r(u,"*")||r(u,"default");return{start:t,end:e,source:o,name:a,specifiers:u,toString:function(){return"/*"+n.slice(t,e)+"*/"}}}(n,e,t,function(n){var t=l.exec(n);return t?[{name:"*",as:t[1]}]:(t=d.exec(n))?[{name:"default",as:t[1]},{name:"*",as:t[2]}]:(t=p.exec(n))?[{name:"default",as:t[1]}].concat(v(t[2].trim())):"{"===n[0]?v(n.slice(1,-1).trim()):n?[{name:"default",as:n}]:[]}(n.slice(u,o).replace(/from\s*$/,"").trim()),n.slice(a,i))}var h=/^import\s*\.\s*meta\s*\.\s*url/;function _(n,t){var r=t;for(t+=6;n[t]&&s(n[t]);)t+=1;var e=t;if("{"===n[t]){for(;"}"!==n[t];)t+=1;for(var u=t+=1,o=null;s(n[t]);)t+=1;if(/^from[\s\n'"]/.test(n.slice(t,t+5))){for(t+=4;s(n[t]);)t+=1;for(;n[t]&&!c(n[t]);)t+=1;for(var i=t+=1;n[t]&&!c(n[t]);)t+=1;o=n.slice(i,t),t+=1}return function(n,t,r,e,u,o){var a=v(n.slice(r+1,e-1).trim());return{start:t,end:u,source:o,toString:function(r){var e=o&&r.get(o);return a.map((function(n){return"__exports."+n.as+" = "+(e?e+"."+n.name:n.name)+"; "})).join("")+"/*"+n.slice(t,u)+"*/"}}}(n,r,e,u,t,o)}if("*"===n[t]){for(t+=1;s(n[t]);)t+=1;for(t+=4;n[t]&&!c(n[t]);)t+=1;for(i=t+=1;n[t]&&!c(n[t]);)t+=1;var f=t++;return function(n,t,r,e){return{start:t,end:r,source:e,toString:function(u){return"Object.assign(__exports, "+u.get(e)+"); /*"+n.slice(t,r)+"*/"}}}(n,r,t,n.slice(i,f))}return/^default\b/.test(n.slice(t,t+8))?function(n,t,r){var e=/^\s*(?:(class)(\s+extends|\s*{)|(function)\s*\()/.exec(n.slice(r));if(e){r+=e[0].length;var u="__default_export";return{start:t,end:r,name:u,as:"default",toString:function(){return e[1]?"class "+u+e[2]:"function "+u+"("}}}return{start:t,end:r,toString:function(){return"__exports.default ="}}}(n,r,e+7):function(n,t,r){for(var e=r;n[r]&&/\S/.test(n[r]);)r+=1;for(;n[r]&&!/\S/.test(n[r]);)r+=1;for(var u=r;n[r]&&!a.test(n[r])&&!s(n[r]);)r+=1;var o=r;return{start:t,end:e,name:n.slice(u,o),toString:function(){return""}}}(n,r,e)}function g(n,t){var r,f=!0,c=!1,l=[],d=-1,p={},v={},g=0,x=[],w=[],S=[],$=[];function y(){if(")"===n[d]){for(var t=p[d];s(n[t-1]);)t-=1;return!/(if|while)$/.test(n.slice(t-5,t))}return!0}for(var b={pattern:/(?:(\()|(\))|({)|(})|(")|(')|(\/\/)|(\/\*)|(\/)|(`)|(import)|(export)|(\+\+|--))/g,handlers:[function(n){d=n,v[g++]=n},function(n){d=n,p[n]=v[--g]},function(n){d=n,l.push(b)},function(n){return d=n,l.pop()},function(n){return l.push(b),j},function(n){return l.push(b),A},function(n){return O},function(n){return k},function(t){for(var r=t;r>0&&s(n[r-1]);)r-=1;if(r>0){var c=r;if(a.test(n[c-1]))for(;c>0&&a.test(n[c-1]);)c-=1;else for(;c>0&&i.test(n[c-1]);)c-=1;var l=n.slice(c,r);f=!!l&&(e.test(l)||u.test(l)||o.test(l)&&!y())}else f=!0;return E},function(n){return z},function(r){if(0===r||s(n[r-1])||a.test(n[r-1])){var e=r+6,u=void 0;do{u=n[e++]}while(s(u));var o=e>r+7;if(/^['"{*]$/.test(u)||o&&/^[a-zA-Z_$]$/.test(u)){var i=m(n,r);x.push(i),N=i.end}else if("("===u){var f=function(n){return{start:n,end:n+6,toString:function(){return"__import"}}}(r);w.push(f),N=f.end}else if("."===u){var c=function(n,t,r){var e=h.exec(n.slice(t));if(e)return{start:t,end:t+e[0].length,toString:function(){return JSON.stringify(""+r)}}}(n,r,t);c&&(S.push(c),N=c.end)}}},function(t){if((0===t||s(n[t-1])||a.test(n[t-1]))&&/export[\s\n{]/.test(n.slice(t,t+7))){var r=_(n,t);$.push(r),N=r.end}},function(t){c=!c&&"+"===n[t-1]}]},E={pattern:/(?:(\[)|(\\)|(.))/g,handlers:[function(n){return f?U:b},function(n){return r=R,L},function(n){return f&&!c?R:b}]},R={pattern:/(?:(\[)|(\\)|(\/))/g,handlers:[function(){return U},function(){return r=R,L},function(){return b}]},U={pattern:/(?:(\])|(\\))/g,handlers:[function(){return R},function(){return r=U,L}]},j={pattern:/(?:(\\)|("))/g,handlers:[function(){return r=j,L},function(){return l.pop()}]},A={pattern:/(?:(\\)|('))/g,handlers:[function(){return r=A,L},function(){return l.pop()}]},L={pattern:/(.)/g,handlers:[function(){return r}]},z={pattern:/(?:(\${)|(\\)|(`))/g,handlers:[function(){return l.push(z),b},function(){return r=z,L},function(){return b}]},O={pattern:/((?:\n|$))/g,handlers:[function(){return b}]},k={pattern:/(\*\/)/g,handlers:[function(){return b}]},I=b,N=0;N0||I!==b)throw new Error("Unexpected end of file");break}N=P.index+P[0].length;for(var Z=1;ZFirst, you have to know what Svelte is. Svelte is a UI framework with a bold new idea: rather than providing a library that you write code with (like React or Vue, for example), it's a compiler that turns your components into highly optimized vanilla JavaScript. If you haven't already read the introductory blog post, you should!

+ +

Sapper is a Next.js-style framework (more on that here) built around Svelte. It makes it embarrassingly easy to create extremely high performance web apps. Out of the box, you get:

+ +
    +
  • Code-splitting, dynamic imports and hot module replacement, powered by webpack
  • +
  • Server-side rendering (SSR) with client-side hydration
  • +
  • Service worker for offline support, and all the PWA bells and whistles
  • +
  • The nicest development experience you've ever had, or your money back
  • +
+ +

It's implemented as Express middleware. Everything is set up and waiting for you to get started, but you keep complete control over the server, service worker, webpack config and everything else, so it's as flexible as you need it to be.

+ ` + }, + + { + title: 'How to use Sapper', + slug: 'how-to-use-sapper', + html: ` +

Step one

+

Create a new project, using degit:

+ +
npx degit "sveltejs/sapper-template#rollup" my-app
+			cd my-app
+			npm install # or yarn!
+			npm run dev
+			
+ +

Step two

+

Go to localhost:3000. Open my-app in your editor. Edit the files in the src/routes directory or add new ones.

+ +

Step three

+

...

+ +

Step four

+

Resist overdone joke formats.

+ ` + }, + + { + title: 'Why the name?', + slug: 'why-the-name', + html: ` +

In war, the soldiers who build bridges, repair roads, clear minefields and conduct demolitions — all under combat conditions — are known as sappers.

+ +

For web developers, the stakes are generally lower than those for combat engineers. But we face our own hostile environment: underpowered devices, poor network connections, and the complexity inherent in front-end engineering. Sapper, which is short for Svelte app maker, is your courageous and dutiful ally.

+ ` + }, + + { + title: 'How is Sapper different from Next.js?', + slug: 'how-is-sapper-different-from-next', + html: ` +

Next.js is a React framework from Vercel, and is the inspiration for Sapper. There are a few notable differences, however:

+ +
    +
  • It's powered by Svelte instead of React, so it's faster and your apps are smaller
  • +
  • Instead of route masking, we encode route parameters in filenames. For example, the page you're looking at right now is src/routes/blog/[slug].svelte
  • +
  • As well as pages (Svelte components, which render on server or client), you can create server routes in your routes directory. These are just .js files that export functions corresponding to HTTP methods, and receive Express request and response objects as arguments. This makes it very easy to, for example, add a JSON API such as the one powering this very page
  • +
  • Links are just <a> elements, rather than framework-specific <Link> components. That means, for example, that this link right here, despite being inside a blob of HTML, works with the router as you'd expect.
  • +
+ ` + }, + + { + title: 'How can I get involved?', + slug: 'how-can-i-get-involved', + html: ` +

We're so glad you asked! Come on over to the Svelte and Sapper repos, and join us in the Discord chatroom. Everyone is welcome, especially you!

+ ` + } +]; + +posts.forEach(post => { + post.html = post.html.replace(/^\t{3}/gm, ''); +}); + +const contents = JSON.stringify(posts.map(post => { + return { + title: post.title, + slug: post.slug + }; +})); + +function get$1(req, res) { + res.writeHead(200, { + 'Content-Type': 'application/json' + }); + + res.end(contents); +} + +var route_0 = /*#__PURE__*/Object.freeze({ + __proto__: null, + get: get$1 +}); + +const lookup = new Map(); +posts.forEach(post => { + lookup.set(post.slug, JSON.stringify(post)); +}); + +function get(req, res, next) { + // the `slug` parameter is available because + // this file is called [slug].json.js + const { slug } = req.params; + + if (lookup.has(slug)) { + res.writeHead(200, { + 'Content-Type': 'application/json' + }); + + res.end(lookup.get(slug)); + } else { + res.writeHead(404, { + 'Content-Type': 'application/json' + }); + + res.end(JSON.stringify({ + message: `Not found` + })); + } +} + +var route_1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + get: get +}); + +function noop$1() { } +function run(fn) { + return fn(); +} +function blank_object() { + return Object.create(null); +} +function run_all(fns) { + fns.forEach(run); +} +function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); +} + +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 afterUpdate(fn) { + get_current_component().$$.after_update.push(fn); +} +function setContext(key, context) { + get_current_component().$$.context.set(key, context); +} +const escaped$1 = { + '"': '"', + "'": ''', + '&': '&', + '<': '<', + '>': '>' +}; +function escape(html) { + return String(html).replace(/["'&<>]/g, match => escaped$1[match]); +} +function each(items, fn) { + let str = ''; + for (let i = 0; i < items.length; i += 1) { + str += fn(items[i], i); + } + return str; +} +const missing_component = { + $$render: () => '' +}; +function validate_component(component, name) { + if (!component || !component.$$render) { + if (name === 'svelte:component') + name += ' this={...}'; + throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`); + } + return component; +} +let on_destroy; +function create_ssr_component(fn) { + function $$render(result, props, bindings, slots, context) { + const parent_component = current_component; + const $$ = { + on_destroy, + context: new Map(parent_component ? parent_component.$$.context : context || []), + // these will be immediately discarded + on_mount: [], + before_update: [], + after_update: [], + callbacks: blank_object() + }; + set_current_component({ $$ }); + const html = fn(result, props, bindings, slots); + set_current_component(parent_component); + return html; + } + return { + render: (props = {}, { $$slots = {}, context = new Map() } = {}) => { + on_destroy = []; + const result = { title: '', head: '', css: new Set() }; + const html = $$render(result, props, {}, $$slots, context); + run_all(on_destroy); + return { + html, + css: { + code: Array.from(result.css).map(css => css.code).join('\n'), + map: null // TODO + }, + head: result.title + result.head + }; + }, + $$render + }; +} +function add_attribute(name, value, boolean) { + if (value == null || (boolean && !value)) + return ''; + return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `"${value}"`}`}`; +} + +var successkid = "/client/465898c830bb9d2c.jpg"; + +/* src/routes/index.svelte generated by Svelte v3.37.0 */ + +const css$5 = { + code: "h1.svelte-1kk9opm,figure.svelte-1kk9opm,p.svelte-1kk9opm{text-align:center;margin:0 auto}h1.svelte-1kk9opm{font-size:2.8em;text-transform:uppercase;font-weight:700;margin:0 0 0.5em 0}figure.svelte-1kk9opm{margin:0 0 1em 0}img.svelte-1kk9opm{width:100%;max-width:400px;margin:0 0 1em 0}p.svelte-1kk9opm{margin:1em auto}@media(min-width: 480px){h1.svelte-1kk9opm{font-size:4em}}", + map: "{\"version\":3,\"file\":\"index.svelte\",\"sources\":[\"index.svelte\"],\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\tSapper project template\\n\\n\\n

Great success!

\\n\\n
\\n\\t\\\"Success\\n\\t
Have fun with Sapper!
\\n
\\n\\n

Try editing this file (src/routes/index.svelte) to test live reloading.

\\n\"],\"names\":[],\"mappings\":\"AAKC,iBAAE,CAAE,qBAAM,CAAE,CAAC,eAAC,CAAC,AACd,UAAU,CAAE,MAAM,CAClB,MAAM,CAAE,CAAC,CAAC,IAAI,AACf,CAAC,AAED,EAAE,eAAC,CAAC,AACH,SAAS,CAAE,KAAK,CAChB,cAAc,CAAE,SAAS,CACzB,WAAW,CAAE,GAAG,CAChB,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,AACpB,CAAC,AAED,MAAM,eAAC,CAAC,AACP,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,AAClB,CAAC,AAED,GAAG,eAAC,CAAC,AACJ,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,AAClB,CAAC,AAED,CAAC,eAAC,CAAC,AACF,MAAM,CAAE,GAAG,CAAC,IAAI,AACjB,CAAC,AAED,MAAM,AAAC,YAAY,KAAK,CAAC,AAAC,CAAC,AAC1B,EAAE,eAAC,CAAC,AACH,SAAS,CAAE,GAAG,AACf,CAAC,AACF,CAAC\"}" +}; + +const Routes = create_ssr_component(($$result, $$props, $$bindings, slots) => { + $$result.css.add(css$5); + + return `${($$result.head += `${($$result.title = `Sapper project template`, "")}`, "")} + +

Great success!

+ +
${ +
Have fun with Sapper!
+ +

Try editing this file (src/routes/index.svelte) to test live reloading.

`; +}); + +var component_0 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': Routes +}); + +/* src/routes/about.svelte generated by Svelte v3.37.0 */ + +const About = create_ssr_component(($$result, $$props, $$bindings, slots) => { + return `${($$result.head += `${($$result.title = `About`, "")}`, "")} + +

About this site

+ +

This is the 'about' page. There's not much here.

`; +}); + +var component_1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': About +}); + +/* src/routes/blog/index.svelte generated by Svelte v3.37.0 */ + +const css$4 = { + code: "ul.svelte-1frg2tf{margin:0 0 1em 0;line-height:1.5}", + map: "{\"version\":3,\"file\":\"index.svelte\",\"sources\":[\"index.svelte\"],\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\tBlog\\n\\n\\n

Recent posts

\\n\\n
    \\n\\t{#each posts as post}\\n\\t\\t\\n\\t\\t
  • {post.title}
  • \\n\\t{/each}\\n
\\n\"],\"names\":[],\"mappings\":\"AAaC,EAAE,eAAC,CAAC,AACH,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CACjB,WAAW,CAAE,GAAG,AACjB,CAAC\"}" +}; + +function preload$1() { + return this.fetch(`blog.json`).then(r => r.json()).then(posts => { + return { posts }; + }); +} + +const Blog = create_ssr_component(($$result, $$props, $$bindings, slots) => { + let { posts } = $$props; + if ($$props.posts === void 0 && $$bindings.posts && posts !== void 0) $$bindings.posts(posts); + $$result.css.add(css$4); + + return `${($$result.head += `${($$result.title = `Blog`, "")}`, "")} + +

Recent posts

+ +`; +}); + +var component_2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': Blog, + preload: preload$1 +}); + +/* src/routes/blog/[slug].svelte generated by Svelte v3.37.0 */ + +const css$3 = { + code: ".content.svelte-emm3f3 h2{font-size:1.4em;font-weight:500}.content.svelte-emm3f3 pre{background-color:#f9f9f9;box-shadow:inset 1px 1px 5px rgba(0, 0, 0, 0.05);padding:0.5em;border-radius:2px;overflow-x:auto}.content.svelte-emm3f3 pre code{background-color:transparent;padding:0}.content.svelte-emm3f3 ul{line-height:1.5}.content.svelte-emm3f3 li{margin:0 0 0.5em 0}", + map: "{\"version\":3,\"file\":\"[slug].svelte\",\"sources\":[\"[slug].svelte\"],\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\t{post.title}\\n\\n\\n

{post.title}

\\n\\n
\\n\\t{@html post.html}\\n
\\n\"],\"names\":[],\"mappings\":\"AA4BC,sBAAQ,CAAC,AAAQ,EAAE,AAAE,CAAC,AACrB,SAAS,CAAE,KAAK,CAChB,WAAW,CAAE,GAAG,AACjB,CAAC,AAED,sBAAQ,CAAC,AAAQ,GAAG,AAAE,CAAC,AACtB,gBAAgB,CAAE,OAAO,CACzB,UAAU,CAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACjD,OAAO,CAAE,KAAK,CACd,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,IAAI,AACjB,CAAC,AAED,sBAAQ,CAAC,AAAQ,GAAG,AAAC,CAAC,AAAQ,IAAI,AAAE,CAAC,AACpC,gBAAgB,CAAE,WAAW,CAC7B,OAAO,CAAE,CAAC,AACX,CAAC,AAED,sBAAQ,CAAC,AAAQ,EAAE,AAAE,CAAC,AACrB,WAAW,CAAE,GAAG,AACjB,CAAC,AAED,sBAAQ,CAAC,AAAQ,EAAE,AAAE,CAAC,AACrB,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,AACpB,CAAC\"}" +}; + +async function preload({ params }) { + // the `slug` parameter is available because + // this file is called [slug].svelte + const res = await this.fetch(`blog/${params.slug}.json`); + + const data = await res.json(); + + if (res.status === 200) { + return { post: data }; + } else { + this.error(res.status, data.message); + } +} + +const U5Bslugu5D = create_ssr_component(($$result, $$props, $$bindings, slots) => { + let { post } = $$props; + if ($$props.post === void 0 && $$bindings.post && post !== void 0) $$bindings.post(post); + $$result.css.add(css$3); + + return `${($$result.head += `${($$result.title = `${escape(post.title)}`, "")}`, "")} + +

${escape(post.title)}

+ +
${post.html}
`; +}); + +var component_3 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': U5Bslugu5D, + preload: preload +}); + +/* src/components/Nav.svelte generated by Svelte v3.37.0 */ + +const css$2 = { + code: "nav.svelte-1dbd5up{border-bottom:1px solid rgba(255,62,0,0.1);font-weight:300;padding:0 1em}ul.svelte-1dbd5up{margin:0;padding:0}ul.svelte-1dbd5up::after{content:'';display:block;clear:both}li.svelte-1dbd5up{display:block;float:left}[aria-current].svelte-1dbd5up{position:relative;display:inline-block}[aria-current].svelte-1dbd5up::after{position:absolute;content:'';width:calc(100% - 1em);height:2px;background-color:rgb(255,62,0);display:block;bottom:-1px}a.svelte-1dbd5up{text-decoration:none;padding:1em 0.5em;display:block}", + map: "{\"version\":3,\"file\":\"Nav.svelte\",\"sources\":[\"Nav.svelte\"],\"sourcesContent\":[\"\\n\\n\\n\\n\\n\"],\"names\":[],\"mappings\":\"AAKC,GAAG,eAAC,CAAC,AACJ,aAAa,CAAE,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAC3C,WAAW,CAAE,GAAG,CAChB,OAAO,CAAE,CAAC,CAAC,GAAG,AACf,CAAC,AAED,EAAE,eAAC,CAAC,AACH,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,AACX,CAAC,AAGD,iBAAE,OAAO,AAAC,CAAC,AACV,OAAO,CAAE,EAAE,CACX,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,AACZ,CAAC,AAED,EAAE,eAAC,CAAC,AACH,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,AACZ,CAAC,AAED,CAAC,YAAY,CAAC,eAAC,CAAC,AACf,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,YAAY,AACtB,CAAC,AAED,CAAC,YAAY,gBAAC,OAAO,AAAC,CAAC,AACtB,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,EAAE,CACX,KAAK,CAAE,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CACvB,MAAM,CAAE,GAAG,CACX,gBAAgB,CAAE,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAC/B,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,IAAI,AACb,CAAC,AAED,CAAC,eAAC,CAAC,AACF,eAAe,CAAE,IAAI,CACrB,OAAO,CAAE,GAAG,CAAC,KAAK,CAClB,OAAO,CAAE,KAAK,AACf,CAAC\"}" +}; + +const Nav = create_ssr_component(($$result, $$props, $$bindings, slots) => { + let { segment } = $$props; + if ($$props.segment === void 0 && $$bindings.segment && segment !== void 0) $$bindings.segment(segment); + $$result.css.add(css$2); + + return ``; +}); + +/* src/routes/_layout.svelte generated by Svelte v3.37.0 */ + +const css$1 = { + code: "main.svelte-1uhnsl8{position:relative;max-width:56em;background-color:white;padding:2em;margin:0 auto;box-sizing:border-box}", + map: "{\"version\":3,\"file\":\"_layout.svelte\",\"sources\":[\"_layout.svelte\"],\"sourcesContent\":[\"\\n\\n\\n\\n