@rpg-engine/long-bow 0.4.6 → 0.4.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.
Files changed (35) hide show
  1. package/dist/components/ConfirmModal.d.ts +8 -0
  2. package/dist/components/DraggableContainer.d.ts +1 -0
  3. package/dist/components/Item/Inventory/ItemSlot.d.ts +7 -7
  4. package/dist/components/Marketplace/BuyPanel.d.ts +22 -0
  5. package/dist/components/Marketplace/ManagmentPanel.d.ts +18 -0
  6. package/dist/components/Marketplace/Marketplace.d.ts +22 -9
  7. package/dist/components/Marketplace/MarketplaceRows.d.ts +3 -1
  8. package/dist/components/Marketplace/{__mocks__ → filters}/index.d.ts +1 -3
  9. package/dist/components/Pager.d.ts +9 -0
  10. package/dist/components/SkillProgressBar.d.ts +1 -0
  11. package/dist/long-bow.cjs.development.js +552 -147
  12. package/dist/long-bow.cjs.development.js.map +1 -1
  13. package/dist/long-bow.cjs.production.min.js +1 -1
  14. package/dist/long-bow.cjs.production.min.js.map +1 -1
  15. package/dist/long-bow.esm.js +552 -147
  16. package/dist/long-bow.esm.js.map +1 -1
  17. package/package.json +2 -2
  18. package/src/components/ConfirmModal.tsx +87 -0
  19. package/src/components/DraggableContainer.tsx +3 -0
  20. package/src/components/Dropdown.tsx +14 -6
  21. package/src/components/Item/Inventory/ItemSlot.tsx +31 -16
  22. package/src/components/Marketplace/BuyPanel.tsx +296 -0
  23. package/src/components/Marketplace/ManagmentPanel.tsx +247 -0
  24. package/src/components/Marketplace/Marketplace.tsx +74 -100
  25. package/src/components/Marketplace/MarketplaceRows.tsx +82 -92
  26. package/src/components/Marketplace/{__mocks__ → filters}/index.tsx +13 -11
  27. package/src/components/Pager.tsx +94 -0
  28. package/src/components/SkillProgressBar.tsx +69 -4
  29. package/src/components/SkillsContainer.tsx +1 -0
  30. package/src/components/Spellbook/Spell.tsx +0 -1
  31. package/src/components/Spellbook/Spellbook.tsx +1 -17
  32. package/src/components/Spellbook/mockSpells.ts +68 -68
  33. package/src/components/shared/Ellipsis.tsx +10 -2
  34. package/src/mocks/skills.mocks.ts +2 -0
  35. package/src/stories/Marketplace.stories.tsx +22 -11
@@ -16,6 +16,7 @@ var ReactDOM = _interopDefault(require('react-dom'));
16
16
  var lodash = require('lodash');
17
17
  var mobxReactLite = require('mobx-react-lite');
18
18
  var uuid = require('uuid');
19
+ var ai = require('react-icons/ai');
19
20
  require('rpgui/rpgui.min.css');
20
21
  require('rpgui/rpgui.min.js');
21
22
  var capitalize = _interopDefault(require('lodash/capitalize'));
@@ -12351,14 +12352,14 @@ var Ellipsis = function Ellipsis(_ref) {
12351
12352
  maxWidth: maxWidth,
12352
12353
  fontSize: fontSize,
12353
12354
  center: center
12354
- }, React__default.createElement("div", {
12355
+ }, React__default.createElement("span", {
12355
12356
  className: "ellipsis-" + maxLines + "-lines"
12356
12357
  }, children));
12357
12358
  };
12358
- var Container$1 = /*#__PURE__*/styled.div.withConfig({
12359
+ var Container$1 = /*#__PURE__*/styled.span.withConfig({
12359
12360
  displayName: "Ellipsis__Container",
12360
12361
  componentId: "sc-ysrlju-0"
12361
- })([".ellipsis-1-lines{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:", ";font-size:", ";", "}.ellipsis-2-lines{display:-webkit-box;max-width:", "px;height:25px;margin:0 auto;line-height:1;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;font-size:", ";}.ellipsis-3-lines{display:-webkit-box;max-width:", "px;height:43px;margin:0 auto;line-height:1;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;font-size:", ";}"], function (props) {
12362
+ })(["display:block;margin:0;.ellipsis-1-lines{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:", ";font-size:", ";", "}.ellipsis-2-lines{display:block;display:-webkit-box;max-width:", "px;height:25px;margin:0 auto;line-height:1;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;font-size:", ";}.ellipsis-3-lines{display:block;display:-webkit-box;max-width:", "px;height:43px;margin:0 auto;line-height:1;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;font-size:", ";}"], function (props) {
12362
12363
  return props.maxWidth;
12363
12364
  }, function (props) {
12364
12365
  return props.fontSize;
@@ -13056,7 +13057,9 @@ var DraggableContainer = function DraggableContainer(_ref) {
13056
13057
  x: 0,
13057
13058
  y: 0
13058
13059
  } : _ref$initialPosition,
13059
- scale = _ref.scale;
13060
+ scale = _ref.scale,
13061
+ _ref$dragDisabled = _ref.dragDisabled,
13062
+ dragDisabled = _ref$dragDisabled === void 0 ? false : _ref$dragDisabled;
13060
13063
  var draggableRef = React.useRef(null);
13061
13064
  useOutsideClick(draggableRef, 'item-container');
13062
13065
  React.useEffect(function () {
@@ -13074,6 +13077,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
13074
13077
  }, []);
13075
13078
  return React__default.createElement(Draggable, {
13076
13079
  cancel: ".container-close," + cancelDrag,
13080
+ disabled: dragDisabled,
13077
13081
  onDrag: function onDrag(_e, data) {
13078
13082
  if (onPositionChange) {
13079
13083
  onPositionChange({
@@ -13498,7 +13502,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13498
13502
  y: 0
13499
13503
  });
13500
13504
  setIsFocused(false);
13501
- if (item) {
13505
+ if (item && containerType) {
13502
13506
  setContextActions(generateContextMenu(item, containerType, isDepotSystem));
13503
13507
  }
13504
13508
  }, [item, isDepotSystem]);
@@ -13614,7 +13618,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13614
13618
  });
13615
13619
  setIsFocused(false);
13616
13620
  } else if (item) {
13617
- onDragEnd(quantity);
13621
+ onDragEnd == null ? void 0 : onDragEnd(quantity);
13618
13622
  }
13619
13623
  };
13620
13624
  return React__default.createElement(Container$a, {
@@ -13622,7 +13626,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13622
13626
  className: "rpgui-icon empty-slot",
13623
13627
  onMouseUp: function onMouseUp() {
13624
13628
  var data = item ? item : null;
13625
- if (onPlaceDrop) onPlaceDrop(data, slotIndex, containerType);
13629
+ if (onPlaceDrop && containerType) onPlaceDrop(data, slotIndex, containerType);
13626
13630
  },
13627
13631
  onTouchEnd: function onTouchEnd(e) {
13628
13632
  var _document$elementFrom;
@@ -13636,11 +13640,15 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13636
13640
  });
13637
13641
  (_document$elementFrom = document.elementFromPoint(clientX, clientY)) == null ? void 0 : _document$elementFrom.dispatchEvent(simulatedEvent);
13638
13642
  },
13643
+ onPointerDown: onDragStart !== undefined && onDragEnd !== undefined ? undefined : function () {
13644
+ if (item) onPointerDown(item.type, containerType != null ? containerType : null, item);
13645
+ },
13639
13646
  isSelectingShortcut: isSelectingShortcut && ((item == null ? void 0 : item.type) === shared.ItemType.Consumable || (item == null ? void 0 : item.type) === shared.ItemType.Tool)
13640
13647
  }, React__default.createElement(Draggable, {
13641
13648
  axis: isSelectingShortcut ? 'none' : 'both',
13642
13649
  defaultClassName: item ? 'draggable' : 'empty-slot',
13643
13650
  scale: dragScale,
13651
+ disabled: onDragStart === undefined || onDragEnd === undefined,
13644
13652
  onStop: function onStop(e, data) {
13645
13653
  var target = e.target;
13646
13654
  if (target != null && target.id.includes('shortcutSetter') && setItemShortcut && item) {
@@ -13674,7 +13682,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13674
13682
  y: y
13675
13683
  });
13676
13684
  setTimeout(function () {
13677
- if (checkIfItemCanBeMoved()) {
13685
+ if (checkIfItemCanBeMoved != null && checkIfItemCanBeMoved()) {
13678
13686
  if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;
13679
13687
  if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty, onSuccesfulDrag);else onSuccesfulDrag(item.stackQty);
13680
13688
  } else {
@@ -13702,14 +13710,14 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13702
13710
  });
13703
13711
  }
13704
13712
  }
13705
- onPointerDown(item.type, containerType, item);
13713
+ onPointerDown(item.type, containerType != null ? containerType : null, item);
13706
13714
  }
13707
13715
  },
13708
13716
  onStart: function onStart() {
13709
13717
  if (!item || isSelectingShortcut) {
13710
13718
  return;
13711
13719
  }
13712
- if (onDragStart) {
13720
+ if (onDragStart && containerType) {
13713
13721
  onDragStart(item, slotIndex, containerType);
13714
13722
  }
13715
13723
  },
@@ -13725,7 +13733,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13725
13733
  ref: dragContainer,
13726
13734
  isFocused: isFocused,
13727
13735
  onMouseOver: function onMouseOver(event) {
13728
- _onMouseOver(event, slotIndex, item, event.clientX, event.clientY);
13736
+ _onMouseOver == null ? void 0 : _onMouseOver(event, slotIndex, item, event.clientX, event.clientY);
13729
13737
  },
13730
13738
  onMouseOut: function onMouseOut() {
13731
13739
  if (_onMouseOut) _onMouseOut();
@@ -13754,7 +13762,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13754
13762
  onSelected: function onSelected(optionId) {
13755
13763
  setIsContextMenuVisible(false);
13756
13764
  if (item) {
13757
- _onSelected(optionId, item);
13765
+ _onSelected == null ? void 0 : _onSelected(optionId, item);
13758
13766
  }
13759
13767
  }
13760
13768
  }), !isContextMenuDisabled && isContextMenuVisible && contextActions && React__default.createElement(RelativeListMenu, {
@@ -13762,7 +13770,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13762
13770
  onSelected: function onSelected(optionId) {
13763
13771
  setIsContextMenuVisible(false);
13764
13772
  if (item) {
13765
- _onSelected(optionId, item);
13773
+ _onSelected == null ? void 0 : _onSelected(optionId, item);
13766
13774
  }
13767
13775
  },
13768
13776
  onOutsideClick: function onOutsideClick() {
@@ -14435,7 +14443,7 @@ var Dropdown = function Dropdown(_ref) {
14435
14443
  }, React__default.createElement(DropdownSelect, {
14436
14444
  id: "dropdown-" + dropdownId,
14437
14445
  className: "rpgui-dropdown-imp rpgui-dropdown-imp-header",
14438
- onPointerDown: function onPointerDown() {
14446
+ onPointerUp: function onPointerUp() {
14439
14447
  return setOpened(function (prev) {
14440
14448
  return !prev;
14441
14449
  });
@@ -14446,7 +14454,7 @@ var Dropdown = function Dropdown(_ref) {
14446
14454
  }, options.map(function (option) {
14447
14455
  return React__default.createElement("li", {
14448
14456
  key: option.id,
14449
- onPointerDown: function onPointerDown() {
14457
+ onPointerUp: function onPointerUp() {
14450
14458
  setSelectedValue(option.value);
14451
14459
  setSelectedOption(option.option);
14452
14460
  setOpened(false);
@@ -14463,11 +14471,11 @@ var Container$d = /*#__PURE__*/styled.div.withConfig({
14463
14471
  var DropdownSelect = /*#__PURE__*/styled.p.withConfig({
14464
14472
  displayName: "Dropdown__DropdownSelect",
14465
14473
  componentId: "sc-8arn65-1"
14466
- })(["width:100%;box-sizing:border-box;"]);
14474
+ })(["width:100%;box-sizing:border-box;label{display:inline-block;transform:translateY(-2px);}"]);
14467
14475
  var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
14468
14476
  displayName: "Dropdown__DropdownOptions",
14469
14477
  componentId: "sc-8arn65-2"
14470
- })(["position:absolute;width:100%;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
14478
+ })(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
14471
14479
  return props.opened ? 'block' : 'none';
14472
14480
  });
14473
14481
 
@@ -15133,6 +15141,75 @@ var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
15133
15141
  componentId: "sc-i9097t-1"
15134
15142
  })(["margin-right:0.5rem;"]);
15135
15143
 
15144
+ var Pager = function Pager(_ref) {
15145
+ var totalItems = _ref.totalItems,
15146
+ currentPage = _ref.currentPage,
15147
+ itemsPerPage = _ref.itemsPerPage,
15148
+ onPageChange = _ref.onPageChange;
15149
+ var totalPages = Math.ceil(totalItems / itemsPerPage);
15150
+ return React__default.createElement(Container$g, null, React__default.createElement("p", null, "Total items: ", totalItems), React__default.createElement(PagerContainer, null, React__default.createElement("button", {
15151
+ disabled: currentPage === 1,
15152
+ onPointerDown: function onPointerDown() {
15153
+ return onPageChange(Math.max(currentPage - 1, 1));
15154
+ }
15155
+ }, '<'), React__default.createElement("div", {
15156
+ className: "rpgui-container framed-grey"
15157
+ }, currentPage), React__default.createElement("button", {
15158
+ disabled: currentPage === totalPages,
15159
+ onPointerDown: function onPointerDown() {
15160
+ return onPageChange(Math.min(currentPage + 1, totalPages));
15161
+ }
15162
+ }, '>')));
15163
+ };
15164
+ var Container$g = /*#__PURE__*/styled.div.withConfig({
15165
+ displayName: "Pager__Container",
15166
+ componentId: "sc-1ekmf50-0"
15167
+ })(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
15168
+ var PagerContainer = /*#__PURE__*/styled.div.withConfig({
15169
+ displayName: "Pager__PagerContainer",
15170
+ componentId: "sc-1ekmf50-1"
15171
+ })(["display:flex;justify-content:center;align-items:center;gap:5px;p{margin:0;}div{color:white;}button{width:40px;height:40px;background-color:", ";border:none;border-radius:5px;color:white;:hover{background-color:", ";}:disabled{opacity:0.5;}&.active{background-color:", ";font-weight:bold;color:black;}}"], uiColors.darkGray, uiColors.lightGray, uiColors.orange);
15172
+
15173
+ var ConfirmModal = function ConfirmModal(_ref) {
15174
+ var onConfirm = _ref.onConfirm,
15175
+ onClose = _ref.onClose,
15176
+ message = _ref.message;
15177
+ return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$h, {
15178
+ onPointerDown: onClose
15179
+ }, React__default.createElement(DraggableContainer, {
15180
+ width: "auto",
15181
+ dragDisabled: true
15182
+ }, React__default.createElement(Wrapper$1, {
15183
+ onPointerDown: function onPointerDown(e) {
15184
+ return e.stopPropagation();
15185
+ }
15186
+ }, React__default.createElement("p", null, message != null ? message : 'Are you sure?'), React__default.createElement(ButtonsWrapper, null, React__default.createElement("div", {
15187
+ className: "cancel-button"
15188
+ }, React__default.createElement(Button, {
15189
+ buttonType: exports.ButtonTypes.RPGUIButton,
15190
+ onPointerDown: onClose
15191
+ }, "No")), React__default.createElement(Button, {
15192
+ buttonType: exports.ButtonTypes.RPGUIButton,
15193
+ onPointerDown: onConfirm
15194
+ }, "Yes"))))));
15195
+ };
15196
+ var Background = /*#__PURE__*/styled.div.withConfig({
15197
+ displayName: "ConfirmModal__Background",
15198
+ componentId: "sc-11qkyu1-0"
15199
+ })(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
15200
+ var Container$h = /*#__PURE__*/styled.div.withConfig({
15201
+ displayName: "ConfirmModal__Container",
15202
+ componentId: "sc-11qkyu1-1"
15203
+ })(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
15204
+ var Wrapper$1 = /*#__PURE__*/styled.div.withConfig({
15205
+ displayName: "ConfirmModal__Wrapper",
15206
+ componentId: "sc-11qkyu1-2"
15207
+ })(["p{margin:0;}"]);
15208
+ var ButtonsWrapper = /*#__PURE__*/styled.div.withConfig({
15209
+ displayName: "ConfirmModal__ButtonsWrapper",
15210
+ componentId: "sc-11qkyu1-3"
15211
+ })(["display:flex;justify-content:flex-end;gap:5px;margin-top:5px;.cancel-button{filter:grayscale(0.7);}"]);
15212
+
15136
15213
  var MarketplaceRows = function MarketplaceRows(_ref) {
15137
15214
  var atlasJSON = _ref.atlasJSON,
15138
15215
  atlasIMG = _ref.atlasIMG,
@@ -15140,14 +15217,16 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
15140
15217
  itemPrice = _ref.itemPrice,
15141
15218
  equipmentSet = _ref.equipmentSet,
15142
15219
  scale = _ref.scale,
15143
- onHandleClick = _ref.onHandleClick;
15144
- return React__default.createElement(MarketPlaceWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(ItemInfoWrapper, {
15220
+ onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
15221
+ onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
15222
+ disabled = _ref.disabled;
15223
+ return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemInfoWrapper, {
15145
15224
  item: item,
15146
15225
  atlasIMG: atlasIMG,
15147
15226
  atlasJSON: atlasJSON,
15148
15227
  equipmentSet: equipmentSet,
15149
15228
  scale: scale
15150
- }, React__default.createElement(SpriteFromAtlas, {
15229
+ }, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(SpriteFromAtlas, {
15151
15230
  atlasIMG: atlasIMG,
15152
15231
  atlasJSON: atlasJSON,
15153
15232
  spriteKey: shared.getItemTextureKeyPath({
@@ -15157,136 +15236,446 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
15157
15236
  isStackable: item.isStackable
15158
15237
  }, atlasJSON),
15159
15238
  imgScale: 2
15160
- }))), React__default.createElement(PriceValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
15239
+ }), React__default.createElement(QuantityContainer, null, item.stackQty && item.stackQty > 1 && "x" + Math.round(item.stackQty * 10) / 10)), React__default.createElement(PriceValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
15161
15240
  maxLines: 1,
15162
- maxWidth: "150px",
15241
+ maxWidth: "200px",
15163
15242
  fontSize: "10px"
15164
- }, item.name)))), React__default.createElement(QuantityContainer, null, React__default.createElement(QuantityDisplay, null, React__default.createElement(TextOverlay$1, null, React__default.createElement(Item$1, null, React__default.createElement(Ellipsis, {
15165
- maxLines: 1,
15166
- maxWidth: "150px",
15167
- fontSize: "10px"
15168
- }, item.rarity))))), React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(SpriteFromAtlas, {
15243
+ }, item.name))))), React__default.createElement(Flex$1, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(SpriteFromAtlas, {
15169
15244
  atlasIMG: atlasIMG,
15170
15245
  atlasJSON: atlasJSON,
15171
- spriteKey: 'others/gold-coin-qty-4.png',
15246
+ spriteKey: "others/gold-coin-qty-5.png",
15172
15247
  imgScale: 2
15173
15248
  })), React__default.createElement(PriceValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
15174
15249
  maxLines: 1,
15175
- maxWidth: "150px",
15250
+ maxWidth: "200px",
15176
15251
  fontSize: "10px"
15177
15252
  }, "$", itemPrice)))), React__default.createElement(ButtonContainer$1, null, React__default.createElement(Button, {
15178
15253
  buttonType: exports.ButtonTypes.RPGUIButton,
15179
- onClick: function onClick() {
15180
- return onHandleClick(item.name);
15254
+ disabled: disabled,
15255
+ onPointerDown: function onPointerDown() {
15256
+ if (disabled) return;
15257
+ onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy();
15258
+ onMarketPlaceItemRemove == null ? void 0 : onMarketPlaceItemRemove();
15181
15259
  }
15182
- }, "Buy")));
15260
+ }, onMarketPlaceItemBuy ? 'Buy' : 'Remove'))));
15183
15261
  };
15184
- var MarketPlaceWrapper = /*#__PURE__*/styled.div.withConfig({
15185
- displayName: "MarketplaceRows__MarketPlaceWrapper",
15262
+ var MarketplaceWrapper = /*#__PURE__*/styled.div.withConfig({
15263
+ displayName: "MarketplaceRows__MarketplaceWrapper",
15186
15264
  componentId: "sc-wmpr1o-0"
15187
- })(["margin:auto;display:grid;grid-template-columns:35% 20% 20% 25%;&:hover{background-color:", ";}padding:0.5rem;p{font-size:0.8rem;}"], uiColors.darkGray);
15265
+ })(["margin:auto;display:flex;justify-content:space-between;padding:0.5rem;&:hover{background-color:", ";}p{font-size:0.8rem;}"], uiColors.darkGray);
15266
+ var QuantityContainer = /*#__PURE__*/styled.p.withConfig({
15267
+ displayName: "MarketplaceRows__QuantityContainer",
15268
+ componentId: "sc-wmpr1o-1"
15269
+ })(["position:absolute;display:block;top:15px;left:25px;font-size:", " !important;"], uiFonts.size.xsmall);
15270
+ var Flex$1 = /*#__PURE__*/styled.div.withConfig({
15271
+ displayName: "MarketplaceRows__Flex",
15272
+ componentId: "sc-wmpr1o-2"
15273
+ })(["display:flex;gap:24px;"]);
15188
15274
  var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
15189
15275
  displayName: "MarketplaceRows__ItemIconContainer",
15190
- componentId: "sc-wmpr1o-1"
15276
+ componentId: "sc-wmpr1o-3"
15191
15277
  })(["display:flex;justify-content:flex-start;align-items:center;"]);
15192
15278
  var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
15193
15279
  displayName: "MarketplaceRows__SpriteContainer",
15194
- componentId: "sc-wmpr1o-2"
15195
- })(["position:relative;top:-0.5rem;left:0.5rem;"]);
15196
- var Item$1 = /*#__PURE__*/styled.span.withConfig({
15197
- displayName: "MarketplaceRows__Item",
15198
- componentId: "sc-wmpr1o-3"
15199
- })(["color:white;text-align:center;z-index:1;width:100%;"]);
15200
- var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
15201
- displayName: "MarketplaceRows__TextOverlay",
15202
15280
  componentId: "sc-wmpr1o-4"
15203
- })(["width:100%;position:relative;"]);
15204
- var QuantityContainer = /*#__PURE__*/styled.div.withConfig({
15205
- displayName: "MarketplaceRows__QuantityContainer",
15206
- componentId: "sc-wmpr1o-5"
15207
- })(["position:relative;display:flex;min-width:100px;justify-content:center;align-items:center;"]);
15208
- var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
15209
- displayName: "MarketplaceRows__QuantityDisplay",
15210
- componentId: "sc-wmpr1o-6"
15211
- })(["font-size:", ";"], uiFonts.size.small);
15281
+ })(["position:relative;top:-0.5rem;left:0.5rem;"]);
15212
15282
  var PriceValue = /*#__PURE__*/styled.div.withConfig({
15213
15283
  displayName: "MarketplaceRows__PriceValue",
15214
- componentId: "sc-wmpr1o-7"
15284
+ componentId: "sc-wmpr1o-5"
15215
15285
  })(["margin-left:40px;"]);
15216
15286
  var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
15217
15287
  displayName: "MarketplaceRows__ButtonContainer",
15218
- componentId: "sc-wmpr1o-8"
15288
+ componentId: "sc-wmpr1o-6"
15219
15289
  })(["margin:auto;"]);
15220
15290
 
15221
- var Marketplace = function Marketplace(_ref) {
15291
+ var OrderByType;
15292
+ (function (OrderByType) {
15293
+ OrderByType["Name"] = "Name";
15294
+ OrderByType["Price"] = "Price";
15295
+ })(OrderByType || (OrderByType = {}));
15296
+ var itemTypeOptions = /*#__PURE__*/['Type'].concat(Object.keys(shared.ItemSubType)).filter(function (type) {
15297
+ return type !== 'DeadBody';
15298
+ }).map(function (itemType, index) {
15299
+ return {
15300
+ id: index + 1,
15301
+ value: itemType,
15302
+ option: itemType
15303
+ };
15304
+ });
15305
+ var itemRarityOptions = /*#__PURE__*/['Rarity'].concat(Object.values(shared.ItemRarities)).map(function (itemRarity, index) {
15306
+ return {
15307
+ id: index + 1,
15308
+ value: itemRarity,
15309
+ option: itemRarity
15310
+ };
15311
+ });
15312
+ var orderByOptions = /*#__PURE__*/Object.values(OrderByType).flatMap(function (orderBy, index) {
15313
+ return [{
15314
+ id: index * 2 + 1,
15315
+ value: orderBy.toLowerCase(),
15316
+ option: React__default.createElement(React__default.Fragment, null, orderBy, ' ', React__default.createElement("span", {
15317
+ style: {
15318
+ transform: 'translateY(-2px)',
15319
+ display: 'inline-block'
15320
+ }
15321
+ }, "\u2193"))
15322
+ }, {
15323
+ id: index * 2 + 2,
15324
+ value: '-' + orderBy.toLowerCase(),
15325
+ option: React__default.createElement(React__default.Fragment, null, orderBy, ' ', React__default.createElement("span", {
15326
+ style: {
15327
+ transform: 'translateY(-2px)',
15328
+ display: 'inline-block'
15329
+ }
15330
+ }, "\u2191"))
15331
+ }];
15332
+ });
15333
+
15334
+ var BuyPanel = function BuyPanel(_ref) {
15222
15335
  var items = _ref.items,
15223
15336
  atlasIMG = _ref.atlasIMG,
15224
15337
  atlasJSON = _ref.atlasJSON,
15225
- onClose = _ref.onClose,
15226
- optionsType = _ref.optionsType,
15227
- optionsRarity = _ref.optionsRarity,
15228
- optionsPrice = _ref.optionsPrice,
15229
15338
  onChangeType = _ref.onChangeType,
15230
15339
  onChangeRarity = _ref.onChangeRarity,
15231
15340
  onChangeOrder = _ref.onChangeOrder,
15232
15341
  onChangeNameInput = _ref.onChangeNameInput,
15233
- scale = _ref.scale,
15342
+ onChangeMainLevelInput = _ref.onChangeMainLevelInput,
15343
+ onChangeSecondaryLevelInput = _ref.onChangeSecondaryLevelInput,
15344
+ onChangePriceInput = _ref.onChangePriceInput,
15234
15345
  equipmentSet = _ref.equipmentSet,
15235
- onHandleClick = _ref.onHandleClick;
15236
- return React__default.createElement(DraggableContainer, {
15237
- type: exports.RPGUIContainerTypes.Framed,
15238
- onCloseButton: function onCloseButton() {
15239
- if (onClose) onClose();
15346
+ onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
15347
+ characterId = _ref.characterId,
15348
+ enableHotkeys = _ref.enableHotkeys,
15349
+ disableHotkeys = _ref.disableHotkeys;
15350
+ var _useState = React.useState(''),
15351
+ name = _useState[0],
15352
+ setName = _useState[1];
15353
+ var _useState2 = React.useState([undefined, undefined]),
15354
+ mainLevel = _useState2[0],
15355
+ setMainLevel = _useState2[1];
15356
+ var _useState3 = React.useState([undefined, undefined]),
15357
+ secondaryLevel = _useState3[0],
15358
+ setSecondaryLevel = _useState3[1];
15359
+ var _useState4 = React.useState([undefined, undefined]),
15360
+ price = _useState4[0],
15361
+ setPrice = _useState4[1];
15362
+ var _useState5 = React.useState(null),
15363
+ buyingItemId = _useState5[0],
15364
+ setBuyingItemId = _useState5[1];
15365
+ return React__default.createElement(React__default.Fragment, null, buyingItemId && React__default.createElement(ConfirmModal, {
15366
+ onClose: setBuyingItemId.bind(null, null),
15367
+ onConfirm: function onConfirm() {
15368
+ onMarketPlaceItemBuy == null ? void 0 : onMarketPlaceItemBuy(buyingItemId);
15369
+ setBuyingItemId(null);
15370
+ enableHotkeys == null ? void 0 : enableHotkeys();
15240
15371
  },
15241
- width: "800px",
15242
- cancelDrag: "#MarketContainer",
15243
- scale: scale
15244
- }, React__default.createElement(React__default.Fragment, null, React__default.createElement(InputWrapper, null, React__default.createElement("p", null, " Search By Name"), React__default.createElement(Input, {
15245
- onChange: onChangeNameInput,
15246
- placeholder: 'Search...'
15247
- })), React__default.createElement(WrapperContainer, null, React__default.createElement(StyledDropdown, {
15248
- options: optionsType,
15372
+ message: "Are you sure to buy this item?"
15373
+ }), React__default.createElement(InputWrapper, null, React__default.createElement("p", null, "Search By Name"), React__default.createElement(Input, {
15374
+ onChange: function onChange(e) {
15375
+ setName(e.target.value);
15376
+ onChangeNameInput(e.target.value);
15377
+ },
15378
+ value: name,
15379
+ placeholder: "Enter name...",
15380
+ onBlur: enableHotkeys,
15381
+ onFocus: disableHotkeys
15382
+ })), React__default.createElement(OptionsWrapper, null, React__default.createElement(FilterInputsWrapper, null, React__default.createElement("div", null, React__default.createElement("p", null, "Main level"), React__default.createElement(Input, {
15383
+ onChange: function onChange(e) {
15384
+ setMainLevel([Number(e.target.value), mainLevel[1]]);
15385
+ onChangeMainLevelInput([Number(e.target.value), mainLevel[1]]);
15386
+ },
15387
+ placeholder: "Min",
15388
+ type: "number",
15389
+ min: 0,
15390
+ onBlur: enableHotkeys,
15391
+ onFocus: disableHotkeys
15392
+ }), React__default.createElement(ai.AiFillCaretRight, null), React__default.createElement(Input, {
15393
+ onChange: function onChange(e) {
15394
+ setMainLevel([mainLevel[0], Number(e.target.value)]);
15395
+ onChangeMainLevelInput([mainLevel[0], Number(e.target.value)]);
15396
+ },
15397
+ placeholder: "Max",
15398
+ type: "number",
15399
+ min: 0,
15400
+ onBlur: enableHotkeys,
15401
+ onFocus: disableHotkeys
15402
+ })), React__default.createElement("div", null, React__default.createElement("p", null, "Secondary level"), React__default.createElement(Input, {
15403
+ onChange: function onChange(e) {
15404
+ setSecondaryLevel([Number(e.target.value), secondaryLevel[1]]);
15405
+ onChangeSecondaryLevelInput([Number(e.target.value), secondaryLevel[1]]);
15406
+ },
15407
+ placeholder: "Min",
15408
+ type: "number",
15409
+ min: 0,
15410
+ onBlur: enableHotkeys,
15411
+ onFocus: disableHotkeys
15412
+ }), React__default.createElement(ai.AiFillCaretRight, null), React__default.createElement(Input, {
15413
+ onChange: function onChange(e) {
15414
+ setSecondaryLevel([secondaryLevel[0], Number(e.target.value)]);
15415
+ onChangeSecondaryLevelInput([secondaryLevel[0], Number(e.target.value)]);
15416
+ },
15417
+ placeholder: "Max",
15418
+ type: "number",
15419
+ min: 0,
15420
+ onBlur: enableHotkeys,
15421
+ onFocus: disableHotkeys
15422
+ })), React__default.createElement("div", null, React__default.createElement("p", null, "Price"), React__default.createElement(Input, {
15423
+ onChange: function onChange(e) {
15424
+ setPrice([Number(e.target.value), price[1]]);
15425
+ onChangePriceInput([Number(e.target.value), price[1]]);
15426
+ },
15427
+ placeholder: "Min",
15428
+ type: "number",
15429
+ min: 0,
15430
+ className: "big-input",
15431
+ onBlur: enableHotkeys,
15432
+ onFocus: disableHotkeys
15433
+ }), React__default.createElement(ai.AiFillCaretRight, null), React__default.createElement(Input, {
15434
+ onChange: function onChange(e) {
15435
+ setPrice([price[0], Number(e.target.value)]);
15436
+ onChangePriceInput([price[0], Number(e.target.value)]);
15437
+ },
15438
+ placeholder: "Max",
15439
+ type: "number",
15440
+ min: 0,
15441
+ className: "big-input",
15442
+ onBlur: enableHotkeys,
15443
+ onFocus: disableHotkeys
15444
+ }))), React__default.createElement(WrapperContainer, null, React__default.createElement(StyledDropdown, {
15445
+ options: itemTypeOptions,
15249
15446
  onChange: onChangeType,
15250
- width: '220px'
15447
+ width: "95%"
15251
15448
  }), React__default.createElement(StyledDropdown, {
15252
- options: optionsRarity,
15449
+ options: itemRarityOptions,
15253
15450
  onChange: onChangeRarity,
15254
- width: '220px'
15451
+ width: "95%"
15255
15452
  }), React__default.createElement(StyledDropdown, {
15256
- options: optionsPrice,
15453
+ options: orderByOptions,
15257
15454
  onChange: onChangeOrder,
15258
- width: '220px'
15259
- })), React__default.createElement(ItemComponentScrollWrapper, {
15455
+ width: "100%"
15456
+ }))), React__default.createElement(ItemComponentScrollWrapper, {
15260
15457
  id: "MarketContainer"
15261
- }, items == null ? void 0 : items.map(function (item, index) {
15458
+ }, items == null ? void 0 : items.map(function (_ref2, index) {
15459
+ var item = _ref2.item,
15460
+ price = _ref2.price,
15461
+ _id = _ref2._id,
15462
+ owner = _ref2.owner;
15262
15463
  return React__default.createElement(MarketplaceRows, {
15263
15464
  key: item.key + "_" + index,
15264
15465
  atlasIMG: atlasIMG,
15265
15466
  atlasJSON: atlasJSON,
15266
15467
  item: item,
15267
- itemPrice: 10,
15468
+ itemPrice: price,
15268
15469
  equipmentSet: equipmentSet,
15269
- onHandleClick: onHandleClick
15470
+ onMarketPlaceItemBuy: setBuyingItemId.bind(null, _id),
15471
+ disabled: owner === characterId
15270
15472
  });
15271
- }))));
15473
+ })));
15272
15474
  };
15273
15475
  var InputWrapper = /*#__PURE__*/styled.div.withConfig({
15274
- displayName: "Marketplace__InputWrapper",
15275
- componentId: "sc-h904b1-0"
15276
- })(["width:95%;display:flex;justify-content:flex-start;align-items:center;margin:auto;margin-bottom:10px;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
15476
+ displayName: "BuyPanel__InputWrapper",
15477
+ componentId: "sc-1si8t7i-0"
15478
+ })(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
15479
+ var OptionsWrapper = /*#__PURE__*/styled.div.withConfig({
15480
+ displayName: "BuyPanel__OptionsWrapper",
15481
+ componentId: "sc-1si8t7i-1"
15482
+ })(["width:100%;height:100px;"]);
15483
+ var FilterInputsWrapper = /*#__PURE__*/styled.div.withConfig({
15484
+ displayName: "BuyPanel__FilterInputsWrapper",
15485
+ componentId: "sc-1si8t7i-2"
15486
+ })(["width:95%;display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;margin-left:10px;gap:5px;color:white;flex-wrap:wrap;p{width:auto;margin:0;}input{width:75px;height:10px;}.big-input{width:130px;}"]);
15277
15487
  var WrapperContainer = /*#__PURE__*/styled.div.withConfig({
15278
- displayName: "Marketplace__WrapperContainer",
15279
- componentId: "sc-h904b1-1"
15280
- })(["display:grid;grid-template-columns:30% 30% 30%;justify-content:space-between;width:90%;margin-left:10px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"]);
15488
+ displayName: "BuyPanel__WrapperContainer",
15489
+ componentId: "sc-1si8t7i-3"
15490
+ })(["display:grid;grid-template-columns:40% 30% 30%;justify-content:space-between;width:calc(100% - 40px);margin-left:10px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"]);
15281
15491
  var ItemComponentScrollWrapper = /*#__PURE__*/styled.div.withConfig({
15282
- displayName: "Marketplace__ItemComponentScrollWrapper",
15283
- componentId: "sc-h904b1-2"
15284
- })(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;"]);
15492
+ displayName: "BuyPanel__ItemComponentScrollWrapper",
15493
+ componentId: "sc-1si8t7i-4"
15494
+ })(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
15285
15495
  var StyledDropdown = /*#__PURE__*/styled(Dropdown).withConfig({
15286
- displayName: "Marketplace__StyledDropdown",
15287
- componentId: "sc-h904b1-3"
15496
+ displayName: "BuyPanel__StyledDropdown",
15497
+ componentId: "sc-1si8t7i-5"
15288
15498
  })(["margin:3px !important;width:170px !important;"]);
15289
15499
 
15500
+ var ManagmentPanel = function ManagmentPanel(_ref) {
15501
+ var items = _ref.items,
15502
+ atlasIMG = _ref.atlasIMG,
15503
+ atlasJSON = _ref.atlasJSON,
15504
+ onChangeNameInput = _ref.onChangeNameInput,
15505
+ equipmentSet = _ref.equipmentSet,
15506
+ availableGold = _ref.availableGold,
15507
+ onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
15508
+ selectedItemToSell = _ref.selectedItemToSell,
15509
+ onSelectedItemToSellRemove = _ref.onSelectedItemToSellRemove,
15510
+ onAddItemToMarketplace = _ref.onAddItemToMarketplace,
15511
+ enableHotkeys = _ref.enableHotkeys,
15512
+ disableHotkeys = _ref.disableHotkeys,
15513
+ onMoneyWithdraw = _ref.onMoneyWithdraw;
15514
+ var _useState = React.useState(''),
15515
+ name = _useState[0],
15516
+ setName = _useState[1];
15517
+ var _useState2 = React.useState(''),
15518
+ price = _useState2[0],
15519
+ setPrice = _useState2[1];
15520
+ var _useState3 = React.useState(false),
15521
+ isCreatingOffer = _useState3[0],
15522
+ setIsCreatingOffer = _useState3[1];
15523
+ var _useState4 = React.useState(null),
15524
+ removingItemId = _useState4[0],
15525
+ setRemovingItemId = _useState4[1];
15526
+ return React__default.createElement(React__default.Fragment, null, isCreatingOffer && React__default.createElement(ConfirmModal, {
15527
+ onClose: setIsCreatingOffer.bind(null, false),
15528
+ onConfirm: function onConfirm() {
15529
+ if (selectedItemToSell && price && Number(price)) {
15530
+ onAddItemToMarketplace(selectedItemToSell, Number(price));
15531
+ setPrice('');
15532
+ onSelectedItemToSellRemove(selectedItemToSell);
15533
+ setIsCreatingOffer(false);
15534
+ enableHotkeys == null ? void 0 : enableHotkeys();
15535
+ }
15536
+ },
15537
+ message: "Are you sure to create this offer?"
15538
+ }), removingItemId && React__default.createElement(ConfirmModal, {
15539
+ onClose: setRemovingItemId.bind(null, null),
15540
+ onConfirm: function onConfirm() {
15541
+ onMarketPlaceItemRemove == null ? void 0 : onMarketPlaceItemRemove(removingItemId);
15542
+ setRemovingItemId(null);
15543
+ enableHotkeys == null ? void 0 : enableHotkeys();
15544
+ },
15545
+ message: "Are you sure to remove this item?"
15546
+ }), React__default.createElement(InputWrapper$1, null, React__default.createElement("p", null, "Search By Name"), React__default.createElement(Input, {
15547
+ onChange: function onChange(e) {
15548
+ setName(e.target.value);
15549
+ onChangeNameInput(e.target.value);
15550
+ },
15551
+ value: name,
15552
+ placeholder: "Enter name...",
15553
+ onBlur: enableHotkeys,
15554
+ onFocus: disableHotkeys
15555
+ })), React__default.createElement(OptionsWrapper$1, null, React__default.createElement(InnerOptionsWrapper, null, React__default.createElement(SellDescription, null, "Click on item in inventory to sell it"), React__default.createElement(Flex$2, null, React__default.createElement(ItemSlot, {
15556
+ slotIndex: 0,
15557
+ atlasIMG: atlasIMG,
15558
+ atlasJSON: atlasJSON,
15559
+ onPointerDown: function onPointerDown(_, __, item) {
15560
+ return onSelectedItemToSellRemove(item);
15561
+ },
15562
+ item: selectedItemToSell
15563
+ }), React__default.createElement(PriceInputWrapper, null, React__default.createElement("p", null, "Enter price"), React__default.createElement(Flex$2, null, React__default.createElement(Input, {
15564
+ onChange: function onChange(e) {
15565
+ setPrice(e.target.value);
15566
+ },
15567
+ value: price,
15568
+ placeholder: "Enter price...",
15569
+ type: "number",
15570
+ disabled: !selectedItemToSell,
15571
+ onBlur: enableHotkeys,
15572
+ onFocus: disableHotkeys
15573
+ }), React__default.createElement(Button, {
15574
+ buttonType: exports.ButtonTypes.RPGUIButton,
15575
+ disabled: !selectedItemToSell || !price,
15576
+ onPointerDown: function onPointerDown() {
15577
+ if (selectedItemToSell && price && Number(price)) {
15578
+ setIsCreatingOffer(true);
15579
+ }
15580
+ }
15581
+ }, "Create offer"))))), React__default.createElement(InnerOptionsWrapper, null, React__default.createElement(AvailableGold, {
15582
+ "$disabled": availableGold === 0
15583
+ }, React__default.createElement("p", null, "Available gold"), React__default.createElement("p", {
15584
+ className: "center"
15585
+ }, "$", availableGold), React__default.createElement(Button, {
15586
+ buttonType: exports.ButtonTypes.RPGUIButton,
15587
+ disabled: availableGold === 0,
15588
+ onPointerDown: function onPointerDown() {
15589
+ return availableGold > 0 && onMoneyWithdraw();
15590
+ }
15591
+ }, "Withdraw")))), React__default.createElement(ItemComponentScrollWrapper$1, {
15592
+ id: "MarketContainer"
15593
+ }, items == null ? void 0 : items.map(function (_ref2, index) {
15594
+ var item = _ref2.item,
15595
+ price = _ref2.price,
15596
+ _id = _ref2._id;
15597
+ return React__default.createElement(MarketplaceRows, {
15598
+ key: item.key + "_" + index,
15599
+ atlasIMG: atlasIMG,
15600
+ atlasJSON: atlasJSON,
15601
+ item: item,
15602
+ itemPrice: price,
15603
+ equipmentSet: equipmentSet,
15604
+ onMarketPlaceItemRemove: setRemovingItemId.bind(null, _id)
15605
+ });
15606
+ })));
15607
+ };
15608
+ var Flex$2 = /*#__PURE__*/styled.div.withConfig({
15609
+ displayName: "ManagmentPanel__Flex",
15610
+ componentId: "sc-1yyi6jn-0"
15611
+ })(["display:flex;gap:5px;align-items:center;"]);
15612
+ var InputWrapper$1 = /*#__PURE__*/styled.div.withConfig({
15613
+ displayName: "ManagmentPanel__InputWrapper",
15614
+ componentId: "sc-1yyi6jn-1"
15615
+ })(["width:95%;display:flex !important;justify-content:flex-start;align-items:center;margin:auto;p{width:auto;margin-right:20px;}input{width:68%;height:10px;}"]);
15616
+ var OptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
15617
+ displayName: "ManagmentPanel__OptionsWrapper",
15618
+ componentId: "sc-1yyi6jn-2"
15619
+ })(["width:100%;height:100px;display:flex;align-items:center;justify-content:space-around;"]);
15620
+ var InnerOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
15621
+ displayName: "ManagmentPanel__InnerOptionsWrapper",
15622
+ componentId: "sc-1yyi6jn-3"
15623
+ })(["display:flex;justify-content:space-between;flex-direction:column;height:100%;"]);
15624
+ var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
15625
+ displayName: "ManagmentPanel__ItemComponentScrollWrapper",
15626
+ componentId: "sc-1yyi6jn-4"
15627
+ })(["overflow-y:scroll;height:390px;width:100%;margin-top:1rem;@media (max-width:950px){height:250px;}"]);
15628
+ var PriceInputWrapper = /*#__PURE__*/styled.div.withConfig({
15629
+ displayName: "ManagmentPanel__PriceInputWrapper",
15630
+ componentId: "sc-1yyi6jn-5"
15631
+ })(["p{margin:0;}input{width:200px;}"]);
15632
+ var SellDescription = /*#__PURE__*/styled.p.withConfig({
15633
+ displayName: "ManagmentPanel__SellDescription",
15634
+ componentId: "sc-1yyi6jn-6"
15635
+ })(["margin:0;font-size:", " !important;"], uiFonts.size.xsmall);
15636
+ var AvailableGold = /*#__PURE__*/styled.div.withConfig({
15637
+ displayName: "ManagmentPanel__AvailableGold",
15638
+ componentId: "sc-1yyi6jn-7"
15639
+ })(["height:100%;display:flex;flex-direction:column;justify-content:space-between;p{margin:0;color:", " !important;}.center{text-align:center;font-size:", " !important;color:", " !important;}"], function (props) {
15640
+ return props.$disabled ? uiColors.lightGray : 'white';
15641
+ }, uiFonts.size.large, function (props) {
15642
+ return props.$disabled ? uiColors.lightGray : uiColors.lightGreen;
15643
+ });
15644
+
15645
+ var Marketplace = function Marketplace(props) {
15646
+ var onClose = props.onClose,
15647
+ scale = props.scale,
15648
+ onYourPanelToggle = props.onYourPanelToggle;
15649
+ var _useState = React.useState(false),
15650
+ isYourPanel = _useState[0],
15651
+ setIsYourPanel = _useState[1];
15652
+ return React__default.createElement(DraggableContainer, {
15653
+ type: exports.RPGUIContainerTypes.Framed,
15654
+ onCloseButton: function onCloseButton() {
15655
+ if (onClose) onClose();
15656
+ },
15657
+ width: "800px",
15658
+ cancelDrag: "#MarketContainer, .rpgui-dropdown-imp, input, .empty-slot, button",
15659
+ scale: scale
15660
+ }, isYourPanel && React__default.createElement(React__default.Fragment, null, React__default.createElement(ManagmentPanel, Object.assign({}, props)), React__default.createElement(PagerContainer$1, null, React__default.createElement(Button, {
15661
+ buttonType: exports.ButtonTypes.RPGUIButton,
15662
+ onPointerDown: function onPointerDown() {
15663
+ onYourPanelToggle(false);
15664
+ setIsYourPanel(false);
15665
+ }
15666
+ }, "Go to marketplace"), React__default.createElement(Pager, Object.assign({}, props)))), !isYourPanel && React__default.createElement(React__default.Fragment, null, React__default.createElement(BuyPanel, Object.assign({}, props)), React__default.createElement(PagerContainer$1, null, React__default.createElement(Button, {
15667
+ buttonType: exports.ButtonTypes.RPGUIButton,
15668
+ onPointerDown: function onPointerDown() {
15669
+ onYourPanelToggle(true);
15670
+ setIsYourPanel(true);
15671
+ }
15672
+ }, "Go to your panel"), React__default.createElement(Pager, Object.assign({}, props)))));
15673
+ };
15674
+ var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
15675
+ displayName: "Marketplace__PagerContainer",
15676
+ componentId: "sc-h904b1-0"
15677
+ })(["display:flex;justify-content:space-between;align-items:center;width:calc(100% - 30px);"]);
15678
+
15290
15679
  var img$5 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
15291
15680
 
15292
15681
  var img$6 = 'data:image/gif;base64,R0lGODlhQAAgAPIAAAAAAA0NDRERESIiIigoKFlZWf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD/wi63P4wykmrvTjrzbv/YAgIZGmeaKquakQWcCzPdG3fNukIeO//PQGDBywafcIF8chswpKKZcxApTqvNOiIZi0YsODncFaFlcNOrdTbJVff0/c3Lp/Xs2N37cy2ndt6ZnhKXHdsc4d7VnwyfIxqPWWOXXWLgHSGYoSNbZKVZp2WiJyjg1GFcaClqaqJhasyUAFrh3Cur3KqubWXBQIBAAEDtDeMaEEDAcLEx2gCycvN0jHPysPT09XR2M3a19zH3gTM4EYCBNDD4yzs7e4r48nB6gT19vf4+fr7/P3P8sKGvRtIkMUAeQoCHlzIsKHDhxAjSoTWQJnFixgzatzIsQWjRQYJAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD8Ai63P4wykmrvTjrzbv/YCiOlGCeaKqubMtGZiHPdG3feI6bjqD/wOBPwPAJj0ggcWFMOp+ypaI5M1it0KxNCqDKsAWDdhwt1q5fMPnJ9aJt17g4HafJ3/et+Tzn99V+aThqfTNtcHlhhIBVWG+BdDSHOmiPeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
@@ -15327,7 +15716,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
15327
15716
  type: exports.RPGUIContainerTypes.FramedGold,
15328
15717
  width: '50%',
15329
15718
  height: '180px'
15330
- }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$g, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer, {
15719
+ }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$i, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer, {
15331
15720
  flex: '70%'
15332
15721
  }, React__default.createElement(NPCDialogText, {
15333
15722
  onStartStep: function onStartStep() {
@@ -15369,7 +15758,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
15369
15758
  src: img$6
15370
15759
  }))), ")"));
15371
15760
  };
15372
- var Container$g = /*#__PURE__*/styled.div.withConfig({
15761
+ var Container$i = /*#__PURE__*/styled.div.withConfig({
15373
15762
  displayName: "NPCMultiDialog__Container",
15374
15763
  componentId: "sc-rvu5wg-0"
15375
15764
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
@@ -15573,7 +15962,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
15573
15962
  return null;
15574
15963
  });
15575
15964
  };
15576
- return React__default.createElement(Container$h, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
15965
+ return React__default.createElement(Container$j, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
15577
15966
  text: currentQuestion.text,
15578
15967
  onStart: function onStart() {
15579
15968
  return setCanShowAnswers(false);
@@ -15583,7 +15972,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
15583
15972
  }
15584
15973
  })), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
15585
15974
  };
15586
- var Container$h = /*#__PURE__*/styled.div.withConfig({
15975
+ var Container$j = /*#__PURE__*/styled.div.withConfig({
15587
15976
  displayName: "QuestionDialog__Container",
15588
15977
  componentId: "sc-bxc5u0-0"
15589
15978
  })(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
@@ -15631,14 +16020,14 @@ var ProgressBar = function ProgressBar(_ref) {
15631
16020
  }
15632
16021
  return value * 100 / max;
15633
16022
  };
15634
- return React__default.createElement(Container$i, {
16023
+ return React__default.createElement(Container$k, {
15635
16024
  className: "rpgui-progress",
15636
16025
  "data-value": calculatePercentageValue(max, value) / 100,
15637
16026
  "data-rpguitype": "progress",
15638
16027
  percentageWidth: percentageWidth,
15639
16028
  minWidth: minWidth,
15640
16029
  style: style
15641
- }, displayText && React__default.createElement(TextOverlay$2, null, React__default.createElement(ProgressBarText, null, value, "/", max)), React__default.createElement("div", {
16030
+ }, displayText && React__default.createElement(TextOverlay$1, null, React__default.createElement(ProgressBarText, null, value, "/", max)), React__default.createElement("div", {
15642
16031
  className: " rpgui-progress-track"
15643
16032
  }, React__default.createElement("div", {
15644
16033
  className: "rpgui-progress-fill " + color + " ",
@@ -15656,11 +16045,11 @@ var ProgressBarText = /*#__PURE__*/styled.span.withConfig({
15656
16045
  displayName: "ProgressBar__ProgressBarText",
15657
16046
  componentId: "sc-qa6fzh-0"
15658
16047
  })(["font-size:", " !important;color:white;text-align:center;z-index:1;position:absolute;left:50%;transform:translateX(-50%);top:12px;"], uiFonts.size.small);
15659
- var TextOverlay$2 = /*#__PURE__*/styled.div.withConfig({
16048
+ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
15660
16049
  displayName: "ProgressBar__TextOverlay",
15661
16050
  componentId: "sc-qa6fzh-1"
15662
16051
  })(["width:100%;position:relative;"]);
15663
- var Container$i = /*#__PURE__*/styled.div.withConfig({
16052
+ var Container$k = /*#__PURE__*/styled.div.withConfig({
15664
16053
  displayName: "ProgressBar__Container",
15665
16054
  componentId: "sc-qa6fzh-2"
15666
16055
  })(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
@@ -15999,7 +16388,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
15999
16388
  bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
16000
16389
  _ref$margin = _ref.margin,
16001
16390
  margin = _ref$margin === void 0 ? 20 : _ref$margin;
16002
- return React__default.createElement(Container$j, {
16391
+ return React__default.createElement(Container$l, {
16003
16392
  className: "simple-progress-bar"
16004
16393
  }, React__default.createElement(ProgressBarContainer, {
16005
16394
  margin: margin
@@ -16008,7 +16397,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
16008
16397
  bgColor: bgColor
16009
16398
  }))));
16010
16399
  };
16011
- var Container$j = /*#__PURE__*/styled.div.withConfig({
16400
+ var Container$l = /*#__PURE__*/styled.div.withConfig({
16012
16401
  displayName: "SimpleProgressBar__Container",
16013
16402
  componentId: "sc-mbeil3-0"
16014
16403
  })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
@@ -16041,13 +16430,20 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
16041
16430
  _ref$showSkillPoints = _ref.showSkillPoints,
16042
16431
  showSkillPoints = _ref$showSkillPoints === void 0 ? true : _ref$showSkillPoints,
16043
16432
  atlasIMG = _ref.atlasIMG,
16044
- atlasJSON = _ref.atlasJSON;
16433
+ atlasJSON = _ref.atlasJSON,
16434
+ buffAndDebuff = _ref.buffAndDebuff;
16045
16435
  if (!skillPointsToNextLevel) {
16046
16436
  skillPointsToNextLevel = shared.getSPForLevel(level + 1);
16047
16437
  }
16048
16438
  var nextLevelSPWillbe = skillPoints + skillPointsToNextLevel;
16049
16439
  var ratio = skillPoints / nextLevelSPWillbe * 100;
16050
- return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, React__default.createElement(TitleName, null, skillName), React__default.createElement(ValueDisplay, null, "lv ", level)), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React__default.createElement(SpriteContainer$1, null, React__default.createElement(ErrorBoundary, null, React__default.createElement(SpriteFromAtlas, {
16440
+ var skillsBuffsCalc = function skillsBuffsCalc() {
16441
+ if (buffAndDebuff) {
16442
+ return 1 + buffAndDebuff / 100;
16443
+ }
16444
+ return;
16445
+ };
16446
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React__default.createElement(React__default.Fragment, null, buffAndDebuff > 0 ? React__default.createElement(BuffAndDebuffContainer, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameBuff, null, skillName), React__default.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React__default.createElement(TitleNameBuffContainer, null, React__default.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React__default.createElement(React__default.Fragment, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameDebuff, null, skillName), React__default.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React__default.createElement("div", null, React__default.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React__default.createElement(TitleName, null, skillName)), !buffAndDebuff && React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleName, null, skillName), React__default.createElement(ValueDisplay, null, "lv ", level))), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React__default.createElement(SpriteContainer$1, null, React__default.createElement(ErrorBoundary, null, React__default.createElement(SpriteFromAtlas, {
16051
16447
  atlasIMG: atlasIMG,
16052
16448
  atlasJSON: atlasJSON,
16053
16449
  spriteKey: texturePath,
@@ -16079,22 +16475,42 @@ var TitleName = /*#__PURE__*/styled.span.withConfig({
16079
16475
  displayName: "SkillProgressBar__TitleName",
16080
16476
  componentId: "sc-5vuroc-4"
16081
16477
  })(["margin-left:5px;"]);
16478
+ var TitleNameBuff = /*#__PURE__*/styled.span.withConfig({
16479
+ displayName: "SkillProgressBar__TitleNameBuff",
16480
+ componentId: "sc-5vuroc-5"
16481
+ })(["margin-left:5px;color:", " !important;"], uiColors.lightGreen);
16482
+ var TitleNameDebuff = /*#__PURE__*/styled.span.withConfig({
16483
+ displayName: "SkillProgressBar__TitleNameDebuff",
16484
+ componentId: "sc-5vuroc-6"
16485
+ })(["margin-left:5px;color:", " !important;"], uiColors.red);
16082
16486
  var ValueDisplay = /*#__PURE__*/styled.span.withConfig({
16083
16487
  displayName: "SkillProgressBar__ValueDisplay",
16084
- componentId: "sc-5vuroc-5"
16488
+ componentId: "sc-5vuroc-7"
16085
16489
  })([""]);
16086
16490
  var ProgressIconContainer = /*#__PURE__*/styled.div.withConfig({
16087
16491
  displayName: "SkillProgressBar__ProgressIconContainer",
16088
- componentId: "sc-5vuroc-6"
16492
+ componentId: "sc-5vuroc-8"
16089
16493
  })(["display:flex;justify-content:center;align-items:center;"]);
16090
16494
  var ProgressBody = /*#__PURE__*/styled.div.withConfig({
16091
16495
  displayName: "SkillProgressBar__ProgressBody",
16092
- componentId: "sc-5vuroc-7"
16496
+ componentId: "sc-5vuroc-9"
16093
16497
  })(["display:flex;flex-direction:row;width:100%;"]);
16094
16498
  var ProgressTitle = /*#__PURE__*/styled.div.withConfig({
16095
16499
  displayName: "SkillProgressBar__ProgressTitle",
16096
- componentId: "sc-5vuroc-8"
16097
- })(["width:100%;display:flex;flex-direction:row;justify-content:space-between;span{font-size:0.6rem;}"]);
16500
+ componentId: "sc-5vuroc-10"
16501
+ })(["width:100%;display:flex;flex-direction:column;justify-content:space-between;span{font-size:0.6rem;}"]);
16502
+ var BuffAndDebuffContainer = /*#__PURE__*/styled.div.withConfig({
16503
+ displayName: "SkillProgressBar__BuffAndDebuffContainer",
16504
+ componentId: "sc-5vuroc-11"
16505
+ })([""]);
16506
+ var TitleNameBuffContainer = /*#__PURE__*/styled.div.withConfig({
16507
+ displayName: "SkillProgressBar__TitleNameBuffContainer",
16508
+ componentId: "sc-5vuroc-12"
16509
+ })([""]);
16510
+ var TitleNameContainer = /*#__PURE__*/styled.div.withConfig({
16511
+ displayName: "SkillProgressBar__TitleNameContainer",
16512
+ componentId: "sc-5vuroc-13"
16513
+ })(["display:flex;justify-content:space-between;"]);
16098
16514
 
16099
16515
  var skillProps = {
16100
16516
  attributes: {
@@ -16181,7 +16597,8 @@ var SkillsContainer = function SkillsContainer(_ref) {
16181
16597
  skillPointsToNextLevel: Math.round(skillDetails.skillPointsToNextLevel) || 0,
16182
16598
  texturePath: value,
16183
16599
  atlasIMG: atlasIMG,
16184
- atlasJSON: atlasJSON
16600
+ atlasJSON: atlasJSON,
16601
+ buffAndDebuff: skillDetails.buffAndDebuff
16185
16602
  }));
16186
16603
  }
16187
16604
  return output;
@@ -16248,7 +16665,7 @@ var SpellInfo = function SpellInfo(_ref) {
16248
16665
  castingType = spell.castingType,
16249
16666
  cooldown = spell.cooldown,
16250
16667
  maxDistanceGrid = spell.maxDistanceGrid;
16251
- return React__default.createElement(Container$k, null, React__default.createElement(Header$1, null, React__default.createElement("div", null, React__default.createElement(Title$6, null, name), React__default.createElement(Type$1, null, magicWords))), React__default.createElement(Statistic$1, null, React__default.createElement("div", {
16668
+ return React__default.createElement(Container$m, null, React__default.createElement(Header$1, null, React__default.createElement("div", null, React__default.createElement(Title$6, null, name), React__default.createElement(Type$1, null, magicWords))), React__default.createElement(Statistic$1, null, React__default.createElement("div", {
16252
16669
  className: "label"
16253
16670
  }, "Casting Type:"), React__default.createElement("div", {
16254
16671
  className: "value"
@@ -16274,7 +16691,7 @@ var SpellInfo = function SpellInfo(_ref) {
16274
16691
  className: "value"
16275
16692
  }, requiredItem))), React__default.createElement(Description$1, null, description));
16276
16693
  };
16277
- var Container$k = /*#__PURE__*/styled.div.withConfig({
16694
+ var Container$m = /*#__PURE__*/styled.div.withConfig({
16278
16695
  displayName: "SpellInfo__Container",
16279
16696
  componentId: "sc-4hbw3q-0"
16280
16697
  })(["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);
@@ -16302,13 +16719,13 @@ var Statistic$1 = /*#__PURE__*/styled.div.withConfig({
16302
16719
  var SpellInfoDisplay = function SpellInfoDisplay(_ref) {
16303
16720
  var spell = _ref.spell,
16304
16721
  isMobile = _ref.isMobile;
16305
- return React__default.createElement(Flex$1, {
16722
+ return React__default.createElement(Flex$3, {
16306
16723
  "$isMobile": isMobile
16307
16724
  }, React__default.createElement(SpellInfo, {
16308
16725
  spell: spell
16309
16726
  }));
16310
16727
  };
16311
- var Flex$1 = /*#__PURE__*/styled.div.withConfig({
16728
+ var Flex$3 = /*#__PURE__*/styled.div.withConfig({
16312
16729
  displayName: "SpellInfoDisplay__Flex",
16313
16730
  componentId: "sc-1htnsmm-0"
16314
16731
  })(["display:flex;gap:0.5rem;flex-direction:", ";@media (max-width:580px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
@@ -16328,7 +16745,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
16328
16745
  var _ref$current;
16329
16746
  (_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
16330
16747
  };
16331
- return React__default.createElement(ModalPortal, null, React__default.createElement(Container$l, {
16748
+ return React__default.createElement(ModalPortal, null, React__default.createElement(Container$n, {
16332
16749
  ref: ref,
16333
16750
  onTouchEnd: function onTouchEnd() {
16334
16751
  handleFadeOut();
@@ -16353,7 +16770,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
16353
16770
  }, option.text);
16354
16771
  }))));
16355
16772
  };
16356
- var Container$l = /*#__PURE__*/styled.div.withConfig({
16773
+ var Container$n = /*#__PURE__*/styled.div.withConfig({
16357
16774
  displayName: "MobileSpellTooltip__Container",
16358
16775
  componentId: "sc-6p7uvr-0"
16359
16776
  })(["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;}"]);
@@ -16394,13 +16811,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
16394
16811
  }
16395
16812
  return;
16396
16813
  }, []);
16397
- return React__default.createElement(ModalPortal, null, React__default.createElement(Container$m, {
16814
+ return React__default.createElement(ModalPortal, null, React__default.createElement(Container$o, {
16398
16815
  ref: ref
16399
16816
  }, React__default.createElement(SpellInfoDisplay, {
16400
16817
  spell: spell
16401
16818
  })));
16402
16819
  };
16403
- var Container$m = /*#__PURE__*/styled.div.withConfig({
16820
+ var Container$o = /*#__PURE__*/styled.div.withConfig({
16404
16821
  displayName: "SpellTooltip__Container",
16405
16822
  componentId: "sc-1go0gwg-0"
16406
16823
  })(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
@@ -16452,8 +16869,7 @@ var Spell = function Spell(_ref) {
16452
16869
  var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
16453
16870
  return React__default.createElement(SpellInfoWrapper, {
16454
16871
  spell: spell
16455
- }, React__default.createElement(Container$n, {
16456
- disabled: disabled || (activeCooldown != null ? activeCooldown : 0) > 0,
16872
+ }, React__default.createElement(Container$p, {
16457
16873
  onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
16458
16874
  isSettingShortcut: isSettingShortcut && !disabled,
16459
16875
  className: "spell"
@@ -16467,7 +16883,7 @@ var Spell = function Spell(_ref) {
16467
16883
  className: "mana"
16468
16884
  }, manaCost))));
16469
16885
  };
16470
- var Container$n = /*#__PURE__*/styled.button.withConfig({
16886
+ var Container$p = /*#__PURE__*/styled.button.withConfig({
16471
16887
  displayName: "Spell__Container",
16472
16888
  componentId: "sc-j96fa2-0"
16473
16889
  })(["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) {
@@ -16524,17 +16940,6 @@ var Spellbook = function Spellbook(_ref) {
16524
16940
  var _useState2 = React.useState(-1),
16525
16941
  settingShortcutIndex = _useState2[0],
16526
16942
  setSettingShortcutIndex = _useState2[1];
16527
- React.useEffect(function () {
16528
- var handleEscapeClose = function handleEscapeClose(e) {
16529
- if (e.key === 'Escape') {
16530
- onClose == null ? void 0 : onClose();
16531
- }
16532
- };
16533
- document.addEventListener('keydown', handleEscapeClose);
16534
- return function () {
16535
- document.removeEventListener('keydown', handleEscapeClose);
16536
- };
16537
- }, [onClose]);
16538
16943
  var spellsToDisplay = React.useMemo(function () {
16539
16944
  return spells.sort(function (a, b) {
16540
16945
  if (a.minMagicLevelRequired > b.minMagicLevelRequired) return 1;
@@ -16555,7 +16960,7 @@ var Spellbook = function Spellbook(_ref) {
16555
16960
  height: "inherit",
16556
16961
  cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
16557
16962
  scale: scale
16558
- }, React__default.createElement(Container$o, null, React__default.createElement(Title$8, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
16963
+ }, React__default.createElement(Container$q, null, React__default.createElement(Title$8, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
16559
16964
  setSettingShortcutIndex: setSettingShortcutIndex,
16560
16965
  settingShortcutIndex: settingShortcutIndex,
16561
16966
  shortcuts: shortcuts,
@@ -16589,7 +16994,7 @@ var Title$8 = /*#__PURE__*/styled.h1.withConfig({
16589
16994
  displayName: "Spellbook__Title",
16590
16995
  componentId: "sc-r02nfq-0"
16591
16996
  })(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
16592
- var Container$o = /*#__PURE__*/styled.div.withConfig({
16997
+ var Container$q = /*#__PURE__*/styled.div.withConfig({
16593
16998
  displayName: "Spellbook__Container",
16594
16999
  componentId: "sc-r02nfq-1"
16595
17000
  })(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
@@ -16705,7 +17110,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
16705
17110
  className: "arrow-selector",
16706
17111
  direction: "left",
16707
17112
  onPointerDown: onLeftClick
16708
- }), React__default.createElement(QuantityDisplay$1, null, React__default.createElement(TextOverlay$3, null, React__default.createElement(Item$2, null, selectedQty))), React__default.createElement(StyledArrow, {
17113
+ }), React__default.createElement(QuantityDisplay, null, React__default.createElement(TextOverlay$2, null, React__default.createElement(Item$1, null, selectedQty))), React__default.createElement(StyledArrow, {
16709
17114
  size: 32,
16710
17115
  className: "arrow-selector",
16711
17116
  direction: "right",
@@ -16741,11 +17146,11 @@ var NameValue = /*#__PURE__*/styled.div.withConfig({
16741
17146
  displayName: "TradingItemRow__NameValue",
16742
17147
  componentId: "sc-mja0b5-5"
16743
17148
  })(["p{font-size:0.75rem;margin:0;}"]);
16744
- var Item$2 = /*#__PURE__*/styled.span.withConfig({
17149
+ var Item$1 = /*#__PURE__*/styled.span.withConfig({
16745
17150
  displayName: "TradingItemRow__Item",
16746
17151
  componentId: "sc-mja0b5-6"
16747
17152
  })(["color:white;text-align:center;z-index:1;width:100%;"]);
16748
- var TextOverlay$3 = /*#__PURE__*/styled.div.withConfig({
17153
+ var TextOverlay$2 = /*#__PURE__*/styled.div.withConfig({
16749
17154
  displayName: "TradingItemRow__TextOverlay",
16750
17155
  componentId: "sc-mja0b5-7"
16751
17156
  })(["width:100%;position:relative;"]);
@@ -16753,7 +17158,7 @@ var QuantityContainer$1 = /*#__PURE__*/styled.div.withConfig({
16753
17158
  displayName: "TradingItemRow__QuantityContainer",
16754
17159
  componentId: "sc-mja0b5-8"
16755
17160
  })(["position:relative;display:flex;min-width:100px;width:40%;justify-content:center;align-items:center;flex:40%;"]);
16756
- var QuantityDisplay$1 = /*#__PURE__*/styled.div.withConfig({
17161
+ var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
16757
17162
  displayName: "TradingItemRow__QuantityDisplay",
16758
17163
  componentId: "sc-mja0b5-9"
16759
17164
  })(["font-size:", ";"], uiFonts.size.small);
@@ -16890,11 +17295,11 @@ var Truncate = function Truncate(_ref) {
16890
17295
  var _ref$maxLines = _ref.maxLines,
16891
17296
  maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
16892
17297
  children = _ref.children;
16893
- return React__default.createElement(Container$p, {
17298
+ return React__default.createElement(Container$r, {
16894
17299
  maxLines: maxLines
16895
17300
  }, children);
16896
17301
  };
16897
- var Container$p = /*#__PURE__*/styled.div.withConfig({
17302
+ var Container$r = /*#__PURE__*/styled.div.withConfig({
16898
17303
  displayName: "Truncate__Container",
16899
17304
  componentId: "sc-6x00qb-0"
16900
17305
  })(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
@@ -16957,7 +17362,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
16957
17362
  var _useState2 = React.useState(false),
16958
17363
  showGoNextIndicator = _useState2[0],
16959
17364
  setShowGoNextIndicator = _useState2[1];
16960
- return React__default.createElement(Container$q, null, React__default.createElement(DynamicText, {
17365
+ return React__default.createElement(Container$s, null, React__default.createElement(DynamicText, {
16961
17366
  text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
16962
17367
  onFinish: function onFinish() {
16963
17368
  setShowGoNextIndicator(true);
@@ -16975,7 +17380,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
16975
17380
  }
16976
17381
  }));
16977
17382
  };
16978
- var Container$q = /*#__PURE__*/styled.div.withConfig({
17383
+ var Container$s = /*#__PURE__*/styled.div.withConfig({
16979
17384
  displayName: "NPCDialogText__Container",
16980
17385
  componentId: "sc-1cxkdh9-0"
16981
17386
  })([""]);
@@ -17016,7 +17421,7 @@ var NPCDialog = function NPCDialog(_ref) {
17016
17421
  }
17017
17422
  })), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer$1, null, React__default.createElement(NPCThumbnail$1, {
17018
17423
  src: imagePath || img$5
17019
- }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$r, null, React__default.createElement(TextContainer$2, {
17424
+ }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$t, null, React__default.createElement(TextContainer$2, {
17020
17425
  flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
17021
17426
  }, React__default.createElement(NPCDialogText, {
17022
17427
  type: type,
@@ -17030,7 +17435,7 @@ var NPCDialog = function NPCDialog(_ref) {
17030
17435
  src: imagePath || img$5
17031
17436
  })))));
17032
17437
  };
17033
- var Container$r = /*#__PURE__*/styled.div.withConfig({
17438
+ var Container$t = /*#__PURE__*/styled.div.withConfig({
17034
17439
  displayName: "NPCDialog__Container",
17035
17440
  componentId: "sc-1b4aw74-0"
17036
17441
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);