mons-web 0.1.69 → 0.1.71

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/mons-web.d.ts CHANGED
@@ -10,6 +10,18 @@
10
10
  export function winner(fen_w: string, fen_b: string, flat_moves_string_w: string, flat_moves_string_b: string): string;
11
11
  /**
12
12
  */
13
+ export enum Color {
14
+ White = 0,
15
+ Black = 1,
16
+ }
17
+ /**
18
+ */
19
+ export enum ManaKind {
20
+ Regular = 0,
21
+ Supermana = 1,
22
+ }
23
+ /**
24
+ */
13
25
  export enum SquareModelKind {
14
26
  Regular = 0,
15
27
  ConsumableBase = 1,
@@ -20,6 +32,14 @@ export enum SquareModelKind {
20
32
  }
21
33
  /**
22
34
  */
35
+ export enum OutputModelKind {
36
+ InvalidInput = 0,
37
+ LocationsToStartFrom = 1,
38
+ NextInputOptions = 2,
39
+ Events = 3,
40
+ }
41
+ /**
42
+ */
23
43
  export enum Consumable {
24
44
  Potion = 0,
25
45
  Bomb = 1,
@@ -27,49 +47,31 @@ export enum Consumable {
27
47
  }
28
48
  /**
29
49
  */
30
- export enum AvailableMoveKind {
31
- MonMove = 0,
32
- ManaMove = 1,
33
- Action = 2,
34
- Potion = 3,
35
- }
36
- /**
37
- */
38
- export enum ItemModelKind {
39
- Mon = 0,
40
- Mana = 1,
41
- MonWithMana = 2,
42
- MonWithConsumable = 3,
43
- Consumable = 4,
44
- }
45
- /**
46
- */
47
- export enum MonKind {
48
- Demon = 0,
49
- Drainer = 1,
50
- Angel = 2,
51
- Spirit = 3,
52
- Mystic = 4,
53
- }
54
- /**
55
- */
56
- export enum Color {
57
- White = 0,
58
- Black = 1,
50
+ export enum Modifier {
51
+ SelectPotion = 0,
52
+ SelectBomb = 1,
53
+ Cancel = 2,
59
54
  }
60
55
  /**
61
56
  */
62
- export enum OutputModelKind {
63
- InvalidInput = 0,
64
- LocationsToStartFrom = 1,
65
- NextInputOptions = 2,
66
- Events = 3,
57
+ export enum NextInputKind {
58
+ MonMove = 0,
59
+ ManaMove = 1,
60
+ MysticAction = 2,
61
+ DemonAction = 3,
62
+ DemonAdditionalStep = 4,
63
+ SpiritTargetCapture = 5,
64
+ SpiritTargetMove = 6,
65
+ SelectConsumable = 7,
66
+ BombAttack = 8,
67
67
  }
68
68
  /**
69
69
  */
70
- export enum ManaKind {
71
- Regular = 0,
72
- Supermana = 1,
70
+ export enum AvailableMoveKind {
71
+ MonMove = 0,
72
+ ManaMove = 1,
73
+ Action = 2,
74
+ Potion = 3,
73
75
  }
74
76
  /**
75
77
  */
@@ -97,23 +99,21 @@ export enum EventModelKind {
97
99
  }
98
100
  /**
99
101
  */
100
- export enum NextInputKind {
101
- MonMove = 0,
102
- ManaMove = 1,
103
- MysticAction = 2,
104
- DemonAction = 3,
105
- DemonAdditionalStep = 4,
106
- SpiritTargetCapture = 5,
107
- SpiritTargetMove = 6,
108
- SelectConsumable = 7,
109
- BombAttack = 8,
102
+ export enum MonKind {
103
+ Demon = 0,
104
+ Drainer = 1,
105
+ Angel = 2,
106
+ Spirit = 3,
107
+ Mystic = 4,
110
108
  }
111
109
  /**
112
110
  */
113
- export enum Modifier {
114
- SelectPotion = 0,
115
- SelectBomb = 1,
116
- Cancel = 2,
111
+ export enum ItemModelKind {
112
+ Mon = 0,
113
+ Mana = 1,
114
+ MonWithMana = 2,
115
+ MonWithConsumable = 3,
116
+ Consumable = 4,
117
117
  }
118
118
  /**
119
119
  */
@@ -274,10 +274,6 @@ export class MonsGameModel {
274
274
  */
275
275
  clearTracking(): void;
276
276
  /**
277
- * @returns {OutputModel}
278
- */
279
- smart_automove(): OutputModel;
280
- /**
281
277
  * @returns {boolean}
282
278
  */
283
279
  is_moves_verified(): boolean;
@@ -304,6 +300,10 @@ export class MonsGameModel {
304
300
  */
305
301
  setVerboseTracking(enabled: boolean): void;
306
302
  /**
303
+ * @returns {Promise<any>}
304
+ */
305
+ smartAutomoveAsync(): Promise<any>;
306
+ /**
307
307
  * @returns {(Location)[]}
308
308
  */
309
309
  locations_with_content(): (Location)[];
@@ -317,16 +317,16 @@ export class MonsGameModel {
317
317
  */
318
318
  verbose_tracking_entities(): (VerboseTrackingEntityModel)[];
319
319
  /**
320
- * @param {number} depth
321
- * @param {number} max_visited_nodes
322
- * @returns {OutputModel}
323
- */
324
- smartAutomoveWithBudget(depth: number, max_visited_nodes: number): OutputModel;
325
- /**
326
320
  * @returns {Int32Array}
327
321
  */
328
322
  inactive_player_items_counters(): Int32Array;
329
323
  /**
324
+ * @param {number} depth
325
+ * @param {number} max_visited_nodes
326
+ * @returns {Promise<any>}
327
+ */
328
+ smartAutomoveWithBudgetAsync(depth: number, max_visited_nodes: number): Promise<any>;
329
+ /**
330
330
  * @returns {string}
331
331
  */
332
332
  fen(): string;
@@ -506,8 +506,8 @@ export interface InitOutput {
506
506
  readonly monsgamemodel_process_input_fen: (a: number, b: number, c: number) => number;
507
507
  readonly monsgamemodel_remove_item: (a: number, b: number) => void;
508
508
  readonly monsgamemodel_setVerboseTracking: (a: number, b: number) => void;
509
- readonly monsgamemodel_smartAutomoveWithBudget: (a: number, b: number, c: number) => number;
510
- readonly monsgamemodel_smart_automove: (a: number) => number;
509
+ readonly monsgamemodel_smartAutomoveAsync: (a: number) => number;
510
+ readonly monsgamemodel_smartAutomoveWithBudgetAsync: (a: number, b: number, c: number) => number;
511
511
  readonly monsgamemodel_square: (a: number, b: number) => number;
512
512
  readonly monsgamemodel_takeback: (a: number) => number;
513
513
  readonly monsgamemodel_takeback_fens: (a: number, b: number) => void;
@@ -528,29 +528,32 @@ export interface InitOutput {
528
528
  readonly __wbg_get_nextinputmodel_location: (a: number) => number;
529
529
  readonly __wbg_squaremodel_free: (a: number) => void;
530
530
  readonly __wbg_set_nextinputmodel_location: (a: number, b: number) => void;
531
- readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
532
- readonly __wbg_get_location_i: (a: number) => number;
533
- readonly __wbg_get_location_j: (a: number) => number;
534
531
  readonly __wbg_get_mon_color: (a: number) => number;
532
+ readonly __wbg_get_mon_cooldown: (a: number) => number;
535
533
  readonly __wbg_get_mon_kind: (a: number) => number;
536
- readonly __wbg_location_free: (a: number) => void;
537
534
  readonly __wbg_mon_free: (a: number) => void;
538
- readonly __wbg_set_location_i: (a: number, b: number) => void;
539
- readonly __wbg_set_location_j: (a: number, b: number) => void;
540
535
  readonly __wbg_set_mon_color: (a: number, b: number) => void;
536
+ readonly __wbg_set_mon_cooldown: (a: number, b: number) => void;
541
537
  readonly __wbg_set_mon_kind: (a: number, b: number) => void;
542
538
  readonly mon_decrease_cooldown: (a: number) => void;
543
539
  readonly mon_faint: (a: number) => void;
544
540
  readonly mon_is_fainted: (a: number) => number;
545
541
  readonly mon_new: (a: number, b: number, c: number) => number;
546
- readonly __wbg_set_mon_cooldown: (a: number, b: number) => void;
542
+ readonly __wbg_get_location_i: (a: number) => number;
543
+ readonly __wbg_get_location_j: (a: number) => number;
544
+ readonly __wbg_location_free: (a: number) => void;
545
+ readonly __wbg_set_location_i: (a: number, b: number) => void;
546
+ readonly __wbg_set_location_j: (a: number, b: number) => void;
547
547
  readonly location_new: (a: number, b: number) => number;
548
- readonly __wbg_get_mon_cooldown: (a: number) => number;
548
+ readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
549
549
  readonly __wbindgen_malloc: (a: number, b: number) => number;
550
550
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
551
+ readonly __wbindgen_export_2: WebAssembly.Table;
552
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1b02ee0876841a5d: (a: number, b: number) => void;
551
553
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
552
554
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
553
555
  readonly __wbindgen_exn_store: (a: number) => void;
556
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd: (a: number, b: number, c: number, d: number) => void;
554
557
  }
555
558
 
556
559
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/mons-web.js CHANGED
@@ -4,10 +4,19 @@ const heap = new Array(128).fill(undefined);
4
4
 
5
5
  heap.push(undefined, null, true, false);
6
6
 
7
- function getObject(idx) { return heap[idx]; }
8
-
9
7
  let heap_next = heap.length;
10
8
 
9
+ function addHeapObject(obj) {
10
+ if (heap_next === heap.length) heap.push(heap.length + 1);
11
+ const idx = heap_next;
12
+ heap_next = heap[idx];
13
+
14
+ heap[idx] = obj;
15
+ return idx;
16
+ }
17
+
18
+ function getObject(idx) { return heap[idx]; }
19
+
11
20
  function dropObject(idx) {
12
21
  if (idx < 132) return;
13
22
  heap[idx] = heap_next;
@@ -38,15 +47,6 @@ function getStringFromWasm0(ptr, len) {
38
47
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
48
  }
40
49
 
41
- function addHeapObject(obj) {
42
- if (heap_next === heap.length) heap.push(heap.length + 1);
43
- const idx = heap_next;
44
- heap_next = heap[idx];
45
-
46
- heap[idx] = obj;
47
- return idx;
48
- }
49
-
50
50
  let WASM_VECTOR_LEN = 0;
51
51
 
52
52
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -116,6 +116,40 @@ function getInt32Memory0() {
116
116
  return cachedInt32Memory0;
117
117
  }
118
118
 
119
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
120
+ ? { register: () => {}, unregister: () => {} }
121
+ : new FinalizationRegistry(state => {
122
+ wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
123
+ });
124
+
125
+ function makeMutClosure(arg0, arg1, dtor, f) {
126
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
127
+ const real = (...args) => {
128
+ // First up with a closure we increment the internal reference
129
+ // count. This ensures that the Rust closure environment won't
130
+ // be deallocated while we're invoking it.
131
+ state.cnt++;
132
+ const a = state.a;
133
+ state.a = 0;
134
+ try {
135
+ return f(a, state.b, ...args);
136
+ } finally {
137
+ if (--state.cnt === 0) {
138
+ wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
139
+ CLOSURE_DTORS.unregister(state);
140
+ } else {
141
+ state.a = a;
142
+ }
143
+ }
144
+ };
145
+ real.original = state;
146
+ CLOSURE_DTORS.register(real, state, state);
147
+ return real;
148
+ }
149
+ function __wbg_adapter_26(arg0, arg1) {
150
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1b02ee0876841a5d(arg0, arg1);
151
+ }
152
+
119
153
  let cachedUint32Memory0 = null;
120
154
 
121
155
  function getUint32Memory0() {
@@ -196,39 +230,43 @@ function handleError(f, args) {
196
230
  wasm.__wbindgen_exn_store(addHeapObject(e));
197
231
  }
198
232
  }
233
+ function __wbg_adapter_152(arg0, arg1, arg2, arg3) {
234
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
235
+ }
236
+
199
237
  /**
200
238
  */
201
- export const SquareModelKind = Object.freeze({ Regular:0,"0":"Regular",ConsumableBase:1,"1":"ConsumableBase",SupermanaBase:2,"2":"SupermanaBase",ManaBase:3,"3":"ManaBase",ManaPool:4,"4":"ManaPool",MonBase:5,"5":"MonBase", });
239
+ export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
202
240
  /**
203
241
  */
204
- export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
242
+ export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
205
243
  /**
206
244
  */
207
- export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
245
+ export const SquareModelKind = Object.freeze({ Regular:0,"0":"Regular",ConsumableBase:1,"1":"ConsumableBase",SupermanaBase:2,"2":"SupermanaBase",ManaBase:3,"3":"ManaBase",ManaPool:4,"4":"ManaPool",MonBase:5,"5":"MonBase", });
208
246
  /**
209
247
  */
210
- export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
248
+ export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
211
249
  /**
212
250
  */
213
- export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
251
+ export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
214
252
  /**
215
253
  */
216
- export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
254
+ export const Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
217
255
  /**
218
256
  */
219
- export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
257
+ export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",MysticAction:2,"2":"MysticAction",DemonAction:3,"3":"DemonAction",DemonAdditionalStep:4,"4":"DemonAdditionalStep",SpiritTargetCapture:5,"5":"SpiritTargetCapture",SpiritTargetMove:6,"6":"SpiritTargetMove",SelectConsumable:7,"7":"SelectConsumable",BombAttack:8,"8":"BombAttack", });
220
258
  /**
221
259
  */
222
- export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
260
+ export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
223
261
  /**
224
262
  */
225
263
  export const EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",ManaScored:2,"2":"ManaScored",MysticAction:3,"3":"MysticAction",DemonAction:4,"4":"DemonAction",DemonAdditionalStep:5,"5":"DemonAdditionalStep",SpiritTargetMove:6,"6":"SpiritTargetMove",PickupBomb:7,"7":"PickupBomb",PickupPotion:8,"8":"PickupPotion",PickupMana:9,"9":"PickupMana",MonFainted:10,"10":"MonFainted",ManaDropped:11,"11":"ManaDropped",SupermanaBackToBase:12,"12":"SupermanaBackToBase",BombAttack:13,"13":"BombAttack",MonAwake:14,"14":"MonAwake",BombExplosion:15,"15":"BombExplosion",NextTurn:16,"16":"NextTurn",GameOver:17,"17":"GameOver",Takeback:18,"18":"Takeback",UsePotion:19,"19":"UsePotion", });
226
264
  /**
227
265
  */
228
- export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",MysticAction:2,"2":"MysticAction",DemonAction:3,"3":"DemonAction",DemonAdditionalStep:4,"4":"DemonAdditionalStep",SpiritTargetCapture:5,"5":"SpiritTargetCapture",SpiritTargetMove:6,"6":"SpiritTargetMove",SelectConsumable:7,"7":"SelectConsumable",BombAttack:8,"8":"BombAttack", });
266
+ export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
229
267
  /**
230
268
  */
231
- export const Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
269
+ export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
232
270
 
233
271
  const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
234
272
  ? { register: () => {}, unregister: () => {} }
@@ -644,14 +682,14 @@ export class Mon {
644
682
  * @returns {number}
645
683
  */
646
684
  get cooldown() {
647
- const ret = wasm.__wbg_get_location_i(this.__wbg_ptr);
685
+ const ret = wasm.__wbg_get_mon_cooldown(this.__wbg_ptr);
648
686
  return ret;
649
687
  }
650
688
  /**
651
689
  * @param {number} arg0
652
690
  */
653
691
  set cooldown(arg0) {
654
- wasm.__wbg_set_location_i(this.__wbg_ptr, arg0);
692
+ wasm.__wbg_set_mon_cooldown(this.__wbg_ptr, arg0);
655
693
  }
656
694
  /**
657
695
  * @returns {boolean}
@@ -815,13 +853,6 @@ export class MonsGameModel {
815
853
  wasm.monsgamemodel_clearTracking(this.__wbg_ptr);
816
854
  }
817
855
  /**
818
- * @returns {OutputModel}
819
- */
820
- smart_automove() {
821
- const ret = wasm.monsgamemodel_smart_automove(this.__wbg_ptr);
822
- return OutputModel.__wrap(ret);
823
- }
824
- /**
825
856
  * @returns {boolean}
826
857
  */
827
858
  is_moves_verified() {
@@ -878,6 +909,13 @@ export class MonsGameModel {
878
909
  wasm.monsgamemodel_setVerboseTracking(this.__wbg_ptr, enabled);
879
910
  }
880
911
  /**
912
+ * @returns {Promise<any>}
913
+ */
914
+ smartAutomoveAsync() {
915
+ const ret = wasm.monsgamemodel_smartAutomoveAsync(this.__wbg_ptr);
916
+ return takeObject(ret);
917
+ }
918
+ /**
881
919
  * @returns {(Location)[]}
882
920
  */
883
921
  locations_with_content() {
@@ -920,15 +958,6 @@ export class MonsGameModel {
920
958
  }
921
959
  }
922
960
  /**
923
- * @param {number} depth
924
- * @param {number} max_visited_nodes
925
- * @returns {OutputModel}
926
- */
927
- smartAutomoveWithBudget(depth, max_visited_nodes) {
928
- const ret = wasm.monsgamemodel_smartAutomoveWithBudget(this.__wbg_ptr, depth, max_visited_nodes);
929
- return OutputModel.__wrap(ret);
930
- }
931
- /**
932
961
  * @returns {Int32Array}
933
962
  */
934
963
  inactive_player_items_counters() {
@@ -945,6 +974,15 @@ export class MonsGameModel {
945
974
  }
946
975
  }
947
976
  /**
977
+ * @param {number} depth
978
+ * @param {number} max_visited_nodes
979
+ * @returns {Promise<any>}
980
+ */
981
+ smartAutomoveWithBudgetAsync(depth, max_visited_nodes) {
982
+ const ret = wasm.monsgamemodel_smartAutomoveWithBudgetAsync(this.__wbg_ptr, depth, max_visited_nodes);
983
+ return takeObject(ret);
984
+ }
985
+ /**
948
986
  * @returns {string}
949
987
  */
950
988
  fen() {
@@ -1404,14 +1442,18 @@ async function __wbg_load(module, imports) {
1404
1442
  function __wbg_get_imports() {
1405
1443
  const imports = {};
1406
1444
  imports.wbg = {};
1407
- imports.wbg.__wbg_eventmodel_new = function(arg0) {
1408
- const ret = EventModel.__wrap(arg0);
1445
+ imports.wbg.__wbindgen_number_new = function(arg0) {
1446
+ const ret = arg0;
1409
1447
  return addHeapObject(ret);
1410
1448
  };
1411
1449
  imports.wbg.__wbg_nextinputmodel_new = function(arg0) {
1412
1450
  const ret = NextInputModel.__wrap(arg0);
1413
1451
  return addHeapObject(ret);
1414
1452
  };
1453
+ imports.wbg.__wbg_eventmodel_new = function(arg0) {
1454
+ const ret = EventModel.__wrap(arg0);
1455
+ return addHeapObject(ret);
1456
+ };
1415
1457
  imports.wbg.__wbg_location_new = function(arg0) {
1416
1458
  const ret = Location.__wrap(arg0);
1417
1459
  return addHeapObject(ret);
@@ -1420,9 +1462,34 @@ function __wbg_get_imports() {
1420
1462
  const ret = VerboseTrackingEntityModel.__wrap(arg0);
1421
1463
  return addHeapObject(ret);
1422
1464
  };
1465
+ imports.wbg.__wbg_outputmodel_new = function(arg0) {
1466
+ const ret = OutputModel.__wrap(arg0);
1467
+ return addHeapObject(ret);
1468
+ };
1423
1469
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1424
1470
  takeObject(arg0);
1425
1471
  };
1472
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1473
+ const ret = getStringFromWasm0(arg0, arg1);
1474
+ return addHeapObject(ret);
1475
+ };
1476
+ imports.wbg.__wbindgen_is_function = function(arg0) {
1477
+ const ret = typeof(getObject(arg0)) === 'function';
1478
+ return ret;
1479
+ };
1480
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1481
+ const ret = getObject(arg0);
1482
+ return addHeapObject(ret);
1483
+ };
1484
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
1485
+ const obj = takeObject(arg0).original;
1486
+ if (obj.cnt-- == 1) {
1487
+ obj.a = 0;
1488
+ return true;
1489
+ }
1490
+ const ret = false;
1491
+ return ret;
1492
+ };
1426
1493
  imports.wbg.__wbg_location_unwrap = function(arg0) {
1427
1494
  const ret = Location.__unwrap(takeObject(arg0));
1428
1495
  return ret;
@@ -1456,14 +1523,6 @@ function __wbg_get_imports() {
1456
1523
  const ret = module.require;
1457
1524
  return addHeapObject(ret);
1458
1525
  }, arguments) };
1459
- imports.wbg.__wbindgen_is_function = function(arg0) {
1460
- const ret = typeof(getObject(arg0)) === 'function';
1461
- return ret;
1462
- };
1463
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1464
- const ret = getStringFromWasm0(arg0, arg1);
1465
- return addHeapObject(ret);
1466
- };
1467
1526
  imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
1468
1527
  const ret = getObject(arg0).msCrypto;
1469
1528
  return addHeapObject(ret);
@@ -1533,14 +1592,40 @@ function __wbg_get_imports() {
1533
1592
  const ret = getObject(arg0).call(getObject(arg1));
1534
1593
  return addHeapObject(ret);
1535
1594
  }, arguments) };
1536
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1537
- const ret = getObject(arg0);
1595
+ imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
1596
+ try {
1597
+ var state0 = {a: arg0, b: arg1};
1598
+ var cb0 = (arg0, arg1) => {
1599
+ const a = state0.a;
1600
+ state0.a = 0;
1601
+ try {
1602
+ return __wbg_adapter_152(a, state0.b, arg0, arg1);
1603
+ } finally {
1604
+ state0.a = a;
1605
+ }
1606
+ };
1607
+ const ret = new Promise(cb0);
1608
+ return addHeapObject(ret);
1609
+ } finally {
1610
+ state0.a = state0.b = 0;
1611
+ }
1612
+ };
1613
+ imports.wbg.__wbg_reject_a778418101c86bc9 = function(arg0) {
1614
+ const ret = Promise.reject(getObject(arg0));
1538
1615
  return addHeapObject(ret);
1539
1616
  };
1540
1617
  imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
1541
1618
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1542
1619
  return addHeapObject(ret);
1543
1620
  }, arguments) };
1621
+ imports.wbg.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1622
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1623
+ return addHeapObject(ret);
1624
+ }, arguments) };
1625
+ imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
1626
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
1627
+ return addHeapObject(ret);
1628
+ }, arguments) };
1544
1629
  imports.wbg.__wbindgen_memory = function() {
1545
1630
  const ret = wasm.memory;
1546
1631
  return addHeapObject(ret);
@@ -1548,6 +1633,10 @@ function __wbg_get_imports() {
1548
1633
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1549
1634
  throw new Error(getStringFromWasm0(arg0, arg1));
1550
1635
  };
1636
+ imports.wbg.__wbindgen_closure_wrapper300 = function(arg0, arg1, arg2) {
1637
+ const ret = makeMutClosure(arg0, arg1, 11, __wbg_adapter_26);
1638
+ return addHeapObject(ret);
1639
+ };
1551
1640
 
1552
1641
  return imports;
1553
1642
  }
package/mons-web_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mons-web",
3
3
  "type": "module",
4
4
  "description": "super metal mons",
5
- "version": "0.1.69",
5
+ "version": "0.1.71",
6
6
  "license": "CC0-1.0",
7
7
  "repository": {
8
8
  "type": "git",