@doodle-engine/core 0.0.17 → 0.0.19

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/dist/core.js CHANGED
@@ -1,233 +1,332 @@
1
- var x = Object.defineProperty;
2
- var k = (t, e, n) => e in t ? x(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var T = (t, e, n) => k(t, typeof e != "symbol" ? e + "" : e, n);
4
- function O(t, e) {
5
- switch (t.type) {
1
+ var k = Object.defineProperty;
2
+ var O = (n, e, t) => e in n ? k(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var T = (n, e, t) => O(n, typeof e != "symbol" ? e + "" : e, t);
4
+ function Fe(n) {
5
+ var t;
6
+ const e = ((t = n.split(".").pop()) == null ? void 0 : t.toLowerCase()) ?? "";
7
+ return ["jpg", "jpeg", "png", "gif", "webp", "svg", "avif"].includes(e) ? "image" : ["mp4", "webm", "ogv", "mov"].includes(e) ? "video" : "audio";
8
+ }
9
+ function qe(n, e) {
10
+ const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
11
+ if (e.shell) {
12
+ const { splash: o, loading: i, title: s, uiSounds: l } = e.shell;
13
+ o && (o.logo && t.add(o.logo), o.background && t.add(o.background), o.sound && t.add(o.sound)), i && (i.background && t.add(i.background), i.music && t.add(i.music)), s && (s.logo && t.add(s.logo), s.background && t.add(s.background), s.music && t.add(s.music)), l && (l.click && t.add(l.click), l.hover && t.add(l.hover), l.menuOpen && t.add(l.menuOpen), l.menuClose && t.add(l.menuClose));
14
+ }
15
+ const a = (o) => {
16
+ o && !t.has(o) && r.add(o);
17
+ };
18
+ for (const o of Object.values(n.locations))
19
+ a(o.banner), a(o.music), a(o.ambient);
20
+ for (const o of Object.values(n.characters))
21
+ a(o.portrait);
22
+ for (const o of Object.values(n.items))
23
+ a(o.icon), a(o.image);
24
+ for (const o of Object.values(n.maps))
25
+ a(o.image);
26
+ for (const o of Object.values(n.interludes))
27
+ if (a(o.background), a(o.banner), a(o.music), a(o.voice), o.sounds)
28
+ for (const i of o.sounds)
29
+ a(i);
30
+ for (const o of Object.values(n.dialogues))
31
+ for (const i of o.nodes)
32
+ a(i.voice), a(i.portrait);
33
+ return {
34
+ shell: Array.from(t).filter(Boolean),
35
+ game: Array.from(r).filter(Boolean)
36
+ };
37
+ }
38
+ const C = "doodle-engine-assets-";
39
+ function Pe(n = "1") {
40
+ const e = `${C}${n}`, t = /* @__PURE__ */ new Set(), r = typeof caches < "u";
41
+ async function a() {
42
+ if (!r) return null;
43
+ try {
44
+ return await caches.open(e);
45
+ } catch {
46
+ return null;
47
+ }
48
+ }
49
+ async function o(i) {
50
+ if (t.has(i)) return;
51
+ const s = await a();
52
+ if (s) {
53
+ if (await s.match(i)) {
54
+ t.add(i);
55
+ return;
56
+ }
57
+ const c = await fetch(i);
58
+ if (!c.ok)
59
+ throw new Error(`Failed to load asset: ${i} (${c.status})`);
60
+ await s.put(i, c);
61
+ } else {
62
+ const l = await fetch(i);
63
+ if (!l.ok)
64
+ throw new Error(`Failed to load asset: ${i} (${l.status})`);
65
+ }
66
+ t.add(i);
67
+ }
68
+ return {
69
+ async isAvailable(i) {
70
+ if (t.has(i)) return !0;
71
+ const s = await a();
72
+ return s ? await s.match(i) !== void 0 : !1;
73
+ },
74
+ async load(i) {
75
+ await o(i);
76
+ },
77
+ async loadMany(i, s) {
78
+ let l = 0;
79
+ const c = i.length;
80
+ for (const u of i)
81
+ s == null || s(l, c, u), await o(u), l++, s == null || s(l, c, u);
82
+ },
83
+ getUrl(i) {
84
+ return i;
85
+ },
86
+ prefetch(i) {
87
+ for (const s of i)
88
+ o(s).catch(() => {
89
+ });
90
+ },
91
+ async clear() {
92
+ if (t.clear(), !!r)
93
+ try {
94
+ const i = await caches.keys();
95
+ await Promise.all(
96
+ i.filter((s) => s.startsWith(C)).map((s) => caches.delete(s))
97
+ );
98
+ } catch {
99
+ }
100
+ }
101
+ };
102
+ }
103
+ function R(n, e) {
104
+ switch (n.type) {
6
105
  case "hasFlag":
7
- return D(t.flag, e);
106
+ return D(n.flag, e);
8
107
  case "notFlag":
9
- return R(t.flag, e);
108
+ return V(n.flag, e);
10
109
  case "hasItem":
11
- return V(t.itemId, e);
110
+ return $(n.itemId, e);
12
111
  case "variableEquals":
13
- return P(t.variable, t.value, e);
112
+ return F(n.variable, n.value, e);
14
113
  case "variableGreaterThan":
15
- return $(t.variable, t.value, e);
114
+ return q(n.variable, n.value, e);
16
115
  case "variableLessThan":
17
- return q(t.variable, t.value, e);
116
+ return P(n.variable, n.value, e);
18
117
  case "atLocation":
19
- return F(t.locationId, e);
118
+ return M(n.locationId, e);
20
119
  case "questAtStage":
21
- return W(t.questId, t.stageId, e);
120
+ return W(n.questId, n.stageId, e);
22
121
  case "characterAt":
23
- return M(t.characterId, t.locationId, e);
122
+ return j(n.characterId, n.locationId, e);
24
123
  case "characterInParty":
25
- return G(t.characterId, e);
124
+ return G(n.characterId, e);
26
125
  case "relationshipAbove":
27
- return H(t.characterId, t.value, e);
126
+ return H(n.characterId, n.value, e);
28
127
  case "relationshipBelow":
29
- return j(t.characterId, t.value, e);
128
+ return Q(n.characterId, n.value, e);
30
129
  case "timeIs":
31
- return Q(t.startHour, t.endHour, e);
130
+ return J(n.startHour, n.endHour, e);
32
131
  case "itemAt":
33
- return J(t.itemId, t.locationId, e);
132
+ return U(n.itemId, n.locationId, e);
34
133
  case "roll":
35
- return U(t.min, t.max, t.threshold);
134
+ return B(n.min, n.max, n.threshold);
36
135
  default:
37
136
  return !1;
38
137
  }
39
138
  }
40
- function v(t, e) {
41
- return t.every((n) => O(n, e));
139
+ function S(n, e) {
140
+ return n.every((t) => R(t, e));
42
141
  }
43
- function D(t, e) {
44
- return e.flags[t] === !0;
142
+ function D(n, e) {
143
+ return e.flags[n] === !0;
45
144
  }
46
- function R(t, e) {
47
- return e.flags[t] !== !0;
145
+ function V(n, e) {
146
+ return e.flags[n] !== !0;
48
147
  }
49
- function V(t, e) {
50
- return e.inventory.includes(t);
148
+ function $(n, e) {
149
+ return e.inventory.includes(n);
51
150
  }
52
- function P(t, e, n) {
53
- return n.variables[t] === e;
151
+ function F(n, e, t) {
152
+ return t.variables[n] === e;
54
153
  }
55
- function $(t, e, n) {
56
- const r = n.variables[t];
154
+ function q(n, e, t) {
155
+ const r = t.variables[n];
57
156
  return typeof r == "number" && r > e;
58
157
  }
59
- function q(t, e, n) {
60
- const r = n.variables[t];
158
+ function P(n, e, t) {
159
+ const r = t.variables[n];
61
160
  return typeof r == "number" && r < e;
62
161
  }
63
- function F(t, e) {
64
- return e.currentLocation === t;
162
+ function M(n, e) {
163
+ return e.currentLocation === n;
65
164
  }
66
- function W(t, e, n) {
67
- return n.questProgress[t] === e;
165
+ function W(n, e, t) {
166
+ return t.questProgress[n] === e;
68
167
  }
69
- function M(t, e, n) {
70
- const r = n.characterState[t];
168
+ function j(n, e, t) {
169
+ const r = t.characterState[n];
71
170
  return (r == null ? void 0 : r.location) === e;
72
171
  }
73
- function G(t, e) {
74
- const n = e.characterState[t];
75
- return (n == null ? void 0 : n.inParty) === !0;
172
+ function G(n, e) {
173
+ const t = e.characterState[n];
174
+ return (t == null ? void 0 : t.inParty) === !0;
76
175
  }
77
- function H(t, e, n) {
78
- const r = n.characterState[t];
176
+ function H(n, e, t) {
177
+ const r = t.characterState[n];
79
178
  return r !== void 0 && r.relationship > e;
80
179
  }
81
- function j(t, e, n) {
82
- const r = n.characterState[t];
180
+ function Q(n, e, t) {
181
+ const r = t.characterState[n];
83
182
  return r !== void 0 && r.relationship < e;
84
183
  }
85
- function Q(t, e, n) {
86
- const r = n.currentTime.hour;
87
- return t < e ? r >= t && r < e : r >= t || r < e;
184
+ function J(n, e, t) {
185
+ const r = t.currentTime.hour;
186
+ return n < e ? r >= n && r < e : r >= n || r < e;
88
187
  }
89
- function J(t, e, n) {
90
- return n.itemLocations[t] === e;
188
+ function U(n, e, t) {
189
+ return t.itemLocations[n] === e;
91
190
  }
92
- function U(t, e, n) {
93
- return Math.floor(Math.random() * (e - t + 1)) + t >= n;
191
+ function B(n, e, t) {
192
+ return Math.floor(Math.random() * (e - n + 1)) + n >= t;
94
193
  }
95
- function B(t, e) {
96
- switch (t.type) {
194
+ function _(n, e) {
195
+ switch (n.type) {
97
196
  case "setFlag":
98
- return _(t.flag, e);
197
+ return z(n.flag, e);
99
198
  case "clearFlag":
100
- return z(t.flag, e);
199
+ return Y(n.flag, e);
101
200
  case "setVariable":
102
- return Y(t.variable, t.value, e);
201
+ return X(n.variable, n.value, e);
103
202
  case "addVariable":
104
- return K(t.variable, t.value, e);
203
+ return K(n.variable, n.value, e);
105
204
  case "addItem":
106
- return X(t.itemId, e);
205
+ return Z(n.itemId, e);
107
206
  case "removeItem":
108
- return Z(t.itemId, e);
207
+ return ee(n.itemId, e);
109
208
  case "moveItem":
110
- return ee(t.itemId, t.locationId, e);
209
+ return te(n.itemId, n.locationId, e);
111
210
  case "goToLocation":
112
- return te(t.locationId, e);
211
+ return ne(n.locationId, e);
113
212
  case "advanceTime":
114
- return ne(t.hours, e);
213
+ return re(n.hours, e);
115
214
  case "setQuestStage":
116
- return re(t.questId, t.stageId, e);
215
+ return ae(n.questId, n.stageId, e);
117
216
  case "addJournalEntry":
118
- return ae(t.entryId, e);
217
+ return ie(n.entryId, e);
119
218
  case "startDialogue":
120
- return ie(t.dialogueId, e);
219
+ return oe(n.dialogueId, e);
121
220
  case "endDialogue":
122
221
  return se(e);
123
222
  case "setCharacterLocation":
124
- return oe(t.characterId, t.locationId, e);
223
+ return le(n.characterId, n.locationId, e);
125
224
  case "addToParty":
126
- return le(t.characterId, e);
225
+ return ce(n.characterId, e);
127
226
  case "removeFromParty":
128
- return ce(t.characterId, e);
227
+ return ue(n.characterId, e);
129
228
  case "setRelationship":
130
- return ue(t.characterId, t.value, e);
229
+ return de(n.characterId, n.value, e);
131
230
  case "addRelationship":
132
- return de(t.characterId, t.value, e);
231
+ return he(n.characterId, n.value, e);
133
232
  case "setCharacterStat":
134
- return he(t.characterId, t.stat, t.value, e);
233
+ return pe(n.characterId, n.stat, n.value, e);
135
234
  case "addCharacterStat":
136
- return pe(t.characterId, t.stat, t.value, e);
235
+ return fe(n.characterId, n.stat, n.value, e);
137
236
  case "setMapEnabled":
138
- return ge(t.enabled, e);
237
+ return ge(n.enabled, e);
139
238
  case "playMusic":
140
239
  return e;
141
240
  case "playSound":
142
- return me(t.sound, e);
241
+ return be(n.sound, e);
143
242
  case "notify":
144
- return fe(t.message, e);
243
+ return me(n.message, e);
145
244
  case "playVideo":
146
- return be(t.file, e);
245
+ return ye(n.file, e);
147
246
  case "showInterlude":
148
- return ye(t.interludeId, e);
247
+ return ve(n.interludeId, e);
149
248
  case "roll":
150
- return Se(t.variable, t.min, t.max, e);
249
+ return Se(n.variable, n.min, n.max, e);
151
250
  default:
152
251
  return e;
153
252
  }
154
253
  }
155
- function S(t, e) {
156
- return t.reduce((n, r) => B(r, n), e);
254
+ function v(n, e) {
255
+ return n.reduce((t, r) => _(r, t), e);
157
256
  }
158
- function _(t, e) {
257
+ function z(n, e) {
159
258
  return {
160
259
  ...e,
161
260
  flags: {
162
261
  ...e.flags,
163
- [t]: !0
262
+ [n]: !0
164
263
  }
165
264
  };
166
265
  }
167
- function z(t, e) {
266
+ function Y(n, e) {
168
267
  return {
169
268
  ...e,
170
269
  flags: {
171
270
  ...e.flags,
172
- [t]: !1
271
+ [n]: !1
173
272
  }
174
273
  };
175
274
  }
176
- function Y(t, e, n) {
275
+ function X(n, e, t) {
177
276
  return {
178
- ...n,
277
+ ...t,
179
278
  variables: {
180
- ...n.variables,
181
- [t]: e
279
+ ...t.variables,
280
+ [n]: e
182
281
  }
183
282
  };
184
283
  }
185
- function K(t, e, n) {
186
- const r = n.variables[t], a = typeof r == "number" ? r + e : e;
284
+ function K(n, e, t) {
285
+ const r = t.variables[n], a = typeof r == "number" ? r + e : e;
187
286
  return {
188
- ...n,
287
+ ...t,
189
288
  variables: {
190
- ...n.variables,
191
- [t]: a
289
+ ...t.variables,
290
+ [n]: a
192
291
  }
193
292
  };
194
293
  }
195
- function X(t, e) {
196
- return e.inventory.includes(t) ? e : {
294
+ function Z(n, e) {
295
+ return e.inventory.includes(n) ? e : {
197
296
  ...e,
198
- inventory: [...e.inventory, t],
297
+ inventory: [...e.inventory, n],
199
298
  itemLocations: {
200
299
  ...e.itemLocations,
201
- [t]: "inventory"
300
+ [n]: "inventory"
202
301
  }
203
302
  };
204
303
  }
205
- function Z(t, e) {
304
+ function ee(n, e) {
206
305
  return {
207
306
  ...e,
208
- inventory: e.inventory.filter((n) => n !== t)
307
+ inventory: e.inventory.filter((t) => t !== n)
209
308
  // Note: itemLocation is NOT updated here - the item stays at "inventory"
210
309
  // or wherever it was. Use moveItem to relocate it.
211
310
  };
212
311
  }
213
- function ee(t, e, n) {
312
+ function te(n, e, t) {
214
313
  return {
215
- ...n,
216
- inventory: n.inventory.filter((r) => r !== t),
314
+ ...t,
315
+ inventory: t.inventory.filter((r) => r !== n),
217
316
  itemLocations: {
218
- ...n.itemLocations,
219
- [t]: e
317
+ ...t.itemLocations,
318
+ [n]: e
220
319
  }
221
320
  };
222
321
  }
223
- function te(t, e) {
322
+ function ne(n, e) {
224
323
  return {
225
324
  ...e,
226
- currentLocation: t
325
+ currentLocation: n
227
326
  };
228
327
  }
229
- function ne(t, e) {
230
- const n = e.currentTime.hour + t, r = Math.floor(n / 24), a = n % 24;
328
+ function re(n, e) {
329
+ const t = e.currentTime.hour + n, r = Math.floor(t / 24), a = t % 24;
231
330
  return {
232
331
  ...e,
233
332
  currentTime: {
@@ -236,128 +335,128 @@ function ne(t, e) {
236
335
  }
237
336
  };
238
337
  }
239
- function re(t, e, n) {
338
+ function ae(n, e, t) {
240
339
  return {
241
- ...n,
340
+ ...t,
242
341
  questProgress: {
243
- ...n.questProgress,
244
- [t]: e
342
+ ...t.questProgress,
343
+ [n]: e
245
344
  }
246
345
  };
247
346
  }
248
- function ae(t, e) {
249
- return e.unlockedJournalEntries.includes(t) ? e : {
347
+ function ie(n, e) {
348
+ return e.unlockedJournalEntries.includes(n) ? e : {
250
349
  ...e,
251
- unlockedJournalEntries: [...e.unlockedJournalEntries, t]
350
+ unlockedJournalEntries: [...e.unlockedJournalEntries, n]
252
351
  };
253
352
  }
254
- function ie(t, e) {
353
+ function oe(n, e) {
255
354
  return {
256
355
  ...e,
257
356
  dialogueState: {
258
- dialogueId: t,
357
+ dialogueId: n,
259
358
  nodeId: ""
260
359
  // Will be set by engine when it looks up the dialogue
261
360
  }
262
361
  };
263
362
  }
264
- function se(t) {
363
+ function se(n) {
265
364
  return {
266
- ...t,
365
+ ...n,
267
366
  dialogueState: null
268
367
  };
269
368
  }
270
- function oe(t, e, n) {
271
- const r = n.characterState[t];
369
+ function le(n, e, t) {
370
+ const r = t.characterState[n];
272
371
  return r ? {
273
- ...n,
372
+ ...t,
274
373
  characterState: {
275
- ...n.characterState,
276
- [t]: {
374
+ ...t.characterState,
375
+ [n]: {
277
376
  ...r,
278
377
  location: e
279
378
  }
280
379
  }
281
- } : n;
380
+ } : t;
282
381
  }
283
- function le(t, e) {
284
- const n = e.characterState[t];
285
- return n ? {
382
+ function ce(n, e) {
383
+ const t = e.characterState[n];
384
+ return t ? {
286
385
  ...e,
287
386
  characterState: {
288
387
  ...e.characterState,
289
- [t]: {
290
- ...n,
388
+ [n]: {
389
+ ...t,
291
390
  inParty: !0
292
391
  }
293
392
  }
294
393
  } : e;
295
394
  }
296
- function ce(t, e) {
297
- const n = e.characterState[t];
298
- return n ? {
395
+ function ue(n, e) {
396
+ const t = e.characterState[n];
397
+ return t ? {
299
398
  ...e,
300
399
  characterState: {
301
400
  ...e.characterState,
302
- [t]: {
303
- ...n,
401
+ [n]: {
402
+ ...t,
304
403
  inParty: !1
305
404
  }
306
405
  }
307
406
  } : e;
308
407
  }
309
- function ue(t, e, n) {
310
- const r = n.characterState[t];
408
+ function de(n, e, t) {
409
+ const r = t.characterState[n];
311
410
  return r ? {
312
- ...n,
411
+ ...t,
313
412
  characterState: {
314
- ...n.characterState,
315
- [t]: {
413
+ ...t.characterState,
414
+ [n]: {
316
415
  ...r,
317
416
  relationship: e
318
417
  }
319
418
  }
320
- } : n;
419
+ } : t;
321
420
  }
322
- function de(t, e, n) {
323
- const r = n.characterState[t];
421
+ function he(n, e, t) {
422
+ const r = t.characterState[n];
324
423
  return r ? {
325
- ...n,
424
+ ...t,
326
425
  characterState: {
327
- ...n.characterState,
328
- [t]: {
426
+ ...t.characterState,
427
+ [n]: {
329
428
  ...r,
330
429
  relationship: r.relationship + e
331
430
  }
332
431
  }
333
- } : n;
432
+ } : t;
334
433
  }
335
- function he(t, e, n, r) {
336
- const a = r.characterState[t];
434
+ function pe(n, e, t, r) {
435
+ const a = r.characterState[n];
337
436
  return a ? {
338
437
  ...r,
339
438
  characterState: {
340
439
  ...r.characterState,
341
- [t]: {
440
+ [n]: {
342
441
  ...a,
343
442
  stats: {
344
443
  ...a.stats,
345
- [e]: n
444
+ [e]: t
346
445
  }
347
446
  }
348
447
  }
349
448
  } : r;
350
449
  }
351
- function pe(t, e, n, r) {
352
- const a = r.characterState[t];
450
+ function fe(n, e, t, r) {
451
+ const a = r.characterState[n];
353
452
  if (!a)
354
453
  return r;
355
- const s = a.stats[e], i = typeof s == "number" ? s + n : n;
454
+ const o = a.stats[e], i = typeof o == "number" ? o + t : t;
356
455
  return {
357
456
  ...r,
358
457
  characterState: {
359
458
  ...r.characterState,
360
- [t]: {
459
+ [n]: {
361
460
  ...a,
362
461
  stats: {
363
462
  ...a.stats,
@@ -367,66 +466,66 @@ function pe(t, e, n, r) {
367
466
  }
368
467
  };
369
468
  }
370
- function ge(t, e) {
469
+ function ge(n, e) {
371
470
  return {
372
471
  ...e,
373
- mapEnabled: t
472
+ mapEnabled: n
374
473
  };
375
474
  }
376
- function fe(t, e) {
475
+ function me(n, e) {
377
476
  return {
378
477
  ...e,
379
- notifications: [...e.notifications, t]
478
+ notifications: [...e.notifications, n]
380
479
  };
381
480
  }
382
- function me(t, e) {
481
+ function be(n, e) {
383
482
  return {
384
483
  ...e,
385
- pendingSounds: [...e.pendingSounds, t]
484
+ pendingSounds: [...e.pendingSounds, n]
386
485
  };
387
486
  }
388
- function be(t, e) {
487
+ function ye(n, e) {
389
488
  return {
390
489
  ...e,
391
- pendingVideo: t
490
+ pendingVideo: n
392
491
  };
393
492
  }
394
- function ye(t, e) {
493
+ function ve(n, e) {
395
494
  return {
396
495
  ...e,
397
- pendingInterlude: t
496
+ pendingInterlude: n
398
497
  };
399
498
  }
400
- function Se(t, e, n, r) {
401
- const a = Math.floor(Math.random() * (n - e + 1)) + e;
499
+ function Se(n, e, t, r) {
500
+ const a = Math.floor(Math.random() * (t - e + 1)) + e;
402
501
  return {
403
502
  ...r,
404
503
  variables: {
405
504
  ...r.variables,
406
- [t]: a
505
+ [n]: a
407
506
  }
408
507
  };
409
508
  }
410
- function L(t, e, n) {
509
+ function L(n, e, t) {
411
510
  let r;
412
- if (t.startsWith("@")) {
413
- const a = t.slice(1);
414
- r = e[a] ?? t;
511
+ if (n.startsWith("@")) {
512
+ const a = n.slice(1);
513
+ r = e[a] ?? n;
415
514
  } else
416
- r = t;
417
- return n && r.includes("{") && (r = r.replace(/\{(\w+)\}/g, (a, s) => {
418
- const i = n[s];
419
- return i !== void 0 ? String(i) : `{${s}}`;
515
+ r = n;
516
+ return t && r.includes("{") && (r = r.replace(/\{(\w+)\}/g, (a, o) => {
517
+ const i = t[o];
518
+ return i !== void 0 ? String(i) : `{${o}}`;
420
519
  })), r;
421
520
  }
422
- function Pe(t, e) {
423
- return (n) => L(n, t, e);
521
+ function Me(n, e) {
522
+ return (t) => L(t, n, e);
424
523
  }
425
- function ve(t, e) {
426
- const n = e.locales[t.currentLocale] ?? {}, r = (m) => L(m, n, t.variables), a = Ie(t.currentLocation, e, r), s = Te(t, e, r), i = Ne(t, e, r), { dialogue: o, choices: l } = Ee(t, e, r), c = we(t, e, r), d = Ae(t, e, r), f = Le(t, e, r), b = Ce(t, e, r), u = t.mapEnabled ? xe(t, e, r) : null, g = e.locations[t.currentLocation], h = (g == null ? void 0 : g.music) ?? "", p = (g == null ? void 0 : g.ambient) ?? "", y = t.notifications.map(r), I = [...t.pendingSounds], C = t.pendingVideo;
524
+ function Ie(n, e) {
525
+ const t = e.locales[n.currentLocale] ?? {}, r = (m) => L(m, t, n.variables), a = Te(n.currentLocation, e, r), o = we(n, e, r), i = Ne(n, e, r), { dialogue: s, choices: l } = Ee(n, e, r), c = Ae(n, e, r), u = Ce(n, e, r), g = Le(n, e, r), b = xe(n, e, r), d = n.mapEnabled ? ke(n, e, r) : null, f = e.locations[n.currentLocation], h = (f == null ? void 0 : f.music) ?? "", p = (f == null ? void 0 : f.ambient) ?? "", y = n.notifications.map(r), I = [...n.pendingSounds], x = n.pendingVideo;
427
526
  let A = null;
428
- if (t.pendingInterlude) {
429
- const m = e.interludes[t.pendingInterlude];
527
+ if (n.pendingInterlude) {
528
+ const m = e.interludes[n.pendingInterlude];
430
529
  m && (A = {
431
530
  id: m.id,
432
531
  background: m.background,
@@ -441,66 +540,66 @@ function ve(t, e) {
441
540
  }
442
541
  return {
443
542
  location: a,
444
- charactersHere: s,
543
+ charactersHere: o,
445
544
  itemsHere: i,
446
545
  choices: l,
447
- dialogue: o,
546
+ dialogue: s,
448
547
  party: c,
449
- inventory: d,
450
- quests: f,
548
+ inventory: u,
549
+ quests: g,
451
550
  journal: b,
452
- variables: { ...t.variables },
453
- time: t.currentTime,
454
- map: u,
551
+ variables: { ...n.variables },
552
+ time: n.currentTime,
553
+ map: d,
455
554
  music: h,
456
555
  ambient: p,
457
556
  notifications: y,
458
557
  pendingSounds: I,
459
- pendingVideo: C,
558
+ pendingVideo: x,
460
559
  pendingInterlude: A
461
560
  };
462
561
  }
463
- function Ie(t, e, n) {
464
- const r = e.locations[t];
562
+ function Te(n, e, t) {
563
+ const r = e.locations[n];
465
564
  return r ? {
466
565
  id: r.id,
467
- name: n(r.name),
468
- description: n(r.description),
566
+ name: t(r.name),
567
+ description: t(r.description),
469
568
  banner: r.banner
470
569
  } : {
471
- id: t,
472
- name: t,
473
- description: `Location not found: ${t}`,
570
+ id: n,
571
+ name: n,
572
+ description: `Location not found: ${n}`,
474
573
  banner: ""
475
574
  };
476
575
  }
477
- function Te(t, e, n) {
576
+ function we(n, e, t) {
478
577
  const r = [];
479
- for (const [a, s] of Object.entries(t.characterState))
480
- if (s.location === t.currentLocation) {
578
+ for (const [a, o] of Object.entries(n.characterState))
579
+ if (o.location === n.currentLocation) {
481
580
  const i = e.characters[a];
482
581
  i && r.push({
483
582
  id: i.id,
484
- name: n(i.name),
485
- biography: n(i.biography),
583
+ name: t(i.name),
584
+ biography: t(i.biography),
486
585
  portrait: i.portrait,
487
- location: s.location,
488
- inParty: s.inParty,
489
- relationship: s.relationship,
490
- stats: s.stats
586
+ location: o.location,
587
+ inParty: o.inParty,
588
+ relationship: o.relationship,
589
+ stats: o.stats
491
590
  });
492
591
  }
493
592
  return r;
494
593
  }
495
- function Ne(t, e, n) {
594
+ function Ne(n, e, t) {
496
595
  const r = [];
497
- for (const [a, s] of Object.entries(t.itemLocations))
498
- if (s === t.currentLocation) {
596
+ for (const [a, o] of Object.entries(n.itemLocations))
597
+ if (o === n.currentLocation) {
499
598
  const i = e.items[a];
500
599
  i && r.push({
501
600
  id: i.id,
502
- name: n(i.name),
503
- description: n(i.description),
601
+ name: t(i.name),
602
+ description: t(i.description),
504
603
  icon: i.icon,
505
604
  image: i.image,
506
605
  stats: i.stats
@@ -508,123 +607,123 @@ function Ne(t, e, n) {
508
607
  }
509
608
  return r;
510
609
  }
511
- function Ee(t, e, n) {
610
+ function Ee(n, e, t) {
512
611
  var l, c;
513
- if (!t.dialogueState)
612
+ if (!n.dialogueState)
514
613
  return { dialogue: null, choices: [] };
515
- const r = e.dialogues[t.dialogueState.dialogueId];
614
+ const r = e.dialogues[n.dialogueState.dialogueId];
516
615
  if (!r)
517
616
  return { dialogue: null, choices: [] };
518
- const a = r.nodes.find((d) => {
519
- var f;
520
- return d.id === ((f = t.dialogueState) == null ? void 0 : f.nodeId);
617
+ const a = r.nodes.find((u) => {
618
+ var g;
619
+ return u.id === ((g = n.dialogueState) == null ? void 0 : g.nodeId);
521
620
  });
522
621
  if (!a)
523
622
  return { dialogue: null, choices: [] };
524
- const s = a.speaker ? n(((l = e.characters[a.speaker]) == null ? void 0 : l.name) ?? a.speaker) : "Narrator", i = {
623
+ const o = a.speaker ? t(((l = e.characters[a.speaker]) == null ? void 0 : l.name) ?? a.speaker) : "Narrator", i = {
525
624
  speaker: a.speaker,
526
- speakerName: s,
527
- text: n(a.text),
625
+ speakerName: o,
626
+ text: t(a.text),
528
627
  portrait: a.portrait ?? ((c = e.characters[a.speaker ?? ""]) == null ? void 0 : c.portrait),
529
628
  voice: a.voice
530
- }, o = a.choices.filter((d) => !d.conditions || d.conditions.length === 0 ? !0 : v(d.conditions, t)).map((d) => ({
531
- id: d.id,
532
- text: n(d.text)
629
+ }, s = a.choices.filter((u) => !u.conditions || u.conditions.length === 0 ? !0 : S(u.conditions, n)).map((u) => ({
630
+ id: u.id,
631
+ text: t(u.text)
533
632
  }));
534
- return { dialogue: i, choices: o };
633
+ return { dialogue: i, choices: s };
535
634
  }
536
- function we(t, e, n) {
635
+ function Ae(n, e, t) {
537
636
  const r = [];
538
- for (const [a, s] of Object.entries(t.characterState))
539
- if (s.inParty) {
637
+ for (const [a, o] of Object.entries(n.characterState))
638
+ if (o.inParty) {
540
639
  const i = e.characters[a];
541
640
  i && r.push({
542
641
  id: i.id,
543
- name: n(i.name),
544
- biography: n(i.biography),
642
+ name: t(i.name),
643
+ biography: t(i.biography),
545
644
  portrait: i.portrait,
546
- location: s.location,
547
- inParty: s.inParty,
548
- relationship: s.relationship,
549
- stats: s.stats
645
+ location: o.location,
646
+ inParty: o.inParty,
647
+ relationship: o.relationship,
648
+ stats: o.stats
550
649
  });
551
650
  }
552
651
  return r;
553
652
  }
554
- function Ae(t, e, n) {
555
- return t.inventory.map((r) => {
653
+ function Ce(n, e, t) {
654
+ return n.inventory.map((r) => {
556
655
  const a = e.items[r];
557
656
  return a ? {
558
657
  id: a.id,
559
- name: n(a.name),
560
- description: n(a.description),
658
+ name: t(a.name),
659
+ description: t(a.description),
561
660
  icon: a.icon,
562
661
  image: a.image,
563
662
  stats: a.stats
564
663
  } : null;
565
664
  }).filter((r) => r !== null);
566
665
  }
567
- function Le(t, e, n) {
666
+ function Le(n, e, t) {
568
667
  const r = [];
569
- for (const [a, s] of Object.entries(t.questProgress)) {
668
+ for (const [a, o] of Object.entries(n.questProgress)) {
570
669
  const i = e.quests[a];
571
670
  if (!i) continue;
572
- const o = i.stages.find((l) => l.id === s);
573
- o && r.push({
671
+ const s = i.stages.find((l) => l.id === o);
672
+ s && r.push({
574
673
  id: i.id,
575
- name: n(i.name),
576
- description: n(i.description),
577
- currentStage: o.id,
578
- currentStageDescription: n(o.description)
674
+ name: t(i.name),
675
+ description: t(i.description),
676
+ currentStage: s.id,
677
+ currentStageDescription: t(s.description)
579
678
  });
580
679
  }
581
680
  return r;
582
681
  }
583
- function Ce(t, e, n) {
584
- return t.unlockedJournalEntries.map((r) => {
682
+ function xe(n, e, t) {
683
+ return n.unlockedJournalEntries.map((r) => {
585
684
  const a = e.journalEntries[r];
586
685
  return a ? {
587
686
  id: a.id,
588
- title: n(a.title),
589
- text: n(a.text),
687
+ title: t(a.title),
688
+ text: t(a.text),
590
689
  category: a.category
591
690
  } : null;
592
691
  }).filter((r) => r !== null);
593
692
  }
594
- function xe(t, e, n) {
693
+ function ke(n, e, t) {
595
694
  const r = Object.keys(e.maps);
596
695
  if (r.length === 0) return null;
597
696
  const a = e.maps[r[0]];
598
697
  if (!a) return null;
599
- const s = a.locations.map((i) => {
600
- const o = e.locations[i.id];
698
+ const o = a.locations.map((i) => {
699
+ const s = e.locations[i.id];
601
700
  return {
602
701
  id: i.id,
603
- name: o ? n(o.name) : i.id,
702
+ name: s ? t(s.name) : i.id,
604
703
  x: i.x,
605
704
  y: i.y,
606
- isCurrent: i.id === t.currentLocation
705
+ isCurrent: i.id === n.currentLocation
607
706
  };
608
707
  });
609
708
  return {
610
709
  id: a.id,
611
- name: n(a.name),
710
+ name: t(a.name),
612
711
  image: a.image,
613
712
  scale: a.scale,
614
- locations: s
713
+ locations: o
615
714
  };
616
715
  }
617
- class $e {
716
+ class We {
618
717
  /**
619
718
  * Create a new engine instance.
620
719
  *
621
720
  * @param registry - Content registry with all game entities
622
721
  * @param state - Initial game state
623
722
  */
624
- constructor(e, n) {
723
+ constructor(e, t) {
625
724
  T(this, "registry");
626
725
  T(this, "state");
627
- this.registry = e, this.state = n;
726
+ this.registry = e, this.state = t;
628
727
  }
629
728
  // ===========================================================================
630
729
  // Core API Methods
@@ -638,18 +737,18 @@ class $e {
638
737
  * @returns Initial snapshot
639
738
  */
640
739
  newGame(e) {
641
- const n = {};
642
- for (const [a, s] of Object.entries(this.registry.characters))
643
- n[a] = {
644
- location: s.location,
740
+ const t = {};
741
+ for (const [a, o] of Object.entries(this.registry.characters))
742
+ t[a] = {
743
+ location: o.location,
645
744
  inParty: !1,
646
745
  relationship: 0,
647
- stats: { ...s.stats }
746
+ stats: { ...o.stats }
648
747
  // Clone stats
649
748
  };
650
749
  const r = {};
651
- for (const [a, s] of Object.entries(this.registry.items))
652
- r[a] = s.location;
750
+ for (const [a, o] of Object.entries(this.registry.items))
751
+ r[a] = o.location;
653
752
  return this.state = {
654
753
  currentLocation: e.startLocation,
655
754
  currentTime: { ...e.startTime },
@@ -660,7 +759,7 @@ class $e {
660
759
  unlockedJournalEntries: [],
661
760
  playerNotes: [],
662
761
  dialogueState: null,
663
- characterState: n,
762
+ characterState: t,
664
763
  itemLocations: r,
665
764
  mapEnabled: !0,
666
765
  notifications: [],
@@ -708,22 +807,22 @@ class $e {
708
807
  var i;
709
808
  if (!this.state.dialogueState)
710
809
  return this.buildSnapshotAndClearTransients();
711
- const n = this.registry.dialogues[this.state.dialogueState.dialogueId];
712
- if (!n)
810
+ const t = this.registry.dialogues[this.state.dialogueState.dialogueId];
811
+ if (!t)
713
812
  return this.buildSnapshotAndClearTransients();
714
- const r = n.nodes.find((o) => {
813
+ const r = t.nodes.find((s) => {
715
814
  var l;
716
- return o.id === ((l = this.state.dialogueState) == null ? void 0 : l.nodeId);
815
+ return s.id === ((l = this.state.dialogueState) == null ? void 0 : l.nodeId);
717
816
  });
718
817
  if (!r)
719
818
  return this.buildSnapshotAndClearTransients();
720
- const a = r.choices.find((o) => o.id === e);
819
+ const a = r.choices.find((s) => s.id === e);
721
820
  if (!a)
722
821
  return this.buildSnapshotAndClearTransients();
723
- if (a.effects && (this.state = S(a.effects, this.state)), ((i = this.state.dialogueState) == null ? void 0 : i.nodeId) === "")
822
+ if (a.effects && (this.state = v(a.effects, this.state)), ((i = this.state.dialogueState) == null ? void 0 : i.nodeId) === "")
724
823
  return this.initDialogue(this.state.dialogueState.dialogueId);
725
- const s = n.nodes.find((o) => o.id === a.next);
726
- if (!s)
824
+ const o = t.nodes.find((s) => s.id === a.next);
825
+ if (!o)
727
826
  return this.state = {
728
827
  ...this.state,
729
828
  dialogueState: null
@@ -731,16 +830,16 @@ class $e {
731
830
  if (this.state = {
732
831
  ...this.state,
733
832
  dialogueState: {
734
- dialogueId: n.id,
735
- nodeId: s.id
833
+ dialogueId: t.id,
834
+ nodeId: o.id
736
835
  }
737
- }, s.effects && (this.state = S(s.effects, this.state)), s.choices.length === 0) {
738
- const o = this.resolveNextNode(s);
739
- o ? this.state = {
836
+ }, o.effects && (this.state = v(o.effects, this.state)), o.choices.length === 0) {
837
+ const s = this.resolveNextNode(o);
838
+ s ? this.state = {
740
839
  ...this.state,
741
840
  dialogueState: {
742
- dialogueId: n.id,
743
- nodeId: o
841
+ dialogueId: t.id,
842
+ nodeId: s
744
843
  }
745
844
  } : this.state = {
746
845
  ...this.state,
@@ -758,32 +857,32 @@ class $e {
758
857
  * @returns New snapshot with dialogue started
759
858
  */
760
859
  talkTo(e) {
761
- const n = this.registry.characters[e];
762
- return !n || !n.dialogue ? this.buildSnapshotAndClearTransients() : this.initDialogue(n.dialogue);
860
+ const t = this.registry.characters[e];
861
+ return !t || !t.dialogue ? this.buildSnapshotAndClearTransients() : this.initDialogue(t.dialogue);
763
862
  }
764
863
  /**
765
864
  * Initialize a dialogue from its start node.
766
865
  * Used by talkTo and when a startDialogue effect fires mid-conversation.
767
866
  */
768
867
  initDialogue(e) {
769
- const n = this.registry.dialogues[e];
770
- if (!n)
868
+ const t = this.registry.dialogues[e];
869
+ if (!t)
771
870
  return this.buildSnapshotAndClearTransients();
772
- const r = n.nodes.find((a) => a.id === n.startNode);
871
+ const r = t.nodes.find((a) => a.id === t.startNode);
773
872
  if (!r)
774
873
  return this.buildSnapshotAndClearTransients();
775
874
  if (this.state = {
776
875
  ...this.state,
777
876
  dialogueState: {
778
- dialogueId: n.id,
877
+ dialogueId: t.id,
779
878
  nodeId: r.id
780
879
  }
781
- }, r.effects && (this.state = S(r.effects, this.state)), r.choices.length === 0) {
880
+ }, r.effects && (this.state = v(r.effects, this.state)), r.choices.length === 0) {
782
881
  const a = this.resolveNextNode(r);
783
882
  a ? this.state = {
784
883
  ...this.state,
785
884
  dialogueState: {
786
- dialogueId: n.id,
885
+ dialogueId: t.id,
787
886
  nodeId: a
788
887
  }
789
888
  } : this.state = {
@@ -822,25 +921,25 @@ class $e {
822
921
  travelTo(e) {
823
922
  if (!this.state.mapEnabled)
824
923
  return this.buildSnapshotAndClearTransients();
825
- const n = Object.keys(this.registry.maps);
826
- if (n.length === 0)
924
+ const t = Object.keys(this.registry.maps);
925
+ if (t.length === 0)
827
926
  return this.buildSnapshotAndClearTransients();
828
- const r = this.registry.maps[n[0]];
927
+ const r = this.registry.maps[t[0]];
829
928
  if (!r)
830
929
  return this.buildSnapshotAndClearTransients();
831
- const a = r.locations.find((f) => f.id === this.state.currentLocation), s = r.locations.find((f) => f.id === e);
832
- if (!a || !s)
930
+ const a = r.locations.find((g) => g.id === this.state.currentLocation), o = r.locations.find((g) => g.id === e);
931
+ if (!a || !o)
833
932
  return this.buildSnapshotAndClearTransients();
834
933
  const i = Math.sqrt(
835
- Math.pow(s.x - a.x, 2) + Math.pow(s.y - a.y, 2)
836
- ), o = Math.round(i * r.scale), l = this.state.currentTime.hour + o, c = Math.floor(l / 24), d = l % 24;
934
+ Math.pow(o.x - a.x, 2) + Math.pow(o.y - a.y, 2)
935
+ ), s = Math.round(i * r.scale), l = this.state.currentTime.hour + s, c = Math.floor(l / 24), u = l % 24;
837
936
  return this.state = {
838
937
  ...this.state,
839
938
  currentLocation: e,
840
939
  dialogueState: null,
841
940
  currentTime: {
842
941
  day: this.state.currentTime.day + c,
843
- hour: d
942
+ hour: u
844
943
  }
845
944
  }, this.checkTriggeredDialogues(), this.checkTriggeredInterludes(), this.buildSnapshotAndClearTransients();
846
945
  }
@@ -853,11 +952,11 @@ class $e {
853
952
  * @param text - Note content
854
953
  * @returns New snapshot with note added
855
954
  */
856
- writeNote(e, n) {
955
+ writeNote(e, t) {
857
956
  const r = {
858
957
  id: `note_${Date.now()}`,
859
958
  title: e,
860
- text: n
959
+ text: t
861
960
  };
862
961
  return this.state = {
863
962
  ...this.state,
@@ -875,7 +974,7 @@ class $e {
875
974
  deleteNote(e) {
876
975
  return this.state = {
877
976
  ...this.state,
878
- playerNotes: this.state.playerNotes.filter((n) => n.id !== e)
977
+ playerNotes: this.state.playerNotes.filter((t) => t.id !== e)
879
978
  }, this.buildSnapshotAndClearTransients();
880
979
  }
881
980
  /**
@@ -910,7 +1009,7 @@ class $e {
910
1009
  * Transient state is data that should only appear in one snapshot.
911
1010
  */
912
1011
  buildSnapshotAndClearTransients() {
913
- const e = ve(this.state, this.registry);
1012
+ const e = Ie(this.state, this.registry);
914
1013
  return this.state = {
915
1014
  ...this.state,
916
1015
  notifications: [],
@@ -931,9 +1030,9 @@ class $e {
931
1030
  */
932
1031
  resolveNextNode(e) {
933
1032
  if (e.conditionalNext && e.conditionalNext.length > 0) {
934
- for (const n of e.conditionalNext)
935
- if (v([n.condition], this.state))
936
- return n.next;
1033
+ for (const t of e.conditionalNext)
1034
+ if (S([t.condition], this.state))
1035
+ return t.next;
937
1036
  }
938
1037
  return e.next ?? null;
939
1038
  }
@@ -947,18 +1046,18 @@ class $e {
947
1046
  */
948
1047
  checkTriggeredDialogues() {
949
1048
  for (const e of Object.values(this.registry.dialogues)) {
950
- if (e.triggerLocation !== this.state.currentLocation || e.conditions && !v(e.conditions, this.state))
1049
+ if (e.triggerLocation !== this.state.currentLocation || e.conditions && !S(e.conditions, this.state))
951
1050
  continue;
952
- const n = e.nodes.find((r) => r.id === e.startNode);
953
- if (n) {
1051
+ const t = e.nodes.find((r) => r.id === e.startNode);
1052
+ if (t) {
954
1053
  if (this.state = {
955
1054
  ...this.state,
956
1055
  dialogueState: {
957
1056
  dialogueId: e.id,
958
- nodeId: n.id
1057
+ nodeId: t.id
959
1058
  }
960
- }, n.effects && (this.state = S(n.effects, this.state)), n.choices.length === 0) {
961
- const r = this.resolveNextNode(n);
1059
+ }, t.effects && (this.state = v(t.effects, this.state)), t.choices.length === 0) {
1060
+ const r = this.resolveNextNode(t);
962
1061
  r ? this.state = {
963
1062
  ...this.state,
964
1063
  dialogueState: {
@@ -984,44 +1083,44 @@ class $e {
984
1083
  */
985
1084
  checkTriggeredInterludes() {
986
1085
  for (const e of Object.values(this.registry.interludes))
987
- if (e.triggerLocation === this.state.currentLocation && !(e.triggerConditions && !v(e.triggerConditions, this.state))) {
1086
+ if (e.triggerLocation === this.state.currentLocation && !(e.triggerConditions && !S(e.triggerConditions, this.state))) {
988
1087
  this.state = {
989
1088
  ...this.state,
990
1089
  pendingInterlude: e.id
991
- }, e.effects && (this.state = S(e.effects, this.state));
1090
+ }, e.effects && (this.state = v(e.effects, this.state));
992
1091
  break;
993
1092
  }
994
1093
  }
995
1094
  }
996
- function ke(t) {
997
- return t.split(`
998
- `).map((e, n) => ({
1095
+ function Oe(n) {
1096
+ return n.split(`
1097
+ `).map((e, t) => ({
999
1098
  original: e,
1000
- lineNumber: n + 1
1001
- })).map(({ original: e, lineNumber: n }) => {
1099
+ lineNumber: t + 1
1100
+ })).map(({ original: e, lineNumber: t }) => {
1002
1101
  let r = e;
1003
1102
  const a = e.indexOf("#");
1004
1103
  if (a === -1)
1005
1104
  r = e;
1006
1105
  else {
1007
- const o = e.match(/"[^"]*"/);
1008
- if (o) {
1009
- const l = e.indexOf(o[0]), c = l + o[0].length;
1106
+ const s = e.match(/"[^"]*"/);
1107
+ if (s) {
1108
+ const l = e.indexOf(s[0]), c = l + s[0].length;
1010
1109
  a < l ? r = e.substring(0, a) : a >= l && a < c ? r = e.substring(0, c) + e.substring(c).split("#")[0] : r = e.substring(0, a);
1011
1110
  } else
1012
1111
  r = e.substring(0, a);
1013
1112
  }
1014
- const s = r.length - r.trimStart().length;
1015
- return { line: r.trim(), lineNumber: n, indent: s };
1113
+ const o = r.length - r.trimStart().length;
1114
+ return { line: r.trim(), lineNumber: t, indent: o };
1016
1115
  }).filter((e) => e.line.length > 0);
1017
1116
  }
1018
- function N(t) {
1019
- const e = t.trim();
1117
+ function w(n) {
1118
+ const e = n.trim();
1020
1119
  return e.startsWith("@") ? e : e.startsWith('"') && e.endsWith('"') ? e.substring(1, e.length - 1) : e;
1021
1120
  }
1022
- function E(t) {
1023
- const e = t.trim().split(/\s+/), n = e[0];
1024
- switch (n) {
1121
+ function N(n) {
1122
+ const e = n.trim().split(/\s+/), t = e[0];
1123
+ switch (t) {
1025
1124
  case "hasFlag":
1026
1125
  return { type: "hasFlag", flag: e[1] };
1027
1126
  case "notFlag":
@@ -1077,13 +1176,13 @@ function E(t) {
1077
1176
  case "roll":
1078
1177
  return { type: "roll", min: Number(e[1]), max: Number(e[2]), threshold: Number(e[3]) };
1079
1178
  default:
1080
- throw new Error(`Unknown condition type: ${n}`);
1179
+ throw new Error(`Unknown condition type: ${t}`);
1081
1180
  }
1082
1181
  }
1083
- function w(t) {
1084
- const e = t.trim();
1182
+ function E(n) {
1183
+ const e = n.trim();
1085
1184
  if (e.startsWith("NOTIFY "))
1086
- return { type: "notify", message: N(e.substring(7)) };
1185
+ return { type: "notify", message: w(e.substring(7)) };
1087
1186
  if (e.startsWith("MUSIC "))
1088
1187
  return { type: "playMusic", track: e.substring(6).trim() };
1089
1188
  if (e.startsWith("SOUND "))
@@ -1096,216 +1195,216 @@ function w(t) {
1096
1195
  const a = e.split(/\s+/);
1097
1196
  return { type: "roll", variable: a[1], min: Number(a[2]), max: Number(a[3]) };
1098
1197
  }
1099
- const n = e.split(/\s+/), r = n[0];
1198
+ const t = e.split(/\s+/), r = t[0];
1100
1199
  switch (r) {
1101
1200
  case "SET":
1102
- if (n[1] === "flag")
1103
- return { type: "setFlag", flag: n[2] };
1104
- if (n[1] === "variable")
1201
+ if (t[1] === "flag")
1202
+ return { type: "setFlag", flag: t[2] };
1203
+ if (t[1] === "variable")
1105
1204
  return {
1106
1205
  type: "setVariable",
1107
- variable: n[2],
1108
- value: isNaN(Number(n[3])) ? n[3] : Number(n[3])
1206
+ variable: t[2],
1207
+ value: isNaN(Number(t[3])) ? t[3] : Number(t[3])
1109
1208
  };
1110
- if (n[1] === "questStage")
1111
- return { type: "setQuestStage", questId: n[2], stageId: n[3] };
1112
- if (n[1] === "characterLocation")
1209
+ if (t[1] === "questStage")
1210
+ return { type: "setQuestStage", questId: t[2], stageId: t[3] };
1211
+ if (t[1] === "characterLocation")
1113
1212
  return {
1114
1213
  type: "setCharacterLocation",
1115
- characterId: n[2],
1116
- locationId: n[3]
1214
+ characterId: t[2],
1215
+ locationId: t[3]
1117
1216
  };
1118
- if (n[1] === "relationship")
1217
+ if (t[1] === "relationship")
1119
1218
  return {
1120
1219
  type: "setRelationship",
1121
- characterId: n[2],
1122
- value: Number(n[3])
1220
+ characterId: t[2],
1221
+ value: Number(t[3])
1123
1222
  };
1124
- if (n[1] === "characterStat")
1223
+ if (t[1] === "characterStat")
1125
1224
  return {
1126
1225
  type: "setCharacterStat",
1127
- characterId: n[2],
1128
- stat: n[3],
1129
- value: isNaN(Number(n[4])) ? n[4] : Number(n[4])
1226
+ characterId: t[2],
1227
+ stat: t[3],
1228
+ value: isNaN(Number(t[4])) ? t[4] : Number(t[4])
1130
1229
  };
1131
- if (n[1] === "mapEnabled")
1132
- return { type: "setMapEnabled", enabled: n[2] === "true" };
1133
- throw new Error(`Unknown SET effect: ${n[1]}`);
1230
+ if (t[1] === "mapEnabled")
1231
+ return { type: "setMapEnabled", enabled: t[2] === "true" };
1232
+ throw new Error(`Unknown SET effect: ${t[1]}`);
1134
1233
  case "CLEAR":
1135
- if (n[1] === "flag")
1136
- return { type: "clearFlag", flag: n[2] };
1137
- throw new Error(`Unknown CLEAR effect: ${n[1]}`);
1234
+ if (t[1] === "flag")
1235
+ return { type: "clearFlag", flag: t[2] };
1236
+ throw new Error(`Unknown CLEAR effect: ${t[1]}`);
1138
1237
  case "ADD":
1139
- if (n[1] === "variable")
1238
+ if (t[1] === "variable")
1140
1239
  return {
1141
1240
  type: "addVariable",
1142
- variable: n[2],
1143
- value: Number(n[3])
1241
+ variable: t[2],
1242
+ value: Number(t[3])
1144
1243
  };
1145
- if (n[1] === "item")
1146
- return { type: "addItem", itemId: n[2] };
1147
- if (n[1] === "journalEntry")
1148
- return { type: "addJournalEntry", entryId: n[2] };
1149
- if (n[1] === "toParty")
1150
- return { type: "addToParty", characterId: n[2] };
1151
- if (n[1] === "relationship")
1244
+ if (t[1] === "item")
1245
+ return { type: "addItem", itemId: t[2] };
1246
+ if (t[1] === "journalEntry")
1247
+ return { type: "addJournalEntry", entryId: t[2] };
1248
+ if (t[1] === "toParty")
1249
+ return { type: "addToParty", characterId: t[2] };
1250
+ if (t[1] === "relationship")
1152
1251
  return {
1153
1252
  type: "addRelationship",
1154
- characterId: n[2],
1155
- value: Number(n[3])
1253
+ characterId: t[2],
1254
+ value: Number(t[3])
1156
1255
  };
1157
- if (n[1] === "characterStat")
1256
+ if (t[1] === "characterStat")
1158
1257
  return {
1159
1258
  type: "addCharacterStat",
1160
- characterId: n[2],
1161
- stat: n[3],
1162
- value: Number(n[4])
1259
+ characterId: t[2],
1260
+ stat: t[3],
1261
+ value: Number(t[4])
1163
1262
  };
1164
- throw new Error(`Unknown ADD effect: ${n[1]}`);
1263
+ throw new Error(`Unknown ADD effect: ${t[1]}`);
1165
1264
  case "REMOVE":
1166
- if (n[1] === "item")
1167
- return { type: "removeItem", itemId: n[2] };
1168
- if (n[1] === "fromParty")
1169
- return { type: "removeFromParty", characterId: n[2] };
1170
- throw new Error(`Unknown REMOVE effect: ${n[1]}`);
1265
+ if (t[1] === "item")
1266
+ return { type: "removeItem", itemId: t[2] };
1267
+ if (t[1] === "fromParty")
1268
+ return { type: "removeFromParty", characterId: t[2] };
1269
+ throw new Error(`Unknown REMOVE effect: ${t[1]}`);
1171
1270
  case "MOVE":
1172
- if (n[1] === "item")
1173
- return { type: "moveItem", itemId: n[2], locationId: n[3] };
1174
- throw new Error(`Unknown MOVE effect: ${n[1]}`);
1271
+ if (t[1] === "item")
1272
+ return { type: "moveItem", itemId: t[2], locationId: t[3] };
1273
+ throw new Error(`Unknown MOVE effect: ${t[1]}`);
1175
1274
  case "GOTO":
1176
- if (n[1] === "location")
1177
- return { type: "goToLocation", locationId: n[2] };
1275
+ if (t[1] === "location")
1276
+ return { type: "goToLocation", locationId: t[2] };
1178
1277
  throw new Error("GOTO should not be parsed as an effect");
1179
1278
  case "ADVANCE":
1180
- if (n[1] === "time")
1181
- return { type: "advanceTime", hours: Number(n[2]) };
1182
- throw new Error(`Unknown ADVANCE effect: ${n[1]}`);
1279
+ if (t[1] === "time")
1280
+ return { type: "advanceTime", hours: Number(t[2]) };
1281
+ throw new Error(`Unknown ADVANCE effect: ${t[1]}`);
1183
1282
  case "START":
1184
- if (n[1] === "dialogue")
1185
- return { type: "startDialogue", dialogueId: n[2] };
1186
- throw new Error(`Unknown START effect: ${n[1]}`);
1283
+ if (t[1] === "dialogue")
1284
+ return { type: "startDialogue", dialogueId: t[2] };
1285
+ throw new Error(`Unknown START effect: ${t[1]}`);
1187
1286
  case "END":
1188
- if (n[1] === "dialogue")
1287
+ if (t[1] === "dialogue")
1189
1288
  return { type: "endDialogue" };
1190
1289
  throw new Error("END should not be parsed as an effect");
1191
1290
  default:
1192
1291
  throw new Error(`Unknown effect keyword: ${r}`);
1193
1292
  }
1194
1293
  }
1195
- function Oe(t, e, n) {
1196
- const r = t[e], a = N(r.line.substring(7)), s = [], i = [];
1197
- let o = "", l = e + 1;
1294
+ function Re(n, e, t) {
1295
+ const r = n[e], a = w(r.line.substring(7)), o = [], i = [];
1296
+ let s = "", l = e + 1;
1198
1297
  const c = r.indent;
1199
- for (; l < t.length; ) {
1200
- const u = t[l];
1201
- if (u.line === "END" && u.indent === c) {
1298
+ for (; l < n.length; ) {
1299
+ const d = n[l];
1300
+ if (d.line === "END" && d.indent === c) {
1202
1301
  l++;
1203
1302
  break;
1204
1303
  }
1205
- if (u.line.startsWith("REQUIRE ")) {
1206
- const g = u.line.substring(8).trim();
1207
- s.push(E(g)), l++;
1208
- } else if (u.line.startsWith("GOTO ")) {
1209
- const g = u.line.substring(5).trim();
1210
- if (g.startsWith("location ")) {
1211
- const h = g.substring(9).trim();
1212
- i.push({ type: "goToLocation", locationId: h }), i.push({ type: "endDialogue" }), o = "";
1304
+ if (d.line.startsWith("REQUIRE ")) {
1305
+ const f = d.line.substring(8).trim();
1306
+ o.push(N(f)), l++;
1307
+ } else if (d.line.startsWith("GOTO ")) {
1308
+ const f = d.line.substring(5).trim();
1309
+ if (f.startsWith("location ")) {
1310
+ const h = f.substring(9).trim();
1311
+ i.push({ type: "goToLocation", locationId: h }), i.push({ type: "endDialogue" }), s = "";
1213
1312
  } else
1214
- o = g;
1313
+ s = f;
1215
1314
  l++;
1216
- } else u.line.includes(":") || i.push(w(u.line)), l++;
1315
+ } else d.line.includes(":") || i.push(E(d.line)), l++;
1217
1316
  }
1218
- const d = a.replace(/[@"]/g, "").replace(/[^a-z0-9]/gi, "_");
1317
+ const u = a.replace(/[@"]/g, "").replace(/[^a-z0-9]/gi, "_");
1219
1318
  return { choice: {
1220
- id: `${n}_choice_${d.toLowerCase().substring(0, 30)}`,
1319
+ id: `${t}_choice_${u.toLowerCase().substring(0, 30)}`,
1221
1320
  text: a,
1222
- conditions: s.length > 0 ? s : void 0,
1321
+ conditions: o.length > 0 ? o : void 0,
1223
1322
  effects: i.length > 0 ? i : void 0,
1224
- next: o || ""
1323
+ next: s || ""
1225
1324
  }, nextIndex: l };
1226
1325
  }
1227
- function De(t, e) {
1228
- const n = t[e], r = n.line.substring(3).trim(), a = E(r);
1229
- let s;
1326
+ function De(n, e) {
1327
+ const t = n[e], r = t.line.substring(3).trim(), a = N(r);
1328
+ let o;
1230
1329
  const i = [];
1231
- let o = e + 1;
1232
- const l = n.indent;
1233
- for (; o < t.length; ) {
1234
- const c = t[o];
1330
+ let s = e + 1;
1331
+ const l = t.indent;
1332
+ for (; s < n.length; ) {
1333
+ const c = n[s];
1235
1334
  if (c.line === "END" && c.indent === l) {
1236
- o++;
1335
+ s++;
1237
1336
  break;
1238
1337
  }
1239
- c.line.startsWith("GOTO ") ? (s = c.line.substring(5).trim(), o++) : (i.push(w(c.line)), o++);
1338
+ c.line.startsWith("GOTO ") ? (o = c.line.substring(5).trim(), s++) : (i.push(E(c.line)), s++);
1240
1339
  }
1241
- return { condition: a, next: s, effects: i, nextIndex: o };
1340
+ return { condition: a, next: o, effects: i, nextIndex: s };
1242
1341
  }
1243
- function Re(t, e) {
1244
- const r = t[e].line.substring(5).trim();
1245
- let a = null, s = "", i, o;
1246
- const l = [], c = [], d = [];
1247
- let f;
1342
+ function Ve(n, e) {
1343
+ const r = n[e].line.substring(5).trim();
1344
+ let a = null, o = "", i, s;
1345
+ const l = [], c = [], u = [];
1346
+ let g;
1248
1347
  const b = [];
1249
- let u = e + 1;
1250
- for (; u < t.length; ) {
1251
- const h = t[u];
1348
+ let d = e + 1;
1349
+ for (; d < n.length; ) {
1350
+ const h = n[d];
1252
1351
  if (h.line.startsWith("NODE "))
1253
1352
  break;
1254
1353
  if (h.line.includes(":") && !h.line.startsWith("VOICE")) {
1255
1354
  const p = h.line.indexOf(":"), y = h.line.substring(0, p).trim(), I = h.line.substring(p + 1).trim();
1256
- y === "NARRATOR" ? a = null : a = y.toLowerCase(), s = N(I), u++;
1355
+ y === "NARRATOR" ? a = null : a = y.toLowerCase(), o = w(I), d++;
1257
1356
  } else if (h.line.startsWith("VOICE "))
1258
- i = h.line.substring(6).trim(), u++;
1357
+ i = h.line.substring(6).trim(), d++;
1259
1358
  else if (h.line.startsWith("PORTRAIT "))
1260
- o = h.line.substring(9).trim(), u++;
1359
+ s = h.line.substring(9).trim(), d++;
1261
1360
  else if (h.line.startsWith("CHOICE ")) {
1262
- const p = Oe(t, u, r);
1263
- c.push(p.choice), u = p.nextIndex;
1361
+ const p = Re(n, d, r);
1362
+ c.push(p.choice), d = p.nextIndex;
1264
1363
  } else if (h.line.startsWith("IF ")) {
1265
- const p = De(t, u);
1364
+ const p = De(n, d);
1266
1365
  p.next && b.push({
1267
1366
  condition: p.condition,
1268
1367
  next: p.next
1269
- }), d.push(...p.effects), u = p.nextIndex;
1368
+ }), u.push(...p.effects), d = p.nextIndex;
1270
1369
  } else if (h.line.startsWith("GOTO ")) {
1271
1370
  const p = h.line.substring(5).trim();
1272
1371
  if (p.startsWith("location ")) {
1273
1372
  const y = p.substring(9).trim();
1274
- d.push({ type: "goToLocation", locationId: y }), d.push({ type: "endDialogue" });
1373
+ u.push({ type: "goToLocation", locationId: y }), u.push({ type: "endDialogue" });
1275
1374
  } else
1276
- f = p;
1277
- u++;
1375
+ g = p;
1376
+ d++;
1278
1377
  } else
1279
- d.push(w(h.line)), u++;
1378
+ u.push(E(h.line)), d++;
1280
1379
  }
1281
- const g = {
1380
+ const f = {
1282
1381
  id: r,
1283
1382
  speaker: a,
1284
- text: s,
1383
+ text: o,
1285
1384
  voice: i,
1286
- portrait: o,
1385
+ portrait: s,
1287
1386
  conditions: l.length > 0 ? l : void 0,
1288
1387
  choices: c,
1289
- effects: d.length > 0 ? d : void 0,
1290
- next: f
1388
+ effects: u.length > 0 ? u : void 0,
1389
+ next: g
1291
1390
  };
1292
- return b.length > 0 && (g.conditionalNext = b), { node: g, nextIndex: u };
1391
+ return b.length > 0 && (f.conditionalNext = b), { node: f, nextIndex: d };
1293
1392
  }
1294
- function qe(t, e) {
1295
- const n = ke(t);
1393
+ function je(n, e) {
1394
+ const t = Oe(n);
1296
1395
  let r;
1297
- const a = [], s = [];
1298
- let i = "", o = 0;
1299
- for (; o < n.length; ) {
1300
- const l = n[o];
1396
+ const a = [], o = [];
1397
+ let i = "", s = 0;
1398
+ for (; s < t.length; ) {
1399
+ const l = t[s];
1301
1400
  if (l.line.startsWith("TRIGGER "))
1302
- r = l.line.substring(8).trim(), o++;
1401
+ r = l.line.substring(8).trim(), s++;
1303
1402
  else if (l.line.startsWith("REQUIRE ")) {
1304
1403
  const c = l.line.substring(8).trim();
1305
- a.push(E(c)), o++;
1404
+ a.push(N(c)), s++;
1306
1405
  } else if (l.line.startsWith("NODE ")) {
1307
- const c = Re(n, o);
1308
- s.push(c.node), i || (i = c.node.id), o = c.nextIndex;
1406
+ const c = Ve(t, s);
1407
+ o.push(c.node), i || (i = c.node.id), s = c.nextIndex;
1309
1408
  } else
1310
1409
  throw new Error(`Unexpected token at line ${l.lineNumber}: ${l.line}`);
1311
1410
  }
@@ -1314,86 +1413,89 @@ function qe(t, e) {
1314
1413
  triggerLocation: r,
1315
1414
  conditions: a.length > 0 ? a : void 0,
1316
1415
  startNode: i,
1317
- nodes: s
1416
+ nodes: o
1318
1417
  };
1319
1418
  }
1320
- function Fe(t, e) {
1321
- const n = t;
1419
+ function Ge(n, e) {
1420
+ const t = n;
1322
1421
  window.doodle = {
1323
1422
  // Flag manipulation
1324
1423
  setFlag(r) {
1325
- n.state.flags[r] = !0, e(), console.log(`🐾 Flag set: ${r}`);
1424
+ t.state.flags[r] = !0, e(), console.log(`🐾 Flag set: ${r}`);
1326
1425
  },
1327
1426
  clearFlag(r) {
1328
- delete n.state.flags[r], e(), console.log(`🐾 Flag cleared: ${r}`);
1427
+ delete t.state.flags[r], e(), console.log(`🐾 Flag cleared: ${r}`);
1329
1428
  },
1330
1429
  // Variable manipulation
1331
1430
  setVariable(r, a) {
1332
- n.state.variables[r] = a, e(), console.log(`🐾 Variable set: ${r} = ${a}`);
1431
+ t.state.variables[r] = a, e(), console.log(`🐾 Variable set: ${r} = ${a}`);
1333
1432
  },
1334
1433
  getVariable(r) {
1335
- const a = n.state.variables[r];
1434
+ const a = t.state.variables[r];
1336
1435
  return console.log(`🐾 Variable: ${r} = ${a}`), a;
1337
1436
  },
1338
1437
  // Location control
1339
1438
  teleport(r) {
1340
- t.travelTo(r), e(), console.log(`🐾 Teleported to: ${r}`);
1439
+ n.travelTo(r), e(), console.log(`🐾 Teleported to: ${r}`);
1341
1440
  },
1342
1441
  // Dialogue control
1343
1442
  triggerDialogue(r) {
1344
- const a = n.registry.dialogues[r];
1443
+ const a = t.registry.dialogues[r];
1345
1444
  if (!a) {
1346
1445
  console.error(`🐾 Dialogue not found: ${r}`);
1347
1446
  return;
1348
1447
  }
1349
- const s = a.nodes.find((i) => i.id === a.startNode);
1350
- if (!s) {
1448
+ const o = a.nodes.find((i) => i.id === a.startNode);
1449
+ if (!o) {
1351
1450
  console.error(`🐾 Start node not found for dialogue: ${r}`);
1352
1451
  return;
1353
1452
  }
1354
- n.state.dialogueState = {
1453
+ t.state.dialogueState = {
1355
1454
  dialogueId: a.id,
1356
- nodeId: s.id
1455
+ nodeId: o.id
1357
1456
  }, e(), console.log(`🐾 Triggered dialogue: ${r}`);
1358
1457
  },
1359
1458
  // Quest control
1360
1459
  setQuestStage(r, a) {
1361
- n.state.questProgress[r] = a, e(), console.log(`🐾 Quest stage set: ${r} -> ${a}`);
1460
+ t.state.questProgress[r] = a, e(), console.log(`🐾 Quest stage set: ${r} -> ${a}`);
1362
1461
  },
1363
1462
  // Inventory control
1364
1463
  addItem(r) {
1365
- n.state.inventory.includes(r) ? console.log(`🐾 Item already in inventory: ${r}`) : (n.state.inventory.push(r), n.state.itemLocations[r] = "inventory", e(), console.log(`🐾 Item added: ${r}`));
1464
+ t.state.inventory.includes(r) ? console.log(`🐾 Item already in inventory: ${r}`) : (t.state.inventory.push(r), t.state.itemLocations[r] = "inventory", e(), console.log(`🐾 Item added: ${r}`));
1366
1465
  },
1367
1466
  removeItem(r) {
1368
- const a = n.state.inventory.indexOf(r);
1369
- a !== -1 ? (n.state.inventory.splice(a, 1), delete n.state.itemLocations[r], e(), console.log(`🐾 Item removed: ${r}`)) : console.log(`🐾 Item not in inventory: ${r}`);
1467
+ const a = t.state.inventory.indexOf(r);
1468
+ a !== -1 ? (t.state.inventory.splice(a, 1), delete t.state.itemLocations[r], e(), console.log(`🐾 Item removed: ${r}`)) : console.log(`🐾 Item not in inventory: ${r}`);
1370
1469
  },
1371
1470
  // Inspection
1372
1471
  inspect() {
1373
- const r = t.getSnapshot();
1374
- console.log("🐾 DOODLE ENGINE INSPECTOR 🐾"), console.log(""), console.log("Current Location:", r.location.name), console.log("Current Time:", `Day ${r.time.day}, Hour ${r.time.hour}`), console.log("Flags:", Object.keys(n.state.flags)), console.log("Variables:", n.state.variables), console.log("Inventory:", r.inventory.map((a) => a.name)), console.log("Quest Progress:", n.state.questProgress), console.log(""), console.log("Available commands:"), console.log(" doodle.setFlag(flag)"), console.log(" doodle.clearFlag(flag)"), console.log(" doodle.setVariable(variable, value)"), console.log(" doodle.getVariable(variable)"), console.log(" doodle.teleport(locationId)"), console.log(" doodle.triggerDialogue(dialogueId)"), console.log(" doodle.setQuestStage(questId, stageId)"), console.log(" doodle.addItem(itemId)"), console.log(" doodle.removeItem(itemId)"), console.log(" doodle.inspectState()"), console.log(" doodle.inspectRegistry()"), console.log(""), console.log("šŸ“š Docs: https://katbella.com/doodle-engine/");
1472
+ const r = n.getSnapshot();
1473
+ console.log("🐾 DOODLE ENGINE INSPECTOR 🐾"), console.log(""), console.log("Current Location:", r.location.name), console.log("Current Time:", `Day ${r.time.day}, Hour ${r.time.hour}`), console.log("Flags:", Object.keys(t.state.flags)), console.log("Variables:", t.state.variables), console.log("Inventory:", r.inventory.map((a) => a.name)), console.log("Quest Progress:", t.state.questProgress), console.log(""), console.log("Available commands:"), console.log(" doodle.setFlag(flag)"), console.log(" doodle.clearFlag(flag)"), console.log(" doodle.setVariable(variable, value)"), console.log(" doodle.getVariable(variable)"), console.log(" doodle.teleport(locationId)"), console.log(" doodle.triggerDialogue(dialogueId)"), console.log(" doodle.setQuestStage(questId, stageId)"), console.log(" doodle.addItem(itemId)"), console.log(" doodle.removeItem(itemId)"), console.log(" doodle.inspectState()"), console.log(" doodle.inspectRegistry()"), console.log(""), console.log("šŸ“š Docs: https://katbella.com/doodle-engine/");
1375
1474
  },
1376
1475
  inspectState() {
1377
- return console.log("🐾 GAME STATE:", n.state), n.state;
1476
+ return console.log("🐾 GAME STATE:", t.state), t.state;
1378
1477
  },
1379
1478
  inspectRegistry() {
1380
- return console.log("🐾 CONTENT REGISTRY:", n.registry), n.registry;
1479
+ return console.log("🐾 CONTENT REGISTRY:", t.registry), t.registry;
1381
1480
  }
1382
1481
  }, console.log("🐾 Doodle Engine dev tools enabled! Type `doodle.inspect()` to see available commands.\nšŸ“š You can also check out the docs: https://katbella.com/doodle-engine/");
1383
1482
  }
1384
- const We = "0.0.1";
1483
+ const He = "0.0.1";
1385
1484
  export {
1386
- $e as Engine,
1387
- We as VERSION,
1388
- B as applyEffect,
1389
- S as applyEffects,
1390
- ve as buildSnapshot,
1391
- Pe as createResolver,
1392
- Fe as enableDevTools,
1393
- O as evaluateCondition,
1394
- v as evaluateConditions,
1395
- E as parseCondition,
1396
- qe as parseDialogue,
1397
- w as parseEffect,
1485
+ We as Engine,
1486
+ He as VERSION,
1487
+ _ as applyEffect,
1488
+ v as applyEffects,
1489
+ Ie as buildSnapshot,
1490
+ Pe as createAssetLoader,
1491
+ Me as createResolver,
1492
+ Ge as enableDevTools,
1493
+ R as evaluateCondition,
1494
+ S as evaluateConditions,
1495
+ qe as extractAssetPaths,
1496
+ Fe as getAssetType,
1497
+ N as parseCondition,
1498
+ je as parseDialogue,
1499
+ E as parseEffect,
1398
1500
  L as resolveText
1399
1501
  };