Ruben commited on
Commit
d68ec80
1 Parent(s): aca21a2
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Makefile +1 -1
  2. README.md +1 -1
  3. app.py +7 -5
  4. frontend/.svelte-kit/build/hooks.js +0 -0
  5. frontend/.svelte-kit/build/index.js +81 -0
  6. frontend/.svelte-kit/output/client/_app/immutable/assets/pages/__layout.svelte-b67cf61d.css +1 -0
  7. frontend/.svelte-kit/output/client/_app/immutable/assets/pages/index.svelte-f2b33456.css +1 -0
  8. frontend/.svelte-kit/output/client/_app/immutable/chunks/index-bcf2726a.js +1 -0
  9. frontend/.svelte-kit/output/client/_app/immutable/chunks/paths-d3bcbd10.js +1 -0
  10. frontend/.svelte-kit/output/client/_app/immutable/error.svelte-d9523301.js +1 -0
  11. frontend/.svelte-kit/output/client/_app/immutable/manifest.json +59 -0
  12. frontend/.svelte-kit/output/client/_app/immutable/pages/__layout.svelte-f5a1b718.js +1 -0
  13. frontend/.svelte-kit/output/client/_app/immutable/pages/index.svelte-1f940fb6.js +1 -0
  14. frontend/{build/_app/immutable/start-b4d3a4a1.js → .svelte-kit/output/client/_app/immutable/start-1d6beeeb.js} +1 -1
  15. frontend/.svelte-kit/output/client/_app/version.json +1 -0
  16. frontend/.svelte-kit/output/prerendered/fallback.html +28 -0
  17. frontend/.svelte-kit/output/prerendered/pages/index.html +152 -0
  18. frontend/.svelte-kit/output/server/chunks/hooks-1c45ba0b.js +1 -0
  19. frontend/.svelte-kit/output/server/chunks/index-445fd704.js +112 -0
  20. frontend/.svelte-kit/output/server/chunks/paths-396f020f.js +7 -0
  21. frontend/.svelte-kit/output/server/entries/fallbacks/error.svelte.js +21 -0
  22. frontend/.svelte-kit/output/server/entries/pages/__layout.svelte.js +6 -0
  23. frontend/.svelte-kit/output/server/entries/pages/index.svelte.js +347 -0
  24. frontend/.svelte-kit/output/server/index.js +2291 -0
  25. frontend/.svelte-kit/output/server/manifest.js +30 -0
  26. frontend/.svelte-kit/output/server/manifest.json +56 -0
  27. frontend/.svelte-kit/output/server/nodes/0.js +7 -0
  28. frontend/.svelte-kit/output/server/nodes/1.js +7 -0
  29. frontend/.svelte-kit/output/server/nodes/2.js +7 -0
  30. frontend/.svelte-kit/runtime/app/env.js +0 -0
  31. frontend/.svelte-kit/runtime/app/navigation.js +0 -0
  32. frontend/.svelte-kit/runtime/app/paths.js +0 -0
  33. frontend/.svelte-kit/runtime/app/stores.js +0 -0
  34. frontend/.svelte-kit/runtime/client/singletons.js +0 -0
  35. frontend/.svelte-kit/runtime/client/start.js +0 -0
  36. frontend/.svelte-kit/runtime/components/error.svelte +0 -0
  37. frontend/.svelte-kit/runtime/components/layout.svelte +0 -0
  38. frontend/.svelte-kit/runtime/env.js +0 -0
  39. frontend/.svelte-kit/runtime/paths.js +0 -0
  40. frontend/.svelte-kit/runtime/server/index.js +0 -0
  41. frontend/build/_app/immutable/manifest.json +2 -2
  42. frontend/build/_app/immutable/pages/index.svelte-1f940fb6.js +1 -0
  43. frontend/build/_app/immutable/pages/index.svelte-e78f0615.js +0 -1
  44. static/_app/immutable/start-b4d3a4a1.js → frontend/build/_app/immutable/start-1d6beeeb.js +1 -1
  45. frontend/build/_app/version.json +1 -1
  46. frontend/build/index.html +10 -7
  47. frontend/src/lib/ParamsSelector.svelte +7 -9
  48. frontend/src/lib/store.ts +2 -2
  49. frontend/src/routes/index.svelte +1 -2
  50. launch_full_interface.ipynb +107 -0
Makefile CHANGED
@@ -5,7 +5,7 @@ build-client:
5
  cd frontend && npm install && npm run build && rm -rf ../static && cp -r build/ ../static/
6
 
7
  build-dev:
8
- cd frontend && rm -rf node_modules && npm install && NODE_ENV=development npm run build && rm -rf ../static 2>&1 && cp -rv build/ ../static/
9
 
10
  run-dev:
11
  FLASK_DEBUG=development python app.py
 
5
  cd frontend && npm install && npm run build && rm -rf ../static && cp -r build/ ../static/
6
 
7
  build-dev:
8
+ cd frontend && rm -rf node-modules && npm install && NODE_ENV=development npm run build && rm -rf ../static 2>&1 && cp -r build/ ../static/
9
 
10
  run-dev:
11
  FLASK_DEBUG=development python app.py
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Drawing2Map
3
  emoji: 🎨
4
  colorFrom: blue
5
  colorTo: green
 
1
  ---
2
+ title: Drawing2Map-api
3
  emoji: 🎨
4
  colorFrom: blue
5
  colorTo: green
app.py CHANGED
@@ -28,16 +28,17 @@ def encode_image_to_base64(filepath):
28
 
29
  @app.route('/predict', methods=['POST'])
30
  def predict():
31
- global client
32
- if not client:
33
- client = Client(base_gradio_url)
34
-
35
  data = request.get_json()
36
-
37
  base64Image = data['data'][0]
38
  prompt = data['data'][1]
39
  steps = data['data'][2]
40
  seed = data['data'][3]
 
 
 
 
 
41
 
42
  b64meta, b64_data = base64Image.split(',')
43
 
@@ -47,6 +48,7 @@ def predict():
47
  image_path, prompt, steps, seed, fn_index=0
48
  )
49
 
 
50
  return b64meta + ',' + encode_image_to_base64(result)
51
 
52
 
 
28
 
29
  @app.route('/predict', methods=['POST'])
30
  def predict():
 
 
 
 
31
  data = request.get_json()
32
+
33
  base64Image = data['data'][0]
34
  prompt = data['data'][1]
35
  steps = data['data'][2]
36
  seed = data['data'][3]
37
+
38
+ global client
39
+ if not client:
40
+ client = Client(base_gradio_url)
41
+
42
 
43
  b64meta, b64_data = base64Image.split(',')
44
 
 
48
  image_path, prompt, steps, seed, fn_index=0
49
  )
50
 
51
+
52
  return b64meta + ',' + encode_image_to_base64(result)
53
 
54
 
frontend/.svelte-kit/build/hooks.js ADDED
File without changes
frontend/.svelte-kit/build/index.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import root from '__GENERATED__/root.svelte';
3
+ import { respond } from '/workspaces/Drawing2Map/frontend/.svelte-kit/runtime/server/index.js';
4
+ import { set_paths, assets, base } from '/workspaces/Drawing2Map/frontend/.svelte-kit/runtime/paths.js';
5
+ import { set_prerendering } from '/workspaces/Drawing2Map/frontend/.svelte-kit/runtime/env.js';
6
+
7
+ const template = ({ head, body, assets, nonce }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js\"></script>\n\t\t" + head + "\n\t</head>\n\t<body class=\"\">\n\t\t" + body + "\n\t</body>\t\n</html>\n";
8
+
9
+ let read = null;
10
+
11
+ set_paths({"base":"/static","assets":""});
12
+
13
+ let default_protocol = 'https';
14
+
15
+ // allow paths to be globally overridden
16
+ // in svelte-kit preview and in prerendering
17
+ export function override(settings) {
18
+ default_protocol = settings.protocol || default_protocol;
19
+ set_paths(settings.paths);
20
+ set_prerendering(settings.prerendering);
21
+ read = settings.read;
22
+ }
23
+
24
+ export class Server {
25
+ constructor(manifest) {
26
+ this.options = {
27
+ csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}},
28
+ dev: false,
29
+ floc: false,
30
+ get_stack: error => String(error), // for security
31
+ handle_error: (error, event) => {
32
+ this.options.hooks.handleError({
33
+ error,
34
+ event,
35
+
36
+ // TODO remove for 1.0
37
+ // @ts-expect-error
38
+ get request() {
39
+ throw new Error('request in handleError has been replaced with event. See https://github.com/sveltejs/kit/pull/3384 for details');
40
+ }
41
+ });
42
+ error.stack = this.options.get_stack(error);
43
+ },
44
+ hooks: null,
45
+ hydrate: true,
46
+ manifest,
47
+ method_override: {"parameter":"_method","allowed":[]},
48
+ paths: { base, assets },
49
+ prefix: assets + '/_app/immutable/',
50
+ prerender: {
51
+ default: true,
52
+ enabled: true
53
+ },
54
+ read,
55
+ root,
56
+ service_worker: null,
57
+ router: true,
58
+ template,
59
+ template_contains_nonce: false,
60
+ trailing_slash: "never"
61
+ };
62
+ }
63
+
64
+ async respond(request, options = {}) {
65
+ if (!(request instanceof Request)) {
66
+ throw new Error('The first argument to server.respond must be a Request object. See https://github.com/sveltejs/kit/pull/3384 for details');
67
+ }
68
+
69
+ if (!this.options.hooks) {
70
+ const module = await import("./hooks.js");
71
+ this.options.hooks = {
72
+ getSession: module.getSession || (() => ({})),
73
+ handle: module.handle || (({ event, resolve }) => resolve(event)),
74
+ handleError: module.handleError || (({ error }) => console.error(error.stack)),
75
+ externalFetch: module.externalFetch || fetch
76
+ };
77
+ }
78
+
79
+ return respond(request, this.options, options);
80
+ }
81
+ }
frontend/.svelte-kit/output/client/_app/immutable/assets/pages/__layout.svelte-b67cf61d.css ADDED
@@ -0,0 +1 @@
 
 
1
+ @import"https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;500;600;700;800&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}html{font-family:Open Sans,sans-serif}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~="not-prose"] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~="not-prose"] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(ol):not(:where([class~="not-prose"] *)){list-style-type:decimal;padding-left:1.625em}.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)){list-style-type:upper-alpha}.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)){list-style-type:lower-alpha}.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)){list-style-type:upper-alpha}.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)){list-style-type:lower-alpha}.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)){list-style-type:upper-roman}.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)){list-style-type:lower-roman}.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)){list-style-type:upper-roman}.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~="not-prose"] *)){list-style-type:disc;padding-left:1.625em}.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker{color:var(--tw-prose-bullets)}.prose :where(hr):not(:where([class~="not-prose"] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~="not-prose"] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\201c""\201d""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(h1):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~="not-prose"] *)){font-weight:900}.prose :where(h2):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~="not-prose"] *)){font-weight:800}.prose :where(h3):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~="not-prose"] *)){font-weight:700}.prose :where(h4):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~="not-prose"] *)){font-weight:700}.prose :where(figure > *):not(:where([class~="not-prose"] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~="not-prose"] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose :where(a code):not(:where([class~="not-prose"] *)){color:var(--tw-prose-links)}.prose :where(pre code):not(:where([class~="not-prose"] *)):before{content:none}.prose :where(pre code):not(:where([class~="not-prose"] *)):after{content:none}.prose :where(table):not(:where([class~="not-prose"] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~="not-prose"] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~="not-prose"] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~="not-prose"] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~="not-prose"] *)){vertical-align:baseline;padding:.5714286em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(p):not(:where([class~="not-prose"] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(img):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(h2 code):not(:where([class~="not-prose"] *)){font-size:.875em}.prose :where(h3 code):not(:where([class~="not-prose"] *)){font-size:.9em}.prose :where(li):not(:where([class~="not-prose"] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol > li):not(:where([class~="not-prose"] *)){padding-left:.375em}.prose :where(ul > li):not(:where([class~="not-prose"] *)){padding-left:.375em}.prose>:where(ul > li p):not(:where([class~="not-prose"] *)){margin-top:.75em;margin-bottom:.75em}.prose>:where(ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose>:where(ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose>:where(ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose>:where(ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~="not-prose"] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(hr + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h2 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h3 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h4 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose :where(tbody td:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose :where(tbody td:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose>:where(:first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose>:where(:last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0px}.left-0{left:0px}.top-0{top:0px}.right-0{right:0px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mx-3{margin-left:-.75rem;margin-right:-.75rem}.mt-6{margin-top:1.5rem}.mb-2{margin-bottom:.5rem}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-\[512\/512\]{aspect-ratio:512/512}.h-0{height:0px}.h-full{height:100%}.max-h-\[9rem\]{max-height:9rem}.max-h-24{max-height:6rem}.w-0{width:0px}.w-full{width:100%}.max-w-full{max-width:100%}.max-w-\[3rem\]{max-width:3rem}.max-w-screen-md{max-width:768px}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-start{scroll-snap-align:start}.snap-always{scroll-snap-stop:always}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[2fr_1\.5fr\]{grid-template-columns:2fr 1.5fr}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-1{gap:.25rem}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-scroll{overflow:scroll}.overflow-x-scroll{overflow-x:scroll}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.p-3{padding:.75rem}.p-1{padding:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-2{padding-left:.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-6{line-height:1.5rem}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-30{opacity:.3}.outline{outline-style:solid}.outline-2{outline-width:2px}.outline-offset-\[-2px\]{outline-offset:-2px}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:outline:hover{outline-style:solid}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.disabled\:opacity-50:disabled{opacity:.5}@media (prefers-color-scheme: dark){.dark\:border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.dark\:bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}}@media (min-width: 530px){.sm\:max-h-\[none\]{max-height:none}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}}
frontend/.svelte-kit/output/client/_app/immutable/assets/pages/index.svelte-f2b33456.css ADDED
@@ -0,0 +1 @@
 
 
1
+ form.svelte-1gwcbp.svelte-1gwcbp{width:100%;overflow:hidden}.samples.svelte-1gwcbp.svelte-1gwcbp{display:flex;scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory;flex-wrap:nowrap;gap:.25rem;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none}.samples.svelte-1gwcbp.svelte-1gwcbp::-webkit-scrollbar{display:none}input[type=radio].svelte-1gwcbp.svelte-1gwcbp{position:absolute;display:none;height:0px;width:0px;opacity:0}input[type=radio].svelte-1gwcbp.svelte-1gwcbp:disabled{opacity:.5}input[type=radio].svelte-1gwcbp:checked~label.svelte-1gwcbp{outline-style:solid;outline-width:2px;outline-color:#eab308}input[type=radio].svelte-1gwcbp:disabled+label.svelte-1gwcbp{opacity:.5}label.svelte-1gwcbp.svelte-1gwcbp{display:flex;cursor:pointer;outline-width:2px;outline-offset:-2px;outline-color:#eab308;transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}label.svelte-1gwcbp.svelte-1gwcbp:hover{outline-style:solid}img.svelte-1gwcbp.svelte-1gwcbp{max-height:6rem;max-width:none}.colors.svelte-1oy4poo.svelte-1oy4poo{display:grid;max-height:9rem;scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;overflow:scroll}@media (min-width: 530px){.colors.svelte-1oy4poo.svelte-1oy4poo{max-height:none;grid-template-columns:repeat(3,minmax(0,1fr))}}.colors.svelte-1oy4poo span.svelte-1oy4poo{margin-left:.5rem}.colors.svelte-1oy4poo svg.svelte-1oy4poo{display:block}input[type=radio].svelte-1oy4poo.svelte-1oy4poo{position:absolute;display:none;height:0px;width:0px;opacity:0}input[type=radio].svelte-1oy4poo:checked~label.svelte-1oy4poo{outline-style:solid;outline-width:2px;outline-color:#eab308}label.svelte-1oy4poo.svelte-1oy4poo{display:flex;cursor:pointer;white-space:nowrap;outline-width:2px;outline-offset:-2px;outline-color:#eab308;transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}label.svelte-1oy4poo.svelte-1oy4poo:hover{outline-style:solid}.brush.svelte-1oy4poo.svelte-1oy4poo{display:flex}select.svelte-7to72y.svelte-7to72y,button.svelte-7to72y.svelte-7to72y,input.svelte-7to72y.svelte-7to72y{border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}select.svelte-7to72y.svelte-7to72y:focus,button.svelte-7to72y.svelte-7to72y:focus,input.svelte-7to72y.svelte-7to72y:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity)) }select.svelte-7to72y.svelte-7to72y:disabled,button.svelte-7to72y.svelte-7to72y:disabled,input.svelte-7to72y.svelte-7to72y:disabled{opacity:.5}@media (prefers-color-scheme: dark){select.svelte-7to72y.svelte-7to72y,button.svelte-7to72y.svelte-7to72y,input.svelte-7to72y.svelte-7to72y{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}select.svelte-7to72y.svelte-7to72y:focus,button.svelte-7to72y.svelte-7to72y:focus,input.svelte-7to72y.svelte-7to72y:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity)) }}input.svelte-7to72y:disabled+label.svelte-7to72y{opacity:.5}input.svelte-7to72y.svelte-7to72y{padding-left:.75rem}.canvas.svelte-vhujxn{z-index:0;aspect-ratio:512/512;width:100%;max-width:100%;border-width:1px;--tw-border-opacity:1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.brush.svelte-vhujxn{pointer-events:none;position:absolute;z-index:10;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.label.svelte-vhujxn{pointer-events:none;position:absolute;top:0px;left:0px;z-index:20;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-left:.5rem;padding-right:.5rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity));color:#fff;font-weight:bolder;-webkit-text-stroke:1px black;-webkit-text-fill-color:white}.image.svelte-1t0h0rs{z-index:0;box-sizing:border-box;aspect-ratio:512/512;border-width:1px;--tw-border-opacity:1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}@media (prefers-color-scheme: dark){.image.svelte-1t0h0rs{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}}.loading.svelte-1t0h0rs{position:absolute;top:0px;left:0px;right:0px;bottom:0px;display:flex;flex-direction:column;align-items:center;justify-content:center}.drawings.svelte-1sy339h{display:grid;grid-template-columns:2fr 1.5fr;place-items:center}@media (min-width: 530px){.drawings.svelte-1sy339h{grid-template-columns:repeat(2,minmax(0,1fr))}}button.svelte-1sy339h{border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}button.svelte-1sy339h:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))}button.svelte-1sy339h:disabled{opacity:.5}@media (prefers-color-scheme: dark){button.svelte-1sy339h{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}button.svelte-1sy339h:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))}}.green.svelte-1sy339h{background-color:#90ee90;font-weight:700;font-size:1.2em}
frontend/.svelte-kit/output/client/_app/immutable/chunks/index-bcf2726a.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function N(){}function H(t,n){for(const e in n)t[e]=n[e];return t}function B(t){return t()}function M(){return Object.create(null)}function p(t){t.forEach(B)}function I(t){return typeof t=="function"}function lt(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}let g;function ot(t,n){return g||(g=document.createElement("a")),g.href=n,t===g.href}function W(t){return Object.keys(t).length===0}function G(t,...n){if(t==null)return N;const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function st(t,n,e){t.$$.on_destroy.push(G(n,e))}function at(t,n,e,i){if(t){const c=L(t,n,e,i);return t[0](c)}}function L(t,n,e,i){return t[1]&&i?H(e.ctx.slice(),t[1](i(n))):e.ctx}function ft(t,n,e,i){if(t[2]&&i){const c=t[2](i(e));if(n.dirty===void 0)return c;if(typeof c=="object"){const s=[],u=Math.max(n.dirty.length,c.length);for(let l=0;l<u;l+=1)s[l]=n.dirty[l]|c[l];return s}return n.dirty|c}return n.dirty}function _t(t,n,e,i,c,s){if(c){const u=L(n,e,i,s);t.p(u,c)}}function dt(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let i=0;i<e;i++)n[i]=-1;return n}return-1}function ht(t,n,e){return t.set(e),n}let w=!1;function J(){w=!0}function K(){w=!1}function Q(t,n,e,i){for(;t<n;){const c=t+(n-t>>1);e(c)<=i?t=c+1:n=c}return t}function R(t){if(t.hydrate_init)return;t.hydrate_init=!0;let n=t.childNodes;if(t.nodeName==="HEAD"){const r=[];for(let o=0;o<n.length;o++){const f=n[o];f.claim_order!==void 0&&r.push(f)}n=r}const e=new Int32Array(n.length+1),i=new Int32Array(n.length);e[0]=-1;let c=0;for(let r=0;r<n.length;r++){const o=n[r].claim_order,f=(c>0&&n[e[c]].claim_order<=o?c+1:Q(1,c,y=>n[e[y]].claim_order,o))-1;i[r]=e[f]+1;const a=f+1;e[a]=r,c=Math.max(a,c)}const s=[],u=[];let l=n.length-1;for(let r=e[c]+1;r!=0;r=i[r-1]){for(s.push(n[r-1]);l>=r;l--)u.push(n[l]);l--}for(;l>=0;l--)u.push(n[l]);s.reverse(),u.sort((r,o)=>r.claim_order-o.claim_order);for(let r=0,o=0;r<u.length;r++){for(;o<s.length&&u[r].claim_order>=s[o].claim_order;)o++;const f=o<s.length?s[o]:null;t.insertBefore(u[r],f)}}function U(t,n){if(w){for(R(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;n!==t.actual_end_child?(n.claim_order!==void 0||n.parentNode!==t)&&t.insertBefore(n,t.actual_end_child):t.actual_end_child=n.nextSibling}else(n.parentNode!==t||n.nextSibling!==null)&&t.appendChild(n)}function mt(t,n,e){w&&!e?U(t,n):(n.parentNode!==t||n.nextSibling!=e)&&t.insertBefore(n,e||null)}function V(t){t.parentNode.removeChild(t)}function pt(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}function X(t){return document.createElement(t)}function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function j(t){return document.createTextNode(t)}function yt(){return j(" ")}function gt(){return j("")}function bt(t,n,e,i){return t.addEventListener(n,e,i),()=>t.removeEventListener(n,e,i)}function xt(t){return function(n){return n.preventDefault(),t.call(this,n)}}function $t(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function wt(t){return t===""?null:+t}function Z(t){return Array.from(t.childNodes)}function tt(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function O(t,n,e,i,c=!1){tt(t);const s=(()=>{for(let u=t.claim_info.last_index;u<t.length;u++){const l=t[u];if(n(l)){const r=e(l);return r===void 0?t.splice(u,1):t[u]=r,c||(t.claim_info.last_index=u),l}}for(let u=t.claim_info.last_index-1;u>=0;u--){const l=t[u];if(n(l)){const r=e(l);return r===void 0?t.splice(u,1):t[u]=r,c?r===void 0&&t.claim_info.last_index--:t.claim_info.last_index=u,l}}return i()})();return s.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,s}function P(t,n,e,i){return O(t,c=>c.nodeName===n,c=>{const s=[];for(let u=0;u<c.attributes.length;u++){const l=c.attributes[u];e[l.name]||s.push(l.name)}s.forEach(u=>c.removeAttribute(u))},()=>i(n))}function vt(t,n,e){return P(t,n,e,X)}function Et(t,n,e){return P(t,n,e,Y)}function nt(t,n){return O(t,e=>e.nodeType===3,e=>{const i=""+n;if(e.data.startsWith(i)){if(e.data.length!==i.length)return e.splitText(i.length)}else e.data=i},()=>j(n),!0)}function kt(t){return nt(t," ")}function Nt(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function jt(t,n){t.value=n==null?"":n}function St(t,n,e,i){e===null?t.style.removeProperty(n):t.style.setProperty(n,e,i?"important":"")}let m;function h(t){m=t}function S(){if(!m)throw new Error("Function called outside component initialization");return m}function At(t){S().$$.on_mount.push(t)}function Ct(t){S().$$.after_update.push(t)}function Mt(t,n){return S().$$.context.set(t,n),n}const d=[],T=[],x=[],q=[],D=Promise.resolve();let E=!1;function z(){E||(E=!0,D.then(F))}function Tt(){return z(),D}function k(t){x.push(t)}const v=new Set;let b=0;function F(){const t=m;do{for(;b<d.length;){const n=d[b];b++,h(n),et(n.$$)}for(h(null),d.length=0,b=0;T.length;)T.pop()();for(let n=0;n<x.length;n+=1){const e=x[n];v.has(e)||(v.add(e),e())}x.length=0}while(d.length);for(;q.length;)q.pop()();E=!1,v.clear(),h(t)}function et(t){if(t.fragment!==null){t.update(),p(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(k)}}const $=new Set;let _;function qt(){_={r:0,c:[],p:_}}function Bt(){_.r||p(_.c),_=_.p}function it(t,n){t&&t.i&&($.delete(t),t.i(n))}function Lt(t,n,e,i){if(t&&t.o){if($.has(t))return;$.add(t),_.c.push(()=>{$.delete(t),i&&(e&&t.d(1),i())}),t.o(n)}}function Ot(t,n){const e={},i={},c={$$scope:1};let s=t.length;for(;s--;){const u=t[s],l=n[s];if(l){for(const r in u)r in l||(i[r]=1);for(const r in l)c[r]||(e[r]=l[r],c[r]=1);t[s]=l}else for(const r in u)c[r]=1}for(const u in i)u in e||(e[u]=void 0);return e}function Pt(t){return typeof t=="object"&&t!==null?t:{}}function Dt(t){t&&t.c()}function zt(t,n){t&&t.l(n)}function rt(t,n,e,i){const{fragment:c,on_mount:s,on_destroy:u,after_update:l}=t.$$;c&&c.m(n,e),i||k(()=>{const r=s.map(B).filter(I);u?u.push(...r):p(r),t.$$.on_mount=[]}),l.forEach(k)}function ct(t,n){const e=t.$$;e.fragment!==null&&(p(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function ut(t,n){t.$$.dirty[0]===-1&&(d.push(t),z(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function Ft(t,n,e,i,c,s,u,l=[-1]){const r=m;h(t);const o=t.$$={fragment:null,ctx:null,props:s,update:N,not_equal:c,bound:M(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(r?r.$$.context:[])),callbacks:M(),dirty:l,skip_bound:!1,root:n.target||r.$$.root};u&&u(o.root);let f=!1;if(o.ctx=e?e(t,n.props||{},(a,y,...A)=>{const C=A.length?A[0]:y;return o.ctx&&c(o.ctx[a],o.ctx[a]=C)&&(!o.skip_bound&&o.bound[a]&&o.bound[a](C),f&&ut(t,a)),y}):[],o.update(),f=!0,p(o.before_update),o.fragment=i?i(o.ctx):!1,n.target){if(n.hydrate){J();const a=Z(n.target);o.fragment&&o.fragment.l(a),a.forEach(V)}else o.fragment&&o.fragment.c();n.intro&&it(t.$$.fragment),rt(t,n.target,n.anchor,n.customElement),K(),F()}h(r)}class Ht{$destroy(){ct(this,1),this.$destroy=N}$on(n,e){const i=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return i.push(e),()=>{const c=i.indexOf(e);c!==-1&&i.splice(c,1)}}$set(n){this.$$set&&!W(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}export{Pt as A,ct as B,H as C,Tt as D,N as E,at as F,_t as G,dt as H,ft as I,U as J,ot as K,bt as L,pt as M,st as N,ht as O,Y as P,Et as Q,jt as R,Ht as S,xt as T,p as U,wt as V,T as W,Z as a,$t as b,vt as c,V as d,X as e,St as f,mt as g,nt as h,Ft as i,Nt as j,yt as k,gt as l,kt as m,qt as n,Lt as o,Bt as p,it as q,Mt as r,lt as s,j as t,Ct as u,At as v,Dt as w,zt as x,rt as y,Ot as z};
frontend/.svelte-kit/output/client/_app/immutable/chunks/paths-d3bcbd10.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{E as f,s as p}from"./index-bcf2726a.js";const n=[];function _(t,b=f){let o;const i=new Set;function r(e){if(p(t,e)&&(t=e,o)){const c=!n.length;for(const s of i)s[1](),n.push(s,t);if(c){for(let s=0;s<n.length;s+=2)n[s][0](n[s+1]);n.length=0}}}function a(e){r(e(t))}function l(e,c=f){const s=[e,c];return i.add(s),i.size===1&&(o=b(r)||f),e(t),()=>{i.delete(s),i.size===0&&(o(),o=null)}}return{set:r,update:a,subscribe:l}}let u="",d="";function g(t){u=t.base,d=t.assets||u}export{d as a,u as b,g as s,_ as w};
frontend/.svelte-kit/output/client/_app/immutable/error.svelte-d9523301.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as w,i as y,s as z,e as E,t as v,c as d,a as b,h as P,d as o,g as u,J as R,j as N,k as S,l as C,m as j,E as H}from"./chunks/index-bcf2726a.js";function J(r){let l,t=r[1].frame+"",a;return{c(){l=E("pre"),a=v(t)},l(f){l=d(f,"PRE",{});var s=b(l);a=P(s,t),s.forEach(o)},m(f,s){u(f,l,s),R(l,a)},p(f,s){s&2&&t!==(t=f[1].frame+"")&&N(a,t)},d(f){f&&o(l)}}}function h(r){let l,t=r[1].stack+"",a;return{c(){l=E("pre"),a=v(t)},l(f){l=d(f,"PRE",{});var s=b(l);a=P(s,t),s.forEach(o)},m(f,s){u(f,l,s),R(l,a)},p(f,s){s&2&&t!==(t=f[1].stack+"")&&N(a,t)},d(f){f&&o(l)}}}function A(r){let l,t,a,f,s=r[1].message+"",c,k,n,p,i=r[1].frame&&J(r),_=r[1].stack&&h(r);return{c(){l=E("h1"),t=v(r[0]),a=S(),f=E("pre"),c=v(s),k=S(),i&&i.c(),n=S(),_&&_.c(),p=C()},l(e){l=d(e,"H1",{});var m=b(l);t=P(m,r[0]),m.forEach(o),a=j(e),f=d(e,"PRE",{});var q=b(f);c=P(q,s),q.forEach(o),k=j(e),i&&i.l(e),n=j(e),_&&_.l(e),p=C()},m(e,m){u(e,l,m),R(l,t),u(e,a,m),u(e,f,m),R(f,c),u(e,k,m),i&&i.m(e,m),u(e,n,m),_&&_.m(e,m),u(e,p,m)},p(e,[m]){m&1&&N(t,e[0]),m&2&&s!==(s=e[1].message+"")&&N(c,s),e[1].frame?i?i.p(e,m):(i=J(e),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),e[1].stack?_?_.p(e,m):(_=h(e),_.c(),_.m(p.parentNode,p)):_&&(_.d(1),_=null)},i:H,o:H,d(e){e&&o(l),e&&o(a),e&&o(f),e&&o(k),i&&i.d(e),e&&o(n),_&&_.d(e),e&&o(p)}}}function F({error:r,status:l}){return{props:{error:r,status:l}}}function B(r,l,t){let{status:a}=l,{error:f}=l;return r.$$set=s=>{"status"in s&&t(0,a=s.status),"error"in s&&t(1,f=s.error)},[a,f]}class G extends w{constructor(l){super(),y(this,l,B,A,z,{status:0,error:1})}}export{G as default,F as load};
frontend/.svelte-kit/output/client/_app/immutable/manifest.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ ".svelte-kit/runtime/client/start.js": {
3
+ "file": "start-1d6beeeb.js",
4
+ "src": ".svelte-kit/runtime/client/start.js",
5
+ "isEntry": true,
6
+ "imports": [
7
+ "_index-bcf2726a.js",
8
+ "_paths-d3bcbd10.js"
9
+ ],
10
+ "dynamicImports": [
11
+ "src/routes/__layout.svelte",
12
+ ".svelte-kit/runtime/components/error.svelte",
13
+ "src/routes/index.svelte"
14
+ ]
15
+ },
16
+ "src/routes/__layout.svelte": {
17
+ "file": "pages/__layout.svelte-f5a1b718.js",
18
+ "src": "src/routes/__layout.svelte",
19
+ "isEntry": true,
20
+ "isDynamicEntry": true,
21
+ "imports": [
22
+ "_index-bcf2726a.js"
23
+ ],
24
+ "css": [
25
+ "assets/pages/__layout.svelte-b67cf61d.css"
26
+ ]
27
+ },
28
+ ".svelte-kit/runtime/components/error.svelte": {
29
+ "file": "error.svelte-d9523301.js",
30
+ "src": ".svelte-kit/runtime/components/error.svelte",
31
+ "isEntry": true,
32
+ "isDynamicEntry": true,
33
+ "imports": [
34
+ "_index-bcf2726a.js"
35
+ ]
36
+ },
37
+ "src/routes/index.svelte": {
38
+ "file": "pages/index.svelte-1f940fb6.js",
39
+ "src": "src/routes/index.svelte",
40
+ "isEntry": true,
41
+ "isDynamicEntry": true,
42
+ "imports": [
43
+ "_index-bcf2726a.js",
44
+ "_paths-d3bcbd10.js"
45
+ ],
46
+ "css": [
47
+ "assets/pages/index.svelte-f2b33456.css"
48
+ ]
49
+ },
50
+ "_index-bcf2726a.js": {
51
+ "file": "chunks/index-bcf2726a.js"
52
+ },
53
+ "_paths-d3bcbd10.js": {
54
+ "file": "chunks/paths-d3bcbd10.js",
55
+ "imports": [
56
+ "_index-bcf2726a.js"
57
+ ]
58
+ }
59
+ }
frontend/.svelte-kit/output/client/_app/immutable/pages/__layout.svelte-f5a1b718.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as n,i,s as p,F as l,G as w,H as c,I as d,q as h,o as m}from"../chunks/index-bcf2726a.js";function g(s){let o;const a=s[1].default,t=l(a,s,s[0],null);return{c(){t&&t.c()},l(e){t&&t.l(e)},m(e,r){t&&t.m(e,r),o=!0},p(e,[r]){t&&t.p&&(!o||r&1)&&w(t,a,e,e[0],o?d(a,e[0],r,null):c(e[0]),null)},i(e){o||(h(t,e),o=!0)},o(e){m(t,e),o=!1},d(e){t&&t.d(e)}}}function b(s,o,a){let{$$slots:t={},$$scope:e}=o;return s.$$set=r=>{"$$scope"in r&&a(0,e=r.$$scope)},[e,t]}class u extends n{constructor(o){super(),i(this,o,b,g,p,{})}}export{u as default};
frontend/.svelte-kit/output/client/_app/immutable/pages/index.svelte-1f940fb6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as se,i as ne,s as ie,e as C,k as A,c as T,a as z,m as D,d as I,b as s,K as Oe,g as Z,J as p,t as V,h as F,L as U,E as Q,M as Ne,N as Y,O as K,P as me,Q as ge,j as Le,f as $e,R as oe,T as Se,U as Ue,V as ct,W as Re,w as ue,x as pe,y as de,q as he,o as fe,B as ve,v as ut}from"../chunks/index-bcf2726a.js";import{w as ae,b as at}from"../chunks/paths-d3bcbd10.js";const Pe=[{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"}],Be=["/samples/default.jpg","/samples/example0.png","/samples/example1.png","/samples/example2.png","/samples/example3.png","/samples/example4.png","/samples/example5.png","/samples/example6.jpg"],ke=[["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 _e=ae(new Map),je=ae(),Ae=ae(),De=ae(),xe=ae(),Ie=ae({prompt:"Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",modifier:ke[0][0],seed:st(),steps:20}),be=ae(!1),Me=ae(!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,n,d,i,k,E,b,P;return{c(){e=C("div"),t=C("input"),n=A(),d=C("label"),i=C("img"),P=A(),this.h()},l(g){e=T(g,"DIV",{class:!0});var v=z(e);t=T(v,"INPUT",{type:!0,name:!0,id:!0,class:!0}),n=D(v),d=T(v,"LABEL",{for:!0,class:!0});var x=z(d);i=T(x,"IMG",{src:!0,alt:!0,class:!0}),x.forEach(I),P=D(v),v.forEach(I),this.h()},h(){s(t,"type","radio"),s(t,"name","samples"),s(t,"id",r="sample-"+l[5]),t.value=a=l[5],t.disabled=o=l[0]===!0,s(t,"class","svelte-1gwcbp"),Oe(i.src,k=at+l[3])||s(i,"src",k),s(i,"alt",E=l[3]),s(i,"class","svelte-1gwcbp"),s(d,"for",b="sample-"+l[5]),s(d,"class","svelte-1gwcbp"),s(e,"class","snap-always snap-start")},m(g,v){Z(g,e,v),p(e,t),p(e,n),p(e,d),p(d,i),p(e,P)},p(g,v){v&1&&o!==(o=g[0]===!0)&&(t.disabled=o)},d(g){g&&I(e)}}}function pt(l){let e,t,r,a,o,n,d,i,k=Be,E=[];for(let b=0;b<k.length;b+=1)E[b]=Je(Ye(l,k,b));return{c(){e=C("div"),t=C("h4"),r=V("Select a Template"),a=A(),o=C("form"),n=C("div");for(let b=0;b<E.length;b+=1)E[b].c();this.h()},l(b){e=T(b,"DIV",{});var P=z(e);t=T(P,"H4",{class:!0});var g=z(t);r=F(g,"Select a Template"),g.forEach(I),a=D(P),o=T(P,"FORM",{class:!0});var v=z(o);n=T(v,"DIV",{class:!0});var x=z(n);for(let u=0;u<E.length;u+=1)E[u].l(x);x.forEach(I),v.forEach(I),P.forEach(I),this.h()},h(){s(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(n,"class","samples svelte-1gwcbp"),s(o,"class","svelte-1gwcbp")},m(b,P){Z(b,e,P),p(e,t),p(t,r),p(e,a),p(e,o),p(o,n);for(let g=0;g<E.length;g+=1)E[g].m(n,null);d||(i=U(o,"input",l[1]),d=!0)},p(b,[P]){if(P&1){k=Be;let g;for(g=0;g<k.length;g+=1){const v=Ye(b,k,g);E[g]?E[g].p(v,P):(E[g]=Je(v),E[g].c(),E[g].m(n,null))}for(;g<E.length;g+=1)E[g].d(1);E.length=k.length}},i:Q,o:Q,d(b){b&&I(e),Ne(E,b),d=!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 Y(l,De,n=>t(2,r=n)),Y(l,be,n=>t(0,a=n)),[a,async n=>{n.preventDefault();const d=Be[parseInt(n.target.value)];if(d){const i=await fetch(at+d).then(E=>E.blob()),k=await dt(i);K(De,r=k,r)}}]}class ft extends se{constructor(e){super(),ne(this,e,ht,pt,ie,{})}}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,n,d,i,k,E,b,P,g=l[2].label+"",v,x,u;return{c(){e=C("div"),t=C("input"),n=A(),d=C("label"),i=me("svg"),k=me("rect"),b=A(),P=C("span"),v=V(g),u=A(),this.h()},l(f){e=T(f,"DIV",{class:!0});var h=z(e);t=T(h,"INPUT",{name:!0,type:!0,id:!0,class:!0}),n=D(h),d=T(h,"LABEL",{for:!0,class:!0});var c=z(d);i=ge(c,"svg",{width:!0,height:!0,viewBox:!0,class:!0});var m=z(i);k=ge(m,"rect",{x:!0,y:!0,width:!0,height:!0,fill:!0}),z(k).forEach(I),m.forEach(I),b=D(c),P=T(c,"SPAN",{class:!0});var w=z(P);v=F(w,g),w.forEach(I),c.forEach(I),u=D(h),h.forEach(I),this.h()},h(){s(t,"name","color"),t.checked=r=l[7]==nt,s(t,"type","radio"),s(t,"id",a="color-"+l[7]),t.value=o=l[7],s(t,"class","svelte-1oy4poo"),s(k,"x","0"),s(k,"y","0"),s(k,"width","20"),s(k,"height","20"),s(k,"fill",E="rgb("+l[2].color.join(",")+")"),s(i,"width","20"),s(i,"height","20"),s(i,"viewBox","0 0 20 20"),s(i,"class","svelte-1oy4poo"),s(P,"class","svelte-1oy4poo"),s(d,"for",x="color-"+l[7]),s(d,"class","svelte-1oy4poo"),s(e,"class","snap-always snap-start")},m(f,h){Z(f,e,h),p(e,t),p(e,n),p(e,d),p(d,i),p(i,k),p(d,b),p(d,P),p(P,v),p(e,u)},p:Q,d(f){f&&I(e)}}}function vt(l){let e,t,r,a,o,n,d,i,k,E,b,P,g,v=l[0].size+"",x,u,f,h=Pe,c=[];for(let m=0;m<h.length;m+=1)c[m]=Ke(Xe(l,h,m));return{c(){e=C("form"),t=C("h4"),r=V("Brush Type"),a=A(),o=C("div");for(let m=0;m<c.length;m+=1)c[m].c();n=A(),d=C("h4"),i=V("Brush Size"),k=A(),E=C("div"),b=C("input"),P=A(),g=C("label"),x=V(v),this.h()},l(m){e=T(m,"FORM",{});var w=z(e);t=T(w,"H4",{class:!0});var y=z(t);r=F(y,"Brush Type"),y.forEach(I),a=D(w),o=T(w,"DIV",{class:!0,name:!0});var M=z(o);for(let B=0;B<c.length;B+=1)c[B].l(M);M.forEach(I),n=D(w),d=T(w,"H4",{class:!0});var _=z(d);i=F(_,"Brush Size"),_.forEach(I),k=D(w),E=T(w,"DIV",{class:!0});var S=z(E);b=T(S,"INPUT",{min:!0,max:!0,step:!0,name:!0,type:!0}),P=D(S),g=T(S,"LABEL",{class:!0,for:!0});var N=z(g);x=F(N,v),N.forEach(I),S.forEach(I),w.forEach(I),this.h()},h(){s(t,"class","font-bold mt-6 mb-2 leading-6 my-3"),s(o,"class","colors svelte-1oy4poo"),s(o,"name","colors"),s(d,"class","font-bold mt-6 mb-2 my-6 leading-6"),b.value="10",s(b,"min","1"),s(b,"max","150"),s(b,"step","1"),s(b,"name","brush"),s(b,"type","range"),s(g,"class","pl-2 svelte-1oy4poo"),s(g,"for","brush"),s(E,"class","brush svelte-1oy4poo")},m(m,w){Z(m,e,w),p(e,t),p(t,r),p(e,a),p(e,o);for(let y=0;y<c.length;y+=1)c[y].m(o,null);p(e,n),p(e,d),p(d,i),p(e,k),p(e,E),p(E,b),p(E,P),p(E,g),p(g,x),u||(f=U(e,"input",l[1]),u=!0)},p(m,[w]){if(w&0){h=Pe;let y;for(y=0;y<h.length;y+=1){const M=Xe(m,h,y);c[y]?c[y].p(M,w):(c[y]=Ke(M),c[y].c(),c[y].m(o,null))}for(;y<c.length;y+=1)c[y].d(1);c.length=h.length}w&1&&v!==(v=m[0].size+"")&&Le(x,v)},i:Q,o:Q,d(m){m&&I(e),Ne(c,m),u=!1,f()}}}const nt=6;function mt(l,e,t){let r;Y(l,xe,k=>t(0,r=k));const{color:a,label:o}=Pe[nt];let n=`rgb(${a.join(",")})`,d=40;return K(xe,r={color:n,size:d,label:o},r),[r,async k=>{const E=k.target;if(E.name==="color"){const b=parseInt(E.value),{color:P,label:g}=Pe[b];n=`rgb(${P.join(",")})`,K(xe,r={color:n,size:d,label:g},r)}else E.name==="brush"&&(d=parseInt(E.value),K(xe,r={color:n,size:d,label:o},r))},a]}class gt extends se{constructor(e){super(),ne(this,e,mt,vt,ie,{})}}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=C("option"),r=V(t),o=V("`"),this.h()},l(n){e=T(n,"OPTION",{});var d=z(e);r=F(d,t),d.forEach(I),o=F(n,"`"),this.h()},h(){e.__value=a=l[15][0],e.value=e.__value},m(n,d){Z(n,e,d),p(e,r),Z(n,o,d)},p:Q,d(n){n&&I(e),n&&I(o)}}}function bt(l){let e,t,r,a,o,n,d,i,k,E,b,P,g,v,x,u,f,h,c,m,w,y,M,_,S,N,B,q,$,J,te,X,O,L,re,ee,le,ce,ye,W=ke,G=[];for(let j=0;j<W.length;j+=1)G[j]=Qe(Ze(l,W,j));return{c(){e=C("form"),t=C("h4"),r=V("Prompt"),a=A(),o=C("input"),d=A(),i=C("h4"),k=V("Modifier"),E=A(),b=C("input"),g=A(),v=C("select"),x=C("option"),u=V("preset");for(let j=0;j<G.length;j+=1)G[j].c();h=A(),c=C("h4"),m=V("Random Seed"),w=A(),y=C("input"),_=A(),S=C("button"),N=V("Random"),q=A(),$=C("h4"),J=V("Sample Steps"),te=A(),X=C("div"),O=C("input"),re=A(),ee=C("label"),le=V(l[2]),this.h()},l(j){e=T(j,"FORM",{});var R=z(e);t=T(R,"H4",{class:!0});var H=z(t);r=F(H,"Prompt"),H.forEach(I),a=D(R),o=T(R,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),d=D(R),i=T(R,"H4",{class:!0});var we=z(i);k=F(we,"Modifier"),we.forEach(I),E=D(R),b=T(R,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),g=D(R),v=T(R,"SELECT",{name:!0,class:!0});var Ce=z(v);x=T(Ce,"OPTION",{});var Ve=z(x);u=F(Ve,"preset"),Ve.forEach(I);for(let Te=0;Te<G.length;Te+=1)G[Te].l(Ce);Ce.forEach(I),h=D(R),c=T(R,"H4",{class:!0});var Fe=z(c);m=F(Fe,"Random Seed"),Fe.forEach(I),w=D(R),y=T(R,"INPUT",{type:!0,name:!0,placeholder:!0,class:!0}),_=D(R),S=T(R,"BUTTON",{class:!0});var Ge=z(S);N=F(Ge,"Random"),Ge.forEach(I),q=D(R),$=T(R,"H4",{class:!0});var He=z($);J=F(He,"Sample Steps"),He.forEach(I),te=D(R),X=T(R,"DIV",{class:!0});var Ee=z(X);O=T(Ee,"INPUT",{type:!0,name:!0,min:!0,max:!0,step:!0,class:!0}),re=D(Ee),ee=T(Ee,"LABEL",{class:!0,for:!0});var qe=z(ee);le=F(qe,l[2]),qe.forEach(I),Ee.forEach(I),R.forEach(I),this.h()},h(){s(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(o,"name","prompt"),s(o,"placeholder","Aerial view of ..., France."),o.disabled=n=l[6]===!0,$e(o,"width","500px"),s(o,"class","svelte-7to72y"),s(i,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(b,"name","modifier"),s(b,"placeholder","High resolution satellite image"),b.disabled=P=l[6]===!0,$e(b,"width","500px"),s(b,"class","svelte-7to72y"),x.disabled=!0,x.selected=!0,x.__value="preset",x.value=x.__value,s(v,"name","presets"),v.disabled=f=l[6]===!0,s(v,"class","svelte-7to72y"),s(c,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(y,"type","Number"),s(y,"name","seed"),s(y,"placeholder","Integer Seed"),y.disabled=M=l[6]===!0,s(y,"class","svelte-7to72y"),S.disabled=B=l[6]===!0,s(S,"class","svelte-7to72y"),s($,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(O,"type","range"),s(O,"name","steps"),s(O,"min","10"),s(O,"max","30"),s(O,"step","1"),O.disabled=L=l[6]===!0,s(O,"class","svelte-7to72y"),s(ee,"class","pl-2 svelte-7to72y"),s(ee,"for","steps"),s(X,"class","flex")},m(j,R){Z(j,e,R),p(e,t),p(t,r),p(e,a),p(e,o),oe(o,l[3]),p(e,d),p(e,i),p(i,k),p(e,E),p(e,b),oe(b,l[4]),p(e,g),p(e,v),p(v,x),p(x,u);for(let H=0;H<G.length;H+=1)G[H].m(v,null);p(e,h),p(e,c),p(c,m),p(e,w),p(e,y),oe(y,l[1]),p(e,_),p(e,S),p(S,N),p(e,q),p(e,$),p($,J),p(e,te),p(e,X),p(X,O),oe(O,l[2]),p(X,re),p(X,ee),p(ee,le),l[14](e),ce||(ye=[U(o,"input",l[8]),U(b,"input",l[9]),U(v,"change",l[10]),U(y,"input",l[11]),U(S,"click",Se(l[12])),U(O,"change",l[13]),U(O,"input",l[13]),U(e,"input",l[7])],ce=!0)},p(j,[R]){if(R&64&&n!==(n=j[6]===!0)&&(o.disabled=n),R&8&&o.value!==j[3]&&oe(o,j[3]),R&64&&P!==(P=j[6]===!0)&&(b.disabled=P),R&16&&b.value!==j[4]&&oe(b,j[4]),R&0){W=ke;let H;for(H=0;H<W.length;H+=1){const we=Ze(j,W,H);G[H]?G[H].p(we,R):(G[H]=Qe(we),G[H].c(),G[H].m(v,null))}for(;H<G.length;H+=1)G[H].d(1);G.length=W.length}R&64&&f!==(f=j[6]===!0)&&(v.disabled=f),R&64&&M!==(M=j[6]===!0)&&(y.disabled=M),R&2&&oe(y,j[1]),R&64&&B!==(B=j[6]===!0)&&(S.disabled=B),R&64&&L!==(L=j[6]===!0)&&(O.disabled=L),R&4&&oe(O,j[2]),R&4&&Le(le,j[2])},i:Q,o:Q,d(j){j&&I(e),Ne(G,j),l[14](null),ce=!1,Ue(ye)}}}function yt(l,e,t){let r,a;Y(l,Ie,h=>t(5,r=h)),Y(l,be,h=>t(6,a=h));function o(){const h=n.elements;K(Ie,r={prompt:h.prompt.value,modifier:h.modifier.value,seed:BigInt(h.seed.value),steps:parseInt(h.steps.value)},r)}let n,d=r.seed,i=r.steps,k=r.prompt,E=r.modifier;function b(){k=this.value,t(3,k)}function P(){E=this.value,t(4,E)}const g=h=>{const c=h.currentTarget.selectedIndex-1;t(4,E=ke[c][0]),K(Ie,r.modifier=ke[c][0],r)};function v(){d=this.value,t(1,d)}const x=()=>{t(1,d=st()),o()};function u(){i=ct(this.value),t(2,i)}function f(h){Re[h?"unshift":"push"](()=>{n=h,t(0,n)})}return[n,d,i,k,E,r,a,o,b,P,g,v,x,u,f]}class wt extends se{constructor(e){super(),ne(this,e,yt,bt,ie,{})}}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 n=r[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=t,a.c=r,a.d=function(o,n,d){a.o(o,n)||Object.defineProperty(o,n,{enumerable:!0,get:d})},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,n){if(1&n&&(o=a(o)),8&n||4&n&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(a.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&n&&typeof o!="string")for(var i in o)a.d(d,i,function(k){return o[k]}.bind(null,i));return d},a.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(n,"a",n),n},a.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)},a.p="",a(a.s=0)}([function(t,r,a){function o(g,v){return function(x){if(Array.isArray(x))return x}(g)||function(x,u){if(Symbol.iterator in Object(x)||Object.prototype.toString.call(x)==="[object Arguments]"){var f=[],h=!0,c=!1,m=void 0;try{for(var w,y=x[Symbol.iterator]();!(h=(w=y.next()).done)&&(f.push(w.value),!u||f.length!==u);h=!0);}catch(M){c=!0,m=M}finally{try{h||y.return==null||y.return()}finally{if(c)throw m}}return f}}(g,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function n(g){return function(v){if(Array.isArray(v)){for(var x=0,u=new Array(v.length);x<v.length;x++)u[x]=v[x];return u}}(g)||function(v){if(Symbol.iterator in Object(v)||Object.prototype.toString.call(v)==="[object Arguments]")return Array.from(v)}(g)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(g,v){for(var x=0;x<v.length;x++){var u=v[x];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}a.r(r);var i=/^#?[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}$/,k=/^rgb\((\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3}(\s+)?\)$/,E=function(){function g(){(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,g),this.canvases={}}var v,x;return v=g,(x=[{key:"parseColor",value:function(u){var f=i.test(u),h=k.test(u);if(!f&&!h)throw new Error("Color is not correct format. #123123 or rgb(123, 123, 123) format required.");if(f){var c=u[0]==="#"?u.slice(1):u;return c=c.length===3?c.split("").reduce(function(_,S){return[].concat(n(_),[S,S])},[]).join(""):c,{r:parseInt(c.slice(0,2),16),g:parseInt(c.slice(2,4),16),b:parseInt(c.slice(4,6),16)}}if(h){var m=o(u.replace(/rgb|\s+|\(|\)/g,"").split(",").map(function(_){return parseInt(_)}),3),w=m[0],y=m[1],M=m[2];return{r:w=w>255?255:w,g:y=y>255?255:y,b:M=M>255?255:M}}}},{key:"make",value:function(u){var f=u.size,h=u.color;try{f*=window.devicePixelRatio;var c=this.parseColor(h),m=JSON.stringify(c);if(this.canvases[m]=this.canvases[m]||{},this.canvases[m][f]!=null)return this.canvases[m][f];var w=document.createElement("canvas");f+=f%2,w.width=f,w.height=f;for(var y=w.getContext("2d"),M=y.createImageData(f,f),_=0;_<M.data.length;_+=4)M.data[_]=255,M.data[_+1]=255,M.data[_+2]=255,M.data[_+3]=0;return this.plotCircle(2*f,4*f*(f/2),f/2,M,f,c),this.fillCircle(M,c),y.putImageData(M,0,0),this.canvases[m][f]=w,w}catch(S){console.error(S)}}},{key:"plotCircle",value:function(u,f,h,c,m,w){var y=-h,M=0,_=2-2*h;do{var S=u-4*(y+1)+(f+4*m*(M-1));c.data[S+0]=w.r,c.data[S+1]=w.g,c.data[S+2]=w.b,c.data[S+3]=255;var N=u-M*(4*m)+(f-4*(y+1));c.data[N+0]=w.r,c.data[N+1]=w.g,c.data[N+2]=w.b,c.data[N+3]=255;var B=u+4*y+(f-M*(4*m));c.data[B+0]=w.r,c.data[B+1]=w.g,c.data[B+2]=w.b,c.data[B+3]=255;var q=u+4*m*(M-1)+(f+4*y);c.data[q+0]=w.r,c.data[q+1]=w.g,c.data[q+2]=w.b,c.data[q+3]=255,(h=_)<=M&&(_+=2*++M+1),(h>y||_>M)&&(_+=2*++y+1)}while(y<0)}},{key:"fillCircle",value:function(u,f){for(var h=4*u.width,c=1;c<u.height-1;c+=1)for(var m=!1,w=!1,y=!1,M=0;M<h;M+=4){var _=h*c+M,S=u.data[_+3],N=S===255;N&&!m?m=!0:S===0&&m?w=!0:N&&m&&w&&(y=!0),m&&w&&!y&&(u.data[_]=f.r,u.data[_+1]=f.g,u.data[_+2]=f.b,u.data[_+3]=255)}}}])&&d(v.prototype,x),g}();function b(g,v){for(var x=0;x<v.length;x++){var u=v[x];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var P=function(){function g(u){(function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")})(this,g),this.canvas=u,this.context=u.getContext("2d"),this.stampMaker=new E,this.configPixelRatio()}var v,x;return v=g,(x=[{key:"configPixelRatio",value:function(){var u=this.canvas,f=u.width,h=u.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(u){var f=this;return new Promise(function(h){var c=document.createElement("canvas"),m=c.getContext("2d"),w=f.canvas,y=w.width,M=w.height,_=y/f.dpr,S=M/f.dpr;c.width=_,c.height=S,m.imageSmoothingEnabled=!1,m.drawImage(f.canvas,0,0,y,M,0,0,_,S),c.toBlob(function(N){N.lastModifedDate=new Date,N.name=u,h(N)})})}},{key:"distanceBetween",value:function(u,f){return Math.sqrt(Math.pow(f.x-u.x,2)+Math.pow(f.y-u.y,2))}},{key:"angleBetween",value:function(u,f){return Math.atan2(f.x-u.x,f.y-u.y)}},{key:"draw",value:function(u){var f=u.from,h=u.to,c=u.size,m=u.color;this.context.globalCompositeOperation="source-over",this.brush({from:f,to:h,size:c,color:m})}},{key:"erase",value:function(u){var f=u.from,h=u.to,c=u.size;this.context.globalCompositeOperation="destination-out",this.brush({from:f,to:h,size:c,color:"#000000"})}},{key:"brush",value:function(u){var f=this,h=u.from,c=u.to,m=u.size,w=u.color,y=(m-m%2)/2,M=this.stampMaker.make({size:m,color:w});if(h.x!==c.x||h.y!==c.y)for(var _=this.distanceBetween(h,c),S=this.angleBetween(h,c),N=function(J){var te=h.x+Math.sin(S)*J-y,X=h.y+Math.cos(S)*J-y;window.requestAnimationFrame(function(){f.context.drawImage(M,Math.round(te),Math.round(X),m,m)})},B=0;B<_;B+=1)N(B);else{var q=h.x-y,$=h.y-y;this.context.drawImage(M,Math.round(q),Math.round($),m,m)}}},{key:"dpr",get:function(){return window.devicePixelRatio||1}}])&&b(v.prototype,x),g}();r.default=P}])})})(it);var We=kt(it.exports);function Et(l){let e,t;return{c(){e=me("svg"),t=me("path"),this.h()},l(r){e=ge(r,"svg",{xmlns:!0,width:!0,viewBox:!0,class:!0});var a=z(e);t=ge(a,"path",{fill:!0,stroke:!0,"stroke-width":!0,d:!0}),z(t).forEach(I),a.forEach(I),this.h()},h(){s(t,"fill","white"),s(t,"stroke","black"),s(t,"stroke-width","30"),s(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"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","20"),s(e,"viewBox","0 0 512 512"),s(e,"class",l[0])},m(r,a){Z(r,e,a),p(e,t)},p(r,[a]){a&1&&s(e,"class",r[0])},i:Q,o:Q,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 se{constructor(e){super(),ne(this,e,It,Et,ie,{classNames:0})}}function Pt(l){var f;let e,t,r,a,o,n,d,i=((f=l[0])==null?void 0:f.label)+"",k,E,b,P,g,v,x,u;return P=new St({}),{c(){e=C("div"),t=C("div"),r=C("canvas"),a=A(),o=C("canvas"),n=A(),d=C("span"),k=V(i),E=A(),b=C("button"),ue(P.$$.fragment),this.h()},l(h){e=T(h,"DIV",{});var c=z(e);t=T(c,"DIV",{class:!0});var m=z(t);r=T(m,"CANVAS",{class:!0,width:!0,height:!0}),z(r).forEach(I),a=D(m),o=T(m,"CANVAS",{class:!0,width:!0,height:!0}),z(o).forEach(I),n=D(m),d=T(m,"SPAN",{class:!0});var w=z(d);k=F(w,i),w.forEach(I),E=D(m),b=T(m,"BUTTON",{class:!0});var y=z(b);pe(P.$$.fragment,y),y.forEach(I),m.forEach(I),c.forEach(I),this.h()},h(){s(r,"class","canvas svelte-vhujxn"),s(r,"width","512"),s(r,"height","512"),s(o,"class","brush svelte-vhujxn"),s(o,"width","10"),s(o,"height","10"),s(d,"class","label svelte-vhujxn"),s(b,"class","absolute bottom-0 left-0 p-3"),b.disabled=g=l[3].size<=0,s(t,"class","relative overflow-clip")},m(h,c){Z(h,e,c),p(e,t),p(t,r),l[11](r),p(t,a),p(t,o),l[12](o),p(t,n),p(t,d),p(d,k),p(t,E),p(t,b),de(P,b,null),v=!0,x||(u=[U(r,"touchmove",Ct),U(r,"pointerenter",Mt),U(r,"pointerup",l[4]),U(r,"pointerleave",l[4]),U(r,"pointercancel",l[4]),U(r,"pointerout",l[4]),U(r,"pointermove",l[6]),U(r,"pointerdown",l[5]),U(b,"click",Se(l[13]))],x=!0)},p(h,[c]){var m;(!v||c&1)&&i!==(i=((m=h[0])==null?void 0:m.label)+"")&&Le(k,i),(!v||c&8&&g!==(g=h[3].size<=0))&&(b.disabled=g)},i(h){v||(he(P.$$.fragment,h),v=!0)},o(h){fe(P.$$.fragment,h),v=!1},d(h){h&&I(e),l[11](null),l[12](null),ve(P),x=!1,Ue(u)}}}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 ze(l,e){l.drawImage(e,0,0,l.canvas.width,l.canvas.height)}const Ct=l=>l.preventDefault();function Tt(l,e,t){let r,a,o,n;Y(l,_e,_=>t(3,r=_)),Y(l,De,_=>t(10,a=_)),Y(l,xe,_=>t(0,o=_)),Y(l,Ae,_=>t(18,n=_));let d,i,k,E,b={x:0,y:0},P;ut(()=>{t(9,E=d.getContext("2d")),t(8,k=i.getContext("2d")),window.devicePixelRatio=1,P=new We(d),t(1,d.style.height="unset",d),t(1,d.style.width="unset",d),K(Ae,n=d,n),tt(E)});let g=!1,v;function x(){t(2,i.style.top=`${10+o.size/2}px`,i),t(2,i.style.left=`${10+o.size/2}px`,i),g=!1}function u(_){g=!0,b=et(d,_),P.draw({from:b,to:b,size:o.size,color:o.color}),v=_t(),_e.update(S=>(S.set(v,{brush:o,points:[{from:b,to:b}]}),S))}function f(_){const S=et(d,_);t(2,i.style.top=`${_.offsetY}px`,i),t(2,i.style.left=`${_.offsetX}px`,i),g&&(P.draw({from:b,to:S,size:o.size,color:o.color}),_e.update(N=>{const B=N.get(v);return B==null||B.points.push({from:b,to:S}),N}),b=S)}function h(_){const{size:S,color:N}=_;t(2,i.width=S,i),t(2,i.height=S,i),t(8,k.fillStyle=N,k),k.arc(S/2,S/2,S/2,0,2*Math.PI),k.fill()}function c(){if(r.size<=0)return;const _=Array.from(r.keys());_e.update(S=>(S.delete(_[_.length-1]),S)),m(E)}function m(_){const S=document.createElement("canvas");S.width=512,S.height=512,window.devicePixelRatio=1;const N=new We(S);tt(_),a&&ze(_,a),Array.from(r.values()).forEach(B=>{B.points.forEach((q,$)=>{N.draw({from:q.from,to:q.to,size:B.brush.size,color:B.brush.color})})}),requestAnimationFrame(()=>{ze(_,S)})}function w(_){Re[_?"unshift":"push"](()=>{d=_,t(1,d)})}function y(_){Re[_?"unshift":"push"](()=>{i=_,t(2,i),t(8,k),t(0,o)})}const M=()=>c();return l.$$.update=()=>{l.$$.dirty&257&&k&&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&&(ze(E,a),K(_e,r=new Map,r))},[o,d,i,r,x,u,f,c,k,E,a,w,y,M]}class zt extends se{constructor(e){super(),ne(this,e,Tt,Pt,ie,{})}}function rt(l){let e,t,r;return{c(){e=C("img"),this.h()},l(a){e=T(a,"IMG",{class:!0,alt:!0,src:!0,width:!0,height:!0}),this.h()},h(){s(e,"class",t="image "+(l[1]?"opacity-30":"")+" svelte-1t0h0rs"),s(e,"alt","Generative Map Result"),Oe(e.src,r=l[0])||s(e,"src",r),s(e,"width","512"),s(e,"height","512")},m(a,o){Z(a,e,o)},p(a,o){o&2&&t!==(t="image "+(a[1]?"opacity-30":"")+" svelte-1t0h0rs")&&s(e,"class",t),o&1&&!Oe(e.src,r=a[0])&&s(e,"src",r)},d(a){a&&I(e)}}}function lt(l){let e,t,r,a,o,n;return{c(){e=C("div"),t=me("svg"),r=me("path"),a=A(),o=C("span"),n=V(ot),this.h()},l(d){e=T(d,"DIV",{class:!0});var i=z(e);t=ge(i,"svg",{xmlns:!0,fill:!0,viewBox:!0,class:!0});var k=z(t);r=ge(k,"path",{fill:!0,d:!0}),z(r).forEach(I),k.forEach(I),a=D(i),o=T(i,"SPAN",{class:!0});var E=z(o);n=F(E,ot),E.forEach(I),i.forEach(I),this.h()},h(){s(r,"fill","currentColor"),s(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"),s(t,"xmlns","http://www.w3.org/2000/svg"),s(t,"fill","none"),s(t,"viewBox","0 0 24 24"),s(t,"class","animate-spin max-w-[3rem]"),s(o,"class","text-xs"),s(e,"class","loading svelte-1t0h0rs")},m(d,i){Z(d,e,i),p(e,t),p(t,r),p(e,a),p(e,o),p(o,n)},p:Q,d(d){d&&I(e)}}}function Ot(l){let e,t,r=l[0]&&rt(l),a=l[1]&&lt();return{c(){e=C("div"),r&&r.c(),t=A(),a&&a.c(),this.h()},l(o){e=T(o,"DIV",{class:!0});var n=z(e);r&&r.l(n),t=D(n),a&&a.l(n),n.forEach(I),this.h()},h(){s(e,"class","relative overflow-clip flex flex-col justify-center items-center w-full h-full")},m(o,n){Z(o,e,n),r&&r.m(e,null),p(e,t),a&&a.m(e,null)},p(o,[n]){o[0]?r?r.p(o,n):(r=rt(o),r.c(),r.m(e,t)):r&&(r.d(1),r=null),o[1]?a?a.p(o,n):(a=lt(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:Q,o:Q,d(o){o&&I(e),r&&r.d(),a&&a.d()}}}let ot="";async function Rt(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 Bt(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,n,d;return Y(l,Me,i=>t(2,r=i)),Y(l,je,i=>t(0,a=i)),Y(l,be,i=>t(1,o=i)),Y(l,Ie,i=>t(3,n=i)),Y(l,Ae,i=>t(4,d=i)),l.$$.update=()=>{l.$$.dirty&26&&(async()=>{if(o){const i=await Bt(d.toDataURL(),n);K(je,a=i,a),K(be,o=!1,o)}})(),l.$$.dirty&5&&(async()=>r&&(await Rt(a),K(Me,r=!1,r)))()},[a,o,r,n,d]}class At extends se{constructor(e){super(),ne(this,e,jt,Ot,ie,{})}}function Dt(l){let e,t,r,a,o,n,d,i,k,E,b,P,g,v,x,u,f,h,c,m,w,y,M,_,S,N,B,q,$,J,te,X;return P=new gt({}),x=new zt({}),f=new At({}),B=new ft({}),$=new wt({}),{c(){e=C("div"),t=C("article"),r=C("h1"),a=V("Drawing to Map"),o=A(),n=C("p"),d=V("This space is for the ControlNet model "),i=C("a"),k=C("span"),E=V("Drawing2Map"),b=A(),ue(P.$$.fragment),g=A(),v=C("div"),ue(x.$$.fragment),u=A(),ue(f.$$.fragment),h=A(),c=C("button"),m=V("Generate Map"),y=A(),M=C("button"),_=V("Save Result"),N=A(),ue(B.$$.fragment),q=A(),ue($.$$.fragment),this.h()},l(O){e=T(O,"DIV",{class:!0});var L=z(e);t=T(L,"ARTICLE",{class:!0});var re=z(t);r=T(re,"H1",{});var ee=z(r);a=F(ee,"Drawing to Map"),ee.forEach(I),o=D(re),n=T(re,"P",{});var le=z(n);d=F(le,"This space is for the ControlNet model "),i=T(le,"A",{href:!0,target:!0});var ce=z(i);k=T(ce,"SPAN",{});var ye=z(k);E=F(ye,"Drawing2Map"),ye.forEach(I),ce.forEach(I),le.forEach(I),re.forEach(I),b=D(L),pe(P.$$.fragment,L),g=D(L),v=T(L,"DIV",{class:!0});var W=z(v);pe(x.$$.fragment,W),u=D(W),pe(f.$$.fragment,W),W.forEach(I),h=D(L),c=T(L,"BUTTON",{class:!0});var G=z(c);m=F(G,"Generate Map"),G.forEach(I),y=D(L),M=T(L,"BUTTON",{class:!0});var j=z(M);_=F(j,"Save Result"),j.forEach(I),N=D(L),pe(B.$$.fragment,L),q=D(L),pe($.$$.fragment,L),L.forEach(I),this.h()},h(){s(i,"href","https://github.com/RubenGres/Drawing2Map"),s(i,"target","_blank"),s(t,"class","prose"),s(v,"class","drawings py-3 -mx-3 svelte-1sy339h"),c.disabled=w=l[0]===!0,s(c,"class","green svelte-1sy339h"),M.disabled=S=l[1]===!0||!l[2],s(M,"class","svelte-1sy339h"),s(e,"class","max-w-screen-md mx-auto px-3 py-5 relative z-0")},m(O,L){Z(O,e,L),p(e,t),p(t,r),p(r,a),p(t,o),p(t,n),p(n,d),p(n,i),p(i,k),p(k,E),p(e,b),de(P,e,null),p(e,g),p(e,v),de(x,v,null),p(v,u),de(f,v,null),p(e,h),p(e,c),p(c,m),p(e,y),p(e,M),p(M,_),p(e,N),de(B,e,null),p(e,q),de($,e,null),J=!0,te||(X=[U(c,"click",Se(l[3])),U(M,"click",Se(l[4]))],te=!0)},p(O,[L]){(!J||L&1&&w!==(w=O[0]===!0))&&(c.disabled=w),(!J||L&6&&S!==(S=O[1]===!0||!O[2]))&&(M.disabled=S)},i(O){J||(he(P.$$.fragment,O),he(x.$$.fragment,O),he(f.$$.fragment,O),he(B.$$.fragment,O),he($.$$.fragment,O),J=!0)},o(O){fe(P.$$.fragment,O),fe(x.$$.fragment,O),fe(f.$$.fragment,O),fe(B.$$.fragment,O),fe($.$$.fragment,O),J=!1},d(O){O&&I(e),ve(P),ve(x),ve(f),ve(B),ve($),te=!1,Ue(X)}}}function Nt(l,e,t){let r,a,o;return Y(l,be,i=>t(0,r=i)),Y(l,Me,i=>t(1,a=i)),Y(l,je,i=>t(2,o=i)),[r,a,o,()=>K(be,r=!0,r),()=>K(Me,a=!0,a)]}class Vt extends se{constructor(e){super(),ne(this,e,Nt,Dt,ie,{})}}export{Vt as default};
frontend/{build/_app/immutable/start-b4d3a4a1.js → .svelte-kit/output/client/_app/immutable/start-1d6beeeb.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-e78f0615.js"),["pages/index.svelte-e78f0615.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="1685758204608";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-1f940fb6.js"),["pages/index.svelte-1f940fb6.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="1685809076710";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 ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":"1685809076710"}
frontend/.svelte-kit/output/prerendered/fallback.html ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="/static/favicon.png" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js"></script>
8
+ <meta http-equiv="content-security-policy" content="">
9
+ <link rel="modulepreload" href="/static/_app/immutable/start-1d6beeeb.js">
10
+ <link rel="modulepreload" href="/static/_app/immutable/chunks/index-bcf2726a.js">
11
+ <link rel="modulepreload" href="/static/_app/immutable/chunks/paths-d3bcbd10.js">
12
+ </head>
13
+ <body class="">
14
+
15
+ <script type="module" data-sveltekit-hydrate="45h">
16
+ import { start } from "/static/_app/immutable/start-1d6beeeb.js";
17
+ start({
18
+ target: document.querySelector('[data-sveltekit-hydrate="45h"]').parentNode,
19
+ paths: {"base":"/static","assets":"/static"},
20
+ session: {},
21
+ route: true,
22
+ spa: true,
23
+ trailing_slash: "never",
24
+ hydrate: null
25
+ });
26
+ </script>
27
+ </body>
28
+ </html>
frontend/.svelte-kit/output/prerendered/pages/index.html ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="/static/favicon.png" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js"></script>
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-1d6beeeb.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-1f940fb6.js">
16
+ </head>
17
+ <body class="">
18
+
19
+
20
+
21
+ <div class="max-w-screen-md mx-auto px-3 py-5 relative z-0"><article class="prose"><h1>Drawing to Map</h1>
22
+ <p>This space is for the ControlNet model <a href="https://github.com/RubenGres/Drawing2Map" target="_blank"><span>Drawing2Map</span></a></p></article>
23
+
24
+
25
+ <form><h4 class="font-bold mt-6 mb-2 leading-6 my-3">Brush Type</h4>
26
+ <div class="colors svelte-1oy4poo" name="colors"><div class="snap-always snap-start"><input name="color" type="radio" id="color-0" value="0" class="svelte-1oy4poo">
27
+ <label for="color-0" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(219,14,154)"></rect></svg>
28
+ <span class="svelte-1oy4poo">building</span></label>
29
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-1" value="1" class="svelte-1oy4poo">
30
+ <label for="color-1" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(147,142,123)"></rect></svg>
31
+ <span class="svelte-1oy4poo">pervious surface</span></label>
32
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-2" value="2" class="svelte-1oy4poo">
33
+ <label for="color-2" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(248,12,0)"></rect></svg>
34
+ <span class="svelte-1oy4poo">impervious surface</span></label>
35
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-3" value="3" class="svelte-1oy4poo">
36
+ <label for="color-3" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(169,113,1)"></rect></svg>
37
+ <span class="svelte-1oy4poo">bare soil</span></label>
38
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-4" value="4" class="svelte-1oy4poo">
39
+ <label for="color-4" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(21,83,174)"></rect></svg>
40
+ <span class="svelte-1oy4poo">water</span></label>
41
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-5" value="5" class="svelte-1oy4poo">
42
+ <label for="color-5" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(25,74,38)"></rect></svg>
43
+ <span class="svelte-1oy4poo">coniferous</span></label>
44
+ </div><div class="snap-always snap-start"><input name="color" checked type="radio" id="color-6" value="6" class="svelte-1oy4poo">
45
+ <label for="color-6" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(70,228,131)"></rect></svg>
46
+ <span class="svelte-1oy4poo">deciduous</span></label>
47
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-7" value="7" class="svelte-1oy4poo">
48
+ <label for="color-7" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(243,166,13)"></rect></svg>
49
+ <span class="svelte-1oy4poo">brushwood</span></label>
50
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-8" value="8" class="svelte-1oy4poo">
51
+ <label for="color-8" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(102,0,130)"></rect></svg>
52
+ <span class="svelte-1oy4poo">vineyard</span></label>
53
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-9" value="9" class="svelte-1oy4poo">
54
+ <label for="color-9" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(85,255,0)"></rect></svg>
55
+ <span class="svelte-1oy4poo">herbaceous vegetation</span></label>
56
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-10" value="10" class="svelte-1oy4poo">
57
+ <label for="color-10" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(255,243,13)"></rect></svg>
58
+ <span class="svelte-1oy4poo">agricultural land</span></label>
59
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-11" value="11" class="svelte-1oy4poo">
60
+ <label for="color-11" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(228,223,124)"></rect></svg>
61
+ <span class="svelte-1oy4poo">plowed land</span></label>
62
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-12" value="12" class="svelte-1oy4poo">
63
+ <label for="color-12" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(61,230,235)"></rect></svg>
64
+ <span class="svelte-1oy4poo">swimming pool</span></label>
65
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-13" value="13" class="svelte-1oy4poo">
66
+ <label for="color-13" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(255,255,255)"></rect></svg>
67
+ <span class="svelte-1oy4poo">snow</span></label>
68
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-14" value="14" class="svelte-1oy4poo">
69
+ <label for="color-14" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(138,179,160)"></rect></svg>
70
+ <span class="svelte-1oy4poo">clear cut</span></label>
71
+ </div><div class="snap-always snap-start"><input name="color" type="radio" id="color-15" value="15" class="svelte-1oy4poo">
72
+ <label for="color-15" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(107,113,79)"></rect></svg>
73
+ <span class="svelte-1oy4poo">mixed</span></label>
74
+ </div></div>
75
+ <h4 class="font-bold mt-6 mb-2 my-6 leading-6">Brush Size</h4>
76
+ <div class="brush svelte-1oy4poo"><input value="10" min="1" max="150" step="1" name="brush" type="range">
77
+ <label class="pl-2 svelte-1oy4poo" for="brush">40</label></div>
78
+ </form>
79
+ <div class="drawings py-3 -mx-3 svelte-1sy339h"><div><div class="relative overflow-clip"><canvas class="canvas svelte-vhujxn" width="512" height="512"></canvas>
80
+ <canvas class="brush svelte-vhujxn" width="10" height="10"></canvas>
81
+ <span class="label svelte-vhujxn">deciduous</span>
82
+ <button class="absolute bottom-0 left-0 p-3" disabled><svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 512 512" class=""><path fill="white" stroke="black" stroke-width="30" 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"></path></svg></button></div>
83
+ </div>
84
+ <div class="relative overflow-clip flex flex-col justify-center items-center w-full h-full">
85
+ </div>
86
+
87
+ </div>
88
+
89
+ <button class="green svelte-1sy339h">Generate Map
90
+ </button>
91
+
92
+ <button disabled class="svelte-1sy339h">Save Result
93
+ </button>
94
+
95
+ <div><h4 class="font-bold mt-6 mb-2 my-6 leading-6">Select a Template</h4>
96
+ <form class="svelte-1gwcbp"><div class="samples svelte-1gwcbp"><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-0" value="0" class="svelte-1gwcbp">
97
+ <label for="sample-0" class="svelte-1gwcbp"><img src="/static/samples/default.jpg" alt="/samples/default.jpg" class="svelte-1gwcbp"></label>
98
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-1" value="1" class="svelte-1gwcbp">
99
+ <label for="sample-1" class="svelte-1gwcbp"><img src="/static/samples/example0.png" alt="/samples/example0.png" class="svelte-1gwcbp"></label>
100
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-2" value="2" class="svelte-1gwcbp">
101
+ <label for="sample-2" class="svelte-1gwcbp"><img src="/static/samples/example1.png" alt="/samples/example1.png" class="svelte-1gwcbp"></label>
102
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-3" value="3" class="svelte-1gwcbp">
103
+ <label for="sample-3" class="svelte-1gwcbp"><img src="/static/samples/example2.png" alt="/samples/example2.png" class="svelte-1gwcbp"></label>
104
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-4" value="4" class="svelte-1gwcbp">
105
+ <label for="sample-4" class="svelte-1gwcbp"><img src="/static/samples/example3.png" alt="/samples/example3.png" class="svelte-1gwcbp"></label>
106
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-5" value="5" class="svelte-1gwcbp">
107
+ <label for="sample-5" class="svelte-1gwcbp"><img src="/static/samples/example4.png" alt="/samples/example4.png" class="svelte-1gwcbp"></label>
108
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-6" value="6" class="svelte-1gwcbp">
109
+ <label for="sample-6" class="svelte-1gwcbp"><img src="/static/samples/example5.png" alt="/samples/example5.png" class="svelte-1gwcbp"></label>
110
+ </div><div class="snap-always snap-start"><input type="radio" name="samples" id="sample-7" value="7" class="svelte-1gwcbp">
111
+ <label for="sample-7" class="svelte-1gwcbp"><img src="/static/samples/example6.jpg" alt="/samples/example6.jpg" class="svelte-1gwcbp"></label>
112
+ </div></div></form>
113
+ </div>
114
+
115
+ <form><h4 class="font-bold mt-6 mb-2 my-6 leading-6">Prompt</h4>
116
+ <input name="prompt" placeholder="Aerial view of ..., France." style="width: 500px;" class="svelte-7to72y" value="Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France">
117
+
118
+ <h4 class="font-bold mt-6 mb-2 my-6 leading-6">Modifier</h4>
119
+ <input name="modifier" placeholder="High resolution satellite image" style="width: 500px;" class="svelte-7to72y" value="High resolution satellite image, 4K, ultra detailed">
120
+ <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>
121
+
122
+ <h4 class="font-bold mt-6 mb-2 my-6 leading-6">Random Seed</h4>
123
+ <input type="Number" name="seed" placeholder="Integer Seed" class="svelte-7to72y" value="398460928">
124
+ <button class="svelte-7to72y">Random
125
+ </button>
126
+ <h4 class="font-bold mt-6 mb-2 my-6 leading-6">Sample Steps</h4>
127
+ <div class="flex"><input type="range" name="steps" min="10" max="30" step="1" class="svelte-7to72y" value="20">
128
+ <label class="pl-2 svelte-7to72y" for="steps">20</label></div>
129
+ </form>
130
+ </div>
131
+
132
+
133
+ <script type="module" data-sveltekit-hydrate="1meyvr0">
134
+ import { start } from "/static/_app/immutable/start-1d6beeeb.js";
135
+ start({
136
+ target: document.querySelector('[data-sveltekit-hydrate="1meyvr0"]').parentNode,
137
+ paths: {"base":"/static","assets":"/static"},
138
+ session: {},
139
+ route: true,
140
+ spa: false,
141
+ trailing_slash: "never",
142
+ hydrate: {
143
+ status: 200,
144
+ error: null,
145
+ nodes: [0, 2],
146
+ params: {},
147
+ routeId: ""
148
+ }
149
+ });
150
+ </script>
151
+ </body>
152
+ </html>
frontend/.svelte-kit/output/server/chunks/hooks-1c45ba0b.js ADDED
@@ -0,0 +1 @@
 
 
1
+
frontend/.svelte-kit/output/server/chunks/index-445fd704.js ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function noop() {
2
+ }
3
+ function run(fn) {
4
+ return fn();
5
+ }
6
+ function blank_object() {
7
+ return /* @__PURE__ */ Object.create(null);
8
+ }
9
+ function run_all(fns) {
10
+ fns.forEach(run);
11
+ }
12
+ function safe_not_equal(a, b) {
13
+ return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function");
14
+ }
15
+ function subscribe(store, ...callbacks) {
16
+ if (store == null) {
17
+ return noop;
18
+ }
19
+ const unsub = store.subscribe(...callbacks);
20
+ return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
21
+ }
22
+ function set_store_value(store, ret, value) {
23
+ store.set(value);
24
+ return ret;
25
+ }
26
+ let current_component;
27
+ function set_current_component(component) {
28
+ current_component = component;
29
+ }
30
+ function get_current_component() {
31
+ if (!current_component)
32
+ throw new Error("Function called outside component initialization");
33
+ return current_component;
34
+ }
35
+ function setContext(key, context) {
36
+ get_current_component().$$.context.set(key, context);
37
+ return context;
38
+ }
39
+ Promise.resolve();
40
+ const escaped = {
41
+ '"': "&quot;",
42
+ "'": "&#39;",
43
+ "&": "&amp;",
44
+ "<": "&lt;",
45
+ ">": "&gt;"
46
+ };
47
+ function escape(html) {
48
+ return String(html).replace(/["'&<>]/g, (match) => escaped[match]);
49
+ }
50
+ function escape_attribute_value(value) {
51
+ return typeof value === "string" ? escape(value) : value;
52
+ }
53
+ function each(items, fn) {
54
+ let str = "";
55
+ for (let i = 0; i < items.length; i += 1) {
56
+ str += fn(items[i], i);
57
+ }
58
+ return str;
59
+ }
60
+ const missing_component = {
61
+ $$render: () => ""
62
+ };
63
+ function validate_component(component, name) {
64
+ if (!component || !component.$$render) {
65
+ if (name === "svelte:component")
66
+ name += " this={...}";
67
+ throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);
68
+ }
69
+ return component;
70
+ }
71
+ let on_destroy;
72
+ function create_ssr_component(fn) {
73
+ function $$render(result, props, bindings, slots, context) {
74
+ const parent_component = current_component;
75
+ const $$ = {
76
+ on_destroy,
77
+ context: new Map(context || (parent_component ? parent_component.$$.context : [])),
78
+ on_mount: [],
79
+ before_update: [],
80
+ after_update: [],
81
+ callbacks: blank_object()
82
+ };
83
+ set_current_component({ $$ });
84
+ const html = fn(result, props, bindings, slots);
85
+ set_current_component(parent_component);
86
+ return html;
87
+ }
88
+ return {
89
+ render: (props = {}, { $$slots = {}, context = /* @__PURE__ */ new Map() } = {}) => {
90
+ on_destroy = [];
91
+ const result = { title: "", head: "", css: /* @__PURE__ */ new Set() };
92
+ const html = $$render(result, props, {}, $$slots, context);
93
+ run_all(on_destroy);
94
+ return {
95
+ html,
96
+ css: {
97
+ code: Array.from(result.css).map((css) => css.code).join("\n"),
98
+ map: null
99
+ },
100
+ head: result.title + result.head
101
+ };
102
+ },
103
+ $$render
104
+ };
105
+ }
106
+ function add_attribute(name, value, boolean) {
107
+ if (value == null || boolean && !value)
108
+ return "";
109
+ const assignment = boolean && value === true ? "" : `="${escape_attribute_value(value.toString())}"`;
110
+ return ` ${name}${assignment}`;
111
+ }
112
+ export { safe_not_equal as a, subscribe as b, create_ssr_component as c, each as d, escape as e, add_attribute as f, set_store_value as g, missing_component as m, noop as n, setContext as s, validate_component as v };
frontend/.svelte-kit/output/server/chunks/paths-396f020f.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ let base = "";
2
+ let assets = "";
3
+ function set_paths(paths) {
4
+ base = paths.base;
5
+ assets = paths.assets || base;
6
+ }
7
+ export { assets as a, base as b, set_paths as s };
frontend/.svelte-kit/output/server/entries/fallbacks/error.svelte.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { c as create_ssr_component, e as escape } from "../../chunks/index-445fd704.js";
2
+ function load({ error, status }) {
3
+ return { props: { error, status } };
4
+ }
5
+ const Error = create_ssr_component(($$result, $$props, $$bindings, slots) => {
6
+ let { status } = $$props;
7
+ let { error } = $$props;
8
+ if ($$props.status === void 0 && $$bindings.status && status !== void 0)
9
+ $$bindings.status(status);
10
+ if ($$props.error === void 0 && $$bindings.error && error !== void 0)
11
+ $$bindings.error(error);
12
+ return `<h1>${escape(status)}</h1>
13
+
14
+ <pre>${escape(error.message)}</pre>
15
+
16
+
17
+
18
+ ${error.frame ? `<pre>${escape(error.frame)}</pre>` : ``}
19
+ ${error.stack ? `<pre>${escape(error.stack)}</pre>` : ``}`;
20
+ });
21
+ export { Error as default, load };
frontend/.svelte-kit/output/server/entries/pages/__layout.svelte.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import { c as create_ssr_component } from "../../chunks/index-445fd704.js";
2
+ var app = /* @__PURE__ */ (() => '@import url(\'https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;500;600;700;800&display=swap\');\n/*\n! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n::before,\n::after {\n --tw-content: \'\';\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user\'s configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\nsup {\n top: -0.5em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\n[type=\'button\'],\n[type=\'reset\'],\n[type=\'submit\'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n:-moz-focusring {\n outline: auto;\n}\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n:-moz-ui-invalid {\n box-shadow: none;\n}\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\nprogress {\n vertical-align: baseline;\n}\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\nsummary {\n display: list-item;\n}\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nlegend {\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\nhtml {\n font-family: \'Open Sans\', sans-serif;\n }\n*, ::before, ::after{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n::-webkit-backdrop{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n::backdrop{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.prose{\n color: var(--tw-prose-body);\n max-width: 65ch;\n}\n.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-lead);\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.prose :where(a):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.prose :where(strong):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-bold);\n font-weight: 600;\n}\n.prose :where(ol):not(:where([class~="not-prose"] *)){\n list-style-type: decimal;\n padding-left: 1.625em;\n}\n.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)){\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)){\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)){\n list-style-type: upper-alpha;\n}\n.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)){\n list-style-type: lower-alpha;\n}\n.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)){\n list-style-type: upper-roman;\n}\n.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)){\n list-style-type: lower-roman;\n}\n.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)){\n list-style-type: upper-roman;\n}\n.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)){\n list-style-type: lower-roman;\n}\n.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)){\n list-style-type: decimal;\n}\n.prose :where(ul):not(:where([class~="not-prose"] *)){\n list-style-type: disc;\n padding-left: 1.625em;\n}\n.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker{\n font-weight: 400;\n color: var(--tw-prose-counters);\n}\n.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker{\n color: var(--tw-prose-bullets);\n}\n.prose :where(hr):not(:where([class~="not-prose"] *)){\n border-color: var(--tw-prose-hr);\n border-top-width: 1px;\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.prose :where(blockquote):not(:where([class~="not-prose"] *)){\n font-weight: 500;\n font-style: italic;\n color: var(--tw-prose-quotes);\n border-left-width: 0.25rem;\n border-left-color: var(--tw-prose-quote-borders);\n quotes: "\\201C""\\201D""\\2018""\\2019";\n margin-top: 1.6em;\n margin-bottom: 1.6em;\n padding-left: 1em;\n}\n.prose :where(h1):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-headings);\n font-weight: 800;\n font-size: 2.25em;\n margin-top: 0;\n margin-bottom: 0.8888889em;\n line-height: 1.1111111;\n}\n.prose :where(h1 strong):not(:where([class~="not-prose"] *)){\n font-weight: 900;\n}\n.prose :where(h2):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-headings);\n font-weight: 700;\n font-size: 1.5em;\n margin-top: 2em;\n margin-bottom: 1em;\n line-height: 1.3333333;\n}\n.prose :where(h2 strong):not(:where([class~="not-prose"] *)){\n font-weight: 800;\n}\n.prose :where(h3):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-headings);\n font-weight: 600;\n font-size: 1.25em;\n margin-top: 1.6em;\n margin-bottom: 0.6em;\n line-height: 1.6;\n}\n.prose :where(h3 strong):not(:where([class~="not-prose"] *)){\n font-weight: 700;\n}\n.prose :where(h4):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.prose :where(h4 strong):not(:where([class~="not-prose"] *)){\n font-weight: 700;\n}\n.prose :where(figure > *):not(:where([class~="not-prose"] *)){\n margin-top: 0;\n margin-bottom: 0;\n}\n.prose :where(figcaption):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-captions);\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.prose :where(a code):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-links);\n}\n.prose :where(pre code):not(:where([class~="not-prose"] *))::before{\n content: none;\n}\n.prose :where(pre code):not(:where([class~="not-prose"] *))::after{\n content: none;\n}\n.prose :where(table):not(:where([class~="not-prose"] *)){\n width: 100%;\n table-layout: auto;\n text-align: left;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.prose :where(thead):not(:where([class~="not-prose"] *)){\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-th-borders);\n}\n.prose :where(thead th):not(:where([class~="not-prose"] *)){\n color: var(--tw-prose-headings);\n font-weight: 600;\n vertical-align: bottom;\n padding-right: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-left: 0.5714286em;\n}\n.prose :where(tbody tr):not(:where([class~="not-prose"] *)){\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-td-borders);\n}\n.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)){\n border-bottom-width: 0;\n}\n.prose :where(tbody td):not(:where([class~="not-prose"] *)){\n vertical-align: baseline;\n padding-top: 0.5714286em;\n padding-right: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-left: 0.5714286em;\n}\n.prose{\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-counters: #6b7280;\n --tw-prose-bullets: #d1d5db;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n font-size: 1rem;\n line-height: 1.75;\n}\n.prose :where(p):not(:where([class~="not-prose"] *)){\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.prose :where(img):not(:where([class~="not-prose"] *)){\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(video):not(:where([class~="not-prose"] *)){\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(figure):not(:where([class~="not-prose"] *)){\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.prose :where(h2 code):not(:where([class~="not-prose"] *)){\n font-size: 0.875em;\n}\n.prose :where(h3 code):not(:where([class~="not-prose"] *)){\n font-size: 0.9em;\n}\n.prose :where(li):not(:where([class~="not-prose"] *)){\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.prose :where(ol > li):not(:where([class~="not-prose"] *)){\n padding-left: 0.375em;\n}\n.prose :where(ul > li):not(:where([class~="not-prose"] *)){\n padding-left: 0.375em;\n}\n.prose > :where(ul > li p):not(:where([class~="not-prose"] *)){\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose > :where(ul > li > *:first-child):not(:where([class~="not-prose"] *)){\n margin-top: 1.25em;\n}\n.prose > :where(ul > li > *:last-child):not(:where([class~="not-prose"] *)){\n margin-bottom: 1.25em;\n}\n.prose > :where(ol > li > *:first-child):not(:where([class~="not-prose"] *)){\n margin-top: 1.25em;\n}\n.prose > :where(ol > li > *:last-child):not(:where([class~="not-prose"] *)){\n margin-bottom: 1.25em;\n}\n.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"] *)){\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.prose :where(hr + *):not(:where([class~="not-prose"] *)){\n margin-top: 0;\n}\n.prose :where(h2 + *):not(:where([class~="not-prose"] *)){\n margin-top: 0;\n}\n.prose :where(h3 + *):not(:where([class~="not-prose"] *)){\n margin-top: 0;\n}\n.prose :where(h4 + *):not(:where([class~="not-prose"] *)){\n margin-top: 0;\n}\n.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)){\n padding-left: 0;\n}\n.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)){\n padding-right: 0;\n}\n.prose :where(tbody td:first-child):not(:where([class~="not-prose"] *)){\n padding-left: 0;\n}\n.prose :where(tbody td:last-child):not(:where([class~="not-prose"] *)){\n padding-right: 0;\n}\n.prose > :where(:first-child):not(:where([class~="not-prose"] *)){\n margin-top: 0;\n}\n.prose > :where(:last-child):not(:where([class~="not-prose"] *)){\n margin-bottom: 0;\n}\n.pointer-events-none{\n pointer-events: none;\n}\n.absolute{\n position: absolute;\n}\n.relative{\n position: relative;\n}\n.bottom-0{\n bottom: 0px;\n}\n.left-0{\n left: 0px;\n}\n.top-0{\n top: 0px;\n}\n.right-0{\n right: 0px;\n}\n.z-0{\n z-index: 0;\n}\n.z-10{\n z-index: 10;\n}\n.z-20{\n z-index: 20;\n}\n.my-3{\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n}\n.my-6{\n margin-top: 1.5rem;\n margin-bottom: 1.5rem;\n}\n.mx-auto{\n margin-left: auto;\n margin-right: auto;\n}\n.-mx-3{\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n}\n.mt-6{\n margin-top: 1.5rem;\n}\n.mb-2{\n margin-bottom: 0.5rem;\n}\n.box-border{\n box-sizing: border-box;\n}\n.block{\n display: block;\n}\n.flex{\n display: flex;\n}\n.grid{\n display: grid;\n}\n.hidden{\n display: none;\n}\n.aspect-\\[512\\/512\\]{\n aspect-ratio: 512/512;\n}\n.h-0{\n height: 0px;\n}\n.h-full{\n height: 100%;\n}\n.max-h-\\[9rem\\]{\n max-height: 9rem;\n}\n.max-h-24{\n max-height: 6rem;\n}\n.w-0{\n width: 0px;\n}\n.w-full{\n width: 100%;\n}\n.max-w-full{\n max-width: 100%;\n}\n.max-w-\\[3rem\\]{\n max-width: 3rem;\n}\n.max-w-screen-md{\n max-width: 768px;\n}\n.-translate-x-1\\/2{\n --tw-translate-x: -50%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@-webkit-keyframes spin{\n to{\n transform: rotate(360deg);\n }\n}\n@keyframes spin{\n to{\n transform: rotate(360deg);\n }\n}\n.animate-spin{\n -webkit-animation: spin 1s linear infinite;\n animation: spin 1s linear infinite;\n}\n.cursor-pointer{\n cursor: pointer;\n}\n.snap-x{\n scroll-snap-type: x var(--tw-scroll-snap-strictness);\n}\n.snap-y{\n scroll-snap-type: y var(--tw-scroll-snap-strictness);\n}\n.snap-mandatory{\n --tw-scroll-snap-strictness: mandatory;\n}\n.snap-start{\n scroll-snap-align: start;\n}\n.snap-always{\n scroll-snap-stop: always;\n}\n.grid-cols-2{\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.grid-cols-\\[2fr_1\\.5fr\\]{\n grid-template-columns: 2fr 1.5fr;\n}\n.flex-col{\n flex-direction: column;\n}\n.flex-nowrap{\n flex-wrap: nowrap;\n}\n.items-center{\n align-items: center;\n}\n.justify-center{\n justify-content: center;\n}\n.gap-2{\n gap: 0.5rem;\n}\n.gap-1{\n gap: 0.25rem;\n}\n.overflow-hidden{\n overflow: hidden;\n}\n.overflow-clip{\n overflow: clip;\n}\n.overflow-scroll{\n overflow: scroll;\n}\n.overflow-x-scroll{\n overflow-x: scroll;\n}\n.whitespace-nowrap{\n white-space: nowrap;\n}\n.rounded-lg{\n border-radius: 0.5rem;\n}\n.border{\n border-width: 1px;\n}\n.border-gray-500{\n --tw-border-opacity: 1;\n border-color: rgb(107 114 128 / var(--tw-border-opacity));\n}\n.border-gray-300{\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.bg-gray-50{\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.p-3{\n padding: 0.75rem;\n}\n.p-1{\n padding: 0.25rem;\n}\n.px-2{\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3{\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.py-5{\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-3{\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.pl-2{\n padding-left: 0.5rem;\n}\n.text-base{\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-sm{\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xs{\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold{\n font-weight: 700;\n}\n.leading-6{\n line-height: 1.5rem;\n}\n.text-white{\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.text-gray-900{\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.opacity-0{\n opacity: 0;\n}\n.opacity-30{\n opacity: 0.3;\n}\n.outline{\n outline-style: solid;\n}\n.outline-2{\n outline-width: 2px;\n}\n.outline-offset-\\[-2px\\]{\n outline-offset: -2px;\n}\n.transition-all{\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200{\n transition-duration: 200ms;\n}\n.ease-in-out{\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n.hover\\:outline:hover{\n outline-style: solid;\n}\n.focus\\:border-blue-500:focus{\n --tw-border-opacity: 1;\n border-color: rgb(59 130 246 / var(--tw-border-opacity));\n}\n.focus\\:ring-blue-500:focus{\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));\n}\n.disabled\\:opacity-50:disabled{\n opacity: 0.5;\n}\n@media (prefers-color-scheme: dark){\n .dark\\:border-gray-300{\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n }\n .dark\\:bg-gray-50{\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n }\n .dark\\:focus\\:ring-blue-500:focus{\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));\n }\n}\n@media (min-width: 530px){\n .sm\\:max-h-\\[none\\]{\n max-height: none;\n }\n .sm\\:grid-cols-3{\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .sm\\:grid-cols-2{\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .sm\\:flex-row{\n flex-direction: row;\n }\n}\n')();
3
+ const _layout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
4
+ return `${slots.default ? slots.default({}) : ``}`;
5
+ });
6
+ export { _layout as default };
frontend/.svelte-kit/output/server/entries/pages/index.svelte.js ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { n as noop, a as safe_not_equal, c as create_ssr_component, b as subscribe, d as each, e as escape, f as add_attribute, g as set_store_value, v as validate_component } from "../../chunks/index-445fd704.js";
2
+ import { b as base } from "../../chunks/paths-396f020f.js";
3
+ import "nanoid";
4
+ import "px-brush";
5
+ const COLOR_LIST = [
6
+ { color: [219, 14, 154], label: "building" },
7
+ { color: [147, 142, 123], label: "pervious surface" },
8
+ { color: [248, 12, 0], label: "impervious surface" },
9
+ { color: [169, 113, 1], label: "bare soil" },
10
+ { color: [21, 83, 174], label: "water" },
11
+ { color: [25, 74, 38], label: "coniferous" },
12
+ { color: [70, 228, 131], label: "deciduous" },
13
+ { color: [243, 166, 13], label: "brushwood" },
14
+ { color: [102, 0, 130], label: "vineyard" },
15
+ { color: [85, 255, 0], label: "herbaceous vegetation" },
16
+ { color: [255, 243, 13], label: "agricultural land" },
17
+ { color: [228, 223, 124], label: "plowed land" },
18
+ { color: [61, 230, 235], label: "swimming pool" },
19
+ { color: [255, 255, 255], label: "snow" },
20
+ { color: [138, 179, 160], label: "clear cut" },
21
+ { color: [107, 113, 79], label: "mixed" }
22
+ ];
23
+ const IMAGES_LIST = [
24
+ "/samples/default.jpg",
25
+ "/samples/example0.png",
26
+ "/samples/example1.png",
27
+ "/samples/example2.png",
28
+ "/samples/example3.png",
29
+ "/samples/example4.png",
30
+ "/samples/example5.png",
31
+ "/samples/example6.jpg"
32
+ ];
33
+ const PRESETS = [
34
+ ["High resolution satellite image, 4K, ultra detailed", "Realistic"],
35
+ ["Colorful lego bricks", "Lego brick"],
36
+ ["Black and white paper pencil drawing", "Pencil"],
37
+ ["Oil on canvas painting", "Painting"]
38
+ ];
39
+ const subscriber_queue = [];
40
+ function writable(value, start = noop) {
41
+ let stop;
42
+ const subscribers = /* @__PURE__ */ new Set();
43
+ function set(new_value) {
44
+ if (safe_not_equal(value, new_value)) {
45
+ value = new_value;
46
+ if (stop) {
47
+ const run_queue = !subscriber_queue.length;
48
+ for (const subscriber of subscribers) {
49
+ subscriber[1]();
50
+ subscriber_queue.push(subscriber, value);
51
+ }
52
+ if (run_queue) {
53
+ for (let i = 0; i < subscriber_queue.length; i += 2) {
54
+ subscriber_queue[i][0](subscriber_queue[i + 1]);
55
+ }
56
+ subscriber_queue.length = 0;
57
+ }
58
+ }
59
+ }
60
+ }
61
+ function update(fn) {
62
+ set(fn(value));
63
+ }
64
+ function subscribe2(run, invalidate = noop) {
65
+ const subscriber = [run, invalidate];
66
+ subscribers.add(subscriber);
67
+ if (subscribers.size === 1) {
68
+ stop = start(set) || noop;
69
+ }
70
+ run(value);
71
+ return () => {
72
+ subscribers.delete(subscriber);
73
+ if (subscribers.size === 0) {
74
+ stop();
75
+ stop = null;
76
+ }
77
+ };
78
+ }
79
+ return { set, update, subscribe: subscribe2 };
80
+ }
81
+ function randomSeed() {
82
+ return BigInt(13248873089935215e3 & ((1 << 63) - 1) * Math.random());
83
+ }
84
+ const drawingLayers = writable(/* @__PURE__ */ new Map());
85
+ const resultImage = writable();
86
+ const currentCanvas = writable();
87
+ const selectedImage = writable();
88
+ const selectedBrush = writable();
89
+ const selectedParams = writable({
90
+ prompt: "Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",
91
+ modifier: PRESETS[0][0],
92
+ seed: randomSeed(),
93
+ steps: 20
94
+ });
95
+ const generateMap = writable(false);
96
+ const saveResult = writable(false);
97
+ var TemplateGallery_svelte_svelte_type_style_lang = /* @__PURE__ */ (() => "form.svelte-1gwcbp.svelte-1gwcbp{width:100%;overflow:hidden\n}.samples.svelte-1gwcbp.svelte-1gwcbp{display:flex;scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory;flex-wrap:nowrap;gap:0.25rem;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none\n}.samples.svelte-1gwcbp.svelte-1gwcbp::-webkit-scrollbar{display:none\n}input[type='radio'].svelte-1gwcbp.svelte-1gwcbp{position:absolute;display:none;height:0px;width:0px;opacity:0\n}input[type='radio'].svelte-1gwcbp.svelte-1gwcbp:disabled{opacity:0.5\n}input[type='radio'].svelte-1gwcbp:checked~label.svelte-1gwcbp{outline-style:solid;outline-width:2px;outline-color:#eab308\n}input[type='radio'].svelte-1gwcbp:disabled+label.svelte-1gwcbp{opacity:0.5\n}label.svelte-1gwcbp.svelte-1gwcbp{display:flex;cursor:pointer;outline-width:2px;outline-offset:-2px;outline-color:#eab308;transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)\n}label.svelte-1gwcbp.svelte-1gwcbp:hover{outline-style:solid\n}img.svelte-1gwcbp.svelte-1gwcbp{max-height:6rem;max-width:none\n}")();
98
+ const css$5 = {
99
+ code: "form.svelte-1gwcbp.svelte-1gwcbp{width:100%;overflow:hidden\n}.samples.svelte-1gwcbp.svelte-1gwcbp{display:flex;scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory;flex-wrap:nowrap;gap:0.25rem;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none\n}.samples.svelte-1gwcbp.svelte-1gwcbp::-webkit-scrollbar{display:none\n}input[type='radio'].svelte-1gwcbp.svelte-1gwcbp{position:absolute;display:none;height:0px;width:0px;opacity:0\n}input[type='radio'].svelte-1gwcbp.svelte-1gwcbp:disabled{opacity:0.5\n}input[type='radio'].svelte-1gwcbp:checked~label.svelte-1gwcbp{outline-style:solid;outline-width:2px;outline-color:#eab308\n}input[type='radio'].svelte-1gwcbp:disabled+label.svelte-1gwcbp{opacity:0.5\n}label.svelte-1gwcbp.svelte-1gwcbp{display:flex;cursor:pointer;outline-width:2px;outline-offset:-2px;outline-color:#eab308;transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)\n}label.svelte-1gwcbp.svelte-1gwcbp:hover{outline-style:solid\n}img.svelte-1gwcbp.svelte-1gwcbp{max-height:6rem;max-width:none\n}",
100
+ map: null
101
+ };
102
+ const TemplateGallery = create_ssr_component(($$result, $$props, $$bindings, slots) => {
103
+ let $$unsubscribe_selectedImage;
104
+ let $generateMap, $$unsubscribe_generateMap;
105
+ $$unsubscribe_selectedImage = subscribe(selectedImage, (value) => value);
106
+ $$unsubscribe_generateMap = subscribe(generateMap, (value) => $generateMap = value);
107
+ $$result.css.add(css$5);
108
+ $$unsubscribe_selectedImage();
109
+ $$unsubscribe_generateMap();
110
+ return `<div><h4 class="${"font-bold mt-6 mb-2 my-6 leading-6"}">Select a Template</h4>
111
+ <form class="${"svelte-1gwcbp"}"><div class="${"samples svelte-1gwcbp"}">${each(IMAGES_LIST, (file_name, id) => {
112
+ return `<div class="${"snap-always snap-start"}"><input type="${"radio"}" name="${"samples"}" id="${"sample-" + escape(id)}"${add_attribute("value", id, 0)} ${$generateMap === true ? "disabled" : ""} class="${"svelte-1gwcbp"}">
113
+ <label for="${"sample-" + escape(id)}" class="${"svelte-1gwcbp"}"><img${add_attribute("src", base + file_name, 0)}${add_attribute("alt", file_name, 0)} class="${"svelte-1gwcbp"}"></label>
114
+ </div>`;
115
+ })}</div></form>
116
+ </div>`;
117
+ });
118
+ var BrushSelector_svelte_svelte_type_style_lang = /* @__PURE__ */ (() => ".colors.svelte-1oy4poo.svelte-1oy4poo{display:grid;max-height:9rem;scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0.5rem;overflow:scroll\n}@media(min-width: 530px){.colors.svelte-1oy4poo.svelte-1oy4poo{max-height:none;grid-template-columns:repeat(3, minmax(0, 1fr))\n }}.colors.svelte-1oy4poo span.svelte-1oy4poo{margin-left:0.5rem\n}.colors.svelte-1oy4poo svg.svelte-1oy4poo{display:block\n}input[type='radio'].svelte-1oy4poo.svelte-1oy4poo{position:absolute;display:none;height:0px;width:0px;opacity:0\n}input[type='radio'].svelte-1oy4poo:checked~label.svelte-1oy4poo{outline-style:solid;outline-width:2px;outline-color:#eab308\n}label.svelte-1oy4poo.svelte-1oy4poo{display:flex;cursor:pointer;white-space:nowrap;outline-width:2px;outline-offset:-2px;outline-color:#eab308;transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)\n}label.svelte-1oy4poo.svelte-1oy4poo:hover{outline-style:solid\n}.brush.svelte-1oy4poo.svelte-1oy4poo{display:flex\n}")();
119
+ const css$4 = {
120
+ code: ".colors.svelte-1oy4poo.svelte-1oy4poo{display:grid;max-height:9rem;scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0.5rem;overflow:scroll\n}@media(min-width: 530px){.colors.svelte-1oy4poo.svelte-1oy4poo{max-height:none;grid-template-columns:repeat(3, minmax(0, 1fr))\n }}.colors.svelte-1oy4poo span.svelte-1oy4poo{margin-left:0.5rem\n}.colors.svelte-1oy4poo svg.svelte-1oy4poo{display:block\n}input[type='radio'].svelte-1oy4poo.svelte-1oy4poo{position:absolute;display:none;height:0px;width:0px;opacity:0\n}input[type='radio'].svelte-1oy4poo:checked~label.svelte-1oy4poo{outline-style:solid;outline-width:2px;outline-color:#eab308\n}label.svelte-1oy4poo.svelte-1oy4poo{display:flex;cursor:pointer;white-space:nowrap;outline-width:2px;outline-offset:-2px;outline-color:#eab308;transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)\n}label.svelte-1oy4poo.svelte-1oy4poo:hover{outline-style:solid\n}.brush.svelte-1oy4poo.svelte-1oy4poo{display:flex\n}",
121
+ map: null
122
+ };
123
+ const STARTCOLORID = 6;
124
+ const BrushSelector = create_ssr_component(($$result, $$props, $$bindings, slots) => {
125
+ let $selectedBrush, $$unsubscribe_selectedBrush;
126
+ $$unsubscribe_selectedBrush = subscribe(selectedBrush, (value) => $selectedBrush = value);
127
+ const { color, label } = COLOR_LIST[STARTCOLORID];
128
+ let brushColor = `rgb(${color.join(",")})`;
129
+ let brushSize = 40;
130
+ set_store_value(selectedBrush, $selectedBrush = {
131
+ color: brushColor,
132
+ size: brushSize,
133
+ label
134
+ }, $selectedBrush);
135
+ $$result.css.add(css$4);
136
+ $$unsubscribe_selectedBrush();
137
+ return `<form><h4 class="${"font-bold mt-6 mb-2 leading-6 my-3"}">Brush Type</h4>
138
+ <div class="${"colors svelte-1oy4poo"}" name="${"colors"}">${each(COLOR_LIST, (color2, id) => {
139
+ return `<div class="${"snap-always snap-start"}"><input name="${"color"}" ${id == STARTCOLORID ? "checked" : ""} type="${"radio"}" id="${"color-" + escape(id)}"${add_attribute("value", id, 0)} class="${"svelte-1oy4poo"}">
140
+ <label for="${"color-" + escape(id)}" class="${"svelte-1oy4poo"}"><svg width="${"20"}" height="${"20"}" viewBox="${"0 0 20 20"}" class="${"svelte-1oy4poo"}"><rect x="${"0"}" y="${"0"}" width="${"20"}" height="${"20"}" fill="${"rgb(" + escape(color2.color.join(",")) + ")"}"></rect></svg>
141
+ <span class="${"svelte-1oy4poo"}">${escape(color2.label)}</span></label>
142
+ </div>`;
143
+ })}</div>
144
+ <h4 class="${"font-bold mt-6 mb-2 my-6 leading-6"}">Brush Size</h4>
145
+ <div class="${"brush svelte-1oy4poo"}"><input value="${"10"}" min="${"1"}" max="${"150"}" step="${"1"}" name="${"brush"}" type="${"range"}">
146
+ <label class="${"pl-2 svelte-1oy4poo"}" for="${"brush"}">${escape($selectedBrush.size)}</label></div>
147
+ </form>`;
148
+ });
149
+ var ParamsSelector_svelte_svelte_type_style_lang = /* @__PURE__ */ (() => "@media(min-width: 530px){}select.svelte-7to72y.svelte-7to72y,button.svelte-7to72y.svelte-7to72y,input.svelte-7to72y.svelte-7to72y{border-radius:0.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:0.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))\n}select.svelte-7to72y.svelte-7to72y:focus,button.svelte-7to72y.svelte-7to72y:focus,input.svelte-7to72y.svelte-7to72y:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))\n}select.svelte-7to72y.svelte-7to72y:disabled,button.svelte-7to72y.svelte-7to72y:disabled,input.svelte-7to72y.svelte-7to72y:disabled{opacity:0.5\n}@media(prefers-color-scheme: dark){select.svelte-7to72y.svelte-7to72y,button.svelte-7to72y.svelte-7to72y,input.svelte-7to72y.svelte-7to72y{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))\n }select.svelte-7to72y.svelte-7to72y:focus,button.svelte-7to72y.svelte-7to72y:focus,input.svelte-7to72y.svelte-7to72y:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))\n }}input.svelte-7to72y:disabled+label.svelte-7to72y{opacity:0.5\n}input.svelte-7to72y.svelte-7to72y{padding-left:0.75rem\n}")();
150
+ const css$3 = {
151
+ code: "@media(min-width: 530px){}select.svelte-7to72y.svelte-7to72y,button.svelte-7to72y.svelte-7to72y,input.svelte-7to72y.svelte-7to72y{border-radius:0.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:0.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))\n}select.svelte-7to72y.svelte-7to72y:focus,button.svelte-7to72y.svelte-7to72y:focus,input.svelte-7to72y.svelte-7to72y:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))\n}select.svelte-7to72y.svelte-7to72y:disabled,button.svelte-7to72y.svelte-7to72y:disabled,input.svelte-7to72y.svelte-7to72y:disabled{opacity:0.5\n}@media(prefers-color-scheme: dark){select.svelte-7to72y.svelte-7to72y,button.svelte-7to72y.svelte-7to72y,input.svelte-7to72y.svelte-7to72y{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))\n }select.svelte-7to72y.svelte-7to72y:focus,button.svelte-7to72y.svelte-7to72y:focus,input.svelte-7to72y.svelte-7to72y:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))\n }}input.svelte-7to72y:disabled+label.svelte-7to72y{opacity:0.5\n}input.svelte-7to72y.svelte-7to72y{padding-left:0.75rem\n}",
152
+ map: null
153
+ };
154
+ const ParamsSelector = create_ssr_component(($$result, $$props, $$bindings, slots) => {
155
+ let $selectedParams, $$unsubscribe_selectedParams;
156
+ let $generateMap, $$unsubscribe_generateMap;
157
+ $$unsubscribe_selectedParams = subscribe(selectedParams, (value) => $selectedParams = value);
158
+ $$unsubscribe_generateMap = subscribe(generateMap, (value) => $generateMap = value);
159
+ let form;
160
+ let seed = $selectedParams.seed;
161
+ let sampleSteps = $selectedParams.steps;
162
+ let prompt = $selectedParams.prompt;
163
+ let modifier = $selectedParams.modifier;
164
+ $$result.css.add(css$3);
165
+ $$unsubscribe_selectedParams();
166
+ $$unsubscribe_generateMap();
167
+ return `<form${add_attribute("this", form, 0)}><h4 class="${"font-bold mt-6 mb-2 my-6 leading-6"}">Prompt</h4>
168
+ <input name="${"prompt"}" placeholder="${"Aerial view of ..., France."}" ${$generateMap === true ? "disabled" : ""} style="${"width: 500px;"}" class="${"svelte-7to72y"}"${add_attribute("value", prompt, 0)}>
169
+
170
+ <h4 class="${"font-bold mt-6 mb-2 my-6 leading-6"}">Modifier</h4>
171
+ <input name="${"modifier"}" placeholder="${"High resolution satellite image"}" ${$generateMap === true ? "disabled" : ""} style="${"width: 500px;"}" class="${"svelte-7to72y"}"${add_attribute("value", modifier, 0)}>
172
+ <select name="${"presets"}" ${$generateMap === true ? "disabled" : ""} class="${"svelte-7to72y"}"><option disabled selected value="${"preset"}">preset</option>${each(PRESETS, (preset) => {
173
+ return `<option${add_attribute("value", preset[0], 0)}>${escape(preset[1])}</option>\``;
174
+ })}</select>
175
+
176
+ <h4 class="${"font-bold mt-6 mb-2 my-6 leading-6"}">Random Seed</h4>
177
+ <input type="${"Number"}" name="${"seed"}" placeholder="${"Integer Seed"}" ${$generateMap === true ? "disabled" : ""} class="${"svelte-7to72y"}"${add_attribute("value", seed, 0)}>
178
+ <button ${$generateMap === true ? "disabled" : ""} class="${"svelte-7to72y"}">Random
179
+ </button>
180
+ <h4 class="${"font-bold mt-6 mb-2 my-6 leading-6"}">Sample Steps</h4>
181
+ <div class="${"flex"}"><input type="${"range"}" name="${"steps"}" min="${"10"}" max="${"30"}" step="${"1"}" ${$generateMap === true ? "disabled" : ""} class="${"svelte-7to72y"}"${add_attribute("value", sampleSteps, 0)}>
182
+ <label class="${"pl-2 svelte-7to72y"}" for="${"steps"}">${escape(sampleSteps)}</label></div>
183
+ </form>`;
184
+ });
185
+ const Undo = create_ssr_component(($$result, $$props, $$bindings, slots) => {
186
+ let { classNames = "" } = $$props;
187
+ if ($$props.classNames === void 0 && $$bindings.classNames && classNames !== void 0)
188
+ $$bindings.classNames(classNames);
189
+ return `<svg xmlns="${"http://www.w3.org/2000/svg"}" width="${"20"}" viewBox="${"0 0 512 512"}"${add_attribute("class", classNames, 0)}><path fill="${"white"}" stroke="${"black"}" stroke-width="${"30"}" 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"}"></path></svg>`;
190
+ });
191
+ var DrawingCanvas_svelte_svelte_type_style_lang = /* @__PURE__ */ (() => ".canvas.svelte-vhujxn{z-index:0;aspect-ratio:512/512;width:100%;max-width:100%;border-width:1px;--tw-border-opacity:1;border-color:rgb(107 114 128 / var(--tw-border-opacity))\n}.brush.svelte-vhujxn{pointer-events:none;position:absolute;z-index:10;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}.label.svelte-vhujxn{pointer-events:none;position:absolute;top:0px;left:0px;z-index:20;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-left:0.5rem;padding-right:0.5rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity));color:white;font-weight:bolder;-webkit-text-stroke:1px black;-webkit-text-fill-color:white\n}")();
192
+ const css$2 = {
193
+ code: ".canvas.svelte-vhujxn{z-index:0;aspect-ratio:512/512;width:100%;max-width:100%;border-width:1px;--tw-border-opacity:1;border-color:rgb(107 114 128 / var(--tw-border-opacity))\n}.brush.svelte-vhujxn{pointer-events:none;position:absolute;z-index:10;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}.label.svelte-vhujxn{pointer-events:none;position:absolute;top:0px;left:0px;z-index:20;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-left:0.5rem;padding-right:0.5rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity));color:white;font-weight:bolder;-webkit-text-stroke:1px black;-webkit-text-fill-color:white\n}",
194
+ map: null
195
+ };
196
+ function drawImage(ctx, img) {
197
+ ctx.drawImage(img, 0, 0, ctx.canvas.width, ctx.canvas.height);
198
+ }
199
+ const DrawingCanvas = create_ssr_component(($$result, $$props, $$bindings, slots) => {
200
+ let $drawingLayers, $$unsubscribe_drawingLayers;
201
+ let $selectedImage, $$unsubscribe_selectedImage;
202
+ let $selectedBrush, $$unsubscribe_selectedBrush;
203
+ let $$unsubscribe_currentCanvas;
204
+ $$unsubscribe_drawingLayers = subscribe(drawingLayers, (value) => $drawingLayers = value);
205
+ $$unsubscribe_selectedImage = subscribe(selectedImage, (value) => $selectedImage = value);
206
+ $$unsubscribe_selectedBrush = subscribe(selectedBrush, (value) => $selectedBrush = value);
207
+ $$unsubscribe_currentCanvas = subscribe(currentCanvas, (value) => value);
208
+ let canvas;
209
+ let brush;
210
+ let ctx;
211
+ $$result.css.add(css$2);
212
+ {
213
+ {
214
+ if ($selectedImage) {
215
+ drawImage(ctx, $selectedImage);
216
+ set_store_value(drawingLayers, $drawingLayers = /* @__PURE__ */ new Map(), $drawingLayers);
217
+ }
218
+ }
219
+ }
220
+ $$unsubscribe_drawingLayers();
221
+ $$unsubscribe_selectedImage();
222
+ $$unsubscribe_selectedBrush();
223
+ $$unsubscribe_currentCanvas();
224
+ return `<div><div class="${"relative overflow-clip"}"><canvas class="${"canvas svelte-vhujxn"}" width="${"512"}" height="${"512"}"${add_attribute("this", canvas, 0)}></canvas>
225
+ <canvas class="${"brush svelte-vhujxn"}" width="${"10"}" height="${"10"}"${add_attribute("this", brush, 0)}></canvas>
226
+ <span class="${"label svelte-vhujxn"}">${escape($selectedBrush == null ? void 0 : $selectedBrush.label)}</span>
227
+ <button class="${"absolute bottom-0 left-0 p-3"}" ${$drawingLayers.size <= 0 ? "disabled" : ""}>${validate_component(Undo, "UndoIcon").$$render($$result, {}, {}, {})}</button></div>
228
+ </div>`;
229
+ });
230
+ var ResultCanvas_svelte_svelte_type_style_lang = /* @__PURE__ */ (() => ".image.svelte-1t0h0rs{z-index:0;box-sizing:border-box;aspect-ratio:512/512;border-width:1px;--tw-border-opacity:1;border-color:rgb(107 114 128 / var(--tw-border-opacity))\n}@media(prefers-color-scheme: dark){.image.svelte-1t0h0rs{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))\n }}.loading.svelte-1t0h0rs{position:absolute;top:0px;left:0px;right:0px;bottom:0px;display:flex;flex-direction:column;align-items:center;justify-content:center\n}")();
231
+ const css$1 = {
232
+ code: ".image.svelte-1t0h0rs{z-index:0;box-sizing:border-box;aspect-ratio:512/512;border-width:1px;--tw-border-opacity:1;border-color:rgb(107 114 128 / var(--tw-border-opacity))\n}@media(prefers-color-scheme: dark){.image.svelte-1t0h0rs{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))\n }}.loading.svelte-1t0h0rs{position:absolute;top:0px;left:0px;right:0px;bottom:0px;display:flex;flex-direction:column;align-items:center;justify-content:center\n}",
233
+ map: null
234
+ };
235
+ let predictStatus = "";
236
+ async function saveImage(base64Image) {
237
+ return new Promise((resolve, reject) => {
238
+ try {
239
+ const a = document.createElement("a");
240
+ a.download = `sucess-${Date.now()}.png`;
241
+ a.target = "_self";
242
+ a.onclick = async (e) => {
243
+ if (a.href) {
244
+ URL.revokeObjectURL(a.href);
245
+ }
246
+ a.href = base64Image;
247
+ };
248
+ requestAnimationFrame(() => {
249
+ console.log("Downloading image.");
250
+ a.click();
251
+ resolve(null);
252
+ });
253
+ } catch (err) {
254
+ reject();
255
+ }
256
+ });
257
+ }
258
+ async function predict(base64Image, { prompt, modifier, steps, seed }) {
259
+ const response = await fetch("/predict", {
260
+ method: "POST",
261
+ headers: { "Content-Type": "application/json" },
262
+ body: JSON.stringify({
263
+ data: [base64Image, prompt + ". " + modifier, steps, seed.toString()]
264
+ })
265
+ });
266
+ if (!response.ok) {
267
+ throw new Error("Prediction request failed.");
268
+ }
269
+ const result = await response.text();
270
+ return result;
271
+ }
272
+ const ResultCanvas = create_ssr_component(($$result, $$props, $$bindings, slots) => {
273
+ let $saveResult, $$unsubscribe_saveResult;
274
+ let $resultImage, $$unsubscribe_resultImage;
275
+ let $generateMap, $$unsubscribe_generateMap;
276
+ let $selectedParams, $$unsubscribe_selectedParams;
277
+ let $currentCanvas, $$unsubscribe_currentCanvas;
278
+ $$unsubscribe_saveResult = subscribe(saveResult, (value) => $saveResult = value);
279
+ $$unsubscribe_resultImage = subscribe(resultImage, (value) => $resultImage = value);
280
+ $$unsubscribe_generateMap = subscribe(generateMap, (value) => $generateMap = value);
281
+ $$unsubscribe_selectedParams = subscribe(selectedParams, (value) => $selectedParams = value);
282
+ $$unsubscribe_currentCanvas = subscribe(currentCanvas, (value) => $currentCanvas = value);
283
+ $$result.css.add(css$1);
284
+ {
285
+ (async () => {
286
+ if ($generateMap) {
287
+ const results = await predict($currentCanvas.toDataURL(), $selectedParams);
288
+ set_store_value(resultImage, $resultImage = results, $resultImage);
289
+ set_store_value(generateMap, $generateMap = false, $generateMap);
290
+ }
291
+ })();
292
+ }
293
+ {
294
+ (async () => {
295
+ if ($saveResult) {
296
+ await saveImage($resultImage);
297
+ set_store_value(saveResult, $saveResult = false, $saveResult);
298
+ }
299
+ })();
300
+ }
301
+ $$unsubscribe_saveResult();
302
+ $$unsubscribe_resultImage();
303
+ $$unsubscribe_generateMap();
304
+ $$unsubscribe_selectedParams();
305
+ $$unsubscribe_currentCanvas();
306
+ return `<div class="${"relative overflow-clip flex flex-col justify-center items-center w-full h-full"}">${$resultImage ? `<img class="${"image " + escape($generateMap ? "opacity-30" : "") + " svelte-1t0h0rs"}" alt="${"Generative Map Result"}"${add_attribute("src", $resultImage, 0)} width="${"512"}" height="${"512"}">` : ``}
307
+ ${$generateMap ? `<div class="${"loading svelte-1t0h0rs"}"><svg xmlns="${"http://www.w3.org/2000/svg"}" fill="${"none"}" viewBox="${"0 0 24 24"}" class="${"animate-spin max-w-[3rem]"}"><path fill="${"currentColor"}" 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"}"></path></svg>
308
+ <span class="${"text-xs"}">${escape(predictStatus)}</span></div>` : ``}</div>
309
+
310
+ `;
311
+ });
312
+ var index_svelte_svelte_type_style_lang = /* @__PURE__ */ (() => ".drawings.svelte-1sy339h{display:grid;grid-template-columns:2fr 1.5fr;place-items:center}@media(min-width: 530px){.drawings.svelte-1sy339h{grid-template-columns:repeat(2, minmax(0, 1fr))}}button.svelte-1sy339h{border-radius:0.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:0.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}button.svelte-1sy339h:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))}button.svelte-1sy339h:disabled{opacity:0.5}@media(prefers-color-scheme: dark){button.svelte-1sy339h{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}button.svelte-1sy339h:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))}}.green.svelte-1sy339h{background-color:lightgreen;font-weight:bold;font-size:1.2em}")();
313
+ const css = {
314
+ code: ".drawings.svelte-1sy339h{display:grid;grid-template-columns:2fr 1.5fr;place-items:center}@media(min-width: 530px){.drawings.svelte-1sy339h{grid-template-columns:repeat(2, minmax(0, 1fr))}}button.svelte-1sy339h{border-radius:0.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:0.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}button.svelte-1sy339h:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))}button.svelte-1sy339h:disabled{opacity:0.5}@media(prefers-color-scheme: dark){button.svelte-1sy339h{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}button.svelte-1sy339h:focus{--tw-border-opacity:1;border-color:rgb(59 130 246 / var(--tw-border-opacity));--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246 / var(--tw-ring-opacity))}}.green.svelte-1sy339h{background-color:lightgreen;font-weight:bold;font-size:1.2em}",
315
+ map: null
316
+ };
317
+ const Routes = create_ssr_component(($$result, $$props, $$bindings, slots) => {
318
+ let $generateMap, $$unsubscribe_generateMap;
319
+ let $saveResult, $$unsubscribe_saveResult;
320
+ let $resultImage, $$unsubscribe_resultImage;
321
+ $$unsubscribe_generateMap = subscribe(generateMap, (value) => $generateMap = value);
322
+ $$unsubscribe_saveResult = subscribe(saveResult, (value) => $saveResult = value);
323
+ $$unsubscribe_resultImage = subscribe(resultImage, (value) => $resultImage = value);
324
+ $$result.css.add(css);
325
+ $$unsubscribe_generateMap();
326
+ $$unsubscribe_saveResult();
327
+ $$unsubscribe_resultImage();
328
+ return `<div class="${"max-w-screen-md mx-auto px-3 py-5 relative z-0"}"><article class="${"prose"}"><h1>Drawing to Map</h1>
329
+ <p>This space is for the ControlNet model <a href="${"https://github.com/RubenGres/Drawing2Map"}" target="${"_blank"}"><span>Drawing2Map</span></a></p></article>
330
+
331
+
332
+ ${validate_component(BrushSelector, "BrushSelector").$$render($$result, {}, {}, {})}
333
+ <div class="${"drawings py-3 -mx-3 svelte-1sy339h"}">${validate_component(DrawingCanvas, "DrawingCanvas").$$render($$result, {}, {}, {})}
334
+ ${validate_component(ResultCanvas, "ResultCanvas").$$render($$result, {}, {}, {})}</div>
335
+
336
+ <button ${$generateMap === true ? "disabled" : ""} class="${"green svelte-1sy339h"}">Generate Map
337
+ </button>
338
+
339
+ <button ${$saveResult === true || !$resultImage ? "disabled" : ""} class="${"svelte-1sy339h"}">Save Result
340
+ </button>
341
+
342
+ ${validate_component(TemplateGallery, "TemplateGallery").$$render($$result, {}, {}, {})}
343
+
344
+ ${validate_component(ParamsSelector, "ParamSelector").$$render($$result, {}, {}, {})}
345
+ </div>`;
346
+ });
347
+ export { Routes as default };
frontend/.svelte-kit/output/server/index.js ADDED
@@ -0,0 +1,2291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { c as create_ssr_component, s as setContext, v as validate_component, m as missing_component } from "./chunks/index-445fd704.js";
2
+ import { s as set_paths, b as base, a as assets } from "./chunks/paths-396f020f.js";
3
+ function afterUpdate() {
4
+ }
5
+ const Root = create_ssr_component(($$result, $$props, $$bindings, slots) => {
6
+ let { stores } = $$props;
7
+ let { page } = $$props;
8
+ let { components } = $$props;
9
+ let { props_0 = null } = $$props;
10
+ let { props_1 = null } = $$props;
11
+ let { props_2 = null } = $$props;
12
+ setContext("__svelte__", stores);
13
+ afterUpdate(stores.page.notify);
14
+ if ($$props.stores === void 0 && $$bindings.stores && stores !== void 0)
15
+ $$bindings.stores(stores);
16
+ if ($$props.page === void 0 && $$bindings.page && page !== void 0)
17
+ $$bindings.page(page);
18
+ if ($$props.components === void 0 && $$bindings.components && components !== void 0)
19
+ $$bindings.components(components);
20
+ if ($$props.props_0 === void 0 && $$bindings.props_0 && props_0 !== void 0)
21
+ $$bindings.props_0(props_0);
22
+ if ($$props.props_1 === void 0 && $$bindings.props_1 && props_1 !== void 0)
23
+ $$bindings.props_1(props_1);
24
+ if ($$props.props_2 === void 0 && $$bindings.props_2 && props_2 !== void 0)
25
+ $$bindings.props_2(props_2);
26
+ {
27
+ stores.page.set(page);
28
+ }
29
+ return `
30
+
31
+
32
+ ${components[1] ? `${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, Object.assign(props_0 || {}), {}, {
33
+ default: () => {
34
+ return `${components[2] ? `${validate_component(components[1] || missing_component, "svelte:component").$$render($$result, Object.assign(props_1 || {}), {}, {
35
+ default: () => {
36
+ return `${validate_component(components[2] || missing_component, "svelte:component").$$render($$result, Object.assign(props_2 || {}), {}, {})}`;
37
+ }
38
+ })}` : `${validate_component(components[1] || missing_component, "svelte:component").$$render($$result, Object.assign(props_1 || {}), {}, {})}`}`;
39
+ }
40
+ })}` : `${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, Object.assign(props_0 || {}), {}, {})}`}
41
+
42
+ ${``}`;
43
+ });
44
+ function to_headers(object) {
45
+ const headers = new Headers();
46
+ if (object) {
47
+ for (const key2 in object) {
48
+ const value = object[key2];
49
+ if (!value)
50
+ continue;
51
+ if (Array.isArray(value)) {
52
+ value.forEach((value2) => {
53
+ headers.append(key2, value2);
54
+ });
55
+ } else {
56
+ headers.set(key2, value);
57
+ }
58
+ }
59
+ }
60
+ return headers;
61
+ }
62
+ function hash(value) {
63
+ let hash2 = 5381;
64
+ let i = value.length;
65
+ if (typeof value === "string") {
66
+ while (i)
67
+ hash2 = hash2 * 33 ^ value.charCodeAt(--i);
68
+ } else {
69
+ while (i)
70
+ hash2 = hash2 * 33 ^ value[--i];
71
+ }
72
+ return (hash2 >>> 0).toString(36);
73
+ }
74
+ function lowercase_keys(obj) {
75
+ const clone = {};
76
+ for (const key2 in obj) {
77
+ clone[key2.toLowerCase()] = obj[key2];
78
+ }
79
+ return clone;
80
+ }
81
+ function decode_params(params) {
82
+ for (const key2 in params) {
83
+ params[key2] = params[key2].replace(/%23/g, "#").replace(/%3[Bb]/g, ";").replace(/%2[Cc]/g, ",").replace(/%2[Ff]/g, "/").replace(/%3[Ff]/g, "?").replace(/%3[Aa]/g, ":").replace(/%40/g, "@").replace(/%26/g, "&").replace(/%3[Dd]/g, "=").replace(/%2[Bb]/g, "+").replace(/%24/g, "$");
84
+ }
85
+ return params;
86
+ }
87
+ function is_pojo(body) {
88
+ if (typeof body !== "object")
89
+ return false;
90
+ if (body) {
91
+ if (body instanceof Uint8Array)
92
+ return false;
93
+ if (body instanceof ReadableStream)
94
+ return false;
95
+ if (body._readableState && typeof body.pipe === "function") {
96
+ throw new Error("Node streams are no longer supported \u2014 use a ReadableStream instead");
97
+ }
98
+ }
99
+ return true;
100
+ }
101
+ function normalize_request_method(event) {
102
+ const method = event.request.method.toLowerCase();
103
+ return method === "delete" ? "del" : method;
104
+ }
105
+ function error(body) {
106
+ return new Response(body, {
107
+ status: 500
108
+ });
109
+ }
110
+ function is_string(s2) {
111
+ return typeof s2 === "string" || s2 instanceof String;
112
+ }
113
+ const text_types = /* @__PURE__ */ new Set([
114
+ "application/xml",
115
+ "application/json",
116
+ "application/x-www-form-urlencoded",
117
+ "multipart/form-data"
118
+ ]);
119
+ const bodyless_status_codes = /* @__PURE__ */ new Set([101, 204, 205, 304]);
120
+ function is_text(content_type) {
121
+ if (!content_type)
122
+ return true;
123
+ const type = content_type.split(";")[0].toLowerCase();
124
+ return type.startsWith("text/") || type.endsWith("+xml") || text_types.has(type);
125
+ }
126
+ async function render_endpoint(event, mod) {
127
+ const method = normalize_request_method(event);
128
+ let handler = mod[method];
129
+ if (!handler && method === "head") {
130
+ handler = mod.get;
131
+ }
132
+ if (!handler) {
133
+ const allowed = [];
134
+ for (const method2 in ["get", "post", "put", "patch"]) {
135
+ if (mod[method2])
136
+ allowed.push(method2.toUpperCase());
137
+ }
138
+ if (mod.del)
139
+ allowed.push("DELETE");
140
+ if (mod.get || mod.head)
141
+ allowed.push("HEAD");
142
+ return event.request.headers.get("x-sveltekit-load") ? new Response(void 0, {
143
+ status: 204
144
+ }) : new Response(`${event.request.method} method not allowed`, {
145
+ status: 405,
146
+ headers: {
147
+ allow: allowed.join(", ")
148
+ }
149
+ });
150
+ }
151
+ const response = await handler(event);
152
+ const preface = `Invalid response from route ${event.url.pathname}`;
153
+ if (typeof response !== "object") {
154
+ return error(`${preface}: expected an object, got ${typeof response}`);
155
+ }
156
+ if (response.fallthrough) {
157
+ throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");
158
+ }
159
+ const { status = 200, body = {} } = response;
160
+ const headers = response.headers instanceof Headers ? new Headers(response.headers) : to_headers(response.headers);
161
+ const type = headers.get("content-type");
162
+ if (!is_text(type) && !(body instanceof Uint8Array || is_string(body))) {
163
+ return error(`${preface}: body must be an instance of string or Uint8Array if content-type is not a supported textual content-type`);
164
+ }
165
+ let normalized_body;
166
+ if (is_pojo(body) && (!type || type.startsWith("application/json"))) {
167
+ headers.set("content-type", "application/json; charset=utf-8");
168
+ normalized_body = JSON.stringify(body);
169
+ } else {
170
+ normalized_body = body;
171
+ }
172
+ if ((typeof normalized_body === "string" || normalized_body instanceof Uint8Array) && !headers.has("etag")) {
173
+ const cache_control = headers.get("cache-control");
174
+ if (!cache_control || !/(no-store|immutable)/.test(cache_control)) {
175
+ headers.set("etag", `"${hash(normalized_body)}"`);
176
+ }
177
+ }
178
+ return new Response(method !== "head" && !bodyless_status_codes.has(status) ? normalized_body : void 0, {
179
+ status,
180
+ headers
181
+ });
182
+ }
183
+ var chars$1 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
184
+ var unsafeChars = /[<>\b\f\n\r\t\0\u2028\u2029]/g;
185
+ var reserved = /^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
186
+ var escaped = {
187
+ "<": "\\u003C",
188
+ ">": "\\u003E",
189
+ "/": "\\u002F",
190
+ "\\": "\\\\",
191
+ "\b": "\\b",
192
+ "\f": "\\f",
193
+ "\n": "\\n",
194
+ "\r": "\\r",
195
+ " ": "\\t",
196
+ "\0": "\\0",
197
+ "\u2028": "\\u2028",
198
+ "\u2029": "\\u2029"
199
+ };
200
+ var objectProtoOwnPropertyNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
201
+ function devalue(value) {
202
+ var counts = /* @__PURE__ */ new Map();
203
+ function walk(thing) {
204
+ if (typeof thing === "function") {
205
+ throw new Error("Cannot stringify a function");
206
+ }
207
+ if (counts.has(thing)) {
208
+ counts.set(thing, counts.get(thing) + 1);
209
+ return;
210
+ }
211
+ counts.set(thing, 1);
212
+ if (!isPrimitive(thing)) {
213
+ var type = getType(thing);
214
+ switch (type) {
215
+ case "Number":
216
+ case "String":
217
+ case "Boolean":
218
+ case "Date":
219
+ case "RegExp":
220
+ return;
221
+ case "Array":
222
+ thing.forEach(walk);
223
+ break;
224
+ case "Set":
225
+ case "Map":
226
+ Array.from(thing).forEach(walk);
227
+ break;
228
+ default:
229
+ var proto = Object.getPrototypeOf(thing);
230
+ if (proto !== Object.prototype && proto !== null && Object.getOwnPropertyNames(proto).sort().join("\0") !== objectProtoOwnPropertyNames) {
231
+ throw new Error("Cannot stringify arbitrary non-POJOs");
232
+ }
233
+ if (Object.getOwnPropertySymbols(thing).length > 0) {
234
+ throw new Error("Cannot stringify POJOs with symbolic keys");
235
+ }
236
+ Object.keys(thing).forEach(function(key2) {
237
+ return walk(thing[key2]);
238
+ });
239
+ }
240
+ }
241
+ }
242
+ walk(value);
243
+ var names = /* @__PURE__ */ new Map();
244
+ Array.from(counts).filter(function(entry) {
245
+ return entry[1] > 1;
246
+ }).sort(function(a, b) {
247
+ return b[1] - a[1];
248
+ }).forEach(function(entry, i) {
249
+ names.set(entry[0], getName(i));
250
+ });
251
+ function stringify(thing) {
252
+ if (names.has(thing)) {
253
+ return names.get(thing);
254
+ }
255
+ if (isPrimitive(thing)) {
256
+ return stringifyPrimitive(thing);
257
+ }
258
+ var type = getType(thing);
259
+ switch (type) {
260
+ case "Number":
261
+ case "String":
262
+ case "Boolean":
263
+ return "Object(" + stringify(thing.valueOf()) + ")";
264
+ case "RegExp":
265
+ return "new RegExp(" + stringifyString(thing.source) + ', "' + thing.flags + '")';
266
+ case "Date":
267
+ return "new Date(" + thing.getTime() + ")";
268
+ case "Array":
269
+ var members = thing.map(function(v, i) {
270
+ return i in thing ? stringify(v) : "";
271
+ });
272
+ var tail = thing.length === 0 || thing.length - 1 in thing ? "" : ",";
273
+ return "[" + members.join(",") + tail + "]";
274
+ case "Set":
275
+ case "Map":
276
+ return "new " + type + "([" + Array.from(thing).map(stringify).join(",") + "])";
277
+ default:
278
+ var obj = "{" + Object.keys(thing).map(function(key2) {
279
+ return safeKey(key2) + ":" + stringify(thing[key2]);
280
+ }).join(",") + "}";
281
+ var proto = Object.getPrototypeOf(thing);
282
+ if (proto === null) {
283
+ return Object.keys(thing).length > 0 ? "Object.assign(Object.create(null)," + obj + ")" : "Object.create(null)";
284
+ }
285
+ return obj;
286
+ }
287
+ }
288
+ var str = stringify(value);
289
+ if (names.size) {
290
+ var params_1 = [];
291
+ var statements_1 = [];
292
+ var values_1 = [];
293
+ names.forEach(function(name, thing) {
294
+ params_1.push(name);
295
+ if (isPrimitive(thing)) {
296
+ values_1.push(stringifyPrimitive(thing));
297
+ return;
298
+ }
299
+ var type = getType(thing);
300
+ switch (type) {
301
+ case "Number":
302
+ case "String":
303
+ case "Boolean":
304
+ values_1.push("Object(" + stringify(thing.valueOf()) + ")");
305
+ break;
306
+ case "RegExp":
307
+ values_1.push(thing.toString());
308
+ break;
309
+ case "Date":
310
+ values_1.push("new Date(" + thing.getTime() + ")");
311
+ break;
312
+ case "Array":
313
+ values_1.push("Array(" + thing.length + ")");
314
+ thing.forEach(function(v, i) {
315
+ statements_1.push(name + "[" + i + "]=" + stringify(v));
316
+ });
317
+ break;
318
+ case "Set":
319
+ values_1.push("new Set");
320
+ statements_1.push(name + "." + Array.from(thing).map(function(v) {
321
+ return "add(" + stringify(v) + ")";
322
+ }).join("."));
323
+ break;
324
+ case "Map":
325
+ values_1.push("new Map");
326
+ statements_1.push(name + "." + Array.from(thing).map(function(_a) {
327
+ var k = _a[0], v = _a[1];
328
+ return "set(" + stringify(k) + ", " + stringify(v) + ")";
329
+ }).join("."));
330
+ break;
331
+ default:
332
+ values_1.push(Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}");
333
+ Object.keys(thing).forEach(function(key2) {
334
+ statements_1.push("" + name + safeProp(key2) + "=" + stringify(thing[key2]));
335
+ });
336
+ }
337
+ });
338
+ statements_1.push("return " + str);
339
+ return "(function(" + params_1.join(",") + "){" + statements_1.join(";") + "}(" + values_1.join(",") + "))";
340
+ } else {
341
+ return str;
342
+ }
343
+ }
344
+ function getName(num) {
345
+ var name = "";
346
+ do {
347
+ name = chars$1[num % chars$1.length] + name;
348
+ num = ~~(num / chars$1.length) - 1;
349
+ } while (num >= 0);
350
+ return reserved.test(name) ? name + "_" : name;
351
+ }
352
+ function isPrimitive(thing) {
353
+ return Object(thing) !== thing;
354
+ }
355
+ function stringifyPrimitive(thing) {
356
+ if (typeof thing === "string")
357
+ return stringifyString(thing);
358
+ if (thing === void 0)
359
+ return "void 0";
360
+ if (thing === 0 && 1 / thing < 0)
361
+ return "-0";
362
+ var str = String(thing);
363
+ if (typeof thing === "number")
364
+ return str.replace(/^(-)?0\./, "$1.");
365
+ return str;
366
+ }
367
+ function getType(thing) {
368
+ return Object.prototype.toString.call(thing).slice(8, -1);
369
+ }
370
+ function escapeUnsafeChar(c) {
371
+ return escaped[c] || c;
372
+ }
373
+ function escapeUnsafeChars(str) {
374
+ return str.replace(unsafeChars, escapeUnsafeChar);
375
+ }
376
+ function safeKey(key2) {
377
+ return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key2) ? key2 : escapeUnsafeChars(JSON.stringify(key2));
378
+ }
379
+ function safeProp(key2) {
380
+ return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key2) ? "." + key2 : "[" + escapeUnsafeChars(JSON.stringify(key2)) + "]";
381
+ }
382
+ function stringifyString(str) {
383
+ var result = '"';
384
+ for (var i = 0; i < str.length; i += 1) {
385
+ var char = str.charAt(i);
386
+ var code = char.charCodeAt(0);
387
+ if (char === '"') {
388
+ result += '\\"';
389
+ } else if (char in escaped) {
390
+ result += escaped[char];
391
+ } else if (code >= 55296 && code <= 57343) {
392
+ var next = str.charCodeAt(i + 1);
393
+ if (code <= 56319 && (next >= 56320 && next <= 57343)) {
394
+ result += char + str[++i];
395
+ } else {
396
+ result += "\\u" + code.toString(16).toUpperCase();
397
+ }
398
+ } else {
399
+ result += char;
400
+ }
401
+ }
402
+ result += '"';
403
+ return result;
404
+ }
405
+ function noop() {
406
+ }
407
+ function safe_not_equal(a, b) {
408
+ return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function");
409
+ }
410
+ Promise.resolve();
411
+ const subscriber_queue = [];
412
+ function readable(value, start) {
413
+ return {
414
+ subscribe: writable(value, start).subscribe
415
+ };
416
+ }
417
+ function writable(value, start = noop) {
418
+ let stop;
419
+ const subscribers = /* @__PURE__ */ new Set();
420
+ function set(new_value) {
421
+ if (safe_not_equal(value, new_value)) {
422
+ value = new_value;
423
+ if (stop) {
424
+ const run_queue = !subscriber_queue.length;
425
+ for (const subscriber of subscribers) {
426
+ subscriber[1]();
427
+ subscriber_queue.push(subscriber, value);
428
+ }
429
+ if (run_queue) {
430
+ for (let i = 0; i < subscriber_queue.length; i += 2) {
431
+ subscriber_queue[i][0](subscriber_queue[i + 1]);
432
+ }
433
+ subscriber_queue.length = 0;
434
+ }
435
+ }
436
+ }
437
+ }
438
+ function update(fn) {
439
+ set(fn(value));
440
+ }
441
+ function subscribe(run, invalidate = noop) {
442
+ const subscriber = [run, invalidate];
443
+ subscribers.add(subscriber);
444
+ if (subscribers.size === 1) {
445
+ stop = start(set) || noop;
446
+ }
447
+ run(value);
448
+ return () => {
449
+ subscribers.delete(subscriber);
450
+ if (subscribers.size === 0) {
451
+ stop();
452
+ stop = null;
453
+ }
454
+ };
455
+ }
456
+ return { set, update, subscribe };
457
+ }
458
+ function coalesce_to_error(err) {
459
+ return err instanceof Error || err && err.name && err.message ? err : new Error(JSON.stringify(err));
460
+ }
461
+ const render_json_payload_script_dict = {
462
+ "<": "\\u003C",
463
+ "\u2028": "\\u2028",
464
+ "\u2029": "\\u2029"
465
+ };
466
+ const render_json_payload_script_regex = new RegExp(`[${Object.keys(render_json_payload_script_dict).join("")}]`, "g");
467
+ function render_json_payload_script(attrs, payload) {
468
+ const safe_payload = JSON.stringify(payload).replace(render_json_payload_script_regex, (match) => render_json_payload_script_dict[match]);
469
+ let safe_attrs = "";
470
+ for (const [key2, value] of Object.entries(attrs)) {
471
+ if (value === void 0)
472
+ continue;
473
+ safe_attrs += ` sveltekit:data-${key2}=${escape_html_attr(value)}`;
474
+ }
475
+ return `<script type="application/json"${safe_attrs}>${safe_payload}<\/script>`;
476
+ }
477
+ const escape_html_attr_dict = {
478
+ "&": "&amp;",
479
+ '"': "&quot;"
480
+ };
481
+ const escape_html_attr_regex = new RegExp(`[${Object.keys(escape_html_attr_dict).join("")}]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]`, "g");
482
+ function escape_html_attr(str) {
483
+ const escaped_str = str.replace(escape_html_attr_regex, (match) => {
484
+ if (match.length === 2) {
485
+ return match;
486
+ }
487
+ return escape_html_attr_dict[match] ?? `&#${match.charCodeAt(0)};`;
488
+ });
489
+ return `"${escaped_str}"`;
490
+ }
491
+ const s = JSON.stringify;
492
+ const encoder = new TextEncoder();
493
+ function sha256(data) {
494
+ if (!key[0])
495
+ precompute();
496
+ const out = init.slice(0);
497
+ const array2 = encode$1(data);
498
+ for (let i = 0; i < array2.length; i += 16) {
499
+ const w = array2.subarray(i, i + 16);
500
+ let tmp;
501
+ let a;
502
+ let b;
503
+ let out0 = out[0];
504
+ let out1 = out[1];
505
+ let out2 = out[2];
506
+ let out3 = out[3];
507
+ let out4 = out[4];
508
+ let out5 = out[5];
509
+ let out6 = out[6];
510
+ let out7 = out[7];
511
+ for (let i2 = 0; i2 < 64; i2++) {
512
+ if (i2 < 16) {
513
+ tmp = w[i2];
514
+ } else {
515
+ a = w[i2 + 1 & 15];
516
+ b = w[i2 + 14 & 15];
517
+ tmp = w[i2 & 15] = (a >>> 7 ^ a >>> 18 ^ a >>> 3 ^ a << 25 ^ a << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + w[i2 & 15] + w[i2 + 9 & 15] | 0;
518
+ }
519
+ tmp = tmp + out7 + (out4 >>> 6 ^ out4 >>> 11 ^ out4 >>> 25 ^ out4 << 26 ^ out4 << 21 ^ out4 << 7) + (out6 ^ out4 & (out5 ^ out6)) + key[i2];
520
+ out7 = out6;
521
+ out6 = out5;
522
+ out5 = out4;
523
+ out4 = out3 + tmp | 0;
524
+ out3 = out2;
525
+ out2 = out1;
526
+ out1 = out0;
527
+ out0 = tmp + (out1 & out2 ^ out3 & (out1 ^ out2)) + (out1 >>> 2 ^ out1 >>> 13 ^ out1 >>> 22 ^ out1 << 30 ^ out1 << 19 ^ out1 << 10) | 0;
528
+ }
529
+ out[0] = out[0] + out0 | 0;
530
+ out[1] = out[1] + out1 | 0;
531
+ out[2] = out[2] + out2 | 0;
532
+ out[3] = out[3] + out3 | 0;
533
+ out[4] = out[4] + out4 | 0;
534
+ out[5] = out[5] + out5 | 0;
535
+ out[6] = out[6] + out6 | 0;
536
+ out[7] = out[7] + out7 | 0;
537
+ }
538
+ const bytes = new Uint8Array(out.buffer);
539
+ reverse_endianness(bytes);
540
+ return base64(bytes);
541
+ }
542
+ const init = new Uint32Array(8);
543
+ const key = new Uint32Array(64);
544
+ function precompute() {
545
+ function frac(x) {
546
+ return (x - Math.floor(x)) * 4294967296;
547
+ }
548
+ let prime = 2;
549
+ for (let i = 0; i < 64; prime++) {
550
+ let is_prime = true;
551
+ for (let factor = 2; factor * factor <= prime; factor++) {
552
+ if (prime % factor === 0) {
553
+ is_prime = false;
554
+ break;
555
+ }
556
+ }
557
+ if (is_prime) {
558
+ if (i < 8) {
559
+ init[i] = frac(prime ** (1 / 2));
560
+ }
561
+ key[i] = frac(prime ** (1 / 3));
562
+ i++;
563
+ }
564
+ }
565
+ }
566
+ function reverse_endianness(bytes) {
567
+ for (let i = 0; i < bytes.length; i += 4) {
568
+ const a = bytes[i + 0];
569
+ const b = bytes[i + 1];
570
+ const c = bytes[i + 2];
571
+ const d = bytes[i + 3];
572
+ bytes[i + 0] = d;
573
+ bytes[i + 1] = c;
574
+ bytes[i + 2] = b;
575
+ bytes[i + 3] = a;
576
+ }
577
+ }
578
+ function encode$1(str) {
579
+ const encoded = encoder.encode(str);
580
+ const length = encoded.length * 8;
581
+ const size = 512 * Math.ceil((length + 65) / 512);
582
+ const bytes = new Uint8Array(size / 8);
583
+ bytes.set(encoded);
584
+ bytes[encoded.length] = 128;
585
+ reverse_endianness(bytes);
586
+ const words = new Uint32Array(bytes.buffer);
587
+ words[words.length - 2] = Math.floor(length / 4294967296);
588
+ words[words.length - 1] = length;
589
+ return words;
590
+ }
591
+ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
592
+ function base64(bytes) {
593
+ const l = bytes.length;
594
+ let result = "";
595
+ let i;
596
+ for (i = 2; i < l; i += 3) {
597
+ result += chars[bytes[i - 2] >> 2];
598
+ result += chars[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
599
+ result += chars[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
600
+ result += chars[bytes[i] & 63];
601
+ }
602
+ if (i === l + 1) {
603
+ result += chars[bytes[i - 2] >> 2];
604
+ result += chars[(bytes[i - 2] & 3) << 4];
605
+ result += "==";
606
+ }
607
+ if (i === l) {
608
+ result += chars[bytes[i - 2] >> 2];
609
+ result += chars[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
610
+ result += chars[(bytes[i - 1] & 15) << 2];
611
+ result += "=";
612
+ }
613
+ return result;
614
+ }
615
+ let csp_ready;
616
+ const array = new Uint8Array(16);
617
+ function generate_nonce() {
618
+ crypto.getRandomValues(array);
619
+ return base64(array);
620
+ }
621
+ const quoted = /* @__PURE__ */ new Set([
622
+ "self",
623
+ "unsafe-eval",
624
+ "unsafe-hashes",
625
+ "unsafe-inline",
626
+ "none",
627
+ "strict-dynamic",
628
+ "report-sample"
629
+ ]);
630
+ const crypto_pattern = /^(nonce|sha\d\d\d)-/;
631
+ class Csp {
632
+ #use_hashes;
633
+ #dev;
634
+ #script_needs_csp;
635
+ #style_needs_csp;
636
+ #directives;
637
+ #script_src;
638
+ #style_src;
639
+ constructor({ mode, directives }, { dev, prerender, needs_nonce }) {
640
+ this.#use_hashes = mode === "hash" || mode === "auto" && prerender;
641
+ this.#directives = dev ? { ...directives } : directives;
642
+ this.#dev = dev;
643
+ const d = this.#directives;
644
+ if (dev) {
645
+ const effective_style_src2 = d["style-src"] || d["default-src"];
646
+ if (effective_style_src2 && !effective_style_src2.includes("unsafe-inline")) {
647
+ d["style-src"] = [...effective_style_src2, "unsafe-inline"];
648
+ }
649
+ }
650
+ this.#script_src = [];
651
+ this.#style_src = [];
652
+ const effective_script_src = d["script-src"] || d["default-src"];
653
+ const effective_style_src = d["style-src"] || d["default-src"];
654
+ this.#script_needs_csp = !!effective_script_src && effective_script_src.filter((value) => value !== "unsafe-inline").length > 0;
655
+ this.#style_needs_csp = !dev && !!effective_style_src && effective_style_src.filter((value) => value !== "unsafe-inline").length > 0;
656
+ this.script_needs_nonce = this.#script_needs_csp && !this.#use_hashes;
657
+ this.style_needs_nonce = this.#style_needs_csp && !this.#use_hashes;
658
+ if (this.script_needs_nonce || this.style_needs_nonce || needs_nonce) {
659
+ this.nonce = generate_nonce();
660
+ }
661
+ }
662
+ add_script(content) {
663
+ if (this.#script_needs_csp) {
664
+ if (this.#use_hashes) {
665
+ this.#script_src.push(`sha256-${sha256(content)}`);
666
+ } else if (this.#script_src.length === 0) {
667
+ this.#script_src.push(`nonce-${this.nonce}`);
668
+ }
669
+ }
670
+ }
671
+ add_style(content) {
672
+ if (this.#style_needs_csp) {
673
+ if (this.#use_hashes) {
674
+ this.#style_src.push(`sha256-${sha256(content)}`);
675
+ } else if (this.#style_src.length === 0) {
676
+ this.#style_src.push(`nonce-${this.nonce}`);
677
+ }
678
+ }
679
+ }
680
+ get_header(is_meta = false) {
681
+ const header = [];
682
+ const directives = { ...this.#directives };
683
+ if (this.#style_src.length > 0) {
684
+ directives["style-src"] = [
685
+ ...directives["style-src"] || directives["default-src"] || [],
686
+ ...this.#style_src
687
+ ];
688
+ }
689
+ if (this.#script_src.length > 0) {
690
+ directives["script-src"] = [
691
+ ...directives["script-src"] || directives["default-src"] || [],
692
+ ...this.#script_src
693
+ ];
694
+ }
695
+ for (const key2 in directives) {
696
+ if (is_meta && (key2 === "frame-ancestors" || key2 === "report-uri" || key2 === "sandbox")) {
697
+ continue;
698
+ }
699
+ const value = directives[key2];
700
+ if (!value)
701
+ continue;
702
+ const directive = [key2];
703
+ if (Array.isArray(value)) {
704
+ value.forEach((value2) => {
705
+ if (quoted.has(value2) || crypto_pattern.test(value2)) {
706
+ directive.push(`'${value2}'`);
707
+ } else {
708
+ directive.push(value2);
709
+ }
710
+ });
711
+ }
712
+ header.push(directive.join(" "));
713
+ }
714
+ return header.join("; ");
715
+ }
716
+ get_meta() {
717
+ const content = escape_html_attr(this.get_header(true));
718
+ return `<meta http-equiv="content-security-policy" content=${content}>`;
719
+ }
720
+ }
721
+ const absolute = /^([a-z]+:)?\/?\//;
722
+ const scheme = /^[a-z]+:/;
723
+ function resolve(base2, path) {
724
+ if (scheme.test(path))
725
+ return path;
726
+ const base_match = absolute.exec(base2);
727
+ const path_match = absolute.exec(path);
728
+ if (!base_match) {
729
+ throw new Error(`bad base path: "${base2}"`);
730
+ }
731
+ const baseparts = path_match ? [] : base2.slice(base_match[0].length).split("/");
732
+ const pathparts = path_match ? path.slice(path_match[0].length).split("/") : path.split("/");
733
+ baseparts.pop();
734
+ for (let i = 0; i < pathparts.length; i += 1) {
735
+ const part = pathparts[i];
736
+ if (part === ".")
737
+ continue;
738
+ else if (part === "..")
739
+ baseparts.pop();
740
+ else
741
+ baseparts.push(part);
742
+ }
743
+ const prefix = path_match && path_match[0] || base_match && base_match[0] || "";
744
+ return `${prefix}${baseparts.join("/")}`;
745
+ }
746
+ function is_root_relative(path) {
747
+ return path[0] === "/" && path[1] !== "/";
748
+ }
749
+ function normalize_path(path, trailing_slash) {
750
+ if (path === "/" || trailing_slash === "ignore")
751
+ return path;
752
+ if (trailing_slash === "never") {
753
+ return path.endsWith("/") ? path.slice(0, -1) : path;
754
+ } else if (trailing_slash === "always" && !path.endsWith("/")) {
755
+ return path + "/";
756
+ }
757
+ return path;
758
+ }
759
+ class LoadURL extends URL {
760
+ get hash() {
761
+ throw new Error("url.hash is inaccessible from load. Consider accessing hash from the page store within the script tag of your component.");
762
+ }
763
+ }
764
+ class PrerenderingURL extends URL {
765
+ get search() {
766
+ throw new Error("Cannot access url.search on a page with prerendering enabled");
767
+ }
768
+ get searchParams() {
769
+ throw new Error("Cannot access url.searchParams on a page with prerendering enabled");
770
+ }
771
+ }
772
+ const updated = {
773
+ ...readable(false),
774
+ check: () => false
775
+ };
776
+ async function render_response({
777
+ branch,
778
+ options,
779
+ state,
780
+ $session,
781
+ page_config,
782
+ status,
783
+ error: error2 = null,
784
+ event,
785
+ resolve_opts,
786
+ stuff
787
+ }) {
788
+ if (state.prerendering) {
789
+ if (options.csp.mode === "nonce") {
790
+ throw new Error('Cannot use prerendering if config.kit.csp.mode === "nonce"');
791
+ }
792
+ if (options.template_contains_nonce) {
793
+ throw new Error("Cannot use prerendering if page template contains %sveltekit.nonce%");
794
+ }
795
+ }
796
+ const stylesheets = new Set(options.manifest._.entry.css);
797
+ const modulepreloads = new Set(options.manifest._.entry.js);
798
+ const styles = /* @__PURE__ */ new Map();
799
+ const serialized_data = [];
800
+ let shadow_props;
801
+ let rendered;
802
+ let is_private = false;
803
+ let cache;
804
+ if (error2) {
805
+ error2.stack = options.get_stack(error2);
806
+ }
807
+ if (resolve_opts.ssr) {
808
+ branch.forEach(({ node, props: props2, loaded, fetched, uses_credentials }) => {
809
+ if (node.css)
810
+ node.css.forEach((url) => stylesheets.add(url));
811
+ if (node.js)
812
+ node.js.forEach((url) => modulepreloads.add(url));
813
+ if (node.styles)
814
+ Object.entries(node.styles).forEach(([k, v]) => styles.set(k, v));
815
+ if (fetched && page_config.hydrate)
816
+ serialized_data.push(...fetched);
817
+ if (props2)
818
+ shadow_props = props2;
819
+ cache = loaded == null ? void 0 : loaded.cache;
820
+ is_private = (cache == null ? void 0 : cache.private) ?? uses_credentials;
821
+ });
822
+ const session = writable($session);
823
+ const props = {
824
+ stores: {
825
+ page: writable(null),
826
+ navigating: writable(null),
827
+ session: {
828
+ ...session,
829
+ subscribe: (fn) => {
830
+ is_private = (cache == null ? void 0 : cache.private) ?? true;
831
+ return session.subscribe(fn);
832
+ }
833
+ },
834
+ updated
835
+ },
836
+ page: {
837
+ error: error2,
838
+ params: event.params,
839
+ routeId: event.routeId,
840
+ status,
841
+ stuff,
842
+ url: state.prerendering ? new PrerenderingURL(event.url) : event.url
843
+ },
844
+ components: branch.map(({ node }) => node.module.default)
845
+ };
846
+ const print_error = (property, replacement) => {
847
+ Object.defineProperty(props.page, property, {
848
+ get: () => {
849
+ throw new Error(`$page.${property} has been replaced by $page.url.${replacement}`);
850
+ }
851
+ });
852
+ };
853
+ print_error("origin", "origin");
854
+ print_error("path", "pathname");
855
+ print_error("query", "searchParams");
856
+ for (let i = 0; i < branch.length; i += 1) {
857
+ props[`props_${i}`] = await branch[i].loaded.props;
858
+ }
859
+ rendered = options.root.render(props);
860
+ } else {
861
+ rendered = { head: "", html: "", css: { code: "", map: null } };
862
+ }
863
+ let { head, html: body } = rendered;
864
+ const inlined_style = Array.from(styles.values()).join("\n");
865
+ await csp_ready;
866
+ const csp = new Csp(options.csp, {
867
+ dev: options.dev,
868
+ prerender: !!state.prerendering,
869
+ needs_nonce: options.template_contains_nonce
870
+ });
871
+ const target = hash(body);
872
+ const init_app = `
873
+ import { start } from ${s(options.prefix + options.manifest._.entry.file)};
874
+ start({
875
+ target: document.querySelector('[data-sveltekit-hydrate="${target}"]').parentNode,
876
+ paths: ${s(options.paths)},
877
+ session: ${try_serialize($session, (error3) => {
878
+ throw new Error(`Failed to serialize session data: ${error3.message}`);
879
+ })},
880
+ route: ${!!page_config.router},
881
+ spa: ${!resolve_opts.ssr},
882
+ trailing_slash: ${s(options.trailing_slash)},
883
+ hydrate: ${resolve_opts.ssr && page_config.hydrate ? `{
884
+ status: ${status},
885
+ error: ${serialize_error(error2)},
886
+ nodes: [${branch.map(({ node }) => node.index).join(", ")}],
887
+ params: ${devalue(event.params)},
888
+ routeId: ${s(event.routeId)}
889
+ }` : "null"}
890
+ });
891
+ `;
892
+ const init_service_worker = `
893
+ if ('serviceWorker' in navigator) {
894
+ addEventListener('load', () => {
895
+ navigator.serviceWorker.register('${options.service_worker}');
896
+ });
897
+ }
898
+ `;
899
+ if (inlined_style) {
900
+ const attributes = [];
901
+ if (options.dev)
902
+ attributes.push(" data-sveltekit");
903
+ if (csp.style_needs_nonce)
904
+ attributes.push(` nonce="${csp.nonce}"`);
905
+ csp.add_style(inlined_style);
906
+ head += `
907
+ <style${attributes.join("")}>${inlined_style}</style>`;
908
+ }
909
+ head += Array.from(stylesheets).map((dep) => {
910
+ const attributes = [
911
+ 'rel="stylesheet"',
912
+ `href="${options.prefix + dep}"`
913
+ ];
914
+ if (csp.style_needs_nonce) {
915
+ attributes.push(`nonce="${csp.nonce}"`);
916
+ }
917
+ if (styles.has(dep)) {
918
+ attributes.push("disabled", 'media="(max-width: 0)"');
919
+ }
920
+ return `
921
+ <link ${attributes.join(" ")}>`;
922
+ }).join("");
923
+ if (page_config.router || page_config.hydrate) {
924
+ head += Array.from(modulepreloads).map((dep) => `
925
+ <link rel="modulepreload" href="${options.prefix + dep}">`).join("");
926
+ const attributes = ['type="module"', `data-sveltekit-hydrate="${target}"`];
927
+ csp.add_script(init_app);
928
+ if (csp.script_needs_nonce) {
929
+ attributes.push(`nonce="${csp.nonce}"`);
930
+ }
931
+ body += `
932
+ <script ${attributes.join(" ")}>${init_app}<\/script>`;
933
+ body += serialized_data.map(({ url, body: body2, response }) => render_json_payload_script({ type: "data", url, body: typeof body2 === "string" ? hash(body2) : void 0 }, response)).join("\n ");
934
+ if (shadow_props) {
935
+ body += render_json_payload_script({ type: "props" }, shadow_props);
936
+ }
937
+ }
938
+ if (options.service_worker) {
939
+ csp.add_script(init_service_worker);
940
+ head += `
941
+ <script${csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : ""}>${init_service_worker}<\/script>`;
942
+ }
943
+ if (state.prerendering) {
944
+ const http_equiv = [];
945
+ const csp_headers = csp.get_meta();
946
+ if (csp_headers) {
947
+ http_equiv.push(csp_headers);
948
+ }
949
+ if (cache) {
950
+ http_equiv.push(`<meta http-equiv="cache-control" content="max-age=${cache.maxage}">`);
951
+ }
952
+ if (http_equiv.length > 0) {
953
+ head = http_equiv.join("\n") + head;
954
+ }
955
+ }
956
+ const segments = event.url.pathname.slice(options.paths.base.length).split("/").slice(2);
957
+ const assets2 = options.paths.assets || (segments.length > 0 ? segments.map(() => "..").join("/") : ".");
958
+ const html = await resolve_opts.transformPage({
959
+ html: options.template({ head, body, assets: assets2, nonce: csp.nonce })
960
+ });
961
+ const headers = new Headers({
962
+ "content-type": "text/html",
963
+ etag: `"${hash(html)}"`
964
+ });
965
+ if (cache) {
966
+ headers.set("cache-control", `${is_private ? "private" : "public"}, max-age=${cache.maxage}`);
967
+ }
968
+ if (!options.floc) {
969
+ headers.set("permissions-policy", "interest-cohort=()");
970
+ }
971
+ if (!state.prerendering) {
972
+ const csp_header = csp.get_header();
973
+ if (csp_header) {
974
+ headers.set("content-security-policy", csp_header);
975
+ }
976
+ }
977
+ return new Response(html, {
978
+ status,
979
+ headers
980
+ });
981
+ }
982
+ function try_serialize(data, fail) {
983
+ try {
984
+ return devalue(data);
985
+ } catch (err) {
986
+ if (fail)
987
+ fail(coalesce_to_error(err));
988
+ return null;
989
+ }
990
+ }
991
+ function serialize_error(error2) {
992
+ if (!error2)
993
+ return null;
994
+ let serialized = try_serialize(error2);
995
+ if (!serialized) {
996
+ const { name, message, stack } = error2;
997
+ serialized = try_serialize({ ...error2, name, message, stack });
998
+ }
999
+ if (!serialized) {
1000
+ serialized = "{}";
1001
+ }
1002
+ return serialized;
1003
+ }
1004
+ /*!
1005
+ * cookie
1006
+ * Copyright(c) 2012-2014 Roman Shtylman
1007
+ * Copyright(c) 2015 Douglas Christopher Wilson
1008
+ * MIT Licensed
1009
+ */
1010
+ var parse_1 = parse$1;
1011
+ var serialize_1 = serialize;
1012
+ var __toString = Object.prototype.toString;
1013
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
1014
+ function parse$1(str, options) {
1015
+ if (typeof str !== "string") {
1016
+ throw new TypeError("argument str must be a string");
1017
+ }
1018
+ var obj = {};
1019
+ var opt = options || {};
1020
+ var dec = opt.decode || decode;
1021
+ var index = 0;
1022
+ while (index < str.length) {
1023
+ var eqIdx = str.indexOf("=", index);
1024
+ if (eqIdx === -1) {
1025
+ break;
1026
+ }
1027
+ var endIdx = str.indexOf(";", index);
1028
+ if (endIdx === -1) {
1029
+ endIdx = str.length;
1030
+ } else if (endIdx < eqIdx) {
1031
+ index = str.lastIndexOf(";", eqIdx - 1) + 1;
1032
+ continue;
1033
+ }
1034
+ var key2 = str.slice(index, eqIdx).trim();
1035
+ if (obj[key2] === void 0) {
1036
+ var val = str.slice(eqIdx + 1, endIdx).trim();
1037
+ if (val.charCodeAt(0) === 34) {
1038
+ val = val.slice(1, -1);
1039
+ }
1040
+ obj[key2] = tryDecode(val, dec);
1041
+ }
1042
+ index = endIdx + 1;
1043
+ }
1044
+ return obj;
1045
+ }
1046
+ function serialize(name, val, options) {
1047
+ var opt = options || {};
1048
+ var enc = opt.encode || encode;
1049
+ if (typeof enc !== "function") {
1050
+ throw new TypeError("option encode is invalid");
1051
+ }
1052
+ if (!fieldContentRegExp.test(name)) {
1053
+ throw new TypeError("argument name is invalid");
1054
+ }
1055
+ var value = enc(val);
1056
+ if (value && !fieldContentRegExp.test(value)) {
1057
+ throw new TypeError("argument val is invalid");
1058
+ }
1059
+ var str = name + "=" + value;
1060
+ if (opt.maxAge != null) {
1061
+ var maxAge = opt.maxAge - 0;
1062
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
1063
+ throw new TypeError("option maxAge is invalid");
1064
+ }
1065
+ str += "; Max-Age=" + Math.floor(maxAge);
1066
+ }
1067
+ if (opt.domain) {
1068
+ if (!fieldContentRegExp.test(opt.domain)) {
1069
+ throw new TypeError("option domain is invalid");
1070
+ }
1071
+ str += "; Domain=" + opt.domain;
1072
+ }
1073
+ if (opt.path) {
1074
+ if (!fieldContentRegExp.test(opt.path)) {
1075
+ throw new TypeError("option path is invalid");
1076
+ }
1077
+ str += "; Path=" + opt.path;
1078
+ }
1079
+ if (opt.expires) {
1080
+ var expires = opt.expires;
1081
+ if (!isDate(expires) || isNaN(expires.valueOf())) {
1082
+ throw new TypeError("option expires is invalid");
1083
+ }
1084
+ str += "; Expires=" + expires.toUTCString();
1085
+ }
1086
+ if (opt.httpOnly) {
1087
+ str += "; HttpOnly";
1088
+ }
1089
+ if (opt.secure) {
1090
+ str += "; Secure";
1091
+ }
1092
+ if (opt.priority) {
1093
+ var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
1094
+ switch (priority) {
1095
+ case "low":
1096
+ str += "; Priority=Low";
1097
+ break;
1098
+ case "medium":
1099
+ str += "; Priority=Medium";
1100
+ break;
1101
+ case "high":
1102
+ str += "; Priority=High";
1103
+ break;
1104
+ default:
1105
+ throw new TypeError("option priority is invalid");
1106
+ }
1107
+ }
1108
+ if (opt.sameSite) {
1109
+ var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
1110
+ switch (sameSite) {
1111
+ case true:
1112
+ str += "; SameSite=Strict";
1113
+ break;
1114
+ case "lax":
1115
+ str += "; SameSite=Lax";
1116
+ break;
1117
+ case "strict":
1118
+ str += "; SameSite=Strict";
1119
+ break;
1120
+ case "none":
1121
+ str += "; SameSite=None";
1122
+ break;
1123
+ default:
1124
+ throw new TypeError("option sameSite is invalid");
1125
+ }
1126
+ }
1127
+ return str;
1128
+ }
1129
+ function decode(str) {
1130
+ return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str;
1131
+ }
1132
+ function encode(val) {
1133
+ return encodeURIComponent(val);
1134
+ }
1135
+ function isDate(val) {
1136
+ return __toString.call(val) === "[object Date]" || val instanceof Date;
1137
+ }
1138
+ function tryDecode(str, decode2) {
1139
+ try {
1140
+ return decode2(str);
1141
+ } catch (e) {
1142
+ return str;
1143
+ }
1144
+ }
1145
+ var setCookie = { exports: {} };
1146
+ var defaultParseOptions = {
1147
+ decodeValues: true,
1148
+ map: false,
1149
+ silent: false
1150
+ };
1151
+ function isNonEmptyString(str) {
1152
+ return typeof str === "string" && !!str.trim();
1153
+ }
1154
+ function parseString(setCookieValue, options) {
1155
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
1156
+ var nameValue = parts.shift().split("=");
1157
+ var name = nameValue.shift();
1158
+ var value = nameValue.join("=");
1159
+ options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
1160
+ try {
1161
+ value = options.decodeValues ? decodeURIComponent(value) : value;
1162
+ } catch (e) {
1163
+ console.error("set-cookie-parser encountered an error while decoding a cookie with value '" + value + "'. Set options.decodeValues to false to disable this feature.", e);
1164
+ }
1165
+ var cookie = {
1166
+ name,
1167
+ value
1168
+ };
1169
+ parts.forEach(function(part) {
1170
+ var sides = part.split("=");
1171
+ var key2 = sides.shift().trimLeft().toLowerCase();
1172
+ var value2 = sides.join("=");
1173
+ if (key2 === "expires") {
1174
+ cookie.expires = new Date(value2);
1175
+ } else if (key2 === "max-age") {
1176
+ cookie.maxAge = parseInt(value2, 10);
1177
+ } else if (key2 === "secure") {
1178
+ cookie.secure = true;
1179
+ } else if (key2 === "httponly") {
1180
+ cookie.httpOnly = true;
1181
+ } else if (key2 === "samesite") {
1182
+ cookie.sameSite = value2;
1183
+ } else {
1184
+ cookie[key2] = value2;
1185
+ }
1186
+ });
1187
+ return cookie;
1188
+ }
1189
+ function parse(input, options) {
1190
+ options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
1191
+ if (!input) {
1192
+ if (!options.map) {
1193
+ return [];
1194
+ } else {
1195
+ return {};
1196
+ }
1197
+ }
1198
+ if (input.headers && input.headers["set-cookie"]) {
1199
+ input = input.headers["set-cookie"];
1200
+ } else if (input.headers) {
1201
+ var sch = input.headers[Object.keys(input.headers).find(function(key2) {
1202
+ return key2.toLowerCase() === "set-cookie";
1203
+ })];
1204
+ if (!sch && input.headers.cookie && !options.silent) {
1205
+ console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning.");
1206
+ }
1207
+ input = sch;
1208
+ }
1209
+ if (!Array.isArray(input)) {
1210
+ input = [input];
1211
+ }
1212
+ options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
1213
+ if (!options.map) {
1214
+ return input.filter(isNonEmptyString).map(function(str) {
1215
+ return parseString(str, options);
1216
+ });
1217
+ } else {
1218
+ var cookies = {};
1219
+ return input.filter(isNonEmptyString).reduce(function(cookies2, str) {
1220
+ var cookie = parseString(str, options);
1221
+ cookies2[cookie.name] = cookie;
1222
+ return cookies2;
1223
+ }, cookies);
1224
+ }
1225
+ }
1226
+ function splitCookiesString(cookiesString) {
1227
+ if (Array.isArray(cookiesString)) {
1228
+ return cookiesString;
1229
+ }
1230
+ if (typeof cookiesString !== "string") {
1231
+ return [];
1232
+ }
1233
+ var cookiesStrings = [];
1234
+ var pos = 0;
1235
+ var start;
1236
+ var ch;
1237
+ var lastComma;
1238
+ var nextStart;
1239
+ var cookiesSeparatorFound;
1240
+ function skipWhitespace() {
1241
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
1242
+ pos += 1;
1243
+ }
1244
+ return pos < cookiesString.length;
1245
+ }
1246
+ function notSpecialChar() {
1247
+ ch = cookiesString.charAt(pos);
1248
+ return ch !== "=" && ch !== ";" && ch !== ",";
1249
+ }
1250
+ while (pos < cookiesString.length) {
1251
+ start = pos;
1252
+ cookiesSeparatorFound = false;
1253
+ while (skipWhitespace()) {
1254
+ ch = cookiesString.charAt(pos);
1255
+ if (ch === ",") {
1256
+ lastComma = pos;
1257
+ pos += 1;
1258
+ skipWhitespace();
1259
+ nextStart = pos;
1260
+ while (pos < cookiesString.length && notSpecialChar()) {
1261
+ pos += 1;
1262
+ }
1263
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
1264
+ cookiesSeparatorFound = true;
1265
+ pos = nextStart;
1266
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
1267
+ start = pos;
1268
+ } else {
1269
+ pos = lastComma + 1;
1270
+ }
1271
+ } else {
1272
+ pos += 1;
1273
+ }
1274
+ }
1275
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
1276
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
1277
+ }
1278
+ }
1279
+ return cookiesStrings;
1280
+ }
1281
+ setCookie.exports = parse;
1282
+ setCookie.exports.parse = parse;
1283
+ var parseString_1 = setCookie.exports.parseString = parseString;
1284
+ var splitCookiesString_1 = setCookie.exports.splitCookiesString = splitCookiesString;
1285
+ function normalize(loaded) {
1286
+ if (loaded.fallthrough) {
1287
+ throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");
1288
+ }
1289
+ if ("maxage" in loaded) {
1290
+ throw new Error("maxage should be replaced with cache: { maxage }");
1291
+ }
1292
+ const has_error_status = loaded.status && loaded.status >= 400 && loaded.status <= 599 && !loaded.redirect;
1293
+ if (loaded.error || has_error_status) {
1294
+ const status = loaded.status;
1295
+ if (!loaded.error && has_error_status) {
1296
+ return { status: status || 500, error: new Error() };
1297
+ }
1298
+ const error2 = typeof loaded.error === "string" ? new Error(loaded.error) : loaded.error;
1299
+ if (!(error2 instanceof Error)) {
1300
+ return {
1301
+ status: 500,
1302
+ error: new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof error2}"`)
1303
+ };
1304
+ }
1305
+ if (!status || status < 400 || status > 599) {
1306
+ console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500');
1307
+ return { status: 500, error: error2 };
1308
+ }
1309
+ return { status, error: error2 };
1310
+ }
1311
+ if (loaded.redirect) {
1312
+ if (!loaded.status || Math.floor(loaded.status / 100) !== 3) {
1313
+ throw new Error('"redirect" property returned from load() must be accompanied by a 3xx status code');
1314
+ }
1315
+ if (typeof loaded.redirect !== "string") {
1316
+ throw new Error('"redirect" property returned from load() must be a string');
1317
+ }
1318
+ }
1319
+ if (loaded.dependencies) {
1320
+ if (!Array.isArray(loaded.dependencies) || loaded.dependencies.some((dep) => typeof dep !== "string")) {
1321
+ throw new Error('"dependencies" property returned from load() must be of type string[]');
1322
+ }
1323
+ }
1324
+ if (loaded.context) {
1325
+ throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');
1326
+ }
1327
+ return loaded;
1328
+ }
1329
+ function domain_matches(hostname, constraint) {
1330
+ if (!constraint)
1331
+ return true;
1332
+ const normalized = constraint[0] === "." ? constraint.slice(1) : constraint;
1333
+ if (hostname === normalized)
1334
+ return true;
1335
+ return hostname.endsWith("." + normalized);
1336
+ }
1337
+ function path_matches(path, constraint) {
1338
+ if (!constraint)
1339
+ return true;
1340
+ const normalized = constraint.endsWith("/") ? constraint.slice(0, -1) : constraint;
1341
+ if (path === normalized)
1342
+ return true;
1343
+ return path.startsWith(normalized + "/");
1344
+ }
1345
+ async function load_node({
1346
+ event,
1347
+ options,
1348
+ state,
1349
+ route,
1350
+ node,
1351
+ $session,
1352
+ stuff,
1353
+ is_error,
1354
+ is_leaf,
1355
+ status,
1356
+ error: error2
1357
+ }) {
1358
+ const { module } = node;
1359
+ let uses_credentials = false;
1360
+ const fetched = [];
1361
+ const cookies = parse_1(event.request.headers.get("cookie") || "");
1362
+ const new_cookies = [];
1363
+ let loaded;
1364
+ const should_prerender = node.module.prerender ?? options.prerender.default;
1365
+ const shadow = is_leaf ? await load_shadow_data(route, event, options, should_prerender) : {};
1366
+ if (shadow.cookies) {
1367
+ shadow.cookies.forEach((header) => {
1368
+ new_cookies.push(parseString_1(header));
1369
+ });
1370
+ }
1371
+ if (shadow.error) {
1372
+ loaded = {
1373
+ status: shadow.status,
1374
+ error: shadow.error
1375
+ };
1376
+ } else if (shadow.redirect) {
1377
+ loaded = {
1378
+ status: shadow.status,
1379
+ redirect: shadow.redirect
1380
+ };
1381
+ } else if (module.load) {
1382
+ const load_input = {
1383
+ url: state.prerendering ? new PrerenderingURL(event.url) : new LoadURL(event.url),
1384
+ params: event.params,
1385
+ props: shadow.body || {},
1386
+ routeId: event.routeId,
1387
+ get session() {
1388
+ if (node.module.prerender ?? options.prerender.default) {
1389
+ throw Error("Attempted to access session from a prerendered page. Session would never be populated.");
1390
+ }
1391
+ uses_credentials = true;
1392
+ return $session;
1393
+ },
1394
+ fetch: async (resource, opts = {}) => {
1395
+ let requested;
1396
+ if (typeof resource === "string") {
1397
+ requested = resource;
1398
+ } else {
1399
+ requested = resource.url;
1400
+ opts = {
1401
+ method: resource.method,
1402
+ headers: resource.headers,
1403
+ body: resource.body,
1404
+ mode: resource.mode,
1405
+ credentials: resource.credentials,
1406
+ cache: resource.cache,
1407
+ redirect: resource.redirect,
1408
+ referrer: resource.referrer,
1409
+ integrity: resource.integrity,
1410
+ ...opts
1411
+ };
1412
+ }
1413
+ opts.headers = new Headers(opts.headers);
1414
+ for (const [key2, value] of event.request.headers) {
1415
+ if (key2 !== "authorization" && key2 !== "cookie" && key2 !== "host" && key2 !== "if-none-match" && !opts.headers.has(key2)) {
1416
+ opts.headers.set(key2, value);
1417
+ }
1418
+ }
1419
+ const resolved = resolve(event.url.pathname, requested.split("?")[0]);
1420
+ let response;
1421
+ let dependency;
1422
+ const prefix = options.paths.assets || options.paths.base;
1423
+ const filename = decodeURIComponent(resolved.startsWith(prefix) ? resolved.slice(prefix.length) : resolved).slice(1);
1424
+ const filename_html = `${filename}/index.html`;
1425
+ const is_asset = options.manifest.assets.has(filename);
1426
+ const is_asset_html = options.manifest.assets.has(filename_html);
1427
+ if (is_asset || is_asset_html) {
1428
+ const file = is_asset ? filename : filename_html;
1429
+ if (options.read) {
1430
+ const type = is_asset ? options.manifest.mimeTypes[filename.slice(filename.lastIndexOf("."))] : "text/html";
1431
+ response = new Response(options.read(file), {
1432
+ headers: type ? { "content-type": type } : {}
1433
+ });
1434
+ } else {
1435
+ response = await fetch(`${event.url.origin}/${file}`, opts);
1436
+ }
1437
+ } else if (is_root_relative(resolved)) {
1438
+ if (opts.credentials !== "omit") {
1439
+ uses_credentials = true;
1440
+ const authorization = event.request.headers.get("authorization");
1441
+ const combined_cookies = { ...cookies };
1442
+ for (const cookie2 of new_cookies) {
1443
+ if (!domain_matches(event.url.hostname, cookie2.domain))
1444
+ continue;
1445
+ if (!path_matches(resolved, cookie2.path))
1446
+ continue;
1447
+ combined_cookies[cookie2.name] = cookie2.value;
1448
+ }
1449
+ const cookie = Object.entries(combined_cookies).map(([name, value]) => `${name}=${value}`).join("; ");
1450
+ if (cookie) {
1451
+ opts.headers.set("cookie", cookie);
1452
+ }
1453
+ if (authorization && !opts.headers.has("authorization")) {
1454
+ opts.headers.set("authorization", authorization);
1455
+ }
1456
+ }
1457
+ if (opts.body && typeof opts.body !== "string") {
1458
+ throw new Error("Request body must be a string");
1459
+ }
1460
+ response = await respond(new Request(new URL(requested, event.url).href, { ...opts }), options, {
1461
+ ...state,
1462
+ initiator: route
1463
+ });
1464
+ if (state.prerendering) {
1465
+ dependency = { response, body: null };
1466
+ state.prerendering.dependencies.set(resolved, dependency);
1467
+ }
1468
+ } else {
1469
+ if (resolved.startsWith("//")) {
1470
+ requested = event.url.protocol + requested;
1471
+ }
1472
+ if (`.${new URL(requested).hostname}`.endsWith(`.${event.url.hostname}`) && opts.credentials !== "omit") {
1473
+ uses_credentials = true;
1474
+ const cookie = event.request.headers.get("cookie");
1475
+ if (cookie)
1476
+ opts.headers.set("cookie", cookie);
1477
+ }
1478
+ opts.headers.delete("connection");
1479
+ const external_request = new Request(requested, opts);
1480
+ response = await options.hooks.externalFetch.call(null, external_request);
1481
+ }
1482
+ const set_cookie = response.headers.get("set-cookie");
1483
+ if (set_cookie) {
1484
+ new_cookies.push(...splitCookiesString_1(set_cookie).map((str) => parseString_1(str)));
1485
+ }
1486
+ const proxy = new Proxy(response, {
1487
+ get(response2, key2, _receiver) {
1488
+ async function text() {
1489
+ const body = await response2.text();
1490
+ const headers = {};
1491
+ for (const [key3, value] of response2.headers) {
1492
+ if (key3 !== "set-cookie" && key3 !== "etag") {
1493
+ headers[key3] = value;
1494
+ }
1495
+ }
1496
+ if (!opts.body || typeof opts.body === "string") {
1497
+ const status_number = Number(response2.status);
1498
+ if (isNaN(status_number)) {
1499
+ throw new Error(`response.status is not a number. value: "${response2.status}" type: ${typeof response2.status}`);
1500
+ }
1501
+ fetched.push({
1502
+ url: requested,
1503
+ body: opts.body,
1504
+ response: {
1505
+ status: status_number,
1506
+ statusText: response2.statusText,
1507
+ headers,
1508
+ body
1509
+ }
1510
+ });
1511
+ }
1512
+ if (dependency) {
1513
+ dependency.body = body;
1514
+ }
1515
+ return body;
1516
+ }
1517
+ if (key2 === "arrayBuffer") {
1518
+ return async () => {
1519
+ const buffer = await response2.arrayBuffer();
1520
+ if (dependency) {
1521
+ dependency.body = new Uint8Array(buffer);
1522
+ }
1523
+ return buffer;
1524
+ };
1525
+ }
1526
+ if (key2 === "text") {
1527
+ return text;
1528
+ }
1529
+ if (key2 === "json") {
1530
+ return async () => {
1531
+ return JSON.parse(await text());
1532
+ };
1533
+ }
1534
+ return Reflect.get(response2, key2, response2);
1535
+ }
1536
+ });
1537
+ return proxy;
1538
+ },
1539
+ stuff: { ...stuff },
1540
+ status: is_error ? status ?? null : null,
1541
+ error: is_error ? error2 ?? null : null
1542
+ };
1543
+ if (options.dev) {
1544
+ Object.defineProperty(load_input, "page", {
1545
+ get: () => {
1546
+ throw new Error("`page` in `load` functions has been replaced by `url` and `params`");
1547
+ }
1548
+ });
1549
+ }
1550
+ loaded = await module.load.call(null, load_input);
1551
+ if (!loaded) {
1552
+ throw new Error(`load function must return a value${options.dev ? ` (${node.entry})` : ""}`);
1553
+ }
1554
+ } else if (shadow.body) {
1555
+ loaded = {
1556
+ props: shadow.body
1557
+ };
1558
+ } else {
1559
+ loaded = {};
1560
+ }
1561
+ if (shadow.body && state.prerendering) {
1562
+ const pathname = `${event.url.pathname.replace(/\/$/, "")}/__data.json`;
1563
+ const dependency = {
1564
+ response: new Response(void 0),
1565
+ body: JSON.stringify(shadow.body)
1566
+ };
1567
+ state.prerendering.dependencies.set(pathname, dependency);
1568
+ }
1569
+ return {
1570
+ node,
1571
+ props: shadow.body,
1572
+ loaded: normalize(loaded),
1573
+ stuff: loaded.stuff || stuff,
1574
+ fetched,
1575
+ set_cookie_headers: new_cookies.map((new_cookie) => {
1576
+ const { name, value, ...options2 } = new_cookie;
1577
+ return serialize_1(name, value, options2);
1578
+ }),
1579
+ uses_credentials
1580
+ };
1581
+ }
1582
+ async function load_shadow_data(route, event, options, prerender) {
1583
+ if (!route.shadow)
1584
+ return {};
1585
+ try {
1586
+ const mod = await route.shadow();
1587
+ if (prerender && (mod.post || mod.put || mod.del || mod.patch)) {
1588
+ throw new Error("Cannot prerender pages that have endpoints with mutative methods");
1589
+ }
1590
+ const method = normalize_request_method(event);
1591
+ const is_get = method === "head" || method === "get";
1592
+ const handler = method === "head" ? mod.head || mod.get : mod[method];
1593
+ if (!handler && !is_get) {
1594
+ return {
1595
+ status: 405,
1596
+ error: new Error(`${method} method not allowed`)
1597
+ };
1598
+ }
1599
+ const data = {
1600
+ status: 200,
1601
+ cookies: [],
1602
+ body: {}
1603
+ };
1604
+ if (!is_get) {
1605
+ const result = await handler(event);
1606
+ if (result.fallthrough) {
1607
+ throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");
1608
+ }
1609
+ const { status, headers, body } = validate_shadow_output(result);
1610
+ data.status = status;
1611
+ add_cookies(data.cookies, headers);
1612
+ if (status >= 300 && status < 400) {
1613
+ data.redirect = headers instanceof Headers ? headers.get("location") : headers.location;
1614
+ return data;
1615
+ }
1616
+ data.body = body;
1617
+ }
1618
+ const get = method === "head" && mod.head || mod.get;
1619
+ if (get) {
1620
+ const result = await get(event);
1621
+ if (result.fallthrough) {
1622
+ throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");
1623
+ }
1624
+ const { status, headers, body } = validate_shadow_output(result);
1625
+ add_cookies(data.cookies, headers);
1626
+ data.status = status;
1627
+ if (status >= 400) {
1628
+ data.error = new Error("Failed to load data");
1629
+ return data;
1630
+ }
1631
+ if (status >= 300) {
1632
+ data.redirect = headers instanceof Headers ? headers.get("location") : headers.location;
1633
+ return data;
1634
+ }
1635
+ data.body = { ...body, ...data.body };
1636
+ }
1637
+ return data;
1638
+ } catch (e) {
1639
+ const error2 = coalesce_to_error(e);
1640
+ options.handle_error(error2, event);
1641
+ return {
1642
+ status: 500,
1643
+ error: error2
1644
+ };
1645
+ }
1646
+ }
1647
+ function add_cookies(target, headers) {
1648
+ const cookies = headers["set-cookie"];
1649
+ if (cookies) {
1650
+ if (Array.isArray(cookies)) {
1651
+ target.push(...cookies);
1652
+ } else {
1653
+ target.push(cookies);
1654
+ }
1655
+ }
1656
+ }
1657
+ function validate_shadow_output(result) {
1658
+ const { status = 200, body = {} } = result;
1659
+ let headers = result.headers || {};
1660
+ if (headers instanceof Headers) {
1661
+ if (headers.has("set-cookie")) {
1662
+ throw new Error("Endpoint request handler cannot use Headers interface with Set-Cookie headers");
1663
+ }
1664
+ } else {
1665
+ headers = lowercase_keys(headers);
1666
+ }
1667
+ if (!is_pojo(body)) {
1668
+ throw new Error("Body returned from endpoint request handler must be a plain object");
1669
+ }
1670
+ return { status, headers, body };
1671
+ }
1672
+ async function respond_with_error({
1673
+ event,
1674
+ options,
1675
+ state,
1676
+ $session,
1677
+ status,
1678
+ error: error2,
1679
+ resolve_opts
1680
+ }) {
1681
+ try {
1682
+ const branch = [];
1683
+ let stuff = {};
1684
+ if (resolve_opts.ssr) {
1685
+ const default_layout = await options.manifest._.nodes[0]();
1686
+ const default_error = await options.manifest._.nodes[1]();
1687
+ const layout_loaded = await load_node({
1688
+ event,
1689
+ options,
1690
+ state,
1691
+ route: null,
1692
+ node: default_layout,
1693
+ $session,
1694
+ stuff: {},
1695
+ is_error: false,
1696
+ is_leaf: false
1697
+ });
1698
+ const error_loaded = await load_node({
1699
+ event,
1700
+ options,
1701
+ state,
1702
+ route: null,
1703
+ node: default_error,
1704
+ $session,
1705
+ stuff: layout_loaded ? layout_loaded.stuff : {},
1706
+ is_error: true,
1707
+ is_leaf: false,
1708
+ status,
1709
+ error: error2
1710
+ });
1711
+ branch.push(layout_loaded, error_loaded);
1712
+ stuff = error_loaded.stuff;
1713
+ }
1714
+ return await render_response({
1715
+ options,
1716
+ state,
1717
+ $session,
1718
+ page_config: {
1719
+ hydrate: options.hydrate,
1720
+ router: options.router
1721
+ },
1722
+ stuff,
1723
+ status,
1724
+ error: error2,
1725
+ branch,
1726
+ event,
1727
+ resolve_opts
1728
+ });
1729
+ } catch (err) {
1730
+ const error3 = coalesce_to_error(err);
1731
+ options.handle_error(error3, event);
1732
+ return new Response(error3.stack, {
1733
+ status: 500
1734
+ });
1735
+ }
1736
+ }
1737
+ async function respond$1(opts) {
1738
+ const { event, options, state, $session, route, resolve_opts } = opts;
1739
+ let nodes;
1740
+ if (!resolve_opts.ssr) {
1741
+ return await render_response({
1742
+ ...opts,
1743
+ branch: [],
1744
+ page_config: {
1745
+ hydrate: true,
1746
+ router: true
1747
+ },
1748
+ status: 200,
1749
+ error: null,
1750
+ event,
1751
+ stuff: {}
1752
+ });
1753
+ }
1754
+ try {
1755
+ nodes = await Promise.all(route.a.map((n) => n == void 0 ? n : options.manifest._.nodes[n]()));
1756
+ } catch (err) {
1757
+ const error3 = coalesce_to_error(err);
1758
+ options.handle_error(error3, event);
1759
+ return await respond_with_error({
1760
+ event,
1761
+ options,
1762
+ state,
1763
+ $session,
1764
+ status: 500,
1765
+ error: error3,
1766
+ resolve_opts
1767
+ });
1768
+ }
1769
+ const leaf = nodes[nodes.length - 1].module;
1770
+ let page_config = get_page_config(leaf, options);
1771
+ if (state.prerendering) {
1772
+ const should_prerender = leaf.prerender ?? options.prerender.default;
1773
+ if (!should_prerender) {
1774
+ return new Response(void 0, {
1775
+ status: 204
1776
+ });
1777
+ }
1778
+ }
1779
+ let branch = [];
1780
+ let status = 200;
1781
+ let error2 = null;
1782
+ let set_cookie_headers = [];
1783
+ let stuff = {};
1784
+ ssr: {
1785
+ for (let i = 0; i < nodes.length; i += 1) {
1786
+ const node = nodes[i];
1787
+ let loaded;
1788
+ if (node) {
1789
+ try {
1790
+ loaded = await load_node({
1791
+ ...opts,
1792
+ node,
1793
+ stuff,
1794
+ is_error: false,
1795
+ is_leaf: i === nodes.length - 1
1796
+ });
1797
+ set_cookie_headers = set_cookie_headers.concat(loaded.set_cookie_headers);
1798
+ if (loaded.loaded.redirect) {
1799
+ return with_cookies(new Response(void 0, {
1800
+ status: loaded.loaded.status,
1801
+ headers: {
1802
+ location: loaded.loaded.redirect
1803
+ }
1804
+ }), set_cookie_headers);
1805
+ }
1806
+ if (loaded.loaded.error) {
1807
+ ({ status, error: error2 } = loaded.loaded);
1808
+ }
1809
+ } catch (err) {
1810
+ const e = coalesce_to_error(err);
1811
+ options.handle_error(e, event);
1812
+ status = 500;
1813
+ error2 = e;
1814
+ }
1815
+ if (loaded && !error2) {
1816
+ branch.push(loaded);
1817
+ }
1818
+ if (error2) {
1819
+ while (i--) {
1820
+ if (route.b[i]) {
1821
+ const index = route.b[i];
1822
+ const error_node = await options.manifest._.nodes[index]();
1823
+ let node_loaded;
1824
+ let j = i;
1825
+ while (!(node_loaded = branch[j])) {
1826
+ j -= 1;
1827
+ }
1828
+ try {
1829
+ const error_loaded = await load_node({
1830
+ ...opts,
1831
+ node: error_node,
1832
+ stuff: node_loaded.stuff,
1833
+ is_error: true,
1834
+ is_leaf: false,
1835
+ status,
1836
+ error: error2
1837
+ });
1838
+ if (error_loaded.loaded.error) {
1839
+ continue;
1840
+ }
1841
+ page_config = get_page_config(error_node.module, options);
1842
+ branch = branch.slice(0, j + 1).concat(error_loaded);
1843
+ stuff = { ...node_loaded.stuff, ...error_loaded.stuff };
1844
+ break ssr;
1845
+ } catch (err) {
1846
+ const e = coalesce_to_error(err);
1847
+ options.handle_error(e, event);
1848
+ continue;
1849
+ }
1850
+ }
1851
+ }
1852
+ return with_cookies(await respond_with_error({
1853
+ event,
1854
+ options,
1855
+ state,
1856
+ $session,
1857
+ status,
1858
+ error: error2,
1859
+ resolve_opts
1860
+ }), set_cookie_headers);
1861
+ }
1862
+ }
1863
+ if (loaded && loaded.loaded.stuff) {
1864
+ stuff = {
1865
+ ...stuff,
1866
+ ...loaded.loaded.stuff
1867
+ };
1868
+ }
1869
+ }
1870
+ }
1871
+ try {
1872
+ return with_cookies(await render_response({
1873
+ ...opts,
1874
+ stuff,
1875
+ event,
1876
+ page_config,
1877
+ status,
1878
+ error: error2,
1879
+ branch: branch.filter(Boolean)
1880
+ }), set_cookie_headers);
1881
+ } catch (err) {
1882
+ const error3 = coalesce_to_error(err);
1883
+ options.handle_error(error3, event);
1884
+ return with_cookies(await respond_with_error({
1885
+ ...opts,
1886
+ status: 500,
1887
+ error: error3
1888
+ }), set_cookie_headers);
1889
+ }
1890
+ }
1891
+ function get_page_config(leaf, options) {
1892
+ if ("ssr" in leaf) {
1893
+ throw new Error("`export const ssr` has been removed \u2014 use the handle hook instead: https://kit.svelte.dev/docs/hooks#handle");
1894
+ }
1895
+ return {
1896
+ router: "router" in leaf ? !!leaf.router : options.router,
1897
+ hydrate: "hydrate" in leaf ? !!leaf.hydrate : options.hydrate
1898
+ };
1899
+ }
1900
+ function with_cookies(response, set_cookie_headers) {
1901
+ if (set_cookie_headers.length) {
1902
+ set_cookie_headers.forEach((value) => {
1903
+ response.headers.append("set-cookie", value);
1904
+ });
1905
+ }
1906
+ return response;
1907
+ }
1908
+ async function render_page(event, route, options, state, resolve_opts) {
1909
+ if (state.initiator === route) {
1910
+ return new Response(`Not found: ${event.url.pathname}`, {
1911
+ status: 404
1912
+ });
1913
+ }
1914
+ if (route.shadow) {
1915
+ const type = negotiate(event.request.headers.get("accept") || "text/html", [
1916
+ "text/html",
1917
+ "application/json"
1918
+ ]);
1919
+ if (type === "application/json") {
1920
+ return render_endpoint(event, await route.shadow());
1921
+ }
1922
+ }
1923
+ const $session = await options.hooks.getSession(event);
1924
+ return respond$1({
1925
+ event,
1926
+ options,
1927
+ state,
1928
+ $session,
1929
+ resolve_opts,
1930
+ route
1931
+ });
1932
+ }
1933
+ function negotiate(accept, types) {
1934
+ const parts = accept.split(",").map((str, i) => {
1935
+ const match = /([^/]+)\/([^;]+)(?:;q=([0-9.]+))?/.exec(str);
1936
+ if (match) {
1937
+ const [, type, subtype, q = "1"] = match;
1938
+ return { type, subtype, q: +q, i };
1939
+ }
1940
+ throw new Error(`Invalid Accept header: ${accept}`);
1941
+ }).sort((a, b) => {
1942
+ if (a.q !== b.q) {
1943
+ return b.q - a.q;
1944
+ }
1945
+ if (a.subtype === "*" !== (b.subtype === "*")) {
1946
+ return a.subtype === "*" ? 1 : -1;
1947
+ }
1948
+ if (a.type === "*" !== (b.type === "*")) {
1949
+ return a.type === "*" ? 1 : -1;
1950
+ }
1951
+ return a.i - b.i;
1952
+ });
1953
+ let accepted;
1954
+ let min_priority = Infinity;
1955
+ for (const mimetype of types) {
1956
+ const [type, subtype] = mimetype.split("/");
1957
+ const priority = parts.findIndex((part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*"));
1958
+ if (priority !== -1 && priority < min_priority) {
1959
+ accepted = mimetype;
1960
+ min_priority = priority;
1961
+ }
1962
+ }
1963
+ return accepted;
1964
+ }
1965
+ function exec(match, names, types, matchers) {
1966
+ const params = {};
1967
+ for (let i = 0; i < names.length; i += 1) {
1968
+ const name = names[i];
1969
+ const type = types[i];
1970
+ const value = match[i + 1] || "";
1971
+ if (type) {
1972
+ const matcher = matchers[type];
1973
+ if (!matcher)
1974
+ throw new Error(`Missing "${type}" param matcher`);
1975
+ if (!matcher(value))
1976
+ return;
1977
+ }
1978
+ params[name] = value;
1979
+ }
1980
+ return params;
1981
+ }
1982
+ const DATA_SUFFIX = "/__data.json";
1983
+ const default_transform = ({ html }) => html;
1984
+ async function respond(request, options, state) {
1985
+ var _a, _b, _c, _d;
1986
+ let url = new URL(request.url);
1987
+ const { parameter, allowed } = options.method_override;
1988
+ const method_override = (_a = url.searchParams.get(parameter)) == null ? void 0 : _a.toUpperCase();
1989
+ if (method_override) {
1990
+ if (request.method === "POST") {
1991
+ if (allowed.includes(method_override)) {
1992
+ request = new Proxy(request, {
1993
+ get: (target, property, _receiver) => {
1994
+ if (property === "method")
1995
+ return method_override;
1996
+ return Reflect.get(target, property, target);
1997
+ }
1998
+ });
1999
+ } else {
2000
+ const verb = allowed.length === 0 ? "enabled" : "allowed";
2001
+ const body = `${parameter}=${method_override} is not ${verb}. See https://kit.svelte.dev/docs/configuration#methodoverride`;
2002
+ return new Response(body, {
2003
+ status: 400
2004
+ });
2005
+ }
2006
+ } else {
2007
+ throw new Error(`${parameter}=${method_override} is only allowed with POST requests`);
2008
+ }
2009
+ }
2010
+ let decoded;
2011
+ try {
2012
+ decoded = decodeURI(url.pathname);
2013
+ } catch {
2014
+ return new Response("Malformed URI", { status: 400 });
2015
+ }
2016
+ let route = null;
2017
+ let params = {};
2018
+ if (options.paths.base && !((_b = state.prerendering) == null ? void 0 : _b.fallback)) {
2019
+ if (!decoded.startsWith(options.paths.base)) {
2020
+ return new Response("Not found", { status: 404 });
2021
+ }
2022
+ decoded = decoded.slice(options.paths.base.length) || "/";
2023
+ }
2024
+ const is_data_request = decoded.endsWith(DATA_SUFFIX);
2025
+ if (is_data_request) {
2026
+ const data_suffix_length = DATA_SUFFIX.length - (options.trailing_slash === "always" ? 1 : 0);
2027
+ decoded = decoded.slice(0, -data_suffix_length) || "/";
2028
+ url = new URL(url.origin + url.pathname.slice(0, -data_suffix_length) + url.search);
2029
+ }
2030
+ if (!((_c = state.prerendering) == null ? void 0 : _c.fallback)) {
2031
+ const matchers = await options.manifest._.matchers();
2032
+ for (const candidate of options.manifest._.routes) {
2033
+ const match = candidate.pattern.exec(decoded);
2034
+ if (!match)
2035
+ continue;
2036
+ const matched = exec(match, candidate.names, candidate.types, matchers);
2037
+ if (matched) {
2038
+ route = candidate;
2039
+ params = decode_params(matched);
2040
+ break;
2041
+ }
2042
+ }
2043
+ }
2044
+ if (route) {
2045
+ if (route.type === "page") {
2046
+ const normalized = normalize_path(url.pathname, options.trailing_slash);
2047
+ if (normalized !== url.pathname && !((_d = state.prerendering) == null ? void 0 : _d.fallback)) {
2048
+ return new Response(void 0, {
2049
+ status: 301,
2050
+ headers: {
2051
+ "x-sveltekit-normalize": "1",
2052
+ location: (normalized.startsWith("//") ? url.origin + normalized : normalized) + (url.search === "?" ? "" : url.search)
2053
+ }
2054
+ });
2055
+ }
2056
+ } else if (is_data_request) {
2057
+ return new Response(void 0, {
2058
+ status: 404
2059
+ });
2060
+ }
2061
+ }
2062
+ const event = {
2063
+ get clientAddress() {
2064
+ if (!state.getClientAddress) {
2065
+ throw new Error(`${"@sveltejs/adapter-static"} does not specify getClientAddress. Please raise an issue`);
2066
+ }
2067
+ Object.defineProperty(event, "clientAddress", {
2068
+ value: state.getClientAddress()
2069
+ });
2070
+ return event.clientAddress;
2071
+ },
2072
+ locals: {},
2073
+ params,
2074
+ platform: state.platform,
2075
+ request,
2076
+ routeId: route && route.id,
2077
+ url
2078
+ };
2079
+ const removed = (property, replacement, suffix = "") => ({
2080
+ get: () => {
2081
+ throw new Error(`event.${property} has been replaced by event.${replacement}` + suffix);
2082
+ }
2083
+ });
2084
+ const details = ". See https://github.com/sveltejs/kit/pull/3384 for details";
2085
+ const body_getter = {
2086
+ get: () => {
2087
+ throw new Error("To access the request body use the text/json/arrayBuffer/formData methods, e.g. `body = await request.json()`" + details);
2088
+ }
2089
+ };
2090
+ Object.defineProperties(event, {
2091
+ method: removed("method", "request.method", details),
2092
+ headers: removed("headers", "request.headers", details),
2093
+ origin: removed("origin", "url.origin"),
2094
+ path: removed("path", "url.pathname"),
2095
+ query: removed("query", "url.searchParams"),
2096
+ body: body_getter,
2097
+ rawBody: body_getter
2098
+ });
2099
+ let resolve_opts = {
2100
+ ssr: true,
2101
+ transformPage: default_transform
2102
+ };
2103
+ try {
2104
+ const response = await options.hooks.handle({
2105
+ event,
2106
+ resolve: async (event2, opts) => {
2107
+ var _a2;
2108
+ if (opts) {
2109
+ resolve_opts = {
2110
+ ssr: opts.ssr !== false,
2111
+ transformPage: opts.transformPage || default_transform
2112
+ };
2113
+ }
2114
+ if ((_a2 = state.prerendering) == null ? void 0 : _a2.fallback) {
2115
+ return await render_response({
2116
+ event: event2,
2117
+ options,
2118
+ state,
2119
+ $session: await options.hooks.getSession(event2),
2120
+ page_config: { router: true, hydrate: true },
2121
+ stuff: {},
2122
+ status: 200,
2123
+ error: null,
2124
+ branch: [],
2125
+ resolve_opts: {
2126
+ ...resolve_opts,
2127
+ ssr: false
2128
+ }
2129
+ });
2130
+ }
2131
+ if (route) {
2132
+ let response2;
2133
+ if (is_data_request && route.type === "page" && route.shadow) {
2134
+ response2 = await render_endpoint(event2, await route.shadow());
2135
+ if (request.headers.has("x-sveltekit-load")) {
2136
+ if (response2.status >= 300 && response2.status < 400) {
2137
+ const location = response2.headers.get("location");
2138
+ if (location) {
2139
+ const headers = new Headers(response2.headers);
2140
+ headers.set("x-sveltekit-location", location);
2141
+ response2 = new Response(void 0, {
2142
+ status: 204,
2143
+ headers
2144
+ });
2145
+ }
2146
+ }
2147
+ }
2148
+ } else {
2149
+ response2 = route.type === "endpoint" ? await render_endpoint(event2, await route.load()) : await render_page(event2, route, options, state, resolve_opts);
2150
+ }
2151
+ if (response2) {
2152
+ if (response2.status === 200 && response2.headers.has("etag")) {
2153
+ let if_none_match_value = request.headers.get("if-none-match");
2154
+ if (if_none_match_value == null ? void 0 : if_none_match_value.startsWith('W/"')) {
2155
+ if_none_match_value = if_none_match_value.substring(2);
2156
+ }
2157
+ const etag = response2.headers.get("etag");
2158
+ if (if_none_match_value === etag) {
2159
+ const headers = new Headers({ etag });
2160
+ for (const key2 of [
2161
+ "cache-control",
2162
+ "content-location",
2163
+ "date",
2164
+ "expires",
2165
+ "vary"
2166
+ ]) {
2167
+ const value = response2.headers.get(key2);
2168
+ if (value)
2169
+ headers.set(key2, value);
2170
+ }
2171
+ return new Response(void 0, {
2172
+ status: 304,
2173
+ headers
2174
+ });
2175
+ }
2176
+ }
2177
+ return response2;
2178
+ }
2179
+ }
2180
+ if (!state.initiator) {
2181
+ const $session = await options.hooks.getSession(event2);
2182
+ return await respond_with_error({
2183
+ event: event2,
2184
+ options,
2185
+ state,
2186
+ $session,
2187
+ status: 404,
2188
+ error: new Error(`Not found: ${event2.url.pathname}`),
2189
+ resolve_opts
2190
+ });
2191
+ }
2192
+ if (state.prerendering) {
2193
+ return new Response("not found", { status: 404 });
2194
+ }
2195
+ return await fetch(request);
2196
+ },
2197
+ get request() {
2198
+ throw new Error("request in handle has been replaced with event" + details);
2199
+ }
2200
+ });
2201
+ if (response && !(response instanceof Response)) {
2202
+ throw new Error("handle must return a Response object" + details);
2203
+ }
2204
+ return response;
2205
+ } catch (e) {
2206
+ const error2 = coalesce_to_error(e);
2207
+ options.handle_error(error2, event);
2208
+ try {
2209
+ const $session = await options.hooks.getSession(event);
2210
+ return await respond_with_error({
2211
+ event,
2212
+ options,
2213
+ state,
2214
+ $session,
2215
+ status: 500,
2216
+ error: error2,
2217
+ resolve_opts
2218
+ });
2219
+ } catch (e2) {
2220
+ const error3 = coalesce_to_error(e2);
2221
+ return new Response(options.dev ? error3.stack : error3.message, {
2222
+ status: 500
2223
+ });
2224
+ }
2225
+ }
2226
+ }
2227
+ function set_prerendering(value) {
2228
+ }
2229
+ const template = ({ head, body, assets: assets2, nonce }) => '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets2 + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js"><\/script>\n ' + head + '\n </head>\n <body class="">\n ' + body + "\n </body> \n</html>\n";
2230
+ let read = null;
2231
+ set_paths({ "base": "/static", "assets": "" });
2232
+ let default_protocol = "https";
2233
+ function override(settings) {
2234
+ default_protocol = settings.protocol || default_protocol;
2235
+ set_paths(settings.paths);
2236
+ set_prerendering(settings.prerendering);
2237
+ read = settings.read;
2238
+ }
2239
+ class Server {
2240
+ constructor(manifest) {
2241
+ this.options = {
2242
+ csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } },
2243
+ dev: false,
2244
+ floc: false,
2245
+ get_stack: (error2) => String(error2),
2246
+ handle_error: (error2, event) => {
2247
+ this.options.hooks.handleError({
2248
+ error: error2,
2249
+ event,
2250
+ get request() {
2251
+ throw new Error("request in handleError has been replaced with event. See https://github.com/sveltejs/kit/pull/3384 for details");
2252
+ }
2253
+ });
2254
+ error2.stack = this.options.get_stack(error2);
2255
+ },
2256
+ hooks: null,
2257
+ hydrate: true,
2258
+ manifest,
2259
+ method_override: { "parameter": "_method", "allowed": [] },
2260
+ paths: { base, assets },
2261
+ prefix: assets + "/_app/immutable/",
2262
+ prerender: {
2263
+ default: true,
2264
+ enabled: true
2265
+ },
2266
+ read,
2267
+ root: Root,
2268
+ service_worker: null,
2269
+ router: true,
2270
+ template,
2271
+ template_contains_nonce: false,
2272
+ trailing_slash: "never"
2273
+ };
2274
+ }
2275
+ async respond(request, options = {}) {
2276
+ if (!(request instanceof Request)) {
2277
+ throw new Error("The first argument to server.respond must be a Request object. See https://github.com/sveltejs/kit/pull/3384 for details");
2278
+ }
2279
+ if (!this.options.hooks) {
2280
+ const module = await import("./chunks/hooks-1c45ba0b.js");
2281
+ this.options.hooks = {
2282
+ getSession: module.getSession || (() => ({})),
2283
+ handle: module.handle || (({ event, resolve: resolve2 }) => resolve2(event)),
2284
+ handleError: module.handleError || (({ error: error2 }) => console.error(error2.stack)),
2285
+ externalFetch: module.externalFetch || fetch
2286
+ };
2287
+ }
2288
+ return respond(request, this.options, options);
2289
+ }
2290
+ }
2291
+ export { Server, override };
frontend/.svelte-kit/output/server/manifest.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-1d6beeeb.js","js":["start-1d6beeeb.js","chunks/index-bcf2726a.js","chunks/paths-d3bcbd10.js"],"css":[]},
7
+ nodes: [
8
+ () => import('./nodes/0.js'),
9
+ () => import('./nodes/1.js'),
10
+ () => import('./nodes/2.js')
11
+ ],
12
+ routes: [
13
+ {
14
+ type: 'page',
15
+ id: "",
16
+ pattern: /^\/$/,
17
+ names: [],
18
+ types: [],
19
+ path: "/",
20
+ shadow: null,
21
+ a: [0,2],
22
+ b: [1]
23
+ }
24
+ ],
25
+ matchers: async () => {
26
+
27
+ return { };
28
+ }
29
+ }
30
+ };
frontend/.svelte-kit/output/server/manifest.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ ".svelte-kit/build/index.js": {
3
+ "file": "index.js",
4
+ "src": ".svelte-kit/build/index.js",
5
+ "isEntry": true,
6
+ "imports": [
7
+ "_index-445fd704.js",
8
+ "_paths-396f020f.js"
9
+ ],
10
+ "dynamicImports": [
11
+ ".svelte-kit/build/hooks.js"
12
+ ]
13
+ },
14
+ "src/routes/__layout.svelte": {
15
+ "file": "entries/pages/__layout.svelte.js",
16
+ "src": "src/routes/__layout.svelte",
17
+ "isEntry": true,
18
+ "imports": [
19
+ "_index-445fd704.js"
20
+ ],
21
+ "css": [
22
+ "assets/entries/pages/__layout.svelte-0bf099f6.css"
23
+ ]
24
+ },
25
+ ".svelte-kit/runtime/components/error.svelte": {
26
+ "file": "entries/fallbacks/error.svelte.js",
27
+ "src": ".svelte-kit/runtime/components/error.svelte",
28
+ "isEntry": true,
29
+ "imports": [
30
+ "_index-445fd704.js"
31
+ ]
32
+ },
33
+ "src/routes/index.svelte": {
34
+ "file": "entries/pages/index.svelte.js",
35
+ "src": "src/routes/index.svelte",
36
+ "isEntry": true,
37
+ "imports": [
38
+ "_index-445fd704.js",
39
+ "_paths-396f020f.js"
40
+ ],
41
+ "css": [
42
+ "assets/entries/pages/index.svelte-c3297bef.css"
43
+ ]
44
+ },
45
+ "_paths-396f020f.js": {
46
+ "file": "chunks/paths-396f020f.js"
47
+ },
48
+ "_index-445fd704.js": {
49
+ "file": "chunks/index-445fd704.js"
50
+ },
51
+ ".svelte-kit/build/hooks.js": {
52
+ "file": "chunks/hooks-1c45ba0b.js",
53
+ "src": ".svelte-kit/build/hooks.js",
54
+ "isDynamicEntry": true
55
+ }
56
+ }
frontend/.svelte-kit/output/server/nodes/0.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import * as module from '../entries/pages/__layout.svelte.js';
2
+
3
+ export { module };
4
+ export const index = 0;
5
+ export const entry = 'pages/__layout.svelte-f5a1b718.js';
6
+ export const js = ["pages/__layout.svelte-f5a1b718.js","chunks/index-bcf2726a.js"];
7
+ export const css = ["assets/pages/__layout.svelte-b67cf61d.css"];
frontend/.svelte-kit/output/server/nodes/1.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import * as module from '../entries/fallbacks/error.svelte.js';
2
+
3
+ export { module };
4
+ export const index = 1;
5
+ export const entry = 'error.svelte-d9523301.js';
6
+ export const js = ["error.svelte-d9523301.js","chunks/index-bcf2726a.js"];
7
+ export const css = [];
frontend/.svelte-kit/output/server/nodes/2.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ 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-1f940fb6.js';
6
+ export const js = ["pages/index.svelte-1f940fb6.js","chunks/index-bcf2726a.js","chunks/paths-d3bcbd10.js"];
7
+ export const css = ["assets/pages/index.svelte-f2b33456.css"];
frontend/.svelte-kit/runtime/app/env.js CHANGED
File without changes
frontend/.svelte-kit/runtime/app/navigation.js CHANGED
File without changes
frontend/.svelte-kit/runtime/app/paths.js CHANGED
File without changes
frontend/.svelte-kit/runtime/app/stores.js CHANGED
File without changes
frontend/.svelte-kit/runtime/client/singletons.js CHANGED
File without changes
frontend/.svelte-kit/runtime/client/start.js CHANGED
File without changes
frontend/.svelte-kit/runtime/components/error.svelte CHANGED
File without changes
frontend/.svelte-kit/runtime/components/layout.svelte CHANGED
File without changes
frontend/.svelte-kit/runtime/env.js CHANGED
File without changes
frontend/.svelte-kit/runtime/paths.js CHANGED
File without changes
frontend/.svelte-kit/runtime/server/index.js CHANGED
File without changes
frontend/build/_app/immutable/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  ".svelte-kit/runtime/client/start.js": {
3
- "file": "start-b4d3a4a1.js",
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-e78f0615.js",
39
  "src": "src/routes/index.svelte",
40
  "isEntry": true,
41
  "isDynamicEntry": true,
 
1
  {
2
  ".svelte-kit/runtime/client/start.js": {
3
+ "file": "start-1d6beeeb.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-1f940fb6.js",
39
  "src": "src/routes/index.svelte",
40
  "isEntry": true,
41
  "isDynamicEntry": true,
frontend/build/_app/immutable/pages/index.svelte-1f940fb6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as se,i as ne,s as ie,e as C,k as A,c as T,a as z,m as D,d as I,b as s,K as Oe,g as Z,J as p,t as V,h as F,L as U,E as Q,M as Ne,N as Y,O as K,P as me,Q as ge,j as Le,f as $e,R as oe,T as Se,U as Ue,V as ct,W as Re,w as ue,x as pe,y as de,q as he,o as fe,B as ve,v as ut}from"../chunks/index-bcf2726a.js";import{w as ae,b as at}from"../chunks/paths-d3bcbd10.js";const Pe=[{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"}],Be=["/samples/default.jpg","/samples/example0.png","/samples/example1.png","/samples/example2.png","/samples/example3.png","/samples/example4.png","/samples/example5.png","/samples/example6.jpg"],ke=[["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 _e=ae(new Map),je=ae(),Ae=ae(),De=ae(),xe=ae(),Ie=ae({prompt:"Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",modifier:ke[0][0],seed:st(),steps:20}),be=ae(!1),Me=ae(!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,n,d,i,k,E,b,P;return{c(){e=C("div"),t=C("input"),n=A(),d=C("label"),i=C("img"),P=A(),this.h()},l(g){e=T(g,"DIV",{class:!0});var v=z(e);t=T(v,"INPUT",{type:!0,name:!0,id:!0,class:!0}),n=D(v),d=T(v,"LABEL",{for:!0,class:!0});var x=z(d);i=T(x,"IMG",{src:!0,alt:!0,class:!0}),x.forEach(I),P=D(v),v.forEach(I),this.h()},h(){s(t,"type","radio"),s(t,"name","samples"),s(t,"id",r="sample-"+l[5]),t.value=a=l[5],t.disabled=o=l[0]===!0,s(t,"class","svelte-1gwcbp"),Oe(i.src,k=at+l[3])||s(i,"src",k),s(i,"alt",E=l[3]),s(i,"class","svelte-1gwcbp"),s(d,"for",b="sample-"+l[5]),s(d,"class","svelte-1gwcbp"),s(e,"class","snap-always snap-start")},m(g,v){Z(g,e,v),p(e,t),p(e,n),p(e,d),p(d,i),p(e,P)},p(g,v){v&1&&o!==(o=g[0]===!0)&&(t.disabled=o)},d(g){g&&I(e)}}}function pt(l){let e,t,r,a,o,n,d,i,k=Be,E=[];for(let b=0;b<k.length;b+=1)E[b]=Je(Ye(l,k,b));return{c(){e=C("div"),t=C("h4"),r=V("Select a Template"),a=A(),o=C("form"),n=C("div");for(let b=0;b<E.length;b+=1)E[b].c();this.h()},l(b){e=T(b,"DIV",{});var P=z(e);t=T(P,"H4",{class:!0});var g=z(t);r=F(g,"Select a Template"),g.forEach(I),a=D(P),o=T(P,"FORM",{class:!0});var v=z(o);n=T(v,"DIV",{class:!0});var x=z(n);for(let u=0;u<E.length;u+=1)E[u].l(x);x.forEach(I),v.forEach(I),P.forEach(I),this.h()},h(){s(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(n,"class","samples svelte-1gwcbp"),s(o,"class","svelte-1gwcbp")},m(b,P){Z(b,e,P),p(e,t),p(t,r),p(e,a),p(e,o),p(o,n);for(let g=0;g<E.length;g+=1)E[g].m(n,null);d||(i=U(o,"input",l[1]),d=!0)},p(b,[P]){if(P&1){k=Be;let g;for(g=0;g<k.length;g+=1){const v=Ye(b,k,g);E[g]?E[g].p(v,P):(E[g]=Je(v),E[g].c(),E[g].m(n,null))}for(;g<E.length;g+=1)E[g].d(1);E.length=k.length}},i:Q,o:Q,d(b){b&&I(e),Ne(E,b),d=!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 Y(l,De,n=>t(2,r=n)),Y(l,be,n=>t(0,a=n)),[a,async n=>{n.preventDefault();const d=Be[parseInt(n.target.value)];if(d){const i=await fetch(at+d).then(E=>E.blob()),k=await dt(i);K(De,r=k,r)}}]}class ft extends se{constructor(e){super(),ne(this,e,ht,pt,ie,{})}}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,n,d,i,k,E,b,P,g=l[2].label+"",v,x,u;return{c(){e=C("div"),t=C("input"),n=A(),d=C("label"),i=me("svg"),k=me("rect"),b=A(),P=C("span"),v=V(g),u=A(),this.h()},l(f){e=T(f,"DIV",{class:!0});var h=z(e);t=T(h,"INPUT",{name:!0,type:!0,id:!0,class:!0}),n=D(h),d=T(h,"LABEL",{for:!0,class:!0});var c=z(d);i=ge(c,"svg",{width:!0,height:!0,viewBox:!0,class:!0});var m=z(i);k=ge(m,"rect",{x:!0,y:!0,width:!0,height:!0,fill:!0}),z(k).forEach(I),m.forEach(I),b=D(c),P=T(c,"SPAN",{class:!0});var w=z(P);v=F(w,g),w.forEach(I),c.forEach(I),u=D(h),h.forEach(I),this.h()},h(){s(t,"name","color"),t.checked=r=l[7]==nt,s(t,"type","radio"),s(t,"id",a="color-"+l[7]),t.value=o=l[7],s(t,"class","svelte-1oy4poo"),s(k,"x","0"),s(k,"y","0"),s(k,"width","20"),s(k,"height","20"),s(k,"fill",E="rgb("+l[2].color.join(",")+")"),s(i,"width","20"),s(i,"height","20"),s(i,"viewBox","0 0 20 20"),s(i,"class","svelte-1oy4poo"),s(P,"class","svelte-1oy4poo"),s(d,"for",x="color-"+l[7]),s(d,"class","svelte-1oy4poo"),s(e,"class","snap-always snap-start")},m(f,h){Z(f,e,h),p(e,t),p(e,n),p(e,d),p(d,i),p(i,k),p(d,b),p(d,P),p(P,v),p(e,u)},p:Q,d(f){f&&I(e)}}}function vt(l){let e,t,r,a,o,n,d,i,k,E,b,P,g,v=l[0].size+"",x,u,f,h=Pe,c=[];for(let m=0;m<h.length;m+=1)c[m]=Ke(Xe(l,h,m));return{c(){e=C("form"),t=C("h4"),r=V("Brush Type"),a=A(),o=C("div");for(let m=0;m<c.length;m+=1)c[m].c();n=A(),d=C("h4"),i=V("Brush Size"),k=A(),E=C("div"),b=C("input"),P=A(),g=C("label"),x=V(v),this.h()},l(m){e=T(m,"FORM",{});var w=z(e);t=T(w,"H4",{class:!0});var y=z(t);r=F(y,"Brush Type"),y.forEach(I),a=D(w),o=T(w,"DIV",{class:!0,name:!0});var M=z(o);for(let B=0;B<c.length;B+=1)c[B].l(M);M.forEach(I),n=D(w),d=T(w,"H4",{class:!0});var _=z(d);i=F(_,"Brush Size"),_.forEach(I),k=D(w),E=T(w,"DIV",{class:!0});var S=z(E);b=T(S,"INPUT",{min:!0,max:!0,step:!0,name:!0,type:!0}),P=D(S),g=T(S,"LABEL",{class:!0,for:!0});var N=z(g);x=F(N,v),N.forEach(I),S.forEach(I),w.forEach(I),this.h()},h(){s(t,"class","font-bold mt-6 mb-2 leading-6 my-3"),s(o,"class","colors svelte-1oy4poo"),s(o,"name","colors"),s(d,"class","font-bold mt-6 mb-2 my-6 leading-6"),b.value="10",s(b,"min","1"),s(b,"max","150"),s(b,"step","1"),s(b,"name","brush"),s(b,"type","range"),s(g,"class","pl-2 svelte-1oy4poo"),s(g,"for","brush"),s(E,"class","brush svelte-1oy4poo")},m(m,w){Z(m,e,w),p(e,t),p(t,r),p(e,a),p(e,o);for(let y=0;y<c.length;y+=1)c[y].m(o,null);p(e,n),p(e,d),p(d,i),p(e,k),p(e,E),p(E,b),p(E,P),p(E,g),p(g,x),u||(f=U(e,"input",l[1]),u=!0)},p(m,[w]){if(w&0){h=Pe;let y;for(y=0;y<h.length;y+=1){const M=Xe(m,h,y);c[y]?c[y].p(M,w):(c[y]=Ke(M),c[y].c(),c[y].m(o,null))}for(;y<c.length;y+=1)c[y].d(1);c.length=h.length}w&1&&v!==(v=m[0].size+"")&&Le(x,v)},i:Q,o:Q,d(m){m&&I(e),Ne(c,m),u=!1,f()}}}const nt=6;function mt(l,e,t){let r;Y(l,xe,k=>t(0,r=k));const{color:a,label:o}=Pe[nt];let n=`rgb(${a.join(",")})`,d=40;return K(xe,r={color:n,size:d,label:o},r),[r,async k=>{const E=k.target;if(E.name==="color"){const b=parseInt(E.value),{color:P,label:g}=Pe[b];n=`rgb(${P.join(",")})`,K(xe,r={color:n,size:d,label:g},r)}else E.name==="brush"&&(d=parseInt(E.value),K(xe,r={color:n,size:d,label:o},r))},a]}class gt extends se{constructor(e){super(),ne(this,e,mt,vt,ie,{})}}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=C("option"),r=V(t),o=V("`"),this.h()},l(n){e=T(n,"OPTION",{});var d=z(e);r=F(d,t),d.forEach(I),o=F(n,"`"),this.h()},h(){e.__value=a=l[15][0],e.value=e.__value},m(n,d){Z(n,e,d),p(e,r),Z(n,o,d)},p:Q,d(n){n&&I(e),n&&I(o)}}}function bt(l){let e,t,r,a,o,n,d,i,k,E,b,P,g,v,x,u,f,h,c,m,w,y,M,_,S,N,B,q,$,J,te,X,O,L,re,ee,le,ce,ye,W=ke,G=[];for(let j=0;j<W.length;j+=1)G[j]=Qe(Ze(l,W,j));return{c(){e=C("form"),t=C("h4"),r=V("Prompt"),a=A(),o=C("input"),d=A(),i=C("h4"),k=V("Modifier"),E=A(),b=C("input"),g=A(),v=C("select"),x=C("option"),u=V("preset");for(let j=0;j<G.length;j+=1)G[j].c();h=A(),c=C("h4"),m=V("Random Seed"),w=A(),y=C("input"),_=A(),S=C("button"),N=V("Random"),q=A(),$=C("h4"),J=V("Sample Steps"),te=A(),X=C("div"),O=C("input"),re=A(),ee=C("label"),le=V(l[2]),this.h()},l(j){e=T(j,"FORM",{});var R=z(e);t=T(R,"H4",{class:!0});var H=z(t);r=F(H,"Prompt"),H.forEach(I),a=D(R),o=T(R,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),d=D(R),i=T(R,"H4",{class:!0});var we=z(i);k=F(we,"Modifier"),we.forEach(I),E=D(R),b=T(R,"INPUT",{name:!0,placeholder:!0,style:!0,class:!0}),g=D(R),v=T(R,"SELECT",{name:!0,class:!0});var Ce=z(v);x=T(Ce,"OPTION",{});var Ve=z(x);u=F(Ve,"preset"),Ve.forEach(I);for(let Te=0;Te<G.length;Te+=1)G[Te].l(Ce);Ce.forEach(I),h=D(R),c=T(R,"H4",{class:!0});var Fe=z(c);m=F(Fe,"Random Seed"),Fe.forEach(I),w=D(R),y=T(R,"INPUT",{type:!0,name:!0,placeholder:!0,class:!0}),_=D(R),S=T(R,"BUTTON",{class:!0});var Ge=z(S);N=F(Ge,"Random"),Ge.forEach(I),q=D(R),$=T(R,"H4",{class:!0});var He=z($);J=F(He,"Sample Steps"),He.forEach(I),te=D(R),X=T(R,"DIV",{class:!0});var Ee=z(X);O=T(Ee,"INPUT",{type:!0,name:!0,min:!0,max:!0,step:!0,class:!0}),re=D(Ee),ee=T(Ee,"LABEL",{class:!0,for:!0});var qe=z(ee);le=F(qe,l[2]),qe.forEach(I),Ee.forEach(I),R.forEach(I),this.h()},h(){s(t,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(o,"name","prompt"),s(o,"placeholder","Aerial view of ..., France."),o.disabled=n=l[6]===!0,$e(o,"width","500px"),s(o,"class","svelte-7to72y"),s(i,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(b,"name","modifier"),s(b,"placeholder","High resolution satellite image"),b.disabled=P=l[6]===!0,$e(b,"width","500px"),s(b,"class","svelte-7to72y"),x.disabled=!0,x.selected=!0,x.__value="preset",x.value=x.__value,s(v,"name","presets"),v.disabled=f=l[6]===!0,s(v,"class","svelte-7to72y"),s(c,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(y,"type","Number"),s(y,"name","seed"),s(y,"placeholder","Integer Seed"),y.disabled=M=l[6]===!0,s(y,"class","svelte-7to72y"),S.disabled=B=l[6]===!0,s(S,"class","svelte-7to72y"),s($,"class","font-bold mt-6 mb-2 my-6 leading-6"),s(O,"type","range"),s(O,"name","steps"),s(O,"min","10"),s(O,"max","30"),s(O,"step","1"),O.disabled=L=l[6]===!0,s(O,"class","svelte-7to72y"),s(ee,"class","pl-2 svelte-7to72y"),s(ee,"for","steps"),s(X,"class","flex")},m(j,R){Z(j,e,R),p(e,t),p(t,r),p(e,a),p(e,o),oe(o,l[3]),p(e,d),p(e,i),p(i,k),p(e,E),p(e,b),oe(b,l[4]),p(e,g),p(e,v),p(v,x),p(x,u);for(let H=0;H<G.length;H+=1)G[H].m(v,null);p(e,h),p(e,c),p(c,m),p(e,w),p(e,y),oe(y,l[1]),p(e,_),p(e,S),p(S,N),p(e,q),p(e,$),p($,J),p(e,te),p(e,X),p(X,O),oe(O,l[2]),p(X,re),p(X,ee),p(ee,le),l[14](e),ce||(ye=[U(o,"input",l[8]),U(b,"input",l[9]),U(v,"change",l[10]),U(y,"input",l[11]),U(S,"click",Se(l[12])),U(O,"change",l[13]),U(O,"input",l[13]),U(e,"input",l[7])],ce=!0)},p(j,[R]){if(R&64&&n!==(n=j[6]===!0)&&(o.disabled=n),R&8&&o.value!==j[3]&&oe(o,j[3]),R&64&&P!==(P=j[6]===!0)&&(b.disabled=P),R&16&&b.value!==j[4]&&oe(b,j[4]),R&0){W=ke;let H;for(H=0;H<W.length;H+=1){const we=Ze(j,W,H);G[H]?G[H].p(we,R):(G[H]=Qe(we),G[H].c(),G[H].m(v,null))}for(;H<G.length;H+=1)G[H].d(1);G.length=W.length}R&64&&f!==(f=j[6]===!0)&&(v.disabled=f),R&64&&M!==(M=j[6]===!0)&&(y.disabled=M),R&2&&oe(y,j[1]),R&64&&B!==(B=j[6]===!0)&&(S.disabled=B),R&64&&L!==(L=j[6]===!0)&&(O.disabled=L),R&4&&oe(O,j[2]),R&4&&Le(le,j[2])},i:Q,o:Q,d(j){j&&I(e),Ne(G,j),l[14](null),ce=!1,Ue(ye)}}}function yt(l,e,t){let r,a;Y(l,Ie,h=>t(5,r=h)),Y(l,be,h=>t(6,a=h));function o(){const h=n.elements;K(Ie,r={prompt:h.prompt.value,modifier:h.modifier.value,seed:BigInt(h.seed.value),steps:parseInt(h.steps.value)},r)}let n,d=r.seed,i=r.steps,k=r.prompt,E=r.modifier;function b(){k=this.value,t(3,k)}function P(){E=this.value,t(4,E)}const g=h=>{const c=h.currentTarget.selectedIndex-1;t(4,E=ke[c][0]),K(Ie,r.modifier=ke[c][0],r)};function v(){d=this.value,t(1,d)}const x=()=>{t(1,d=st()),o()};function u(){i=ct(this.value),t(2,i)}function f(h){Re[h?"unshift":"push"](()=>{n=h,t(0,n)})}return[n,d,i,k,E,r,a,o,b,P,g,v,x,u,f]}class wt extends se{constructor(e){super(),ne(this,e,yt,bt,ie,{})}}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 n=r[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=t,a.c=r,a.d=function(o,n,d){a.o(o,n)||Object.defineProperty(o,n,{enumerable:!0,get:d})},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,n){if(1&n&&(o=a(o)),8&n||4&n&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(a.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&n&&typeof o!="string")for(var i in o)a.d(d,i,function(k){return o[k]}.bind(null,i));return d},a.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(n,"a",n),n},a.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)},a.p="",a(a.s=0)}([function(t,r,a){function o(g,v){return function(x){if(Array.isArray(x))return x}(g)||function(x,u){if(Symbol.iterator in Object(x)||Object.prototype.toString.call(x)==="[object Arguments]"){var f=[],h=!0,c=!1,m=void 0;try{for(var w,y=x[Symbol.iterator]();!(h=(w=y.next()).done)&&(f.push(w.value),!u||f.length!==u);h=!0);}catch(M){c=!0,m=M}finally{try{h||y.return==null||y.return()}finally{if(c)throw m}}return f}}(g,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function n(g){return function(v){if(Array.isArray(v)){for(var x=0,u=new Array(v.length);x<v.length;x++)u[x]=v[x];return u}}(g)||function(v){if(Symbol.iterator in Object(v)||Object.prototype.toString.call(v)==="[object Arguments]")return Array.from(v)}(g)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(g,v){for(var x=0;x<v.length;x++){var u=v[x];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}a.r(r);var i=/^#?[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}[0-9A-Fa-f]{1,2}$/,k=/^rgb\((\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3},(\s+)?[0-9]{1,3}(\s+)?\)$/,E=function(){function g(){(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,g),this.canvases={}}var v,x;return v=g,(x=[{key:"parseColor",value:function(u){var f=i.test(u),h=k.test(u);if(!f&&!h)throw new Error("Color is not correct format. #123123 or rgb(123, 123, 123) format required.");if(f){var c=u[0]==="#"?u.slice(1):u;return c=c.length===3?c.split("").reduce(function(_,S){return[].concat(n(_),[S,S])},[]).join(""):c,{r:parseInt(c.slice(0,2),16),g:parseInt(c.slice(2,4),16),b:parseInt(c.slice(4,6),16)}}if(h){var m=o(u.replace(/rgb|\s+|\(|\)/g,"").split(",").map(function(_){return parseInt(_)}),3),w=m[0],y=m[1],M=m[2];return{r:w=w>255?255:w,g:y=y>255?255:y,b:M=M>255?255:M}}}},{key:"make",value:function(u){var f=u.size,h=u.color;try{f*=window.devicePixelRatio;var c=this.parseColor(h),m=JSON.stringify(c);if(this.canvases[m]=this.canvases[m]||{},this.canvases[m][f]!=null)return this.canvases[m][f];var w=document.createElement("canvas");f+=f%2,w.width=f,w.height=f;for(var y=w.getContext("2d"),M=y.createImageData(f,f),_=0;_<M.data.length;_+=4)M.data[_]=255,M.data[_+1]=255,M.data[_+2]=255,M.data[_+3]=0;return this.plotCircle(2*f,4*f*(f/2),f/2,M,f,c),this.fillCircle(M,c),y.putImageData(M,0,0),this.canvases[m][f]=w,w}catch(S){console.error(S)}}},{key:"plotCircle",value:function(u,f,h,c,m,w){var y=-h,M=0,_=2-2*h;do{var S=u-4*(y+1)+(f+4*m*(M-1));c.data[S+0]=w.r,c.data[S+1]=w.g,c.data[S+2]=w.b,c.data[S+3]=255;var N=u-M*(4*m)+(f-4*(y+1));c.data[N+0]=w.r,c.data[N+1]=w.g,c.data[N+2]=w.b,c.data[N+3]=255;var B=u+4*y+(f-M*(4*m));c.data[B+0]=w.r,c.data[B+1]=w.g,c.data[B+2]=w.b,c.data[B+3]=255;var q=u+4*m*(M-1)+(f+4*y);c.data[q+0]=w.r,c.data[q+1]=w.g,c.data[q+2]=w.b,c.data[q+3]=255,(h=_)<=M&&(_+=2*++M+1),(h>y||_>M)&&(_+=2*++y+1)}while(y<0)}},{key:"fillCircle",value:function(u,f){for(var h=4*u.width,c=1;c<u.height-1;c+=1)for(var m=!1,w=!1,y=!1,M=0;M<h;M+=4){var _=h*c+M,S=u.data[_+3],N=S===255;N&&!m?m=!0:S===0&&m?w=!0:N&&m&&w&&(y=!0),m&&w&&!y&&(u.data[_]=f.r,u.data[_+1]=f.g,u.data[_+2]=f.b,u.data[_+3]=255)}}}])&&d(v.prototype,x),g}();function b(g,v){for(var x=0;x<v.length;x++){var u=v[x];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}var P=function(){function g(u){(function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")})(this,g),this.canvas=u,this.context=u.getContext("2d"),this.stampMaker=new E,this.configPixelRatio()}var v,x;return v=g,(x=[{key:"configPixelRatio",value:function(){var u=this.canvas,f=u.width,h=u.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(u){var f=this;return new Promise(function(h){var c=document.createElement("canvas"),m=c.getContext("2d"),w=f.canvas,y=w.width,M=w.height,_=y/f.dpr,S=M/f.dpr;c.width=_,c.height=S,m.imageSmoothingEnabled=!1,m.drawImage(f.canvas,0,0,y,M,0,0,_,S),c.toBlob(function(N){N.lastModifedDate=new Date,N.name=u,h(N)})})}},{key:"distanceBetween",value:function(u,f){return Math.sqrt(Math.pow(f.x-u.x,2)+Math.pow(f.y-u.y,2))}},{key:"angleBetween",value:function(u,f){return Math.atan2(f.x-u.x,f.y-u.y)}},{key:"draw",value:function(u){var f=u.from,h=u.to,c=u.size,m=u.color;this.context.globalCompositeOperation="source-over",this.brush({from:f,to:h,size:c,color:m})}},{key:"erase",value:function(u){var f=u.from,h=u.to,c=u.size;this.context.globalCompositeOperation="destination-out",this.brush({from:f,to:h,size:c,color:"#000000"})}},{key:"brush",value:function(u){var f=this,h=u.from,c=u.to,m=u.size,w=u.color,y=(m-m%2)/2,M=this.stampMaker.make({size:m,color:w});if(h.x!==c.x||h.y!==c.y)for(var _=this.distanceBetween(h,c),S=this.angleBetween(h,c),N=function(J){var te=h.x+Math.sin(S)*J-y,X=h.y+Math.cos(S)*J-y;window.requestAnimationFrame(function(){f.context.drawImage(M,Math.round(te),Math.round(X),m,m)})},B=0;B<_;B+=1)N(B);else{var q=h.x-y,$=h.y-y;this.context.drawImage(M,Math.round(q),Math.round($),m,m)}}},{key:"dpr",get:function(){return window.devicePixelRatio||1}}])&&b(v.prototype,x),g}();r.default=P}])})})(it);var We=kt(it.exports);function Et(l){let e,t;return{c(){e=me("svg"),t=me("path"),this.h()},l(r){e=ge(r,"svg",{xmlns:!0,width:!0,viewBox:!0,class:!0});var a=z(e);t=ge(a,"path",{fill:!0,stroke:!0,"stroke-width":!0,d:!0}),z(t).forEach(I),a.forEach(I),this.h()},h(){s(t,"fill","white"),s(t,"stroke","black"),s(t,"stroke-width","30"),s(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"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","20"),s(e,"viewBox","0 0 512 512"),s(e,"class",l[0])},m(r,a){Z(r,e,a),p(e,t)},p(r,[a]){a&1&&s(e,"class",r[0])},i:Q,o:Q,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 se{constructor(e){super(),ne(this,e,It,Et,ie,{classNames:0})}}function Pt(l){var f;let e,t,r,a,o,n,d,i=((f=l[0])==null?void 0:f.label)+"",k,E,b,P,g,v,x,u;return P=new St({}),{c(){e=C("div"),t=C("div"),r=C("canvas"),a=A(),o=C("canvas"),n=A(),d=C("span"),k=V(i),E=A(),b=C("button"),ue(P.$$.fragment),this.h()},l(h){e=T(h,"DIV",{});var c=z(e);t=T(c,"DIV",{class:!0});var m=z(t);r=T(m,"CANVAS",{class:!0,width:!0,height:!0}),z(r).forEach(I),a=D(m),o=T(m,"CANVAS",{class:!0,width:!0,height:!0}),z(o).forEach(I),n=D(m),d=T(m,"SPAN",{class:!0});var w=z(d);k=F(w,i),w.forEach(I),E=D(m),b=T(m,"BUTTON",{class:!0});var y=z(b);pe(P.$$.fragment,y),y.forEach(I),m.forEach(I),c.forEach(I),this.h()},h(){s(r,"class","canvas svelte-vhujxn"),s(r,"width","512"),s(r,"height","512"),s(o,"class","brush svelte-vhujxn"),s(o,"width","10"),s(o,"height","10"),s(d,"class","label svelte-vhujxn"),s(b,"class","absolute bottom-0 left-0 p-3"),b.disabled=g=l[3].size<=0,s(t,"class","relative overflow-clip")},m(h,c){Z(h,e,c),p(e,t),p(t,r),l[11](r),p(t,a),p(t,o),l[12](o),p(t,n),p(t,d),p(d,k),p(t,E),p(t,b),de(P,b,null),v=!0,x||(u=[U(r,"touchmove",Ct),U(r,"pointerenter",Mt),U(r,"pointerup",l[4]),U(r,"pointerleave",l[4]),U(r,"pointercancel",l[4]),U(r,"pointerout",l[4]),U(r,"pointermove",l[6]),U(r,"pointerdown",l[5]),U(b,"click",Se(l[13]))],x=!0)},p(h,[c]){var m;(!v||c&1)&&i!==(i=((m=h[0])==null?void 0:m.label)+"")&&Le(k,i),(!v||c&8&&g!==(g=h[3].size<=0))&&(b.disabled=g)},i(h){v||(he(P.$$.fragment,h),v=!0)},o(h){fe(P.$$.fragment,h),v=!1},d(h){h&&I(e),l[11](null),l[12](null),ve(P),x=!1,Ue(u)}}}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 ze(l,e){l.drawImage(e,0,0,l.canvas.width,l.canvas.height)}const Ct=l=>l.preventDefault();function Tt(l,e,t){let r,a,o,n;Y(l,_e,_=>t(3,r=_)),Y(l,De,_=>t(10,a=_)),Y(l,xe,_=>t(0,o=_)),Y(l,Ae,_=>t(18,n=_));let d,i,k,E,b={x:0,y:0},P;ut(()=>{t(9,E=d.getContext("2d")),t(8,k=i.getContext("2d")),window.devicePixelRatio=1,P=new We(d),t(1,d.style.height="unset",d),t(1,d.style.width="unset",d),K(Ae,n=d,n),tt(E)});let g=!1,v;function x(){t(2,i.style.top=`${10+o.size/2}px`,i),t(2,i.style.left=`${10+o.size/2}px`,i),g=!1}function u(_){g=!0,b=et(d,_),P.draw({from:b,to:b,size:o.size,color:o.color}),v=_t(),_e.update(S=>(S.set(v,{brush:o,points:[{from:b,to:b}]}),S))}function f(_){const S=et(d,_);t(2,i.style.top=`${_.offsetY}px`,i),t(2,i.style.left=`${_.offsetX}px`,i),g&&(P.draw({from:b,to:S,size:o.size,color:o.color}),_e.update(N=>{const B=N.get(v);return B==null||B.points.push({from:b,to:S}),N}),b=S)}function h(_){const{size:S,color:N}=_;t(2,i.width=S,i),t(2,i.height=S,i),t(8,k.fillStyle=N,k),k.arc(S/2,S/2,S/2,0,2*Math.PI),k.fill()}function c(){if(r.size<=0)return;const _=Array.from(r.keys());_e.update(S=>(S.delete(_[_.length-1]),S)),m(E)}function m(_){const S=document.createElement("canvas");S.width=512,S.height=512,window.devicePixelRatio=1;const N=new We(S);tt(_),a&&ze(_,a),Array.from(r.values()).forEach(B=>{B.points.forEach((q,$)=>{N.draw({from:q.from,to:q.to,size:B.brush.size,color:B.brush.color})})}),requestAnimationFrame(()=>{ze(_,S)})}function w(_){Re[_?"unshift":"push"](()=>{d=_,t(1,d)})}function y(_){Re[_?"unshift":"push"](()=>{i=_,t(2,i),t(8,k),t(0,o)})}const M=()=>c();return l.$$.update=()=>{l.$$.dirty&257&&k&&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&&(ze(E,a),K(_e,r=new Map,r))},[o,d,i,r,x,u,f,c,k,E,a,w,y,M]}class zt extends se{constructor(e){super(),ne(this,e,Tt,Pt,ie,{})}}function rt(l){let e,t,r;return{c(){e=C("img"),this.h()},l(a){e=T(a,"IMG",{class:!0,alt:!0,src:!0,width:!0,height:!0}),this.h()},h(){s(e,"class",t="image "+(l[1]?"opacity-30":"")+" svelte-1t0h0rs"),s(e,"alt","Generative Map Result"),Oe(e.src,r=l[0])||s(e,"src",r),s(e,"width","512"),s(e,"height","512")},m(a,o){Z(a,e,o)},p(a,o){o&2&&t!==(t="image "+(a[1]?"opacity-30":"")+" svelte-1t0h0rs")&&s(e,"class",t),o&1&&!Oe(e.src,r=a[0])&&s(e,"src",r)},d(a){a&&I(e)}}}function lt(l){let e,t,r,a,o,n;return{c(){e=C("div"),t=me("svg"),r=me("path"),a=A(),o=C("span"),n=V(ot),this.h()},l(d){e=T(d,"DIV",{class:!0});var i=z(e);t=ge(i,"svg",{xmlns:!0,fill:!0,viewBox:!0,class:!0});var k=z(t);r=ge(k,"path",{fill:!0,d:!0}),z(r).forEach(I),k.forEach(I),a=D(i),o=T(i,"SPAN",{class:!0});var E=z(o);n=F(E,ot),E.forEach(I),i.forEach(I),this.h()},h(){s(r,"fill","currentColor"),s(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"),s(t,"xmlns","http://www.w3.org/2000/svg"),s(t,"fill","none"),s(t,"viewBox","0 0 24 24"),s(t,"class","animate-spin max-w-[3rem]"),s(o,"class","text-xs"),s(e,"class","loading svelte-1t0h0rs")},m(d,i){Z(d,e,i),p(e,t),p(t,r),p(e,a),p(e,o),p(o,n)},p:Q,d(d){d&&I(e)}}}function Ot(l){let e,t,r=l[0]&&rt(l),a=l[1]&&lt();return{c(){e=C("div"),r&&r.c(),t=A(),a&&a.c(),this.h()},l(o){e=T(o,"DIV",{class:!0});var n=z(e);r&&r.l(n),t=D(n),a&&a.l(n),n.forEach(I),this.h()},h(){s(e,"class","relative overflow-clip flex flex-col justify-center items-center w-full h-full")},m(o,n){Z(o,e,n),r&&r.m(e,null),p(e,t),a&&a.m(e,null)},p(o,[n]){o[0]?r?r.p(o,n):(r=rt(o),r.c(),r.m(e,t)):r&&(r.d(1),r=null),o[1]?a?a.p(o,n):(a=lt(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:Q,o:Q,d(o){o&&I(e),r&&r.d(),a&&a.d()}}}let ot="";async function Rt(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 Bt(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,n,d;return Y(l,Me,i=>t(2,r=i)),Y(l,je,i=>t(0,a=i)),Y(l,be,i=>t(1,o=i)),Y(l,Ie,i=>t(3,n=i)),Y(l,Ae,i=>t(4,d=i)),l.$$.update=()=>{l.$$.dirty&26&&(async()=>{if(o){const i=await Bt(d.toDataURL(),n);K(je,a=i,a),K(be,o=!1,o)}})(),l.$$.dirty&5&&(async()=>r&&(await Rt(a),K(Me,r=!1,r)))()},[a,o,r,n,d]}class At extends se{constructor(e){super(),ne(this,e,jt,Ot,ie,{})}}function Dt(l){let e,t,r,a,o,n,d,i,k,E,b,P,g,v,x,u,f,h,c,m,w,y,M,_,S,N,B,q,$,J,te,X;return P=new gt({}),x=new zt({}),f=new At({}),B=new ft({}),$=new wt({}),{c(){e=C("div"),t=C("article"),r=C("h1"),a=V("Drawing to Map"),o=A(),n=C("p"),d=V("This space is for the ControlNet model "),i=C("a"),k=C("span"),E=V("Drawing2Map"),b=A(),ue(P.$$.fragment),g=A(),v=C("div"),ue(x.$$.fragment),u=A(),ue(f.$$.fragment),h=A(),c=C("button"),m=V("Generate Map"),y=A(),M=C("button"),_=V("Save Result"),N=A(),ue(B.$$.fragment),q=A(),ue($.$$.fragment),this.h()},l(O){e=T(O,"DIV",{class:!0});var L=z(e);t=T(L,"ARTICLE",{class:!0});var re=z(t);r=T(re,"H1",{});var ee=z(r);a=F(ee,"Drawing to Map"),ee.forEach(I),o=D(re),n=T(re,"P",{});var le=z(n);d=F(le,"This space is for the ControlNet model "),i=T(le,"A",{href:!0,target:!0});var ce=z(i);k=T(ce,"SPAN",{});var ye=z(k);E=F(ye,"Drawing2Map"),ye.forEach(I),ce.forEach(I),le.forEach(I),re.forEach(I),b=D(L),pe(P.$$.fragment,L),g=D(L),v=T(L,"DIV",{class:!0});var W=z(v);pe(x.$$.fragment,W),u=D(W),pe(f.$$.fragment,W),W.forEach(I),h=D(L),c=T(L,"BUTTON",{class:!0});var G=z(c);m=F(G,"Generate Map"),G.forEach(I),y=D(L),M=T(L,"BUTTON",{class:!0});var j=z(M);_=F(j,"Save Result"),j.forEach(I),N=D(L),pe(B.$$.fragment,L),q=D(L),pe($.$$.fragment,L),L.forEach(I),this.h()},h(){s(i,"href","https://github.com/RubenGres/Drawing2Map"),s(i,"target","_blank"),s(t,"class","prose"),s(v,"class","drawings py-3 -mx-3 svelte-1sy339h"),c.disabled=w=l[0]===!0,s(c,"class","green svelte-1sy339h"),M.disabled=S=l[1]===!0||!l[2],s(M,"class","svelte-1sy339h"),s(e,"class","max-w-screen-md mx-auto px-3 py-5 relative z-0")},m(O,L){Z(O,e,L),p(e,t),p(t,r),p(r,a),p(t,o),p(t,n),p(n,d),p(n,i),p(i,k),p(k,E),p(e,b),de(P,e,null),p(e,g),p(e,v),de(x,v,null),p(v,u),de(f,v,null),p(e,h),p(e,c),p(c,m),p(e,y),p(e,M),p(M,_),p(e,N),de(B,e,null),p(e,q),de($,e,null),J=!0,te||(X=[U(c,"click",Se(l[3])),U(M,"click",Se(l[4]))],te=!0)},p(O,[L]){(!J||L&1&&w!==(w=O[0]===!0))&&(c.disabled=w),(!J||L&6&&S!==(S=O[1]===!0||!O[2]))&&(M.disabled=S)},i(O){J||(he(P.$$.fragment,O),he(x.$$.fragment,O),he(f.$$.fragment,O),he(B.$$.fragment,O),he($.$$.fragment,O),J=!0)},o(O){fe(P.$$.fragment,O),fe(x.$$.fragment,O),fe(f.$$.fragment,O),fe(B.$$.fragment,O),fe($.$$.fragment,O),J=!1},d(O){O&&I(e),ve(P),ve(x),ve(f),ve(B),ve($),te=!1,Ue(X)}}}function Nt(l,e,t){let r,a,o;return Y(l,be,i=>t(0,r=i)),Y(l,Me,i=>t(1,a=i)),Y(l,je,i=>t(2,o=i)),[r,a,o,()=>K(be,r=!0,r),()=>K(Me,a=!0,a)]}class Vt extends se{constructor(e){super(),ne(this,e,Nt,Dt,ie,{})}}export{Vt as default};
frontend/build/_app/immutable/pages/index.svelte-e78f0615.js DELETED
@@ -1 +0,0 @@
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/default.jpg","/samples/example0.png","/samples/example1.png","/samples/example2.png","/samples/example3.png","/samples/example4.png","/samples/example5.png","/samples/example6.jpg"],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]&&lt();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};
 
 
static/_app/immutable/start-b4d3a4a1.js → frontend/build/_app/immutable/start-1d6beeeb.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-e78f0615.js"),["pages/index.svelte-e78f0615.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="1685758204608";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-1f940fb6.js"),["pages/index.svelte-1f940fb6.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="1685809076710";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/build/_app/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"1685758204608"}
 
1
+ {"version":"1685809076710"}
frontend/build/index.html CHANGED
@@ -8,17 +8,20 @@
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-b4d3a4a1.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-e78f0615.js">
16
  </head>
17
  <body class="">
18
 
19
 
20
 
21
- <div class="max-w-screen-md mx-auto px-3 py-5 relative z-0"><article class="prose"><h1>Drawing to Map</h1></article>
 
 
 
22
  <form><h4 class="font-bold mt-6 mb-2 leading-6 my-3">Brush Type</h4>
23
  <div class="colors svelte-1oy4poo" name="colors"><div class="snap-always snap-start"><input name="color" type="radio" id="color-0" value="0" class="svelte-1oy4poo">
24
  <label for="color-0" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(219,14,154)"></rect></svg>
@@ -117,7 +120,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="276955136">
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 +130,10 @@
127
  </div>
128
 
129
 
130
- <script type="module" data-sveltekit-hydrate="xt24ky">
131
- import { start } from "/static/_app/immutable/start-b4d3a4a1.js";
132
  start({
133
- target: document.querySelector('[data-sveltekit-hydrate="xt24ky"]').parentNode,
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-1d6beeeb.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-1f940fb6.js">
16
  </head>
17
  <body class="">
18
 
19
 
20
 
21
+ <div class="max-w-screen-md mx-auto px-3 py-5 relative z-0"><article class="prose"><h1>Drawing to Map</h1>
22
+ <p>This space is for the ControlNet model <a href="https://github.com/RubenGres/Drawing2Map" target="_blank"><span>Drawing2Map</span></a></p></article>
23
+
24
+
25
  <form><h4 class="font-bold mt-6 mb-2 leading-6 my-3">Brush Type</h4>
26
  <div class="colors svelte-1oy4poo" name="colors"><div class="snap-always snap-start"><input name="color" type="radio" id="color-0" value="0" class="svelte-1oy4poo">
27
  <label for="color-0" class="svelte-1oy4poo"><svg width="20" height="20" viewBox="0 0 20 20" class="svelte-1oy4poo"><rect x="0" y="0" width="20" height="20" fill="rgb(219,14,154)"></rect></svg>
 
120
  <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>
121
 
122
  <h4 class="font-bold mt-6 mb-2 my-6 leading-6">Random Seed</h4>
123
+ <input type="Number" name="seed" placeholder="Integer Seed" class="svelte-7to72y" value="398460928">
124
  <button class="svelte-7to72y">Random
125
  </button>
126
  <h4 class="font-bold mt-6 mb-2 my-6 leading-6">Sample Steps</h4>
 
130
  </div>
131
 
132
 
133
+ <script type="module" data-sveltekit-hydrate="1meyvr0">
134
+ import { start } from "/static/_app/immutable/start-1d6beeeb.js";
135
  start({
136
+ target: document.querySelector('[data-sveltekit-hydrate="1meyvr0"]').parentNode,
137
  paths: {"base":"/static","assets":"/static"},
138
  session: {},
139
  route: true,
frontend/src/lib/ParamsSelector.svelte CHANGED
@@ -3,7 +3,6 @@
3
  import { selectedParams, generateMap } from '$lib/store';
4
  import type { FormElements } from '../types';
5
  import { randomSeed } from '$lib/utils';
6
-
7
  function submit() {
8
  const elements: FormElements = form.elements as FormElements;
9
  $selectedParams = {
@@ -14,12 +13,6 @@
14
  };
15
  }
16
 
17
- function updateModifier(event) {
18
- const selectedIndex = event.currentTarget.selectedIndex - 1;
19
- modifier = PRESETS[selectedIndex][0];
20
- submit();
21
- }
22
-
23
  let form: HTMLFormElement;
24
  let seed: bigint = $selectedParams.seed;
25
  let sampleSteps: number = $selectedParams.steps;
@@ -48,7 +41,12 @@
48
  <select
49
  name="presets"
50
  disabled={$generateMap === true}
51
- on:change={updateModifier}
 
 
 
 
 
52
  <option disabled selected>preset</option>
53
  {#each PRESETS as preset}
54
  <option value={preset[0]}>{preset[1]}</option>`
@@ -78,7 +76,7 @@
78
  bind:value={sampleSteps}
79
  type="range"
80
  name="steps"
81
- min="5"
82
  max="30"
83
  step="1"
84
  disabled={$generateMap === true}
 
3
  import { selectedParams, generateMap } from '$lib/store';
4
  import type { FormElements } from '../types';
5
  import { randomSeed } from '$lib/utils';
 
6
  function submit() {
7
  const elements: FormElements = form.elements as FormElements;
8
  $selectedParams = {
 
13
  };
14
  }
15
 
 
 
 
 
 
 
16
  let form: HTMLFormElement;
17
  let seed: bigint = $selectedParams.seed;
18
  let sampleSteps: number = $selectedParams.steps;
 
41
  <select
42
  name="presets"
43
  disabled={$generateMap === true}
44
+ on:change={(event) => {
45
+ //modifier = event.currentTarget.value;
46
+ const selectedIndex = event.currentTarget.selectedIndex - 1;
47
+ modifier = PRESETS[selectedIndex][0];
48
+ $selectedParams.modifier = PRESETS[selectedIndex][0];
49
+ }}>
50
  <option disabled selected>preset</option>
51
  {#each PRESETS as preset}
52
  <option value={preset[0]}>{preset[1]}</option>`
 
76
  bind:value={sampleSteps}
77
  type="range"
78
  name="steps"
79
+ min="10"
80
  max="30"
81
  step="1"
82
  disabled={$generateMap === true}
frontend/src/lib/store.ts CHANGED
@@ -10,9 +10,9 @@ export const selectedImage = writable<HTMLImageElement>();
10
  export const selectedBrush = writable<Brush>();
11
  export const selectedParams = writable<Params>({
12
  prompt: "Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",
13
- modifier: "",
14
  seed: randomSeed(),
15
- steps: 10
16
  });
17
 
18
  export const generateMap = writable<boolean>(false);
 
10
  export const selectedBrush = writable<Brush>();
11
  export const selectedParams = writable<Params>({
12
  prompt: "Aerial view of rue des Lilas, Toulouse, Haute-Garonne, France",
13
+ modifier: PRESETS[0][0],
14
  seed: randomSeed(),
15
+ steps: 20
16
  });
17
 
18
  export const generateMap = writable<boolean>(false);
frontend/src/routes/index.svelte CHANGED
@@ -12,12 +12,11 @@
12
  <div class="max-w-screen-md mx-auto px-3 py-5 relative z-0">
13
  <article class="prose">
14
  <h1>Drawing to Map</h1>
 
15
  </article>
16
 
17
- <p>This is the official huggingface space for <a href="https://github.com/RubenGres/Drawing2Map">Drawing2Map</a></p>
18
 
19
  <BrushSelector />
20
-
21
  <div class="drawings py-3 -mx-3">
22
  <DrawingCanvas />
23
  <ResultCanvas />
 
12
  <div class="max-w-screen-md mx-auto px-3 py-5 relative z-0">
13
  <article class="prose">
14
  <h1>Drawing to Map</h1>
15
+ <p> This space is for the ControlNet model <a href="https://github.com/RubenGres/Drawing2Map" target="_blank"><span>Drawing2Map</span></a></p>
16
  </article>
17
 
 
18
 
19
  <BrushSelector />
 
20
  <div class="drawings py-3 -mx-3">
21
  <DrawingCanvas />
22
  <ResultCanvas />
launch_full_interface.ipynb ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "attachments": {},
5
+ "cell_type": "markdown",
6
+ "metadata": {
7
+ "colab_type": "text",
8
+ "id": "view-in-github"
9
+ },
10
+ "source": [
11
+ "<a href=\"https://colab.research.google.com/github/RubenGres/Drawing2Map-hfspace/blob/main/Launch_interface.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "code",
16
+ "execution_count": null,
17
+ "metadata": {
18
+ "id": "hsn_87UXrUn5"
19
+ },
20
+ "outputs": [],
21
+ "source": [
22
+ "!git clone https://github.com/RubenGres/Drawing2Map-hfspace.git\n",
23
+ "%cd Drawing2Map-hfspace/ui"
24
+ ]
25
+ },
26
+ {
27
+ "cell_type": "code",
28
+ "execution_count": null,
29
+ "metadata": {
30
+ "id": "uVUasUqwr_Br"
31
+ },
32
+ "outputs": [],
33
+ "source": [
34
+ "!pip install -r requirements.txt\n",
35
+ "!npm install -g localtunnel"
36
+ ]
37
+ },
38
+ {
39
+ "cell_type": "code",
40
+ "execution_count": null,
41
+ "metadata": {
42
+ "id": "9OIMlcM9OQWk"
43
+ },
44
+ "outputs": [],
45
+ "source": [
46
+ "!export URL_GRADIO='http://localhost:7860'"
47
+ ]
48
+ },
49
+ {
50
+ "cell_type": "code",
51
+ "execution_count": null,
52
+ "metadata": {
53
+ "id": "yhLLdro5s-rf"
54
+ },
55
+ "outputs": [],
56
+ "source": [
57
+ "!echo \" \"\n",
58
+ "!echo \"Click the next link and when prompted enter:\"\n",
59
+ "!curl ipv4.icanhazip.com\n",
60
+ "!echo \" \"\n",
61
+ "!lt --port 8000 & make run-prod"
62
+ ]
63
+ },
64
+ {
65
+ "cell_type": "code",
66
+ "execution_count": null,
67
+ "metadata": {
68
+ "colab": {
69
+ "base_uri": "https://localhost:8080/"
70
+ },
71
+ "id": "G2USPEr_4YOm",
72
+ "outputId": "36de5b2b-0cf7-410b-a225-2869138e5523"
73
+ },
74
+ "outputs": [
75
+ {
76
+ "name": "stdout",
77
+ "output_type": "stream",
78
+ "text": [
79
+ "killall python\n",
80
+ "python: no process found\n",
81
+ "make: *** [Makefile:20: stop-server] Error 1\n"
82
+ ]
83
+ }
84
+ ],
85
+ "source": [
86
+ "!make stop-server"
87
+ ]
88
+ }
89
+ ],
90
+ "metadata": {
91
+ "accelerator": "GPU",
92
+ "colab": {
93
+ "include_colab_link": true,
94
+ "provenance": []
95
+ },
96
+ "gpuClass": "standard",
97
+ "kernelspec": {
98
+ "display_name": "Python 3",
99
+ "name": "python3"
100
+ },
101
+ "language_info": {
102
+ "name": "python"
103
+ }
104
+ },
105
+ "nbformat": 4,
106
+ "nbformat_minor": 0
107
+ }