Saving current progress
9
Electron-App/.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
4
Electron-App/.eslintignore
Normal file
@@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
out
|
||||
.gitignore
|
||||
7
Electron-App/.eslintrc.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'@electron-toolkit/eslint-config-ts/recommended',
|
||||
'@electron-toolkit/eslint-config-prettier'
|
||||
]
|
||||
}
|
||||
4
Electron-App/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
out
|
||||
*.log*
|
||||
1
Electron-App/.npmrc
Normal file
@@ -0,0 +1 @@
|
||||
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
|
||||
6
Electron-App/.prettierignore
Normal file
@@ -0,0 +1,6 @@
|
||||
out
|
||||
dist
|
||||
pnpm-lock.yaml
|
||||
LICENSE.md
|
||||
tsconfig.json
|
||||
tsconfig.*.json
|
||||
4
Electron-App/.prettierrc.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
singleQuote: true
|
||||
semi: false
|
||||
printWidth: 100
|
||||
trailingComma: none
|
||||
3
Electron-App/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["dbaeumer.vscode-eslint"]
|
||||
}
|
||||
39
Electron-App/.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug Main Process",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
|
||||
},
|
||||
"runtimeArgs": ["--sourcemap"],
|
||||
"env": {
|
||||
"REMOTE_DEBUGGING_PORT": "9222"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug Renderer Process",
|
||||
"port": 9222,
|
||||
"request": "attach",
|
||||
"type": "chrome",
|
||||
"webRoot": "${workspaceFolder}/src/renderer",
|
||||
"timeout": 60000,
|
||||
"presentation": {
|
||||
"hidden": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Debug All",
|
||||
"configurations": ["Debug Main Process", "Debug Renderer Process"],
|
||||
"presentation": {
|
||||
"order": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
11
Electron-App/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
||||
34
Electron-App/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# electron-app
|
||||
|
||||
A minimal Electron application with TypeScript
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
||||
|
||||
## Project Setup
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
$ npm install
|
||||
```
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
# For windows
|
||||
$ npm run build:win
|
||||
|
||||
# For macOS
|
||||
$ npm run build:mac
|
||||
|
||||
# For Linux
|
||||
$ npm run build:linux
|
||||
```
|
||||
12
Electron-App/build/entitlements.mac.plist
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Electron-App/build/icon.icns
Normal file
BIN
Electron-App/build/icon.ico
Normal file
|
After Width: | Height: | Size: 121 KiB |
BIN
Electron-App/build/icon.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
3
Electron-App/dev-app-update.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
provider: generic
|
||||
url: https://example.com/auto-updates
|
||||
updaterCacheDirName: electron-app-updater
|
||||
43
Electron-App/electron-builder.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
appId: com.electron.app
|
||||
productName: electron-app
|
||||
directories:
|
||||
buildResources: build
|
||||
files:
|
||||
- '!**/.vscode/*'
|
||||
- '!src/*'
|
||||
- '!electron.vite.config.{js,ts,mjs,cjs}'
|
||||
- '!{.eslintignore,.eslintrc.js,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
||||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
||||
asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: electron-app
|
||||
nsis:
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
createDesktopShortcut: always
|
||||
mac:
|
||||
entitlementsInherit: build/entitlements.mac.plist
|
||||
extendInfo:
|
||||
- NSCameraUsageDescription: Application requests access to the device's camera.
|
||||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
||||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
||||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
||||
notarize: false
|
||||
dmg:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
linux:
|
||||
target:
|
||||
- AppImage
|
||||
- snap
|
||||
- deb
|
||||
maintainer: electronjs.org
|
||||
category: Utility
|
||||
appImage:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
npmRebuild: false
|
||||
publish:
|
||||
provider: generic
|
||||
url: https://example.com/auto-updates
|
||||
11
Electron-App/electron.vite.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
renderer: {}
|
||||
})
|
||||
6755
Electron-App/package-lock.json
generated
Normal file
42
Electron-App/package.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "electron-app",
|
||||
"version": "1.0.0",
|
||||
"description": "A minimal Electron application with TypeScript",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "example.com",
|
||||
"homepage": "https://www.electronjs.org",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
||||
"start": "electron-vite preview",
|
||||
"dev": "electron-vite dev --watch",
|
||||
"build": "npm run typecheck && electron-vite build",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"build:win": "npm run build && electron-builder --win --config",
|
||||
"build:mac": "npm run build && electron-builder --mac --config",
|
||||
"build:linux": "npm run build && electron-builder --linux --config"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/preload": "^2.0.0",
|
||||
"@electron-toolkit/utils": "^2.0.1",
|
||||
"electron-updater": "^6.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/eslint-config-prettier": "^1.0.1",
|
||||
"@electron-toolkit/eslint-config-ts": "^1.0.0",
|
||||
"@electron-toolkit/tsconfig": "^1.0.1",
|
||||
"@types/node": "^18.18.9",
|
||||
"electron": "^25.9.5",
|
||||
"electron-builder": "^24.6.4",
|
||||
"electron-vite": "^1.0.29",
|
||||
"eslint": "^8.53.0",
|
||||
"express": "^4.18.2",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^4.5.0"
|
||||
}
|
||||
}
|
||||
BIN
Electron-App/resources/icon.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
87
Electron-App/src/main/index.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import { app, shell, BrowserWindow } from 'electron'
|
||||
import { join } from 'path'
|
||||
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||
import { handler } from '../../../Built-App/src/handler.js'
|
||||
import icon from '../../resources/icon.png?asset'
|
||||
import express from 'express'
|
||||
|
||||
const port = 3000
|
||||
const origin = `http://localhost:${port}`
|
||||
|
||||
const server = express()
|
||||
|
||||
// add a route that lives separately from the SvelteKit app
|
||||
server.get('/healthcheck', (req, res) => {
|
||||
res.end('ok')
|
||||
})
|
||||
|
||||
// let SvelteKit handle everything else, including serving prerendered pages and static assets
|
||||
server.use(handler)
|
||||
|
||||
server.listen(3000, () => {
|
||||
console.log(`Server listening on ${origin}`)
|
||||
})
|
||||
|
||||
function createWindow(): void {
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
width: 900,
|
||||
height: 670,
|
||||
show: false,
|
||||
autoHideMenuBar: true,
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
webPreferences: {
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
sandbox: false
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.on('ready-to-show', () => {
|
||||
mainWindow.show()
|
||||
})
|
||||
|
||||
mainWindow.webContents.setWindowOpenHandler((details) => {
|
||||
shell.openExternal(details.url)
|
||||
return { action: 'deny' }
|
||||
})
|
||||
|
||||
// HMR for renderer base on electron-vite cli.
|
||||
// Load the remote URL for development or the local html file for production.
|
||||
|
||||
mainWindow.loadURL(origin)
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
// Set app user model id for windows
|
||||
electronApp.setAppUserModelId('com.electron')
|
||||
|
||||
// Default open or close DevTools by F12 in development
|
||||
// and ignore CommandOrControl + R in production.
|
||||
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils
|
||||
app.on('browser-window-created', (_, window) => {
|
||||
optimizer.watchWindowShortcuts(window)
|
||||
})
|
||||
|
||||
createWindow()
|
||||
|
||||
app.on('activate', function () {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
})
|
||||
|
||||
// Quit when all windows are closed, except on macOS. There, it's common
|
||||
// for applications and their menu bar to stay active until the user quits
|
||||
// explicitly with Cmd + Q.
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
// In this file you can include the rest of your app"s specific main process
|
||||
// code. You can also put them in separate files and require them here.
|
||||
8
Electron-App/src/preload/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ElectronAPI } from '@electron-toolkit/preload'
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
electron: ElectronAPI
|
||||
api: unknown
|
||||
}
|
||||
}
|
||||
22
Electron-App/src/preload/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { contextBridge } from 'electron'
|
||||
import { electronAPI } from '@electron-toolkit/preload'
|
||||
|
||||
// Custom APIs for renderer
|
||||
const api = {}
|
||||
|
||||
// Use `contextBridge` APIs to expose Electron APIs to
|
||||
// renderer only if context isolation is enabled, otherwise
|
||||
// just add to the DOM global.
|
||||
if (process.contextIsolated) {
|
||||
try {
|
||||
contextBridge.exposeInMainWorld('electron', electronAPI)
|
||||
contextBridge.exposeInMainWorld('api', api)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
} else {
|
||||
// @ts-ignore (define in dts)
|
||||
window.electron = electronAPI
|
||||
// @ts-ignore (define in dts)
|
||||
window.api = api
|
||||
}
|
||||
0
Electron-App/src/renderer/index.html
Normal file
4
Electron-App/tsconfig.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }]
|
||||
}
|
||||
8
Electron-App/tsconfig.node.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
|
||||
"include": ["electron.vite.config.*", "src/main/*", "src/preload/*"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"types": ["electron-vite/node"]
|
||||
}
|
||||
}
|
||||
7
Electron-App/tsconfig.web.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "@electron-toolkit/tsconfig/tsconfig.web.json",
|
||||
"include": ["src/renderer/**/*.ts", "src/preload/*.d.ts"],
|
||||
"compilerOptions": {
|
||||
"composite": true
|
||||
}
|
||||
}
|
||||
8
Svelte-Build/package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "built-app",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"start": "node ./src"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.counter.svelte-y96mxt.svelte-y96mxt{display:flex;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);margin:1rem 0}.counter.svelte-y96mxt button.svelte-y96mxt{width:2em;padding:0;display:flex;align-items:center;justify-content:center;border:0;background-color:transparent;touch-action:manipulation;font-size:2rem}.counter.svelte-y96mxt button.svelte-y96mxt:hover{background-color:var(--color-bg-1)}svg.svelte-y96mxt.svelte-y96mxt{width:25%;height:25%}path.svelte-y96mxt.svelte-y96mxt{vector-effect:non-scaling-stroke;stroke-width:2px;stroke:#444}.counter-viewport.svelte-y96mxt.svelte-y96mxt{width:8em;height:4em;overflow:hidden;text-align:center;position:relative}.counter-viewport.svelte-y96mxt strong.svelte-y96mxt{position:absolute;display:flex;width:100%;height:100%;font-weight:400;color:var(--color-theme-1);font-size:4rem;align-items:center;justify-content:center}.counter-digits.svelte-y96mxt.svelte-y96mxt{position:absolute;width:100%;height:100%}.hidden.svelte-y96mxt.svelte-y96mxt{top:-100%;-webkit-user-select:none;user-select:none}section.svelte-19xx0bt.svelte-19xx0bt{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:.6}h1.svelte-19xx0bt.svelte-19xx0bt{width:100%}.welcome.svelte-19xx0bt.svelte-19xx0bt{display:block;position:relative;width:100%;height:0;padding:0 0 calc(100% * 495 / 2048) 0}.welcome.svelte-19xx0bt img.svelte-19xx0bt{position:absolute;width:100%;height:100%;top:0;display:block}
|
||||
@@ -0,0 +1 @@
|
||||
form.svelte-1pg2j5l.svelte-1pg2j5l{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;flex:1}.how-to-play.svelte-1pg2j5l.svelte-1pg2j5l{color:var(--color-text)}.how-to-play.svelte-1pg2j5l.svelte-1pg2j5l:before{content:"i";display:inline-block;font-size:.8em;font-weight:900;width:1em;height:1em;padding:.2em;line-height:1;border:1.5px solid var(--color-text);border-radius:50%;text-align:center;margin:0 .5em 0 0;position:relative;top:-.05em}.grid.svelte-1pg2j5l.svelte-1pg2j5l{--width:min(100vw, 40vh, 380px);max-width:var(--width);align-self:center;justify-self:center;width:100%;height:100%;display:flex;flex-direction:column;justify-content:flex-start}.grid.svelte-1pg2j5l .row.svelte-1pg2j5l{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:.2rem;margin:0 0 .2rem}@media (prefers-reduced-motion: no-preference){.grid.bad-guess.svelte-1pg2j5l .row.current.svelte-1pg2j5l{animation:svelte-1pg2j5l-wiggle .5s}}.grid.playing.svelte-1pg2j5l .row.current.svelte-1pg2j5l{filter:drop-shadow(3px 3px 10px var(--color-bg-0))}.letter.svelte-1pg2j5l.svelte-1pg2j5l{aspect-ratio:1;width:100%;display:flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;text-transform:lowercase;border:none;font-size:calc(.08 * var(--width));border-radius:2px;background:white;margin:0;color:#000000b3}.letter.missing.svelte-1pg2j5l.svelte-1pg2j5l{background:rgba(255,255,255,.5);color:#00000080}.letter.exact.svelte-1pg2j5l.svelte-1pg2j5l{background:var(--color-theme-2);color:#fff}.letter.close.svelte-1pg2j5l.svelte-1pg2j5l{border:2px solid var(--color-theme-2)}.selected.svelte-1pg2j5l.svelte-1pg2j5l{outline:2px solid var(--color-theme-1)}.controls.svelte-1pg2j5l.svelte-1pg2j5l{text-align:center;justify-content:center;height:min(18vh,10rem)}.keyboard.svelte-1pg2j5l.svelte-1pg2j5l{--gap:.2rem;position:relative;display:flex;flex-direction:column;gap:var(--gap);height:100%}.keyboard.svelte-1pg2j5l .row.svelte-1pg2j5l{display:flex;justify-content:center;gap:.2rem;flex:1}.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l,.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l:disabled{--size:min(8vw, 4vh, 40px);background-color:#fff;color:#000;width:var(--size);border:none;border-radius:2px;font-size:calc(var(--size) * .5);margin:0}.keyboard.svelte-1pg2j5l button.exact.svelte-1pg2j5l{background:var(--color-theme-2);color:#fff}.keyboard.svelte-1pg2j5l button.missing.svelte-1pg2j5l{opacity:.5}.keyboard.svelte-1pg2j5l button.close.svelte-1pg2j5l{border:2px solid var(--color-theme-2)}.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l:focus{background:var(--color-theme-1);color:#fff;outline:none}.keyboard.svelte-1pg2j5l button[data-key=enter].svelte-1pg2j5l,.keyboard.svelte-1pg2j5l button[data-key=backspace].svelte-1pg2j5l{position:absolute;bottom:0;width:calc(1.5 * var(--size));height:calc(1 / 3 * (100% - 2 * var(--gap)));text-transform:uppercase;font-size:calc(.3 * var(--size));padding-top:calc(.15 * var(--size))}.keyboard.svelte-1pg2j5l button[data-key=enter].svelte-1pg2j5l{right:calc(50% + 3.5 * var(--size) + .8rem)}.keyboard.svelte-1pg2j5l button[data-key=backspace].svelte-1pg2j5l{left:calc(50% + 3.5 * var(--size) + .8rem)}.keyboard.svelte-1pg2j5l button[data-key=enter].svelte-1pg2j5l:disabled{opacity:.5}.restart.svelte-1pg2j5l.svelte-1pg2j5l{width:100%;padding:1rem;background:rgba(255,255,255,.5);border-radius:2px;border:none}.restart.svelte-1pg2j5l.svelte-1pg2j5l:focus,.restart.svelte-1pg2j5l.svelte-1pg2j5l:hover{background:var(--color-theme-1);color:#fff;outline:none}@keyframes svelte-1pg2j5l-wiggle{0%{transform:translate(0)}10%{transform:translate(-2px)}30%{transform:translate(4px)}50%{transform:translate(-6px)}70%{transform:translate(+4px)}90%{transform:translate(-2px)}to{transform:translate(0)}}
|
||||
@@ -0,0 +1 @@
|
||||
span.svelte-1x5nq1n.svelte-1x5nq1n{display:inline-flex;justify-content:center;align-items:center;font-size:.8em;width:2.4em;height:2.4em;background-color:#fff;box-sizing:border-box;border-radius:2px;border-width:2px;color:#000000b3}.missing.svelte-1x5nq1n.svelte-1x5nq1n{background:rgba(255,255,255,.5);color:#00000080}.close.svelte-1x5nq1n.svelte-1x5nq1n{border-style:solid;border-color:var(--color-theme-2)}.exact.svelte-1x5nq1n.svelte-1x5nq1n{background:var(--color-theme-2);color:#fff}.example.svelte-1x5nq1n.svelte-1x5nq1n{display:flex;justify-content:flex-start;margin:1rem 0;gap:.2rem}.example.svelte-1x5nq1n span.svelte-1x5nq1n{font-size:1.4rem}p.svelte-1x5nq1n span.svelte-1x5nq1n{position:relative;border-width:1px;border-radius:1px;font-size:.4em;transform:scale(2) translateY(-10%);margin:0 1em}
|
||||
@@ -0,0 +1 @@
|
||||
.counter.svelte-y96mxt.svelte-y96mxt{display:flex;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);margin:1rem 0}.counter.svelte-y96mxt button.svelte-y96mxt{width:2em;padding:0;display:flex;align-items:center;justify-content:center;border:0;background-color:transparent;touch-action:manipulation;font-size:2rem}.counter.svelte-y96mxt button.svelte-y96mxt:hover{background-color:var(--color-bg-1)}svg.svelte-y96mxt.svelte-y96mxt{width:25%;height:25%}path.svelte-y96mxt.svelte-y96mxt{vector-effect:non-scaling-stroke;stroke-width:2px;stroke:#444}.counter-viewport.svelte-y96mxt.svelte-y96mxt{width:8em;height:4em;overflow:hidden;text-align:center;position:relative}.counter-viewport.svelte-y96mxt strong.svelte-y96mxt{position:absolute;display:flex;width:100%;height:100%;font-weight:400;color:var(--color-theme-1);font-size:4rem;align-items:center;justify-content:center}.counter-digits.svelte-y96mxt.svelte-y96mxt{position:absolute;width:100%;height:100%}.hidden.svelte-y96mxt.svelte-y96mxt{top:-100%;user-select:none}section.svelte-19xx0bt.svelte-19xx0bt{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:.6}h1.svelte-19xx0bt.svelte-19xx0bt{width:100%}.welcome.svelte-19xx0bt.svelte-19xx0bt{display:block;position:relative;width:100%;height:0;padding:0 0 calc(100% * 495 / 2048) 0}.welcome.svelte-19xx0bt img.svelte-19xx0bt{position:absolute;width:100%;height:100%;top:0;display:block}
|
||||
@@ -0,0 +1 @@
|
||||
span.svelte-1x5nq1n.svelte-1x5nq1n{display:inline-flex;justify-content:center;align-items:center;font-size:.8em;width:2.4em;height:2.4em;background-color:#fff;box-sizing:border-box;border-radius:2px;border-width:2px;color:#000000b3}.missing.svelte-1x5nq1n.svelte-1x5nq1n{background:rgba(255,255,255,.5);color:#00000080}.close.svelte-1x5nq1n.svelte-1x5nq1n{border-style:solid;border-color:var(--color-theme-2)}.exact.svelte-1x5nq1n.svelte-1x5nq1n{background:var(--color-theme-2);color:#fff}.example.svelte-1x5nq1n.svelte-1x5nq1n{display:flex;justify-content:flex-start;margin:1rem 0;gap:.2rem}.example.svelte-1x5nq1n span.svelte-1x5nq1n{font-size:1.4rem}p.svelte-1x5nq1n span.svelte-1x5nq1n{position:relative;border-width:1px;border-radius:1px;font-size:.4em;transform:scale(2) translateY(-10%);margin:0 1em}
|
||||
@@ -0,0 +1 @@
|
||||
form.svelte-1pg2j5l.svelte-1pg2j5l{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;flex:1}.how-to-play.svelte-1pg2j5l.svelte-1pg2j5l{color:var(--color-text)}.how-to-play.svelte-1pg2j5l.svelte-1pg2j5l:before{content:"i";display:inline-block;font-size:.8em;font-weight:900;width:1em;height:1em;padding:.2em;line-height:1;border:1.5px solid var(--color-text);border-radius:50%;text-align:center;margin:0 .5em 0 0;position:relative;top:-.05em}.grid.svelte-1pg2j5l.svelte-1pg2j5l{--width:min(100vw, 40vh, 380px);max-width:var(--width);align-self:center;justify-self:center;width:100%;height:100%;display:flex;flex-direction:column;justify-content:flex-start}.grid.svelte-1pg2j5l .row.svelte-1pg2j5l{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:.2rem;margin:0 0 .2rem}@media (prefers-reduced-motion: no-preference){.grid.bad-guess.svelte-1pg2j5l .row.current.svelte-1pg2j5l{animation:svelte-1pg2j5l-wiggle .5s}}.grid.playing.svelte-1pg2j5l .row.current.svelte-1pg2j5l{filter:drop-shadow(3px 3px 10px var(--color-bg-0))}.letter.svelte-1pg2j5l.svelte-1pg2j5l{aspect-ratio:1;width:100%;display:flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;text-transform:lowercase;border:none;font-size:calc(.08 * var(--width));border-radius:2px;background:white;margin:0;color:#000000b3}.letter.missing.svelte-1pg2j5l.svelte-1pg2j5l{background:rgba(255,255,255,.5);color:#00000080}.letter.exact.svelte-1pg2j5l.svelte-1pg2j5l{background:var(--color-theme-2);color:#fff}.letter.close.svelte-1pg2j5l.svelte-1pg2j5l{border:2px solid var(--color-theme-2)}.selected.svelte-1pg2j5l.svelte-1pg2j5l{outline:2px solid var(--color-theme-1)}.controls.svelte-1pg2j5l.svelte-1pg2j5l{text-align:center;justify-content:center;height:min(18vh,10rem)}.keyboard.svelte-1pg2j5l.svelte-1pg2j5l{--gap:.2rem;position:relative;display:flex;flex-direction:column;gap:var(--gap);height:100%}.keyboard.svelte-1pg2j5l .row.svelte-1pg2j5l{display:flex;justify-content:center;gap:.2rem;flex:1}.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l,.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l:disabled{--size:min(8vw, 4vh, 40px);background-color:#fff;color:#000;width:var(--size);border:none;border-radius:2px;font-size:calc(var(--size) * .5);margin:0}.keyboard.svelte-1pg2j5l button.exact.svelte-1pg2j5l{background:var(--color-theme-2);color:#fff}.keyboard.svelte-1pg2j5l button.missing.svelte-1pg2j5l{opacity:.5}.keyboard.svelte-1pg2j5l button.close.svelte-1pg2j5l{border:2px solid var(--color-theme-2)}.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l:focus{background:var(--color-theme-1);color:#fff;outline:none}.keyboard.svelte-1pg2j5l button[data-key=enter].svelte-1pg2j5l,.keyboard.svelte-1pg2j5l button[data-key=backspace].svelte-1pg2j5l{position:absolute;bottom:0;width:calc(1.5 * var(--size));height:calc(1 / 3 * (100% - 2 * var(--gap)));text-transform:uppercase;font-size:calc(.3 * var(--size));padding-top:calc(.15 * var(--size))}.keyboard.svelte-1pg2j5l button[data-key=enter].svelte-1pg2j5l{right:calc(50% + 3.5 * var(--size) + .8rem)}.keyboard.svelte-1pg2j5l button[data-key=backspace].svelte-1pg2j5l{left:calc(50% + 3.5 * var(--size) + .8rem)}.keyboard.svelte-1pg2j5l button[data-key=enter].svelte-1pg2j5l:disabled{opacity:.5}.restart.svelte-1pg2j5l.svelte-1pg2j5l{width:100%;padding:1rem;background:rgba(255,255,255,.5);border-radius:2px;border:none}.restart.svelte-1pg2j5l.svelte-1pg2j5l:focus,.restart.svelte-1pg2j5l.svelte-1pg2j5l:hover{background:var(--color-theme-1);color:#fff;outline:none}@keyframes svelte-1pg2j5l-wiggle{0%{transform:translate(0)}10%{transform:translate(-2px)}30%{transform:translate(4px)}50%{transform:translate(-6px)}70%{transform:translate(+4px)}90%{transform:translate(-2px)}to{transform:translate(0)}}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 30 30">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5229 6.47715 22 12 22C17.5229 22 22 17.5229 22 12C22 6.47715 17.5229 2 12 2ZM0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24C5.3726 24 0 18.6274 0 12Z"
|
||||
fill="rgba(0,0,0,0.7)"
|
||||
stroke="none"
|
||||
/>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M9.59162 22.7357C9.49492 22.6109 9.49492 21.4986 9.59162 19.399C8.55572 19.4347 7.90122 19.3628 7.62812 19.1833C7.21852 18.9139 6.80842 18.0833 6.44457 17.4979C6.08072 16.9125 5.27312 16.8199 4.94702 16.6891C4.62091 16.5582 4.53905 16.0247 5.84562 16.4282C7.15222 16.8316 7.21592 17.9303 7.62812 18.1872C8.04032 18.4441 9.02572 18.3317 9.47242 18.1259C9.91907 17.9201 9.88622 17.1538 9.96587 16.8503C10.0666 16.5669 9.71162 16.5041 9.70382 16.5018C9.26777 16.5018 6.97697 16.0036 6.34772 13.7852C5.71852 11.5669 6.52907 10.117 6.96147 9.49369C7.24972 9.07814 7.22422 8.19254 6.88497 6.83679C8.11677 6.67939 9.06732 7.06709 9.73672 7.99999C9.73737 8.00534 10.6143 7.47854 12.0001 7.47854C13.386 7.47854 13.8777 7.90764 14.2571 7.99999C14.6365 8.09234 14.94 6.36699 17.2834 6.83679C16.7942 7.79839 16.3844 8.99999 16.6972 9.49369C17.0099 9.98739 18.2372 11.5573 17.4833 13.7852C16.9807 15.2706 15.9927 16.1761 14.5192 16.5018C14.3502 16.5557 14.2658 16.6427 14.2658 16.7627C14.2658 16.9427 14.4942 16.9624 14.8233 17.8058C15.0426 18.368 15.0585 19.9739 14.8708 22.6234C14.3953 22.7445 14.0254 22.8257 13.7611 22.8673C13.2924 22.9409 12.7835 22.9822 12.2834 22.9982C11.7834 23.0141 11.6098 23.0123 10.9185 22.948C10.4577 22.9051 10.0154 22.8343 9.59162 22.7357Z"
|
||||
fill="rgba(0,0,0,0.7)"
|
||||
stroke="none"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.1566,22.8189c-10.4-14.8851-30.94-19.2971-45.7914-9.8348L22.2825,29.6078A29.9234,29.9234,0,0,0,8.7639,49.6506a31.5136,31.5136,0,0,0,3.1076,20.2318A30.0061,30.0061,0,0,0,7.3953,81.0653a31.8886,31.8886,0,0,0,5.4473,24.1157c10.4022,14.8865,30.9423,19.2966,45.7914,9.8348L84.7167,98.3921A29.9177,29.9177,0,0,0,98.2353,78.3493,31.5263,31.5263,0,0,0,95.13,58.117a30,30,0,0,0,4.4743-11.1824,31.88,31.88,0,0,0-5.4473-24.1157" style="fill:#ff3e00"/><path d="M45.8171,106.5815A20.7182,20.7182,0,0,1,23.58,98.3389a19.1739,19.1739,0,0,1-3.2766-14.5025,18.1886,18.1886,0,0,1,.6233-2.4357l.4912-1.4978,1.3363.9815a33.6443,33.6443,0,0,0,10.203,5.0978l.9694.2941-.0893.9675a5.8474,5.8474,0,0,0,1.052,3.8781,6.2389,6.2389,0,0,0,6.6952,2.485,5.7449,5.7449,0,0,0,1.6021-.7041L69.27,76.281a5.4306,5.4306,0,0,0,2.4506-3.631,5.7948,5.7948,0,0,0-.9875-4.3712,6.2436,6.2436,0,0,0-6.6978-2.4864,5.7427,5.7427,0,0,0-1.6.7036l-9.9532,6.3449a19.0329,19.0329,0,0,1-5.2965,2.3259,20.7181,20.7181,0,0,1-22.2368-8.2427,19.1725,19.1725,0,0,1-3.2766-14.5024,17.9885,17.9885,0,0,1,8.13-12.0513L55.8833,23.7472a19.0038,19.0038,0,0,1,5.3-2.3287A20.7182,20.7182,0,0,1,83.42,29.6611a19.1739,19.1739,0,0,1,3.2766,14.5025,18.4,18.4,0,0,1-.6233,2.4357l-.4912,1.4978-1.3356-.98a33.6175,33.6175,0,0,0-10.2037-5.1l-.9694-.2942.0893-.9675a5.8588,5.8588,0,0,0-1.052-3.878,6.2389,6.2389,0,0,0-6.6952-2.485,5.7449,5.7449,0,0,0-1.6021.7041L37.73,51.719a5.4218,5.4218,0,0,0-2.4487,3.63,5.7862,5.7862,0,0,0,.9856,4.3717,6.2437,6.2437,0,0,0,6.6978,2.4864,5.7652,5.7652,0,0,0,1.602-.7041l9.9519-6.3425a18.978,18.978,0,0,1,5.2959-2.3278,20.7181,20.7181,0,0,1,22.2368,8.2427,19.1725,19.1725,0,0,1,3.2766,14.5024,17.9977,17.9977,0,0,1-8.13,12.0532L51.1167,104.2528a19.0038,19.0038,0,0,1-5.3,2.3287" style="fill:#fff"/></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 352 KiB |
|
After Width: | Height: | Size: 113 KiB |
@@ -0,0 +1 @@
|
||||
const s=!1;export{s as d};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as b,s as l}from"./scheduler.cbf234a0.js";const n=[];function h(e,o){return{subscribe:p(e,o).subscribe}}function p(e,o=b){let r;const i=new Set;function u(t){if(l(e,t)&&(e=t,r)){const c=!n.length;for(const s of i)s[1](),n.push(s,e);if(c){for(let s=0;s<n.length;s+=2)n[s][0](n[s+1]);n.length=0}}}function f(t){u(t(e))}function a(t,c=b){const s=[t,c];return i.add(s),i.size===1&&(r=o(u,f)||b),t(e),()=>{i.delete(s),i.size===0&&r&&(r(),r=null)}}return{set:u,update:f,subscribe:a}}export{h as r,p as w};
|
||||
@@ -0,0 +1 @@
|
||||
function y(s,I){return i(JSON.parse(s),I)}function i(s,I){if(typeof s=="number")return a(s,!0);if(!Array.isArray(s)||s.length===0)throw new Error("Invalid input");const u=s,r=Array(u.length);function a(n,N=!1){if(n===-1)return;if(n===-3)return NaN;if(n===-4)return 1/0;if(n===-5)return-1/0;if(n===-6)return-0;if(N)throw new Error("Invalid input");if(n in r)return r[n];const t=u[n];if(!t||typeof t!="object")r[n]=t;else if(Array.isArray(t))if(typeof t[0]=="string"){const c=t[0],o=I==null?void 0:I[c];if(o)return r[n]=o(a(t[1]));switch(c){case"Date":r[n]=new Date(t[1]);break;case"Set":const f=new Set;r[n]=f;for(let e=1;e<t.length;e+=1)f.add(a(t[e]));break;case"Map":const l=new Map;r[n]=l;for(let e=1;e<t.length;e+=2)l.set(a(t[e]),a(t[e+1]));break;case"RegExp":r[n]=new RegExp(t[1],t[2]);break;case"Object":r[n]=Object(t[1]);break;case"BigInt":r[n]=BigInt(t[1]);break;case"null":const E=Object.create(null);r[n]=E;for(let e=1;e<t.length;e+=2)E[t[e]]=a(t[e+1]);break;default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(t.length);r[n]=c;for(let o=0;o<t.length;o+=1){const f=t[o];f!==-2&&(c[o]=a(f))}}else{const c={};r[n]=c;for(const o in t){const f=t[o];c[o]=a(f)}}return r[n]}return a(0)}export{y as p,i as u};
|
||||
@@ -0,0 +1 @@
|
||||
function g(){}function k(t,n){for(const e in n)t[e]=n[e];return t}function w(t){return t()}function F(){return Object.create(null)}function j(t){t.forEach(w)}function E(t){return typeof t=="function"}function P(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function S(t){return Object.keys(t).length===0}function v(t,...n){if(t==null){for(const o of n)o(void 0);return g}const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function U(t,n,e){t.$$.on_destroy.push(v(n,e))}function A(t,n,e,o){if(t){const r=y(t,n,e,o);return t[0](r)}}function y(t,n,e,o){return t[1]&&o?k(e.ctx.slice(),t[1](o(n))):e.ctx}function B(t,n,e,o){if(t[2]&&o){const r=t[2](o(e));if(n.dirty===void 0)return r;if(typeof r=="object"){const i=[],f=Math.max(n.dirty.length,r.length);for(let s=0;s<f;s+=1)i[s]=n.dirty[s]|r[s];return i}return n.dirty|r}return n.dirty}function C(t,n,e,o,r,i){if(r){const f=y(n,e,o,i);t.p(f,r)}}function D(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let o=0;o<e;o++)n[o]=-1;return n}return-1}function G(t){return t??""}function H(t){return t&&E(t.destroy)?t.destroy:g}let a;function d(t){a=t}function m(){if(!a)throw new Error("Function called outside component initialization");return a}function I(t){m().$$.on_mount.push(t)}function J(t){m().$$.after_update.push(t)}const l=[],p=[];let u=[];const b=[],x=Promise.resolve();let h=!1;function O(){h||(h=!0,x.then(M))}function K(){return O(),x}function q(t){u.push(t)}const _=new Set;let c=0;function M(){if(c!==0)return;const t=a;do{try{for(;c<l.length;){const n=l[c];c++,d(n),z(n.$$)}}catch(n){throw l.length=0,c=0,n}for(d(null),l.length=0,c=0;p.length;)p.pop()();for(let n=0;n<u.length;n+=1){const e=u[n];_.has(e)||(_.add(e),e())}u.length=0}while(l.length);for(;b.length;)b.pop()();h=!1,_.clear(),d(t)}function z(t){if(t.fragment!==null){t.update(),j(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(q)}}function L(t){const n=[],e=[];u.forEach(o=>t.indexOf(o)===-1?n.push(o):e.push(o)),e.forEach(o=>o()),u=n}export{J as a,p as b,U as c,A as d,B as e,H as f,D as g,G as h,E as i,F as j,M as k,S as l,q as m,g as n,I as o,L as p,a as q,j as r,P as s,K as t,C as u,d as v,w,l as x,O as y};
|
||||
@@ -0,0 +1 @@
|
||||
import{w as u}from"./index.14349a18.js";var p;const m=((p=globalThis.__sveltekit_16q4axl)==null?void 0:p.base)??"";var h;const w=((h=globalThis.__sveltekit_16q4axl)==null?void 0:h.assets)??m,E="1700239351764",x="sveltekit:snapshot",y="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1},g=location.origin;function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function O(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function b(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function U(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=b(e)}}function L(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,l=!n||!!o||R(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),r=(n==null?void 0:n.origin)===g&&e.hasAttribute("download");return{url:n,external:l,target:o,download:r}}function N(e){let t=null,n=null,o=null,l=null,r=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),l===null&&(l=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),r===null&&(r=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=b(s);function i(k){switch(k){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[l??"off"],keep_focus:i(t),noscroll:i(n),reload:i(r),replace_state:i(a)}}function _(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function l(a){n=!1,t.set(a)}function r(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:l,subscribe:r}}function A(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const l=await fetch(`${w}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!l.ok)return!1;const a=(await l.json()).version!==E;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function R(e,t){return e.origin!==g||!e.pathname.startsWith(t)}let v;function P(e){v=e.client}function V(e){return(...t)=>v[e](...t)}const Y={url:_({}),page:_({}),navigating:u(null),updated:A()};export{I,f as P,y as S,x as a,L as b,N as c,Y as d,m as e,U as f,S as g,P as h,R as i,V as j,v as k,g as o,O as s};
|
||||
@@ -0,0 +1 @@
|
||||
import{d as e}from"./singletons.13d7fb5f.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
||||
@@ -0,0 +1 @@
|
||||
import{s as Y,n as P,c as ae,d as le,u as re,g as ne,e as ue}from"../chunks/scheduler.cbf234a0.js";import{S as ee,i as te,g as v,s as x,x as D,h as p,j as _,y as k,c as H,z as R,f as d,k as e,a as se,A as a,r as ie,u as oe,v as ce,d as Q,t as X,w as ve}from"../chunks/index.200976ee.js";import{p as pe}from"../chunks/stores.c94eb2b9.js";const de=""+new URL("../assets/svelte-logo.87df40b8.svg",import.meta.url).href,he=""+new URL("../assets/github.1ea8d62e.svg",import.meta.url).href;function fe(h){let t,r,m=`<a href="https://kit.svelte.dev" class="svelte-1u9z1tp"><img src="${de}" alt="SvelteKit" class="svelte-1u9z1tp"/></a>`,i,n,u,$,g,o,l,s,c="Home",y,V,L,C,N="About",S,j,E,b,O="Sverdle",B,U,w,A,K,M,W=`<a href="https://github.com/sveltejs/kit" class="svelte-1u9z1tp"><img src="${he}" alt="GitHub" class="svelte-1u9z1tp"/></a>`;return{c(){t=v("header"),r=v("div"),r.innerHTML=m,i=x(),n=v("nav"),u=D("svg"),$=D("path"),g=x(),o=v("ul"),l=v("li"),s=v("a"),s.textContent=c,V=x(),L=v("li"),C=v("a"),C.textContent=N,j=x(),E=v("li"),b=v("a"),b.textContent=O,U=x(),w=D("svg"),A=D("path"),K=x(),M=v("div"),M.innerHTML=W,this.h()},l(z){t=p(z,"HEADER",{class:!0});var f=_(t);r=p(f,"DIV",{class:!0,"data-svelte-h":!0}),k(r)!=="svelte-1jb641n"&&(r.innerHTML=m),i=H(f),n=p(f,"NAV",{class:!0});var I=_(n);u=R(I,"svg",{viewBox:!0,"aria-hidden":!0,class:!0});var Z=_(u);$=R(Z,"path",{d:!0,class:!0}),_($).forEach(d),Z.forEach(d),g=H(I),o=p(I,"UL",{class:!0});var T=_(o);l=p(T,"LI",{"aria-current":!0,class:!0});var q=_(l);s=p(q,"A",{href:!0,class:!0,"data-svelte-h":!0}),k(s)!=="svelte-5a0zws"&&(s.textContent=c),q.forEach(d),V=H(T),L=p(T,"LI",{"aria-current":!0,class:!0});var F=_(L);C=p(F,"A",{href:!0,class:!0,"data-svelte-h":!0}),k(C)!=="svelte-iphxk9"&&(C.textContent=N),F.forEach(d),j=H(T),E=p(T,"LI",{"aria-current":!0,class:!0});var G=_(E);b=p(G,"A",{href:!0,class:!0,"data-svelte-h":!0}),k(b)!=="svelte-1mtf8rh"&&(b.textContent=O),G.forEach(d),T.forEach(d),U=H(I),w=R(I,"svg",{viewBox:!0,"aria-hidden":!0,class:!0});var J=_(w);A=R(J,"path",{d:!0,class:!0}),_(A).forEach(d),J.forEach(d),I.forEach(d),K=H(f),M=p(f,"DIV",{class:!0,"data-svelte-h":!0}),k(M)!=="svelte-1gilmbv"&&(M.innerHTML=W),f.forEach(d),this.h()},h(){e(r,"class","corner svelte-1u9z1tp"),e($,"d","M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z"),e($,"class","svelte-1u9z1tp"),e(u,"viewBox","0 0 2 3"),e(u,"aria-hidden","true"),e(u,"class","svelte-1u9z1tp"),e(s,"href","/"),e(s,"class","svelte-1u9z1tp"),e(l,"aria-current",y=h[0].url.pathname==="/"?"page":void 0),e(l,"class","svelte-1u9z1tp"),e(C,"href","/about"),e(C,"class","svelte-1u9z1tp"),e(L,"aria-current",S=h[0].url.pathname==="/about"?"page":void 0),e(L,"class","svelte-1u9z1tp"),e(b,"href","/sverdle"),e(b,"class","svelte-1u9z1tp"),e(E,"aria-current",B=h[0].url.pathname.startsWith("/sverdle")?"page":void 0),e(E,"class","svelte-1u9z1tp"),e(o,"class","svelte-1u9z1tp"),e(A,"d","M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z"),e(A,"class","svelte-1u9z1tp"),e(w,"viewBox","0 0 2 3"),e(w,"aria-hidden","true"),e(w,"class","svelte-1u9z1tp"),e(n,"class","svelte-1u9z1tp"),e(M,"class","corner svelte-1u9z1tp"),e(t,"class","svelte-1u9z1tp")},m(z,f){se(z,t,f),a(t,r),a(t,i),a(t,n),a(n,u),a(u,$),a(n,g),a(n,o),a(o,l),a(l,s),a(o,V),a(o,L),a(L,C),a(o,j),a(o,E),a(E,b),a(n,U),a(n,w),a(w,A),a(t,K),a(t,M)},p(z,[f]){f&1&&y!==(y=z[0].url.pathname==="/"?"page":void 0)&&e(l,"aria-current",y),f&1&&S!==(S=z[0].url.pathname==="/about"?"page":void 0)&&e(L,"aria-current",S),f&1&&B!==(B=z[0].url.pathname.startsWith("/sverdle")?"page":void 0)&&e(E,"aria-current",B)},i:P,o:P,d(z){z&&d(t)}}}function _e(h,t,r){let m;return ae(h,pe,i=>r(0,m=i)),[m]}class me extends ee{constructor(t){super(),te(this,t,_e,fe,Y,{})}}function ge(h){let t,r,m,i,n,u,$='<p>visit <a href="https://kit.svelte.dev" class="svelte-8o1gnw">kit.svelte.dev</a> to learn SvelteKit</p>',g;r=new me({});const o=h[1].default,l=le(o,h,h[0],null);return{c(){t=v("div"),ie(r.$$.fragment),m=x(),i=v("main"),l&&l.c(),n=x(),u=v("footer"),u.innerHTML=$,this.h()},l(s){t=p(s,"DIV",{class:!0});var c=_(t);oe(r.$$.fragment,c),m=H(c),i=p(c,"MAIN",{class:!0});var y=_(i);l&&l.l(y),y.forEach(d),n=H(c),u=p(c,"FOOTER",{class:!0,"data-svelte-h":!0}),k(u)!=="svelte-1dlfr5"&&(u.innerHTML=$),c.forEach(d),this.h()},h(){e(i,"class","svelte-8o1gnw"),e(u,"class","svelte-8o1gnw"),e(t,"class","app svelte-8o1gnw")},m(s,c){se(s,t,c),ce(r,t,null),a(t,m),a(t,i),l&&l.m(i,null),a(t,n),a(t,u),g=!0},p(s,[c]){l&&l.p&&(!g||c&1)&&re(l,o,s,s[0],g?ue(o,s[0],c,null):ne(s[0]),null)},i(s){g||(Q(r.$$.fragment,s),Q(l,s),g=!0)},o(s){X(r.$$.fragment,s),X(l,s),g=!1},d(s){s&&d(t),ve(r),l&&l.d(s)}}}function $e(h,t,r){let{$$slots:m={},$$scope:i}=t;return h.$$set=n=>{"$$scope"in n&&r(0,i=n.$$scope)},[i,m]}class Ee extends ee{constructor(t){super(),te(this,t,$e,ge,Y,{})}}export{Ee as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{s as x,n as u,c as S}from"../chunks/scheduler.cbf234a0.js";import{S as j,i as q,g as h,m as d,s as y,h as v,j as g,n as E,f as m,c as A,a as _,A as $,o as b}from"../chunks/index.200976ee.js";import{p as C}from"../chunks/stores.c94eb2b9.js";function H(p){var f;let a,t=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",c;return{c(){a=h("h1"),r=d(t),o=y(),n=h("p"),c=d(i)},l(e){a=v(e,"H1",{});var s=g(a);r=E(s,t),s.forEach(m),o=A(e),n=v(e,"P",{});var l=g(n);c=E(l,i),l.forEach(m)},m(e,s){_(e,a,s),$(a,r),_(e,o,s),_(e,n,s),$(n,c)},p(e,[s]){var l;s&1&&t!==(t=e[0].status+"")&&b(r,t),s&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&b(c,i)},i:u,o:u,d(e){e&&(m(a),m(o),m(n))}}}function P(p,a,t){let r;return S(p,C,o=>t(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,P,H,x,{})}}export{B as component};
|
||||
@@ -0,0 +1,3 @@
|
||||
import{n as O,s as G,r as X,c as Y}from"../chunks/scheduler.cbf234a0.js";import{S as F,i as K,g as b,s as L,m as N,h as w,j as k,y as j,c as E,n as P,f as M,k as g,l as z,a as D,A as p,B as R,o as U,r as Z,C as ee,u as te,v as se,d as ne,t as oe,w as re}from"../chunks/index.200976ee.js";import{w as ae}from"../chunks/index.14349a18.js";const W=typeof window<"u";let V=W?()=>window.performance.now():()=>Date.now(),J=W?e=>requestAnimationFrame(e):O;const H=new Set;function Q(e){H.forEach(t=>{t.c(e)||(H.delete(t),t.f())}),H.size!==0&&J(Q)}function le(e){let t;return H.size===0&&J(Q),{promise:new Promise(s=>{H.add(t={c:e,f:s})}),abort(){H.delete(t)}}}const ie=!0,be=Object.freeze(Object.defineProperty({__proto__:null,prerender:ie},Symbol.toStringTag,{value:"Module"}));function q(e){return Object.prototype.toString.call(e)==="[object Date]"}function A(e,t,s,r){if(typeof s=="number"||q(s)){const a=r-s,n=(s-t)/(e.dt||1/60),o=e.opts.stiffness*a,l=e.opts.damping*n,u=(o-l)*e.inv_mass,c=(n+u)*e.dt;return Math.abs(c)<e.opts.precision&&Math.abs(a)<e.opts.precision?r:(e.settled=!1,q(s)?new Date(s.getTime()+c):s+c)}else{if(Array.isArray(s))return s.map((a,n)=>A(e,t[n],s[n],r[n]));if(typeof s=="object"){const a={};for(const n in s)a[n]=A(e,t[n],s[n],r[n]);return a}else throw new Error(`Cannot spring ${typeof s} values`)}}function ce(e,t={}){const s=ae(e),{stiffness:r=.15,damping:a=.8,precision:n=.01}=t;let o,l,u,c=e,f=e,d=1,i=0,h=!1;function y(T,x={}){f=T;const S=u={};return e==null||x.hard||v.stiffness>=1&&v.damping>=1?(h=!0,o=V(),c=T,s.set(e=f),Promise.resolve()):(x.soft&&(i=1/((x.soft===!0?.5:+x.soft)*60),d=0),l||(o=V(),h=!1,l=le(_=>{if(h)return h=!1,l=null,!1;d=Math.min(d+i,1);const m={inv_mass:d,opts:v,settled:!0,dt:(_-o)*60/1e3},C=A(m,c,e,f);return o=_,c=e,s.set(e=C),m.settled&&(l=null),!m.settled})),new Promise(_=>{l.promise.then(()=>{S===u&&_()})}))}const v={set:y,update:(T,x)=>y(T(f,e),x),subscribe:s.subscribe,stiffness:r,damping:a,precision:n};return v}function fe(e){let t,s,r='<svg aria-hidden="true" viewBox="0 0 1 1" class="svelte-y96mxt"><path d="M0,0.5 L1,0.5" class="svelte-y96mxt"></path></svg>',a,n,o,l,u=Math.floor(e[1]+1)+"",c,f,d,i=Math.floor(e[1])+"",h,y,v,T='<svg aria-hidden="true" viewBox="0 0 1 1" class="svelte-y96mxt"><path d="M0,0.5 L1,0.5 M0.5,0 L0.5,1" class="svelte-y96mxt"></path></svg>',x,S;return{c(){t=b("div"),s=b("button"),s.innerHTML=r,a=L(),n=b("div"),o=b("div"),l=b("strong"),c=N(u),f=L(),d=b("strong"),h=N(i),y=L(),v=b("button"),v.innerHTML=T,this.h()},l(_){t=w(_,"DIV",{class:!0});var m=k(t);s=w(m,"BUTTON",{"aria-label":!0,class:!0,"data-svelte-h":!0}),j(s)!=="svelte-97ppyc"&&(s.innerHTML=r),a=E(m),n=w(m,"DIV",{class:!0});var C=k(n);o=w(C,"DIV",{class:!0,style:!0});var $=k(o);l=w($,"STRONG",{class:!0,"aria-hidden":!0});var B=k(l);c=P(B,u),B.forEach(M),f=E($),d=w($,"STRONG",{class:!0});var I=k(d);h=P(I,i),I.forEach(M),$.forEach(M),C.forEach(M),y=E(m),v=w(m,"BUTTON",{"aria-label":!0,class:!0,"data-svelte-h":!0}),j(v)!=="svelte-irev0c"&&(v.innerHTML=T),m.forEach(M),this.h()},h(){g(s,"aria-label","Decrease the counter by one"),g(s,"class","svelte-y96mxt"),g(l,"class","hidden svelte-y96mxt"),g(l,"aria-hidden","true"),g(d,"class","svelte-y96mxt"),g(o,"class","counter-digits svelte-y96mxt"),z(o,"transform","translate(0, "+100*e[2]+"%)"),g(n,"class","counter-viewport svelte-y96mxt"),g(v,"aria-label","Increase the counter by one"),g(v,"class","svelte-y96mxt"),g(t,"class","counter svelte-y96mxt")},m(_,m){D(_,t,m),p(t,s),p(t,a),p(t,n),p(n,o),p(o,l),p(l,c),p(o,f),p(o,d),p(d,h),p(t,y),p(t,v),x||(S=[R(s,"click",e[4]),R(v,"click",e[5])],x=!0)},p(_,[m]){m&2&&u!==(u=Math.floor(_[1]+1)+"")&&U(c,u),m&2&&i!==(i=Math.floor(_[1])+"")&&U(h,i),m&4&&z(o,"transform","translate(0, "+100*_[2]+"%)")},i:O,o:O,d(_){_&&M(t),x=!1,X(S)}}}function de(e,t){return(e%t+t)%t}function me(e,t,s){let r,a,n=0;const o=ce();Y(e,o,c=>s(1,a=c));const l=()=>s(0,n-=1),u=()=>s(0,n+=1);return e.$$.update=()=>{e.$$.dirty&1&&o.set(n),e.$$.dirty&2&&s(2,r=de(a,1))},[n,a,r,o,l,u]}class pe extends F{constructor(t){super(),K(this,t,me,fe,G,{})}}const ue=""+new URL("../assets/svelte-welcome.c18bcf5a.webp",import.meta.url).href,he=""+new URL("../assets/svelte-welcome.6c300099.png",import.meta.url).href;function _e(e){let t,s,r,a,n=`<span class="welcome svelte-19xx0bt"><picture><source srcset="${ue}" type="image/webp"/> <img src="${he}" alt="Welcome" class="svelte-19xx0bt"/></picture></span>
|
||||
|
||||
to your new<br/>SvelteKit app`,o,l,u="try editing <strong>src/routes/+page.svelte</strong>",c,f,d;return f=new pe({}),{c(){t=b("meta"),s=L(),r=b("section"),a=b("h1"),a.innerHTML=n,o=L(),l=b("h2"),l.innerHTML=u,c=L(),Z(f.$$.fragment),this.h()},l(i){const h=ee("svelte-t32ptj",document.head);t=w(h,"META",{name:!0,content:!0}),h.forEach(M),s=E(i),r=w(i,"SECTION",{class:!0});var y=k(r);a=w(y,"H1",{class:!0,"data-svelte-h":!0}),j(a)!=="svelte-11s73ib"&&(a.innerHTML=n),o=E(y),l=w(y,"H2",{"data-svelte-h":!0}),j(l)!=="svelte-1e36z0s"&&(l.innerHTML=u),c=E(y),te(f.$$.fragment,y),y.forEach(M),this.h()},h(){document.title="Home",g(t,"name","description"),g(t,"content","Svelte demo app"),g(a,"class","svelte-19xx0bt"),g(r,"class","svelte-19xx0bt")},m(i,h){p(document.head,t),D(i,s,h),D(i,r,h),p(r,a),p(r,o),p(r,l),p(r,c),se(f,r,null),d=!0},p:O,i(i){d||(ne(f.$$.fragment,i),d=!0)},o(i){oe(f.$$.fragment,i),d=!1},d(i){i&&(M(s),M(r)),M(t),re(f)}}}class we extends F{constructor(t){super(),K(this,t,null,_e,G,{})}}export{we as component,be as universal};
|
||||
@@ -0,0 +1,5 @@
|
||||
import{d as u}from"../chunks/environment.9aa685ef.js";import{s as m,n as i}from"../chunks/scheduler.cbf234a0.js";import{S as v,i as g,g as p,s as f,C as y,h as d,f as o,c as _,y as T,k as r,A as b,a as c}from"../chunks/index.200976ee.js";const w=u,S=!0,C=Object.freeze(Object.defineProperty({__proto__:null,csr:w,prerender:S},Symbol.toStringTag,{value:"Module"}));function k(h){let e,s,t,l=`<h1>About this app</h1> <p>This is a <a href="https://kit.svelte.dev">SvelteKit</a> app. You can make your own by typing the
|
||||
following into your command line and following the prompts:</p> <pre>npm create svelte@latest</pre> <p>The page you're looking at is purely static HTML, with no client-side interactivity needed.
|
||||
Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening
|
||||
the devtools network panel and reloading.</p> <p>The <a href="/sverdle">Sverdle</a> page illustrates SvelteKit's data loading and form handling. Try
|
||||
using it with JavaScript disabled!</p>`;return{c(){e=p("meta"),s=f(),t=p("div"),t.innerHTML=l,this.h()},l(a){const n=y("svelte-1ds1qyu",document.head);e=d(n,"META",{name:!0,content:!0}),n.forEach(o),s=_(a),t=d(a,"DIV",{class:!0,"data-svelte-h":!0}),T(t)!=="svelte-h1zwnb"&&(t.innerHTML=l),this.h()},h(){document.title="About",r(e,"name","description"),r(e,"content","About this app"),r(t,"class","text-column")},m(a,n){b(document.head,e),c(a,s,n),c(a,t,n)},p:i,i,o:i,d(a){a&&(o(s),o(t)),o(e)}}}class H extends v{constructor(e){super(),g(this,e,null,k,m,{})}}export{H as component,C as universal};
|
||||
@@ -0,0 +1,7 @@
|
||||
import{d as h}from"../chunks/environment.9aa685ef.js";import{s as m,n as o}from"../chunks/scheduler.cbf234a0.js";import{S as x,i as g,g as i,s as u,C as _,h as p,f as l,c as q,y,k as r,A as f,a as d}from"../chunks/index.200976ee.js";const w=h,S=!0,M=Object.freeze(Object.defineProperty({__proto__:null,csr:w,prerender:S},Symbol.toStringTag,{value:"Module"}));function b(v){let e,n,s,c=`<h1>How to play Sverdle</h1> <p>Sverdle is a clone of <a href="https://www.nytimes.com/games/wordle/index.html">Wordle</a>, the
|
||||
word guessing game. To play, enter a five-letter English word. For example:</p> <div class="example svelte-1x5nq1n"><span class="close svelte-1x5nq1n">r</span> <span class="missing svelte-1x5nq1n">i</span> <span class="close svelte-1x5nq1n">t</span> <span class="missing svelte-1x5nq1n">z</span> <span class="exact svelte-1x5nq1n">y</span></div> <p class="svelte-1x5nq1n">The <span class="exact svelte-1x5nq1n">y</span> is in the right place. <span class="close svelte-1x5nq1n">r</span> and
|
||||
<span class="close svelte-1x5nq1n">t</span>
|
||||
are the right letters, but in the wrong place. The other letters are wrong, and can be discarded.
|
||||
Let's make another guess:</p> <div class="example svelte-1x5nq1n"><span class="exact svelte-1x5nq1n">p</span> <span class="exact svelte-1x5nq1n">a</span> <span class="exact svelte-1x5nq1n">r</span> <span class="exact svelte-1x5nq1n">t</span> <span class="exact svelte-1x5nq1n">y</span></div> <p>This time we guessed right! You have <strong>six</strong> guesses to get the word.</p> <p>Unlike the original Wordle, Sverdle runs on the server instead of in the browser, making it
|
||||
impossible to cheat. It uses <code><form></code> and cookies to submit data, meaning you can
|
||||
even play with JavaScript disabled!</p>`;return{c(){e=i("meta"),n=u(),s=i("div"),s.innerHTML=c,this.h()},l(t){const a=_("svelte-1fqqyy5",document.head);e=p(a,"META",{name:!0,content:!0}),a.forEach(l),n=q(t),s=p(t,"DIV",{class:!0,"data-svelte-h":!0}),y(s)!=="svelte-rdttnt"&&(s.innerHTML=c),this.h()},h(){document.title="How to play Sverdle",r(e,"name","description"),r(e,"content","How to play Sverdle"),r(s,"class","text-column")},m(t,a){f(document.head,e),d(t,n,a),d(t,s,a)},p:o,i:o,o,d(t){t&&(l(n),l(s)),l(e)}}}class C extends x{constructor(e){super(),g(this,e,null,b,m,{})}}export{C as component,M as universal};
|
||||
1
Svelte-Build/src/client/_app/version.json
Normal file
@@ -0,0 +1 @@
|
||||
{"version":"1700239351764"}
|
||||
BIN
Svelte-Build/src/client/favicon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
3
Svelte-Build/src/client/robots.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
37
Svelte-Build/src/env.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/* global "" */
|
||||
|
||||
const expected = new Set([
|
||||
'SOCKET_PATH',
|
||||
'HOST',
|
||||
'PORT',
|
||||
'ORIGIN',
|
||||
'XFF_DEPTH',
|
||||
'ADDRESS_HEADER',
|
||||
'PROTOCOL_HEADER',
|
||||
'HOST_HEADER',
|
||||
'BODY_SIZE_LIMIT'
|
||||
]);
|
||||
|
||||
if ("") {
|
||||
for (const name in process.env) {
|
||||
if (name.startsWith("")) {
|
||||
const unprefixed = name.slice("".length);
|
||||
if (!expected.has(unprefixed)) {
|
||||
throw new Error(
|
||||
`You should change envPrefix (${""}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {any} fallback
|
||||
*/
|
||||
function env(name, fallback) {
|
||||
const prefixed = "" + name;
|
||||
return prefixed in process.env ? process.env[prefixed] : fallback;
|
||||
}
|
||||
|
||||
export { env };
|
||||
1307
Svelte-Build/src/handler.js
Normal file
225
Svelte-Build/src/index.js
Normal file
@@ -0,0 +1,225 @@
|
||||
import { handler } from './handler.js';
|
||||
import { env } from './env.js';
|
||||
import http from 'http';
|
||||
import * as qs from 'querystring';
|
||||
|
||||
function parse$1 (str, loose) {
|
||||
if (str instanceof RegExp) return { keys:false, pattern:str };
|
||||
var c, o, tmp, ext, keys=[], pattern='', arr = str.split('/');
|
||||
arr[0] || arr.shift();
|
||||
|
||||
while (tmp = arr.shift()) {
|
||||
c = tmp[0];
|
||||
if (c === '*') {
|
||||
keys.push('wild');
|
||||
pattern += '/(.*)';
|
||||
} else if (c === ':') {
|
||||
o = tmp.indexOf('?', 1);
|
||||
ext = tmp.indexOf('.', 1);
|
||||
keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
|
||||
pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
|
||||
if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
|
||||
} else {
|
||||
pattern += '/' + tmp;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
keys: keys,
|
||||
pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
|
||||
};
|
||||
}
|
||||
|
||||
class Trouter {
|
||||
constructor() {
|
||||
this.routes = [];
|
||||
|
||||
this.all = this.add.bind(this, '');
|
||||
this.get = this.add.bind(this, 'GET');
|
||||
this.head = this.add.bind(this, 'HEAD');
|
||||
this.patch = this.add.bind(this, 'PATCH');
|
||||
this.options = this.add.bind(this, 'OPTIONS');
|
||||
this.connect = this.add.bind(this, 'CONNECT');
|
||||
this.delete = this.add.bind(this, 'DELETE');
|
||||
this.trace = this.add.bind(this, 'TRACE');
|
||||
this.post = this.add.bind(this, 'POST');
|
||||
this.put = this.add.bind(this, 'PUT');
|
||||
}
|
||||
|
||||
use(route, ...fns) {
|
||||
let handlers = [].concat.apply([], fns);
|
||||
let { keys, pattern } = parse$1(route, true);
|
||||
this.routes.push({ keys, pattern, method:'', handlers });
|
||||
return this;
|
||||
}
|
||||
|
||||
add(method, route, ...fns) {
|
||||
let { keys, pattern } = parse$1(route);
|
||||
let handlers = [].concat.apply([], fns);
|
||||
this.routes.push({ keys, pattern, method, handlers });
|
||||
return this;
|
||||
}
|
||||
|
||||
find(method, url) {
|
||||
let isHEAD=(method === 'HEAD');
|
||||
let i=0, j=0, k, tmp, arr=this.routes;
|
||||
let matches=[], params={}, handlers=[];
|
||||
for (; i < arr.length; i++) {
|
||||
tmp = arr[i];
|
||||
if (tmp.method.length === 0 || tmp.method === method || isHEAD && tmp.method === 'GET') {
|
||||
if (tmp.keys === false) {
|
||||
matches = tmp.pattern.exec(url);
|
||||
if (matches === null) continue;
|
||||
if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
|
||||
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
||||
} else if (tmp.keys.length > 0) {
|
||||
matches = tmp.pattern.exec(url);
|
||||
if (matches === null) continue;
|
||||
for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
|
||||
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
||||
} else if (tmp.pattern.test(url)) {
|
||||
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
||||
}
|
||||
} // else not a match
|
||||
}
|
||||
|
||||
return { params, handlers };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef ParsedURL
|
||||
* @type {import('.').ParsedURL}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Request
|
||||
* @property {string} url
|
||||
* @property {ParsedURL} _parsedUrl
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Request} req
|
||||
* @returns {ParsedURL|void}
|
||||
*/
|
||||
function parse(req) {
|
||||
let raw = req.url;
|
||||
if (raw == null) return;
|
||||
|
||||
let prev = req._parsedUrl;
|
||||
if (prev && prev.raw === raw) return prev;
|
||||
|
||||
let pathname=raw, search='', query;
|
||||
|
||||
if (raw.length > 1) {
|
||||
let idx = raw.indexOf('?', 1);
|
||||
|
||||
if (idx !== -1) {
|
||||
search = raw.substring(idx);
|
||||
pathname = raw.substring(0, idx);
|
||||
if (search.length > 1) {
|
||||
query = qs.parse(search.substring(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return req._parsedUrl = { pathname, search, query, raw };
|
||||
}
|
||||
|
||||
function onError(err, req, res) {
|
||||
let code = typeof err.status === 'number' && err.status;
|
||||
code = res.statusCode = (code && code >= 100 ? code : 500);
|
||||
if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
|
||||
else res.end(err.message || http.STATUS_CODES[code]);
|
||||
}
|
||||
|
||||
const mount = fn => fn instanceof Polka ? fn.attach : fn;
|
||||
|
||||
class Polka extends Trouter {
|
||||
constructor(opts={}) {
|
||||
super();
|
||||
this.parse = parse;
|
||||
this.server = opts.server;
|
||||
this.handler = this.handler.bind(this);
|
||||
this.onError = opts.onError || onError; // catch-all handler
|
||||
this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
|
||||
this.attach = (req, res) => setImmediate(this.handler, req, res);
|
||||
}
|
||||
|
||||
use(base, ...fns) {
|
||||
if (base === '/') {
|
||||
super.use(base, fns.map(mount));
|
||||
} else if (typeof base === 'function' || base instanceof Polka) {
|
||||
super.use('/', [base, ...fns].map(mount));
|
||||
} else {
|
||||
super.use(base,
|
||||
(req, _, next) => {
|
||||
if (typeof base === 'string') {
|
||||
let len = base.length;
|
||||
base.startsWith('/') || len++;
|
||||
req.url = req.url.substring(len) || '/';
|
||||
req.path = req.path.substring(len) || '/';
|
||||
} else {
|
||||
req.url = req.url.replace(base, '') || '/';
|
||||
req.path = req.path.replace(base, '') || '/';
|
||||
}
|
||||
if (req.url.charAt(0) !== '/') {
|
||||
req.url = '/' + req.url;
|
||||
}
|
||||
next();
|
||||
},
|
||||
fns.map(mount),
|
||||
(req, _, next) => {
|
||||
req.path = req._parsedUrl.pathname;
|
||||
req.url = req.path + req._parsedUrl.search;
|
||||
next();
|
||||
}
|
||||
);
|
||||
}
|
||||
return this; // chainable
|
||||
}
|
||||
|
||||
listen() {
|
||||
(this.server = this.server || http.createServer()).on('request', this.attach);
|
||||
this.server.listen.apply(this.server, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
handler(req, res, next) {
|
||||
let info = this.parse(req), path = info.pathname;
|
||||
let obj = this.find(req.method, req.path=path);
|
||||
|
||||
req.url = path + info.search;
|
||||
req.originalUrl = req.originalUrl || req.url;
|
||||
req.query = info.query || {};
|
||||
req.search = info.search;
|
||||
req.params = obj.params;
|
||||
|
||||
if (path.length > 1 && path.indexOf('%', 1) !== -1) {
|
||||
for (let k in req.params) {
|
||||
try { req.params[k] = decodeURIComponent(req.params[k]); }
|
||||
catch (e) { /* malform uri segment */ }
|
||||
}
|
||||
}
|
||||
|
||||
let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
|
||||
let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
|
||||
(next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
|
||||
}
|
||||
}
|
||||
|
||||
function polka (opts) {
|
||||
return new Polka(opts);
|
||||
}
|
||||
|
||||
const path = env('SOCKET_PATH', false);
|
||||
const host = env('HOST', '0.0.0.0');
|
||||
const port = env('PORT', !path && '3000');
|
||||
|
||||
const server = polka().use(handler);
|
||||
|
||||
server.listen({ path, host, port }, () => {
|
||||
console.log(`Listening on ${path ? path : host + ':' + port}`);
|
||||
});
|
||||
|
||||
export { host, path, port, server };
|
||||
17
Svelte-Build/src/prerendered/about.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="./favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link href="./_app/immutable/assets/0.fa9427ff.css" rel="stylesheet"><title>About</title><!-- HEAD_svelte-1ds1qyu_START --><meta name="description" content="About this app"><!-- HEAD_svelte-1ds1qyu_END -->
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents"> <div class="app svelte-8o1gnw"><header class="svelte-1u9z1tp"><div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1jb641n"><a href="https://kit.svelte.dev" class="svelte-1u9z1tp"><img src="/_app/immutable/assets/svelte-logo.87df40b8.svg" alt="SvelteKit" class="svelte-1u9z1tp"></a></div> <nav class="svelte-1u9z1tp"><svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z" class="svelte-1u9z1tp"></path></svg> <ul class="svelte-1u9z1tp"><li class="svelte-1u9z1tp"><a href="/" class="svelte-1u9z1tp" data-svelte-h="svelte-5a0zws">Home</a></li> <li aria-current="page" class="svelte-1u9z1tp"><a href="/about" class="svelte-1u9z1tp" data-svelte-h="svelte-iphxk9">About</a></li> <li class="svelte-1u9z1tp"><a href="/sverdle" class="svelte-1u9z1tp" data-svelte-h="svelte-1mtf8rh">Sverdle</a></li></ul> <svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z" class="svelte-1u9z1tp"></path></svg></nav> <div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1gilmbv"><a href="https://github.com/sveltejs/kit" class="svelte-1u9z1tp"><img src="/_app/immutable/assets/github.1ea8d62e.svg" alt="GitHub" class="svelte-1u9z1tp"></a></div> </header> <main class="svelte-8o1gnw"> <div class="text-column" data-svelte-h="svelte-h1zwnb"><h1>About this app</h1> <p>This is a <a href="https://kit.svelte.dev">SvelteKit</a> app. You can make your own by typing the
|
||||
following into your command line and following the prompts:</p> <pre>npm create svelte@latest</pre> <p>The page you're looking at is purely static HTML, with no client-side interactivity needed.
|
||||
Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening
|
||||
the devtools network panel and reloading.</p> <p>The <a href="/sverdle">Sverdle</a> page illustrates SvelteKit's data loading and form handling. Try
|
||||
using it with JavaScript disabled!</p></div></main> <footer class="svelte-8o1gnw" data-svelte-h="svelte-1dlfr5"><p>visit <a href="https://kit.svelte.dev" class="svelte-8o1gnw">kit.svelte.dev</a> to learn SvelteKit</p></footer> </div> </div>
|
||||
</body>
|
||||
</html>
|
||||
52
Svelte-Build/src/prerendered/index.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="./favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link href="./_app/immutable/assets/0.fa9427ff.css" rel="stylesheet">
|
||||
<link href="./_app/immutable/assets/2.57239003.css" rel="stylesheet">
|
||||
<link rel="modulepreload" href="./_app/immutable/entry/start.972c3fc2.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/chunks/scheduler.cbf234a0.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/chunks/singletons.13d7fb5f.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/chunks/index.14349a18.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/chunks/parse.bee59afc.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/entry/app.db385fd8.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/chunks/index.200976ee.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/nodes/0.7447a5e8.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/chunks/stores.c94eb2b9.js">
|
||||
<link rel="modulepreload" href="./_app/immutable/nodes/2.549c4b9e.js"><title>Home</title><!-- HEAD_svelte-t32ptj_START --><meta name="description" content="Svelte demo app"><!-- HEAD_svelte-t32ptj_END -->
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents"> <div class="app svelte-8o1gnw"><header class="svelte-1u9z1tp"><div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1jb641n"><a href="https://kit.svelte.dev" class="svelte-1u9z1tp"><img src="/_app/immutable/assets/svelte-logo.87df40b8.svg" alt="SvelteKit" class="svelte-1u9z1tp"></a></div> <nav class="svelte-1u9z1tp"><svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z" class="svelte-1u9z1tp"></path></svg> <ul class="svelte-1u9z1tp"><li aria-current="page" class="svelte-1u9z1tp"><a href="/" class="svelte-1u9z1tp" data-svelte-h="svelte-5a0zws">Home</a></li> <li class="svelte-1u9z1tp"><a href="/about" class="svelte-1u9z1tp" data-svelte-h="svelte-iphxk9">About</a></li> <li class="svelte-1u9z1tp"><a href="/sverdle" class="svelte-1u9z1tp" data-svelte-h="svelte-1mtf8rh">Sverdle</a></li></ul> <svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z" class="svelte-1u9z1tp"></path></svg></nav> <div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1gilmbv"><a href="https://github.com/sveltejs/kit" class="svelte-1u9z1tp"><img src="/_app/immutable/assets/github.1ea8d62e.svg" alt="GitHub" class="svelte-1u9z1tp"></a></div> </header> <main class="svelte-8o1gnw"> <section class="svelte-19xx0bt"><h1 class="svelte-19xx0bt" data-svelte-h="svelte-11s73ib"><span class="welcome svelte-19xx0bt"><picture><source srcset="/_app/immutable/assets/svelte-welcome.c18bcf5a.webp" type="image/webp"> <img src="/_app/immutable/assets/svelte-welcome.6c300099.png" alt="Welcome" class="svelte-19xx0bt"></picture></span>
|
||||
|
||||
to your new<br>SvelteKit app</h1> <h2 data-svelte-h="svelte-1e36z0s">try editing <strong>src/routes/+page.svelte</strong></h2> <div class="counter svelte-y96mxt"><button aria-label="Decrease the counter by one" class="svelte-y96mxt" data-svelte-h="svelte-97ppyc"><svg aria-hidden="true" viewBox="0 0 1 1" class="svelte-y96mxt"><path d="M0,0.5 L1,0.5" class="svelte-y96mxt"></path></svg></button> <div class="counter-viewport svelte-y96mxt"><div class="counter-digits svelte-y96mxt" style="transform: translate(0, 0%)"><strong class="hidden svelte-y96mxt" aria-hidden="true">1</strong> <strong class="svelte-y96mxt">0</strong></div></div> <button aria-label="Increase the counter by one" class="svelte-y96mxt" data-svelte-h="svelte-irev0c"><svg aria-hidden="true" viewBox="0 0 1 1" class="svelte-y96mxt"><path d="M0,0.5 L1,0.5 M0.5,0 L0.5,1" class="svelte-y96mxt"></path></svg></button> </div> </section></main> <footer class="svelte-8o1gnw" data-svelte-h="svelte-1dlfr5"><p>visit <a href="https://kit.svelte.dev" class="svelte-8o1gnw">kit.svelte.dev</a> to learn SvelteKit</p></footer> </div>
|
||||
|
||||
<script>
|
||||
{
|
||||
__sveltekit_16q4axl = {
|
||||
base: new URL(".", location).pathname.slice(0, -1),
|
||||
env: {}
|
||||
};
|
||||
|
||||
const element = document.currentScript.parentElement;
|
||||
|
||||
const data = [null,null];
|
||||
|
||||
Promise.all([
|
||||
import("./_app/immutable/entry/start.972c3fc2.js"),
|
||||
import("./_app/immutable/entry/app.db385fd8.js")
|
||||
]).then(([kit, app]) => {
|
||||
kit.start(app, element, {
|
||||
node_ids: [0, 2],
|
||||
data,
|
||||
form: null,
|
||||
error: null
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
20
Svelte-Build/src/prerendered/sverdle/how-to-play.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link href="../_app/immutable/assets/0.fa9427ff.css" rel="stylesheet">
|
||||
<link href="../_app/immutable/assets/5.89a9e780.css" rel="stylesheet"><title>How to play Sverdle</title><!-- HEAD_svelte-1fqqyy5_START --><meta name="description" content="How to play Sverdle"><!-- HEAD_svelte-1fqqyy5_END -->
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents"> <div class="app svelte-8o1gnw"><header class="svelte-1u9z1tp"><div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1jb641n"><a href="https://kit.svelte.dev" class="svelte-1u9z1tp"><img src="/_app/immutable/assets/svelte-logo.87df40b8.svg" alt="SvelteKit" class="svelte-1u9z1tp"></a></div> <nav class="svelte-1u9z1tp"><svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z" class="svelte-1u9z1tp"></path></svg> <ul class="svelte-1u9z1tp"><li class="svelte-1u9z1tp"><a href="/" class="svelte-1u9z1tp" data-svelte-h="svelte-5a0zws">Home</a></li> <li class="svelte-1u9z1tp"><a href="/about" class="svelte-1u9z1tp" data-svelte-h="svelte-iphxk9">About</a></li> <li aria-current="page" class="svelte-1u9z1tp"><a href="/sverdle" class="svelte-1u9z1tp" data-svelte-h="svelte-1mtf8rh">Sverdle</a></li></ul> <svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z" class="svelte-1u9z1tp"></path></svg></nav> <div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1gilmbv"><a href="https://github.com/sveltejs/kit" class="svelte-1u9z1tp"><img src="/_app/immutable/assets/github.1ea8d62e.svg" alt="GitHub" class="svelte-1u9z1tp"></a></div> </header> <main class="svelte-8o1gnw"> <div class="text-column" data-svelte-h="svelte-rdttnt"><h1>How to play Sverdle</h1> <p>Sverdle is a clone of <a href="https://www.nytimes.com/games/wordle/index.html">Wordle</a>, the
|
||||
word guessing game. To play, enter a five-letter English word. For example:</p> <div class="example svelte-1x5nq1n"><span class="close svelte-1x5nq1n">r</span> <span class="missing svelte-1x5nq1n">i</span> <span class="close svelte-1x5nq1n">t</span> <span class="missing svelte-1x5nq1n">z</span> <span class="exact svelte-1x5nq1n">y</span></div> <p class="svelte-1x5nq1n">The <span class="exact svelte-1x5nq1n">y</span> is in the right place. <span class="close svelte-1x5nq1n">r</span> and
|
||||
<span class="close svelte-1x5nq1n">t</span>
|
||||
are the right letters, but in the wrong place. The other letters are wrong, and can be discarded.
|
||||
Let's make another guess:</p> <div class="example svelte-1x5nq1n"><span class="exact svelte-1x5nq1n">p</span> <span class="exact svelte-1x5nq1n">a</span> <span class="exact svelte-1x5nq1n">r</span> <span class="exact svelte-1x5nq1n">t</span> <span class="exact svelte-1x5nq1n">y</span></div> <p>This time we guessed right! You have <strong>six</strong> guesses to get the word.</p> <p>Unlike the original Wordle, Sverdle runs on the server instead of in the browser, making it
|
||||
impossible to cheat. It uses <code><form></code> and cookies to submit data, meaning you can
|
||||
even play with JavaScript disabled!</p> </div></main> <footer class="svelte-8o1gnw" data-svelte-h="svelte-1dlfr5"><p>visit <a href="https://kit.svelte.dev" class="svelte-8o1gnw">kit.svelte.dev</a> to learn SvelteKit</p></footer> </div> </div>
|
||||
</body>
|
||||
</html>
|
||||
9
Svelte-Build/src/server/chunks/0-a54bfeef.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const index = 0;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_layout.svelte-f428a28b.js')).default;
|
||||
const imports = ["_app/immutable/nodes/0.7447a5e8.js","_app/immutable/chunks/scheduler.cbf234a0.js","_app/immutable/chunks/index.200976ee.js","_app/immutable/chunks/stores.c94eb2b9.js","_app/immutable/chunks/singletons.13d7fb5f.js","_app/immutable/chunks/index.14349a18.js"];
|
||||
const stylesheets = ["_app/immutable/assets/0.fa9427ff.css"];
|
||||
const fonts = ["_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.3df7909e.woff2","_app/immutable/assets/fira-mono-all-400-normal.1e3b098c.woff","_app/immutable/assets/fira-mono-cyrillic-400-normal.c7d433fd.woff2","_app/immutable/assets/fira-mono-greek-ext-400-normal.9e2fe623.woff2","_app/immutable/assets/fira-mono-greek-400-normal.a8be01ce.woff2","_app/immutable/assets/fira-mono-latin-ext-400-normal.6bfabd30.woff2","_app/immutable/assets/fira-mono-latin-400-normal.e43b3538.woff2"];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=0-a54bfeef.js.map
|
||||
1
Svelte-Build/src/server/chunks/0-a54bfeef.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"0-a54bfeef.js","sources":["../../../../SvelteKit-App/.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/0.7447a5e8.js\",\"_app/immutable/chunks/scheduler.cbf234a0.js\",\"_app/immutable/chunks/index.200976ee.js\",\"_app/immutable/chunks/stores.c94eb2b9.js\",\"_app/immutable/chunks/singletons.13d7fb5f.js\",\"_app/immutable/chunks/index.14349a18.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.fa9427ff.css\"];\nexport const fonts = [\"_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.3df7909e.woff2\",\"_app/immutable/assets/fira-mono-all-400-normal.1e3b098c.woff\",\"_app/immutable/assets/fira-mono-cyrillic-400-normal.c7d433fd.woff2\",\"_app/immutable/assets/fira-mono-greek-ext-400-normal.9e2fe623.woff2\",\"_app/immutable/assets/fira-mono-greek-400-normal.a8be01ce.woff2\",\"_app/immutable/assets/fira-mono-latin-ext-400-normal.6bfabd30.woff2\",\"_app/immutable/assets/fira-mono-latin-400-normal.e43b3538.woff2\"];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,EAAE;AACvB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE,QAAQ;AAC1G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,8CAA8C,CAAC,yCAAyC,EAAE;AAC9Q,MAAC,WAAW,GAAG,CAAC,sCAAsC,EAAE;AACxD,MAAC,KAAK,GAAG,CAAC,wEAAwE,CAAC,8DAA8D,CAAC,oEAAoE,CAAC,qEAAqE,CAAC,iEAAiE,CAAC,qEAAqE,CAAC,iEAAiE;;;;"}
|
||||
9
Svelte-Build/src/server/chunks/1-5db98e8e.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const index = 1;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./error.svelte-6fe9e439.js')).default;
|
||||
const imports = ["_app/immutable/nodes/1.f6506935.js","_app/immutable/chunks/scheduler.cbf234a0.js","_app/immutable/chunks/index.200976ee.js","_app/immutable/chunks/stores.c94eb2b9.js","_app/immutable/chunks/singletons.13d7fb5f.js","_app/immutable/chunks/index.14349a18.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=1-5db98e8e.js.map
|
||||
1
Svelte-Build/src/server/chunks/1-5db98e8e.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"1-5db98e8e.js","sources":["../../../../SvelteKit-App/.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.f6506935.js\",\"_app/immutable/chunks/scheduler.cbf234a0.js\",\"_app/immutable/chunks/index.200976ee.js\",\"_app/immutable/chunks/stores.c94eb2b9.js\",\"_app/immutable/chunks/singletons.13d7fb5f.js\",\"_app/immutable/chunks/index.14349a18.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,EAAE;AACvB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE,QAAQ;AAC5G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,8CAA8C,CAAC,yCAAyC,EAAE;AAC9Q,MAAC,WAAW,GAAG,GAAG;AAClB,MAAC,KAAK,GAAG;;;;"}
|
||||
13102
Svelte-Build/src/server/chunks/4-45ccd4e8.js
Normal file
1
Svelte-Build/src/server/chunks/4-45ccd4e8.js.map
Normal file
31
Svelte-Build/src/server/chunks/_layout.svelte-f428a28b.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { c as create_ssr_component, v as validate_component, a as subscribe, b as add_attribute } from './ssr-37307467.js';
|
||||
import { p as page } from './stores-c0aac90b.js';
|
||||
|
||||
const logo = "/_app/immutable/assets/svelte-logo.87df40b8.svg";
|
||||
const github = "/_app/immutable/assets/github.1ea8d62e.svg";
|
||||
const css$1 = {
|
||||
code: "header.svelte-1u9z1tp.svelte-1u9z1tp{display:flex;justify-content:space-between}.corner.svelte-1u9z1tp.svelte-1u9z1tp{width:3em;height:3em}.corner.svelte-1u9z1tp a.svelte-1u9z1tp{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.corner.svelte-1u9z1tp img.svelte-1u9z1tp{width:2em;height:2em;object-fit:contain}nav.svelte-1u9z1tp.svelte-1u9z1tp{display:flex;justify-content:center;--background:rgba(255, 255, 255, 0.7)}svg.svelte-1u9z1tp.svelte-1u9z1tp{width:2em;height:3em;display:block}path.svelte-1u9z1tp.svelte-1u9z1tp{fill:var(--background)}ul.svelte-1u9z1tp.svelte-1u9z1tp{position:relative;padding:0;margin:0;height:3em;display:flex;justify-content:center;align-items:center;list-style:none;background:var(--background);background-size:contain}li.svelte-1u9z1tp.svelte-1u9z1tp{position:relative;height:100%}li[aria-current='page'].svelte-1u9z1tp.svelte-1u9z1tp::before{--size:6px;content:'';width:0;height:0;position:absolute;top:0;left:calc(50% - var(--size));border:var(--size) solid transparent;border-top:var(--size) solid var(--color-theme-1)}nav.svelte-1u9z1tp a.svelte-1u9z1tp{display:flex;height:100%;align-items:center;padding:0 0.5rem;color:var(--color-text);font-weight:700;font-size:0.8rem;text-transform:uppercase;letter-spacing:0.1em;text-decoration:none;transition:color 0.2s linear}a.svelte-1u9z1tp.svelte-1u9z1tp:hover{color:var(--color-theme-1)}",
|
||||
map: null
|
||||
};
|
||||
const Header = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
let $page, $$unsubscribe_page;
|
||||
$$unsubscribe_page = subscribe(page, (value) => $page = value);
|
||||
$$result.css.add(css$1);
|
||||
$$unsubscribe_page();
|
||||
return `<header class="svelte-1u9z1tp"><div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1jb641n"><a href="https://kit.svelte.dev" class="svelte-1u9z1tp"><img${add_attribute("src", logo, 0)} alt="SvelteKit" class="svelte-1u9z1tp"></a></div> <nav class="svelte-1u9z1tp"><svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z" class="svelte-1u9z1tp"></path></svg> <ul class="svelte-1u9z1tp"><li${add_attribute("aria-current", $page.url.pathname === "/" ? "page" : void 0, 0)} class="svelte-1u9z1tp"><a href="/" class="svelte-1u9z1tp" data-svelte-h="svelte-5a0zws">Home</a></li> <li${add_attribute("aria-current", $page.url.pathname === "/about" ? "page" : void 0, 0)} class="svelte-1u9z1tp"><a href="/about" class="svelte-1u9z1tp" data-svelte-h="svelte-iphxk9">About</a></li> <li${add_attribute(
|
||||
"aria-current",
|
||||
$page.url.pathname.startsWith("/sverdle") ? "page" : void 0,
|
||||
0
|
||||
)} class="svelte-1u9z1tp"><a href="/sverdle" class="svelte-1u9z1tp" data-svelte-h="svelte-1mtf8rh">Sverdle</a></li></ul> <svg viewBox="0 0 2 3" aria-hidden="true" class="svelte-1u9z1tp"><path d="M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z" class="svelte-1u9z1tp"></path></svg></nav> <div class="corner svelte-1u9z1tp" data-svelte-h="svelte-1gilmbv"><a href="https://github.com/sveltejs/kit" class="svelte-1u9z1tp"><img${add_attribute("src", github, 0)} alt="GitHub" class="svelte-1u9z1tp"></a></div> </header>`;
|
||||
});
|
||||
const css = {
|
||||
code: ".app.svelte-8o1gnw.svelte-8o1gnw{display:flex;flex-direction:column;min-height:100vh}main.svelte-8o1gnw.svelte-8o1gnw{flex:1;display:flex;flex-direction:column;padding:1rem;width:100%;max-width:64rem;margin:0 auto;box-sizing:border-box}footer.svelte-8o1gnw.svelte-8o1gnw{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:12px}footer.svelte-8o1gnw a.svelte-8o1gnw{font-weight:bold}@media(min-width: 480px){footer.svelte-8o1gnw.svelte-8o1gnw{padding:12px 0}}",
|
||||
map: null
|
||||
};
|
||||
const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
$$result.css.add(css);
|
||||
return `<div class="app svelte-8o1gnw">${validate_component(Header, "Header").$$render($$result, {}, {}, {})} <main class="svelte-8o1gnw">${slots.default ? slots.default({}) : ``}</main> <footer class="svelte-8o1gnw" data-svelte-h="svelte-1dlfr5"><p>visit <a href="https://kit.svelte.dev" class="svelte-8o1gnw">kit.svelte.dev</a> to learn SvelteKit</p></footer> </div>`;
|
||||
});
|
||||
|
||||
export { Layout as default };
|
||||
//# sourceMappingURL=_layout.svelte-f428a28b.js.map
|
||||
73
Svelte-Build/src/server/chunks/_page.svelte-c6e4b665.js
Normal file
@@ -0,0 +1,73 @@
|
||||
import { c as create_ssr_component, a as subscribe, d as each, e as escape, b as add_attribute, n as null_to_empty } from './ssr-37307467.js';
|
||||
import { r as readable } from './index2-874ff619.js';
|
||||
|
||||
const get_initial_motion_preference = () => {
|
||||
return false;
|
||||
};
|
||||
const reduced_motion = readable(get_initial_motion_preference(), (set) => {
|
||||
});
|
||||
const css = {
|
||||
code: "form.svelte-1pg2j5l.svelte-1pg2j5l{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;flex:1}.how-to-play.svelte-1pg2j5l.svelte-1pg2j5l{color:var(--color-text)}.how-to-play.svelte-1pg2j5l.svelte-1pg2j5l::before{content:'i';display:inline-block;font-size:0.8em;font-weight:900;width:1em;height:1em;padding:0.2em;line-height:1;border:1.5px solid var(--color-text);border-radius:50%;text-align:center;margin:0 0.5em 0 0;position:relative;top:-0.05em}.grid.svelte-1pg2j5l.svelte-1pg2j5l{--width:min(100vw, 40vh, 380px);max-width:var(--width);align-self:center;justify-self:center;width:100%;height:100%;display:flex;flex-direction:column;justify-content:flex-start}.grid.svelte-1pg2j5l .row.svelte-1pg2j5l{display:grid;grid-template-columns:repeat(5, 1fr);grid-gap:0.2rem;margin:0 0 0.2rem 0}@media(prefers-reduced-motion: no-preference){.grid.bad-guess.svelte-1pg2j5l .row.current.svelte-1pg2j5l{animation:svelte-1pg2j5l-wiggle 0.5s}}.grid.playing.svelte-1pg2j5l .row.current.svelte-1pg2j5l{filter:drop-shadow(3px 3px 10px var(--color-bg-0))}.letter.svelte-1pg2j5l.svelte-1pg2j5l{aspect-ratio:1;width:100%;display:flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;text-transform:lowercase;border:none;font-size:calc(0.08 * var(--width));border-radius:2px;background:white;margin:0;color:rgba(0, 0, 0, 0.7)}.letter.missing.svelte-1pg2j5l.svelte-1pg2j5l{background:rgba(255, 255, 255, 0.5);color:rgba(0, 0, 0, 0.5)}.letter.exact.svelte-1pg2j5l.svelte-1pg2j5l{background:var(--color-theme-2);color:white}.letter.close.svelte-1pg2j5l.svelte-1pg2j5l{border:2px solid var(--color-theme-2)}.selected.svelte-1pg2j5l.svelte-1pg2j5l{outline:2px solid var(--color-theme-1)}.controls.svelte-1pg2j5l.svelte-1pg2j5l{text-align:center;justify-content:center;height:min(18vh, 10rem)}.keyboard.svelte-1pg2j5l.svelte-1pg2j5l{--gap:0.2rem;position:relative;display:flex;flex-direction:column;gap:var(--gap);height:100%}.keyboard.svelte-1pg2j5l .row.svelte-1pg2j5l{display:flex;justify-content:center;gap:0.2rem;flex:1}.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l,.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l:disabled{--size:min(8vw, 4vh, 40px);background-color:white;color:black;width:var(--size);border:none;border-radius:2px;font-size:calc(var(--size) * 0.5);margin:0}.keyboard.svelte-1pg2j5l button.exact.svelte-1pg2j5l{background:var(--color-theme-2);color:white}.keyboard.svelte-1pg2j5l button.missing.svelte-1pg2j5l{opacity:0.5}.keyboard.svelte-1pg2j5l button.close.svelte-1pg2j5l{border:2px solid var(--color-theme-2)}.keyboard.svelte-1pg2j5l button.svelte-1pg2j5l:focus{background:var(--color-theme-1);color:white;outline:none}.keyboard.svelte-1pg2j5l button[data-key='enter'].svelte-1pg2j5l,.keyboard.svelte-1pg2j5l button[data-key='backspace'].svelte-1pg2j5l{position:absolute;bottom:0;width:calc(1.5 * var(--size));height:calc(1 / 3 * (100% - 2 * var(--gap)));text-transform:uppercase;font-size:calc(0.3 * var(--size));padding-top:calc(0.15 * var(--size))}.keyboard.svelte-1pg2j5l button[data-key='enter'].svelte-1pg2j5l{right:calc(50% + 3.5 * var(--size) + 0.8rem)}.keyboard.svelte-1pg2j5l button[data-key='backspace'].svelte-1pg2j5l{left:calc(50% + 3.5 * var(--size) + 0.8rem)}.keyboard.svelte-1pg2j5l button[data-key='enter'].svelte-1pg2j5l:disabled{opacity:0.5}.restart.svelte-1pg2j5l.svelte-1pg2j5l{width:100%;padding:1rem;background:rgba(255, 255, 255, 0.5);border-radius:2px;border:none}.restart.svelte-1pg2j5l.svelte-1pg2j5l:focus,.restart.svelte-1pg2j5l.svelte-1pg2j5l:hover{background:var(--color-theme-1);color:white;outline:none}@keyframes svelte-1pg2j5l-wiggle{0%{transform:translateX(0)}10%{transform:translateX(-2px)}30%{transform:translateX(4px)}50%{transform:translateX(-6px)}70%{transform:translateX(+4px)}90%{transform:translateX(-2px)}100%{transform:translateX(0)}}",
|
||||
map: null
|
||||
};
|
||||
const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
let won;
|
||||
let i;
|
||||
let currentGuess;
|
||||
let submittable;
|
||||
let $$unsubscribe_reduced_motion;
|
||||
$$unsubscribe_reduced_motion = subscribe(reduced_motion, (value) => value);
|
||||
let { data } = $$props;
|
||||
let { form } = $$props;
|
||||
let classnames;
|
||||
let description;
|
||||
if ($$props.data === void 0 && $$bindings.data && data !== void 0)
|
||||
$$bindings.data(data);
|
||||
if ($$props.form === void 0 && $$bindings.form && form !== void 0)
|
||||
$$bindings.form(form);
|
||||
$$result.css.add(css);
|
||||
won = data.answers.at(-1) === "xxxxx";
|
||||
i = won ? -1 : data.answers.length;
|
||||
currentGuess = data.guesses[i] || "";
|
||||
submittable = currentGuess.length === 5;
|
||||
{
|
||||
{
|
||||
classnames = {};
|
||||
description = {};
|
||||
data.answers.forEach((answer, i2) => {
|
||||
const guess = data.guesses[i2];
|
||||
for (let i3 = 0; i3 < 5; i3 += 1) {
|
||||
const letter = guess[i3];
|
||||
if (answer[i3] === "x") {
|
||||
classnames[letter] = "exact";
|
||||
description[letter] = "correct";
|
||||
} else if (!classnames[letter]) {
|
||||
classnames[letter] = answer[i3] === "c" ? "close" : "missing";
|
||||
description[letter] = answer[i3] === "c" ? "present" : "absent";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
$$unsubscribe_reduced_motion();
|
||||
return ` ${$$result.head += `<!-- HEAD_svelte-18lvto8_START -->${$$result.title = `<title>Sverdle</title>`, ""}<meta name="description" content="A Wordle clone written in SvelteKit"><!-- HEAD_svelte-18lvto8_END -->`, ""} <h1 class="visually-hidden" data-svelte-h="svelte-16hvqlg">Sverdle</h1> <form method="POST" action="?/enter" class="svelte-1pg2j5l"><a class="how-to-play svelte-1pg2j5l" href="/sverdle/how-to-play" data-svelte-h="svelte-1w3fhu3">How to play</a> <div class="${[
|
||||
"grid svelte-1pg2j5l",
|
||||
(!won ? "playing" : "") + " " + (form?.badGuess ? "bad-guess" : "")
|
||||
].join(" ").trim()}">${each(Array.from(Array(6).keys()), (row) => {
|
||||
let current = row === i;
|
||||
return ` <h2 class="visually-hidden">Row ${escape(row + 1)}</h2> <div class="${["row svelte-1pg2j5l", current ? "current" : ""].join(" ").trim()}">${each(Array.from(Array(5).keys()), (column) => {
|
||||
let guess = current ? currentGuess : data.guesses[row], answer = data.answers[row]?.[column], value = guess?.[column] ?? "", selected = current && column === guess.length, exact = answer === "x", close = answer === "c", missing = answer === "_";
|
||||
return ` <div class="${[
|
||||
"letter svelte-1pg2j5l",
|
||||
(exact ? "exact" : "") + " " + (close ? "close" : "") + " " + (missing ? "missing" : "") + " " + (selected ? "selected" : "")
|
||||
].join(" ").trim()}">${escape(value)} <span class="visually-hidden">${exact ? `(correct)` : `${close ? `(present)` : `${missing ? `(absent)` : `empty`}`}`}</span> <input name="guess" ${!current ? "disabled" : ""} type="hidden"${add_attribute("value", value, 0)}> </div>`;
|
||||
})} </div>`;
|
||||
})}</div> <div class="controls svelte-1pg2j5l">${won || data.answers.length >= 6 ? `${!won && data.answer ? `<p>the answer was "${escape(data.answer)}"</p>` : ``} <button data-key="enter" class="restart selected svelte-1pg2j5l" formaction="?/restart">${escape(won ? "you won :)" : `game over :(`)} play again?</button>` : `<div class="keyboard svelte-1pg2j5l"><button data-key="enter" ${!submittable ? "disabled" : ""} class="${["svelte-1pg2j5l", submittable ? "selected" : ""].join(" ").trim()}">enter</button> <button data-key="backspace" formaction="?/update" name="key" value="backspace" class="svelte-1pg2j5l" data-svelte-h="svelte-1ptb1bp">back</button> ${each(["qwertyuiop", "asdfghjkl", "zxcvbnm"], (row) => {
|
||||
return `<div class="row svelte-1pg2j5l">${each(row, (letter) => {
|
||||
return `<button${add_attribute("data-key", letter, 0)} class="${escape(null_to_empty(classnames[letter]), true) + " svelte-1pg2j5l"}" ${submittable ? "disabled" : ""} formaction="?/update" name="key"${add_attribute("value", letter, 0)} aria-label="${escape(letter, true) + " " + escape(description[letter] || "", true)}">${escape(letter)} </button>`;
|
||||
})} </div>`;
|
||||
})}</div>`}</div></form> ${won ? `<div style="position: absolute; left: 50%; top: 30%"></div>` : ``}`;
|
||||
});
|
||||
|
||||
export { Page as default };
|
||||
//# sourceMappingURL=_page.svelte-c6e4b665.js.map
|
||||
12
Svelte-Build/src/server/chunks/error.svelte-6fe9e439.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { c as create_ssr_component, a as subscribe, e as escape } from './ssr-37307467.js';
|
||||
import { p as page } from './stores-c0aac90b.js';
|
||||
|
||||
const Error = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
let $page, $$unsubscribe_page;
|
||||
$$unsubscribe_page = subscribe(page, (value) => $page = value);
|
||||
$$unsubscribe_page();
|
||||
return `<h1>${escape($page.status)}</h1> <p>${escape($page.error?.message)}</p>`;
|
||||
});
|
||||
|
||||
export { Error as default };
|
||||
//# sourceMappingURL=error.svelte-6fe9e439.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"error.svelte-6fe9e439.js","sources":["../../../../SvelteKit-App/.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { c as create_ssr_component, a as subscribe, e as escape } from \"../../chunks/ssr.js\";\nimport { p as page } from \"../../chunks/stores.js\";\nconst Error = create_ssr_component(($$result, $$props, $$bindings, slots) => {\n let $page, $$unsubscribe_page;\n $$unsubscribe_page = subscribe(page, (value) => $page = value);\n $$unsubscribe_page();\n return `<h1>${escape($page.status)}</h1> <p>${escape($page.error?.message)}</p>`;\n});\nexport {\n Error as default\n};\n"],"names":[],"mappings":";;;AAEK,MAAC,KAAK,GAAG,oBAAoB,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,KAAK;AAC7E,EAAE,IAAI,KAAK,EAAE,kBAAkB,CAAC;AAChC,EAAE,kBAAkB,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,KAAK,GAAG,KAAK,CAAC,CAAC;AACjE,EAAE,kBAAkB,EAAE,CAAC;AACvB,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACnF,CAAC;;;;"}
|
||||
81
Svelte-Build/src/server/chunks/index-916a7dc8.js
Normal file
@@ -0,0 +1,81 @@
|
||||
class HttpError {
|
||||
/**
|
||||
* @param {number} status
|
||||
* @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body
|
||||
*/
|
||||
constructor(status, body) {
|
||||
this.status = status;
|
||||
if (typeof body === "string") {
|
||||
this.body = { message: body };
|
||||
} else if (body) {
|
||||
this.body = body;
|
||||
} else {
|
||||
this.body = { message: `Error: ${status}` };
|
||||
}
|
||||
}
|
||||
toString() {
|
||||
return JSON.stringify(this.body);
|
||||
}
|
||||
}
|
||||
class Redirect {
|
||||
/**
|
||||
* @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
|
||||
* @param {string} location
|
||||
*/
|
||||
constructor(status, location) {
|
||||
this.status = status;
|
||||
this.location = location;
|
||||
}
|
||||
}
|
||||
class ActionFailure {
|
||||
/**
|
||||
* @param {number} status
|
||||
* @param {T} [data]
|
||||
*/
|
||||
constructor(status, data) {
|
||||
this.status = status;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
function error(status, body) {
|
||||
if (isNaN(status) || status < 400 || status > 599) {
|
||||
throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);
|
||||
}
|
||||
return new HttpError(status, body);
|
||||
}
|
||||
function json(data, init) {
|
||||
const body = JSON.stringify(data);
|
||||
const headers = new Headers(init?.headers);
|
||||
if (!headers.has("content-length")) {
|
||||
headers.set("content-length", encoder.encode(body).byteLength.toString());
|
||||
}
|
||||
if (!headers.has("content-type")) {
|
||||
headers.set("content-type", "application/json");
|
||||
}
|
||||
return new Response(body, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
const encoder = new TextEncoder();
|
||||
function text(body, init) {
|
||||
const headers = new Headers(init?.headers);
|
||||
if (!headers.has("content-length")) {
|
||||
const encoded = encoder.encode(body);
|
||||
headers.set("content-length", encoded.byteLength.toString());
|
||||
return new Response(encoded, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
return new Response(body, {
|
||||
...init,
|
||||
headers
|
||||
});
|
||||
}
|
||||
function fail(status, data) {
|
||||
return new ActionFailure(status, data);
|
||||
}
|
||||
|
||||
export { ActionFailure as A, HttpError as H, Redirect as R, error as e, fail as f, json as j, text as t };
|
||||
//# sourceMappingURL=index-916a7dc8.js.map
|
||||
1
Svelte-Build/src/server/chunks/index-916a7dc8.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-916a7dc8.js","sources":["../../../../SvelteKit-App/.svelte-kit/adapter-node/chunks/index.js"],"sourcesContent":["class HttpError {\n /**\n * @param {number} status\n * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n */\n constructor(status, body) {\n this.status = status;\n if (typeof body === \"string\") {\n this.body = { message: body };\n } else if (body) {\n this.body = body;\n } else {\n this.body = { message: `Error: ${status}` };\n }\n }\n toString() {\n return JSON.stringify(this.body);\n }\n}\nclass Redirect {\n /**\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n * @param {string} location\n */\n constructor(status, location) {\n this.status = status;\n this.location = location;\n }\n}\nclass ActionFailure {\n /**\n * @param {number} status\n * @param {T} [data]\n */\n constructor(status, data) {\n this.status = status;\n this.data = data;\n }\n}\nfunction error(status, body) {\n if (isNaN(status) || status < 400 || status > 599) {\n throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n }\n return new HttpError(status, body);\n}\nfunction json(data, init) {\n const body = JSON.stringify(data);\n const headers = new Headers(init?.headers);\n if (!headers.has(\"content-length\")) {\n headers.set(\"content-length\", encoder.encode(body).byteLength.toString());\n }\n if (!headers.has(\"content-type\")) {\n headers.set(\"content-type\", \"application/json\");\n }\n return new Response(body, {\n ...init,\n headers\n });\n}\nconst encoder = new TextEncoder();\nfunction text(body, init) {\n const headers = new Headers(init?.headers);\n if (!headers.has(\"content-length\")) {\n const encoded = encoder.encode(body);\n headers.set(\"content-length\", encoded.byteLength.toString());\n return new Response(encoded, {\n ...init,\n headers\n });\n }\n return new Response(body, {\n ...init,\n headers\n });\n}\nfunction fail(status, data) {\n return new ActionFailure(status, data);\n}\nexport {\n ActionFailure as A,\n HttpError as H,\n Redirect as R,\n error as e,\n fail as f,\n json as j,\n text as t\n};\n"],"names":[],"mappings":"AAAA,MAAM,SAAS,CAAC;AAChB;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE;AAC5B,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAClC,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACpC,KAAK,MAAM,IAAI,IAAI,EAAE;AACrB,MAAM,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACvB,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;AAClD,KAAK;AACL,GAAG;AACH,EAAE,QAAQ,GAAG;AACb,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrC,GAAG;AACH,CAAC;AACD,MAAM,QAAQ,CAAC;AACf;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7B,GAAG;AACH,CAAC;AACD,MAAM,aAAa,CAAC;AACpB;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE;AAC5B,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,GAAG;AACH,CAAC;AACD,SAAS,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;AAC7B,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,GAAG,IAAI,MAAM,GAAG,GAAG,EAAE;AACrD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,sDAAsD,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAClG,GAAG;AACH,EAAE,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC;AACD,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AAC1B,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACpC,EAAE,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7C,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;AACtC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9E,GAAG;AACH,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;AACpC,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;AACpD,GAAG;AACH,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC5B,IAAI,GAAG,IAAI;AACX,IAAI,OAAO;AACX,GAAG,CAAC,CAAC;AACL,CAAC;AACD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AAC1B,EAAE,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7C,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;AACtC,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AACjE,IAAI,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;AACjC,MAAM,GAAG,IAAI;AACb,MAAM,OAAO;AACb,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC5B,IAAI,GAAG,IAAI;AACX,IAAI,OAAO;AACX,GAAG,CAAC,CAAC;AACL,CAAC;AACD,SAAS,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE;AAC5B,EAAE,OAAO,IAAI,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzC;;;;"}
|
||||
52
Svelte-Build/src/server/chunks/index2-874ff619.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import { f as noop, h as safe_not_equal } from './ssr-37307467.js';
|
||||
|
||||
const subscriber_queue = [];
|
||||
function readable(value, start) {
|
||||
return {
|
||||
subscribe: writable(value, start).subscribe
|
||||
};
|
||||
}
|
||||
function writable(value, start = noop) {
|
||||
let stop;
|
||||
const subscribers = /* @__PURE__ */ new Set();
|
||||
function set(new_value) {
|
||||
if (safe_not_equal(value, new_value)) {
|
||||
value = new_value;
|
||||
if (stop) {
|
||||
const run_queue = !subscriber_queue.length;
|
||||
for (const subscriber of subscribers) {
|
||||
subscriber[1]();
|
||||
subscriber_queue.push(subscriber, value);
|
||||
}
|
||||
if (run_queue) {
|
||||
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
||||
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
||||
}
|
||||
subscriber_queue.length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function update(fn) {
|
||||
set(fn(value));
|
||||
}
|
||||
function subscribe(run, invalidate = noop) {
|
||||
const subscriber = [run, invalidate];
|
||||
subscribers.add(subscriber);
|
||||
if (subscribers.size === 1) {
|
||||
stop = start(set, update) || noop;
|
||||
}
|
||||
run(value);
|
||||
return () => {
|
||||
subscribers.delete(subscriber);
|
||||
if (subscribers.size === 0 && stop) {
|
||||
stop();
|
||||
stop = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
return { set, update, subscribe };
|
||||
}
|
||||
|
||||
export { readable as r, writable as w };
|
||||
//# sourceMappingURL=index2-874ff619.js.map
|
||||
1
Svelte-Build/src/server/chunks/index2-874ff619.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index2-874ff619.js","sources":["../../../../SvelteKit-App/.svelte-kit/adapter-node/chunks/index2.js"],"sourcesContent":["import { n as noop, h as safe_not_equal } from \"./ssr.js\";\nconst subscriber_queue = [];\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = /* @__PURE__ */ new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) {\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set, update) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0 && stop) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nexport {\n readable as r,\n writable as w\n};\n"],"names":[],"mappings":";;AACA,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE;AAChC,EAAE,OAAO;AACT,IAAI,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,SAAS;AAC/C,GAAG,CAAC;AACJ,CAAC;AACD,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE;AACvC,EAAE,IAAI,IAAI,CAAC;AACX,EAAE,MAAM,WAAW,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAChD,EAAE,SAAS,GAAG,CAAC,SAAS,EAAE;AAC1B,IAAI,IAAI,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;AAC1C,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,IAAI,IAAI,EAAE;AAChB,QAAQ,MAAM,SAAS,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC;AACnD,QAAQ,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;AAC9C,UAAU,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1B,UAAU,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACnD,SAAS;AACT,QAAQ,IAAI,SAAS,EAAE;AACvB,UAAU,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AAC/D,YAAY,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC5D,WAAW;AACX,UAAU,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;AACtC,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE;AACtB,IAAI,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,EAAE;AAC7C,IAAI,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACzC,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAChC,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE;AAChC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC;AACxC,KAAK;AACL,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;AACf,IAAI,OAAO,MAAM;AACjB,MAAM,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACrC,MAAM,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE;AAC1C,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,IAAI,GAAG,IAAI,CAAC;AACpB,OAAO;AACP,KAAK,CAAC;AACN,GAAG;AACH,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACpC;;;;"}
|
||||
129
Svelte-Build/src/server/chunks/ssr-37307467.js
Normal file
@@ -0,0 +1,129 @@
|
||||
function noop() {
|
||||
}
|
||||
function run(fn) {
|
||||
return fn();
|
||||
}
|
||||
function blank_object() {
|
||||
return /* @__PURE__ */ Object.create(null);
|
||||
}
|
||||
function run_all(fns) {
|
||||
fns.forEach(run);
|
||||
}
|
||||
function safe_not_equal(a, b) {
|
||||
return a != a ? b == b : a !== b || a && typeof a === "object" || typeof a === "function";
|
||||
}
|
||||
function subscribe(store, ...callbacks) {
|
||||
if (store == null) {
|
||||
for (const callback of callbacks) {
|
||||
callback(void 0);
|
||||
}
|
||||
return noop;
|
||||
}
|
||||
const unsub = store.subscribe(...callbacks);
|
||||
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
||||
}
|
||||
function null_to_empty(value) {
|
||||
return value == null ? "" : value;
|
||||
}
|
||||
let current_component;
|
||||
function set_current_component(component) {
|
||||
current_component = component;
|
||||
}
|
||||
function get_current_component() {
|
||||
if (!current_component)
|
||||
throw new Error("Function called outside component initialization");
|
||||
return current_component;
|
||||
}
|
||||
function setContext(key, context) {
|
||||
get_current_component().$$.context.set(key, context);
|
||||
return context;
|
||||
}
|
||||
function getContext(key) {
|
||||
return get_current_component().$$.context.get(key);
|
||||
}
|
||||
function ensure_array_like(array_like_or_iterator) {
|
||||
return array_like_or_iterator?.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator);
|
||||
}
|
||||
const ATTR_REGEX = /[&"]/g;
|
||||
const CONTENT_REGEX = /[&<]/g;
|
||||
function escape(value, is_attr = false) {
|
||||
const str = String(value);
|
||||
const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;
|
||||
pattern.lastIndex = 0;
|
||||
let escaped = "";
|
||||
let last = 0;
|
||||
while (pattern.test(str)) {
|
||||
const i = pattern.lastIndex - 1;
|
||||
const ch = str[i];
|
||||
escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === '"' ? """ : "<");
|
||||
last = i + 1;
|
||||
}
|
||||
return escaped + str.substring(last);
|
||||
}
|
||||
function each(items, fn) {
|
||||
items = ensure_array_like(items);
|
||||
let str = "";
|
||||
for (let i = 0; i < items.length; i += 1) {
|
||||
str += fn(items[i], i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
const missing_component = {
|
||||
$$render: () => ""
|
||||
};
|
||||
function validate_component(component, name) {
|
||||
if (!component || !component.$$render) {
|
||||
if (name === "svelte:component")
|
||||
name += " this={...}";
|
||||
throw new Error(
|
||||
`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`
|
||||
);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
let on_destroy;
|
||||
function create_ssr_component(fn) {
|
||||
function $$render(result, props, bindings, slots, context) {
|
||||
const parent_component = current_component;
|
||||
const $$ = {
|
||||
on_destroy,
|
||||
context: new Map(context || (parent_component ? parent_component.$$.context : [])),
|
||||
// these will be immediately discarded
|
||||
on_mount: [],
|
||||
before_update: [],
|
||||
after_update: [],
|
||||
callbacks: blank_object()
|
||||
};
|
||||
set_current_component({ $$ });
|
||||
const html = fn(result, props, bindings, slots);
|
||||
set_current_component(parent_component);
|
||||
return html;
|
||||
}
|
||||
return {
|
||||
render: (props = {}, { $$slots = {}, context = /* @__PURE__ */ new Map() } = {}) => {
|
||||
on_destroy = [];
|
||||
const result = { title: "", head: "", css: /* @__PURE__ */ new Set() };
|
||||
const html = $$render(result, props, {}, $$slots, context);
|
||||
run_all(on_destroy);
|
||||
return {
|
||||
html,
|
||||
css: {
|
||||
code: Array.from(result.css).map((css) => css.code).join("\n"),
|
||||
map: null
|
||||
// TODO
|
||||
},
|
||||
head: result.title + result.head
|
||||
};
|
||||
},
|
||||
$$render
|
||||
};
|
||||
}
|
||||
function add_attribute(name, value, boolean) {
|
||||
if (value == null || boolean && !value)
|
||||
return "";
|
||||
const assignment = boolean && value === true ? "" : `="${escape(value, true)}"`;
|
||||
return ` ${name}${assignment}`;
|
||||
}
|
||||
|
||||
export { subscribe as a, add_attribute as b, create_ssr_component as c, each as d, escape as e, noop as f, getContext as g, safe_not_equal as h, missing_component as m, null_to_empty as n, setContext as s, validate_component as v };
|
||||
//# sourceMappingURL=ssr-37307467.js.map
|
||||
1
Svelte-Build/src/server/chunks/ssr-37307467.js.map
Normal file
26
Svelte-Build/src/server/chunks/stores-c0aac90b.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { g as getContext } from './ssr-37307467.js';
|
||||
|
||||
const getStores = () => {
|
||||
const stores = getContext("__svelte__");
|
||||
return {
|
||||
/** @type {typeof page} */
|
||||
page: {
|
||||
subscribe: stores.page.subscribe
|
||||
},
|
||||
/** @type {typeof navigating} */
|
||||
navigating: {
|
||||
subscribe: stores.navigating.subscribe
|
||||
},
|
||||
/** @type {typeof updated} */
|
||||
updated: stores.updated
|
||||
};
|
||||
};
|
||||
const page = {
|
||||
subscribe(fn) {
|
||||
const store = getStores().page;
|
||||
return store.subscribe(fn);
|
||||
}
|
||||
};
|
||||
|
||||
export { page as p };
|
||||
//# sourceMappingURL=stores-c0aac90b.js.map
|
||||
1
Svelte-Build/src/server/chunks/stores-c0aac90b.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stores-c0aac90b.js","sources":["../../../../SvelteKit-App/.svelte-kit/adapter-node/chunks/stores.js"],"sourcesContent":["import { g as getContext } from \"./ssr.js\";\nconst getStores = () => {\n const stores = getContext(\"__svelte__\");\n return {\n /** @type {typeof page} */\n page: {\n subscribe: stores.page.subscribe\n },\n /** @type {typeof navigating} */\n navigating: {\n subscribe: stores.navigating.subscribe\n },\n /** @type {typeof updated} */\n updated: stores.updated\n };\n};\nconst page = {\n subscribe(fn) {\n const store = getStores().page;\n return store.subscribe(fn);\n }\n};\nexport {\n page as p\n};\n"],"names":[],"mappings":";;AACA,MAAM,SAAS,GAAG,MAAM;AACxB,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAC1C,EAAE,OAAO;AACT;AACA,IAAI,IAAI,EAAE;AACV,MAAM,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS;AACtC,KAAK;AACL;AACA,IAAI,UAAU,EAAE;AAChB,MAAM,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS;AAC5C,KAAK;AACL;AACA,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO;AAC3B,GAAG,CAAC;AACJ,CAAC,CAAC;AACG,MAAC,IAAI,GAAG;AACb,EAAE,SAAS,CAAC,EAAE,EAAE;AAChB,IAAI,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC;AACnC,IAAI,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAC/B,GAAG;AACH;;;;"}
|
||||
4053
Svelte-Build/src/server/index.js
Normal file
1
Svelte-Build/src/server/index.js.map
Normal file
39
Svelte-Build/src/server/manifest.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const manifest = (() => {
|
||||
function __memo(fn) {
|
||||
let value;
|
||||
return () => value ??= (value = fn());
|
||||
}
|
||||
|
||||
return {
|
||||
appDir: "_app",
|
||||
appPath: "_app",
|
||||
assets: new Set(["favicon.png","robots.txt"]),
|
||||
mimeTypes: {".png":"image/png",".txt":"text/plain"},
|
||||
_: {
|
||||
client: {"start":"_app/immutable/entry/start.972c3fc2.js","app":"_app/immutable/entry/app.db385fd8.js","imports":["_app/immutable/entry/start.972c3fc2.js","_app/immutable/chunks/scheduler.cbf234a0.js","_app/immutable/chunks/singletons.13d7fb5f.js","_app/immutable/chunks/index.14349a18.js","_app/immutable/chunks/parse.bee59afc.js","_app/immutable/entry/app.db385fd8.js","_app/immutable/chunks/scheduler.cbf234a0.js","_app/immutable/chunks/index.200976ee.js"],"stylesheets":[],"fonts":[]},
|
||||
nodes: [
|
||||
__memo(() => import('./chunks/0-a54bfeef.js')),
|
||||
__memo(() => import('./chunks/1-5db98e8e.js')),
|
||||
__memo(() => import('./chunks/4-45ccd4e8.js'))
|
||||
],
|
||||
routes: [
|
||||
{
|
||||
id: "/sverdle",
|
||||
pattern: /^\/sverdle\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
||||
endpoint: null
|
||||
}
|
||||
],
|
||||
matchers: async () => {
|
||||
|
||||
return { };
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
const prerendered = new Set(["/","/about","/sverdle/how-to-play"]);
|
||||
|
||||
export { manifest, prerendered };
|
||||
//# sourceMappingURL=manifest.js.map
|
||||
1
Svelte-Build/src/server/manifest.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"manifest.js","sources":["../../../SvelteKit-App/.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"favicon.png\",\"robots.txt\"]),\n\tmimeTypes: {\".png\":\"image/png\",\".txt\":\"text/plain\"},\n\t_: {\n\t\tclient: {\"start\":\"_app/immutable/entry/start.972c3fc2.js\",\"app\":\"_app/immutable/entry/app.db385fd8.js\",\"imports\":[\"_app/immutable/entry/start.972c3fc2.js\",\"_app/immutable/chunks/scheduler.cbf234a0.js\",\"_app/immutable/chunks/singletons.13d7fb5f.js\",\"_app/immutable/chunks/index.14349a18.js\",\"_app/immutable/chunks/parse.bee59afc.js\",\"_app/immutable/entry/app.db385fd8.js\",\"_app/immutable/chunks/scheduler.cbf234a0.js\",\"_app/immutable/chunks/index.200976ee.js\"],\"stylesheets\":[],\"fonts\":[]},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/4.js'))\n\t\t],\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/sverdle\",\n\t\t\t\tpattern: /^\\/sverdle\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t}\n\t}\n}\n})();\n\nexport const prerendered = new Set([\"/\",\"/about\",\"/sverdle/how-to-play\"]);\n"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK,CAAC;AACX,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AACD;AACA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;AAC9C,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC;AACpD,CAAC,CAAC,EAAE;AACJ,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,wCAAwC,CAAC,KAAK,CAAC,sCAAsC,CAAC,SAAS,CAAC,CAAC,wCAAwC,CAAC,6CAA6C,CAAC,8CAA8C,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,sCAAsC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAC1e,EAAE,KAAK,EAAE;AACT,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,GAAG;AACH,IAAI,EAAE,EAAE,UAAU;AAClB,IAAI,OAAO,EAAE,gBAAgB;AAC7B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI;AACJ,GAAG;AACH,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI,CAAC;AACf,GAAG;AACH,EAAE;AACF,CAAC;AACD,CAAC,IAAI;AACL;AACY,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,sBAAsB,CAAC;;;;"}
|
||||
20414
Svelte-Build/src/shims.js
Normal file
13
SvelteKit-App/.eslintignore
Normal file
@@ -0,0 +1,13 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
30
SvelteKit-App/.eslintrc.cjs
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:svelte/recommended',
|
||||
'prettier'
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint'],
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2020,
|
||||
extraFileExtensions: ['.svelte']
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
node: true
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.svelte'],
|
||||
parser: 'svelte-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
12
SvelteKit-App/.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
.vercel
|
||||
.output
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||