qlue-ls 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/package.json +32 -0
- package/sparql_language_server_web.d.ts +4 -0
- package/sparql_language_server_web.js +5 -0
- package/sparql_language_server_web_bg.js +356 -0
- package/sparql_language_server_web_bg.wasm +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Ioannis Nezis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
> [!CAUTION]
|
|
2
|
+
> This Project is still in an early stage.
|
|
3
|
+
> Only the format capability is production ready.
|
|
4
|
+
> The rest is experimental.
|
|
5
|
+
|
|
6
|
+
<h1 align="center">
|
|
7
|
+
Qlue-ls 🦀
|
|
8
|
+
</h1>
|
|
9
|
+
|
|
10
|
+
⚡Qlue-ls (pronounced "clueless") is a blazingly fast [language server](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification) for [SPARQL](https://de.wikipedia.org/wiki/SPARQL), written in Rust 🦀.
|
|
11
|
+
|
|
12
|
+
# Getting Started
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Qlue-ls is available on [crate.io](https://crates.io/crates/qlue-ls):
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
cargo install qlue-ls
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
And on [PyPi](https://pypi.org/project/qlue-ls/):
|
|
23
|
+
|
|
24
|
+
```shell
|
|
25
|
+
pipx install qlue-ls
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
You can also build it from source:
|
|
29
|
+
|
|
30
|
+
```shell
|
|
31
|
+
git clone https://github.com/IoannisNezis/sparql-language-server.git
|
|
32
|
+
cd sparql-language-server
|
|
33
|
+
cargo build --release --bin qlue-ls
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
To run qlue-ls as **formatter** run:
|
|
39
|
+
|
|
40
|
+
```shell
|
|
41
|
+
qlue-ls format <PATH>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
To run qlue-ls as **lanugage server** run:
|
|
45
|
+
|
|
46
|
+
```shell
|
|
47
|
+
qlue-ls server
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This will create a language server listening on stdio.
|
|
51
|
+
|
|
52
|
+
## Connect to Neovim
|
|
53
|
+
|
|
54
|
+
After you installed the language server, add this to your `init.lua`:
|
|
55
|
+
|
|
56
|
+
```lua
|
|
57
|
+
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
|
58
|
+
desc = 'Connect to sparql-language-server',
|
|
59
|
+
pattern = { 'sparql' },
|
|
60
|
+
callback = function()
|
|
61
|
+
vim.lsp.start {
|
|
62
|
+
name = 'qlue-ls',
|
|
63
|
+
cmd = { 'qlue-ls', 'server' },
|
|
64
|
+
root_dir = vim.fn.getcwd(),
|
|
65
|
+
on_attach = function(client, bufnr)
|
|
66
|
+
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, { buffer = bufnr, desc = 'LSP: ' .. '[F]ormat' })
|
|
67
|
+
end,
|
|
68
|
+
}
|
|
69
|
+
end,
|
|
70
|
+
})
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Open a `.rq` file and check that the buffer is attached to th server:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
:checkhealth lsp
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Configure keymaps in `on_attach` function.
|
|
80
|
+
|
|
81
|
+
# Capabilities
|
|
82
|
+
|
|
83
|
+
## Formatting
|
|
84
|
+
|
|
85
|
+
**Status**: Full support
|
|
86
|
+
|
|
87
|
+
Formats SPARQL queries to ensure consistent and readable syntax.
|
|
88
|
+
Customizable options to align with preferred query styles are also implemented.
|
|
89
|
+
|
|
90
|
+
## Diagnostics
|
|
91
|
+
|
|
92
|
+
**Status**: Partial support
|
|
93
|
+
|
|
94
|
+
Currently provides a few basic diagnostics for syntax errors and simple issues in SPARQL queries.
|
|
95
|
+
Further enhancements are planned to cover a broader range of semantic and logic-related diagnostics.
|
|
96
|
+
|
|
97
|
+
**Currently provided diagnostics**:
|
|
98
|
+
|
|
99
|
+
- unused namespace (warning): A declared namespace is not used
|
|
100
|
+
- undefined namespace (error): A used namespace is not declared
|
|
101
|
+
|
|
102
|
+
**Planed diagnostics**:
|
|
103
|
+
|
|
104
|
+
- path compresion possible (info): A declared namespace is not used
|
|
105
|
+
|
|
106
|
+
## Completion
|
|
107
|
+
|
|
108
|
+
**Status**: Rudimentary
|
|
109
|
+
|
|
110
|
+
Basic auto-completion for SPARQL keywords and variables. Currently not context aware.
|
|
111
|
+
Future improvements will expand suggestions to include functions, predicates, and custom completions based on query context.
|
|
112
|
+
|
|
113
|
+
## Code Actions
|
|
114
|
+
|
|
115
|
+
**Status**: Planed
|
|
116
|
+
|
|
117
|
+
Future support for code actions, such as quick fixes and refactoring suggestions, to improve productivity and code quality in SPARQL development.
|
|
118
|
+
|
|
119
|
+
**Planed code actions**:
|
|
120
|
+
|
|
121
|
+
- Consolidate property paths
|
|
122
|
+
- Refactor iris into namespaces
|
|
123
|
+
- Sort Prefixes
|
|
124
|
+
|
|
125
|
+
# Configuration
|
|
126
|
+
|
|
127
|
+
qlue-ls can be configured through a `qlue-ls.toml` or `qlue-ls.yml` file.
|
|
128
|
+
|
|
129
|
+
Here is the full default configuration
|
|
130
|
+
```toml
|
|
131
|
+
[format]
|
|
132
|
+
align_predicates = false
|
|
133
|
+
align_prefixes = false
|
|
134
|
+
separate_prolouge = true
|
|
135
|
+
capitalize_keywords = true
|
|
136
|
+
insert_spaces = true
|
|
137
|
+
tab_size = 2
|
|
138
|
+
where_new_line = true
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
# use in web
|
|
142
|
+
|
|
143
|
+
If you want to connect from a web-based-editor, you can use this package as well.
|
|
144
|
+
For this purpouse this can be compiled to wasm and is availible on [npm](https://www.npmjs.com/package/@ioannisnezis/sparql-language-server):
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
```shell
|
|
148
|
+
npm i @ioannisnezis/sparql-language-server
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
You will have to wrap this in a Web Worker and provide a language server client.
|
|
152
|
+
There will be more documentation on this in the future...
|
|
153
|
+
|
|
154
|
+
## Demo
|
|
155
|
+
|
|
156
|
+
In the mean time, check out the [demo](https://sparql.nezis.de).
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "qlue-ls",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"collaborators": [
|
|
5
|
+
"Ioannis Nezis <ioannis@nezis.de>"
|
|
6
|
+
],
|
|
7
|
+
"description": "A formatter for SPARQL queries",
|
|
8
|
+
"version": "0.1.16",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/IoannisNezis/sparql-language-server"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"sparql_language_server_web_bg.wasm",
|
|
16
|
+
"sparql_language_server_web.js",
|
|
17
|
+
"sparql_language_server_web_bg.js",
|
|
18
|
+
"sparql_language_server_web.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"main": "sparql_language_server_web.js",
|
|
21
|
+
"types": "sparql_language_server_web.d.ts",
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"./sparql_language_server_web.js",
|
|
24
|
+
"./snippets/*"
|
|
25
|
+
],
|
|
26
|
+
"keywords": [
|
|
27
|
+
"SPARQL",
|
|
28
|
+
"formatter",
|
|
29
|
+
"lsp",
|
|
30
|
+
"wasm"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
export function __wbg_set_wasm(val) {
|
|
3
|
+
wasm = val;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function addToExternrefTable0(obj) {
|
|
8
|
+
const idx = wasm.__externref_table_alloc();
|
|
9
|
+
wasm.__wbindgen_export_2.set(idx, obj);
|
|
10
|
+
return idx;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleError(f, args) {
|
|
14
|
+
try {
|
|
15
|
+
return f.apply(this, args);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
const idx = addToExternrefTable0(e);
|
|
18
|
+
wasm.__wbindgen_exn_store(idx);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
23
|
+
|
|
24
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
25
|
+
|
|
26
|
+
cachedTextDecoder.decode();
|
|
27
|
+
|
|
28
|
+
let cachedUint8ArrayMemory0 = null;
|
|
29
|
+
|
|
30
|
+
function getUint8ArrayMemory0() {
|
|
31
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
32
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
33
|
+
}
|
|
34
|
+
return cachedUint8ArrayMemory0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getStringFromWasm0(ptr, len) {
|
|
38
|
+
ptr = ptr >>> 0;
|
|
39
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function isLikeNone(x) {
|
|
43
|
+
return x === undefined || x === null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
47
|
+
? { register: () => {}, unregister: () => {} }
|
|
48
|
+
: new FinalizationRegistry(state => {
|
|
49
|
+
wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
53
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
54
|
+
const real = (...args) => {
|
|
55
|
+
// First up with a closure we increment the internal reference
|
|
56
|
+
// count. This ensures that the Rust closure environment won't
|
|
57
|
+
// be deallocated while we're invoking it.
|
|
58
|
+
state.cnt++;
|
|
59
|
+
const a = state.a;
|
|
60
|
+
state.a = 0;
|
|
61
|
+
try {
|
|
62
|
+
return f(a, state.b, ...args);
|
|
63
|
+
} finally {
|
|
64
|
+
if (--state.cnt === 0) {
|
|
65
|
+
wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
|
|
66
|
+
CLOSURE_DTORS.unregister(state);
|
|
67
|
+
} else {
|
|
68
|
+
state.a = a;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
real.original = state;
|
|
73
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
74
|
+
return real;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
let WASM_VECTOR_LEN = 0;
|
|
78
|
+
|
|
79
|
+
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
80
|
+
|
|
81
|
+
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
82
|
+
|
|
83
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
84
|
+
? function (arg, view) {
|
|
85
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
86
|
+
}
|
|
87
|
+
: function (arg, view) {
|
|
88
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
89
|
+
view.set(buf);
|
|
90
|
+
return {
|
|
91
|
+
read: arg.length,
|
|
92
|
+
written: buf.length
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
97
|
+
|
|
98
|
+
if (realloc === undefined) {
|
|
99
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
100
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
101
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
102
|
+
WASM_VECTOR_LEN = buf.length;
|
|
103
|
+
return ptr;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
let len = arg.length;
|
|
107
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
108
|
+
|
|
109
|
+
const mem = getUint8ArrayMemory0();
|
|
110
|
+
|
|
111
|
+
let offset = 0;
|
|
112
|
+
|
|
113
|
+
for (; offset < len; offset++) {
|
|
114
|
+
const code = arg.charCodeAt(offset);
|
|
115
|
+
if (code > 0x7F) break;
|
|
116
|
+
mem[ptr + offset] = code;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (offset !== len) {
|
|
120
|
+
if (offset !== 0) {
|
|
121
|
+
arg = arg.slice(offset);
|
|
122
|
+
}
|
|
123
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
124
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
125
|
+
const ret = encodeString(arg, view);
|
|
126
|
+
|
|
127
|
+
offset += ret.written;
|
|
128
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
WASM_VECTOR_LEN = offset;
|
|
132
|
+
return ptr;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let cachedDataViewMemory0 = null;
|
|
136
|
+
|
|
137
|
+
function getDataViewMemory0() {
|
|
138
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
139
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
140
|
+
}
|
|
141
|
+
return cachedDataViewMemory0;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @param {string} text
|
|
145
|
+
* @returns {string}
|
|
146
|
+
*/
|
|
147
|
+
export function format_raw(text) {
|
|
148
|
+
let deferred2_0;
|
|
149
|
+
let deferred2_1;
|
|
150
|
+
try {
|
|
151
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
152
|
+
const len0 = WASM_VECTOR_LEN;
|
|
153
|
+
const ret = wasm.format_raw(ptr0, len0);
|
|
154
|
+
deferred2_0 = ret[0];
|
|
155
|
+
deferred2_1 = ret[1];
|
|
156
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
157
|
+
} finally {
|
|
158
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @param {ReadableStreamDefaultReader} reader
|
|
164
|
+
* @param {WritableStreamDefaultWriter} writer
|
|
165
|
+
* @returns {Promise<void>}
|
|
166
|
+
*/
|
|
167
|
+
export function start_language_server(reader, writer) {
|
|
168
|
+
const ret = wasm.start_language_server(reader, writer);
|
|
169
|
+
return ret;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
173
|
+
wasm.closure494_externref_shim(arg0, arg1, arg2);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function __wbg_adapter_51(arg0, arg1, arg2, arg3) {
|
|
177
|
+
wasm.closure511_externref_shim(arg0, arg1, arg2, arg3);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function __wbg_call_500db948e69c7330() { return handleError(function (arg0, arg1, arg2) {
|
|
181
|
+
const ret = arg0.call(arg1, arg2);
|
|
182
|
+
return ret;
|
|
183
|
+
}, arguments) };
|
|
184
|
+
|
|
185
|
+
export function __wbg_call_b0d8e36992d9900d() { return handleError(function (arg0, arg1) {
|
|
186
|
+
const ret = arg0.call(arg1);
|
|
187
|
+
return ret;
|
|
188
|
+
}, arguments) };
|
|
189
|
+
|
|
190
|
+
export function __wbg_debug_19114f11037e4658(arg0, arg1, arg2, arg3) {
|
|
191
|
+
console.debug(arg0, arg1, arg2, arg3);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export function __wbg_error_483d659117b6f3f6(arg0, arg1, arg2, arg3) {
|
|
195
|
+
console.error(arg0, arg1, arg2, arg3);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export function __wbg_error_fab41a42d22bf2bc(arg0) {
|
|
199
|
+
console.error(arg0);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export function __wbg_get_bbccf8970793c087() { return handleError(function (arg0, arg1) {
|
|
203
|
+
const ret = Reflect.get(arg0, arg1);
|
|
204
|
+
return ret;
|
|
205
|
+
}, arguments) };
|
|
206
|
+
|
|
207
|
+
export function __wbg_info_18e75e6ce8a36a90(arg0, arg1, arg2, arg3) {
|
|
208
|
+
console.info(arg0, arg1, arg2, arg3);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export function __wbg_log_bc77772961bf21bb(arg0, arg1, arg2, arg3) {
|
|
212
|
+
console.log(arg0, arg1, arg2, arg3);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export function __wbg_new_3d446df9155128ef(arg0, arg1) {
|
|
216
|
+
try {
|
|
217
|
+
var state0 = {a: arg0, b: arg1};
|
|
218
|
+
var cb0 = (arg0, arg1) => {
|
|
219
|
+
const a = state0.a;
|
|
220
|
+
state0.a = 0;
|
|
221
|
+
try {
|
|
222
|
+
return __wbg_adapter_51(a, state0.b, arg0, arg1);
|
|
223
|
+
} finally {
|
|
224
|
+
state0.a = a;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
const ret = new Promise(cb0);
|
|
228
|
+
return ret;
|
|
229
|
+
} finally {
|
|
230
|
+
state0.a = state0.b = 0;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export function __wbg_newnoargs_fd9e4bf8be2bc16d(arg0, arg1) {
|
|
235
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
236
|
+
return ret;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export function __wbg_queueMicrotask_2181040e064c0dc8(arg0) {
|
|
240
|
+
queueMicrotask(arg0);
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export function __wbg_queueMicrotask_ef9ac43769cbcc4f(arg0) {
|
|
244
|
+
const ret = arg0.queueMicrotask;
|
|
245
|
+
return ret;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export function __wbg_read_4d173e86f707008c(arg0) {
|
|
249
|
+
const ret = arg0.read();
|
|
250
|
+
return ret;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
export function __wbg_resolve_0bf7c44d641804f9(arg0) {
|
|
254
|
+
const ret = Promise.resolve(arg0);
|
|
255
|
+
return ret;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export function __wbg_static_accessor_GLOBAL_0be7472e492ad3e3() {
|
|
259
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
260
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export function __wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb() {
|
|
264
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
265
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export function __wbg_static_accessor_SELF_1dc398a895c82351() {
|
|
269
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
270
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export function __wbg_static_accessor_WINDOW_ae1c80c7eea8d64a() {
|
|
274
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
275
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
export function __wbg_then_0438fad860fe38e1(arg0, arg1) {
|
|
279
|
+
const ret = arg0.then(arg1);
|
|
280
|
+
return ret;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export function __wbg_then_0ffafeddf0e182a4(arg0, arg1, arg2) {
|
|
284
|
+
const ret = arg0.then(arg1, arg2);
|
|
285
|
+
return ret;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export function __wbg_warn_cb8be8bbf790a5d6(arg0, arg1, arg2, arg3) {
|
|
289
|
+
console.warn(arg0, arg1, arg2, arg3);
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export function __wbg_write_0aea81ae26043440(arg0, arg1) {
|
|
293
|
+
const ret = arg0.write(arg1);
|
|
294
|
+
return ret;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
export function __wbindgen_boolean_get(arg0) {
|
|
298
|
+
const v = arg0;
|
|
299
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
300
|
+
return ret;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export function __wbindgen_cb_drop(arg0) {
|
|
304
|
+
const obj = arg0.original;
|
|
305
|
+
if (obj.cnt-- == 1) {
|
|
306
|
+
obj.a = 0;
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
const ret = false;
|
|
310
|
+
return ret;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export function __wbindgen_closure_wrapper2230(arg0, arg1, arg2) {
|
|
314
|
+
const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_22);
|
|
315
|
+
return ret;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export function __wbindgen_init_externref_table() {
|
|
319
|
+
const table = wasm.__wbindgen_export_2;
|
|
320
|
+
const offset = table.grow(4);
|
|
321
|
+
table.set(0, undefined);
|
|
322
|
+
table.set(offset + 0, undefined);
|
|
323
|
+
table.set(offset + 1, null);
|
|
324
|
+
table.set(offset + 2, true);
|
|
325
|
+
table.set(offset + 3, false);
|
|
326
|
+
;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export function __wbindgen_is_function(arg0) {
|
|
330
|
+
const ret = typeof(arg0) === 'function';
|
|
331
|
+
return ret;
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
export function __wbindgen_is_undefined(arg0) {
|
|
335
|
+
const ret = arg0 === undefined;
|
|
336
|
+
return ret;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
|
340
|
+
const obj = arg1;
|
|
341
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
342
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
343
|
+
var len1 = WASM_VECTOR_LEN;
|
|
344
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
345
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
|
349
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
350
|
+
return ret;
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
export function __wbindgen_throw(arg0, arg1) {
|
|
354
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
355
|
+
};
|
|
356
|
+
|
|
Binary file
|