@rpg-engine/long-bow 0.6.6 → 0.6.8

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.
@@ -136,6 +136,337 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
136
136
  return props.opensUp ? 'auto' : '100%';
137
137
  });
138
138
 
139
+ function _regeneratorRuntime() {
140
+ _regeneratorRuntime = function () {
141
+ return exports;
142
+ };
143
+ var exports = {},
144
+ Op = Object.prototype,
145
+ hasOwn = Op.hasOwnProperty,
146
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
147
+ obj[key] = desc.value;
148
+ },
149
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
150
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
151
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
152
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
153
+ function define(obj, key, value) {
154
+ return Object.defineProperty(obj, key, {
155
+ value: value,
156
+ enumerable: !0,
157
+ configurable: !0,
158
+ writable: !0
159
+ }), obj[key];
160
+ }
161
+ try {
162
+ define({}, "");
163
+ } catch (err) {
164
+ define = function (obj, key, value) {
165
+ return obj[key] = value;
166
+ };
167
+ }
168
+ function wrap(innerFn, outerFn, self, tryLocsList) {
169
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
170
+ generator = Object.create(protoGenerator.prototype),
171
+ context = new Context(tryLocsList || []);
172
+ return defineProperty(generator, "_invoke", {
173
+ value: makeInvokeMethod(innerFn, self, context)
174
+ }), generator;
175
+ }
176
+ function tryCatch(fn, obj, arg) {
177
+ try {
178
+ return {
179
+ type: "normal",
180
+ arg: fn.call(obj, arg)
181
+ };
182
+ } catch (err) {
183
+ return {
184
+ type: "throw",
185
+ arg: err
186
+ };
187
+ }
188
+ }
189
+ exports.wrap = wrap;
190
+ var ContinueSentinel = {};
191
+ function Generator() {}
192
+ function GeneratorFunction() {}
193
+ function GeneratorFunctionPrototype() {}
194
+ var IteratorPrototype = {};
195
+ define(IteratorPrototype, iteratorSymbol, function () {
196
+ return this;
197
+ });
198
+ var getProto = Object.getPrototypeOf,
199
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
200
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
201
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
202
+ function defineIteratorMethods(prototype) {
203
+ ["next", "throw", "return"].forEach(function (method) {
204
+ define(prototype, method, function (arg) {
205
+ return this._invoke(method, arg);
206
+ });
207
+ });
208
+ }
209
+ function AsyncIterator(generator, PromiseImpl) {
210
+ function invoke(method, arg, resolve, reject) {
211
+ var record = tryCatch(generator[method], generator, arg);
212
+ if ("throw" !== record.type) {
213
+ var result = record.arg,
214
+ value = result.value;
215
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
216
+ invoke("next", value, resolve, reject);
217
+ }, function (err) {
218
+ invoke("throw", err, resolve, reject);
219
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
220
+ result.value = unwrapped, resolve(result);
221
+ }, function (error) {
222
+ return invoke("throw", error, resolve, reject);
223
+ });
224
+ }
225
+ reject(record.arg);
226
+ }
227
+ var previousPromise;
228
+ defineProperty(this, "_invoke", {
229
+ value: function (method, arg) {
230
+ function callInvokeWithMethodAndArg() {
231
+ return new PromiseImpl(function (resolve, reject) {
232
+ invoke(method, arg, resolve, reject);
233
+ });
234
+ }
235
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
236
+ }
237
+ });
238
+ }
239
+ function makeInvokeMethod(innerFn, self, context) {
240
+ var state = "suspendedStart";
241
+ return function (method, arg) {
242
+ if ("executing" === state) throw new Error("Generator is already running");
243
+ if ("completed" === state) {
244
+ if ("throw" === method) throw arg;
245
+ return doneResult();
246
+ }
247
+ for (context.method = method, context.arg = arg;;) {
248
+ var delegate = context.delegate;
249
+ if (delegate) {
250
+ var delegateResult = maybeInvokeDelegate(delegate, context);
251
+ if (delegateResult) {
252
+ if (delegateResult === ContinueSentinel) continue;
253
+ return delegateResult;
254
+ }
255
+ }
256
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
257
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
258
+ context.dispatchException(context.arg);
259
+ } else "return" === context.method && context.abrupt("return", context.arg);
260
+ state = "executing";
261
+ var record = tryCatch(innerFn, self, context);
262
+ if ("normal" === record.type) {
263
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
264
+ return {
265
+ value: record.arg,
266
+ done: context.done
267
+ };
268
+ }
269
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
270
+ }
271
+ };
272
+ }
273
+ function maybeInvokeDelegate(delegate, context) {
274
+ var methodName = context.method,
275
+ method = delegate.iterator[methodName];
276
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
277
+ var record = tryCatch(method, delegate.iterator, context.arg);
278
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
279
+ var info = record.arg;
280
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
281
+ }
282
+ function pushTryEntry(locs) {
283
+ var entry = {
284
+ tryLoc: locs[0]
285
+ };
286
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
287
+ }
288
+ function resetTryEntry(entry) {
289
+ var record = entry.completion || {};
290
+ record.type = "normal", delete record.arg, entry.completion = record;
291
+ }
292
+ function Context(tryLocsList) {
293
+ this.tryEntries = [{
294
+ tryLoc: "root"
295
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
296
+ }
297
+ function values(iterable) {
298
+ if (iterable) {
299
+ var iteratorMethod = iterable[iteratorSymbol];
300
+ if (iteratorMethod) return iteratorMethod.call(iterable);
301
+ if ("function" == typeof iterable.next) return iterable;
302
+ if (!isNaN(iterable.length)) {
303
+ var i = -1,
304
+ next = function next() {
305
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
306
+ return next.value = undefined, next.done = !0, next;
307
+ };
308
+ return next.next = next;
309
+ }
310
+ }
311
+ return {
312
+ next: doneResult
313
+ };
314
+ }
315
+ function doneResult() {
316
+ return {
317
+ value: undefined,
318
+ done: !0
319
+ };
320
+ }
321
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
322
+ value: GeneratorFunctionPrototype,
323
+ configurable: !0
324
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
325
+ value: GeneratorFunction,
326
+ configurable: !0
327
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
328
+ var ctor = "function" == typeof genFun && genFun.constructor;
329
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
330
+ }, exports.mark = function (genFun) {
331
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
332
+ }, exports.awrap = function (arg) {
333
+ return {
334
+ __await: arg
335
+ };
336
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
337
+ return this;
338
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
339
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
340
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
341
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
342
+ return result.done ? result.value : iter.next();
343
+ });
344
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
345
+ return this;
346
+ }), define(Gp, "toString", function () {
347
+ return "[object Generator]";
348
+ }), exports.keys = function (val) {
349
+ var object = Object(val),
350
+ keys = [];
351
+ for (var key in object) keys.push(key);
352
+ return keys.reverse(), function next() {
353
+ for (; keys.length;) {
354
+ var key = keys.pop();
355
+ if (key in object) return next.value = key, next.done = !1, next;
356
+ }
357
+ return next.done = !0, next;
358
+ };
359
+ }, exports.values = values, Context.prototype = {
360
+ constructor: Context,
361
+ reset: function (skipTempReset) {
362
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
363
+ },
364
+ stop: function () {
365
+ this.done = !0;
366
+ var rootRecord = this.tryEntries[0].completion;
367
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
368
+ return this.rval;
369
+ },
370
+ dispatchException: function (exception) {
371
+ if (this.done) throw exception;
372
+ var context = this;
373
+ function handle(loc, caught) {
374
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
375
+ }
376
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
377
+ var entry = this.tryEntries[i],
378
+ record = entry.completion;
379
+ if ("root" === entry.tryLoc) return handle("end");
380
+ if (entry.tryLoc <= this.prev) {
381
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
382
+ hasFinally = hasOwn.call(entry, "finallyLoc");
383
+ if (hasCatch && hasFinally) {
384
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
385
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
386
+ } else if (hasCatch) {
387
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
388
+ } else {
389
+ if (!hasFinally) throw new Error("try statement without catch or finally");
390
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
391
+ }
392
+ }
393
+ }
394
+ },
395
+ abrupt: function (type, arg) {
396
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
397
+ var entry = this.tryEntries[i];
398
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
399
+ var finallyEntry = entry;
400
+ break;
401
+ }
402
+ }
403
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
404
+ var record = finallyEntry ? finallyEntry.completion : {};
405
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
406
+ },
407
+ complete: function (record, afterLoc) {
408
+ if ("throw" === record.type) throw record.arg;
409
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
410
+ },
411
+ finish: function (finallyLoc) {
412
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
413
+ var entry = this.tryEntries[i];
414
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
415
+ }
416
+ },
417
+ catch: function (tryLoc) {
418
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
419
+ var entry = this.tryEntries[i];
420
+ if (entry.tryLoc === tryLoc) {
421
+ var record = entry.completion;
422
+ if ("throw" === record.type) {
423
+ var thrown = record.arg;
424
+ resetTryEntry(entry);
425
+ }
426
+ return thrown;
427
+ }
428
+ }
429
+ throw new Error("illegal catch attempt");
430
+ },
431
+ delegateYield: function (iterable, resultName, nextLoc) {
432
+ return this.delegate = {
433
+ iterator: values(iterable),
434
+ resultName: resultName,
435
+ nextLoc: nextLoc
436
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
437
+ }
438
+ }, exports;
439
+ }
440
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
441
+ try {
442
+ var info = gen[key](arg);
443
+ var value = info.value;
444
+ } catch (error) {
445
+ reject(error);
446
+ return;
447
+ }
448
+ if (info.done) {
449
+ resolve(value);
450
+ } else {
451
+ Promise.resolve(value).then(_next, _throw);
452
+ }
453
+ }
454
+ function _asyncToGenerator(fn) {
455
+ return function () {
456
+ var self = this,
457
+ args = arguments;
458
+ return new Promise(function (resolve, reject) {
459
+ var gen = fn.apply(self, args);
460
+ function _next(value) {
461
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
462
+ }
463
+ function _throw(err) {
464
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
465
+ }
466
+ _next(undefined);
467
+ });
468
+ };
469
+ }
139
470
  function _extends() {
140
471
  _extends = Object.assign ? Object.assign.bind() : function (target) {
141
472
  for (var i = 1; i < arguments.length; i++) {
@@ -17509,6 +17840,101 @@ var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
17509
17840
  componentId: "sc-h904b1-0"
17510
17841
  })(["display:flex;justify-content:space-between;align-items:center;width:calc(100% - 30px);"]);
17511
17842
 
17843
+ var TabBody = function TabBody(_ref) {
17844
+ var id = _ref.id,
17845
+ children = _ref.children,
17846
+ styles = _ref.styles;
17847
+ return React.createElement(Container$o, {
17848
+ styles: styles,
17849
+ "data-tab-id": id
17850
+ }, children);
17851
+ };
17852
+ var Container$o = /*#__PURE__*/styled.div.withConfig({
17853
+ displayName: "TabBody__Container",
17854
+ componentId: "sc-196oof2-0"
17855
+ })(["width:100%;height:", ";overflow-y:auto;"], function (props) {
17856
+ var _props$styles;
17857
+ return ((_props$styles = props.styles) == null ? void 0 : _props$styles.height) || 'auto';
17858
+ });
17859
+
17860
+ var Tab$1 = function Tab(_ref) {
17861
+ var active = _ref.active,
17862
+ label = _ref.label,
17863
+ onPointerDown = _ref.onPointerDown,
17864
+ type = _ref.type;
17865
+ return React.createElement(CustomTab, {
17866
+ activeTab: active,
17867
+ onPointerDown: onPointerDown,
17868
+ className: type
17869
+ }, React.createElement("p", null, label));
17870
+ };
17871
+ var CustomTab = /*#__PURE__*/styled.div.withConfig({
17872
+ displayName: "Tab__CustomTab",
17873
+ componentId: "sc-qw5dfu-0"
17874
+ })(["width:120px;color:white;font-size:0.8rem;&.gray{border-left:0.25rem solid rgba(0,0,0,0.25);border-right:0.25rem solid rgba(0,0,0,0.25);border-top:0.25rem solid rgba(0,0,0,0.25);border-bottom:", ";background:", ";}&.brown{border-left:0.25rem solid #996d55;border-right:0.25rem solid #996d55;border-top:0.25rem solid #996d55;border-bottom:", ";background:", ";}margin-right:10px;p{text-align:center;font-size:0.6rem;opacity:", ";}border-radius:5px 5px 0 0;position:relative;top:0.3rem;"], function (props) {
17875
+ return props.activeTab ? '' : '0.25rem solid rgba(0, 0, 0, 0.25)';
17876
+ }, function (props) {
17877
+ return props.activeTab ? '#4E4A4E' : '#2b292b';
17878
+ }, function (props) {
17879
+ return props.activeTab ? '' : '0.25rem solid #996d55';
17880
+ }, function (props) {
17881
+ return props.activeTab ? '#BF886A' : '#B67051';
17882
+ }, function (props) {
17883
+ return props.activeTab ? '1' : '0.5';
17884
+ });
17885
+
17886
+ var MultitabType;
17887
+ (function (MultitabType) {
17888
+ MultitabType["Brown"] = "brown";
17889
+ MultitabType["Gray"] = "gray";
17890
+ })(MultitabType || (MultitabType = {}));
17891
+ var TabsContainer = function TabsContainer(_ref) {
17892
+ var children = _ref.children,
17893
+ onCloseButton = _ref.onCloseButton,
17894
+ tabs = _ref.tabs,
17895
+ _ref$type = _ref.type,
17896
+ type = _ref$type === void 0 ? MultitabType.Brown : _ref$type;
17897
+ var _useState = useState(tabs[0].id),
17898
+ selectedTab = _useState[0],
17899
+ setSelectedTab = _useState[1]; //by default the first one
17900
+ var onRenderTabs = function onRenderTabs() {
17901
+ return tabs.map(function (tab, index) {
17902
+ return React.createElement(Tab$1, {
17903
+ type: type,
17904
+ active: selectedTab === tab.id,
17905
+ label: tab.label,
17906
+ key: tab.label + "_" + index,
17907
+ onPointerDown: function onPointerDown() {
17908
+ return setSelectedTab(tab.id);
17909
+ }
17910
+ });
17911
+ });
17912
+ };
17913
+ var onGetContainerType = function onGetContainerType() {
17914
+ switch (type) {
17915
+ case MultitabType.Brown:
17916
+ return RPGUIContainerTypes.FramedGold;
17917
+ case MultitabType.Gray:
17918
+ return RPGUIContainerTypes.Framed;
17919
+ default:
17920
+ return RPGUIContainerTypes.Framed;
17921
+ }
17922
+ };
17923
+ return React.createElement(DraggableContainer, {
17924
+ onCloseButton: onCloseButton,
17925
+ type: onGetContainerType()
17926
+ }, onRenderTabs(), React.createElement(BodyContainer, {
17927
+ selectedTab: selectedTab,
17928
+ className: type
17929
+ }, children));
17930
+ };
17931
+ var BodyContainer = /*#__PURE__*/styled.div.withConfig({
17932
+ displayName: "TabsContainer__BodyContainer",
17933
+ componentId: "sc-s81iap-0"
17934
+ })(["display:flex;width:100%;height:100%;justify-content:space-between;& > *:not([data-tab-id=", "]){display:none;}&.brown{border:0.25rem solid #996D55;background-color:#BF886A;}&.gray{border:0.25rem solid rgba(0,0,0,0.25);background-color:#4E4A4E;}border-radius:5px;padding:0.5rem;"], function (props) {
17935
+ return props.selectedTab;
17936
+ });
17937
+
17512
17938
  var PartyCreate = function PartyCreate(_ref) {
17513
17939
  var onClose = _ref.onClose,
17514
17940
  onCreate = _ref.onCreate;
@@ -17962,7 +18388,7 @@ var ProgressBar = function ProgressBar(_ref) {
17962
18388
  }
17963
18389
  return value * 100 / max;
17964
18390
  };
17965
- return React.createElement(Container$o, {
18391
+ return React.createElement(Container$p, {
17966
18392
  className: "rpgui-progress",
17967
18393
  "data-value": calculatePercentageValue(max, value) / 100,
17968
18394
  "data-rpguitype": "progress",
@@ -17992,7 +18418,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
17992
18418
  displayName: "ProgressBar__TextOverlay",
17993
18419
  componentId: "sc-qa6fzh-1"
17994
18420
  })(["width:100%;position:relative;"]);
17995
- var Container$o = /*#__PURE__*/styled.div.withConfig({
18421
+ var Container$p = /*#__PURE__*/styled.div.withConfig({
17996
18422
  displayName: "ProgressBar__Container",
17997
18423
  componentId: "sc-qa6fzh-2"
17998
18424
  })(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
@@ -18174,9 +18600,9 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
18174
18600
 
18175
18601
  var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
18176
18602
  var children = _ref.children;
18177
- return React.createElement(Container$p, null, children);
18603
+ return React.createElement(Container$q, null, children);
18178
18604
  };
18179
- var Container$p = /*#__PURE__*/styled.div.withConfig({
18605
+ var Container$q = /*#__PURE__*/styled.div.withConfig({
18180
18606
  displayName: "RPGUIScrollbar__Container",
18181
18607
  componentId: "sc-p3msmb-0"
18182
18608
  })([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
@@ -18362,7 +18788,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
18362
18788
  bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
18363
18789
  _ref$margin = _ref.margin,
18364
18790
  margin = _ref$margin === void 0 ? 20 : _ref$margin;
18365
- return React.createElement(Container$q, {
18791
+ return React.createElement(Container$r, {
18366
18792
  className: "simple-progress-bar"
18367
18793
  }, React.createElement(ProgressBarContainer, {
18368
18794
  margin: margin
@@ -18371,7 +18797,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
18371
18797
  bgColor: bgColor
18372
18798
  }))));
18373
18799
  };
18374
- var Container$q = /*#__PURE__*/styled.div.withConfig({
18800
+ var Container$r = /*#__PURE__*/styled.div.withConfig({
18375
18801
  displayName: "SimpleProgressBar__Container",
18376
18802
  componentId: "sc-mbeil3-0"
18377
18803
  })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
@@ -18665,7 +19091,7 @@ var SpellInfo = function SpellInfo(_ref) {
18665
19091
  castingType = spell.castingType,
18666
19092
  cooldown = spell.cooldown,
18667
19093
  maxDistanceGrid = spell.maxDistanceGrid;
18668
- return React.createElement(Container$r, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$9, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
19094
+ return React.createElement(Container$s, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$9, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
18669
19095
  className: "label"
18670
19096
  }, "Casting Type:"), React.createElement("div", {
18671
19097
  className: "value"
@@ -18691,7 +19117,7 @@ var SpellInfo = function SpellInfo(_ref) {
18691
19117
  className: "value"
18692
19118
  }, requiredItem))), React.createElement(Description$2, null, description));
18693
19119
  };
18694
- var Container$r = /*#__PURE__*/styled.div.withConfig({
19120
+ var Container$s = /*#__PURE__*/styled.div.withConfig({
18695
19121
  displayName: "SpellInfo__Container",
18696
19122
  componentId: "sc-4hbw3q-0"
18697
19123
  })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:30rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, uiColors.lightGray);
@@ -18745,7 +19171,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
18745
19171
  var _ref$current;
18746
19172
  (_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
18747
19173
  };
18748
- return React.createElement(ModalPortal, null, React.createElement(Container$s, {
19174
+ return React.createElement(ModalPortal, null, React.createElement(Container$t, {
18749
19175
  ref: ref,
18750
19176
  onTouchEnd: function onTouchEnd() {
18751
19177
  handleFadeOut();
@@ -18770,7 +19196,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
18770
19196
  }, option.text);
18771
19197
  }))));
18772
19198
  };
18773
- var Container$s = /*#__PURE__*/styled.div.withConfig({
19199
+ var Container$t = /*#__PURE__*/styled.div.withConfig({
18774
19200
  displayName: "MobileSpellTooltip__Container",
18775
19201
  componentId: "sc-6p7uvr-0"
18776
19202
  })(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
@@ -18811,13 +19237,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
18811
19237
  }
18812
19238
  return;
18813
19239
  }, []);
18814
- return React.createElement(ModalPortal, null, React.createElement(Container$t, {
19240
+ return React.createElement(ModalPortal, null, React.createElement(Container$u, {
18815
19241
  ref: ref
18816
19242
  }, React.createElement(SpellInfoDisplay, {
18817
19243
  spell: spell
18818
19244
  })));
18819
19245
  };
18820
- var Container$t = /*#__PURE__*/styled.div.withConfig({
19246
+ var Container$u = /*#__PURE__*/styled.div.withConfig({
18821
19247
  displayName: "SpellTooltip__Container",
18822
19248
  componentId: "sc-1go0gwg-0"
18823
19249
  })(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
@@ -18877,7 +19303,7 @@ var Spell = function Spell(_ref) {
18877
19303
  var IMAGE_SCALE = 2;
18878
19304
  return React.createElement(SpellInfoWrapper, {
18879
19305
  spell: spell
18880
- }, React.createElement(Container$u, {
19306
+ }, React.createElement(Container$v, {
18881
19307
  onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
18882
19308
  isSettingShortcut: isSettingShortcut && !disabled,
18883
19309
  className: "spell"
@@ -18896,7 +19322,7 @@ var Spell = function Spell(_ref) {
18896
19322
  className: "mana"
18897
19323
  }, manaCost))));
18898
19324
  };
18899
- var Container$u = /*#__PURE__*/styled.button.withConfig({
19325
+ var Container$v = /*#__PURE__*/styled.button.withConfig({
18900
19326
  displayName: "Spell__Container",
18901
19327
  componentId: "sc-j96fa2-0"
18902
19328
  })(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
@@ -18975,7 +19401,7 @@ var Spellbook = function Spellbook(_ref) {
18975
19401
  height: "inherit",
18976
19402
  cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
18977
19403
  scale: scale
18978
- }, React.createElement(Container$v, null, React.createElement(Title$b, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
19404
+ }, React.createElement(Container$w, null, React.createElement(Title$b, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
18979
19405
  setSettingShortcutIndex: setSettingShortcutIndex,
18980
19406
  settingShortcutIndex: settingShortcutIndex,
18981
19407
  shortcuts: shortcuts,
@@ -19011,7 +19437,7 @@ var Title$b = /*#__PURE__*/styled.h1.withConfig({
19011
19437
  displayName: "Spellbook__Title",
19012
19438
  componentId: "sc-r02nfq-0"
19013
19439
  })(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
19014
- var Container$v = /*#__PURE__*/styled.div.withConfig({
19440
+ var Container$w = /*#__PURE__*/styled.div.withConfig({
19015
19441
  displayName: "Spellbook__Container",
19016
19442
  componentId: "sc-r02nfq-1"
19017
19443
  })(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
@@ -19023,15 +19449,61 @@ var SpellList = /*#__PURE__*/styled.div.withConfig({
19023
19449
  var Stepper = function Stepper(_ref) {
19024
19450
  var _steps$currentStep;
19025
19451
  var steps = _ref.steps,
19026
- finalCTAButton = _ref.finalCTAButton;
19452
+ finalCTAButton = _ref.finalCTAButton,
19453
+ onError = _ref.onError;
19027
19454
  var _useState = useState(0),
19028
19455
  currentStep = _useState[0],
19029
19456
  setCurrentStep = _useState[1];
19030
19457
  var currentComponent = (_steps$currentStep = steps[currentStep]) == null ? void 0 : _steps$currentStep.component;
19031
19458
  var totalSteps = steps.length;
19032
- var onStepChange = function onStepChange(step) {
19033
- setCurrentStep(step);
19034
- };
19459
+ var onStepChange = /*#__PURE__*/function () {
19460
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(step) {
19461
+ var _steps$currentStep2;
19462
+ var isValid;
19463
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
19464
+ while (1) switch (_context.prev = _context.next) {
19465
+ case 0:
19466
+ if (!((_steps$currentStep2 = steps[currentStep]) != null && _steps$currentStep2.validate)) {
19467
+ _context.next = 14;
19468
+ break;
19469
+ }
19470
+ _context.prev = 1;
19471
+ _context.next = 4;
19472
+ return steps[currentStep].validate();
19473
+ case 4:
19474
+ isValid = _context.sent;
19475
+ if (isValid) {
19476
+ _context.next = 8;
19477
+ break;
19478
+ }
19479
+ // If the current step is not valid, prevent navigation and trigger onError
19480
+ if (onError) {
19481
+ onError(steps[currentStep].errorMessage || "Validation failed on step " + (currentStep + 1));
19482
+ }
19483
+ return _context.abrupt("return");
19484
+ case 8:
19485
+ _context.next = 14;
19486
+ break;
19487
+ case 10:
19488
+ _context.prev = 10;
19489
+ _context.t0 = _context["catch"](1);
19490
+ // Handle unexpected validation errors
19491
+ if (onError) {
19492
+ onError("An error occurred during validation on step " + (currentStep + 1));
19493
+ }
19494
+ return _context.abrupt("return");
19495
+ case 14:
19496
+ setCurrentStep(step);
19497
+ case 15:
19498
+ case "end":
19499
+ return _context.stop();
19500
+ }
19501
+ }, _callee, null, [[1, 10]]);
19502
+ }));
19503
+ return function onStepChange(_x) {
19504
+ return _ref2.apply(this, arguments);
19505
+ };
19506
+ }();
19035
19507
  return React.createElement(StepperContainer, {
19036
19508
  className: "stepper-container"
19037
19509
  }, React.createElement(StepperTop, null, Array.from({
@@ -19056,7 +19528,7 @@ var Stepper = function Stepper(_ref) {
19056
19528
  }
19057
19529
  }), currentStep === totalSteps - 1 && finalCTAButton && React.createElement(Button, {
19058
19530
  buttonType: ButtonTypes.RPGUIButton,
19059
- onPointerDown: finalCTAButton.onClick
19531
+ onClick: finalCTAButton.onClick
19060
19532
  }, finalCTAButton.label)));
19061
19533
  };
19062
19534
  var StepperContainer = /*#__PURE__*/styled.div.withConfig({
@@ -19078,11 +19550,11 @@ var StepperFooter = /*#__PURE__*/styled.div.withConfig({
19078
19550
  var ProgressIndicator = /*#__PURE__*/styled.div.withConfig({
19079
19551
  displayName: "Stepper__ProgressIndicator",
19080
19552
  componentId: "sc-13obf1-4"
19081
- })(["width:20px;height:20px;border-radius:50%;background-color:", ";margin:0 5px;transition:background-color 0.3s;opacity:", ";border:1px solid ", ";cursor:pointer;"], function (_ref2) {
19082
- var isActive = _ref2.isActive;
19083
- return isActive ? uiColors.orange : uiColors.lightGray;
19084
- }, function (_ref3) {
19553
+ })(["width:20px;height:20px;border-radius:50%;background-color:", ";margin:0 5px;transition:background-color 0.3s;opacity:", ";border:1px solid ", ";cursor:pointer;"], function (_ref3) {
19085
19554
  var isActive = _ref3.isActive;
19555
+ return isActive ? uiColors.orange : uiColors.lightGray;
19556
+ }, function (_ref4) {
19557
+ var isActive = _ref4.isActive;
19086
19558
  return isActive ? 1 : 0.25;
19087
19559
  }, uiColors.raisinBlack);
19088
19560
 
@@ -19423,11 +19895,11 @@ var Truncate = function Truncate(_ref) {
19423
19895
  var _ref$maxLines = _ref.maxLines,
19424
19896
  maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
19425
19897
  children = _ref.children;
19426
- return React.createElement(Container$w, {
19898
+ return React.createElement(Container$x, {
19427
19899
  maxLines: maxLines
19428
19900
  }, children);
19429
19901
  };
19430
- var Container$w = /*#__PURE__*/styled.div.withConfig({
19902
+ var Container$x = /*#__PURE__*/styled.div.withConfig({
19431
19903
  displayName: "Truncate__Container",
19432
19904
  componentId: "sc-6x00qb-0"
19433
19905
  })(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
@@ -19520,5 +19992,5 @@ var ButtonWrapper$3 = /*#__PURE__*/styled.div.withConfig({
19520
19992
  componentId: "sc-gptoxp-5"
19521
19993
  })(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
19522
19994
 
19523
- export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
19995
+ export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
19524
19996
  //# sourceMappingURL=long-bow.esm.js.map