From c7ed7e72d45fab941cff4a7b109d04c652f209b4 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 11 Apr 2024 20:43:13 +1000 Subject: [PATCH 1/5] Major plugin updates --- mkdocs-website/docs/en/learn/plugins.md | 65 ++++ mkdocs-website/mkdocs.yml | 1 + v3/examples/frameless/assets/index.html | 4 +- v3/examples/plugins/assets/index.html | 330 ++++++++++++++---- v3/examples/plugins/assets/style.css | 202 +++++++++++ v3/examples/plugins/experimental/README.md | 4 - .../plugins/{plugins => }/hashes/README.md | 3 +- .../plugins/{plugins => }/hashes/plugin.go | 5 +- .../plugins/{plugins => }/hashes/plugin.toml | 0 v3/examples/plugins/main.go | 12 +- .../plugins/plugins/hashes/hashes.d.ts | 8 - v3/examples/plugins/plugins/hashes/hashes.js | 4 - v3/examples/plugins/store.json | 2 +- v3/examples/plugins/test.db | Bin 8192 -> 8192 bytes v3/go.mod | 2 +- v3/internal/assetserver/assetserver.go | 76 +++- .../bundledassets/runtime.debug.js | 88 +++-- .../assetserver/bundledassets/runtime.js | 2 +- .../desktop/@wailsio/runtime/src/drag.js | 104 +++--- v3/pkg/application/plugins.go | 14 +- v3/plugins/{ => experimental}/oauth/README.md | 0 v3/plugins/experimental/oauth/go.mod | 61 ++++ v3/plugins/experimental/oauth/go.sum | 219 ++++++++++++ v3/plugins/{ => experimental}/oauth/plugin.go | 0 v3/plugins/{ => experimental}/oauth/plugin.js | 0 .../{ => experimental}/oauth/plugin.yaml | 0 .../single_instance/README.md | 0 .../single_instance/go-singleinstance.LICENSE | 0 .../single_instance/lock.go | 0 .../single_instance/lock_posix.go | 0 .../single_instance/lock_windows.go | 0 .../single_instance/plugin.go | 5 +- .../single_instance/plugin.yaml | 0 .../single_instance/plugin_darwin.go | 0 .../single_instance/plugin_linux.go | 0 .../single_instance/plugin_windows.go | 0 .../start_at_login/README.md | 0 .../start_at_login/plugin.go | 9 +- .../start_at_login/plugin.yaml | 0 .../start_at_login/plugin_darwin.go | 0 .../start_at_login/plugin_linux.go | 0 .../start_at_login/plugin_window.go | 0 v3/plugins/kvstore/README.md | 25 +- .../kvstore/{plugin.js => assets/kvstore.js} | 17 +- v3/plugins/kvstore/kvstore.go | 33 +- v3/plugins/log/{plugin.js => assets/log.js} | 30 +- v3/plugins/log/plugin.go | 10 +- v3/plugins/sqlite/assets/sqlite.js | 39 +++ v3/plugins/sqlite/plugin.go | 41 +-- v3/plugins/sqlite/sqlite_close.js | 8 - v3/plugins/sqlite/sqlite_execute_select.js | 20 -- v3/plugins/sqlite/sqlite_open.js | 8 - 52 files changed, 1140 insertions(+), 311 deletions(-) create mode 100644 mkdocs-website/docs/en/learn/plugins.md create mode 100644 v3/examples/plugins/assets/style.css delete mode 100644 v3/examples/plugins/experimental/README.md rename v3/examples/plugins/{plugins => }/hashes/README.md (80%) rename v3/examples/plugins/{plugins => }/hashes/plugin.go (94%) rename v3/examples/plugins/{plugins => }/hashes/plugin.toml (100%) delete mode 100644 v3/examples/plugins/plugins/hashes/hashes.d.ts delete mode 100644 v3/examples/plugins/plugins/hashes/hashes.js rename v3/plugins/{ => experimental}/oauth/README.md (100%) create mode 100644 v3/plugins/experimental/oauth/go.mod create mode 100644 v3/plugins/experimental/oauth/go.sum rename v3/plugins/{ => experimental}/oauth/plugin.go (100%) rename v3/plugins/{ => experimental}/oauth/plugin.js (100%) rename v3/plugins/{ => experimental}/oauth/plugin.yaml (100%) rename v3/plugins/{ => experimental}/single_instance/README.md (100%) rename v3/plugins/{ => experimental}/single_instance/go-singleinstance.LICENSE (100%) rename v3/plugins/{ => experimental}/single_instance/lock.go (100%) rename v3/plugins/{ => experimental}/single_instance/lock_posix.go (100%) rename v3/plugins/{ => experimental}/single_instance/lock_windows.go (100%) rename v3/plugins/{ => experimental}/single_instance/plugin.go (97%) rename v3/plugins/{ => experimental}/single_instance/plugin.yaml (100%) rename v3/plugins/{ => experimental}/single_instance/plugin_darwin.go (100%) rename v3/plugins/{ => experimental}/single_instance/plugin_linux.go (100%) rename v3/plugins/{ => experimental}/single_instance/plugin_windows.go (100%) rename v3/plugins/{ => experimental}/start_at_login/README.md (100%) rename v3/plugins/{ => experimental}/start_at_login/plugin.go (89%) rename v3/plugins/{ => experimental}/start_at_login/plugin.yaml (100%) rename v3/plugins/{ => experimental}/start_at_login/plugin_darwin.go (100%) rename v3/plugins/{ => experimental}/start_at_login/plugin_linux.go (100%) rename v3/plugins/{ => experimental}/start_at_login/plugin_window.go (100%) rename v3/plugins/kvstore/{plugin.js => assets/kvstore.js} (64%) rename v3/plugins/log/{plugin.js => assets/log.js} (64%) create mode 100644 v3/plugins/sqlite/assets/sqlite.js delete mode 100644 v3/plugins/sqlite/sqlite_close.js delete mode 100644 v3/plugins/sqlite/sqlite_execute_select.js delete mode 100644 v3/plugins/sqlite/sqlite_open.js diff --git a/mkdocs-website/docs/en/learn/plugins.md b/mkdocs-website/docs/en/learn/plugins.md new file mode 100644 index 00000000000..5d45a41c5da --- /dev/null +++ b/mkdocs-website/docs/en/learn/plugins.md @@ -0,0 +1,65 @@ +# Wails v3 Plugin Guide + +Wails v3 introduces the concept of plugins. A plugin is a self-contained module that can extend the functionality of your Wails application. +This guide will walk you through the structure and functionality of a Wails plugin. + +## Plugin Structure + +A Wails plugin is a standard Go module, typically consisting of the following files: + +- `plugin.go`: This is the main Go file where the plugin's functionality is implemented. +- `plugin.yaml`: This is the plugin's metadata file. It contains information about the plugin such as its name, author, version, and more. +- `assets/`: This directory contains any static assets that the plugin might need. +- `README.md`: This file provides documentation for the plugin. + +## Plugin Implementation + +In `plugin.go`, a plugin is defined as a struct that implements the `application.Plugin` interface. This interface requires the following methods: + +- `Init()`: This method is called when the plugin is initialized. +- `Shutdown()`: This method is called when the application is shutting down. +- `Name()`: This method returns the name of the plugin. +- `CallableByJS()`: This method returns a list of method names that can be called from the frontend. + +In addition to these methods, you can define any number of additional methods that implement the plugin's functionality. +These methods can be called from the frontend using the `wails.Plugin()` function. + +## Plugin Metadata + +The `plugin.yaml` file contains metadata about the plugin. This includes the plugin's name, description, author, version, website, repository, and license. + +## Plugin Assets + +Any static assets that the plugin needs can be placed in the `assets/` directory. +These assets can be accessed by the frontend by requesting them at the plugin base path. +This path is `/wails/plugins//`. + +### Example + +If a plugin named `logopack` has an asset named `logo.png`, the frontend can access it at `/wails/plugins/logopack/logo.png`. + +## Plugin Documentation + +The `README.md` file provides documentation for the plugin. This should include instructions on how to install and use the plugin, as well as any other information that users of the plugin might find useful. + +## Example + +Here's an example of how to use a plugin in your Wails application: + +```go + Plugins: map[string]application.Plugin{ + "log": log.NewPlugin(), + }, +``` +And here's how you can call a plugin method from the frontend: + +```js + wails.Plugin("log","Debug","hello world") +``` + +## Support + +If you encounter any issues with a plugin, please raise a ticket in the plugin's repository. + +!!! note + The Wails team does not provide support for third-party plugins. \ No newline at end of file diff --git a/mkdocs-website/mkdocs.yml b/mkdocs-website/mkdocs.yml index 9827c97c5f9..f85498cc3fe 100644 --- a/mkdocs-website/mkdocs.yml +++ b/mkdocs-website/mkdocs.yml @@ -141,6 +141,7 @@ nav: - Next Steps: getting-started/next-steps.md - Learn More: - Runtime: learn/runtime.md + - Plugins: learn/plugins.md - Feedback: getting-started/feedback.md - Feedback: getting-started/feedback.md - What's New in v3?: whats-new.md diff --git a/v3/examples/frameless/assets/index.html b/v3/examples/frameless/assets/index.html index ccb123bf73b..1847673689e 100644 --- a/v3/examples/frameless/assets/index.html +++ b/v3/examples/frameless/assets/index.html @@ -24,10 +24,10 @@
-
Draggable
+
Draggable
Not Draggable
Not Draggable
-
Draggable
+
Draggable
diff --git a/v3/examples/plugins/assets/index.html b/v3/examples/plugins/assets/index.html index 08769ebe303..1fa889fba4e 100644 --- a/v3/examples/plugins/assets/index.html +++ b/v3/examples/plugins/assets/index.html @@ -3,80 +3,288 @@ Wails Alpha - - + - - -
Alpha
+ +

Plugins

-

Open the inspector and start playing around with the plugins.

+
+ + + + +
+ +
+

The sqlite plugin provides easy integration with sqlite dbs.

+

The demo DB has a single table: Users.

+

Enter a query below and hit the "Run" button.

+
+
+
+ +
+
+
+
+
+
+

The hashes plugin provides hashing functions.

+
+
+
+ +
+
+
+
+
+
+

The kvstore plugin provides a means for reading and writing to a json file.

+

Enter a key/value pair in the form below to add it to the file.

+

A blank value will remove the key.

+
+
+ + + +
+
+
+
+
+
+

The log plugin provides a means for sending frontend logs to a Go logger.

+

Enter some text below, press submit and check your console logs.

+
+ + + +
+
diff --git a/v3/examples/plugins/assets/style.css b/v3/examples/plugins/assets/style.css new file mode 100644 index 00000000000..a32ce2879c9 --- /dev/null +++ b/v3/examples/plugins/assets/style.css @@ -0,0 +1,202 @@ +html { + background-color: rgba(33, 37, 43); + text-align: center; + color: white; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -webkit-touch-callout: none; +} + +body { + padding-top: 40px; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", + "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + overscroll-behavior: none; +} + +.logo { + width: 30%; + height: 20%; +} +/* CSS */ +.button-42 { + background-color: initial; + background-image: linear-gradient(-180deg, #555555, #2f2f2f); + border-radius: 6px; + box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px; + color: #FFFFFF; + cursor: pointer; + display: inline-block; + font-family: Inter,-apple-system,system-ui,Roboto,"Helvetica Neue",Arial,sans-serif; + height: 35px; + line-height: 35px; + outline: 0; + overflow: hidden; + padding: 0 20px; + pointer-events: auto; + position: relative; + text-align: center; + touch-action: manipulation; + user-select: none; + -webkit-user-select: none; + vertical-align: top; + white-space: nowrap; + z-index: 9; + border: 0; + transition: box-shadow .2s; + font-size: medium; +} +p { + font-size: 1rem; +} + +.button-42:hover { + background-image: linear-gradient(-180deg, #cb3939, #610000); +} +html { + background-color: rgba(33, 37, 43); + text-align: center; + color: white; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -webkit-touch-callout: none; +} + +body { + padding-top: 40px; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", + "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + overscroll-behavior: none; +} + +.button-42 { + background-color: initial; + background-image: linear-gradient(-180deg, #555555, #2f2f2f); + border-radius: 6px; + box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px; + color: #FFFFFF; + cursor: pointer; + display: inline-block; + font-family: Inter,-apple-system,system-ui,Roboto,"Helvetica Neue",Arial,sans-serif; + height: 35px; + line-height: 35px; + outline: 0; + overflow: hidden; + padding: 0 20px; + pointer-events: auto; + position: relative; + text-align: center; + touch-action: manipulation; + user-select: none; + -webkit-user-select: none; + vertical-align: top; + white-space: nowrap; + z-index: 9; + border: 0; + transition: box-shadow .2s; + font-size: medium; +} + +p { + font-size: 1rem; +} + +.button-42:hover { + background-image: linear-gradient(-180deg, #cb3939, #610000); +} + +.tab { + overflow: hidden; + background-color: #f1f1f100; + margin-left: 20px; +} + +.tab button { + background-color: transparent; /* Make the background transparent */ + color: white; /* Make the text white */ + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 14px 16px; + transition: 0.3s; + position: relative; /* Added for the underline */ +} + +.tab button::after { /* Added for the underline */ + content: ''; + position: absolute; + width: 0; + height: 2px; + bottom: 0; + left: 0; + background-color: #a40505; + visibility: hidden; + transition: all 0.3s ease-in-out; +} + +.tab button:hover::after, /* Added for the underline */ +.tab button.active::after { /* Added for the underline */ + width: 100%; + visibility: visible; +} + +.tab button.active { + background-color: transparent; /* Make the background transparent */ + color: red; +} +.tabcontent { + display: none; + padding: 6px 12px; + border-top: none; +} +#sqlresults, #hashresults { + font-family: 'Courier New', Courier, monospace; + min-height: 100px; +} +#selectquery { + width: 90%; +} +table { + width: 100%; + border-collapse: collapse; + margin-top: 20px; +} + +th, td { + border: 1px solid #ddd; + padding: 8px; + text-align: left; +} + +th { + background-color: #005467; + color: white; +} + +tr:hover { + background-color: #888; +} + +.error-message { + color: #FF4B2B; /* Bright red color for better visibility in dark mode */ + background-color: #1E1E1E; /* Dark background for the error message */ + border: 1px solid #FF4B2B; /* Border color same as text color */ + padding: 10px; /* Padding around the text */ + margin: 10px 0; /* Margin top and bottom */ + border-radius: 5px; /* Rounded corners */ + text-align: center; /* Center the text */ +} + +.narrowColumn { + width: 1%; /* Adjust as needed */ + white-space: nowrap; +} \ No newline at end of file diff --git a/v3/examples/plugins/experimental/README.md b/v3/examples/plugins/experimental/README.md deleted file mode 100644 index aee9b2e6dac..00000000000 --- a/v3/examples/plugins/experimental/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Experimental Plugins - -This directory contains experimental plugins. These plugins are not supported by the Wails team and are provided as-is. -They may be removed at any time. If you have any thoughts about these plugins, they can be discussed on the [Wails Discord](https://discord.gg/u8JkcWsG). \ No newline at end of file diff --git a/v3/examples/plugins/plugins/hashes/README.md b/v3/examples/plugins/hashes/README.md similarity index 80% rename from v3/examples/plugins/plugins/hashes/README.md rename to v3/examples/plugins/hashes/README.md index 054f5f45127..074b08019b6 100644 --- a/v3/examples/plugins/plugins/hashes/README.md +++ b/v3/examples/plugins/hashes/README.md @@ -15,7 +15,8 @@ Add the plugin to the `Plugins` option in the Applications options: You can then call the Generate method from the frontend: ```js - wails.Plugin("hashes","Generate","hello world").then((result) => console.log(result)) + import {Call} from "/wails/runtime.js"; + Call.Plugin("hashes","Generate","hello world").then((result) => console.log(result)) ``` This method returns a struct with the following fields: diff --git a/v3/examples/plugins/plugins/hashes/plugin.go b/v3/examples/plugins/hashes/plugin.go similarity index 94% rename from v3/examples/plugins/plugins/hashes/plugin.go rename to v3/examples/plugins/hashes/plugin.go index aa6a5f4e925..dcc02c25e3a 100644 --- a/v3/examples/plugins/plugins/hashes/plugin.go +++ b/v3/examples/plugins/hashes/plugin.go @@ -6,6 +6,7 @@ import ( "crypto/sha256" "encoding/hex" "github.com/wailsapp/wails/v3/pkg/application" + "io/fs" ) // ---------------- Plugin Setup ---------------- @@ -32,8 +33,8 @@ func (r *Plugin) CallableByJS() []string { } } -func (r *Plugin) InjectJS() string { - return "" +func (r *Plugin) Assets() fs.FS { + return nil } // ---------------- Plugin Methods ---------------- diff --git a/v3/examples/plugins/plugins/hashes/plugin.toml b/v3/examples/plugins/hashes/plugin.toml similarity index 100% rename from v3/examples/plugins/plugins/hashes/plugin.toml rename to v3/examples/plugins/hashes/plugin.toml diff --git a/v3/examples/plugins/main.go b/v3/examples/plugins/main.go index 150fe325348..44e4387cab3 100644 --- a/v3/examples/plugins/main.go +++ b/v3/examples/plugins/main.go @@ -2,8 +2,9 @@ package main import ( "embed" + "log/slog" "os" - "plugin_demo/plugins/hashes" + "plugin_demo/hashes" "github.com/wailsapp/wails/v3/pkg/application" "github.com/wailsapp/wails/v3/plugins/kvstore" @@ -24,6 +25,7 @@ func main() { Mac: application.MacOptions{ ApplicationShouldTerminateAfterLastWindowClosed: true, }, + LogLevel: slog.LevelDebug, Plugins: map[string]application.Plugin{ "hashes": hashes.NewPlugin(), "log": log.NewPlugin(), @@ -34,10 +36,6 @@ func main() { Filename: "store.json", AutoSave: true, }), - //"server": server.NewPlugin(&server.Config{ - // Enabled: true, - // Port: 34115, - //}), "single_instance": single_instance.NewPlugin(&single_instance.Config{ // When true, the original app will be activated when a second instance is launched ActivateAppOnSubsequentLaunch: true, @@ -50,8 +48,8 @@ func main() { }) app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - DevToolsEnabled: true, - OpenInspectorOnStartup: true, + Width: 1024, + Height: 768, }) err := app.Run() diff --git a/v3/examples/plugins/plugins/hashes/hashes.d.ts b/v3/examples/plugins/plugins/hashes/hashes.d.ts deleted file mode 100644 index 72b88e0f49e..00000000000 --- a/v3/examples/plugins/plugins/hashes/hashes.d.ts +++ /dev/null @@ -1,8 +0,0 @@ - -export namespace HashesPlugin { - export interface Hashes { - md5: string; - sha1: string; - sha256: string; - } -} \ No newline at end of file diff --git a/v3/examples/plugins/plugins/hashes/hashes.js b/v3/examples/plugins/plugins/hashes/hashes.js deleted file mode 100644 index f9f8cf3b0fd..00000000000 --- a/v3/examples/plugins/plugins/hashes/hashes.js +++ /dev/null @@ -1,4 +0,0 @@ -// Generate takes a string and returns a number of hashes for it -export function Generate(input) { - return wails.Plugin("hashes","Generate",input); -} \ No newline at end of file diff --git a/v3/examples/plugins/store.json b/v3/examples/plugins/store.json index 948bb52b077..a56bb9842ff 100644 --- a/v3/examples/plugins/store.json +++ b/v3/examples/plugins/store.json @@ -1 +1 @@ -{"url2":"https://reddit.com"} \ No newline at end of file +{"q":"www","url2":"https://reddit.com"} \ No newline at end of file diff --git a/v3/examples/plugins/test.db b/v3/examples/plugins/test.db index 15613669452c7986c36a10b544b370cbe2b9a406..ced6a916cd8594aa9cd5315eb7d189b047fe7b0d 100644 GIT binary patch delta 78 zcmZp0XmFSy&B!`Y#+i|IW5N=C9v1#<4E$gD-|#=;zqVOW;26Ia7Ynl_V{(2wCnK{sqhn5Ha;g>pbDt36 diff --git a/v3/go.mod b/v3/go.mod index a680a0de28a..f2d249b210c 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -1,6 +1,6 @@ module github.com/wailsapp/wails/v3 -go 1.22 +go 1.21 require ( github.com/atterpac/refresh v0.6.3 diff --git a/v3/internal/assetserver/assetserver.go b/v3/internal/assetserver/assetserver.go index 24b0492242a..b931d3d920d 100644 --- a/v3/internal/assetserver/assetserver.go +++ b/v3/internal/assetserver/assetserver.go @@ -1,12 +1,14 @@ package assetserver import ( + "embed" "fmt" - "html" + "io/fs" "net" "net/http" "net/http/httptest" "net/url" + "path" "strings" "time" ) @@ -14,6 +16,7 @@ import ( const ( webViewRequestHeaderWindowId = "x-wails-window-id" webViewRequestHeaderWindowName = "x-wails-window-name" + pluginPrefix = "/wails/plugin" ) type RuntimeHandler interface { @@ -25,13 +28,17 @@ type AssetServer struct { handler http.Handler - pluginScripts map[string]string + //pluginScripts map[string]string assetServerWebView + pluginAssets map[string]fs.FS } func NewAssetServer(options *Options) (*AssetServer, error) { - result := &AssetServer{options: options} + result := &AssetServer{ + options: options, + pluginAssets: make(map[string]fs.FS), + } userHandler := options.Handler if userHandler == nil { @@ -84,8 +91,8 @@ func (a *AssetServer) serveHTTP(rw http.ResponseWriter, req *http.Request, userH // header.Add(HeaderCacheControl, "no-cache") //} - path := req.URL.Path - switch path { + reqPath := req.URL.Path + switch reqPath { case "", "/", "/index.html": recorder := httptest.NewRecorder() userHandler.ServeHTTP(recorder, req) @@ -105,9 +112,34 @@ func (a *AssetServer) serveHTTP(rw http.ResponseWriter, req *http.Request, userH } default: - // Check if this is a plugin script - if script, ok := a.pluginScripts[path]; ok { - a.writeBlob(rw, path, []byte(script)) + + // Check if this is a plugin asset + if !strings.HasPrefix(reqPath, pluginPrefix) { + userHandler.ServeHTTP(rw, req) + return + } + + // Ensure there is 4 parts to the reqPath + parts := strings.SplitN(reqPath, "/", 5) + if len(parts) < 5 { + rw.WriteHeader(http.StatusNotFound) + return + } + + // Get the first 3 parts of the reqPath + pluginPath := "/" + path.Join(parts[1], parts[2], parts[3]) + // Get the remaining part of the reqPath + fileName := parts[4] + + // Check if this is a registered plugin asset + if assetFS, ok := a.pluginAssets[pluginPath]; ok { + // Check if the file exists + file, err := fs.ReadFile(assetFS, fileName) + if err != nil { + a.serveError(rw, err, "Unable to read file %s", reqPath) + return + } + a.writeBlob(rw, reqPath, file) } else { userHandler.ServeHTTP(rw, req) } @@ -127,14 +159,28 @@ func (a *AssetServer) serveError(rw http.ResponseWriter, err error, msg string, rw.WriteHeader(http.StatusInternalServerError) } -func (a *AssetServer) AddPluginScript(pluginName string, script string) { - if a.pluginScripts == nil { - a.pluginScripts = make(map[string]string) +//func (a *AssetServer) AddPluginScript(pluginName string, script string) { +// if a.pluginScripts == nil { +// a.pluginScripts = make(map[string]string) +// } +// pluginName = strings.ReplaceAll(pluginName, "/", "_") +// pluginName = html.EscapeString(pluginName) +// pluginScriptName := fmt.Sprintf("/wails/plugin/%s.js", pluginName) +// a.pluginScripts[pluginScriptName] = script +//} + +func (a *AssetServer) AddPluginAssets(pluginPath string, vfs fs.FS) error { + pluginPath = path.Join(pluginPrefix, pluginPath) + _, exists := a.pluginAssets[pluginPath] + if exists { + return fmt.Errorf("plugin path already exists: %s", pluginPath) + } + if embedFs, isEmbedFs := vfs.(embed.FS); isEmbedFs { + rootFolder, _ := findEmbedRootPath(embedFs) + vfs, _ = fs.Sub(vfs, path.Clean(rootFolder)) } - pluginName = strings.ReplaceAll(pluginName, "/", "_") - pluginName = html.EscapeString(pluginName) - pluginScriptName := fmt.Sprintf("/wails/plugin/%s.js", pluginName) - a.pluginScripts[pluginScriptName] = script + a.pluginAssets[pluginPath] = vfs + return nil } func GetStartURL(userURL string) (string, error) { diff --git a/v3/internal/assetserver/bundledassets/runtime.debug.js b/v3/internal/assetserver/bundledassets/runtime.debug.js index 7570be5c032..1c40a1ddcab 100644 --- a/v3/internal/assetserver/bundledassets/runtime.debug.js +++ b/v3/internal/assetserver/bundledassets/runtime.debug.js @@ -1274,70 +1274,66 @@ function GetFlag(keyString) { } // desktop/@wailsio/runtime/src/drag.js +var shouldDrag = false; +var resizable = false; +var resizeEdge = null; +var defaultCursor = "auto"; window._wails = window._wails || {}; -window._wails.setResizable = setResizable; -window._wails.endDrag = endDrag; +window._wails.setResizable = function(value) { + resizable = value; +}; +window._wails.endDrag = function() { + document.body.style.cursor = "default"; + shouldDrag = false; +}; window.addEventListener("mousedown", onMouseDown); window.addEventListener("mousemove", onMouseMove); window.addEventListener("mouseup", onMouseUp); -var shouldDrag = false; -var resizeEdge = null; -var resizable = false; -var defaultCursor = "auto"; function dragTest(e) { - let val = window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region"); - if (!val || val === "" || val.trim() !== "drag" || e.buttons !== 1) { + let val = window.getComputedStyle(e.target).getPropertyValue("--wails-draggable"); + let mousePressed = e.buttons !== void 0 ? e.buttons : e.which; + if (!val || val === "" || val.trim() !== "drag" || mousePressed === 0) { return false; } return e.detail === 1; } -function setResizable(value) { - resizable = value; -} -function endDrag() { - document.body.style.cursor = "default"; - shouldDrag = false; -} -function testResize() { +function onMouseDown(e) { if (resizeEdge) { - invoke(`resize:${resizeEdge}`); - return true; + invoke("resize:" + resizeEdge); + e.preventDefault(); + return; } - return false; -} -function onMouseDown(e) { - if (IsWindows() && testResize() || dragTest(e)) { - shouldDrag = !!isValidDrag(e); + if (dragTest(e)) { + if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) { + return; + } + shouldDrag = true; + } else { + shouldDrag = false; } } -function isValidDrag(e) { - return !(e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight); -} -function onMouseUp(e) { - let mousePressed = e.buttons !== void 0 ? e.buttons : e.which; - if (mousePressed > 0) { - endDrag(); - } +function onMouseUp() { + shouldDrag = false; } -function setResize(cursor = defaultCursor) { - document.documentElement.style.cursor = cursor; +function setResize(cursor) { + document.documentElement.style.cursor = cursor || defaultCursor; resizeEdge = cursor; } function onMouseMove(e) { - shouldDrag = checkDrag(e); - if (IsWindows() && resizable) { - handleResize(e); + if (shouldDrag) { + shouldDrag = false; + let mousePressed = e.buttons !== void 0 ? e.buttons : e.which; + if (mousePressed > 0) { + invoke("drag"); + return; + } } -} -function checkDrag(e) { - let mousePressed = e.buttons !== void 0 ? e.buttons : e.which; - if (shouldDrag && mousePressed > 0) { - invoke("drag"); - return false; + if (!resizable || !IsWindows()) { + return; + } + if (defaultCursor == null) { + defaultCursor = document.documentElement.style.cursor; } - return shouldDrag; -} -function handleResize(e) { let resizeHandleHeight = GetFlag("system.resizeHandleHeight") || 5; let resizeHandleWidth = GetFlag("system.resizeHandleWidth") || 5; let cornerExtra = GetFlag("resizeCornerExtra") || 10; @@ -1541,4 +1537,4 @@ export { wml_exports as WML, window_default as Window }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vcnVudGltZS9kZXNrdG9wL0B3YWlsc2lvL3J1bnRpbWU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5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XG4gICAgfVxuICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy1jbGllbnQtaWRcIl0gPSBjbGllbnRJZDtcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIHJ1bnRpbWVDYWxsV2l0aElEKG9iamVjdElELCBtZXRob2QsIHdpbmRvd05hbWUsIGFyZ3MpIHtcbiAgICBsZXQgdXJsID0gbmV3IFVSTChydW50aW1lVVJMKTtcbiAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcIm9iamVjdFwiLCBvYmplY3RJRCk7XG4gICAgdXJsLnNlYXJjaFBhcmFtcy5hcHBlbmQoXCJtZXRob2RcIiwgbWV0aG9kKTtcbiAgICBsZXQgZmV0Y2hPcHRpb25zID0ge1xuICAgICAgICBoZWFkZXJzOiB7fSxcbiAgICB9O1xuICAgIGlmICh3aW5kb3dOYW1lKSB7XG4gICAgICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy13aW5kb3ctbmFtZVwiXSA9IHdpbmRvd05hbWU7XG4gICAgfVxuICAgIGlmIChhcmdzKSB7XG4gICAgICAgIHVybC5zZWFyY2hQYXJhbXMuYXBwZW5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XG4gICAgfVxuICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy1jbGllbnQtaWRcIl0gPSBjbGllbnRJZDtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICBmZXRjaCh1cmwsIGZldGNoT3B0aW9ucylcbiAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgY29udGVudCB0eXBlXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5oZWFkZXJzLmdldChcIkNvbnRlbnQtVHlwZVwiKSAmJiByZXNwb25zZS5oZWFkZXJzLmdldChcIkNvbnRlbnQtVHlwZVwiKS5pbmRleE9mKFwiYXBwbGljYXRpb24vanNvblwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZ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iAqIEEgcmVjb3JkIGRlc2NyaWJpbmcgdGhlIHNpemUgb2YgYSB3aW5kb3cuXG4gKlxuICogQHR5cGVkZWYge09iamVjdH0gU2l6ZVxuICogQHByb3BlcnR5IHtudW1iZXJ9IHdpZHRoIC0gVGhlIHdpZHRoIG9mIHRoZSB3aW5kb3dcbiAqIEBwcm9wZXJ0eSB7bnVtYmVyfSBoZWlnaHQgLSBUaGUgaGVpZ2h0IG9mIHRoZSB3aW5kb3dcbiAqL1xuXG5cbmltcG9ydCB7bmV3UnVudGltZUNhbGxlcldpdGhJRCwgb2JqZWN0TmFtZXN9IGZyb20gXCIuL3J1bnRpbWVcIjtcblxuY29uc3QgQWJzb2x1dGVQb3NpdGlvbk1ldGhvZCAgICAgICAgICAgID0gMDtcbmNvbnN0IENlbnRlck1ldGhvZCAgICAgICAgICAgICAgICAgICAgICA9IDE7XG5jb25zdCBDbG9zZU1ldGhvZCAgICAgICAgICAgICAgICAgICAgICAgPSAyO1xuY29uc3QgRGlzYWJsZVNpemVDb25zdHJhaW50c01ldGhvZCAgICAgID0gMztcbmNvbnN0IEVuYWJsZVNpemVDb25zdHJhaW50c01ldGhvZCAgICAgICA9IDQ7XG5jb25zdCBGb2N1c01ldGhvZCAgICAgICAgICAgICAgICAgICAgICAgPSA1O1xuY29uc3QgRm9yY2VSZWxvYWRNZXRob2QgICAgICAgICAgICAgICAgID0gNjtcbmNvbnN0IEZ1bGxzY3JlZW5NZXRob2QgICAgICAgICAgICAgICAgICA9IDc7XG5jb25zdCBHZXRTY3JlZW5NZXRob2QgICAgICAgICAgICAgICAgICAgPSA4O1xuY29uc3QgR2V0Wm9vbU1ldGhvZCAgICAgICAgICAgICAgICAgICAgID0gOTtcbmNvbnN0IEhlaWdodE1ldGhvZCAgICAgICAgICAgICAgICAgICAgICA9IDEwO1xuY29uc3QgSGlkZU1ldGhvZCAgICAgICAgICAgICAgICAgICAgICAgID0gMTE7XG5jb25zdCBJc0ZvY3VzZWRNZXRob2QgICAgICAgICAgICAgICAgICAgPSAxMjtcbmNvbnN0IElzRnVsbHNjcmVlbk1ldGhvZCAgICAgICAgICAgICAgICA9IDEzO1xuY29uc3QgSXNNYXhpbWlzZWRNZXRob2QgICAgICAgICAgICAgICAgID0gMTQ7XG5jb25zdCBJc01pbmltaXNlZE1ldGhvZCAgICAgICAgICAgICAgICAgPSAxNTtcbmNvbnN0IE1heGltaXNlTWV0aG9kICAgICAgICAgICAgICAgICAgICA9IDE2O1xuY29uc3QgTWluaW1pc2VNZXRob2QgICAgICAgICAgICAgICAgICAgID0gMTc7XG5jb25zdCBOYW1lTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICAgPSAxODtcbmNvbnN0IE9wZW5EZXZUb29sc01ldGhvZCAgICAgICAgICAgICAgICA9IDE5O1xuY29uc3QgUmVsYXRpdmVQb3NpdGlvbk1ldGhvZCAgICAgICAgICAgID0gMjA7XG5jb25zdCBSZWxvYWRNZXRob2QgICAgICAgICAgICAgICAgICAgICAgPSAyMTtcbmNvbnN0IFJlc2l6YWJsZU1ldGhvZCAgICAgICAgICAgICAgICAgICA9IDIyO1xuY29uc3QgUmVzdG9yZU1ldGhvZCAgICAgICAgICAgICAgICAgICAgID0gMjM7XG5jb25zdCBTZXRBYnNvbHV0ZVBvc2l0aW9uTWV0aG9kICAgICAgICAgPSAyNDtcbmNvbnN0IFNldEFsd2F5c09uVG9wTWV0aG9kICAgICAgICAgICAgICA9IDI1O1xuY29uc3QgU2V0QmFja2dyb3VuZENvbG91ck1ldGhvZCAgICAgICAgID0gMjY7XG5jb25zdCBTZXRGcmFtZWxlc3NNZXRob2QgICAgICAgICAgICAgICAgPSAyNztcbmNvbnN0IFNldEZ1bGxzY3JlZW5CdXR0b25FbmFibGVkTWV0aG9kICA9IDI4O1xuY29uc3QgU2V0TWF4U2l6ZU1ldGhvZCAgICAgICAgICAgICAgICAgID0gMjk7XG5jb25zdCBTZXRNaW5TaXplTWV0aG9kICAgICAgICAgICAgICAgICAgPSAzMDtcbmNvbnN0IFNldFJlbGF0aXZlUG9zaXRpb25NZXRob2QgICAgICAgICA9IDMxO1xuY29uc3QgU2V0UmVzaXphYmxlTWV0aG9kICAgICAgICAgICAgICAgID0gMzI7XG5jb25zdCBTZXRTaXplTWV0aG9kICAgICAgICAgICAgICAgICAgICAgPSAzMztcbmNvbnN0IFNldFRpdGxlTWV0aG9kICAgICAgICAgICAgICAgICAgICA9IDM0O1xuY29uc3QgU2V0Wm9vbU1ldGhvZCAgICAgICAgICAgICAgICAgICAgID0gMzU7XG5jb25zdCBTaG93TWV0aG9kICAgICAgICAgICAgICAgICAgICAgICAgPSAzNjtcbmNvbnN0IFNpemVNZXRob2QgICAgICAgICAgICAgICAgICAgICAgICA9IDM3O1xuY29uc3QgVG9nZ2xlRnVsbHNjcmVlbk1ldGhvZCAgICAgICAgICAgID0gMzg7XG5jb25zdCBUb2dnbGVNYXhpbWlzZU1ldGhvZCAgICAgICAgICAgICAgPSAzOTtcbmNvbnN0IFVuRnVsbHNjcmVlbk1ldGhvZCAgICAgICAgICAgICAgICA9IDQwO1xuY29uc3QgVW5NYXhpbWlzZU1ldGhvZCAgICAgICAgICAgICAgICAgID0gNDE7XG5jb25zdCBVbk1pbmltaXNlTWV0aG9kICAgICAgICAgICAgICAgICAgPSA0MjtcbmNvbnN0IFdpZHRoTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICA9IDQzO1xuY29uc3QgWm9vbU1ldGhvZCAgICAgICAgICAgICAgICAgICAgICAgID0gNDQ7XG5jb25zdCBab29tSW5NZXRob2QgICAgICAgICAgICAgICAgICAgICAgPSA0NTtcbmNvbnN0IFpvb21PdXRNZXRob2QgICAgICAgICAgICAgICAgICAgICA9IDQ2O1xuY29uc3QgWm9vbVJlc2V0TWV0aG9kICAgICAgICAgICAgICAgICAgID0gNDc7XG5cbi8qKlxuICogQHR5cGUge3N5bWJvbH1cbiAqL1xuY29uc3QgY2FsbGVyID0gU3ltYm9sKCk7XG5cbmNsYXNzIFdpbmRvdyB7XG4gICAgLyoqXG4gICAgICogSW5pdGlhbGlzZXMgYSB3aW5kb3cgb2JqZWN0IHdpdGggdGhlIHNwZWNpZmllZCBuYW1lLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge3N0cmluZ30gbmFtZSAtIFRoZSBuYW1lIG9mIHRoZSB0YXJnZXQgd2luZG93LlxuICAgICAqL1xuICAgIGNvbnN0cnVjdG9yKG5hbWUgPSAnJykge1xuICAgICAgICAvKipcbiAgICAgICAgICogQHByaXZhdGVcbiAgICAgICAgICogQG5hbWUge0BsaW5rIGNhbGxlcn1cbiAgICAgICAgICogQHR5cGUgeyguLi5hcmdzOiBhbnlbXSkgPT4gYW55fVxuICAgICAgICAgKi9cbiAgICAgICAgdGhpc1tjYWxsZXJdID0gbmV3UnVudGltZUNhbGxlcldpdGhJRChvYmplY3ROYW1lcy5XaW5kb3csIG5hbWUpXG5cbiAgICAgICAgLy8gYmluZCBpbnN0YW5jZSBtZXRob2QgdG8gbWFrZSB0aGVtIGVhc2lseSB1c2FibGUgaW4gZXZlbnQgaGFuZGxlcnNcbiAgICAgICAgZm9yIChjb25zdCBtZXRob2Qgb2YgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoV2luZG93LnByb3RvdHlwZSkpIHtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtZXRob2QgIT09IFwiY29uc3RydWN0b3JcIlxuICAgICAgICAgICAgICAgICYmIHR5cGVvZiB0aGlzW21ldGhvZF0gPT09IFwiZnVuY3Rpb25cIlxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgdGhpc1ttZXRob2RdID0gdGhpc1ttZXRob2RdLmJpbmQodGhpcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBHZXRzIHRoZSBzcGVjaWZpZWQgd2luZG93LlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEBw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gIH1cblxuICAgIC8qKlxuICAgICAqIE9wZW5zIHRoZSBkZXZlbG9wbWVudCB0b29scyBwYW5lLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XG4gICAgICovXG4gICAgT3BlbkRldlRvb2xzKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKE9wZW5EZXZUb29sc01ldGhvZCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyB0aGUgcmVsYXRpdmUgcG9zaXRpb24gb2YgdGhlIHdpbmRvdyB0byB0aGUgc2NyZWVuLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8UG9zaXRpb24+fSAtIFRoZSBjdXJyZW50IHJlbGF0aXZlIHBvc2l0aW9uIG9mIHRoZSB3aW5kb3dcbiAgICAgKi9cbiAgICBSZWxhdGl2ZVBvc2l0aW9uKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFJlbGF0aXZlUG9zaXRpb25NZXRob2QpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJlbG9hZHMgdGhlIHBhZ2UgYXNzZXRzLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XG4gICAgICovXG4gICAgUmVsb2FkKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFJlbG9hZE1ldGhvZCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyB0cnVlIGlmIHRoZSB3aW5kb3cgaXMgcmVzaXphYmxlLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8Ym9vbGVhbj59IC0gV2hldGhlciB0aGUgd2luZG93IGlzIGN1cnJlbnRseSByZXNpemFibGVcbiAgICAgKi9cbiAgICBSZXNpemFibGUoKSB7XG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sLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XG4gICAgICovXG4gICAgVG9nZ2xlRnVsbHNjcmVlbigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShUb2dnbGVGdWxsc2NyZWVuTWV0aG9kKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUb2dnbGVzIHRoZSB3aW5kb3cgYmV0d2VlbiBtYXhpbWlzZWQgYW5kIG5vcm1hbC5cbiAgICAgKlxuICAgICAqIEBwdWJsaWNcbiAgICAgKiBAcmV0dXJuIHtQcm9taXNlPHZvaWQ+fVxuICAgICAqL1xuICAgIFRvZ2dsZU1heGltaXNlKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFRvZ2dsZU1heGltaXNlTWV0aG9kKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBVbi1mdWxsc2NyZWVucyB0aGUgd2luZG93LlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XG4gICAgICovXG4gICAgVW5GdWxsc2NyZWVuKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFVuRnVsbHNjcmVlbk1ldGhvZCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVW4tbWF4aW1pc2VzIHRoZSB3aW5kb3cuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cbiAgICAgKi9cbiAgICBVbk1heGltaXNlKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFVuTWF4aW1pc2VNZXRob2QpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFVuLW1pbmltaXNlcyB0aGUgd2luZG93LlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XG4gICAgICovXG4gICAgVW5NaW5pbWlzZSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShVbk1pbmltaXNlTWV0aG9kKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXR1cm5zIHRoZSB3aWR0aCBvZiB0aGUgd2luZG93LlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8bnVtYmVyPn0gLSBUaGUgY3VycmVudCB3aWR0aCBvZiB0aGUgd2luZG93XG4gICAgICovXG4gICAgV2lkdGgoKSB7XG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oV2lkdGhNZXRob2QpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFpvb21zIHRoZSB3aW5kb3cuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cbiAgICAgKi9cbiAgICBab29tKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFpvb21NZXRob2QpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEluY3JlYXNlcyB0aGUgem9vbSBsZXZlbCBvZiB0aGUgd2VidmlldyBjb250ZW50LlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XG4gICAgICovXG4gICAgWm9vbUluKCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFpvb21Jbk1ldGhvZCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogRGVjcmVhc2VzIHRoZSB6b29tIGxldmVsIG9mIHRoZSB3ZWJ2aWV3IGNvbnRlbnQuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cbiAgICAgKi9cbiAgICBab29tT3V0KCkge1xuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFpvb21PdXRNZXRob2Q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vdy5nZXRDb21wdXRlZFN0eWxlKGVsZW1lbnQpO1xuICAgIGNvbnN0IGRlZmF1bHRDb250ZXh0TWVudUFjdGlvbiA9IGNvbXB1dGVkU3R5bGUuZ2V0UHJvcGVydHlWYWx1ZShcIi0tZGVmYXVsdC1jb250ZXh0bWVudVwiKS50cmltKCk7XG4gICAgc3dpdGNoIChkZWZhdWx0Q29udGV4dE1lbnVBY3Rpb24pIHtcbiAgICAgICAgY2FzZSBcInNob3dcIjpcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgY2FzZSBcImhpZGVcIjpcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAvLyBDaGVjayBpZiBjb250ZW50RWRpdGFibGUgaXMgdHJ1ZVxuICAgICAgICAgICAgaWYgKGVsZW1lbnQuaXNDb250ZW50RWRpdGFibGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRleHQgaGFzIGJlZW4gc2VsZWN0ZWRcbiAgICAgICAgICAgIGNvbnN0IHNlbGVjdGlvbiA9IHdpbmRvdy5nZXRTZWxlY3Rpb24oKTtcbiAgICAgICAgICAgIGNvbnN0IGhhc1NlbGVjdGlvbiA9IChzZWxlY3Rpb24udG9TdHJpbmcoKS5sZW5ndGggPiAwKVxuICAgICAgICAgICAgaWYgKGhhc1NlbGVjdGlvbikge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc2VsZWN0aW9uLnJhbmdlQ291bnQ7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYW5nZSA9IHNlbGVjdGlvbi5nZXRSYW5nZUF0KGkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZWN0cyA9IHJhbmdlLmdldENsaWVudFJlY3RzKCk7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgcmVjdHMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlY3QgPSByZWN0c1tqXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5lbGVtZW50RnJvbVBvaW50KHJlY3QubGVmdCwgcmVjdC50b3ApID09PSBlbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGFnbmFtZSBpcyBpbnB1dCBvciB0ZXh0YXJlYVxuICAgICAgICAgICAgaWYgKGVsZW1lbnQudGFnTmFtZSA9PT0gXCJJTlBVVFwiIHx8IGVsZW1lbnQudGFnTmFtZSA9PT0gXCJURVhUQVJFQVwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKGhhc1NlbGVjdGlvbiB8fCAoIWVsZW1lbnQucmVhZE9ubHkgJiYgIWVsZW1lbnQuZGlzYWJsZWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGhpZGUgZGVmYXVsdCBjb250ZXh0IG1lbnVcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgfVxufVxuIiwgIi8qXG4gX1x0ICAgX19cdCAgXyBfX1xufCB8XHQgLyAvX19fIF8oXykgL19fX19cbnwgfCAvfCAvIC8gX18gYC8gLyAvIF9fXy9cbnwgfC8gfC8gLyAvXy8gLyAvIChfXyAgKVxufF9fL3xfXy9cXF9fLF8vXy9fL19fX18vXG5UaGUgZWxlY3Ryb24gYWx0ZXJuYXRpdmUgZm9yIEdvXG4o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iKSB7XHJcbiAgICAgICAgaWYgKGNob2ljZSAhPT0gXCJZZXNcIilcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG5cclxuICAgICAgICBjb25zdCBldmVudFR5cGUgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnd21sLWV2ZW50Jyk7XHJcbiAgICAgICAgY29uc3QgdGFyZ2V0V2luZG93ID0gZWxlbWVudC5nZXRBdHRyaWJ1dGUoJ3dtbC10YXJnZXQtd2luZG93JykgfHwgXCJcIjtcclxuICAgICAgICBjb25zdCB3aW5kb3dNZXRob2QgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnd21sLXdpbmRvdycpO1xyXG4gICAgICAgIGNvbnN0IHVybCA9IGVsZW1lbnQuZ2V0QXR0cmlidXRlKCd3bWwtb3BlbnVybCcpO1xyXG5cclxuICAgICAgICBpZiAoZXZlbnRUeXBlICE9PSBudWxsKVxyXG4gICAgICAgICAgICBzZW5kRXZlbnQoZXZlbnRUeXBlKTtcclxuICAgICAgICBpZiAod2luZG93TWV0aG9kICE9PSBudWxsKVxyXG4gICAgICAgICAgICBjYWxsV2luZG93TWV0aG9kKHRhcmdldFdpbmRvdywgd2luZG93TWV0aG9kKTtcclxuICAgICAgICBpZiAodXJsICE9PSBudWxsKVxyXG4gICAgICAgICAgICB2b2lkIE9wZW5VUkwodXJsKTtcclxuICAgIH1cclxuXHJcbiAgICBjb25zdCBjb25maXJtID0gZWxlbWVudC5nZXRBdHRyaWJ1dGUoJ3dtbC1jb25maXJtJyk7XHJcblxyXG4gICAgaWYgKGNvbmZpcm0pIHtcclxuICAgICAgICBRdWVzdGlvbih7XHJcbiAgICAgICAgICAgIFRpdGxlOiBcIkNvbmZpcm1cIixcclxuICAgICAgICAgICAgTWVzc2FnZTogY29uZmlybSxcclxuICAgICAgICAgICAgRGV0YWNoZWQ6IGZhbHNlLFxyXG4gICAgICAgICAgICBCdXR0b25zOiBbXHJcbiAgICAgICAgICAgICAgICB7IExhYmVsOiBcIlllc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YXJncykge1xyXG4gICAgICAgIHVybC5zZWFyY2hQYXJhbXMuYXBwZW5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XHJcbiAgICB9XHJcbiAgICBmZXRjaE9wdGlvbnMuaGVhZGVyc1tcIngtd2FpbHMtY2xpZW50LWlkXCJdID0gY2xpZW50SWQ7XHJcblxyXG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICBmZXRjaCh1cmwsIGZldGNoT3B0aW9ucylcclxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLm9rKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgY29udGVudCB0eXBlXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgLnRoZW4oZGF0YSA9PiByZXNvbHZlKGRhdGEpKVxyXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XHJcbiAgICB9KTtcclxufVxyXG5cclxuZnVuY3Rpb24gcnVudGltZUNhbGxXaXRoSUQob2JqZWN0SUQsIG1ldGhvZCwgd2luZG93TmFtZSwgYXJncykge1xyXG4gICAgbGV0IHVybCA9IG5ldyBVUkwocnVudGltZVVSTCk7XHJcbiAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcIm9iamVjdFwiLCBvYmplY3RJRCk7XHJcbiAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcIm1ldGhvZFwiLCBtZXRob2QpO1xyXG4gICAgbGV0IGZldGNoT3B0aW9ucyA9IHtcclxuICAgICAgICBoZWFkZXJzOiB7fSxcclxuICAgIH07XHJcbiAgICBpZiAod2luZG93TmFtZSkge1xyXG4gICAgICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy13aW5kb3ctbmFtZVwiXSA9IHdpbmRvd05hbWU7XHJcbiAgICB9XHJcbiAgICBpZiAoYXJncykge1xyXG4gICAgICAgIHVybC5zZWFyY2hQYXJhbXMuYXBwZW5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XHJcbiAgICB9XHJcbiAgICBmZXRjaE9wdGlvbnMuaGVhZGVyc1tcIngtd2FpbHMtY2xpZW50LWlkXCJdID0gY2xpZW50SWQ7XHJcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxyXG4gICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UuaGVhZGVycy5nZXQoXCJDb250ZW50LVR5cGVcIikgJiYgcmVzcG9uc2UuaGVhZGVycy5nZXQoXCJDb250ZW50LVR5cGVcIikuaW5kZXhPZihcImFwcGxpY2F0aW9uL2pzb25cIikgIT09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZWplY3QoRXJyb3IocmVzcG9uc2Uuc3RhdHVzVGV4dCkpO1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXHJcbiAgICAgICAgICAgIC5jYXRjaChlcnJvciA9PiByZWplY3QoZXJyb3IpKTtcclxuICAgIH0pO1xyXG59XHJcbiIsICIvKlxyXG4gX1x0ICAgX19cdCAgXyBfX1xyXG58IHxcdCAvIC9fX18gXyhfKSAvX19fX1xyXG58IHwgL3wgLyAvIF9fIGAvIC8gLyBfX18vXHJcbnwgfC8gfC8gLyAvXy8gLyAvIChfXyAgKVxyXG58X18vfF9fL1xcX18sXy9fL18vX19fXy9cclxuVGhlIGVsZWN0cm9uIGFsdGVybmF0aXZlIGZvciBHb1xyXG4oYykgTGVhIEFudGhvbnkgMjAxOS1wcmVzZW50XHJcbiovXHJcblxyXG4vKiBqc2hpbnQgZXN2ZXJzaW9uOiA5ICovXHJcblxyXG4vKipcclxuICogQHR5cGVkZWYge09iamVjdH0gT3BlbkZpbGVEaWFsb2dPcHRpb25zXHJcbiAqIEBwcm9wZXJ0eSB7Ym9vbGVhbn0gW0NhbkNob29zZURpcmVjdG9yaWVzXSAtIEluZGljYXRlcyBpZiBkaXJlY3RvcmllcyBjYW4gYmUgY2hvc2VuLlxyXG4gKiBAcHJvcGVydHkge2Jvb2xlYW59IFtDYW5DaG9vc2VGaWxlc10gLSBJbmRpY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dGhJRCwgb2JqZWN0TmFtZXN9IGZyb20gXCIuL3J1bnRpbWVcIjtcclxuXHJcbmNvbnN0IEFic29sdXRlUG9zaXRpb25NZXRob2QgICAgICAgICAgICA9IDA7XHJcbmNvbnN0IENlbnRlck1ldGhvZCAgICAgICAgICAgICAgICAgICAgICA9IDE7XHJcbmNvbnN0IENsb3NlTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICA9IDI7XHJcbmNvbnN0IERpc2FibGVTaXplQ29uc3RyYWludHNNZXRob2QgICAgICA9IDM7XHJcbmNvbnN0IEVuYWJsZVNpemVDb25zdHJhaW50c01ldGhvZCAgICAgICA9IDQ7XHJcbmNvbnN0IEZvY3VzTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICA9IDU7XHJcbmNvbnN0IEZvcmNlUmVsb2FkTWV0aG9kICAgICAgICAgICAgICAgICA9IDY7XHJcbmNvbnN0IEZ1bGxzY3JlZW5NZXRob2QgICAgICAgICAgICAgICAgICA9IDc7XHJcbmNvbnN0IEdldFNjcmVlbk1ldGhvZCAgICAgICAgICAgICAgICAgICA9IDg7XHJcbmNvbnN0IEdldFpvb21NZXRob2QgICAgICAgICAgICAgICAgICAgICA9IDk7XHJcbmNvbnN0IEhlaWdodE1ldGhvZCAgICAgICAgICAgICAgICAgICAgICA9IDEwO1xyXG5jb25zdCBIaWRlTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICAgPSAxMTtcclxuY29uc3QgSXNGb2N1c2VkTWV0aG9kICAgICAgICAgICAgICAgICAgID0gMTI7XHJcbmNvbnN0IElzRnVsbHNjcmVlbk1ldGhvZCAgICAgICAgICAgICAgICA9IDEzO1xyXG5jb25zdCBJc01heGltaXNlZE1ldGhvZCAgICAgICAgICAgICAgICAgPSAxNDtcclxuY29uc3QgSXNNaW5pbWlzZWRNZXRob2QgICAgICAgICAgICAgICAgID0gMTU7XHJcbmNvbnN0IE1heGltaXNlTWV0aG9kICAgICAgICAgICAgICAgICAgICA9IDE2O1xyXG5jb25zdCBNaW5pbWlzZU1ldGhvZCAgICAgICAgICAgICAgICAgICAgPSAxNztcclxuY29uc3QgTmFtZU1ldGhvZCAgICAgICAgICAgICAgICAgICAgICAgID0gMTg7XHJcbmNvbnN0IE9wZW5EZXZUb29sc01ldGhvZCAgICAgICAgICAgICAgICA9IDE5O1xyXG5jb25zdCBSZWxhdGl2ZVBvc2l0aW9uTWV0aG9kICAgICAgICAgICAgPSAyMDtcclxuY29uc3QgUmVsb2FkTWV0aG9kICAgICAgICAgICAgICAgICAgICAgID0gMjE7XHJcbmNvbnN0IFJlc2l6YWJsZU1ldGhvZCAgICAgICAgICAgICAgICAgICA9IDIyO1xyXG5jb25zdCBSZXN0b3JlTWV0aG9kICAgICAgICAgICAgICAgICAgICAgPSAyMztcclxuY29uc3QgU2V0QWJzb2x1dGVQb3NpdGlvbk1ldGhvZCAgICAgICAgID0gMjQ7XHJcbmNvbnN0IFNldEFsd2F5c09uVG9wTWV0aG9kICAgICAgICAgICAgICA9IDI1O1xyXG5jb25zdCBTZXRCYWNrZ3JvdW5kQ29sb3VyTWV0aG9kICAgICAgICAgPSAyNjtcclxuY29uc3QgU2V0RnJhbWVsZXNzTWV0aG9kICAgICAgICAgICAgICAgID0gMjc7XHJcbmNvbnN0IFNldEZ1bGxzY3JlZW5CdXR0b25FbmFibGVkTWV0aG9kICA9IDI4O1xyXG5jb25zdCBTZXRNYXhTaXplTWV0aG9kICAgICAgICAgICAgICAgICAgPSAyOTtcclxuY29uc3QgU2V0TWluU2l6ZU1ldGhvZCAgICAgICAgICAgICAgICAgID0gMzA7XHJcbmNvbnN0IFNldFJlbGF0aXZlUG9zaXRpb25NZXRob2QgICAgICAgICA9IDMxO1xyXG5jb25zdCBTZXRSZXNpemFibGVNZXRob2QgICAgICAgICAgICAgICAgPSAzMjtcclxuY29uc3QgU2V0U2l6ZU1ldGhvZCAgICAgICAgICAgICAgICAgICAgID0gMzM7XHJcbmNvbnN0IFNldFRpdGxlTWV0aG9kICAgICAgICAgICAgICAgICAgICA9IDM0O1xyXG5jb25zdCBTZXRab29tTWV0aG9kICAgICAgICAgICAgICAgICAgICAgPSAzNTtcclxuY29uc3QgU2hvd01ldGhvZCAgICAgICAgICAgICAgICAgICAgICAgID0gMzY7XHJcbmNvbnN0IFNpemVNZXRob2QgICAgICAgICAgICAgICAgICAgICAgICA9IDM3O1xyXG5jb25zdCBUb2dnbGVGdWxsc2NyZWVuTWV0aG9kICAgICAgICAgICAgPSAzODtcclxuY29uc3QgVG9nZ2xlTWF4aW1pc2VNZXRob2QgICAgICAgICAgICAgID0gMzk7XHJcbmNvbnN0IFVuRnVsbHNjcmVlbk1ldGhvZCAgICAgICAgICAgICAgICA9IDQwO1xyXG5jb25zdCBVbk1heGltaXNlTWV0aG9kICAgICAgICAgICAgICAgICAgPSA0MTtcclxuY29uc3QgVW5NaW5pbWlzZU1ldGhvZCAgICAgICAgICAgICAgICAgID0gNDI7XHJcbmNvbnN0IFdpZHRoTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICA9IDQzO1xyXG5jb25zdCBab29tTWV0aG9kICAgICAgICAgICAgICAgICAgICAgICAgPSA0NDtcclxuY29uc3QgWm9vbUluTWV0aG9kICAgICAgICAgICAgICAgICAgICAgID0gNDU7XHJcbmNvbnN0IFpvb21PdXRNZXRob2QgICAgICAgICAgICAgICAgICAgICA9IDQ2O1xyXG5jb25zdCBab29tUmVzZXRNZXRob2QgICAgICAgICAgICAgICAgICAgPSA0NztcclxuXHJcbi8qKlxyXG4gKiBAdHlwZSB7c3ltYm9sfVxyXG4gKi9cclxuY29uc3QgY2FsbGVyID0gU3ltYm9sKCk7XHJcblxyXG5jbGFzcyBXaW5kb3cge1xyXG4gICAgLyoqXHJcbiAgICAgKiBJbml0aWFsaXNlcyBhIHdpbmRvdyBvYmplY3Qgd2l0aCB0aGUgc3BlY2lmaWVkIG5hbWUuXHJcbiAgICAgKlxyXG4gICAgICogQHByaXZhdGVcclxuICAgICAqIEBwYXJhbSB7c3RyaW5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yXG4gICAgICogQHJldHVybiB7V2luZG93fSAtIFRoZSBjb3JyZXNwb25kaW5nIHdpbmRvdyBvYmplY3QuXHJcbiAgICAgKi9cclxuICAgIEdldChuYW1lKSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBXaW5kb3cobmFtZSk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZXR1cm5zIHRoZSBhYnNvbHV0ZSBwb3NpdGlvbiBvZiB0aGUgd2luZG93IHRvIHRoZSBzY3JlZW4uXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTxQb3NpdGlvbj59IC0gVGhlIGN1cnJlbnQgYWJzb2x1dGUgcG9zaXRpb24gb2YgdGhlIHdpbmRvdy5cclxuICAgICAqL1xyXG4gICAgQWJzb2x1dGVQb3NpdGlvbigpIHtcclxuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKEFic29sdXRlUG9zaXRpb25NZXRob2QpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQ2VudGVycyB0aGUgd2luZG93IG9uIHRoZSBzY3JlZW4uXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cclxuICAgICAqL1xyXG4gICAgQ2VudGVyKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oQ2VudGVyTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENsb3NlcyB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIENsb3NlKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oQ2xvc2VNZXRob2QpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogRGlzYWJsZXMgbWluL21heCBzaXplIGNvbnN0cmFpbnRzLlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIERpc2FibGVTaXplQ29uc3RyYWludHMoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShEaXNhYmxlU2l6ZUNvbnN0cmFpbnRzTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEVuYWJsZXMgbWluL21heCBzaXplIGNvbnN0cmFpbnRzLlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIEVuYWJsZVNpemVDb25zdHJhaW50cygpIHtcclxuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKEVuYWJsZVNpemVDb25zdHJhaW50c01ldGhvZCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGb2N1c2VzIHRoZSB3aW5kb3cuXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cclxuICAgICAqL1xyXG4gICAgRm9jdXMoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShGb2N1c01ldGhvZCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBGb3JjZXMgdGhlIHdpbmRvdyB0byByZWxvYWQgdGhlIHBhZ2UgYXNzZXRzLlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIEZvcmNlUmVsb2FkKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oRm9yY2VSZWxvYWRNZXRob2QpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogRG9jLlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIEZ1bGxzY3JlZW4oKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShGdWxsc2NyZWVuTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgdGhlIHNjcmVlbiB0aGF0IHRoZSB3aW5kb3cgaXMgb24uXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTxTY3JlZW4+fSAtIFRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBjdXJyZW50bHkgb25cclxuICAgICAqL1xyXG4gICAgR2V0U2NyZWVuKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oR2V0U2NyZWVuTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgdGhlIGN1cnJlbnQgem9vbSBsZXZlbCBvZiB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8bnVtYmVyPn0gLSBUaGUgY3VycmVudCB6b29tIGxldmVsXHJcbiAgICAgKi9cclxuICAgIEdldFpvb20oKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShHZXRab29tTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgdGhlIGhlaWdodCBvZiB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8bnVtYmVyPn0gLSBUaGUgY3VycmVudCBoZWlnaHQgb2Y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gLyoqXHJcbiAgICAgKiBTZXRzIHRoZSB6b29tIGxldmVsIG9mIHRoZSB3aW5kb3cuXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IHpvb20gLSBUaGUgZGVzaXJlZCB6b29tIGxldmVsXHJcbiAgICAgKiBAcmV0dXJuIHtQcm9taXNlPHZvaWQ+fVxyXG4gICAgICovXHJcbiAgICBTZXRab29tKHpvb20pIHtcclxuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFNldFpvb21NZXRob2QsIHsgem9vbSB9KTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFNob3dzIHRoZSB3aW5kb3cuXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cclxuICAgICAqL1xyXG4gICAgU2hvdygpIHtcclxuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFNob3dNZXRob2QpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogUmV0dXJucyB0aGUgc2l6ZSBvZiB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8U2l6ZT59IC0gVGhlIGN1cnJlbnQgc2l6ZSBvZiB0aGUgd2luZG93XHJcbiAgICAgKi9cclxuICAgIFNpemUoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShTaXplTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFRvZ2dsZXMgdGhlIHdpbmRvdyBiZXR3ZWVuIGZ1bGxzY3JlZW4gYW5kIG5vcm1hbC5cclxuICAgICAqXHJcbiAgICAgKiBAcHVibGljXHJcbiAgICAgKiBAcmV0dXJuIHtQcm9taXNlPHZvaWQ+fVxyXG4gICAgICovXHJcbiAgICBUb2dnbGVGdWxsc2NyZWVuKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oVG9nZ2xlRnVsbHNjcmVlbk1ldGhvZCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBUb2dnbGVzIHRoZSB3aW5kb3cgYmV0d2VlbiBtYXhpbWlzZWQgYW5kIG5vcm1hbC5cclxuICAgICAqXHJcbiAgICAgKiBAcHVibGljXHJcbiAgICAgKiBAcmV0dXJuIHtQcm9taXNlPHZvaWQ+fVxyXG4gICAgICovXHJcbiAgICBUb2dnbGVNYXhpbWlzZSgpIHtcclxuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFRvZ2dsZU1heGltaXNlTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFVuLWZ1bGxzY3JlZW5zIHRoZSB3aW5kb3cuXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTx2b2lkPn1cclxuICAgICAqL1xyXG4gICAgVW5GdWxsc2NyZWVuKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzW2NhbGxlcl0oVW5GdWxsc2NyZWVuTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFVuLW1heGltaXNlcyB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIFVuTWF4aW1pc2UoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShVbk1heGltaXNlTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFVuLW1pbmltaXNlcyB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIFVuTWluaW1pc2UoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShVbk1pbmltaXNlTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgdGhlIHdpZHRoIG9mIHRoZSB3aW5kb3cuXHJcbiAgICAgKlxyXG4gICAgICogQHB1YmxpY1xyXG4gICAgICogQHJldHVybiB7UHJvbWlzZTxudW1iZXI+fSAtIFRoZSBjdXJyZW50IHdpZHRoIG9mIHRoZSB3aW5kb3dcclxuICAgICAqL1xyXG4gICAgV2lkdGgoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShXaWR0aE1ldGhvZCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBab29tcyB0aGUgd2luZG93LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIFpvb20oKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXNbY2FsbGVyXShab29tTWV0aG9kKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEluY3JlYXNlcyB0aGUgem9vbSBsZXZlbCBvZiB0aGUgd2VidmlldyBjb250ZW50LlxyXG4gICAgICpcclxuICAgICAqIEBwdWJsaWNcclxuICAgICAqIEByZXR1cm4ge1Byb21pc2U8dm9pZD59XHJcbiAgICAgKi9cclxuICAgIFpvb21JbigpIHtcclxuICAgICAgICByZXR1cm4gdGhpc1tjYWxsZXJdKFpvb21Jbk1ldGhvZCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBEZWNyZWFzZXMgdGhlIHpvb20gbGV2ZWwgb2YgdGhlIHdlYnZpZXcgY29udGVudC5cclxuICAgICAqXHJcbiAgICAgKiBAcHVibGljXHJcbiAgICAgKiBAcmV0dXJuIH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2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgLy8gQ2hlY2sgaWYgY29udGVudEVkaXRhYmxlIGlzIHRydWVcclxuICAgICAgICAgICAgaWYgKGVsZW1lbnQuaXNDb250ZW50RWRpdGFibGUpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGV4dCBoYXMgYmVlbiBzZWxlY3RlZFxyXG4gICAgICAgICAgICBjb25zdCBzZWxlY3Rpb24gPSB3aW5kb3cuZ2V0U2VsZWN0aW9uKCk7XHJcbiAgICAgICAgICAgIGNvbnN0IGhhc1NlbGVjdGlvbiA9IChzZWxlY3Rpb24udG9TdHJpbmcoKS5sZW5ndGggPiAwKVxyXG4gICAgICAgICAgICBpZiAoaGFzU2VsZWN0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlbGVjdGlvbi5yYW5nZUNvdW50OyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCByYW5nZSA9IHNlbGVjdGlvbi5nZXRSYW5nZUF0KGkpO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlY3RzID0gcmFuZ2UuZ2V0Q2xpZW50UmVjdHMoKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHJlY3RzLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlY3QgPSByZWN0c1tqXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LmVsZW1lbnRGcm9tUG9pbnQocmVjdC5sZWZ0LCByZWN0LnRvcCkgPT09IGVsZW1lbnQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAg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0FBQ3pCLElBQU0sZ0JBQWdCO0FBUWYsU0FBUyxRQUFRLE1BQU07QUFDMUIsU0FBT0EsTUFBSyxrQkFBa0IsRUFBQyxLQUFJLENBQUM7QUFDeEM7QUFNTyxTQUFTLE9BQU87QUFDbkIsU0FBT0EsTUFBSyxhQUFhO0FBQzdCOzs7QUNsQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBaURBLElBQU1DLFFBQU8sdUJBQXVCLFlBQVksU0FBUyxFQUFFO0FBRTNELElBQU0sU0FBUztBQUNmLElBQU0sYUFBYTtBQUNuQixJQUFNLGFBQWE7QUFNWixTQUFTLFNBQVM7QUFDckIsU0FBT0EsTUFBSyxNQUFNO0FBQ3RCO0FBS08sU0FBUyxhQUFhO0FBQ3pCLFNBQU9BLE1BQUssVUFBVTtBQUMxQjtBQU1PLFNBQVMsYUFBYTtBQUN6QixTQUFPQSxNQUFLLFVBQVU7QUFDMUI7OztBbEJqRUEsT0FBTyxTQUFTLE9BQU8sVUFBVSxDQUFDO0FBaUNsQyxPQUFPLE9BQU8sU0FBZ0I7QUFDdkIsT0FBTyxxQkFBcUI7IiwKICAibmFtZXMiOiBbIkVycm9yIiwgImNhbGwiLCAiRXJyb3IiLCAiY2FsbCIsICJldmVudE5hbWUiLCAiY29udHJvbGxlciIsICJyZXNpemFibGUiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiSGlkZU1ldGhvZCIsICJTaG93TWV0aG9kIiwgImNhbGwiLCAiZ2VuZXJhdGVJRCIsICJjYWxsIiwgImNhbGwiXQp9Cg== diff --git a/v3/internal/assetserver/bundledassets/runtime.js b/v3/internal/assetserver/bundledassets/runtime.js index d52e311b0a3..d23315651ef 100644 --- a/v3/internal/assetserver/bundledassets/runtime.js +++ b/v3/internal/assetserver/bundledassets/runtime.js @@ -1 +1 @@ -var he=Object.defineProperty;var u=(e,i)=>{for(var n in i)he(e,n,{get:i[n],enumerable:!0})};var G={};u(G,{Application:()=>q,Browser:()=>I,Call:()=>J,Clipboard:()=>$,Dialogs:()=>B,Events:()=>N,Flags:()=>X,Screens:()=>ie,System:()=>K,WML:()=>j,Window:()=>R});var j={};u(j,{Enable:()=>Z,Reload:()=>se});var I={};u(I,{OpenURL:()=>P});var We="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=We[Math.random()*64|0];return i};var ge=window.location.origin+"/wails/runtime",l={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9,CancelCall:10},fe=f();function d(e,i){return function(n,t=null){return De(e,n,i,t)}}function De(e,i,n,t){let r=new URL(ge);r.searchParams.append("object",e),r.searchParams.append("method",i);let s={headers:{}};return n&&(s.headers["x-wails-window-name"]=n),t&&r.searchParams.append("args",JSON.stringify(t)),s.headers["x-wails-client-id"]=fe,new Promise((c,m)=>{fetch(r,s).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();m(Error(a.statusText))}).then(a=>c(a)).catch(a=>m(a))})}var Me=d(l.Browser,""),Ce=0;function P(e){return Me(Ce,{url:e})}var B={};u(B,{Error:()=>Ie,Info:()=>Oe,OpenFile:()=>Te,Question:()=>T,SaveFile:()=>Be,Warning:()=>Pe});window._wails=window._wails||{};window._wails.dialogErrorCallback=Fe;window._wails.dialogResultCallback=Ue;var Se=0,xe=1,Ae=2,be=3,ve=4,Re=5,Ee=d(l.Dialog,""),W=new Map;function ye(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=ye();return i["dialog-id"]=n,new Promise((t,r)=>{W.set(n,{resolve:t,reject:r}),Ee(e,i).catch(s=>{r(s),W.delete(n)})})}function Ue(e,i,n){let t=W.get(e);t&&(n?t.resolve(JSON.parse(i)):t.resolve(i),W.delete(e))}function Fe(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Oe=e=>D(Se,e),Pe=e=>D(xe,e),Ie=e=>D(Ae,e),T=e=>D(be,e),Te=e=>D(ve,e),Be=e=>D(Re,e);var N={};u(N,{Emit:()=>L,Off:()=>je,OffAll:()=>Ge,On:()=>Ve,OnMultiple:()=>k,Once:()=>_e,Types:()=>ze,WailsEvent:()=>S,setup:()=>Ne});var te={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var ze=te;window._wails=window._wails||{};window._wails.dispatchWailsEvent=He;var ke=d(l.Events,""),Le=0,w=new Map,z=class{constructor(i,n,t){this.eventName=i,this.maxCallbacks=t||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},S=class{constructor(i,n=null){this.name=i,this.data=n}};function Ne(){}function He(e){let i=w.get(e.name);if(i){let n=i.filter(t=>{if(t.Callback(e))return!0});n.length>0&&(i=i.filter(t=>!n.includes(t)),i.length===0?w.delete(e.name):w.set(e.name,i))}}function k(e,i,n){let t=w.get(e)||[],r=new z(e,i,n);return t.push(r),w.set(e,t),()=>Ze(r)}function Ve(e,i){return k(e,i,-1)}function _e(e,i){return k(e,i,1)}function Ze(e){let i=e.eventName,n=w.get(i).filter(t=>t!==e);n.length===0?w.delete(i):w.set(i,n)}function je(e,...i){[e,...i].forEach(t=>w.delete(t))}function Ge(){w.clear()}function L(e){return ke(Le,e)}function oe(){if(!EventTarget||!AbortSignal||!AbortController)return!1;let e=!0,i=new EventTarget,n=new AbortController;return i.addEventListener("test",()=>{e=!1},{signal:n.signal}),n.abort(),i.dispatchEvent(new CustomEvent("test")),e}var re=!1;document.addEventListener("DOMContentLoaded",()=>re=!0);function ae(e){re||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}var Ye=0,Ke=1,Xe=2,Qe=3,qe=4,Je=5,$e=6,ei=7,ii=8,ni=9,ti=10,oi=11,ri=12,ai=13,li=14,di=15,si=16,ci=17,mi=18,ui=19,wi=20,pi=21,hi=22,Wi=23,gi=24,fi=25,Di=26,Mi=27,Ci=28,Si=29,xi=30,Ai=31,bi=32,vi=33,Ri=34,Ei=35,yi=36,Ui=37,Fi=38,Oi=39,Pi=40,Ii=41,Ti=42,Bi=43,zi=44,ki=45,Li=46,Ni=47,o=Symbol(),H=class e{constructor(i=""){this[o]=d(l.Window,i);for(let n of Object.getOwnPropertyNames(e.prototype))n!=="constructor"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}Get(i){return new e(i)}AbsolutePosition(){return this[o](Ye)}Center(){return this[o](Ke)}Close(){return this[o](Xe)}DisableSizeConstraints(){return this[o](Qe)}EnableSizeConstraints(){return this[o](qe)}Focus(){return this[o](Je)}ForceReload(){return this[o]($e)}Fullscreen(){return this[o](ei)}GetScreen(){return this[o](ii)}GetZoom(){return this[o](ni)}Height(){return this[o](ti)}Hide(){return this[o](oi)}IsFocused(){return this[o](ri)}IsFullscreen(){return this[o](ai)}IsMaximised(){return this[o](li)}IsMinimised(){return this[o](di)}Maximise(){return this[o](si)}Minimise(){return this[o](ci)}Name(){return this[o](mi)}OpenDevTools(){return this[o](ui)}RelativePosition(){return this[o](wi)}Reload(){return this[o](pi)}Resizable(){return this[o](hi)}Restore(){return this[o](Wi)}SetAbsolutePosition(i,n){return this[o](gi,{x:i,y:n})}SetAlwaysOnTop(i){return this[o](fi,{alwaysOnTop:i})}SetBackgroundColour(i,n,t,r){return this[o](Di,{r:i,g:n,b:t,a:r})}SetFrameless(i){return this[o](Mi,{frameless:i})}SetFullscreenButtonEnabled(i){return this[o](Ci,{enabled:i})}SetMaxSize(i,n){return this[o](Si,{width:i,height:n})}SetMinSize(i,n){return this[o](xi,{width:i,height:n})}SetRelativePosition(i,n){return this[o](Ai,{x:i,y:n})}SetResizable(i){return this[o](bi,{resizable:i})}SetSize(i,n){return this[o](vi,{width:i,height:n})}SetTitle(i){return this[o](Ri,{title:i})}SetZoom(i){return this[o](Ei,{zoom:i})}Show(){return this[o](yi)}Size(){return this[o](Ui)}ToggleFullscreen(){return this[o](Fi)}ToggleMaximise(){return this[o](Oi)}UnFullscreen(){return this[o](Pi)}UnMaximise(){return this[o](Ii)}UnMinimise(){return this[o](Ti)}Width(){return this[o](Bi)}Zoom(){return this[o](zi)}ZoomIn(){return this[o](ki)}ZoomOut(){return this[o](Li)}ZoomReset(){return this[o](Ni)}},Hi=new H(""),R=Hi;function Vi(e,i=null){L(new S(e,i))}function _i(e,i){let n=R.Get(e),t=n[i];if(typeof t=="function")try{t.call(n)}catch{}}function le(e){let i=e.currentTarget;function n(r="Yes"){if(r!=="Yes")return;let s=i.getAttribute("wml-event"),c=i.getAttribute("wml-target-window")||"",m=i.getAttribute("wml-window"),a=i.getAttribute("wml-openurl");s!==null&&Vi(s),m!==null&&_i(c,m),a!==null&&P(a)}let t=i.getAttribute("wml-confirm");t?T({Title:"Confirm",Message:t,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(n):n()}var E=Symbol(),V=class{constructor(){this[E]=new AbortController}set(i,n){return{signal:this[E].signal}}reset(){this[E].abort(),this[E]=new AbortController}},x=Symbol(),M=Symbol(),_=class{constructor(){this[x]=new WeakMap,this[M]=0}set(i,n){return this[M]+=!this[x].has(i),this[x].set(i,n),{}}reset(){if(!(this[M]<=0)){for(let i of document.body.querySelectorAll("*")){if(this[M]<=0)break;let n=this[x].get(i);this[M]-=typeof n<"u";for(let t of n||[])i.removeEventListener(t,le)}this[x]=new WeakMap,this[M]=0}}},de=oe()?new V:new _;function Zi(e){let i=/\S+/g,n=e.getAttribute("wml-trigger")||"click",t=[],r;for(;(r=i.exec(n))!==null;)t.push(r[0]);let s=de.set(e,t);for(let c of t)e.addEventListener(c,le,s)}function Z(){ae(se)}function se(){de.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl]").forEach(Zi)}window.wails=G;Z();var K={};u(K,{Capabilities:()=>Ki,Environment:()=>Xi,IsAMD64:()=>Ji,IsARM:()=>$i,IsARM64:()=>en,IsDarkMode:()=>Yi,IsDebug:()=>Y,IsLinux:()=>Qi,IsMac:()=>qi,IsWindows:()=>y,invoke:()=>g});var ce=d(l.System,""),ji=0,Gi=1;function g(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function Yi(){return ce(ji)}function Ki(){return fetch("/wails/capabilities").json()}function Xi(){return ce(Gi)}function y(){return window._wails.environment.OS==="windows"}function Qi(){return window._wails.environment.OS==="linux"}function qi(){return window._wails.environment.OS==="darwin"}function Ji(){return window._wails.environment.Arch==="amd64"}function $i(){return window._wails.environment.Arch==="arm"}function en(){return window._wails.environment.Arch==="arm64"}function Y(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",rn);var nn=d(l.ContextMenu,""),tn=0;function on(e,i,n,t){nn(tn,{id:e,x:i,y:n,data:t})}function rn(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let t=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");on(n,e.clientX,e.clientY,t);return}an(e)}function an(e){if(Y())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let r=window.getSelection(),s=r.toString().length>0;if(s)for(let c=0;cA});function A(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=sn;window._wails.endDrag=ue;window.addEventListener("mousedown",mn);window.addEventListener("mousemove",pn);window.addEventListener("mouseup",wn);var b=!1,U=null,me=!1,ln="auto";function dn(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function sn(e){me=e}function ue(){document.body.style.cursor="default",b=!1}function cn(){return U?(g(`resize:${U}`),!0):!1}function mn(e){(y()&&cn()||dn(e))&&(b=!!un(e))}function un(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function wn(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ue()}function h(e=ln){document.documentElement.style.cursor=e,U=e}function pn(e){b=hn(e),y()&&me&&Wn(e)}function hn(e){let i=e.buttons!==void 0?e.buttons:e.which;return b&&i>0?(g("drag"),!1):b}function Wn(e){let i=A("system.resizeHandleHeight")||5,n=A("system.resizeHandleWidth")||5,t=A("resizeCornerExtra")||10,r=window.outerWidth-e.clientXMn,Quit:()=>Sn,Show:()=>Cn});var Q=d(l.Application,""),gn=0,fn=1,Dn=2;function Mn(){return Q(gn)}function Cn(){return Q(fn)}function Sn(){return Q(Dn)}var J={};u(J,{ByID:()=>Un,ByName:()=>yn,Call:()=>En,Plugin:()=>Fn});window._wails=window._wails||{};window._wails.callResultHandler=vn;window._wails.callErrorHandler=Rn;var F=0,xn=d(l.Call,""),An=d(l.CancelCall,""),v=new Map;function bn(){let e;do e=f();while(v.has(e));return e}function vn(e,i,n){let t=we(e);t&&t.resolve(n?JSON.parse(i):i)}function Rn(e,i){let n=we(e);n&&n.reject(i)}function we(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){let n=bn(),t=()=>{An(e,{"call-id":n})};var r=!1,s=!1,c=new Promise((m,a)=>{i["call-id"]=n,v.set(n,{resolve:m,reject:a}),xn(e,i).then(p=>{s=!0,r&&t()}).catch(p=>{a(p),v.delete(n)})});return c.cancel=()=>{s?t():r=!0},c}function En(e){return O(F,e)}function yn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,t,r]=e.split(".");return O(F,{packageName:n,structName:t,methodName:r,args:i})}function Un(e,...i){return O(F,{methodID:e,args:i})}function Fn(e,i,...n){return O(F,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}var $={};u($,{SetText:()=>In,Text:()=>Tn});var pe=d(l.Clipboard,""),On=0,Pn=1;function In(e){return pe(On,{text:e})}function Tn(){return pe(Pn)}var ie={};u(ie,{GetAll:()=>Ln,GetCurrent:()=>Hn,GetPrimary:()=>Nn});var ee=d(l.Screens,""),Bn=0,zn=1,kn=2;function Ln(){return ee(Bn)}function Nn(){return ee(zn)}function Hn(){return ee(kn)}window._wails=window._wails||{};window._wails.invoke=g;g("wails:runtime:ready");export{q as Application,I as Browser,J as Call,$ as Clipboard,B as Dialogs,N as Events,X as Flags,ie as Screens,K as System,j as WML,R as Window}; +var he=Object.defineProperty;var u=(e,i)=>{for(var n in i)he(e,n,{get:i[n],enumerable:!0})};var j={};u(j,{Application:()=>J,Browser:()=>P,Call:()=>$,Clipboard:()=>ee,Dialogs:()=>T,Events:()=>k,Flags:()=>X,Screens:()=>ne,System:()=>K,WML:()=>Z,Window:()=>R});var Z={};u(Z,{Enable:()=>_,Reload:()=>ce});var P={};u(P,{OpenURL:()=>O});var We="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=We[Math.random()*64|0];return i};var ge=window.location.origin+"/wails/runtime",l={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9,CancelCall:10},fe=f();function d(e,i){return function(n,t=null){return De(e,n,i,t)}}function De(e,i,n,t){let r=new URL(ge);r.searchParams.append("object",e),r.searchParams.append("method",i);let s={headers:{}};return n&&(s.headers["x-wails-window-name"]=n),t&&r.searchParams.append("args",JSON.stringify(t)),s.headers["x-wails-client-id"]=fe,new Promise((c,m)=>{fetch(r,s).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();m(Error(a.statusText))}).then(a=>c(a)).catch(a=>m(a))})}var Me=d(l.Browser,""),Ce=0;function O(e){return Me(Ce,{url:e})}var T={};u(T,{Error:()=>Ie,Info:()=>Oe,OpenFile:()=>Te,Question:()=>I,SaveFile:()=>Be,Warning:()=>Pe});window._wails=window._wails||{};window._wails.dialogErrorCallback=Fe;window._wails.dialogResultCallback=Ue;var Se=0,xe=1,Ae=2,ve=3,be=4,Re=5,Ee=d(l.Dialog,""),W=new Map;function ye(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=ye();return i["dialog-id"]=n,new Promise((t,r)=>{W.set(n,{resolve:t,reject:r}),Ee(e,i).catch(s=>{r(s),W.delete(n)})})}function Ue(e,i,n){let t=W.get(e);t&&(n?t.resolve(JSON.parse(i)):t.resolve(i),W.delete(e))}function Fe(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Oe=e=>D(Se,e),Pe=e=>D(xe,e),Ie=e=>D(Ae,e),I=e=>D(ve,e),Te=e=>D(be,e),Be=e=>D(Re,e);var k={};u(k,{Emit:()=>L,Off:()=>je,OffAll:()=>Ge,On:()=>Ve,OnMultiple:()=>z,Once:()=>_e,Types:()=>ze,WailsEvent:()=>x,setup:()=>Ne});var oe={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var ze=oe;window._wails=window._wails||{};window._wails.dispatchWailsEvent=He;var Le=d(l.Events,""),ke=0,w=new Map,B=class{constructor(i,n,t){this.eventName=i,this.maxCallbacks=t||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(i,n=null){this.name=i,this.data=n}};function Ne(){}function He(e){let i=w.get(e.name);if(i){let n=i.filter(t=>{if(t.Callback(e))return!0});n.length>0&&(i=i.filter(t=>!n.includes(t)),i.length===0?w.delete(e.name):w.set(e.name,i))}}function z(e,i,n){let t=w.get(e)||[],r=new B(e,i,n);return t.push(r),w.set(e,t),()=>Ze(r)}function Ve(e,i){return z(e,i,-1)}function _e(e,i){return z(e,i,1)}function Ze(e){let i=e.eventName,n=w.get(i).filter(t=>t!==e);n.length===0?w.delete(i):w.set(i,n)}function je(e,...i){[e,...i].forEach(t=>w.delete(t))}function Ge(){w.clear()}function L(e){return Le(ke,e)}function re(){if(!EventTarget||!AbortSignal||!AbortController)return!1;let e=!0,i=new EventTarget,n=new AbortController;return i.addEventListener("test",()=>{e=!1},{signal:n.signal}),n.abort(),i.dispatchEvent(new CustomEvent("test")),e}var ae=!1;document.addEventListener("DOMContentLoaded",()=>ae=!0);function le(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}var Ye=0,Ke=1,Xe=2,Qe=3,qe=4,Je=5,$e=6,ei=7,ii=8,ni=9,ti=10,oi=11,ri=12,ai=13,li=14,di=15,si=16,ci=17,mi=18,ui=19,wi=20,pi=21,hi=22,Wi=23,gi=24,fi=25,Di=26,Mi=27,Ci=28,Si=29,xi=30,Ai=31,vi=32,bi=33,Ri=34,Ei=35,yi=36,Ui=37,Fi=38,Oi=39,Pi=40,Ii=41,Ti=42,Bi=43,zi=44,Li=45,ki=46,Ni=47,o=Symbol(),N=class e{constructor(i=""){this[o]=d(l.Window,i);for(let n of Object.getOwnPropertyNames(e.prototype))n!=="constructor"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}Get(i){return new e(i)}AbsolutePosition(){return this[o](Ye)}Center(){return this[o](Ke)}Close(){return this[o](Xe)}DisableSizeConstraints(){return this[o](Qe)}EnableSizeConstraints(){return this[o](qe)}Focus(){return this[o](Je)}ForceReload(){return this[o]($e)}Fullscreen(){return this[o](ei)}GetScreen(){return this[o](ii)}GetZoom(){return this[o](ni)}Height(){return this[o](ti)}Hide(){return this[o](oi)}IsFocused(){return this[o](ri)}IsFullscreen(){return this[o](ai)}IsMaximised(){return this[o](li)}IsMinimised(){return this[o](di)}Maximise(){return this[o](si)}Minimise(){return this[o](ci)}Name(){return this[o](mi)}OpenDevTools(){return this[o](ui)}RelativePosition(){return this[o](wi)}Reload(){return this[o](pi)}Resizable(){return this[o](hi)}Restore(){return this[o](Wi)}SetAbsolutePosition(i,n){return this[o](gi,{x:i,y:n})}SetAlwaysOnTop(i){return this[o](fi,{alwaysOnTop:i})}SetBackgroundColour(i,n,t,r){return this[o](Di,{r:i,g:n,b:t,a:r})}SetFrameless(i){return this[o](Mi,{frameless:i})}SetFullscreenButtonEnabled(i){return this[o](Ci,{enabled:i})}SetMaxSize(i,n){return this[o](Si,{width:i,height:n})}SetMinSize(i,n){return this[o](xi,{width:i,height:n})}SetRelativePosition(i,n){return this[o](Ai,{x:i,y:n})}SetResizable(i){return this[o](vi,{resizable:i})}SetSize(i,n){return this[o](bi,{width:i,height:n})}SetTitle(i){return this[o](Ri,{title:i})}SetZoom(i){return this[o](Ei,{zoom:i})}Show(){return this[o](yi)}Size(){return this[o](Ui)}ToggleFullscreen(){return this[o](Fi)}ToggleMaximise(){return this[o](Oi)}UnFullscreen(){return this[o](Pi)}UnMaximise(){return this[o](Ii)}UnMinimise(){return this[o](Ti)}Width(){return this[o](Bi)}Zoom(){return this[o](zi)}ZoomIn(){return this[o](Li)}ZoomOut(){return this[o](ki)}ZoomReset(){return this[o](Ni)}},Hi=new N(""),R=Hi;function Vi(e,i=null){L(new x(e,i))}function _i(e,i){let n=R.Get(e),t=n[i];if(typeof t=="function")try{t.call(n)}catch{}}function de(e){let i=e.currentTarget;function n(r="Yes"){if(r!=="Yes")return;let s=i.getAttribute("wml-event"),c=i.getAttribute("wml-target-window")||"",m=i.getAttribute("wml-window"),a=i.getAttribute("wml-openurl");s!==null&&Vi(s),m!==null&&_i(c,m),a!==null&&O(a)}let t=i.getAttribute("wml-confirm");t?I({Title:"Confirm",Message:t,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(n):n()}var E=Symbol(),H=class{constructor(){this[E]=new AbortController}set(i,n){return{signal:this[E].signal}}reset(){this[E].abort(),this[E]=new AbortController}},A=Symbol(),M=Symbol(),V=class{constructor(){this[A]=new WeakMap,this[M]=0}set(i,n){return this[M]+=!this[A].has(i),this[A].set(i,n),{}}reset(){if(!(this[M]<=0)){for(let i of document.body.querySelectorAll("*")){if(this[M]<=0)break;let n=this[A].get(i);this[M]-=typeof n<"u";for(let t of n||[])i.removeEventListener(t,de)}this[A]=new WeakMap,this[M]=0}}},se=re()?new H:new V;function Zi(e){let i=/\S+/g,n=e.getAttribute("wml-trigger")||"click",t=[],r;for(;(r=i.exec(n))!==null;)t.push(r[0]);let s=se.set(e,t);for(let c of t)e.addEventListener(c,de,s)}function _(){le(ce)}function ce(){se.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl]").forEach(Zi)}window.wails=j;_();var K={};u(K,{Capabilities:()=>Ki,Environment:()=>Xi,IsAMD64:()=>Ji,IsARM:()=>$i,IsARM64:()=>en,IsDarkMode:()=>Yi,IsDebug:()=>Y,IsLinux:()=>Qi,IsMac:()=>qi,IsWindows:()=>G,invoke:()=>g});var me=d(l.System,""),ji=0,Gi=1;function g(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function Yi(){return me(ji)}function Ki(){return fetch("/wails/capabilities").json()}function Xi(){return me(Gi)}function G(){return window._wails.environment.OS==="windows"}function Qi(){return window._wails.environment.OS==="linux"}function qi(){return window._wails.environment.OS==="darwin"}function Ji(){return window._wails.environment.Arch==="amd64"}function $i(){return window._wails.environment.Arch==="arm"}function en(){return window._wails.environment.Arch==="arm64"}function Y(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",rn);var nn=d(l.ContextMenu,""),tn=0;function on(e,i,n,t){nn(tn,{id:e,x:i,y:n,data:t})}function rn(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let t=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");on(n,e.clientX,e.clientY,t);return}an(e)}function an(e){if(Y())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let r=window.getSelection(),s=r.toString().length>0;if(s)for(let c=0;cv});function v(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}var C=!1,ue=!1,y=null,Q="auto";window._wails=window._wails||{};window._wails.setResizable=function(e){ue=e};window._wails.endDrag=function(){document.body.style.cursor="default",C=!1};window.addEventListener("mousedown",dn);window.addEventListener("mousemove",cn);window.addEventListener("mouseup",sn);function ln(e){let i=window.getComputedStyle(e.target).getPropertyValue("--wails-draggable"),n=e.buttons!==void 0?e.buttons:e.which;return!i||i===""||i.trim()!=="drag"||n===0?!1:e.detail===1}function dn(e){if(y){g("resize:"+y),e.preventDefault();return}if(ln(e)){if(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)return;C=!0}else C=!1}function sn(){C=!1}function h(e){document.documentElement.style.cursor=e||Q,y=e}function cn(e){if(C&&(C=!1,(e.buttons!==void 0?e.buttons:e.which)>0)){g("drag");return}if(!ue||!G())return;Q==null&&(Q=document.documentElement.style.cursor);let i=v("system.resizeHandleHeight")||5,n=v("system.resizeHandleWidth")||5,t=v("resizeCornerExtra")||10,r=window.outerWidth-e.clientXpn,Quit:()=>Wn,Show:()=>hn});var q=d(l.Application,""),mn=0,un=1,wn=2;function pn(){return q(mn)}function hn(){return q(un)}function Wn(){return q(wn)}var $={};u($,{ByID:()=>An,ByName:()=>xn,Call:()=>Sn,Plugin:()=>vn});window._wails=window._wails||{};window._wails.callResultHandler=Mn;window._wails.callErrorHandler=Cn;var U=0,gn=d(l.Call,""),fn=d(l.CancelCall,""),b=new Map;function Dn(){let e;do e=f();while(b.has(e));return e}function Mn(e,i,n){let t=we(e);t&&t.resolve(n?JSON.parse(i):i)}function Cn(e,i){let n=we(e);n&&n.reject(i)}function we(e){let i=b.get(e);return b.delete(e),i}function F(e,i={}){let n=Dn(),t=()=>{fn(e,{"call-id":n})};var r=!1,s=!1,c=new Promise((m,a)=>{i["call-id"]=n,b.set(n,{resolve:m,reject:a}),gn(e,i).then(p=>{s=!0,r&&t()}).catch(p=>{a(p),b.delete(n)})});return c.cancel=()=>{s?t():r=!0},c}function Sn(e){return F(U,e)}function xn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,t,r]=e.split(".");return F(U,{packageName:n,structName:t,methodName:r,args:i})}function An(e,...i){return F(U,{methodID:e,args:i})}function vn(e,i,...n){return F(U,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}var ee={};u(ee,{SetText:()=>En,Text:()=>yn});var pe=d(l.Clipboard,""),bn=0,Rn=1;function En(e){return pe(bn,{text:e})}function yn(){return pe(Rn)}var ne={};u(ne,{GetAll:()=>Pn,GetCurrent:()=>Tn,GetPrimary:()=>In});var ie=d(l.Screens,""),Un=0,Fn=1,On=2;function Pn(){return ie(Un)}function In(){return ie(Fn)}function Tn(){return ie(On)}window._wails=window._wails||{};window._wails.invoke=g;g("wails:runtime:ready");export{J as Application,P as Browser,$ as Call,ee as Clipboard,T as Dialogs,k as Events,X as Flags,ne as Screens,K as System,Z as WML,R as Window}; diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/drag.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/drag.js index 681cab2687b..6364ba94806 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/drag.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/drag.js @@ -7,91 +7,85 @@ The electron alternative for Go (c) Lea Anthony 2019-present */ - /* jshint esversion: 9 */ - import {invoke, IsWindows} from "./system"; import {GetFlag} from "./flags"; // Setup -window._wails = window._wails || {}; -window._wails.setResizable = setResizable; -window._wails.endDrag = endDrag; -window.addEventListener('mousedown', onMouseDown); -window.addEventListener('mousemove', onMouseMove); -window.addEventListener('mouseup', onMouseUp); - - let shouldDrag = false; -let resizeEdge = null; let resizable = false; +let resizeEdge = null; let defaultCursor = "auto"; -function dragTest(e) { - let val = window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region"); - if (!val || val === "" || val.trim() !== "drag" || e.buttons !== 1) { - return false; - } - return e.detail === 1; -} +window._wails = window._wails || {}; -function setResizable(value) { +window._wails.setResizable = function(value) { resizable = value; -} +}; -function endDrag() { +window._wails.endDrag = function() { document.body.style.cursor = 'default'; shouldDrag = false; -} +}; -function testResize() { - if( resizeEdge ) { - invoke(`resize:${resizeEdge}`); - return true +window.addEventListener('mousedown', onMouseDown); +window.addEventListener('mousemove', onMouseMove); +window.addEventListener('mouseup', onMouseUp); + + +function dragTest(e) { + let val = window.getComputedStyle(e.target).getPropertyValue("--wails-draggable"); + let mousePressed = e.buttons !== undefined ? e.buttons : e.which; + if (!val || val === "" || val.trim() !== "drag" || mousePressed === 0) { + return false; } - return false; + return e.detail === 1; } function onMouseDown(e) { - if(IsWindows() && testResize() || dragTest(e)) { - shouldDrag = !!isValidDrag(e); + + // Check for resizing + if (resizeEdge) { + invoke("resize:" + resizeEdge); + e.preventDefault(); + return; } -} -function isValidDrag(e) { - // Ignore drag on scrollbars - return !(e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight); + if (dragTest(e)) { + // This checks for clicks on the scroll bar + if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) { + return; + } + shouldDrag = true; + } else { + shouldDrag = false; + } } -function onMouseUp(e) { - let mousePressed = e.buttons !== undefined ? e.buttons : e.which; - if (mousePressed > 0) { - endDrag(); - } +function onMouseUp() { + shouldDrag = false; } -function setResize(cursor = defaultCursor) { - document.documentElement.style.cursor = cursor; +function setResize(cursor) { + document.documentElement.style.cursor = cursor || defaultCursor; resizeEdge = cursor; } function onMouseMove(e) { - shouldDrag = checkDrag(e); - if (IsWindows() && resizable) { - handleResize(e); + if (shouldDrag) { + shouldDrag = false; + let mousePressed = e.buttons !== undefined ? e.buttons : e.which; + if (mousePressed > 0) { + invoke("drag"); + return; + } } -} - -function checkDrag(e) { - let mousePressed = e.buttons !== undefined ? e.buttons : e.which; - if(shouldDrag && mousePressed > 0) { - invoke("drag"); - return false; + if (!resizable || !IsWindows()) { + return; + } + if (defaultCursor == null) { + defaultCursor = document.documentElement.style.cursor; } - return shouldDrag; -} - -function handleResize(e) { let resizeHandleHeight = GetFlag("system.resizeHandleHeight") || 5; let resizeHandleWidth = GetFlag("system.resizeHandleWidth") || 5; @@ -122,4 +116,4 @@ function handleResize(e) { else if (topBorder) setResize("n-resize"); else if (bottomBorder) setResize("s-resize"); else if (rightBorder) setResize("e-resize"); -} +} \ No newline at end of file diff --git a/v3/pkg/application/plugins.go b/v3/pkg/application/plugins.go index e15cbac39ef..c714376f821 100644 --- a/v3/pkg/application/plugins.go +++ b/v3/pkg/application/plugins.go @@ -3,6 +3,7 @@ package application import ( "github.com/pkg/errors" "github.com/wailsapp/wails/v3/internal/assetserver" + "io/fs" ) type PluginAPI interface { @@ -13,7 +14,7 @@ type Plugin interface { Init(api PluginAPI) error Shutdown() error CallableByJS() []string - InjectJS() string + Assets() fs.FS } type PluginManager struct { @@ -33,16 +34,19 @@ func NewPluginManager(plugins map[string]Plugin, assetServer *assetserver.AssetS func (p *PluginManager) Init() []error { api := newPluginAPI() - for _, plugin := range p.plugins { + for id, plugin := range p.plugins { err := plugin.Init(api) if err != nil { globalApplication.error("Plugin failed to initialise:", "plugin", plugin.Name(), "error", err.Error()) return p.Shutdown() } p.initialisedPlugins = append(p.initialisedPlugins, plugin) - injectJS := plugin.InjectJS() - if injectJS != "" { - p.assetServer.AddPluginScript(plugin.Name(), injectJS) + assets := plugin.Assets() + if assets != nil { + err = p.assetServer.AddPluginAssets(id, assets) + if err != nil { + return []error{errors.Wrap(err, "Failed to add plugin assets: "+plugin.Name())} + } } globalApplication.debug("Plugin initialised: " + plugin.Name()) } diff --git a/v3/plugins/oauth/README.md b/v3/plugins/experimental/oauth/README.md similarity index 100% rename from v3/plugins/oauth/README.md rename to v3/plugins/experimental/oauth/README.md diff --git a/v3/plugins/experimental/oauth/go.mod b/v3/plugins/experimental/oauth/go.mod new file mode 100644 index 00000000000..d70366257d7 --- /dev/null +++ b/v3/plugins/experimental/oauth/go.mod @@ -0,0 +1,61 @@ +module oauth + +go 1.22 + +require ( + github.com/gorilla/pat v1.0.2 + github.com/gorilla/sessions v1.2.2 + github.com/markbates/goth v1.79.0 + github.com/wailsapp/wails/v3 v3.0.0-alpha.4 +) + +require ( + dario.cat/mergo v1.0.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/bep/debounce v1.2.1 // indirect + github.com/cloudflare/circl v1.3.7 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/ebitengine/purego v0.4.0-alpha.4 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/gorilla/context v1.1.2 // indirect + github.com/gorilla/mux v1.8.1 // indirect + github.com/gorilla/securecookie v1.1.2 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/leaanthony/go-ansi-parser v1.6.1 // indirect + github.com/leaanthony/u v1.1.0 // indirect + github.com/lmittmann/tint v1.0.3 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/rivo/uniseg v0.4.4 // indirect + github.com/samber/lo v1.38.1 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect + github.com/wailsapp/go-webview2 v1.0.9 // indirect + github.com/wailsapp/mimetype v1.4.1 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/tools v0.13.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect +) + +replace github.com/wailsapp/wails/v3 => ../.. diff --git a/v3/plugins/experimental/oauth/go.sum b/v3/plugins/experimental/oauth/go.sum new file mode 100644 index 00000000000..e52ab23a8ce --- /dev/null +++ b/v3/plugins/experimental/oauth/go.sum @@ -0,0 +1,219 @@ +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= +github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5770OhYUVes= +github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/context v1.1.2 h1:WRkNAv2uoa03QNIc1A6u4O7DAGMUVoopZhkiXWA2V1o= +github.com/gorilla/context v1.1.2/go.mod h1:KDPwT9i/MeWHiLl90fuTgrt4/wPcv75vFAZLaOOcbxM= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/pat v1.0.2 h1:TDh/RulbnPxMQACcwbgMF5Bf00jaGoeYBNu+XUFuwtE= +github.com/gorilla/pat v1.0.2/go.mod h1:ioQ7dFQ2KXmOmWLJs6vZAfRikcm2D2JyuLrL9b5wVCg= +github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= +github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= +github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY= +github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= +github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A= +github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU= +github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= +github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= +github.com/lmittmann/tint v1.0.3 h1:W5PHeA2D8bBJVvabNfQD/XW9HPLZK1XoPZH0cq8NouQ= +github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= +github.com/markbates/goth v1.79.0 h1:fUYi9R6VubVEK2bpmXvIUp7xRcxA68i8ovfUQx/i5Qc= +github.com/markbates/goth v1.79.0/go.mod h1:RBD+tcFnXul2NnYuODhnIweOcuVPkBohLfEvutPekcU= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= +github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs= +github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo= +github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= +github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= +github.com/wailsapp/wails/v3 v3.0.0-alpha.4 h1:hDzzwi3LjDD8ucS++qmAWYZlfcPbKiVuSUFqXZQDGIY= +github.com/wailsapp/wails/v3 v3.0.0-alpha.4/go.mod h1:z2rXi3AEnMTnC4PDUJomQTVZ1yq5RCM+mgeLloDVhkA= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/v3/plugins/oauth/plugin.go b/v3/plugins/experimental/oauth/plugin.go similarity index 100% rename from v3/plugins/oauth/plugin.go rename to v3/plugins/experimental/oauth/plugin.go diff --git a/v3/plugins/oauth/plugin.js b/v3/plugins/experimental/oauth/plugin.js similarity index 100% rename from v3/plugins/oauth/plugin.js rename to v3/plugins/experimental/oauth/plugin.js diff --git a/v3/plugins/oauth/plugin.yaml b/v3/plugins/experimental/oauth/plugin.yaml similarity index 100% rename from v3/plugins/oauth/plugin.yaml rename to v3/plugins/experimental/oauth/plugin.yaml diff --git a/v3/plugins/single_instance/README.md b/v3/plugins/experimental/single_instance/README.md similarity index 100% rename from v3/plugins/single_instance/README.md rename to v3/plugins/experimental/single_instance/README.md diff --git a/v3/plugins/single_instance/go-singleinstance.LICENSE b/v3/plugins/experimental/single_instance/go-singleinstance.LICENSE similarity index 100% rename from v3/plugins/single_instance/go-singleinstance.LICENSE rename to v3/plugins/experimental/single_instance/go-singleinstance.LICENSE diff --git a/v3/plugins/single_instance/lock.go b/v3/plugins/experimental/single_instance/lock.go similarity index 100% rename from v3/plugins/single_instance/lock.go rename to v3/plugins/experimental/single_instance/lock.go diff --git a/v3/plugins/single_instance/lock_posix.go b/v3/plugins/experimental/single_instance/lock_posix.go similarity index 100% rename from v3/plugins/single_instance/lock_posix.go rename to v3/plugins/experimental/single_instance/lock_posix.go diff --git a/v3/plugins/single_instance/lock_windows.go b/v3/plugins/experimental/single_instance/lock_windows.go similarity index 100% rename from v3/plugins/single_instance/lock_windows.go rename to v3/plugins/experimental/single_instance/lock_windows.go diff --git a/v3/plugins/single_instance/plugin.go b/v3/plugins/experimental/single_instance/plugin.go similarity index 97% rename from v3/plugins/single_instance/plugin.go rename to v3/plugins/experimental/single_instance/plugin.go index caa8b68a4a7..227361e8f50 100644 --- a/v3/plugins/single_instance/plugin.go +++ b/v3/plugins/experimental/single_instance/plugin.go @@ -2,6 +2,7 @@ package single_instance import ( "fmt" + "io/fs" "os" "path/filepath" @@ -24,8 +25,8 @@ func (p *Plugin) CallableByJS() []string { return []string{} } -func (p *Plugin) InjectJS() string { - return "" +func (p *Plugin) Assets() fs.FS { + return nil } func NewPlugin(config *Config) *Plugin { diff --git a/v3/plugins/single_instance/plugin.yaml b/v3/plugins/experimental/single_instance/plugin.yaml similarity index 100% rename from v3/plugins/single_instance/plugin.yaml rename to v3/plugins/experimental/single_instance/plugin.yaml diff --git a/v3/plugins/single_instance/plugin_darwin.go b/v3/plugins/experimental/single_instance/plugin_darwin.go similarity index 100% rename from v3/plugins/single_instance/plugin_darwin.go rename to v3/plugins/experimental/single_instance/plugin_darwin.go diff --git a/v3/plugins/single_instance/plugin_linux.go b/v3/plugins/experimental/single_instance/plugin_linux.go similarity index 100% rename from v3/plugins/single_instance/plugin_linux.go rename to v3/plugins/experimental/single_instance/plugin_linux.go diff --git a/v3/plugins/single_instance/plugin_windows.go b/v3/plugins/experimental/single_instance/plugin_windows.go similarity index 100% rename from v3/plugins/single_instance/plugin_windows.go rename to v3/plugins/experimental/single_instance/plugin_windows.go diff --git a/v3/plugins/start_at_login/README.md b/v3/plugins/experimental/start_at_login/README.md similarity index 100% rename from v3/plugins/start_at_login/README.md rename to v3/plugins/experimental/start_at_login/README.md diff --git a/v3/plugins/start_at_login/plugin.go b/v3/plugins/experimental/start_at_login/plugin.go similarity index 89% rename from v3/plugins/start_at_login/plugin.go rename to v3/plugins/experimental/start_at_login/plugin.go index 7ad4cf009dd..5ec4970b809 100644 --- a/v3/plugins/start_at_login/plugin.go +++ b/v3/plugins/experimental/start_at_login/plugin.go @@ -1,6 +1,9 @@ package start_at_login -import "github.com/wailsapp/wails/v3/pkg/application" +import ( + "github.com/wailsapp/wails/v3/pkg/application" + "io/fs" +) type Plugin struct { disabled bool @@ -45,6 +48,6 @@ func (p *Plugin) CallableByJS() []string { } } -func (p *Plugin) InjectJS() string { - return "" +func (p *Plugin) Assets() fs.FS { + return nil } diff --git a/v3/plugins/start_at_login/plugin.yaml b/v3/plugins/experimental/start_at_login/plugin.yaml similarity index 100% rename from v3/plugins/start_at_login/plugin.yaml rename to v3/plugins/experimental/start_at_login/plugin.yaml diff --git a/v3/plugins/start_at_login/plugin_darwin.go b/v3/plugins/experimental/start_at_login/plugin_darwin.go similarity index 100% rename from v3/plugins/start_at_login/plugin_darwin.go rename to v3/plugins/experimental/start_at_login/plugin_darwin.go diff --git a/v3/plugins/start_at_login/plugin_linux.go b/v3/plugins/experimental/start_at_login/plugin_linux.go similarity index 100% rename from v3/plugins/start_at_login/plugin_linux.go rename to v3/plugins/experimental/start_at_login/plugin_linux.go diff --git a/v3/plugins/start_at_login/plugin_window.go b/v3/plugins/experimental/start_at_login/plugin_window.go similarity index 100% rename from v3/plugins/start_at_login/plugin_window.go rename to v3/plugins/experimental/start_at_login/plugin_window.go diff --git a/v3/plugins/kvstore/README.md b/v3/plugins/kvstore/README.md index bb6dd0f07ee..c75c63435c0 100644 --- a/v3/plugins/kvstore/README.md +++ b/v3/plugins/kvstore/README.md @@ -27,6 +27,18 @@ func main() { ``` +### Options + +```go +type Config struct { + Filename string + AutoSave bool +} +``` + +- `Filename` - The name of the file to store the key/value pairs in. This file will be created in the application's data directory. +- `AutoSave` - If true, the store will be saved to disk after every change. If false, you will need to call `Save()` to persist the changes. + ## Usage ### Go @@ -34,11 +46,19 @@ func main() { You can call the methods exported by the plugin directly: ```go + // Set a key err := kvstore.Set("url", "https://www.google.com") if err != nil { // handle error } + // Get a key url := kvstore.Get("url").(string) + + // Delete a key + err = kvstore.Delete("url") + if err != nil { + // handle error + } // If you have not enables AutoSave, you will need to call Save() to persist the changes err = kvstore.Save() @@ -54,7 +74,10 @@ You can call the methods from the frontend using the Plugin method: ```js wails.Plugin("kvstore","Set", "url", "https://www.google.com") wails.Plugin("kvstore","Get", "url").then((url) => { - + + }) + wails.Plugin("kvstore","Delete", "url").then((url) => { + }) // or diff --git a/v3/plugins/kvstore/plugin.js b/v3/plugins/kvstore/assets/kvstore.js similarity index 64% rename from v3/plugins/kvstore/plugin.js rename to v3/plugins/kvstore/assets/kvstore.js index 5233081f63b..13265677aa2 100644 --- a/v3/plugins/kvstore/plugin.js +++ b/v3/plugins/kvstore/assets/kvstore.js @@ -2,13 +2,15 @@ // This file should contain helper functions for the that can be used by the frontend. // Below are examples of how to use JSDoc to define the Hashes struct and the exported functions. +import { Call } from '/wails/runtime.js'; + /** * Get the value of a key. * @param key {string} - The store key. * @returns {Promise} - The value of the key. */ export function Get(key) { - return wails.CallByID(3322496224, key); + return Call.ByID(3322496224, key); } /** @@ -18,7 +20,7 @@ export function Get(key) { * @returns {Promise} */ export function Set(key, value) { - return wails.CallByID(1207638860, key, value); + return Call.ByID(1207638860, key, value); } @@ -27,5 +29,14 @@ export function Set(key, value) { * @returns {Promise} */ export function Save() { - return wails.CallByID(1377075201); + return Call.ByID(1377075201); } + +/** + * Delete a key from the store. + * @param key {string} - The key to delete. + * @returns {Promise} + */ +export function Delete(key) { + return Call.ByID(737249231, key); +} \ No newline at end of file diff --git a/v3/plugins/kvstore/kvstore.go b/v3/plugins/kvstore/kvstore.go index e2b5e75265f..dd87bc72095 100644 --- a/v3/plugins/kvstore/kvstore.go +++ b/v3/plugins/kvstore/kvstore.go @@ -1,14 +1,19 @@ package kvstore import ( + "embed" "encoding/json" "github.com/pkg/errors" "github.com/wailsapp/wails/v3/pkg/application" "io" + "io/fs" "os" "sync" ) +//go:embed assets/* +var assets embed.FS + type KeyValueStore struct { config *Config filename string @@ -17,10 +22,6 @@ type KeyValueStore struct { lock sync.RWMutex } -func (kvs *KeyValueStore) InjectJS() string { - return "" -} - type Config struct { Filename string AutoSave bool @@ -66,12 +67,13 @@ func (kvs *KeyValueStore) CallableByJS() []string { return []string{ "Set", "Get", + "Delete", "Save", } } -func (p *Plugin) InjectJS() string { - return "" +func (kvs *KeyValueStore) Assets() fs.FS { + return assets } // ---------------- Plugin Methods ---------------- @@ -146,11 +148,24 @@ func (kvs *KeyValueStore) Get(key string) any { // Set sets the value for the given key. If AutoSave is true, the store is saved to disk. func (kvs *KeyValueStore) Set(key string, value any) error { kvs.lock.Lock() - if value == nil { - delete(kvs.data, key) + kvs.data[key] = value + kvs.lock.Unlock() + if kvs.config.AutoSave { + err := kvs.Save() + if err != nil { + return err + } + kvs.unsaved = false } else { - kvs.data[key] = value + kvs.unsaved = true } + return nil +} + +// Delete deletes the key from the store. If AutoSave is true, the store is saved to disk. +func (kvs *KeyValueStore) Delete(key string) error { + kvs.lock.Lock() + delete(kvs.data, key) kvs.lock.Unlock() if kvs.config.AutoSave { err := kvs.Save() diff --git a/v3/plugins/log/plugin.js b/v3/plugins/log/assets/log.js similarity index 64% rename from v3/plugins/log/plugin.js rename to v3/plugins/log/assets/log.js index 7fea212d6bf..31afdc5ede7 100644 --- a/v3/plugins/log/plugin.js +++ b/v3/plugins/log/assets/log.js @@ -2,6 +2,8 @@ // This file should contain helper functions for the that can be used by the frontend. // Below are examples of how to use JSDoc to define the Hashes struct and the exported functions. +import {Call} from '/wails/runtime.js'; + /** * Log at the Debug level. * @param input {string} - The message in printf format. @@ -9,8 +11,8 @@ * @returns {Promise} */ -function Debug(input, ...args) { - return wails.CallByID(4111675027, input, ...args); +export function Debug(input, ...args) { + return Call.ByID(4111675027, input, ...args); } /** @@ -19,8 +21,8 @@ function Debug(input, ...args) { * @param args {...any} - The arguments for the log message. * @returns {Promise} */ -function Info(input, ...args) { - return wails.CallByID(2391172776, input, ...args); +export function Info(input, ...args) { + return Call.ByID(2391172776, input, ...args); } /** @@ -29,8 +31,8 @@ function Info(input, ...args) { * @param args {...any} - The arguments for the log message. * @returns {Promise} */ -function Warning(input, ...args) { - return wails.CallByID(2762394760, input, ...args); +export function Warning(input, ...args) { + return Call.ByID(2762394760, input, ...args); } /** @@ -39,14 +41,14 @@ function Warning(input, ...args) { * @param args {...any} - The arguments for the log message. * @returns {Promise} */ -function Error(input, ...args) { - return wails.CallByID(878590242, input, ...args); +export function Error(input, ...args) { + return Call.ByID(878590242, input, ...args); } -const LevelDebug = -4 -const LevelInfo = 0 -const LevelWarn = 4 -const LevelError = 8 +export const LevelDebug = -4 +export const LevelInfo = 0 +export const LevelWarn = 4 +export const LevelError = 8 /** @@ -54,6 +56,6 @@ const LevelError = 8 * @param level {LogLevel} - The log level to set. * @returns {Promise} */ -function SetLogLevel(level) { - return wails.CallByID(2758810652, level); +export function SetLogLevel(level) { + return Call.ByID(2758810652, level); } diff --git a/v3/plugins/log/plugin.go b/v3/plugins/log/plugin.go index 623801aa55b..b4cc9f64fdb 100644 --- a/v3/plugins/log/plugin.go +++ b/v3/plugins/log/plugin.go @@ -1,13 +1,15 @@ package log import ( + "embed" _ "embed" "github.com/wailsapp/wails/v3/pkg/application" + "io/fs" "log/slog" ) -//go:embed plugin.js -var pluginJS string +//go:embed assets/* +var assets embed.FS // ---------------- Plugin Setup ---------------- // This is the main plugin struct. It can be named anything you like. @@ -72,8 +74,8 @@ func (p *Plugin) CallableByJS() []string { } } -func (p *Plugin) InjectJS() string { - return pluginJS +func (p *Plugin) Assets() fs.FS { + return assets } // ---------------- Plugin Methods ---------------- diff --git a/v3/plugins/sqlite/assets/sqlite.js b/v3/plugins/sqlite/assets/sqlite.js new file mode 100644 index 00000000000..137a7591ab1 --- /dev/null +++ b/v3/plugins/sqlite/assets/sqlite.js @@ -0,0 +1,39 @@ + +import {Call} from '/wails/runtime.js'; + +/** + * Open a sqlite DB. + * @param filename {string} - file to open. + * @returns {Promise} + */ +export function Open(filename) { + return Call.ByID(147348976, filename); +} + +/** + * Close a sqlite DB. + * @returns {Promise} + */ +export function Close() { + return Call.ByID(3998329564); +} + +/** + * Execute a SQL statement. + * @param statement {string} - SQL statement to execute. + * @param args {...any} - Arguments to pass to the statement. + * @returns {Promise} + */ +export function Execute(statement, ...args) { + return Call.ByID(2804887383, statement, ...args); +} + +/** + * Perform a select query. + * @param statement {string} - Select SQL statement. + * @param args {...any} - Arguments to pass to the statement. + * @returns {Promise} + */ +export function Select(statement, ...args) { + return Call.ByID(2209315040, statement, ...args); +} diff --git a/v3/plugins/sqlite/plugin.go b/v3/plugins/sqlite/plugin.go index f1ac8675fcd..94c3b682b36 100644 --- a/v3/plugins/sqlite/plugin.go +++ b/v3/plugins/sqlite/plugin.go @@ -2,22 +2,16 @@ package sqlite import ( "database/sql" + "embed" _ "embed" "errors" - "fmt" "github.com/wailsapp/wails/v3/pkg/application" + "io/fs" _ "modernc.org/sqlite" - "strings" ) -//go:embed sqlite_close.js -var closejs string - -//go:embed sqlite_open.js -var openjs string - -//go:embed sqlite_execute_select.js -var executeselectjs string +//go:embed assets/* +var assets embed.FS // ---------------- Plugin Setup ---------------- // This is the main plugin struct. It can be named anything you like. @@ -25,10 +19,9 @@ var executeselectjs string // Both the Init() and Shutdown() methods are called synchronously when the app starts and stops. type Config struct { - // Add any configuration options here - CanOpenFromJS bool - CanCloseFromJS bool - DBFile string + DBFile string + CanCallOpen bool + CanCallClose bool } type Plugin struct { @@ -63,14 +56,11 @@ func (p *Plugin) Name() string { // initialise any resources you need. func (p *Plugin) Init(api application.PluginAPI) error { p.callableMethods = []string{"Execute", "Select"} - p.js = executeselectjs - if p.config.CanOpenFromJS { + if p.config.CanCallOpen { p.callableMethods = append(p.callableMethods, "Open") - p.js += openjs } - if p.config.CanCloseFromJS { + if p.config.CanCallClose { p.callableMethods = append(p.callableMethods, "Close") - p.js += closejs } if p.config.DBFile == "" { return errors.New(`no database file specified. Please set DBFile in the config to either a filename or use ":memory:" to use an in-memory database`) @@ -80,7 +70,6 @@ func (p *Plugin) Init(api application.PluginAPI) error { return err } - p.js += fmt.Sprintf("\nwindow.sqlite = { %s };", strings.Join(p.callableMethods, ", ")) return nil } @@ -89,8 +78,8 @@ func (p *Plugin) CallableByJS() []string { return p.callableMethods } -func (p *Plugin) InjectJS() string { - return p.js +func (p *Plugin) Assets() fs.FS { + return assets } // ---------------- Plugin Methods ---------------- @@ -157,15 +146,15 @@ func (p *Plugin) Select(query string, args ...any) ([]map[string]any, error) { return results, nil } -func (p *Plugin) Close() error { +func (p *Plugin) Close() (string, error) { if p.conn == nil { - return errors.New("no open database connection") + return "", errors.New("no open database connection") } err := p.conn.Close() if err != nil { - return err + return "", err } p.conn = nil - return nil + return "Database connection closed", nil } diff --git a/v3/plugins/sqlite/sqlite_close.js b/v3/plugins/sqlite/sqlite_close.js deleted file mode 100644 index 579af1a07fa..00000000000 --- a/v3/plugins/sqlite/sqlite_close.js +++ /dev/null @@ -1,8 +0,0 @@ - -/** - * Close a sqlite DB. - * @returns {Promise} - */ -function Close() { - return wails.CallByID(3998329564); -} diff --git a/v3/plugins/sqlite/sqlite_execute_select.js b/v3/plugins/sqlite/sqlite_execute_select.js deleted file mode 100644 index ab0bcd93132..00000000000 --- a/v3/plugins/sqlite/sqlite_execute_select.js +++ /dev/null @@ -1,20 +0,0 @@ - -/** - * Execute a SQL statement. - * @param statement {string} - SQL statement to execute. - @param args {...any} - Arguments to pass to the statement. - * @returns {Promise} - */ -function Execute(statement, ...args) { - return wails.CallByID(2804887383, statement, ...args); -} - -/** - * Perform a select query. - * @param statement {string} - Select SQL statement. - * @param args {...any} - Arguments to pass to the statement. - * @returns {Promise} - */ -function Select(statement, ...args) { - return wails.CallByID(2209315040, statement, ...args); -} diff --git a/v3/plugins/sqlite/sqlite_open.js b/v3/plugins/sqlite/sqlite_open.js deleted file mode 100644 index e7385bb8b26..00000000000 --- a/v3/plugins/sqlite/sqlite_open.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Open a sqlite DB. - * @param filename {string} - file to open. - * @returns {Promise} - */ -function Open(filename) { - return wails.CallByID(147348976, filename); -} From ed5532a535d52bf3c2e966582332c565137db958 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 14 Apr 2024 21:47:37 +1000 Subject: [PATCH 2/5] Update plugin docs --- mkdocs-website/docs/en/learn/plugins.md | 113 +++++++++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/mkdocs-website/docs/en/learn/plugins.md b/mkdocs-website/docs/en/learn/plugins.md index 5d45a41c5da..2da7abe5562 100644 --- a/mkdocs-website/docs/en/learn/plugins.md +++ b/mkdocs-website/docs/en/learn/plugins.md @@ -44,7 +44,118 @@ The `README.md` file provides documentation for the plugin. This should include ## Example -Here's an example of how to use a plugin in your Wails application: +Here's the Log plugin implementation: + +```go +package log + +import ( + "embed" + _ "embed" + "github.com/wailsapp/wails/v3/pkg/application" + "io/fs" + "log/slog" +) + +//go:embed assets/* +var assets embed.FS + +// ---------------- Plugin Setup ---------------- +// This is the main plugin struct. It can be named anything you like. +// It must implement the application.Plugin interface. +// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops. + +type Config struct { + // Logger is the logger to use. If not set, a default logger will be used. + Logger *slog.Logger + + // LogLevel defines the log level of the logger. + LogLevel slog.Level + + // Handles errors that occur when writing to the log + ErrorHandler func(err error) +} + +type Plugin struct { + config *Config + app *application.App + level slog.LevelVar +} + +func NewPluginWithConfig(config *Config) *Plugin { + if config.Logger == nil { + config.Logger = application.DefaultLogger(config.LogLevel) + } + + result := &Plugin{ + config: config, + } + result.level.Set(config.LogLevel) + return result +} + +func NewPlugin() *Plugin { + return NewPluginWithConfig(&Config{}) +} + +// Shutdown is called when the app is shutting down +// You can use this to clean up any resources you have allocated +func (p *Plugin) Shutdown() error { return nil } + +// Name returns the name of the plugin. +// You should use the go module format e.g. github.com/myuser/myplugin +func (p *Plugin) Name() string { + return "github.com/wailsapp/wails/v3/plugins/log" +} + +func (p *Plugin) Init(api application.PluginAPI) error { + return nil +} + +// CallableByJS returns a list of methods that can be called from the frontend +func (p *Plugin) CallableByJS() []string { + return []string{ + "Debug", + "Info", + "Warning", + "Error", + "SetLogLevel", + } +} + +func (p *Plugin) Assets() fs.FS { + return assets +} + +// ---------------- Plugin Methods ---------------- +// Plugin methods are just normal Go methods. You can add as many as you like. +// The only requirement is that they are exported (start with a capital letter). +// You can also return any type that is JSON serializable. +// See https://golang.org/pkg/encoding/json/#Marshal for more information. + +func (p *Plugin) Debug(message string, args ...any) { + p.config.Logger.Debug(message, args...) +} + +func (p *Plugin) Info(message string, args ...any) { + p.config.Logger.Info(message, args...) +} + +func (p *Plugin) Warning(message string, args ...any) { + p.config.Logger.Warn(message, args...) +} + +func (p *Plugin) Error(message string, args ...any) { + p.config.Logger.Error(message, args...) +} + +func (p *Plugin) SetLogLevel(level slog.Level) { + p.level.Set(level) +} + +``` + +This plugin can be added to the application like this: ```go Plugins: map[string]application.Plugin{ From 0895e6a508e860b4c54257ea81a945a286dac02e Mon Sep 17 00:00:00 2001 From: Atterpac <89053530+atterpac@users.noreply.github.com> Date: Mon, 15 Apr 2024 02:57:19 -0400 Subject: [PATCH 3/5] refresh version up (#3391) --- v3/go.mod | 8 ++++---- v3/go.sum | 22 +++++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/v3/go.mod b/v3/go.mod index f2d249b210c..1fc15829906 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -3,7 +3,7 @@ module github.com/wailsapp/wails/v3 go 1.21 require ( - github.com/atterpac/refresh v0.6.3 + github.com/atterpac/refresh v0.7.2 github.com/bep/debounce v1.2.1 github.com/ebitengine/purego v0.4.0-alpha.4 github.com/go-git/go-git/v5 v5.11.0 @@ -48,7 +48,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/containerd/console v1.0.3 // indirect + github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect @@ -71,7 +71,7 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/cpuid/v2 v2.2.3 // indirect github.com/lithammer/fuzzysearch v1.1.5 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-zglob v0.0.4 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect @@ -79,7 +79,7 @@ require ( github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/radovskyb/watcher v1.0.7 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/rivo/uniseg v0.4.4 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/rjeczalik/notify v0.9.3 // indirect github.com/sajari/fuzzy v1.0.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect diff --git a/v3/go.sum b/v3/go.sum index 3dc7732ec5d..b639f7923c6 100644 --- a/v3/go.sum +++ b/v3/go.sum @@ -67,8 +67,10 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuW github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= -github.com/atterpac/refresh v0.6.3 h1:rSAxJ+XBj8T5OYn19vzoRE+xil7gUuTfPUv9YE3r6G8= -github.com/atterpac/refresh v0.6.3/go.mod h1:W9+fdF8JdYv89Mo0s4mmcAYkcwdXEpoU2A1v9Mh9kP8= +github.com/atterpac/refresh v0.7.1 h1:uErxSypivvUZeSn1uYKbfRtsE/Bju0ErST9sBCivZEU= +github.com/atterpac/refresh v0.7.1/go.mod h1:fJpWySLdpbANS8Ej5OvfZVZIVvi/9bmnhTjKS5EjQes= +github.com/atterpac/refresh v0.7.2 h1:GBAe7J9WntEV+mPGHnbDLk5gaykqk9T0SH97oyCHkrg= +github.com/atterpac/refresh v0.7.2/go.mod h1:fJpWySLdpbANS8Ej5OvfZVZIVvi/9bmnhTjKS5EjQes= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= @@ -81,10 +83,11 @@ github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUK github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0= -github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= +github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -280,8 +283,8 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-zglob v0.0.4 h1:LQi2iOm0/fGgu80AioIJ/1j9w9Oh+9DZ39J4VAGzHQM= @@ -321,8 +324,8 @@ github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qq github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -527,6 +530,7 @@ golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 220d5535f7d8a60f4e0b88b35edcd79d58a70132 Mon Sep 17 00:00:00 2001 From: Atterpac <89053530+atterpac@users.noreply.github.com> Date: Mon, 15 Apr 2024 04:03:35 -0400 Subject: [PATCH 4/5] revert dialog channel close (#3395) Co-authored-by: Lea Anthony --- v3/pkg/application/dialogs.go | 1 - 1 file changed, 1 deletion(-) diff --git a/v3/pkg/application/dialogs.go b/v3/pkg/application/dialogs.go index 1cfc01b71b1..bd54059f308 100644 --- a/v3/pkg/application/dialogs.go +++ b/v3/pkg/application/dialogs.go @@ -272,7 +272,6 @@ func (d *OpenFileDialogStruct) PromptForSingleSelection() (string, error) { if err == nil { result = <-selections } - close(selections) return result, err } From 9ca1b30da16e17ea39a3732671cc5709a03a546f Mon Sep 17 00:00:00 2001 From: abichinger Date: Mon, 15 Apr 2024 17:05:23 +0200 Subject: [PATCH 5/5] [v3 alpha] Fix drag-n-drop on some linux distros (#3346) * Fix drag and drop on linux - Move C code * Use GTK_DEST_DEFAULT_DROP * Update changelog * Move C code back into `linux_cgo.go` --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/linux_cgo.go | 81 ++++++++++++++++------------- 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 85b9f894b7b..6d82b20c6b4 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix custom context menu closing immediately on linux by [@abichinger](https://github.com/abichinger) in [#3330](https://github.com/wailsapp/wails/pull/3330) - Fix the output path and extension of model files produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334) - Fix the import paths of model files in JS code produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334) +- Fix drag-n-drop on some linux distros by [@abichinger](https://github.com/abichinger) in [#3346](https://github.com/wailsapp/wails/pull/3346) ### Changed diff --git a/v3/pkg/application/linux_cgo.go b/v3/pkg/application/linux_cgo.go index 0faff97f561..9696070da9b 100644 --- a/v3/pkg/application/linux_cgo.go +++ b/v3/pkg/application/linux_cgo.go @@ -65,15 +65,7 @@ extern void handleLoadChanged(WebKitWebView*, WebKitLoadEvent, uintptr_t); void handleClick(void*); extern gboolean onButtonEvent(GtkWidget *widget, GdkEventButton *event, uintptr_t user_data); extern gboolean onMenuButtonEvent(GtkWidget *widget, GdkEventButton *event, uintptr_t user_data); -extern void onDragNDrop( - void *target, - GdkDragContext* context, - gint x, - gint y, - gpointer seldata, - guint info, - guint time, - gpointer data); +extern void onUriList(char **extracted, gpointer data); extern gboolean onKeyPressEvent (GtkWidget *widget, GdkEventKey *event, uintptr_t user_data); extern void onProcessRequest(WebKitURISchemeRequest *request, uintptr_t user_data); extern void sendMessageToBackend(WebKitUserContentManager *contentManager, WebKitJavascriptResult *result, void *data); @@ -210,6 +202,36 @@ static void install_signal_handlers() { static int GetNumScreens(){ return 0; } + +static void on_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, + GtkSelectionData *selection_data, guint target_type, guint time, + gpointer data) +{ + gint length = gtk_selection_data_get_length(selection_data); + + if (length < 0) + { + g_print("DnD failed!\n"); + gtk_drag_finish(context, FALSE, FALSE, time); + } + + gchar *uri_data = (gchar *)gtk_selection_data_get_data(selection_data); + gchar **uri_list = g_uri_list_extract_uris(uri_data); + + onUriList(uri_list, data); + + g_strfreev(uri_list); + gtk_drag_finish(context, TRUE, TRUE, time); +} + +// drag and drop tutorial: https://wiki.gnome.org/Newcomers/OldDragNDropTutorial +static void enableDND(GtkWidget *widget, gpointer data) +{ + GtkTargetEntry *target = gtk_target_entry_new("text/uri-list", 0, 0); + gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP, target, 1, GDK_ACTION_COPY); + + signal_connect(widget, "drag-data-received", on_data_received, data); +} */ import "C" @@ -767,16 +789,10 @@ func (w *linuxWebviewWindow) close() { } func (w *linuxWebviewWindow) enableDND() { - id := w.parent.id - dnd := C.CString("text/uri-list") - defer C.free(unsafe.Pointer(dnd)) - targetentry := C.gtk_target_entry_new(dnd, 0, C.guint(id)) - defer C.gtk_target_entry_free(targetentry) - C.gtk_drag_dest_set((*C.GtkWidget)(w.webview), C.GTK_DEST_DEFAULT_DROP, targetentry, 1, C.GDK_ACTION_COPY) - event := C.CString("drag-data-received") - defer C.free(unsafe.Pointer(event)) - windowId := C.uint(id) - C.signal_connect(unsafe.Pointer(w.webview), event, C.onDragNDrop, unsafe.Pointer(C.gpointer(&windowId))) + C.gtk_drag_dest_unset((*C.GtkWidget)(w.webview)) + + windowId := C.uint(w.parent.id) + C.enableDND((*C.GtkWidget)(w.vbox), C.gpointer(&windowId)) } func (w *linuxWebviewWindow) execJS(js string) { @@ -1382,29 +1398,20 @@ func onMenuButtonEvent(_ *C.GtkWidget, event *C.GdkEventButton, data C.uintptr_t return C.gboolean(0) } -//export onDragNDrop -func onDragNDrop(target unsafe.Pointer, context *C.GdkDragContext, x C.gint, y C.gint, seldata unsafe.Pointer, info C.guint, time C.guint, data unsafe.Pointer) { - var length C.gint - selection := unsafe.Pointer(C.gtk_selection_data_get_data_with_length((*C.GtkSelectionData)(seldata), &length)) - extracted := C.g_uri_list_extract_uris((*C.char)(selection)) - defer C.g_strfreev(extracted) - - uris := unsafe.Slice( - (**C.char)(unsafe.Pointer(extracted)), - int(length)) - - var filenames []string - for _, uri := range uris { - if uri == nil { - break - } - filenames = append(filenames, strings.TrimPrefix(C.GoString(uri), "file://")) +//export onUriList +func onUriList(extracted **C.char, data unsafe.Pointer) { + // Credit: https://groups.google.com/g/golang-nuts/c/bI17Bpck8K4/m/DVDa7EMtDAAJ + offset := unsafe.Sizeof(uintptr(0)) + filenames := []string{} + for *extracted != nil { + filenames = append(filenames, strings.TrimPrefix(C.GoString(*extracted), "file://")) + extracted = (**C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(extracted)) + offset)) } + windowDragAndDropBuffer <- &dragAndDropMessage{ windowId: uint(*((*C.uint)(data))), filenames: filenames, } - C.gtk_drag_finish(context, C.true, C.false, time) } //export onKeyPressEvent