Spaces:
Runtime error
Runtime error
Ruben
commited on
Commit
β’
d8118e8
1
Parent(s):
e131ab5
change bkg color
Browse files- .gitignore +1 -1
- frontend/.svelte-kit/output/client/_app/immutable/manifest.json +2 -2
- frontend/.svelte-kit/output/client/_app/immutable/pages/{index.svelte-82e07def.js β index.svelte-a4900be2.js} +1 -1
- frontend/.svelte-kit/output/client/_app/immutable/{start-c2693518.js β start-db9f32c4.js} +1 -1
- frontend/.svelte-kit/output/client/_app/version.json +1 -1
- frontend/.svelte-kit/output/prerendered/pages/index.html +6 -6
- frontend/.svelte-kit/output/server/manifest.js +2 -2
- frontend/.svelte-kit/output/server/nodes/2.js +2 -2
- frontend/src/lib/DrawingCanvas.svelte +1 -1
- frontend/static/samples/{example_0.jpg β default.jpg} +0 -0
.gitignore
CHANGED
@@ -1 +1 @@
|
|
1 |
-
**/node_modules
|
|
|
1 |
+
**/node_modules/
|
frontend/.svelte-kit/output/client/_app/immutable/manifest.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
".svelte-kit/runtime/client/start.js": {
|
3 |
-
"file": "start-
|
4 |
"src": ".svelte-kit/runtime/client/start.js",
|
5 |
"isEntry": true,
|
6 |
"imports": [
|
@@ -35,7 +35,7 @@
|
|
35 |
]
|
36 |
},
|
37 |
"src/routes/index.svelte": {
|
38 |
-
"file": "pages/index.svelte-
|
39 |
"src": "src/routes/index.svelte",
|
40 |
"isEntry": true,
|
41 |
"isDynamicEntry": true,
|
|
|
1 |
{
|
2 |
".svelte-kit/runtime/client/start.js": {
|
3 |
+
"file": "start-db9f32c4.js",
|
4 |
"src": ".svelte-kit/runtime/client/start.js",
|
5 |
"isEntry": true,
|
6 |
"imports": [
|
|
|
35 |
]
|
36 |
},
|
37 |
"src/routes/index.svelte": {
|
38 |
+
"file": "pages/index.svelte-a4900be2.js",
|
39 |
"src": "src/routes/index.svelte",
|
40 |
"isEntry": true,
|
41 |
"isDynamicEntry": true,
|
frontend/.svelte-kit/output/client/_app/immutable/pages/{index.svelte-82e07def.js β index.svelte-a4900be2.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{S as re,i as le,s as oe,e as z,k as j,c as C,a as O,m as A,d as I,b as n,K as ze,g as Y,J as d,t as V,h as F,L as N,E as J,M as De,N as G,O as K,P as de,Q as he,j as Le,f as $e,R as W,T as _e,U as Ne,V as ct,W as Ce,w as se,x as ne,y as ie,q as ce,o as ue,B as pe,v as ut}from"../chunks/index-bcf2726a.js";import{w as ee,b as at}from"../chunks/paths-d3bcbd10.js";const xe=[{color:[219,14,154],label:"building"},{color:[147,142,123],label:"pervious surface"},{color:[248,12,0],label:"impervious surface"},{color:[169,113,1],label:"bare soil"},{color:[21,83,174],label:"water"},{color:[25,74,38],label:"coniferous"},{color:[70,228,131],label:"deciduous"},{color:[243,166,13],label:"brushwood"},{color:[102,0,130],label:"vineyard"},{color:[85,255,0],label:"herbaceous vegetation"},{color:[255,243,13],label:"agricultural land"},{color:[228,223,124],label:"plowed land"},{color:[61,230,235],label:"swimming pool"},{color:[255,255,255],label:"snow"},{color:[138,179,160],label:"clear cut"},{color:[107,113,79],label:"mixed"}],Te=["/samples/example_0.png","/samples/example0.png","/samples/example1.png","/samples/example2.png","/samples/example3.png","/samples/example4.png","/samples/example5.png","/samples/example6.png"],Oe=[["High resolution satellite image, 4K, ultra detailed","Realistic"],["Colorful lego bricks","Lego brick"],["Black and white paper pencil drawing","Pencil"],["Oil on canvas painting","Painting"]];function st(){return BigInt(0xb7dd73e137d20800&((1<<63)-1)*Math.random())}const me=ee(new Map),Be=ee(),Re=ee(),je=ee(),ge=ee(),Ae=ee({prompt:"Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",modifier:Oe[0][0],seed:st(),steps:20}),fe=ee(!1),ke=ee(!1);function Ye(l,e,t){const r=l.slice();return r[3]=e[t],r[5]=t,r}function Je(l){let e,t,r,a,o,s,u,i,x,k,m,M;return{c(){e=z("div"),t=z("input"),s=j(),u=z("label"),i=z("img"),M=j(),this.h()},l(v){e=C(v,"DIV",{class:!0});var b=O(e);t=C(b,"INPUT",{type:!0,name:!0,id:!0,class:!0}),s=A(b),u=C(b,"LABEL",{for:!0,class:!0});var E=O(u);i=C(E,"IMG",{src:!0,alt:!0,class:!0}),E.forEach(I),M=A(b),b.forEach(I),this.h()},h(){n(t,"type","radio"),n(t,"name","samples"),n(t,"id",r="sample-"+l[5]),t.value=a=l[5],t.disabled=o=l[0]===!0,n(t,"class","svelte-1gwcbp"),ze(i.src,x=at+l[3])||n(i,"src",x),n(i,"alt",k=l[3]),n(i,"class","svelte-1gwcbp"),n(u,"for",m="sample-"+l[5]),n(u,"class","svelte-1gwcbp"),n(e,"class","snap-always snap-start")},m(v,b){Y(v,e,b),d(e,t),d(e,s),d(e,u),d(u,i),d(e,M)},p(v,b){b&1&&o!==(o=v[0]===!0)&&(t.disabled=o)},d(v){v&&I(e)}}}function pt(l){let e,t,r,a,o,s,u,i,x=Te,k=[];for(let m=0;m<x.length;m+=1)k[m]=Je(Ye(l,x,m));return{c(){e=z("div"),t=z("h4"),r=V("Select a Template"),a=j(),o=z("form"),s=z("div");for(let m=0;m<k.length;m+=1)k[m].c();this.h()},l(m){e=C(m,"DIV",{});var M=O(e);t=C(M,"H4",{class:!0});var v=O(t);r=F(v,"Select a Template"),v.forEach(I),a=A(M),o=C(M,"FORM",{class:!0});var b=O(o);s=C(b,"DIV",{class:!0});var E=O(s);for(let c=0;c<k.length;c+=1)k[c].l(E);E.forEach(I),b.forEach(I),M.forEach(I),this.h()},h(){n(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(s,"class","samples svelte-1gwcbp"),n(o,"class","svelte-1gwcbp")},m(m,M){Y(m,e,M),d(e,t),d(t,r),d(e,a),d(e,o),d(o,s);for(let v=0;v<k.length;v+=1)k[v].m(s,null);u||(i=N(o,"input",l[1]),u=!0)},p(m,[M]){if(M&1){x=Te;let v;for(v=0;v<x.length;v+=1){const b=Ye(m,x,v);k[v]?k[v].p(b,M):(k[v]=Je(b),k[v].c(),k[v].m(s,null))}for(;v<k.length;v+=1)k[v].d(1);k.length=x.length}},i:J,o:J,d(m){m&&I(e),De(k,m),u=!1,i()}}}async function dt(l){return new Promise((e,t)=>{const r=new Image;r.onload=()=>{URL.revokeObjectURL(r.src),e(r)},r.onerror=a=>{t(a)},r.src=URL.createObjectURL(l)})}function ht(l,e,t){let r,a;return G(l,je,s=>t(2,r=s)),G(l,fe,s=>t(0,a=s)),[a,async s=>{s.preventDefault();const u=Te[parseInt(s.target.value)];if(u){const i=await fetch(at+u).then(k=>k.blob()),x=await dt(i);K(je,r=x,r)}}]}class ft extends re{constructor(e){super(),le(this,e,ht,pt,oe,{})}}function Xe(l,e,t){const r=l.slice();return r[2]=e[t],r[7]=t,r}function Ke(l){let e,t,r,a,o,s,u,i,x,k,m,M,v=l[2].label+"",b,E,c;return{c(){e=z("div"),t=z("input"),s=j(),u=z("label"),i=de("svg"),x=de("rect"),m=j(),M=z("span"),b=V(v),c=j(),this.h()},l(f){e=C(f,"DIV",{class:!0});var h=O(e);t=C(h,"INPUT",{name:!0,type:!0,id:!0,class:!0}),s=A(h),u=C(h,"LABEL",{for:!0,class:!0});var p=O(u);i=he(p,"svg",{width:!0,height:!0,viewBox:!0,class:!0});var g=O(i);x=he(g,"rect",{x:!0,y:!0,width:!0,height:!0,fill:!0}),O(x).forEach(I),g.forEach(I),m=A(p),M=C(p,"SPAN",{class:!0});var w=O(M);b=F(w,v),w.forEach(I),p.forEach(I),c=A(h),h.forEach(I),this.h()},h(){n(t,"name","color"),t.checked=r=l[7]==nt,n(t,"type","radio"),n(t,"id",a="color-"+l[7]),t.value=o=l[7],n(t,"class","svelte-1oy4poo"),n(x,"x","0"),n(x,"y","0"),n(x,"width","20"),n(x,"height","20"),n(x,"fill",k="rgb("+l[2].color.join(",")+")"),n(i,"width","20"),n(i,"height","20"),n(i,"viewBox","0 0 20 20"),n(i,"class","svelte-1oy4poo"),n(M,"class","svelte-1oy4poo"),n(u,"for",E="color-"+l[7]),n(u,"class","svelte-1oy4poo"),n(e,"class","snap-always snap-start")},m(f,h){Y(f,e,h),d(e,t),d(e,s),d(e,u),d(u,i),d(i,x),d(u,m),d(u,M),d(M,b),d(e,c)},p:J,d(f){f&&I(e)}}}function vt(l){let e,t,r,a,o,s,u,i,x,k,m,M,v,b=l[0].size+"",E,c,f,h=xe,p=[];for(let g=0;g<h.length;g+=1)p[g]=Ke(Xe(l,h,g));return{c(){e=z("form"),t=z("h4"),r=V("Brush Type"),a=j(),o=z("div");for(let g=0;g<p.length;g+=1)p[g].c();s=j(),u=z("h4"),i=V("Brush Size"),x=j(),k=z("div"),m=z("input"),M=j(),v=z("label"),E=V(b),this.h()},l(g){e=C(g,"FORM",{});var w=O(e);t=C(w,"H4",{class:!0});var y=O(t);r=F(y,"Brush Type"),y.forEach(I),a=A(w),o=C(w,"DIV",{class:!0,name:!0});var P=O(o);for(let T=0;T<p.length;T+=1)p[T].l(P);P.forEach(I),s=A(w),u=C(w,"H4",{class:!0});var _=O(u);i=F(_,"Brush Size"),_.forEach(I),x=A(w),k=C(w,"DIV",{class:!0});var S=O(k);m=C(S,"INPUT",{min:!0,max:!0,step:!0,name:!0,type:!0}),M=A(S),v=C(S,"LABEL",{class:!0,for:!0});var D=O(v);E=F(D,b),D.forEach(I),S.forEach(I),w.forEach(I),this.h()},h(){n(t,"class","font-bold mt-6 mb-2 leading-6 my-3"),n(o,"class","colors svelte-1oy4poo"),n(o,"name","colors"),n(u,"class","font-bold mt-6 mb-2 my-6 leading-6"),m.value="10",n(m,"min","1"),n(m,"max","150"),n(m,"step","1"),n(m,"name","brush"),n(m,"type","range"),n(v,"class","pl-2 svelte-1oy4poo"),n(v,"for","brush"),n(k,"class","brush svelte-1oy4poo")},m(g,w){Y(g,e,w),d(e,t),d(t,r),d(e,a),d(e,o);for(let y=0;y<p.length;y+=1)p[y].m(o,null);d(e,s),d(e,u),d(u,i),d(e,x),d(e,k),d(k,m),d(k,M),d(k,v),d(v,E),c||(f=N(e,"input",l[1]),c=!0)},p(g,[w]){if(w&0){h=xe;let y;for(y=0;y<h.length;y+=1){const P=Xe(g,h,y);p[y]?p[y].p(P,w):(p[y]=Ke(P),p[y].c(),p[y].m(o,null))}for(;y<p.length;y+=1)p[y].d(1);p.length=h.length}w&1&&b!==(b=g[0].size+"")&&Le(E,b)},i:J,o:J,d(g){g&&I(e),De(p,g),c=!1,f()}}}const nt=6;function mt(l,e,t){let r;G(l,ge,x=>t(0,r=x));const{color:a,label:o}=xe[nt];let s=`rgb(${a.join(",")})`,u=40;return K(ge,r={color:s,size:u,label:o},r),[r,async x=>{const k=x.target;if(k.name==="color"){const m=parseInt(k.value),{color:M,label:v}=xe[m];s=`rgb(${M.join(",")})`,K(ge,r={color:s,size:u,label:v},r)}else k.name==="brush"&&(u=parseInt(k.value),K(ge,r={color:s,size:u,label:o},r))},a]}class gt extends re{constructor(e){super(),le(this,e,mt,vt,oe,{})}}function Ze(l,e,t){const r=l.slice();return r[15]=e[t],r}function Qe(l){let e,t=l[15][1]+"",r,a,o;return{c(){e=z("option"),r=V(t),o=V("`"),this.h()},l(s){e=C(s,"OPTION",{});var u=O(e);r=F(u,t),u.forEach(I),o=F(s,"`"),this.h()},h(){e.__value=a=l[15][0],e.value=e.__value},m(s,u){Y(s,e,u),d(e,r),Y(s,o,u)},p:J,d(s){s&&I(e),s&&I(o)}}}function bt(l){let e,t,r,a,o,s,u,i,x,k,m,M,v,b,E,c,f,h,p,g,w,y,P,_,S,D,T,R,X,Q,Z,$,H,be,Ee,te,ye,Ie,Ue,ae=Oe,q=[];for(let L=0;L<ae.length;L+=1)q[L]=Qe(Ze(l,ae,L));return{c(){e=z("form"),t=z("h4"),r=V("Prompt"),a=j(),o=z("input"),u=j(),i=z("h4"),x=V("Modifier"),k=j(),m=z("input"),v=j(),b=z("select"),E=z("option"),c=V("preset");for(let L=0;L<q.length;L+=1)q[L].c();h=j(),p=z("h4"),g=V("Random Seed"),w=j(),y=z("input"),_=j(),S=z("button"),D=V("Random"),R=j(),X=z("h4"),Q=V("Sample Steps"),Z=j(),$=z("div"),H=z("input"),Ee=j(),te=z("label"),ye=V(l[2]),this.h()},l(L){e=C(L,"FORM",{});var B=O(e);t=C(B,"H4",{class:!0});var U=O(t);r=F(U,"Prompt"),U.forEach(I),a=A(B),o=C(B,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),u=A(B),i=C(B,"H4",{class:!0});var ve=O(i);x=F(ve,"Modifier"),ve.forEach(I),k=A(B),m=C(B,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),v=A(B),b=C(B,"SELECT",{name:!0,class:!0});var Se=O(b);E=C(Se,"OPTION",{});var Ve=O(E);c=F(Ve,"preset"),Ve.forEach(I);for(let Pe=0;Pe<q.length;Pe+=1)q[Pe].l(Se);Se.forEach(I),h=A(B),p=C(B,"H4",{class:!0});var Fe=O(p);g=F(Fe,"Random Seed"),Fe.forEach(I),w=A(B),y=C(B,"INPUT",{type:!0,name:!0,placeholder:!0,class:!0}),_=A(B),S=C(B,"BUTTON",{class:!0});var He=O(S);D=F(He,"Random"),He.forEach(I),R=A(B),X=C(B,"H4",{class:!0});var Ge=O(X);Q=F(Ge,"Sample Steps"),Ge.forEach(I),Z=A(B),$=C(B,"DIV",{class:!0});var we=O($);H=C(we,"INPUT",{type:!0,name:!0,min:!0,max:!0,step:!0,class:!0}),Ee=A(we),te=C(we,"LABEL",{class:!0,for:!0});var qe=O(te);ye=F(qe,l[2]),qe.forEach(I),we.forEach(I),B.forEach(I),this.h()},h(){n(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(o,"name","prompt"),n(o,"placeholder","Aerial view of ..., France."),o.disabled=s=l[5]===!0,$e(o,"width","500px"),n(o,"class","svelte-7to72y"),n(i,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(m,"name","modifier"),n(m,"placeholder","High resolution satellite image"),m.disabled=M=l[5]===!0,$e(m,"width","500px"),n(m,"class","svelte-7to72y"),E.disabled=!0,E.selected=!0,E.__value="preset",E.value=E.__value,n(b,"name","presets"),b.disabled=f=l[5]===!0,n(b,"class","svelte-7to72y"),n(p,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(y,"type","Number"),n(y,"name","seed"),n(y,"placeholder","Integer Seed"),y.disabled=P=l[5]===!0,n(y,"class","svelte-7to72y"),S.disabled=T=l[5]===!0,n(S,"class","svelte-7to72y"),n(X,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(H,"type","range"),n(H,"name","steps"),n(H,"min","10"),n(H,"max","30"),n(H,"step","1"),H.disabled=be=l[5]===!0,n(H,"class","svelte-7to72y"),n(te,"class","pl-2 svelte-7to72y"),n(te,"for","steps"),n($,"class","flex")},m(L,B){Y(L,e,B),d(e,t),d(t,r),d(e,a),d(e,o),W(o,l[3]),d(e,u),d(e,i),d(i,x),d(e,k),d(e,m),W(m,l[4]),d(e,v),d(e,b),d(b,E),d(E,c);for(let U=0;U<q.length;U+=1)q[U].m(b,null);d(e,h),d(e,p),d(p,g),d(e,w),d(e,y),W(y,l[1]),d(e,_),d(e,S),d(S,D),d(e,R),d(e,X),d(X,Q),d(e,Z),d(e,$),d($,H),W(H,l[2]),d($,Ee),d($,te),d(te,ye),l[13](e),Ie||(Ue=[N(o,"input",l[7]),N(m,"input",l[8]),N(b,"change",l[9]),N(y,"input",l[10]),N(S,"click",_e(l[11])),N(H,"change",l[12]),N(H,"input",l[12]),N(e,"input",l[6])],Ie=!0)},p(L,[B]){if(B&32&&s!==(s=L[5]===!0)&&(o.disabled=s),B&8&&o.value!==L[3]&&W(o,L[3]),B&32&&M!==(M=L[5]===!0)&&(m.disabled=M),B&16&&m.value!==L[4]&&W(m,L[4]),B&0){ae=Oe;let U;for(U=0;U<ae.length;U+=1){const ve=Ze(L,ae,U);q[U]?q[U].p(ve,B):(q[U]=Qe(ve),q[U].c(),q[U].m(b,null))}for(;U<q.length;U+=1)q[U].d(1);q.length=ae.length}B&32&&f!==(f=L[5]===!0)&&(b.disabled=f),B&32&&P!==(P=L[5]===!0)&&(y.disabled=P),B&2&&W(y,L[1]),B&32&&T!==(T=L[5]===!0)&&(S.disabled=T),B&32&&be!==(be=L[5]===!0)&&(H.disabled=be),B&4&&W(H,L[2]),B&4&&Le(ye,L[2])},i:J,o:J,d(L){L&&I(e),De(q,L),l[13](null),Ie=!1,Ne(Ue)}}}function yt(l,e,t){let r,a;G(l,Ae,h=>t(14,r=h)),G(l,fe,h=>t(5,a=h));function o(){const h=s.elements;K(Ae,r={prompt:h.prompt.value,modifier:h.modifier.value,seed:BigInt(h.seed.value),steps:parseInt(h.steps.value)},r)}let s,u=r.seed,i=r.steps,x=r.prompt,k=r.modifier;function m(){x=this.value,t(3,x)}function M(){k=this.value,t(4,k)}const v=h=>{t(4,k=h.currentTarget.value)};function b(){u=this.value,t(1,u)}const E=()=>{t(1,u=st()),o()};function c(){i=ct(this.value),t(2,i)}function f(h){Ce[h?"unshift":"push"](()=>{s=h,t(0,s)})}return[s,u,i,x,k,a,o,m,M,v,b,E,c,f]}class wt extends re{constructor(e){super(),le(this,e,yt,bt,oe,{})}}let _t=(l=21)=>crypto.getRandomValues(new Uint8Array(l)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var xt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function kt(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var it={exports:{}};(function(l,e){(function(t,r){l.exports=r()})(typeof self!="undefined"?self:xt,function(){return function(t){var r={};function a(o){if(r[o])return r[o].exports;var s=r[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=t,a.c=r,a.d=function(o,s,u){a.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:u})},a.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,s){if(1&s&&(o=a(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var i in o)a.d(u,i,function(x){return o[x]}.bind(null,i));return u},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,"a",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p="",a(a.s=0)}([function(t,r,a){function o(v,b){return function(E){if(Array.isArray(E))return E}(v)||function(E,c){if(Symbol.iterator in Object(E)||Object.prototype.toString.call(E)==="[object Arguments]"){var f=[],h=!0,p=!1,g=void 0;try{for(var w,y=E[Symbol.iterator]();!(h=(w=y.next()).done)&&(f.push(w.value),!c||f.length!==c);h=!0);}catch(P){p=!0,g=P}finally{try{h||y.return==null||y.return()}finally{if(p)throw g}}return f}}(v,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(v){return function(b){if(Array.isArray(b)){for(var E=0,c=new Array(b.length);E<b.length;E++)c[E]=b[E];return c}}(v)||function(b){if(Symbol.iterator in Object(b)||Object.prototype.toString.call(b)==="[object Arguments]")return Array.from(b)}(v)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(v,b){for(var E=0;E<b.length;E++){var c=b[E];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(v,c.key,c)}}a.r(r);var i=/^#?[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}$/,x=/^rgb\((\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3}(\s+)?\)$/,k=function(){function v(){(function(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")})(this,v),this.canvases={}}var b,E;return b=v,(E=[{key:"parseColor",value:function(c){var f=i.test(c),h=x.test(c);if(!f&&!h)throw new Error("Color is not correct format. #123123 or rgb(123, 123, 123) format required.");if(f){var p=c[0]==="#"?c.slice(1):c;return p=p.length===3?p.split("").reduce(function(_,S){return[].concat(s(_),[S,S])},[]).join(""):p,{r:parseInt(p.slice(0,2),16),g:parseInt(p.slice(2,4),16),b:parseInt(p.slice(4,6),16)}}if(h){var g=o(c.replace(/rgb|\s+|\(|\)/g,"").split(",").map(function(_){return parseInt(_)}),3),w=g[0],y=g[1],P=g[2];return{r:w=w>255?255:w,g:y=y>255?255:y,b:P=P>255?255:P}}}},{key:"make",value:function(c){var f=c.size,h=c.color;try{f*=window.devicePixelRatio;var p=this.parseColor(h),g=JSON.stringify(p);if(this.canvases[g]=this.canvases[g]||{},this.canvases[g][f]!=null)return this.canvases[g][f];var w=document.createElement("canvas");f+=f%2,w.width=f,w.height=f;for(var y=w.getContext("2d"),P=y.createImageData(f,f),_=0;_<P.data.length;_+=4)P.data[_]=255,P.data[_+1]=255,P.data[_+2]=255,P.data[_+3]=0;return this.plotCircle(2*f,4*f*(f/2),f/2,P,f,p),this.fillCircle(P,p),y.putImageData(P,0,0),this.canvases[g][f]=w,w}catch(S){console.error(S)}}},{key:"plotCircle",value:function(c,f,h,p,g,w){var y=-h,P=0,_=2-2*h;do{var S=c-4*(y+1)+(f+4*g*(P-1));p.data[S+0]=w.r,p.data[S+1]=w.g,p.data[S+2]=w.b,p.data[S+3]=255;var D=c-P*(4*g)+(f-4*(y+1));p.data[D+0]=w.r,p.data[D+1]=w.g,p.data[D+2]=w.b,p.data[D+3]=255;var T=c+4*y+(f-P*(4*g));p.data[T+0]=w.r,p.data[T+1]=w.g,p.data[T+2]=w.b,p.data[T+3]=255;var R=c+4*g*(P-1)+(f+4*y);p.data[R+0]=w.r,p.data[R+1]=w.g,p.data[R+2]=w.b,p.data[R+3]=255,(h=_)<=P&&(_+=2*++P+1),(h>y||_>P)&&(_+=2*++y+1)}while(y<0)}},{key:"fillCircle",value:function(c,f){for(var h=4*c.width,p=1;p<c.height-1;p+=1)for(var g=!1,w=!1,y=!1,P=0;P<h;P+=4){var _=h*p+P,S=c.data[_+3],D=S===255;D&&!g?g=!0:S===0&&g?w=!0:D&&g&&w&&(y=!0),g&&w&&!y&&(c.data[_]=f.r,c.data[_+1]=f.g,c.data[_+2]=f.b,c.data[_+3]=255)}}}])&&u(b.prototype,E),v}();function m(v,b){for(var E=0;E<b.length;E++){var c=b[E];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(v,c.key,c)}}var M=function(){function v(c){(function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")})(this,v),this.canvas=c,this.context=c.getContext("2d"),this.stampMaker=new k,this.configPixelRatio()}var b,E;return b=v,(E=[{key:"configPixelRatio",value:function(){var c=this.canvas,f=c.width,h=c.height;this.canvas.width=f*this.dpr,this.canvas.height=h*this.dpr,this.canvas.style.width="".concat(f,"px"),this.canvas.style.height="".concat(h,"px"),this.context.scale(this.dpr,this.dpr),this.context.imageSmoothingEnabled=!1}},{key:"exportAsPNG",value:function(c){var f=this;return new Promise(function(h){var p=document.createElement("canvas"),g=p.getContext("2d"),w=f.canvas,y=w.width,P=w.height,_=y/f.dpr,S=P/f.dpr;p.width=_,p.height=S,g.imageSmoothingEnabled=!1,g.drawImage(f.canvas,0,0,y,P,0,0,_,S),p.toBlob(function(D){D.lastModifedDate=new Date,D.name=c,h(D)})})}},{key:"distanceBetween",value:function(c,f){return Math.sqrt(Math.pow(f.x-c.x,2)+Math.pow(f.y-c.y,2))}},{key:"angleBetween",value:function(c,f){return Math.atan2(f.x-c.x,f.y-c.y)}},{key:"draw",value:function(c){var f=c.from,h=c.to,p=c.size,g=c.color;this.context.globalCompositeOperation="source-over",this.brush({from:f,to:h,size:p,color:g})}},{key:"erase",value:function(c){var f=c.from,h=c.to,p=c.size;this.context.globalCompositeOperation="destination-out",this.brush({from:f,to:h,size:p,color:"#000000"})}},{key:"brush",value:function(c){var f=this,h=c.from,p=c.to,g=c.size,w=c.color,y=(g-g%2)/2,P=this.stampMaker.make({size:g,color:w});if(h.x!==p.x||h.y!==p.y)for(var _=this.distanceBetween(h,p),S=this.angleBetween(h,p),D=function(Q){var Z=h.x+Math.sin(S)*Q-y,$=h.y+Math.cos(S)*Q-y;window.requestAnimationFrame(function(){f.context.drawImage(P,Math.round(Z),Math.round($),g,g)})},T=0;T<_;T+=1)D(T);else{var R=h.x-y,X=h.y-y;this.context.drawImage(P,Math.round(R),Math.round(X),g,g)}}},{key:"dpr",get:function(){return window.devicePixelRatio||1}}])&&m(b.prototype,E),v}();r.default=M}])})})(it);var We=kt(it.exports);function Et(l){let e,t;return{c(){e=de("svg"),t=de("path"),this.h()},l(r){e=he(r,"svg",{xmlns:!0,width:!0,viewBox:!0,class:!0});var a=O(e);t=he(a,"path",{fill:!0,stroke:!0,"stroke-width":!0,d:!0}),O(t).forEach(I),a.forEach(I),this.h()},h(){n(t,"fill","white"),n(t,"stroke","black"),n(t,"stroke-width","30"),n(t,"d","M480 256c0 123.4-100.5 223.9-223.9 223.9c-48.84 0-95.17-15.58-134.2-44.86c-14.12-10.59-16.97-30.66-6.375-44.81c10.59-14.12 30.62-16.94 44.81-6.375c27.84 20.91 61 31.94 95.88 31.94C344.3 415.8 416 344.1 416 256s-71.69-159.8-159.8-159.8c-37.46 0-73.09 13.49-101.3 36.64l45.12 45.14c17.01 17.02 4.955 46.1-19.1 46.1H35.17C24.58 224.1 16 215.5 16 204.9V59.04c0-24.04 29.07-36.08 46.07-19.07l47.6 47.63C149.9 52.71 201.5 32.11 256.1 32.11C379.5 32.11 480 132.6 480 256z"),n(e,"xmlns","http://www.w3.org/2000/svg"),n(e,"width","20"),n(e,"viewBox","0 0 512 512"),n(e,"class",l[0])},m(r,a){Y(r,e,a),d(e,t)},p(r,[a]){a&1&&n(e,"class",r[0])},i:J,o:J,d(r){r&&I(e)}}}function It(l,e,t){let{classNames:r=""}=e;return l.$$set=a=>{"classNames"in a&&t(0,r=a.classNames)},[r]}class St extends re{constructor(e){super(),le(this,e,It,Et,oe,{classNames:0})}}function Pt(l){var f;let e,t,r,a,o,s,u,i=((f=l[0])==null?void 0:f.label)+"",x,k,m,M,v,b,E,c;return M=new St({}),{c(){e=z("div"),t=z("div"),r=z("canvas"),a=j(),o=z("canvas"),s=j(),u=z("span"),x=V(i),k=j(),m=z("button"),se(M.$$.fragment),this.h()},l(h){e=C(h,"DIV",{});var p=O(e);t=C(p,"DIV",{class:!0});var g=O(t);r=C(g,"CANVAS",{class:!0,width:!0,height:!0}),O(r).forEach(I),a=A(g),o=C(g,"CANVAS",{class:!0,width:!0,height:!0}),O(o).forEach(I),s=A(g),u=C(g,"SPAN",{class:!0});var w=O(u);x=F(w,i),w.forEach(I),k=A(g),m=C(g,"BUTTON",{class:!0});var y=O(m);ne(M.$$.fragment,y),y.forEach(I),g.forEach(I),p.forEach(I),this.h()},h(){n(r,"class","canvas svelte-vhujxn"),n(r,"width","512"),n(r,"height","512"),n(o,"class","brush svelte-vhujxn"),n(o,"width","10"),n(o,"height","10"),n(u,"class","label svelte-vhujxn"),n(m,"class","absolute bottom-0 left-0 p-3"),m.disabled=v=l[3].size<=0,n(t,"class","relative overflow-clip")},m(h,p){Y(h,e,p),d(e,t),d(t,r),l[11](r),d(t,a),d(t,o),l[12](o),d(t,s),d(t,u),d(u,x),d(t,k),d(t,m),ie(M,m,null),b=!0,E||(c=[N(r,"touchmove",zt),N(r,"pointerenter",Mt),N(r,"pointerup",l[4]),N(r,"pointerleave",l[4]),N(r,"pointercancel",l[4]),N(r,"pointerout",l[4]),N(r,"pointermove",l[6]),N(r,"pointerdown",l[5]),N(m,"click",_e(l[13]))],E=!0)},p(h,[p]){var g;(!b||p&1)&&i!==(i=((g=h[0])==null?void 0:g.label)+"")&&Le(x,i),(!b||p&8&&v!==(v=h[3].size<=0))&&(m.disabled=v)},i(h){b||(ce(M.$$.fragment,h),b=!0)},o(h){ue(M.$$.fragment,h),b=!1},d(h){h&&I(e),l[11](null),l[12](null),pe(M),E=!1,Ne(c)}}}function Mt(){}function et(l,e){const t=l.getBoundingClientRect();return{x:(e.clientX-t.left)*(l.width/t.width),y:(e.clientY-t.top)*(l.height/t.height)}}function tt(l){l.fillStyle="#000000",l.fillRect(0,0,l.canvas.width,l.canvas.height)}function Me(l,e){l.drawImage(e,0,0,l.canvas.width,l.canvas.height)}const zt=l=>l.preventDefault();function Ct(l,e,t){let r,a,o,s;G(l,me,_=>t(3,r=_)),G(l,je,_=>t(10,a=_)),G(l,ge,_=>t(0,o=_)),G(l,Re,_=>t(18,s=_));let u,i,x,k,m={x:0,y:0},M;ut(()=>{t(9,k=u.getContext("2d")),t(8,x=i.getContext("2d")),window.devicePixelRatio=1,M=new We(u),t(1,u.style.height="unset",u),t(1,u.style.width="unset",u),K(Re,s=u,s),tt(k)});let v=!1,b;function E(){t(2,i.style.top=`${10+o.size/2}px`,i),t(2,i.style.left=`${10+o.size/2}px`,i),v=!1}function c(_){v=!0,m=et(u,_),M.draw({from:m,to:m,size:o.size,color:o.color}),b=_t(),me.update(S=>(S.set(b,{brush:o,points:[{from:m,to:m}]}),S))}function f(_){const S=et(u,_);t(2,i.style.top=`${_.offsetY}px`,i),t(2,i.style.left=`${_.offsetX}px`,i),v&&(M.draw({from:m,to:S,size:o.size,color:o.color}),me.update(D=>{const T=D.get(b);return T==null||T.points.push({from:m,to:S}),D}),m=S)}function h(_){const{size:S,color:D}=_;t(2,i.width=S,i),t(2,i.height=S,i),t(8,x.fillStyle=D,x),x.arc(S/2,S/2,S/2,0,2*Math.PI),x.fill()}function p(){if(r.size<=0)return;const _=Array.from(r.keys());me.update(S=>(S.delete(_[_.length-1]),S)),g(k)}function g(_){const S=document.createElement("canvas");S.width=512,S.height=512,window.devicePixelRatio=1;const D=new We(S);tt(_),a&&Me(_,a),Array.from(r.values()).forEach(T=>{T.points.forEach((R,X)=>{D.draw({from:R.from,to:R.to,size:T.brush.size,color:T.brush.color})})}),requestAnimationFrame(()=>{Me(_,S)})}function w(_){Ce[_?"unshift":"push"](()=>{u=_,t(1,u)})}function y(_){Ce[_?"unshift":"push"](()=>{i=_,t(2,i),t(8,x),t(0,o)})}const P=()=>p();return l.$$.update=()=>{l.$$.dirty&257&&x&&o&&(h(o),t(2,i.style.top=`${10+o.size/2}px`,i),t(2,i.style.left=`${10+o.size/2}px`,i)),l.$$.dirty&1536&&a&&(Me(k,a),K(me,r=new Map,r))},[o,u,i,r,E,c,f,p,x,k,a,w,y,P]}class Tt extends re{constructor(e){super(),le(this,e,Ct,Pt,oe,{})}}function rt(l){let e,t,r;return{c(){e=z("img"),this.h()},l(a){e=C(a,"IMG",{class:!0,alt:!0,src:!0,width:!0,height:!0}),this.h()},h(){n(e,"class",t="image "+(l[1]?"opacity-30":"")+" svelte-1t0h0rs"),n(e,"alt","Generative Map Result"),ze(e.src,r=l[0])||n(e,"src",r),n(e,"width","512"),n(e,"height","512")},m(a,o){Y(a,e,o)},p(a,o){o&2&&t!==(t="image "+(a[1]?"opacity-30":"")+" svelte-1t0h0rs")&&n(e,"class",t),o&1&&!ze(e.src,r=a[0])&&n(e,"src",r)},d(a){a&&I(e)}}}function lt(l){let e,t,r,a,o,s;return{c(){e=z("div"),t=de("svg"),r=de("path"),a=j(),o=z("span"),s=V(ot),this.h()},l(u){e=C(u,"DIV",{class:!0});var i=O(e);t=he(i,"svg",{xmlns:!0,fill:!0,viewBox:!0,class:!0});var x=O(t);r=he(x,"path",{fill:!0,d:!0}),O(r).forEach(I),x.forEach(I),a=A(i),o=C(i,"SPAN",{class:!0});var k=O(o);s=F(k,ot),k.forEach(I),i.forEach(I),this.h()},h(){n(r,"fill","currentColor"),n(r,"d","M20 12a8 8 0 0 1-8 8v4a12 12 0 0 0 12-12h-4Zm-2-5.3a8 8 0 0 1 2 5.3h4c0-3-1.1-5.8-3-8l-3 2.7Z"),n(t,"xmlns","http://www.w3.org/2000/svg"),n(t,"fill","none"),n(t,"viewBox","0 0 24 24"),n(t,"class","animate-spin max-w-[3rem]"),n(o,"class","text-xs"),n(e,"class","loading svelte-1t0h0rs")},m(u,i){Y(u,e,i),d(e,t),d(t,r),d(e,a),d(e,o),d(o,s)},p:J,d(u){u&&I(e)}}}function Ot(l){let e,t,r=l[0]&&rt(l),a=l[1]&<();return{c(){e=z("div"),r&&r.c(),t=j(),a&&a.c(),this.h()},l(o){e=C(o,"DIV",{class:!0});var s=O(e);r&&r.l(s),t=A(s),a&&a.l(s),s.forEach(I),this.h()},h(){n(e,"class","relative overflow-clip flex flex-col justify-center items-center w-full h-full")},m(o,s){Y(o,e,s),r&&r.m(e,null),d(e,t),a&&a.m(e,null)},p(o,[s]){o[0]?r?r.p(o,s):(r=rt(o),r.c(),r.m(e,t)):r&&(r.d(1),r=null),o[1]?a?a.p(o,s):(a=lt(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:J,o:J,d(o){o&&I(e),r&&r.d(),a&&a.d()}}}let ot="";async function Bt(l){return new Promise((e,t)=>{try{const r=document.createElement("a");r.download=`sucess-${Date.now()}.png`,r.target="_self",r.onclick=async a=>{r.href&&URL.revokeObjectURL(r.href),r.href=l},requestAnimationFrame(()=>{console.log("Downloading image."),r.click(),e(null)})}catch{t()}})}async function Rt(l,{prompt:e,modifier:t,steps:r,seed:a}){const o=await fetch("/predict",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:[l,e+". "+t,r,a.toString()]})});if(!o.ok)throw new Error("Prediction request failed.");return await o.text()}function jt(l,e,t){let r,a,o,s,u;return G(l,ke,i=>t(2,r=i)),G(l,Be,i=>t(0,a=i)),G(l,fe,i=>t(1,o=i)),G(l,Ae,i=>t(3,s=i)),G(l,Re,i=>t(4,u=i)),l.$$.update=()=>{l.$$.dirty&26&&(async()=>{if(o){const i=await Rt(u.toDataURL(),s);K(Be,a=i,a),K(fe,o=!1,o)}})(),l.$$.dirty&5&&(async()=>r&&(await Bt(a),K(ke,r=!1,r)))()},[a,o,r,s,u]}class At extends re{constructor(e){super(),le(this,e,jt,Ot,oe,{})}}function Dt(l){let e,t,r,a,o,s,u,i,x,k,m,M,v,b,E,c,f,h,p,g,w,y,P,_,S,D;return s=new gt({}),x=new Tt({}),m=new At({}),w=new ft({}),P=new wt({}),{c(){e=z("div"),t=z("article"),r=z("h1"),a=V("Drawing to Map"),o=j(),se(s.$$.fragment),u=j(),i=z("div"),se(x.$$.fragment),k=j(),se(m.$$.fragment),M=j(),v=z("button"),b=V("Generate Map"),c=j(),f=z("button"),h=V("Save Result"),g=j(),se(w.$$.fragment),y=j(),se(P.$$.fragment),this.h()},l(T){e=C(T,"DIV",{class:!0});var R=O(e);t=C(R,"ARTICLE",{class:!0});var X=O(t);r=C(X,"H1",{});var Q=O(r);a=F(Q,"Drawing to Map"),Q.forEach(I),X.forEach(I),o=A(R),ne(s.$$.fragment,R),u=A(R),i=C(R,"DIV",{class:!0});var Z=O(i);ne(x.$$.fragment,Z),k=A(Z),ne(m.$$.fragment,Z),Z.forEach(I),M=A(R),v=C(R,"BUTTON",{class:!0});var $=O(v);b=F($,"Generate Map"),$.forEach(I),c=A(R),f=C(R,"BUTTON",{class:!0});var H=O(f);h=F(H,"Save Result"),H.forEach(I),g=A(R),ne(w.$$.fragment,R),y=A(R),ne(P.$$.fragment,R),R.forEach(I),this.h()},h(){n(t,"class","prose"),n(i,"class","drawings py-3 -mx-3 svelte-1sy339h"),v.disabled=E=l[0]===!0,n(v,"class","green svelte-1sy339h"),f.disabled=p=l[1]===!0||!l[2],n(f,"class","svelte-1sy339h"),n(e,"class","max-w-screen-md mx-auto px-3 py-5 relative z-0")},m(T,R){Y(T,e,R),d(e,t),d(t,r),d(r,a),d(e,o),ie(s,e,null),d(e,u),d(e,i),ie(x,i,null),d(i,k),ie(m,i,null),d(e,M),d(e,v),d(v,b),d(e,c),d(e,f),d(f,h),d(e,g),ie(w,e,null),d(e,y),ie(P,e,null),_=!0,S||(D=[N(v,"click",_e(l[3])),N(f,"click",_e(l[4]))],S=!0)},p(T,[R]){(!_||R&1&&E!==(E=T[0]===!0))&&(v.disabled=E),(!_||R&6&&p!==(p=T[1]===!0||!T[2]))&&(f.disabled=p)},i(T){_||(ce(s.$$.fragment,T),ce(x.$$.fragment,T),ce(m.$$.fragment,T),ce(w.$$.fragment,T),ce(P.$$.fragment,T),_=!0)},o(T){ue(s.$$.fragment,T),ue(x.$$.fragment,T),ue(m.$$.fragment,T),ue(w.$$.fragment,T),ue(P.$$.fragment,T),_=!1},d(T){T&&I(e),pe(s),pe(x),pe(m),pe(w),pe(P),S=!1,Ne(D)}}}function Lt(l,e,t){let r,a,o;return G(l,fe,i=>t(0,r=i)),G(l,ke,i=>t(1,a=i)),G(l,Be,i=>t(2,o=i)),[r,a,o,()=>K(fe,r=!0,r),()=>K(ke,a=!0,a)]}class Vt extends re{constructor(e){super(),le(this,e,Lt,Dt,oe,{})}}export{Vt as default};
|
|
|
1 |
+
import{S as re,i as le,s as oe,e as z,k as j,c as C,a as O,m as A,d as I,b as n,K as ze,g as Y,J as d,t as V,h as F,L as N,E as J,M as De,N as G,O as K,P as de,Q as he,j as Le,f as $e,R as W,T as _e,U as Ne,V as ct,W as Ce,w as se,x as ne,y as ie,q as ce,o as ue,B as pe,v as ut}from"../chunks/index-bcf2726a.js";import{w as ee,b as at}from"../chunks/paths-d3bcbd10.js";const xe=[{color:[219,14,154],label:"building"},{color:[147,142,123],label:"pervious surface"},{color:[248,12,0],label:"impervious surface"},{color:[169,113,1],label:"bare soil"},{color:[21,83,174],label:"water"},{color:[25,74,38],label:"coniferous"},{color:[70,228,131],label:"deciduous"},{color:[243,166,13],label:"brushwood"},{color:[102,0,130],label:"vineyard"},{color:[85,255,0],label:"herbaceous vegetation"},{color:[255,243,13],label:"agricultural land"},{color:[228,223,124],label:"plowed land"},{color:[61,230,235],label:"swimming pool"},{color:[255,255,255],label:"snow"},{color:[138,179,160],label:"clear cut"},{color:[107,113,79],label:"mixed"}],Te=["/samples/example_0.png","/samples/example0.png","/samples/example1.png","/samples/example2.png","/samples/example3.png","/samples/example4.png","/samples/example5.png","/samples/example6.png"],Oe=[["High resolution satellite image, 4K, ultra detailed","Realistic"],["Colorful lego bricks","Lego brick"],["Black and white paper pencil drawing","Pencil"],["Oil on canvas painting","Painting"]];function st(){return BigInt(0xb7dd73e137d20800&((1<<63)-1)*Math.random())}const me=ee(new Map),Be=ee(),Re=ee(),je=ee(),ge=ee(),Ae=ee({prompt:"Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",modifier:Oe[0][0],seed:st(),steps:20}),fe=ee(!1),ke=ee(!1);function Ye(l,e,t){const r=l.slice();return r[3]=e[t],r[5]=t,r}function Je(l){let e,t,r,a,o,s,u,i,x,k,m,M;return{c(){e=z("div"),t=z("input"),s=j(),u=z("label"),i=z("img"),M=j(),this.h()},l(v){e=C(v,"DIV",{class:!0});var b=O(e);t=C(b,"INPUT",{type:!0,name:!0,id:!0,class:!0}),s=A(b),u=C(b,"LABEL",{for:!0,class:!0});var E=O(u);i=C(E,"IMG",{src:!0,alt:!0,class:!0}),E.forEach(I),M=A(b),b.forEach(I),this.h()},h(){n(t,"type","radio"),n(t,"name","samples"),n(t,"id",r="sample-"+l[5]),t.value=a=l[5],t.disabled=o=l[0]===!0,n(t,"class","svelte-1gwcbp"),ze(i.src,x=at+l[3])||n(i,"src",x),n(i,"alt",k=l[3]),n(i,"class","svelte-1gwcbp"),n(u,"for",m="sample-"+l[5]),n(u,"class","svelte-1gwcbp"),n(e,"class","snap-always snap-start")},m(v,b){Y(v,e,b),d(e,t),d(e,s),d(e,u),d(u,i),d(e,M)},p(v,b){b&1&&o!==(o=v[0]===!0)&&(t.disabled=o)},d(v){v&&I(e)}}}function pt(l){let e,t,r,a,o,s,u,i,x=Te,k=[];for(let m=0;m<x.length;m+=1)k[m]=Je(Ye(l,x,m));return{c(){e=z("div"),t=z("h4"),r=V("Select a Template"),a=j(),o=z("form"),s=z("div");for(let m=0;m<k.length;m+=1)k[m].c();this.h()},l(m){e=C(m,"DIV",{});var M=O(e);t=C(M,"H4",{class:!0});var v=O(t);r=F(v,"Select a Template"),v.forEach(I),a=A(M),o=C(M,"FORM",{class:!0});var b=O(o);s=C(b,"DIV",{class:!0});var E=O(s);for(let c=0;c<k.length;c+=1)k[c].l(E);E.forEach(I),b.forEach(I),M.forEach(I),this.h()},h(){n(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(s,"class","samples svelte-1gwcbp"),n(o,"class","svelte-1gwcbp")},m(m,M){Y(m,e,M),d(e,t),d(t,r),d(e,a),d(e,o),d(o,s);for(let v=0;v<k.length;v+=1)k[v].m(s,null);u||(i=N(o,"input",l[1]),u=!0)},p(m,[M]){if(M&1){x=Te;let v;for(v=0;v<x.length;v+=1){const b=Ye(m,x,v);k[v]?k[v].p(b,M):(k[v]=Je(b),k[v].c(),k[v].m(s,null))}for(;v<k.length;v+=1)k[v].d(1);k.length=x.length}},i:J,o:J,d(m){m&&I(e),De(k,m),u=!1,i()}}}async function dt(l){return new Promise((e,t)=>{const r=new Image;r.onload=()=>{URL.revokeObjectURL(r.src),e(r)},r.onerror=a=>{t(a)},r.src=URL.createObjectURL(l)})}function ht(l,e,t){let r,a;return G(l,je,s=>t(2,r=s)),G(l,fe,s=>t(0,a=s)),[a,async s=>{s.preventDefault();const u=Te[parseInt(s.target.value)];if(u){const i=await fetch(at+u).then(k=>k.blob()),x=await dt(i);K(je,r=x,r)}}]}class ft extends re{constructor(e){super(),le(this,e,ht,pt,oe,{})}}function Xe(l,e,t){const r=l.slice();return r[2]=e[t],r[7]=t,r}function Ke(l){let e,t,r,a,o,s,u,i,x,k,m,M,v=l[2].label+"",b,E,c;return{c(){e=z("div"),t=z("input"),s=j(),u=z("label"),i=de("svg"),x=de("rect"),m=j(),M=z("span"),b=V(v),c=j(),this.h()},l(f){e=C(f,"DIV",{class:!0});var h=O(e);t=C(h,"INPUT",{name:!0,type:!0,id:!0,class:!0}),s=A(h),u=C(h,"LABEL",{for:!0,class:!0});var p=O(u);i=he(p,"svg",{width:!0,height:!0,viewBox:!0,class:!0});var g=O(i);x=he(g,"rect",{x:!0,y:!0,width:!0,height:!0,fill:!0}),O(x).forEach(I),g.forEach(I),m=A(p),M=C(p,"SPAN",{class:!0});var w=O(M);b=F(w,v),w.forEach(I),p.forEach(I),c=A(h),h.forEach(I),this.h()},h(){n(t,"name","color"),t.checked=r=l[7]==nt,n(t,"type","radio"),n(t,"id",a="color-"+l[7]),t.value=o=l[7],n(t,"class","svelte-1oy4poo"),n(x,"x","0"),n(x,"y","0"),n(x,"width","20"),n(x,"height","20"),n(x,"fill",k="rgb("+l[2].color.join(",")+")"),n(i,"width","20"),n(i,"height","20"),n(i,"viewBox","0 0 20 20"),n(i,"class","svelte-1oy4poo"),n(M,"class","svelte-1oy4poo"),n(u,"for",E="color-"+l[7]),n(u,"class","svelte-1oy4poo"),n(e,"class","snap-always snap-start")},m(f,h){Y(f,e,h),d(e,t),d(e,s),d(e,u),d(u,i),d(i,x),d(u,m),d(u,M),d(M,b),d(e,c)},p:J,d(f){f&&I(e)}}}function vt(l){let e,t,r,a,o,s,u,i,x,k,m,M,v,b=l[0].size+"",E,c,f,h=xe,p=[];for(let g=0;g<h.length;g+=1)p[g]=Ke(Xe(l,h,g));return{c(){e=z("form"),t=z("h4"),r=V("Brush Type"),a=j(),o=z("div");for(let g=0;g<p.length;g+=1)p[g].c();s=j(),u=z("h4"),i=V("Brush Size"),x=j(),k=z("div"),m=z("input"),M=j(),v=z("label"),E=V(b),this.h()},l(g){e=C(g,"FORM",{});var w=O(e);t=C(w,"H4",{class:!0});var y=O(t);r=F(y,"Brush Type"),y.forEach(I),a=A(w),o=C(w,"DIV",{class:!0,name:!0});var P=O(o);for(let T=0;T<p.length;T+=1)p[T].l(P);P.forEach(I),s=A(w),u=C(w,"H4",{class:!0});var _=O(u);i=F(_,"Brush Size"),_.forEach(I),x=A(w),k=C(w,"DIV",{class:!0});var S=O(k);m=C(S,"INPUT",{min:!0,max:!0,step:!0,name:!0,type:!0}),M=A(S),v=C(S,"LABEL",{class:!0,for:!0});var D=O(v);E=F(D,b),D.forEach(I),S.forEach(I),w.forEach(I),this.h()},h(){n(t,"class","font-bold mt-6 mb-2 leading-6 my-3"),n(o,"class","colors svelte-1oy4poo"),n(o,"name","colors"),n(u,"class","font-bold mt-6 mb-2 my-6 leading-6"),m.value="10",n(m,"min","1"),n(m,"max","150"),n(m,"step","1"),n(m,"name","brush"),n(m,"type","range"),n(v,"class","pl-2 svelte-1oy4poo"),n(v,"for","brush"),n(k,"class","brush svelte-1oy4poo")},m(g,w){Y(g,e,w),d(e,t),d(t,r),d(e,a),d(e,o);for(let y=0;y<p.length;y+=1)p[y].m(o,null);d(e,s),d(e,u),d(u,i),d(e,x),d(e,k),d(k,m),d(k,M),d(k,v),d(v,E),c||(f=N(e,"input",l[1]),c=!0)},p(g,[w]){if(w&0){h=xe;let y;for(y=0;y<h.length;y+=1){const P=Xe(g,h,y);p[y]?p[y].p(P,w):(p[y]=Ke(P),p[y].c(),p[y].m(o,null))}for(;y<p.length;y+=1)p[y].d(1);p.length=h.length}w&1&&b!==(b=g[0].size+"")&&Le(E,b)},i:J,o:J,d(g){g&&I(e),De(p,g),c=!1,f()}}}const nt=6;function mt(l,e,t){let r;G(l,ge,x=>t(0,r=x));const{color:a,label:o}=xe[nt];let s=`rgb(${a.join(",")})`,u=40;return K(ge,r={color:s,size:u,label:o},r),[r,async x=>{const k=x.target;if(k.name==="color"){const m=parseInt(k.value),{color:M,label:v}=xe[m];s=`rgb(${M.join(",")})`,K(ge,r={color:s,size:u,label:v},r)}else k.name==="brush"&&(u=parseInt(k.value),K(ge,r={color:s,size:u,label:o},r))},a]}class gt extends re{constructor(e){super(),le(this,e,mt,vt,oe,{})}}function Ze(l,e,t){const r=l.slice();return r[15]=e[t],r}function Qe(l){let e,t=l[15][1]+"",r,a,o;return{c(){e=z("option"),r=V(t),o=V("`"),this.h()},l(s){e=C(s,"OPTION",{});var u=O(e);r=F(u,t),u.forEach(I),o=F(s,"`"),this.h()},h(){e.__value=a=l[15][0],e.value=e.__value},m(s,u){Y(s,e,u),d(e,r),Y(s,o,u)},p:J,d(s){s&&I(e),s&&I(o)}}}function bt(l){let e,t,r,a,o,s,u,i,x,k,m,M,v,b,E,c,f,h,p,g,w,y,P,_,S,D,T,R,X,Q,Z,$,H,be,Ee,te,ye,Ie,Ue,ae=Oe,q=[];for(let L=0;L<ae.length;L+=1)q[L]=Qe(Ze(l,ae,L));return{c(){e=z("form"),t=z("h4"),r=V("Prompt"),a=j(),o=z("input"),u=j(),i=z("h4"),x=V("Modifier"),k=j(),m=z("input"),v=j(),b=z("select"),E=z("option"),c=V("preset");for(let L=0;L<q.length;L+=1)q[L].c();h=j(),p=z("h4"),g=V("Random Seed"),w=j(),y=z("input"),_=j(),S=z("button"),D=V("Random"),R=j(),X=z("h4"),Q=V("Sample Steps"),Z=j(),$=z("div"),H=z("input"),Ee=j(),te=z("label"),ye=V(l[2]),this.h()},l(L){e=C(L,"FORM",{});var B=O(e);t=C(B,"H4",{class:!0});var U=O(t);r=F(U,"Prompt"),U.forEach(I),a=A(B),o=C(B,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),u=A(B),i=C(B,"H4",{class:!0});var ve=O(i);x=F(ve,"Modifier"),ve.forEach(I),k=A(B),m=C(B,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),v=A(B),b=C(B,"SELECT",{name:!0,class:!0});var Se=O(b);E=C(Se,"OPTION",{});var Ve=O(E);c=F(Ve,"preset"),Ve.forEach(I);for(let Pe=0;Pe<q.length;Pe+=1)q[Pe].l(Se);Se.forEach(I),h=A(B),p=C(B,"H4",{class:!0});var Fe=O(p);g=F(Fe,"Random Seed"),Fe.forEach(I),w=A(B),y=C(B,"INPUT",{type:!0,name:!0,placeholder:!0,class:!0}),_=A(B),S=C(B,"BUTTON",{class:!0});var He=O(S);D=F(He,"Random"),He.forEach(I),R=A(B),X=C(B,"H4",{class:!0});var Ge=O(X);Q=F(Ge,"Sample Steps"),Ge.forEach(I),Z=A(B),$=C(B,"DIV",{class:!0});var we=O($);H=C(we,"INPUT",{type:!0,name:!0,min:!0,max:!0,step:!0,class:!0}),Ee=A(we),te=C(we,"LABEL",{class:!0,for:!0});var qe=O(te);ye=F(qe,l[2]),qe.forEach(I),we.forEach(I),B.forEach(I),this.h()},h(){n(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(o,"name","prompt"),n(o,"placeholder","Aerial view of ..., France."),o.disabled=s=l[5]===!0,$e(o,"width","500px"),n(o,"class","svelte-7to72y"),n(i,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(m,"name","modifier"),n(m,"placeholder","High resolution satellite image"),m.disabled=M=l[5]===!0,$e(m,"width","500px"),n(m,"class","svelte-7to72y"),E.disabled=!0,E.selected=!0,E.__value="preset",E.value=E.__value,n(b,"name","presets"),b.disabled=f=l[5]===!0,n(b,"class","svelte-7to72y"),n(p,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(y,"type","Number"),n(y,"name","seed"),n(y,"placeholder","Integer Seed"),y.disabled=P=l[5]===!0,n(y,"class","svelte-7to72y"),S.disabled=T=l[5]===!0,n(S,"class","svelte-7to72y"),n(X,"class","font-bold mt-6 mb-2 my-6 leading-6"),n(H,"type","range"),n(H,"name","steps"),n(H,"min","10"),n(H,"max","30"),n(H,"step","1"),H.disabled=be=l[5]===!0,n(H,"class","svelte-7to72y"),n(te,"class","pl-2 svelte-7to72y"),n(te,"for","steps"),n($,"class","flex")},m(L,B){Y(L,e,B),d(e,t),d(t,r),d(e,a),d(e,o),W(o,l[3]),d(e,u),d(e,i),d(i,x),d(e,k),d(e,m),W(m,l[4]),d(e,v),d(e,b),d(b,E),d(E,c);for(let U=0;U<q.length;U+=1)q[U].m(b,null);d(e,h),d(e,p),d(p,g),d(e,w),d(e,y),W(y,l[1]),d(e,_),d(e,S),d(S,D),d(e,R),d(e,X),d(X,Q),d(e,Z),d(e,$),d($,H),W(H,l[2]),d($,Ee),d($,te),d(te,ye),l[13](e),Ie||(Ue=[N(o,"input",l[7]),N(m,"input",l[8]),N(b,"change",l[9]),N(y,"input",l[10]),N(S,"click",_e(l[11])),N(H,"change",l[12]),N(H,"input",l[12]),N(e,"input",l[6])],Ie=!0)},p(L,[B]){if(B&32&&s!==(s=L[5]===!0)&&(o.disabled=s),B&8&&o.value!==L[3]&&W(o,L[3]),B&32&&M!==(M=L[5]===!0)&&(m.disabled=M),B&16&&m.value!==L[4]&&W(m,L[4]),B&0){ae=Oe;let U;for(U=0;U<ae.length;U+=1){const ve=Ze(L,ae,U);q[U]?q[U].p(ve,B):(q[U]=Qe(ve),q[U].c(),q[U].m(b,null))}for(;U<q.length;U+=1)q[U].d(1);q.length=ae.length}B&32&&f!==(f=L[5]===!0)&&(b.disabled=f),B&32&&P!==(P=L[5]===!0)&&(y.disabled=P),B&2&&W(y,L[1]),B&32&&T!==(T=L[5]===!0)&&(S.disabled=T),B&32&&be!==(be=L[5]===!0)&&(H.disabled=be),B&4&&W(H,L[2]),B&4&&Le(ye,L[2])},i:J,o:J,d(L){L&&I(e),De(q,L),l[13](null),Ie=!1,Ne(Ue)}}}function yt(l,e,t){let r,a;G(l,Ae,h=>t(14,r=h)),G(l,fe,h=>t(5,a=h));function o(){const h=s.elements;K(Ae,r={prompt:h.prompt.value,modifier:h.modifier.value,seed:BigInt(h.seed.value),steps:parseInt(h.steps.value)},r)}let s,u=r.seed,i=r.steps,x=r.prompt,k=r.modifier;function m(){x=this.value,t(3,x)}function M(){k=this.value,t(4,k)}const v=h=>{t(4,k=h.currentTarget.value)};function b(){u=this.value,t(1,u)}const E=()=>{t(1,u=st()),o()};function c(){i=ct(this.value),t(2,i)}function f(h){Ce[h?"unshift":"push"](()=>{s=h,t(0,s)})}return[s,u,i,x,k,a,o,m,M,v,b,E,c,f]}class wt extends re{constructor(e){super(),le(this,e,yt,bt,oe,{})}}let _t=(l=21)=>crypto.getRandomValues(new Uint8Array(l)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var xt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function kt(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var it={exports:{}};(function(l,e){(function(t,r){l.exports=r()})(typeof self!="undefined"?self:xt,function(){return function(t){var r={};function a(o){if(r[o])return r[o].exports;var s=r[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=t,a.c=r,a.d=function(o,s,u){a.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:u})},a.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,s){if(1&s&&(o=a(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var i in o)a.d(u,i,function(x){return o[x]}.bind(null,i));return u},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,"a",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p="",a(a.s=0)}([function(t,r,a){function o(v,b){return function(E){if(Array.isArray(E))return E}(v)||function(E,c){if(Symbol.iterator in Object(E)||Object.prototype.toString.call(E)==="[object Arguments]"){var f=[],h=!0,p=!1,g=void 0;try{for(var w,y=E[Symbol.iterator]();!(h=(w=y.next()).done)&&(f.push(w.value),!c||f.length!==c);h=!0);}catch(P){p=!0,g=P}finally{try{h||y.return==null||y.return()}finally{if(p)throw g}}return f}}(v,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(v){return function(b){if(Array.isArray(b)){for(var E=0,c=new Array(b.length);E<b.length;E++)c[E]=b[E];return c}}(v)||function(b){if(Symbol.iterator in Object(b)||Object.prototype.toString.call(b)==="[object Arguments]")return Array.from(b)}(v)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(v,b){for(var E=0;E<b.length;E++){var c=b[E];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(v,c.key,c)}}a.r(r);var i=/^#?[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}$/,x=/^rgb\((\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3}(\s+)?\)$/,k=function(){function v(){(function(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")})(this,v),this.canvases={}}var b,E;return b=v,(E=[{key:"parseColor",value:function(c){var f=i.test(c),h=x.test(c);if(!f&&!h)throw new Error("Color is not correct format. #123123 or rgb(123, 123, 123) format required.");if(f){var p=c[0]==="#"?c.slice(1):c;return p=p.length===3?p.split("").reduce(function(_,S){return[].concat(s(_),[S,S])},[]).join(""):p,{r:parseInt(p.slice(0,2),16),g:parseInt(p.slice(2,4),16),b:parseInt(p.slice(4,6),16)}}if(h){var g=o(c.replace(/rgb|\s+|\(|\)/g,"").split(",").map(function(_){return parseInt(_)}),3),w=g[0],y=g[1],P=g[2];return{r:w=w>255?255:w,g:y=y>255?255:y,b:P=P>255?255:P}}}},{key:"make",value:function(c){var f=c.size,h=c.color;try{f*=window.devicePixelRatio;var p=this.parseColor(h),g=JSON.stringify(p);if(this.canvases[g]=this.canvases[g]||{},this.canvases[g][f]!=null)return this.canvases[g][f];var w=document.createElement("canvas");f+=f%2,w.width=f,w.height=f;for(var y=w.getContext("2d"),P=y.createImageData(f,f),_=0;_<P.data.length;_+=4)P.data[_]=255,P.data[_+1]=255,P.data[_+2]=255,P.data[_+3]=0;return this.plotCircle(2*f,4*f*(f/2),f/2,P,f,p),this.fillCircle(P,p),y.putImageData(P,0,0),this.canvases[g][f]=w,w}catch(S){console.error(S)}}},{key:"plotCircle",value:function(c,f,h,p,g,w){var y=-h,P=0,_=2-2*h;do{var S=c-4*(y+1)+(f+4*g*(P-1));p.data[S+0]=w.r,p.data[S+1]=w.g,p.data[S+2]=w.b,p.data[S+3]=255;var D=c-P*(4*g)+(f-4*(y+1));p.data[D+0]=w.r,p.data[D+1]=w.g,p.data[D+2]=w.b,p.data[D+3]=255;var T=c+4*y+(f-P*(4*g));p.data[T+0]=w.r,p.data[T+1]=w.g,p.data[T+2]=w.b,p.data[T+3]=255;var R=c+4*g*(P-1)+(f+4*y);p.data[R+0]=w.r,p.data[R+1]=w.g,p.data[R+2]=w.b,p.data[R+3]=255,(h=_)<=P&&(_+=2*++P+1),(h>y||_>P)&&(_+=2*++y+1)}while(y<0)}},{key:"fillCircle",value:function(c,f){for(var h=4*c.width,p=1;p<c.height-1;p+=1)for(var g=!1,w=!1,y=!1,P=0;P<h;P+=4){var _=h*p+P,S=c.data[_+3],D=S===255;D&&!g?g=!0:S===0&&g?w=!0:D&&g&&w&&(y=!0),g&&w&&!y&&(c.data[_]=f.r,c.data[_+1]=f.g,c.data[_+2]=f.b,c.data[_+3]=255)}}}])&&u(b.prototype,E),v}();function m(v,b){for(var E=0;E<b.length;E++){var c=b[E];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(v,c.key,c)}}var M=function(){function v(c){(function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")})(this,v),this.canvas=c,this.context=c.getContext("2d"),this.stampMaker=new k,this.configPixelRatio()}var b,E;return b=v,(E=[{key:"configPixelRatio",value:function(){var c=this.canvas,f=c.width,h=c.height;this.canvas.width=f*this.dpr,this.canvas.height=h*this.dpr,this.canvas.style.width="".concat(f,"px"),this.canvas.style.height="".concat(h,"px"),this.context.scale(this.dpr,this.dpr),this.context.imageSmoothingEnabled=!1}},{key:"exportAsPNG",value:function(c){var f=this;return new Promise(function(h){var p=document.createElement("canvas"),g=p.getContext("2d"),w=f.canvas,y=w.width,P=w.height,_=y/f.dpr,S=P/f.dpr;p.width=_,p.height=S,g.imageSmoothingEnabled=!1,g.drawImage(f.canvas,0,0,y,P,0,0,_,S),p.toBlob(function(D){D.lastModifedDate=new Date,D.name=c,h(D)})})}},{key:"distanceBetween",value:function(c,f){return Math.sqrt(Math.pow(f.x-c.x,2)+Math.pow(f.y-c.y,2))}},{key:"angleBetween",value:function(c,f){return Math.atan2(f.x-c.x,f.y-c.y)}},{key:"draw",value:function(c){var f=c.from,h=c.to,p=c.size,g=c.color;this.context.globalCompositeOperation="source-over",this.brush({from:f,to:h,size:p,color:g})}},{key:"erase",value:function(c){var f=c.from,h=c.to,p=c.size;this.context.globalCompositeOperation="destination-out",this.brush({from:f,to:h,size:p,color:"#000000"})}},{key:"brush",value:function(c){var f=this,h=c.from,p=c.to,g=c.size,w=c.color,y=(g-g%2)/2,P=this.stampMaker.make({size:g,color:w});if(h.x!==p.x||h.y!==p.y)for(var _=this.distanceBetween(h,p),S=this.angleBetween(h,p),D=function(Q){var Z=h.x+Math.sin(S)*Q-y,$=h.y+Math.cos(S)*Q-y;window.requestAnimationFrame(function(){f.context.drawImage(P,Math.round(Z),Math.round($),g,g)})},T=0;T<_;T+=1)D(T);else{var R=h.x-y,X=h.y-y;this.context.drawImage(P,Math.round(R),Math.round(X),g,g)}}},{key:"dpr",get:function(){return window.devicePixelRatio||1}}])&&m(b.prototype,E),v}();r.default=M}])})})(it);var We=kt(it.exports);function Et(l){let e,t;return{c(){e=de("svg"),t=de("path"),this.h()},l(r){e=he(r,"svg",{xmlns:!0,width:!0,viewBox:!0,class:!0});var a=O(e);t=he(a,"path",{fill:!0,stroke:!0,"stroke-width":!0,d:!0}),O(t).forEach(I),a.forEach(I),this.h()},h(){n(t,"fill","white"),n(t,"stroke","black"),n(t,"stroke-width","30"),n(t,"d","M480 256c0 123.4-100.5 223.9-223.9 223.9c-48.84 0-95.17-15.58-134.2-44.86c-14.12-10.59-16.97-30.66-6.375-44.81c10.59-14.12 30.62-16.94 44.81-6.375c27.84 20.91 61 31.94 95.88 31.94C344.3 415.8 416 344.1 416 256s-71.69-159.8-159.8-159.8c-37.46 0-73.09 13.49-101.3 36.64l45.12 45.14c17.01 17.02 4.955 46.1-19.1 46.1H35.17C24.58 224.1 16 215.5 16 204.9V59.04c0-24.04 29.07-36.08 46.07-19.07l47.6 47.63C149.9 52.71 201.5 32.11 256.1 32.11C379.5 32.11 480 132.6 480 256z"),n(e,"xmlns","http://www.w3.org/2000/svg"),n(e,"width","20"),n(e,"viewBox","0 0 512 512"),n(e,"class",l[0])},m(r,a){Y(r,e,a),d(e,t)},p(r,[a]){a&1&&n(e,"class",r[0])},i:J,o:J,d(r){r&&I(e)}}}function It(l,e,t){let{classNames:r=""}=e;return l.$$set=a=>{"classNames"in a&&t(0,r=a.classNames)},[r]}class St extends re{constructor(e){super(),le(this,e,It,Et,oe,{classNames:0})}}function Pt(l){var f;let e,t,r,a,o,s,u,i=((f=l[0])==null?void 0:f.label)+"",x,k,m,M,v,b,E,c;return M=new St({}),{c(){e=z("div"),t=z("div"),r=z("canvas"),a=j(),o=z("canvas"),s=j(),u=z("span"),x=V(i),k=j(),m=z("button"),se(M.$$.fragment),this.h()},l(h){e=C(h,"DIV",{});var p=O(e);t=C(p,"DIV",{class:!0});var g=O(t);r=C(g,"CANVAS",{class:!0,width:!0,height:!0}),O(r).forEach(I),a=A(g),o=C(g,"CANVAS",{class:!0,width:!0,height:!0}),O(o).forEach(I),s=A(g),u=C(g,"SPAN",{class:!0});var w=O(u);x=F(w,i),w.forEach(I),k=A(g),m=C(g,"BUTTON",{class:!0});var y=O(m);ne(M.$$.fragment,y),y.forEach(I),g.forEach(I),p.forEach(I),this.h()},h(){n(r,"class","canvas svelte-vhujxn"),n(r,"width","512"),n(r,"height","512"),n(o,"class","brush svelte-vhujxn"),n(o,"width","10"),n(o,"height","10"),n(u,"class","label svelte-vhujxn"),n(m,"class","absolute bottom-0 left-0 p-3"),m.disabled=v=l[3].size<=0,n(t,"class","relative overflow-clip")},m(h,p){Y(h,e,p),d(e,t),d(t,r),l[11](r),d(t,a),d(t,o),l[12](o),d(t,s),d(t,u),d(u,x),d(t,k),d(t,m),ie(M,m,null),b=!0,E||(c=[N(r,"touchmove",zt),N(r,"pointerenter",Mt),N(r,"pointerup",l[4]),N(r,"pointerleave",l[4]),N(r,"pointercancel",l[4]),N(r,"pointerout",l[4]),N(r,"pointermove",l[6]),N(r,"pointerdown",l[5]),N(m,"click",_e(l[13]))],E=!0)},p(h,[p]){var g;(!b||p&1)&&i!==(i=((g=h[0])==null?void 0:g.label)+"")&&Le(x,i),(!b||p&8&&v!==(v=h[3].size<=0))&&(m.disabled=v)},i(h){b||(ce(M.$$.fragment,h),b=!0)},o(h){ue(M.$$.fragment,h),b=!1},d(h){h&&I(e),l[11](null),l[12](null),pe(M),E=!1,Ne(c)}}}function Mt(){}function et(l,e){const t=l.getBoundingClientRect();return{x:(e.clientX-t.left)*(l.width/t.width),y:(e.clientY-t.top)*(l.height/t.height)}}function tt(l){l.fillStyle="#46e483",l.fillRect(0,0,l.canvas.width,l.canvas.height)}function Me(l,e){l.drawImage(e,0,0,l.canvas.width,l.canvas.height)}const zt=l=>l.preventDefault();function Ct(l,e,t){let r,a,o,s;G(l,me,_=>t(3,r=_)),G(l,je,_=>t(10,a=_)),G(l,ge,_=>t(0,o=_)),G(l,Re,_=>t(18,s=_));let u,i,x,k,m={x:0,y:0},M;ut(()=>{t(9,k=u.getContext("2d")),t(8,x=i.getContext("2d")),window.devicePixelRatio=1,M=new We(u),t(1,u.style.height="unset",u),t(1,u.style.width="unset",u),K(Re,s=u,s),tt(k)});let v=!1,b;function E(){t(2,i.style.top=`${10+o.size/2}px`,i),t(2,i.style.left=`${10+o.size/2}px`,i),v=!1}function c(_){v=!0,m=et(u,_),M.draw({from:m,to:m,size:o.size,color:o.color}),b=_t(),me.update(S=>(S.set(b,{brush:o,points:[{from:m,to:m}]}),S))}function f(_){const S=et(u,_);t(2,i.style.top=`${_.offsetY}px`,i),t(2,i.style.left=`${_.offsetX}px`,i),v&&(M.draw({from:m,to:S,size:o.size,color:o.color}),me.update(D=>{const T=D.get(b);return T==null||T.points.push({from:m,to:S}),D}),m=S)}function h(_){const{size:S,color:D}=_;t(2,i.width=S,i),t(2,i.height=S,i),t(8,x.fillStyle=D,x),x.arc(S/2,S/2,S/2,0,2*Math.PI),x.fill()}function p(){if(r.size<=0)return;const _=Array.from(r.keys());me.update(S=>(S.delete(_[_.length-1]),S)),g(k)}function g(_){const S=document.createElement("canvas");S.width=512,S.height=512,window.devicePixelRatio=1;const D=new We(S);tt(_),a&&Me(_,a),Array.from(r.values()).forEach(T=>{T.points.forEach((R,X)=>{D.draw({from:R.from,to:R.to,size:T.brush.size,color:T.brush.color})})}),requestAnimationFrame(()=>{Me(_,S)})}function w(_){Ce[_?"unshift":"push"](()=>{u=_,t(1,u)})}function y(_){Ce[_?"unshift":"push"](()=>{i=_,t(2,i),t(8,x),t(0,o)})}const P=()=>p();return l.$$.update=()=>{l.$$.dirty&257&&x&&o&&(h(o),t(2,i.style.top=`${10+o.size/2}px`,i),t(2,i.style.left=`${10+o.size/2}px`,i)),l.$$.dirty&1536&&a&&(Me(k,a),K(me,r=new Map,r))},[o,u,i,r,E,c,f,p,x,k,a,w,y,P]}class Tt extends re{constructor(e){super(),le(this,e,Ct,Pt,oe,{})}}function rt(l){let e,t,r;return{c(){e=z("img"),this.h()},l(a){e=C(a,"IMG",{class:!0,alt:!0,src:!0,width:!0,height:!0}),this.h()},h(){n(e,"class",t="image "+(l[1]?"opacity-30":"")+" svelte-1t0h0rs"),n(e,"alt","Generative Map Result"),ze(e.src,r=l[0])||n(e,"src",r),n(e,"width","512"),n(e,"height","512")},m(a,o){Y(a,e,o)},p(a,o){o&2&&t!==(t="image "+(a[1]?"opacity-30":"")+" svelte-1t0h0rs")&&n(e,"class",t),o&1&&!ze(e.src,r=a[0])&&n(e,"src",r)},d(a){a&&I(e)}}}function lt(l){let e,t,r,a,o,s;return{c(){e=z("div"),t=de("svg"),r=de("path"),a=j(),o=z("span"),s=V(ot),this.h()},l(u){e=C(u,"DIV",{class:!0});var i=O(e);t=he(i,"svg",{xmlns:!0,fill:!0,viewBox:!0,class:!0});var x=O(t);r=he(x,"path",{fill:!0,d:!0}),O(r).forEach(I),x.forEach(I),a=A(i),o=C(i,"SPAN",{class:!0});var k=O(o);s=F(k,ot),k.forEach(I),i.forEach(I),this.h()},h(){n(r,"fill","currentColor"),n(r,"d","M20 12a8 8 0 0 1-8 8v4a12 12 0 0 0 12-12h-4Zm-2-5.3a8 8 0 0 1 2 5.3h4c0-3-1.1-5.8-3-8l-3 2.7Z"),n(t,"xmlns","http://www.w3.org/2000/svg"),n(t,"fill","none"),n(t,"viewBox","0 0 24 24"),n(t,"class","animate-spin max-w-[3rem]"),n(o,"class","text-xs"),n(e,"class","loading svelte-1t0h0rs")},m(u,i){Y(u,e,i),d(e,t),d(t,r),d(e,a),d(e,o),d(o,s)},p:J,d(u){u&&I(e)}}}function Ot(l){let e,t,r=l[0]&&rt(l),a=l[1]&<();return{c(){e=z("div"),r&&r.c(),t=j(),a&&a.c(),this.h()},l(o){e=C(o,"DIV",{class:!0});var s=O(e);r&&r.l(s),t=A(s),a&&a.l(s),s.forEach(I),this.h()},h(){n(e,"class","relative overflow-clip flex flex-col justify-center items-center w-full h-full")},m(o,s){Y(o,e,s),r&&r.m(e,null),d(e,t),a&&a.m(e,null)},p(o,[s]){o[0]?r?r.p(o,s):(r=rt(o),r.c(),r.m(e,t)):r&&(r.d(1),r=null),o[1]?a?a.p(o,s):(a=lt(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:J,o:J,d(o){o&&I(e),r&&r.d(),a&&a.d()}}}let ot="";async function Bt(l){return new Promise((e,t)=>{try{const r=document.createElement("a");r.download=`sucess-${Date.now()}.png`,r.target="_self",r.onclick=async a=>{r.href&&URL.revokeObjectURL(r.href),r.href=l},requestAnimationFrame(()=>{console.log("Downloading image."),r.click(),e(null)})}catch{t()}})}async function Rt(l,{prompt:e,modifier:t,steps:r,seed:a}){const o=await fetch("/predict",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:[l,e+". "+t,r,a.toString()]})});if(!o.ok)throw new Error("Prediction request failed.");return await o.text()}function jt(l,e,t){let r,a,o,s,u;return G(l,ke,i=>t(2,r=i)),G(l,Be,i=>t(0,a=i)),G(l,fe,i=>t(1,o=i)),G(l,Ae,i=>t(3,s=i)),G(l,Re,i=>t(4,u=i)),l.$$.update=()=>{l.$$.dirty&26&&(async()=>{if(o){const i=await Rt(u.toDataURL(),s);K(Be,a=i,a),K(fe,o=!1,o)}})(),l.$$.dirty&5&&(async()=>r&&(await Bt(a),K(ke,r=!1,r)))()},[a,o,r,s,u]}class At extends re{constructor(e){super(),le(this,e,jt,Ot,oe,{})}}function Dt(l){let e,t,r,a,o,s,u,i,x,k,m,M,v,b,E,c,f,h,p,g,w,y,P,_,S,D;return s=new gt({}),x=new Tt({}),m=new At({}),w=new ft({}),P=new wt({}),{c(){e=z("div"),t=z("article"),r=z("h1"),a=V("Drawing to Map"),o=j(),se(s.$$.fragment),u=j(),i=z("div"),se(x.$$.fragment),k=j(),se(m.$$.fragment),M=j(),v=z("button"),b=V("Generate Map"),c=j(),f=z("button"),h=V("Save Result"),g=j(),se(w.$$.fragment),y=j(),se(P.$$.fragment),this.h()},l(T){e=C(T,"DIV",{class:!0});var R=O(e);t=C(R,"ARTICLE",{class:!0});var X=O(t);r=C(X,"H1",{});var Q=O(r);a=F(Q,"Drawing to Map"),Q.forEach(I),X.forEach(I),o=A(R),ne(s.$$.fragment,R),u=A(R),i=C(R,"DIV",{class:!0});var Z=O(i);ne(x.$$.fragment,Z),k=A(Z),ne(m.$$.fragment,Z),Z.forEach(I),M=A(R),v=C(R,"BUTTON",{class:!0});var $=O(v);b=F($,"Generate Map"),$.forEach(I),c=A(R),f=C(R,"BUTTON",{class:!0});var H=O(f);h=F(H,"Save Result"),H.forEach(I),g=A(R),ne(w.$$.fragment,R),y=A(R),ne(P.$$.fragment,R),R.forEach(I),this.h()},h(){n(t,"class","prose"),n(i,"class","drawings py-3 -mx-3 svelte-1sy339h"),v.disabled=E=l[0]===!0,n(v,"class","green svelte-1sy339h"),f.disabled=p=l[1]===!0||!l[2],n(f,"class","svelte-1sy339h"),n(e,"class","max-w-screen-md mx-auto px-3 py-5 relative z-0")},m(T,R){Y(T,e,R),d(e,t),d(t,r),d(r,a),d(e,o),ie(s,e,null),d(e,u),d(e,i),ie(x,i,null),d(i,k),ie(m,i,null),d(e,M),d(e,v),d(v,b),d(e,c),d(e,f),d(f,h),d(e,g),ie(w,e,null),d(e,y),ie(P,e,null),_=!0,S||(D=[N(v,"click",_e(l[3])),N(f,"click",_e(l[4]))],S=!0)},p(T,[R]){(!_||R&1&&E!==(E=T[0]===!0))&&(v.disabled=E),(!_||R&6&&p!==(p=T[1]===!0||!T[2]))&&(f.disabled=p)},i(T){_||(ce(s.$$.fragment,T),ce(x.$$.fragment,T),ce(m.$$.fragment,T),ce(w.$$.fragment,T),ce(P.$$.fragment,T),_=!0)},o(T){ue(s.$$.fragment,T),ue(x.$$.fragment,T),ue(m.$$.fragment,T),ue(w.$$.fragment,T),ue(P.$$.fragment,T),_=!1},d(T){T&&I(e),pe(s),pe(x),pe(m),pe(w),pe(P),S=!1,Ne(D)}}}function Lt(l,e,t){let r,a,o;return G(l,fe,i=>t(0,r=i)),G(l,ke,i=>t(1,a=i)),G(l,Be,i=>t(2,o=i)),[r,a,o,()=>K(fe,r=!0,r),()=>K(ke,a=!0,a)]}class Vt extends re{constructor(e){super(),le(this,e,Lt,Dt,oe,{})}}export{Vt as default};
|
frontend/.svelte-kit/output/client/_app/immutable/{start-c2693518.js β start-db9f32c4.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{S as Ye,i as Ge,s as Me,e as Fe,c as Xe,a as He,d as D,b as me,f as K,g as V,t as Ze,h as Qe,j as et,k as tt,l as P,m as nt,n as Y,o as C,p as G,q as T,r as st,u as rt,v as ye,w as z,x as ne,y as q,z as se,A as re,B as J,C as ie,D as Ce}from"./chunks/index-bcf2726a.js";import{s as it,w as ce,a as at}from"./chunks/paths-d3bcbd10.js";function ot(s){let e,t,i;const l=[s[1]||{}];var c=s[0][0];function f(n){let r={};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&2?se(l,[re(n[1]||{})]):{};if(c!==(c=n[0][0])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f()),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function ct(s){let e,t,i;const l=[s[1]||{}];var c=s[0][0];function f(n){let r={$$slots:{default:[dt]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f(s))),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&2?se(l,[re(n[1]||{})]):{};if(r&525&&(a.$$scope={dirty:r,ctx:n}),c!==(c=n[0][0])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f(n)),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function lt(s){let e,t,i;const l=[s[2]||{}];var c=s[0][1];function f(n){let r={};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&4?se(l,[re(n[2]||{})]):{};if(c!==(c=n[0][1])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f()),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function ft(s){let e,t,i;const l=[s[2]||{}];var c=s[0][1];function f(n){let r={$$slots:{default:[ut]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f(s))),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&4?se(l,[re(n[2]||{})]):{};if(r&521&&(a.$$scope={dirty:r,ctx:n}),c!==(c=n[0][1])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f(n)),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function ut(s){let e,t,i;const l=[s[3]||{}];var c=s[0][2];function f(n){let r={};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&8?se(l,[re(n[3]||{})]):{};if(c!==(c=n[0][2])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f()),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function dt(s){let e,t,i,l;const c=[ft,lt],f=[];function n(r,a){return r[0][2]?0:1}return e=n(s),t=f[e]=c[e](s),{c(){t.c(),i=P()},l(r){t.l(r),i=P()},m(r,a){f[e].m(r,a),V(r,i,a),l=!0},p(r,a){let d=e;e=n(r),e===d?f[e].p(r,a):(Y(),C(f[d],1,1,()=>{f[d]=null}),G(),t=f[e],t?t.p(r,a):(t=f[e]=c[e](r),t.c()),T(t,1),t.m(i.parentNode,i))},i(r){l||(T(t),l=!0)},o(r){C(t),l=!1},d(r){f[e].d(r),r&&D(i)}}}function Te(s){let e,t=s[5]&&je(s);return{c(){e=Fe("div"),t&&t.c(),this.h()},l(i){e=Xe(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=He(e);t&&t.l(l),l.forEach(D),this.h()},h(){me(e,"id","svelte-announcer"),me(e,"aria-live","assertive"),me(e,"aria-atomic","true"),K(e,"position","absolute"),K(e,"left","0"),K(e,"top","0"),K(e,"clip","rect(0 0 0 0)"),K(e,"clip-path","inset(50%)"),K(e,"overflow","hidden"),K(e,"white-space","nowrap"),K(e,"width","1px"),K(e,"height","1px")},m(i,l){V(i,e,l),t&&t.m(e,null)},p(i,l){i[5]?t?t.p(i,l):(t=je(i),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(i){i&&D(e),t&&t.d()}}}function je(s){let e;return{c(){e=Ze(s[6])},l(t){e=Qe(t,s[6])},m(t,i){V(t,e,i)},p(t,i){i&64&&et(e,t[6])},d(t){t&&D(e)}}}function pt(s){let e,t,i,l,c;const f=[ct,ot],n=[];function r(d,L){return d[0][1]?0:1}e=r(s),t=n[e]=f[e](s);let a=s[4]&&Te(s);return{c(){t.c(),i=tt(),a&&a.c(),l=P()},l(d){t.l(d),i=nt(d),a&&a.l(d),l=P()},m(d,L){n[e].m(d,L),V(d,i,L),a&&a.m(d,L),V(d,l,L),c=!0},p(d,[L]){let E=e;e=r(d),e===E?n[e].p(d,L):(Y(),C(n[E],1,1,()=>{n[E]=null}),G(),t=n[e],t?t.p(d,L):(t=n[e]=f[e](d),t.c()),T(t,1),t.m(i.parentNode,i)),d[4]?a?a.p(d,L):(a=Te(d),a.c(),a.m(l.parentNode,l)):a&&(a.d(1),a=null)},i(d){c||(T(t),c=!0)},o(d){C(t),c=!1},d(d){n[e].d(d),d&&D(i),a&&a.d(d),d&&D(l)}}}function ht(s,e,t){let{stores:i}=e,{page:l}=e,{components:c}=e,{props_0:f=null}=e,{props_1:n=null}=e,{props_2:r=null}=e;st("__svelte__",i),rt(i.page.notify);let a=!1,d=!1,L=null;return ye(()=>{const E=i.page.subscribe(()=>{a&&(t(5,d=!0),t(6,L=document.title||"untitled page"))});return t(4,a=!0),E}),s.$$set=E=>{"stores"in E&&t(7,i=E.stores),"page"in E&&t(8,l=E.page),"components"in E&&t(0,c=E.components),"props_0"in E&&t(1,f=E.props_0),"props_1"in E&&t(2,n=E.props_1),"props_2"in E&&t(3,r=E.props_2)},s.$$.update=()=>{s.$$.dirty&384&&i.page.set(l)},[c,f,n,r,a,d,L,i,l]}class _t extends Ye{constructor(e){super(),Ge(this,e,ht,pt,Me,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const mt="modulepreload",Ie={},gt="/static/_app/immutable/",ge=function(e,t){return!t||t.length===0?e():Promise.all(t.map(i=>{if(i=`${gt}${i}`,i in Ie)return;Ie[i]=!0;const l=i.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${c}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":mt,l||(f.as="script",f.crossOrigin=""),f.href=i,document.head.appendChild(f),l)return new Promise((n,r)=>{f.addEventListener("load",n),f.addEventListener("error",()=>r(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},wt={},le=[()=>ge(()=>import("./pages/__layout.svelte-f5a1b718.js"),["pages/__layout.svelte-f5a1b718.js","assets/pages/__layout.svelte-b67cf61d.css","chunks/index-bcf2726a.js"]),()=>ge(()=>import("./error.svelte-d9523301.js"),["error.svelte-d9523301.js","chunks/index-bcf2726a.js"]),()=>ge(()=>import("./pages/index.svelte-82e07def.js"),["pages/index.svelte-82e07def.js","assets/pages/index.svelte-f2b33456.css","chunks/index-bcf2726a.js","chunks/paths-d3bcbd10.js"])],bt={"":[[0,2],[1]]};function yt(s){s.client}function De(s){return s instanceof Error||s&&s.name&&s.message?s:new Error(JSON.stringify(s))}function Ve(s){if(s.fallthrough)throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");if("maxage"in s)throw new Error("maxage should be replaced with cache: { maxage }");const e=s.status&&s.status>=400&&s.status<=599&&!s.redirect;if(s.error||e){const t=s.status;if(!s.error&&e)return{status:t||500,error:new Error};const i=typeof s.error=="string"?new Error(s.error):s.error;return i instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:i}):{status:t,error:i}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof i}"`)}}if(s.redirect){if(!s.status||Math.floor(s.status/100)!==3)throw new Error('"redirect" property returned from load() must be accompanied by a 3xx status code');if(typeof s.redirect!="string")throw new Error('"redirect" property returned from load() must be a string')}if(s.dependencies&&(!Array.isArray(s.dependencies)||s.dependencies.some(t=>typeof t!="string")))throw new Error('"dependencies" property returned from load() must be of type string[]');if(s.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return s}function vt(s,e){return s==="/"||e==="ignore"?s:e==="never"?s.endsWith("/")?s.slice(0,-1):s:e==="always"&&!s.endsWith("/")?s+"/":s}class $t extends URL{get hash(){throw new Error("url.hash is inaccessible from load. Consider accessing hash from the page store within the script tag of your component.")}}function ze(s){let e=s.baseURI;if(!e){const t=s.getElementsByTagName("base");e=t.length?t[0].href:s.URL}return e}function ve(){return{x:pageXOffset,y:pageYOffset}}function qe(s){return s.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function Je(s){return s instanceof SVGAElement?new URL(s.href.baseVal,document.baseURI):new URL(s.href)}function Ke(s){const e=ce(s);let t=!0;function i(){t=!0,e.update(f=>f)}function l(f){t=!1,e.set(f)}function c(f){let n;return e.subscribe(r=>{(n===void 0||t&&r!==n)&&f(n=r)})}return{notify:i,set:l,subscribe:c}}function kt(){const{set:s,subscribe:e}=ce(!1),t="1685756693253";let i;async function l(){clearTimeout(i);const f=await fetch(`${at}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(f.ok){const{version:n}=await f.json(),r=n!==t;return r&&(s(!0),clearTimeout(i)),r}else throw new Error(`Version check failed: ${f.status}`)}return{subscribe:e,check:l}}function Et(s){let e=5381,t=s.length;if(typeof s=="string")for(;t;)e=e*33^s.charCodeAt(--t);else for(;t;)e=e*33^s[--t];return(e>>>0).toString(36)}const $e=window.fetch;function Rt(s,e){let i=`script[sveltekit\\:data-type="data"][sveltekit\\:data-url=${JSON.stringify(typeof s=="string"?s:s.url)}]`;e&&typeof e.body=="string"&&(i+=`[sveltekit\\:data-body="${Et(e.body)}"]`);const l=document.querySelector(i);if(l&&l.textContent){const{body:c,...f}=JSON.parse(l.textContent);return Promise.resolve(new Response(c,f))}return $e(s,e)}const Lt=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function St(s){const e=[],t=[];let i=!0;return{pattern:s===""?/^\/$/:new RegExp(`^${decodeURIComponent(s).split(/(?:@[a-zA-Z0-9_-]+)?(?:\/|$)/).map((c,f,n)=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(c);if(r)return e.push(r[1]),t.push(r[2]),"(?:/(.*))?";const a=f===n.length-1;return c&&"/"+c.split(/\[(.+?)\]/).map((d,L)=>{if(L%2){const[,E,X,M]=Lt.exec(d);return e.push(X),t.push(M),E?"(.*?)":"([^/]+?)"}return a&&d.includes(".")&&(i=!1),d.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${i?"/?":""}$`),names:e,types:t}}function Ut(s,e,t,i){const l={};for(let c=0;c<e.length;c+=1){const f=e[c],n=t[c],r=s[c+1]||"";if(n){const a=i[n];if(!a)throw new Error(`Missing "${n}" param matcher`);if(!a(r))return}l[f]=r}return l}function At(s,e,t){return Object.entries(e).map(([l,[c,f,n]])=>{const{pattern:r,names:a,types:d}=St(l);return{id:l,exec:L=>{const E=r.exec(L);if(E)return Ut(E,a,d,t)},a:c.map(L=>s[L]),b:f.map(L=>s[L]),has_shadow:!!n}})}const We="sveltekit:scroll",B="sveltekit:index",we=At(le,bt,wt),Nt=le[0](),Ot=le[1](),Be={};let te={};try{te=JSON.parse(sessionStorage[We])}catch{}function be(s){te[s]=ve()}function xt({target:s,session:e,base:t,trailing_slash:i}){var xe;const l=new Map,c=[],f={url:Ke({}),page:Ke({}),navigating:ce(null),session:ce(e),updated:kt()},n={id:null,promise:null},r={before_navigate:[],after_navigate:[]};let a={branch:[],error:null,session_id:0,stuff:Be,url:null},d=!1,L=!0,E=!1,X=1,M=null,ke,Ee,Re=!1;f.session.subscribe(async o=>{Ee=o,Re&&(X+=1,pe(new URL(location.href),[],!0))}),Re=!0;let F=!0,j=(xe=history.state)==null?void 0:xe[B];j||(j=Date.now(),history.replaceState({...history.state,[B]:j},"",location.href));const fe=te[j];fe&&(history.scrollRestoration="manual",scrollTo(fe.x,fe.y));let ue=!1,de,Le;async function Se(o,{noscroll:p=!1,replaceState:w=!1,keepfocus:u=!1,state:h={}},b){if(typeof o=="string"&&(o=new URL(o,ze(document))),F)return _e({url:o,scroll:p?ve():null,keepfocus:u,redirect_chain:b,details:{state:h,replaceState:w},accepted:()=>{},blocked:()=>{}});await Q(o)}async function Ue(o){const p=Oe(o);if(!p)throw new Error("Attempted to prefetch a URL that does not belong to this app");return n.promise=Ne(p,!1),n.id=p.id,n.promise}async function pe(o,p,w,u,h){var R,S,N;const b=Oe(o),v=Le={};let _=b&&await Ne(b,w);if(!_&&o.origin===location.origin&&o.pathname===location.pathname&&(_=await Z({status:404,error:new Error(`Not found: ${o.pathname}`),url:o,routeId:null})),!_)return await Q(o),!1;if(Le!==v)return!1;if(c.length=0,_.redirect)if(p.length>10||p.includes(o.pathname))_=await Z({status:500,error:new Error("Redirect loop"),url:o,routeId:null});else return F?Se(new URL(_.redirect,o).href,{},[...p,o.pathname]):await Q(new URL(_.redirect,location.href)),!1;else((S=(R=_.props)==null?void 0:R.page)==null?void 0:S.status)>=400&&await f.updated.check()&&await Q(o);if(E=!0,u&&u.details){const{details:$}=u,y=$.replaceState?0:1;$.state[B]=j+=y,history[$.replaceState?"replaceState":"pushState"]($.state,"",o)}if(d?(a=_.state,_.props.page&&(_.props.page.url=o),ke.$set(_.props)):Ae(_),u){const{scroll:$,keepfocus:y}=u;if(!y){const U=document.body,g=U.getAttribute("tabindex");(N=getSelection())==null||N.removeAllRanges(),U.tabIndex=-1,U.focus({preventScroll:!0}),g!==null?U.setAttribute("tabindex",g):U.removeAttribute("tabindex")}if(await Ce(),L){const U=o.hash&&document.getElementById(o.hash.slice(1));$?scrollTo($.x,$.y):U?U.scrollIntoView():scrollTo(0,0)}}else await Ce();n.promise=null,n.id=null,L=!0,_.props.page&&(de=_.props.page);const m=_.state.branch[_.state.branch.length-1];F=(m==null?void 0:m.module.router)!==!1,h&&h(),E=!1}function Ae(o){a=o.state;const p=document.querySelector("style[data-sveltekit]");if(p&&p.remove(),de=o.props.page,ke=new _t({target:s,props:{...o.props,stores:f},hydrate:!0}),F){const w={from:null,to:new URL(location.href)};r.after_navigate.forEach(u=>u(w))}d=!0}async function he({url:o,params:p,stuff:w,branch:u,status:h,error:b,routeId:v}){var y,U;const _=u.filter(Boolean),m=_.find(g=>{var O;return(O=g.loaded)==null?void 0:O.redirect}),R={redirect:(y=m==null?void 0:m.loaded)==null?void 0:y.redirect,state:{url:o,params:p,branch:u,error:b,stuff:w,session_id:X},props:{components:_.map(g=>g.module.default)}};for(let g=0;g<_.length;g+=1){const O=_[g].loaded;R.props[`props_${g}`]=O?await O.props:null}if(!a.url||o.href!==a.url.href||a.error!==b||a.stuff!==w){R.props.page={error:b,params:p,routeId:v,status:h,stuff:w,url:o};const g=(O,k)=>{Object.defineProperty(R.props.page,O,{get:()=>{throw new Error(`$page.${O} has been replaced by $page.url.${k}`)}})};g("origin","origin"),g("path","pathname"),g("query","searchParams")}const N=_[_.length-1],$=(U=N==null?void 0:N.loaded)==null?void 0:U.cache;if($){const g=o.pathname+o.search;let O=!1;const k=()=>{l.get(g)===R&&l.delete(g),x(),clearTimeout(A)},A=setTimeout(k,$.maxage*1e3),x=f.session.subscribe(()=>{O&&k()});O=!0,l.set(g,R)}return R}async function H({status:o,error:p,module:w,url:u,params:h,stuff:b,props:v,routeId:_}){const m={module:w,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:b};function R(y){const{href:U}=new URL(y,u);m.uses.dependencies.add(U)}v&&m.uses.dependencies.add(u.href);const S={};for(const y in h)Object.defineProperty(S,y,{get(){return m.uses.params.add(y),h[y]},enumerable:!0});const N=Ee,$=new $t(u);if(w.load){const y={routeId:_,params:S,props:v||{},get url(){return m.uses.url=!0,$},get session(){return m.uses.session=!0,N},get stuff(){return m.uses.stuff=!0,{...b}},async fetch(g,O){let k;typeof g=="string"?k=g:(k=g.url,O={body:g.method==="GET"||g.method==="HEAD"?void 0:await g.blob(),cache:g.cache,credentials:g.credentials,headers:g.headers,integrity:g.integrity,keepalive:g.keepalive,method:g.method,mode:g.mode,redirect:g.redirect,referrer:g.referrer,referrerPolicy:g.referrerPolicy,signal:g.signal,...O});const A=new URL(k,u).href;return R(A),d?$e(A,O):Rt(k,O)},status:o!=null?o:null,error:p!=null?p:null};let U;if(U=await w.load.call(null,y),!U)throw new Error("load function must return a value");m.loaded=Ve(U),m.loaded.stuff&&(m.stuff=m.loaded.stuff),m.loaded.dependencies&&m.loaded.dependencies.forEach(R)}else v&&(m.loaded=Ve({props:v}));return m}async function Ne({id:o,url:p,params:w,route:u},h){var U,g,O;if(n.id===o&&n.promise)return n.promise;if(!h){const k=l.get(o);if(k)return k}const{a:b,b:v,has_shadow:_}=u,m=a.url&&{url:o!==a.url.pathname+a.url.search,params:Object.keys(w).filter(k=>a.params[k]!==w[k]),session:X!==a.session_id};let R=[],S=Be,N=!1,$=200,y=null;b.forEach(k=>k().catch(()=>{}));e:for(let k=0;k<b.length;k+=1){let A;try{if(!b[k])continue;const x=await b[k](),I=a.branch[k];if(!I||x!==I.module||m.url&&I.uses.url||m.params.some(W=>I.uses.params.has(W))||m.session&&I.uses.session||Array.from(I.uses.dependencies).some(W=>c.some(oe=>oe(W)))||N&&I.uses.stuff){let W={};const oe=_&&k===b.length-1;if(oe){const ee=await $e(`${p.pathname}${p.pathname.endsWith("/")?"":"/"}__data.json${p.search}`,{headers:{"x-sveltekit-load":"true"}});if(ee.ok){const Pe=ee.headers.get("x-sveltekit-location");if(Pe)return{redirect:Pe,props:{},state:a};W=ee.status===204?{}:await ee.json()}else $=ee.status,y=new Error("Failed to load data")}if(y||(A=await H({module:x,url:p,params:w,props:W,stuff:S,routeId:u.id})),A&&(oe&&(A.uses.url=!0),A.loaded)){if(A.loaded.error&&($=A.loaded.status,y=A.loaded.error),A.loaded.redirect)return{redirect:A.loaded.redirect,props:{},state:a};A.loaded.stuff&&(N=!0)}}else A=I}catch(x){$=500,y=De(x)}if(y){for(;k--;)if(v[k]){let x,I,ae=k;for(;!(I=R[ae]);)ae-=1;try{if(x=await H({status:$,error:y,module:await v[k](),url:p,params:w,stuff:I.stuff,routeId:u.id}),(U=x==null?void 0:x.loaded)!=null&&U.error)continue;(g=x==null?void 0:x.loaded)!=null&&g.stuff&&(S={...S,...x.loaded.stuff}),R=R.slice(0,ae+1).concat(x);break e}catch{continue}}return await Z({status:$,error:y,url:p,routeId:u.id})}else(O=A==null?void 0:A.loaded)!=null&&O.stuff&&(S={...S,...A.loaded.stuff}),R.push(A)}return await he({url:p,params:w,stuff:S,branch:R,status:$,error:y,routeId:u.id})}async function Z({status:o,error:p,url:w,routeId:u}){var _,m;const h={},b=await H({module:await Nt,url:w,params:h,stuff:{},routeId:u}),v=await H({status:o,error:p,module:await Ot,url:w,params:h,stuff:b&&b.loaded&&b.loaded.stuff||{},routeId:u});return await he({url:w,params:h,stuff:{...(_=b==null?void 0:b.loaded)==null?void 0:_.stuff,...(m=v==null?void 0:v.loaded)==null?void 0:m.stuff},branch:[b,v],status:o,error:p,routeId:u})}function Oe(o){if(o.origin!==location.origin||!o.pathname.startsWith(t))return;const p=decodeURI(o.pathname.slice(t.length)||"/");for(const w of we){const u=w.exec(p);if(u)return{id:o.pathname+o.search,route:w,params:u,url:o}}}async function _e({url:o,scroll:p,keepfocus:w,redirect_chain:u,details:h,accepted:b,blocked:v}){const _=a.url;let m=!1;const R={from:_,to:o,cancel:()=>m=!0};if(r.before_navigate.forEach($=>$(R)),m){v();return}const S=vt(o.pathname,i),N=new URL(o.origin+S+o.search+o.hash);be(j),b(),d&&f.navigating.set({from:a.url,to:N}),await pe(N,u,!1,{scroll:p,keepfocus:w,details:h},()=>{const $={from:_,to:N};r.after_navigate.forEach(y=>y($)),f.navigating.set(null)})}function Q(o){return location.href=o.href,new Promise(()=>{})}return{after_navigate:o=>{ye(()=>(r.after_navigate.push(o),()=>{const p=r.after_navigate.indexOf(o);r.after_navigate.splice(p,1)}))},before_navigate:o=>{ye(()=>(r.before_navigate.push(o),()=>{const p=r.before_navigate.indexOf(o);r.before_navigate.splice(p,1)}))},disable_scroll_handling:()=>{(E||!d)&&(L=!1)},goto:(o,p={})=>Se(o,p,[]),invalidate:o=>{if(typeof o=="function")c.push(o);else{const{href:p}=new URL(o,location.href);c.push(w=>w===p)}return M||(M=Promise.resolve().then(async()=>{await pe(new URL(location.href),[],!0),M=null})),M},prefetch:async o=>{const p=new URL(o,ze(document));await Ue(p)},prefetch_routes:async o=>{const w=(o?we.filter(u=>o.some(h=>u.exec(h))):we).map(u=>Promise.all(u.a.map(h=>h())));await Promise.all(w)},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",u=>{let h=!1;const b={from:a.url,to:null,cancel:()=>h=!0};r.before_navigate.forEach(v=>v(b)),h?(u.preventDefault(),u.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){be(j);try{sessionStorage[We]=JSON.stringify(te)}catch{}}});const o=u=>{const h=qe(u);h&&h.href&&h.hasAttribute("sveltekit:prefetch")&&Ue(Je(h))};let p;const w=u=>{clearTimeout(p),p=setTimeout(()=>{var h;(h=u.target)==null||h.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",o),addEventListener("mousemove",w),addEventListener("sveltekit:trigger_prefetch",o),addEventListener("click",u=>{if(!F||u.button||u.which!==1||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.defaultPrevented)return;const h=qe(u);if(!h||!h.href)return;const b=h instanceof SVGAElement,v=Je(h);if(!b&&v.origin==="null")return;const _=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||_.includes("external")||h.hasAttribute("sveltekit:reload")||(b?h.target.baseVal:h.target))return;const[m,R]=v.href.split("#");if(R!==void 0&&m===location.href.split("#")[0]){ue=!0,be(j),f.page.set({...de,url:v}),f.page.notify();return}_e({url:v,scroll:h.hasAttribute("sveltekit:noscroll")?ve():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:v.href===location.href},accepted:()=>u.preventDefault(),blocked:()=>u.preventDefault()})}),addEventListener("popstate",u=>{if(u.state&&F){if(u.state[B]===j)return;_e({url:new URL(location.href),scroll:te[u.state[B]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{j=u.state[B]},blocked:()=>{const h=j-u.state[B];history.go(h)}})}}),addEventListener("hashchange",()=>{ue&&(ue=!1,history.replaceState({...history.state,[B]:++j},"",location.href))})},_hydrate:async({status:o,error:p,nodes:w,params:u,routeId:h})=>{const b=new URL(location.href),v=[];let _={},m,R;try{for(let S=0;S<w.length;S+=1){const N=S===w.length-1;let $;if(N){const U=document.querySelector('script[sveltekit\\:data-type="props"]');U&&($=JSON.parse(U.textContent))}const y=await H({module:await le[w[S]](),url:b,params:u,stuff:_,status:N?o:void 0,error:N?p:void 0,props:$,routeId:h});if($&&(y.uses.dependencies.add(b.href),y.uses.url=!0),v.push(y),y&&y.loaded)if(y.loaded.error){if(p)throw y.loaded.error;R={status:y.loaded.status,error:y.loaded.error,url:b,routeId:h}}else y.loaded.stuff&&(_={..._,...y.loaded.stuff})}m=R?await Z(R):await he({url:b,params:u,stuff:_,branch:v,status:o,error:p,routeId:h})}catch(S){if(p)throw S;m=await Z({status:500,error:De(S),url:b,routeId:h})}m.redirect&&await Q(new URL(m.redirect,location.href)),Ae(m)}}}async function Tt({paths:s,target:e,session:t,route:i,spa:l,trailing_slash:c,hydrate:f}){const n=xt({target:e,session:t,base:s.base,trailing_slash:c});yt({client:n}),it(s),f&&await n._hydrate(f),i&&(l&&n.goto(location.href,{replaceState:!0}),n._start_router()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{Tt as start};
|
|
|
1 |
+
import{S as Ye,i as Ge,s as Me,e as Fe,c as Xe,a as He,d as D,b as me,f as K,g as V,t as Ze,h as Qe,j as et,k as tt,l as P,m as nt,n as Y,o as C,p as G,q as T,r as st,u as rt,v as ye,w as z,x as ne,y as q,z as se,A as re,B as J,C as ie,D as Ce}from"./chunks/index-bcf2726a.js";import{s as it,w as ce,a as at}from"./chunks/paths-d3bcbd10.js";function ot(s){let e,t,i;const l=[s[1]||{}];var c=s[0][0];function f(n){let r={};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&2?se(l,[re(n[1]||{})]):{};if(c!==(c=n[0][0])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f()),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function ct(s){let e,t,i;const l=[s[1]||{}];var c=s[0][0];function f(n){let r={$$slots:{default:[dt]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f(s))),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&2?se(l,[re(n[1]||{})]):{};if(r&525&&(a.$$scope={dirty:r,ctx:n}),c!==(c=n[0][0])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f(n)),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function lt(s){let e,t,i;const l=[s[2]||{}];var c=s[0][1];function f(n){let r={};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&4?se(l,[re(n[2]||{})]):{};if(c!==(c=n[0][1])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f()),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function ft(s){let e,t,i;const l=[s[2]||{}];var c=s[0][1];function f(n){let r={$$slots:{default:[ut]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f(s))),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&4?se(l,[re(n[2]||{})]):{};if(r&521&&(a.$$scope={dirty:r,ctx:n}),c!==(c=n[0][1])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f(n)),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function ut(s){let e,t,i;const l=[s[3]||{}];var c=s[0][2];function f(n){let r={};for(let a=0;a<l.length;a+=1)r=ie(r,l[a]);return{props:r}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=P()},l(n){e&&ne(e.$$.fragment,n),t=P()},m(n,r){e&&q(e,n,r),V(n,t,r),i=!0},p(n,r){const a=r&8?se(l,[re(n[3]||{})]):{};if(c!==(c=n[0][2])){if(e){Y();const d=e;C(d.$$.fragment,1,0,()=>{J(d,1)}),G()}c?(e=new c(f()),z(e.$$.fragment),T(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(n){i||(e&&T(e.$$.fragment,n),i=!0)},o(n){e&&C(e.$$.fragment,n),i=!1},d(n){n&&D(t),e&&J(e,n)}}}function dt(s){let e,t,i,l;const c=[ft,lt],f=[];function n(r,a){return r[0][2]?0:1}return e=n(s),t=f[e]=c[e](s),{c(){t.c(),i=P()},l(r){t.l(r),i=P()},m(r,a){f[e].m(r,a),V(r,i,a),l=!0},p(r,a){let d=e;e=n(r),e===d?f[e].p(r,a):(Y(),C(f[d],1,1,()=>{f[d]=null}),G(),t=f[e],t?t.p(r,a):(t=f[e]=c[e](r),t.c()),T(t,1),t.m(i.parentNode,i))},i(r){l||(T(t),l=!0)},o(r){C(t),l=!1},d(r){f[e].d(r),r&&D(i)}}}function Te(s){let e,t=s[5]&&je(s);return{c(){e=Fe("div"),t&&t.c(),this.h()},l(i){e=Xe(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=He(e);t&&t.l(l),l.forEach(D),this.h()},h(){me(e,"id","svelte-announcer"),me(e,"aria-live","assertive"),me(e,"aria-atomic","true"),K(e,"position","absolute"),K(e,"left","0"),K(e,"top","0"),K(e,"clip","rect(0 0 0 0)"),K(e,"clip-path","inset(50%)"),K(e,"overflow","hidden"),K(e,"white-space","nowrap"),K(e,"width","1px"),K(e,"height","1px")},m(i,l){V(i,e,l),t&&t.m(e,null)},p(i,l){i[5]?t?t.p(i,l):(t=je(i),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(i){i&&D(e),t&&t.d()}}}function je(s){let e;return{c(){e=Ze(s[6])},l(t){e=Qe(t,s[6])},m(t,i){V(t,e,i)},p(t,i){i&64&&et(e,t[6])},d(t){t&&D(e)}}}function pt(s){let e,t,i,l,c;const f=[ct,ot],n=[];function r(d,L){return d[0][1]?0:1}e=r(s),t=n[e]=f[e](s);let a=s[4]&&Te(s);return{c(){t.c(),i=tt(),a&&a.c(),l=P()},l(d){t.l(d),i=nt(d),a&&a.l(d),l=P()},m(d,L){n[e].m(d,L),V(d,i,L),a&&a.m(d,L),V(d,l,L),c=!0},p(d,[L]){let E=e;e=r(d),e===E?n[e].p(d,L):(Y(),C(n[E],1,1,()=>{n[E]=null}),G(),t=n[e],t?t.p(d,L):(t=n[e]=f[e](d),t.c()),T(t,1),t.m(i.parentNode,i)),d[4]?a?a.p(d,L):(a=Te(d),a.c(),a.m(l.parentNode,l)):a&&(a.d(1),a=null)},i(d){c||(T(t),c=!0)},o(d){C(t),c=!1},d(d){n[e].d(d),d&&D(i),a&&a.d(d),d&&D(l)}}}function ht(s,e,t){let{stores:i}=e,{page:l}=e,{components:c}=e,{props_0:f=null}=e,{props_1:n=null}=e,{props_2:r=null}=e;st("__svelte__",i),rt(i.page.notify);let a=!1,d=!1,L=null;return ye(()=>{const E=i.page.subscribe(()=>{a&&(t(5,d=!0),t(6,L=document.title||"untitled page"))});return t(4,a=!0),E}),s.$$set=E=>{"stores"in E&&t(7,i=E.stores),"page"in E&&t(8,l=E.page),"components"in E&&t(0,c=E.components),"props_0"in E&&t(1,f=E.props_0),"props_1"in E&&t(2,n=E.props_1),"props_2"in E&&t(3,r=E.props_2)},s.$$.update=()=>{s.$$.dirty&384&&i.page.set(l)},[c,f,n,r,a,d,L,i,l]}class _t extends Ye{constructor(e){super(),Ge(this,e,ht,pt,Me,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const mt="modulepreload",Ie={},gt="/static/_app/immutable/",ge=function(e,t){return!t||t.length===0?e():Promise.all(t.map(i=>{if(i=`${gt}${i}`,i in Ie)return;Ie[i]=!0;const l=i.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${c}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":mt,l||(f.as="script",f.crossOrigin=""),f.href=i,document.head.appendChild(f),l)return new Promise((n,r)=>{f.addEventListener("load",n),f.addEventListener("error",()=>r(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},wt={},le=[()=>ge(()=>import("./pages/__layout.svelte-f5a1b718.js"),["pages/__layout.svelte-f5a1b718.js","assets/pages/__layout.svelte-b67cf61d.css","chunks/index-bcf2726a.js"]),()=>ge(()=>import("./error.svelte-d9523301.js"),["error.svelte-d9523301.js","chunks/index-bcf2726a.js"]),()=>ge(()=>import("./pages/index.svelte-a4900be2.js"),["pages/index.svelte-a4900be2.js","assets/pages/index.svelte-f2b33456.css","chunks/index-bcf2726a.js","chunks/paths-d3bcbd10.js"])],bt={"":[[0,2],[1]]};function yt(s){s.client}function De(s){return s instanceof Error||s&&s.name&&s.message?s:new Error(JSON.stringify(s))}function Ve(s){if(s.fallthrough)throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");if("maxage"in s)throw new Error("maxage should be replaced with cache: { maxage }");const e=s.status&&s.status>=400&&s.status<=599&&!s.redirect;if(s.error||e){const t=s.status;if(!s.error&&e)return{status:t||500,error:new Error};const i=typeof s.error=="string"?new Error(s.error):s.error;return i instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:i}):{status:t,error:i}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof i}"`)}}if(s.redirect){if(!s.status||Math.floor(s.status/100)!==3)throw new Error('"redirect" property returned from load() must be accompanied by a 3xx status code');if(typeof s.redirect!="string")throw new Error('"redirect" property returned from load() must be a string')}if(s.dependencies&&(!Array.isArray(s.dependencies)||s.dependencies.some(t=>typeof t!="string")))throw new Error('"dependencies" property returned from load() must be of type string[]');if(s.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return s}function vt(s,e){return s==="/"||e==="ignore"?s:e==="never"?s.endsWith("/")?s.slice(0,-1):s:e==="always"&&!s.endsWith("/")?s+"/":s}class $t extends URL{get hash(){throw new Error("url.hash is inaccessible from load. Consider accessing hash from the page store within the script tag of your component.")}}function ze(s){let e=s.baseURI;if(!e){const t=s.getElementsByTagName("base");e=t.length?t[0].href:s.URL}return e}function ve(){return{x:pageXOffset,y:pageYOffset}}function qe(s){return s.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function Je(s){return s instanceof SVGAElement?new URL(s.href.baseVal,document.baseURI):new URL(s.href)}function Ke(s){const e=ce(s);let t=!0;function i(){t=!0,e.update(f=>f)}function l(f){t=!1,e.set(f)}function c(f){let n;return e.subscribe(r=>{(n===void 0||t&&r!==n)&&f(n=r)})}return{notify:i,set:l,subscribe:c}}function kt(){const{set:s,subscribe:e}=ce(!1),t="1685757327220";let i;async function l(){clearTimeout(i);const f=await fetch(`${at}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(f.ok){const{version:n}=await f.json(),r=n!==t;return r&&(s(!0),clearTimeout(i)),r}else throw new Error(`Version check failed: ${f.status}`)}return{subscribe:e,check:l}}function Et(s){let e=5381,t=s.length;if(typeof s=="string")for(;t;)e=e*33^s.charCodeAt(--t);else for(;t;)e=e*33^s[--t];return(e>>>0).toString(36)}const $e=window.fetch;function Rt(s,e){let i=`script[sveltekit\\:data-type="data"][sveltekit\\:data-url=${JSON.stringify(typeof s=="string"?s:s.url)}]`;e&&typeof e.body=="string"&&(i+=`[sveltekit\\:data-body="${Et(e.body)}"]`);const l=document.querySelector(i);if(l&&l.textContent){const{body:c,...f}=JSON.parse(l.textContent);return Promise.resolve(new Response(c,f))}return $e(s,e)}const Lt=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function St(s){const e=[],t=[];let i=!0;return{pattern:s===""?/^\/$/:new RegExp(`^${decodeURIComponent(s).split(/(?:@[a-zA-Z0-9_-]+)?(?:\/|$)/).map((c,f,n)=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(c);if(r)return e.push(r[1]),t.push(r[2]),"(?:/(.*))?";const a=f===n.length-1;return c&&"/"+c.split(/\[(.+?)\]/).map((d,L)=>{if(L%2){const[,E,X,M]=Lt.exec(d);return e.push(X),t.push(M),E?"(.*?)":"([^/]+?)"}return a&&d.includes(".")&&(i=!1),d.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${i?"/?":""}$`),names:e,types:t}}function Ut(s,e,t,i){const l={};for(let c=0;c<e.length;c+=1){const f=e[c],n=t[c],r=s[c+1]||"";if(n){const a=i[n];if(!a)throw new Error(`Missing "${n}" param matcher`);if(!a(r))return}l[f]=r}return l}function At(s,e,t){return Object.entries(e).map(([l,[c,f,n]])=>{const{pattern:r,names:a,types:d}=St(l);return{id:l,exec:L=>{const E=r.exec(L);if(E)return Ut(E,a,d,t)},a:c.map(L=>s[L]),b:f.map(L=>s[L]),has_shadow:!!n}})}const We="sveltekit:scroll",B="sveltekit:index",we=At(le,bt,wt),Nt=le[0](),Ot=le[1](),Be={};let te={};try{te=JSON.parse(sessionStorage[We])}catch{}function be(s){te[s]=ve()}function xt({target:s,session:e,base:t,trailing_slash:i}){var xe;const l=new Map,c=[],f={url:Ke({}),page:Ke({}),navigating:ce(null),session:ce(e),updated:kt()},n={id:null,promise:null},r={before_navigate:[],after_navigate:[]};let a={branch:[],error:null,session_id:0,stuff:Be,url:null},d=!1,L=!0,E=!1,X=1,M=null,ke,Ee,Re=!1;f.session.subscribe(async o=>{Ee=o,Re&&(X+=1,pe(new URL(location.href),[],!0))}),Re=!0;let F=!0,j=(xe=history.state)==null?void 0:xe[B];j||(j=Date.now(),history.replaceState({...history.state,[B]:j},"",location.href));const fe=te[j];fe&&(history.scrollRestoration="manual",scrollTo(fe.x,fe.y));let ue=!1,de,Le;async function Se(o,{noscroll:p=!1,replaceState:w=!1,keepfocus:u=!1,state:h={}},b){if(typeof o=="string"&&(o=new URL(o,ze(document))),F)return _e({url:o,scroll:p?ve():null,keepfocus:u,redirect_chain:b,details:{state:h,replaceState:w},accepted:()=>{},blocked:()=>{}});await Q(o)}async function Ue(o){const p=Oe(o);if(!p)throw new Error("Attempted to prefetch a URL that does not belong to this app");return n.promise=Ne(p,!1),n.id=p.id,n.promise}async function pe(o,p,w,u,h){var R,S,N;const b=Oe(o),v=Le={};let _=b&&await Ne(b,w);if(!_&&o.origin===location.origin&&o.pathname===location.pathname&&(_=await Z({status:404,error:new Error(`Not found: ${o.pathname}`),url:o,routeId:null})),!_)return await Q(o),!1;if(Le!==v)return!1;if(c.length=0,_.redirect)if(p.length>10||p.includes(o.pathname))_=await Z({status:500,error:new Error("Redirect loop"),url:o,routeId:null});else return F?Se(new URL(_.redirect,o).href,{},[...p,o.pathname]):await Q(new URL(_.redirect,location.href)),!1;else((S=(R=_.props)==null?void 0:R.page)==null?void 0:S.status)>=400&&await f.updated.check()&&await Q(o);if(E=!0,u&&u.details){const{details:$}=u,y=$.replaceState?0:1;$.state[B]=j+=y,history[$.replaceState?"replaceState":"pushState"]($.state,"",o)}if(d?(a=_.state,_.props.page&&(_.props.page.url=o),ke.$set(_.props)):Ae(_),u){const{scroll:$,keepfocus:y}=u;if(!y){const U=document.body,g=U.getAttribute("tabindex");(N=getSelection())==null||N.removeAllRanges(),U.tabIndex=-1,U.focus({preventScroll:!0}),g!==null?U.setAttribute("tabindex",g):U.removeAttribute("tabindex")}if(await Ce(),L){const U=o.hash&&document.getElementById(o.hash.slice(1));$?scrollTo($.x,$.y):U?U.scrollIntoView():scrollTo(0,0)}}else await Ce();n.promise=null,n.id=null,L=!0,_.props.page&&(de=_.props.page);const m=_.state.branch[_.state.branch.length-1];F=(m==null?void 0:m.module.router)!==!1,h&&h(),E=!1}function Ae(o){a=o.state;const p=document.querySelector("style[data-sveltekit]");if(p&&p.remove(),de=o.props.page,ke=new _t({target:s,props:{...o.props,stores:f},hydrate:!0}),F){const w={from:null,to:new URL(location.href)};r.after_navigate.forEach(u=>u(w))}d=!0}async function he({url:o,params:p,stuff:w,branch:u,status:h,error:b,routeId:v}){var y,U;const _=u.filter(Boolean),m=_.find(g=>{var O;return(O=g.loaded)==null?void 0:O.redirect}),R={redirect:(y=m==null?void 0:m.loaded)==null?void 0:y.redirect,state:{url:o,params:p,branch:u,error:b,stuff:w,session_id:X},props:{components:_.map(g=>g.module.default)}};for(let g=0;g<_.length;g+=1){const O=_[g].loaded;R.props[`props_${g}`]=O?await O.props:null}if(!a.url||o.href!==a.url.href||a.error!==b||a.stuff!==w){R.props.page={error:b,params:p,routeId:v,status:h,stuff:w,url:o};const g=(O,k)=>{Object.defineProperty(R.props.page,O,{get:()=>{throw new Error(`$page.${O} has been replaced by $page.url.${k}`)}})};g("origin","origin"),g("path","pathname"),g("query","searchParams")}const N=_[_.length-1],$=(U=N==null?void 0:N.loaded)==null?void 0:U.cache;if($){const g=o.pathname+o.search;let O=!1;const k=()=>{l.get(g)===R&&l.delete(g),x(),clearTimeout(A)},A=setTimeout(k,$.maxage*1e3),x=f.session.subscribe(()=>{O&&k()});O=!0,l.set(g,R)}return R}async function H({status:o,error:p,module:w,url:u,params:h,stuff:b,props:v,routeId:_}){const m={module:w,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:b};function R(y){const{href:U}=new URL(y,u);m.uses.dependencies.add(U)}v&&m.uses.dependencies.add(u.href);const S={};for(const y in h)Object.defineProperty(S,y,{get(){return m.uses.params.add(y),h[y]},enumerable:!0});const N=Ee,$=new $t(u);if(w.load){const y={routeId:_,params:S,props:v||{},get url(){return m.uses.url=!0,$},get session(){return m.uses.session=!0,N},get stuff(){return m.uses.stuff=!0,{...b}},async fetch(g,O){let k;typeof g=="string"?k=g:(k=g.url,O={body:g.method==="GET"||g.method==="HEAD"?void 0:await g.blob(),cache:g.cache,credentials:g.credentials,headers:g.headers,integrity:g.integrity,keepalive:g.keepalive,method:g.method,mode:g.mode,redirect:g.redirect,referrer:g.referrer,referrerPolicy:g.referrerPolicy,signal:g.signal,...O});const A=new URL(k,u).href;return R(A),d?$e(A,O):Rt(k,O)},status:o!=null?o:null,error:p!=null?p:null};let U;if(U=await w.load.call(null,y),!U)throw new Error("load function must return a value");m.loaded=Ve(U),m.loaded.stuff&&(m.stuff=m.loaded.stuff),m.loaded.dependencies&&m.loaded.dependencies.forEach(R)}else v&&(m.loaded=Ve({props:v}));return m}async function Ne({id:o,url:p,params:w,route:u},h){var U,g,O;if(n.id===o&&n.promise)return n.promise;if(!h){const k=l.get(o);if(k)return k}const{a:b,b:v,has_shadow:_}=u,m=a.url&&{url:o!==a.url.pathname+a.url.search,params:Object.keys(w).filter(k=>a.params[k]!==w[k]),session:X!==a.session_id};let R=[],S=Be,N=!1,$=200,y=null;b.forEach(k=>k().catch(()=>{}));e:for(let k=0;k<b.length;k+=1){let A;try{if(!b[k])continue;const x=await b[k](),I=a.branch[k];if(!I||x!==I.module||m.url&&I.uses.url||m.params.some(W=>I.uses.params.has(W))||m.session&&I.uses.session||Array.from(I.uses.dependencies).some(W=>c.some(oe=>oe(W)))||N&&I.uses.stuff){let W={};const oe=_&&k===b.length-1;if(oe){const ee=await $e(`${p.pathname}${p.pathname.endsWith("/")?"":"/"}__data.json${p.search}`,{headers:{"x-sveltekit-load":"true"}});if(ee.ok){const Pe=ee.headers.get("x-sveltekit-location");if(Pe)return{redirect:Pe,props:{},state:a};W=ee.status===204?{}:await ee.json()}else $=ee.status,y=new Error("Failed to load data")}if(y||(A=await H({module:x,url:p,params:w,props:W,stuff:S,routeId:u.id})),A&&(oe&&(A.uses.url=!0),A.loaded)){if(A.loaded.error&&($=A.loaded.status,y=A.loaded.error),A.loaded.redirect)return{redirect:A.loaded.redirect,props:{},state:a};A.loaded.stuff&&(N=!0)}}else A=I}catch(x){$=500,y=De(x)}if(y){for(;k--;)if(v[k]){let x,I,ae=k;for(;!(I=R[ae]);)ae-=1;try{if(x=await H({status:$,error:y,module:await v[k](),url:p,params:w,stuff:I.stuff,routeId:u.id}),(U=x==null?void 0:x.loaded)!=null&&U.error)continue;(g=x==null?void 0:x.loaded)!=null&&g.stuff&&(S={...S,...x.loaded.stuff}),R=R.slice(0,ae+1).concat(x);break e}catch{continue}}return await Z({status:$,error:y,url:p,routeId:u.id})}else(O=A==null?void 0:A.loaded)!=null&&O.stuff&&(S={...S,...A.loaded.stuff}),R.push(A)}return await he({url:p,params:w,stuff:S,branch:R,status:$,error:y,routeId:u.id})}async function Z({status:o,error:p,url:w,routeId:u}){var _,m;const h={},b=await H({module:await Nt,url:w,params:h,stuff:{},routeId:u}),v=await H({status:o,error:p,module:await Ot,url:w,params:h,stuff:b&&b.loaded&&b.loaded.stuff||{},routeId:u});return await he({url:w,params:h,stuff:{...(_=b==null?void 0:b.loaded)==null?void 0:_.stuff,...(m=v==null?void 0:v.loaded)==null?void 0:m.stuff},branch:[b,v],status:o,error:p,routeId:u})}function Oe(o){if(o.origin!==location.origin||!o.pathname.startsWith(t))return;const p=decodeURI(o.pathname.slice(t.length)||"/");for(const w of we){const u=w.exec(p);if(u)return{id:o.pathname+o.search,route:w,params:u,url:o}}}async function _e({url:o,scroll:p,keepfocus:w,redirect_chain:u,details:h,accepted:b,blocked:v}){const _=a.url;let m=!1;const R={from:_,to:o,cancel:()=>m=!0};if(r.before_navigate.forEach($=>$(R)),m){v();return}const S=vt(o.pathname,i),N=new URL(o.origin+S+o.search+o.hash);be(j),b(),d&&f.navigating.set({from:a.url,to:N}),await pe(N,u,!1,{scroll:p,keepfocus:w,details:h},()=>{const $={from:_,to:N};r.after_navigate.forEach(y=>y($)),f.navigating.set(null)})}function Q(o){return location.href=o.href,new Promise(()=>{})}return{after_navigate:o=>{ye(()=>(r.after_navigate.push(o),()=>{const p=r.after_navigate.indexOf(o);r.after_navigate.splice(p,1)}))},before_navigate:o=>{ye(()=>(r.before_navigate.push(o),()=>{const p=r.before_navigate.indexOf(o);r.before_navigate.splice(p,1)}))},disable_scroll_handling:()=>{(E||!d)&&(L=!1)},goto:(o,p={})=>Se(o,p,[]),invalidate:o=>{if(typeof o=="function")c.push(o);else{const{href:p}=new URL(o,location.href);c.push(w=>w===p)}return M||(M=Promise.resolve().then(async()=>{await pe(new URL(location.href),[],!0),M=null})),M},prefetch:async o=>{const p=new URL(o,ze(document));await Ue(p)},prefetch_routes:async o=>{const w=(o?we.filter(u=>o.some(h=>u.exec(h))):we).map(u=>Promise.all(u.a.map(h=>h())));await Promise.all(w)},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",u=>{let h=!1;const b={from:a.url,to:null,cancel:()=>h=!0};r.before_navigate.forEach(v=>v(b)),h?(u.preventDefault(),u.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){be(j);try{sessionStorage[We]=JSON.stringify(te)}catch{}}});const o=u=>{const h=qe(u);h&&h.href&&h.hasAttribute("sveltekit:prefetch")&&Ue(Je(h))};let p;const w=u=>{clearTimeout(p),p=setTimeout(()=>{var h;(h=u.target)==null||h.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",o),addEventListener("mousemove",w),addEventListener("sveltekit:trigger_prefetch",o),addEventListener("click",u=>{if(!F||u.button||u.which!==1||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.defaultPrevented)return;const h=qe(u);if(!h||!h.href)return;const b=h instanceof SVGAElement,v=Je(h);if(!b&&v.origin==="null")return;const _=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||_.includes("external")||h.hasAttribute("sveltekit:reload")||(b?h.target.baseVal:h.target))return;const[m,R]=v.href.split("#");if(R!==void 0&&m===location.href.split("#")[0]){ue=!0,be(j),f.page.set({...de,url:v}),f.page.notify();return}_e({url:v,scroll:h.hasAttribute("sveltekit:noscroll")?ve():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:v.href===location.href},accepted:()=>u.preventDefault(),blocked:()=>u.preventDefault()})}),addEventListener("popstate",u=>{if(u.state&&F){if(u.state[B]===j)return;_e({url:new URL(location.href),scroll:te[u.state[B]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{j=u.state[B]},blocked:()=>{const h=j-u.state[B];history.go(h)}})}}),addEventListener("hashchange",()=>{ue&&(ue=!1,history.replaceState({...history.state,[B]:++j},"",location.href))})},_hydrate:async({status:o,error:p,nodes:w,params:u,routeId:h})=>{const b=new URL(location.href),v=[];let _={},m,R;try{for(let S=0;S<w.length;S+=1){const N=S===w.length-1;let $;if(N){const U=document.querySelector('script[sveltekit\\:data-type="props"]');U&&($=JSON.parse(U.textContent))}const y=await H({module:await le[w[S]](),url:b,params:u,stuff:_,status:N?o:void 0,error:N?p:void 0,props:$,routeId:h});if($&&(y.uses.dependencies.add(b.href),y.uses.url=!0),v.push(y),y&&y.loaded)if(y.loaded.error){if(p)throw y.loaded.error;R={status:y.loaded.status,error:y.loaded.error,url:b,routeId:h}}else y.loaded.stuff&&(_={..._,...y.loaded.stuff})}m=R?await Z(R):await he({url:b,params:u,stuff:_,branch:v,status:o,error:p,routeId:h})}catch(S){if(p)throw S;m=await Z({status:500,error:De(S),url:b,routeId:h})}m.redirect&&await Q(new URL(m.redirect,location.href)),Ae(m)}}}async function Tt({paths:s,target:e,session:t,route:i,spa:l,trailing_slash:c,hydrate:f}){const n=xt({target:e,session:t,base:s.base,trailing_slash:c});yt({client:n}),it(s),f&&await n._hydrate(f),i&&(l&&n.goto(location.href,{replaceState:!0}),n._start_router()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{Tt as start};
|
frontend/.svelte-kit/output/client/_app/version.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":"
|
|
|
1 |
+
{"version":"1685757327220"}
|
frontend/.svelte-kit/output/prerendered/pages/index.html
CHANGED
@@ -8,11 +8,11 @@
|
|
8 |
<meta http-equiv="content-security-policy" content="">
|
9 |
<link rel="stylesheet" href="/static/_app/immutable/assets/pages/__layout.svelte-b67cf61d.css">
|
10 |
<link rel="stylesheet" href="/static/_app/immutable/assets/pages/index.svelte-f2b33456.css">
|
11 |
-
<link rel="modulepreload" href="/static/_app/immutable/start-
|
12 |
<link rel="modulepreload" href="/static/_app/immutable/chunks/index-bcf2726a.js">
|
13 |
<link rel="modulepreload" href="/static/_app/immutable/chunks/paths-d3bcbd10.js">
|
14 |
<link rel="modulepreload" href="/static/_app/immutable/pages/__layout.svelte-f5a1b718.js">
|
15 |
-
<link rel="modulepreload" href="/static/_app/immutable/pages/index.svelte-
|
16 |
</head>
|
17 |
<body class="">
|
18 |
|
@@ -117,7 +117,7 @@
|
|
117 |
<select name="presets" class="svelte-7to72y"><option disabled selected value="preset">preset</option><option value="High resolution satellite image, 4K, ultra detailed">Realistic</option>`<option value="Colorful lego bricks">Lego brick</option>`<option value="Black and white paper pencil drawing">Pencil</option>`<option value="Oil on canvas painting">Painting</option>`</select>
|
118 |
|
119 |
<h4 class="font-bold mt-6 mb-2 my-6 leading-6">Random Seed</h4>
|
120 |
-
<input type="Number" name="seed" placeholder="Integer Seed" class="svelte-7to72y" value="
|
121 |
<button class="svelte-7to72y">Random
|
122 |
</button>
|
123 |
<h4 class="font-bold mt-6 mb-2 my-6 leading-6">Sample Steps</h4>
|
@@ -127,10 +127,10 @@
|
|
127 |
</div>
|
128 |
|
129 |
|
130 |
-
<script type="module" data-sveltekit-hydrate="
|
131 |
-
import { start } from "/static/_app/immutable/start-
|
132 |
start({
|
133 |
-
target: document.querySelector('[data-sveltekit-hydrate="
|
134 |
paths: {"base":"/static","assets":"/static"},
|
135 |
session: {},
|
136 |
route: true,
|
|
|
8 |
<meta http-equiv="content-security-policy" content="">
|
9 |
<link rel="stylesheet" href="/static/_app/immutable/assets/pages/__layout.svelte-b67cf61d.css">
|
10 |
<link rel="stylesheet" href="/static/_app/immutable/assets/pages/index.svelte-f2b33456.css">
|
11 |
+
<link rel="modulepreload" href="/static/_app/immutable/start-db9f32c4.js">
|
12 |
<link rel="modulepreload" href="/static/_app/immutable/chunks/index-bcf2726a.js">
|
13 |
<link rel="modulepreload" href="/static/_app/immutable/chunks/paths-d3bcbd10.js">
|
14 |
<link rel="modulepreload" href="/static/_app/immutable/pages/__layout.svelte-f5a1b718.js">
|
15 |
+
<link rel="modulepreload" href="/static/_app/immutable/pages/index.svelte-a4900be2.js">
|
16 |
</head>
|
17 |
<body class="">
|
18 |
|
|
|
117 |
<select name="presets" class="svelte-7to72y"><option disabled selected value="preset">preset</option><option value="High resolution satellite image, 4K, ultra detailed">Realistic</option>`<option value="Colorful lego bricks">Lego brick</option>`<option value="Black and white paper pencil drawing">Pencil</option>`<option value="Oil on canvas painting">Painting</option>`</select>
|
118 |
|
119 |
<h4 class="font-bold mt-6 mb-2 my-6 leading-6">Random Seed</h4>
|
120 |
+
<input type="Number" name="seed" placeholder="Integer Seed" class="svelte-7to72y" value="121765888">
|
121 |
<button class="svelte-7to72y">Random
|
122 |
</button>
|
123 |
<h4 class="font-bold mt-6 mb-2 my-6 leading-6">Sample Steps</h4>
|
|
|
127 |
</div>
|
128 |
|
129 |
|
130 |
+
<script type="module" data-sveltekit-hydrate="1prsilu">
|
131 |
+
import { start } from "/static/_app/immutable/start-db9f32c4.js";
|
132 |
start({
|
133 |
+
target: document.querySelector('[data-sveltekit-hydrate="1prsilu"]').parentNode,
|
134 |
paths: {"base":"/static","assets":"/static"},
|
135 |
session: {},
|
136 |
route: true,
|
frontend/.svelte-kit/output/server/manifest.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
export const manifest = {
|
2 |
appDir: "_app",
|
3 |
-
assets: new Set(["favicon.png","robots.txt","samples/example0.png","samples/example1.png","samples/example2.png","samples/example3.png","samples/example4.png","samples/example5.png","samples/example6.jpg","
|
4 |
mimeTypes: {".png":"image/png",".txt":"text/plain",".jpg":"image/jpeg",".webp":"image/webp"},
|
5 |
_: {
|
6 |
-
entry: {"file":"start-
|
7 |
nodes: [
|
8 |
() => import('./nodes/0.js'),
|
9 |
() => import('./nodes/1.js'),
|
|
|
1 |
export const manifest = {
|
2 |
appDir: "_app",
|
3 |
+
assets: new Set(["favicon.png","robots.txt","samples/default.jpg","samples/example0.png","samples/example1.png","samples/example2.png","samples/example3.png","samples/example4.png","samples/example5.png","samples/example6.jpg","svelte-welcome.png","svelte-welcome.webp"]),
|
4 |
mimeTypes: {".png":"image/png",".txt":"text/plain",".jpg":"image/jpeg",".webp":"image/webp"},
|
5 |
_: {
|
6 |
+
entry: {"file":"start-db9f32c4.js","js":["start-db9f32c4.js","chunks/index-bcf2726a.js","chunks/paths-d3bcbd10.js"],"css":[]},
|
7 |
nodes: [
|
8 |
() => import('./nodes/0.js'),
|
9 |
() => import('./nodes/1.js'),
|
frontend/.svelte-kit/output/server/nodes/2.js
CHANGED
@@ -2,6 +2,6 @@ import * as module from '../entries/pages/index.svelte.js';
|
|
2 |
|
3 |
export { module };
|
4 |
export const index = 2;
|
5 |
-
export const entry = 'pages/index.svelte-
|
6 |
-
export const js = ["pages/index.svelte-
|
7 |
export const css = ["assets/pages/index.svelte-f2b33456.css"];
|
|
|
2 |
|
3 |
export { module };
|
4 |
export const index = 2;
|
5 |
+
export const entry = 'pages/index.svelte-a4900be2.js';
|
6 |
+
export const js = ["pages/index.svelte-a4900be2.js","chunks/index-bcf2726a.js","chunks/paths-d3bcbd10.js"];
|
7 |
export const css = ["assets/pages/index.svelte-f2b33456.css"];
|
frontend/src/lib/DrawingCanvas.svelte
CHANGED
@@ -113,7 +113,7 @@
|
|
113 |
}
|
114 |
|
115 |
function clearCanvas(ctx: CanvasRenderingContext2D) {
|
116 |
-
ctx.fillStyle = '#
|
117 |
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
118 |
}
|
119 |
function drawPixels(ctx: CanvasRenderingContext2D) {
|
|
|
113 |
}
|
114 |
|
115 |
function clearCanvas(ctx: CanvasRenderingContext2D) {
|
116 |
+
ctx.fillStyle = '#46e483';
|
117 |
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
118 |
}
|
119 |
function drawPixels(ctx: CanvasRenderingContext2D) {
|
frontend/static/samples/{example_0.jpg β default.jpg}
RENAMED
File without changes
|